Commit 8a17d767 by zhuzhequan

podus

parent 0831072d
......@@ -32,6 +32,7 @@ declare module 'vue' {
ElImage: typeof import('element-plus/es')['ElImage']
ElInput: typeof import('element-plus/es')['ElInput']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
ElLink: typeof import('element-plus/es')['ElLink']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption']
......@@ -52,6 +53,7 @@ declare module 'vue' {
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
ElTree: typeof import('element-plus/es')['ElTree']
ElUpload: typeof import('element-plus/es')['ElUpload']
Icon: typeof import('./src/components/Icon.vue')['default']
ImageView: typeof import('./src/components/ImageView.vue')['default']
LogList: typeof import('./src/components/LogList.vue')['default']
......
......@@ -153,7 +153,7 @@
style="width: 130px"
>
<ElOption
v-for="(item, index) in ['自有物流','工厂物流']"
v-for="(item, index) in ['自有物流', '工厂物流']"
:key="index"
:value="index"
:label="item"
......@@ -181,7 +181,7 @@
blue: item.quantity && item.quantity > 0,
red: item.status === 'EXCEPTION_ORDER',
}"
>{{ item.quantity }}</span
>{{ item.quantity }}</span
>
</div>
<!-- <div
......@@ -245,7 +245,13 @@
</div>
<div class="operation-box mb-10">
<span v-if="status === 'PICKING'" class="item">
<ElButton :loading="downloadLoading" type="primary" @click="downloadTif"> 排版 </ElButton>
<ElButton
:loading="downloadLoading"
type="primary"
@click="downloadTif"
>
排版
</ElButton>
</span>
<span v-if="status === 'TO_BE_CONFIRMED'" class="item">
<ElButton type="success" @click="confirmOrder"> 确认 </ElButton>
......@@ -253,8 +259,13 @@
<span v-if="status === 'EXCEPTION_ORDER'" class="item">
<ElButton type="success" @click="updateOrder"> 转至待确认 </ElButton>
</span>
<span v-if="status === 'EXCEPTION_ORDER' && exceptionStatus === 3" class="item">
<ElButton type="success" @click="asyncOrderAddress"> 同步收货地址 </ElButton>
<span
v-if="status === 'EXCEPTION_ORDER' && exceptionStatus === 3"
class="item"
>
<ElButton type="success" @click="asyncOrderAddress">
同步收货地址
</ElButton>
</span>
<span
v-if="status === 'EXCEPTION_ORDER' && exceptionStatus === 1"
......@@ -325,19 +336,19 @@
<template #dropdown>
<ElDropdownMenu>
<ElDropdownItem @click="getOrderByIdApi('createLogisticsOrder')"
>创建物流订单</ElDropdownItem
>创建物流订单</ElDropdownItem
>
<ElDropdownItem @click="getOrderByIdApi('getTrackingNumber')"
>获取跟踪号</ElDropdownItem
>获取跟踪号</ElDropdownItem
>
<ElDropdownItem @click="getOrderByIdApi('getPrintOrder')"
>获取打印面单</ElDropdownItem
>获取打印面单</ElDropdownItem
>
<ElDropdownItem @click="getOrderByIdApi('cancelLogisticsOrder')"
>取消物流订单</ElDropdownItem
>取消物流订单</ElDropdownItem
>
<ElDropdownItem @click="getOrderByIdApi('batchChangeLogistics')"
>更换物流</ElDropdownItem
>更换物流</ElDropdownItem
>
</ElDropdownMenu>
</template>
......@@ -467,7 +478,7 @@
</div>
<div class="goods-item-info-item">
<span class="goods-item-info-item-label"
>第三方生产单号:</span
>第三方生产单号:</span
>
<span
class="goods-item-info-item-value"
......@@ -523,13 +534,13 @@
<div class="goods-item-info-item">
<span class="goods-item-info-item-label">{{
status === 'EXCEPTION_ORDER' ||
status === 'PICKING' ||
status === 'TO_BE_CONFIRMED' ||
status === 'STOCK_OUT'
? '数量:'
: '已生产数量:'
}}</span>
status === 'EXCEPTION_ORDER' ||
status === 'PICKING' ||
status === 'TO_BE_CONFIRMED' ||
status === 'STOCK_OUT'
? '数量:'
: '已生产数量:'
}}</span>
<span class="goods-item-info-item-value">
{{
status === 'EXCEPTION_ORDER' ||
......@@ -596,7 +607,7 @@
<div class="order-detail-item">
<span class="order-detail-item-label">物流类型:</span>
<span class="order-detail-item-value">
{{ ['自有物流','工厂物流'][row.shipmentType] }}
{{ ['自有物流', '工厂物流'][row.shipmentType] }}
</span>
</div>
<div class="order-detail-item">
......@@ -732,17 +743,17 @@
<el-timeline-item
:color="row.createTime ? '#409EFF' : ''"
:timestamp="row.createTime"
>创建时间</el-timeline-item
>创建时间</el-timeline-item
>
<el-timeline-item
:color="row.startStockingTime ? '#E6A23C' : ''"
:timestamp="row.startStockingTime"
>确认时间</el-timeline-item
>确认时间</el-timeline-item
>
<el-timeline-item
:color="row.finishTime ? '#67C23A' : ''"
:timestamp="row.finishTime"
>完成时间</el-timeline-item
>完成时间</el-timeline-item
>
</el-timeline>
<!-- <div class="order-time-box">
......@@ -767,6 +778,9 @@
</div>
</div> -->
</template>
<template #exceptionReason="{row}">
<div v-html="row.exceptionReason"></div>
</template>
<template #innerLabel="{ row }">
<div v-if="row.internalMemoList" class="inner-label-box">
<div
......@@ -784,7 +798,10 @@
</template>
<template #operate="{ row }">
<div class="operate-box">
<span class="operate-item" style="display: flex;flex-direction: column">
<span
class="operate-item"
style="display: flex; flex-direction: column"
>
<ElButton
link
type="primary"
......@@ -792,28 +809,34 @@
>
操作日志
</ElButton>
<ElButton
v-if="!row.expressSheet && row.status === 'TO_BE_CONFIRMED'"
link
type="primary"
@click="confirm(row)"
>
<ElButton
v-if="!row.expressSheet && row.status === 'TO_BE_CONFIRMED'"
link
type="primary"
@click="confirm(row)"
>
确认
</ElButton>
<ElButton
v-if="row.shipmentType===1 && ['CREATE_LOGISTICS','WAIT_SHIPMENT'].includes(status)"
v-if="
row.shipmentType === 1 &&
['CREATE_LOGISTICS', 'WAIT_SHIPMENT'].includes(status)
"
link
type="primary"
@click="handleUpdateAddress(row)"
>
修改地址
</ElButton>
<ElButton
v-if="row.shipmentType===0 && ['CREATE_LOGISTICS','WAIT_SHIPMENT'].includes(status)"
link
type="primary"
@click="handleRefreshAddress(row)"
>
<ElButton
v-if="
row.shipmentType === 0 &&
['CREATE_LOGISTICS', 'WAIT_SHIPMENT'].includes(status)
"
link
type="primary"
@click="handleRefreshAddress(row)"
>
刷新地址
</ElButton>
</span>
......@@ -891,7 +914,7 @@
<div class="grid-container">
<div class="grid-item" title="商品名称">
<span class="grid-item-value"
>{{ cardItem?.productName }}
>{{ cardItem?.productName }}
</span>
</div>
<div class="grid-item" title="未生产数量">
......@@ -965,9 +988,9 @@
@on-change="rightChange"
>
<template #default
><div class="menu-item" @click="rightChange('order-number')">
复制订单号
</div>
><div class="menu-item" @click="rightChange('order-number')">
复制订单号
</div>
</template>
</RightClickMenu>
<el-dialog
......@@ -1180,7 +1203,13 @@
</el-button>
</template>
</el-dialog>
<UpdateAddress v-if="updateAddVisible" v-model:form="currentRow" v-model:visible="updateAddVisible" :country-list="countryList" @success="search"></UpdateAddress>
<UpdateAddress
v-if="updateAddVisible"
v-model:form="currentRow"
v-model:visible="updateAddVisible"
:country-list="countryList"
@success="search"
></UpdateAddress>
<ElDialog
v-model="exceptionDialogVisible"
title="转为异常单"
......@@ -1273,7 +1302,10 @@ import {
changeLogisticsApi,
createLogisticsOrderApi,
updateLogisticsToPickingApi,
createLogisticsOrdersApi, syncReceiverAddress, refreshAddressApi, AddressInfo,
createLogisticsOrdersApi,
syncReceiverAddress,
refreshAddressApi,
AddressInfo,
// handleExceptionOrderApi,
} from '@/api/podUsOrder'
import UpdateAddress from './components/updateAddress.vue'
......@@ -1420,7 +1452,7 @@ const getDateRange = (days = 0, type: 'past' | 'future' = 'past') => {
type === 'past' ? end.subtract(days, 'day') : end.add(days, 'day')
return [start.startOf('day').toDate(), end.endOf('day').toDate()]
}
const handleRefreshAddress = async (row:PodUsOrderListData) => {
const handleRefreshAddress = async (row: PodUsOrderListData) => {
try {
await showConfirm('确定刷新地址吗?', {
confirmButtonText: '确认',
......@@ -1431,14 +1463,18 @@ const handleRefreshAddress = async (row:PodUsOrderListData) => {
return
}
await refreshAddressApi([row.id])
await ElMessageBox.alert('请修改/刷新地址后取消物流重新创建物流订单、获取跟踪号、获取打印面单。', '提示', {
type: 'warning',
confirmButtonText:'确定',
cancelButtonText:'取消',
showCancelButton: true,
})
await ElMessageBox.alert(
'请修改/刷新地址后取消物流重新创建物流订单、获取跟踪号、获取打印面单。',
'提示',
{
type: 'warning',
confirmButtonText: '确定',
cancelButtonText: '取消',
showCancelButton: true,
},
)
}
const handleUpdateAddress = async (row:PodUsOrderListData) => {
const handleUpdateAddress = async (row: PodUsOrderListData) => {
const { data } = await getAllCountryApi()
countryList.value = data
currentRow.value = JSON.parse(JSON.stringify(row))
......@@ -1489,10 +1525,12 @@ const tableColumns = computed(() => [
slot: 'innerLabel',
width: 300,
prop: 'innerLabel',
},{
},
{
label: '异常原因',
width: 300,
prop: 'exceptionReason',
slot: 'exceptionReason',
},
{
label: '操作',
......@@ -1541,7 +1579,12 @@ const asyncOrderAddress = async () => {
try {
const res = await syncReceiverAddress(ids)
if (res.code !== 200) return
ElMessage.success('同步成功')
await ElMessageBox.alert('同步收货地址成功,请刷新查看。', '提示', {
type: 'warning',
confirmButtonText: '确定',
cancelButtonText: '取消',
showCancelButton: true,
})
search()
await loadTabData()
} catch (e) {
......@@ -1728,18 +1771,17 @@ const confirmOrder = async () => {
}
const downloadTif = async () => {
if(!selection.value.length) {
if (!selection.value.length) {
return ElMessage.warning('请选择数据')
}
downloadLoading.value = true
try {
const res= await composingDesignImages(selection.value.map(el=>el.id))
window.open(filePath+res.message, '_blank')
const res = await composingDesignImages(selection.value.map((el) => el.id))
window.open(filePath + res.message, '_blank')
downloadLoading.value = false
}catch (e){
} catch (e) {
downloadLoading.value = false
}
}
const loadProductionClient = async () => {
......@@ -2913,8 +2955,8 @@ const handleExceptionCommand = (command: number) => {
}
}
.operate-item{
.el-button{
.operate-item {
.el-button {
margin-left: 0 !important;
margin-top: 20px !important;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment