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"
......@@ -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"
......@@ -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">
......@@ -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"
......@@ -801,7 +818,10 @@
确认
</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)"
......@@ -809,7 +829,10 @@
修改地址
</ElButton>
<ElButton
v-if="row.shipmentType===0 && ['CREATE_LOGISTICS','WAIT_SHIPMENT'].includes(status)"
v-if="
row.shipmentType === 0 &&
['CREATE_LOGISTICS', 'WAIT_SHIPMENT'].includes(status)
"
link
type="primary"
@click="handleRefreshAddress(row)"
......@@ -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('请修改/刷新地址后取消物流重新创建物流订单、获取跟踪号、获取打印面单。', '提示', {
await ElMessageBox.alert(
'请修改/刷新地址后取消物流重新创建物流订单、获取跟踪号、获取打印面单。',
'提示',
{
type: 'warning',
confirmButtonText:'确定',
cancelButtonText:'取消',
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