Commit 8a17d767 by zhuzhequan

podus

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