Commit 4a7ddea5 by zhuzhequan

podus 修改

parent 9c654b70
...@@ -544,6 +544,24 @@ export function statusPushApi(params: (string | number)[]) { ...@@ -544,6 +544,24 @@ export function statusPushApi(params: (string | number)[]) {
) )
} }
// 转至已完成
export function changeToFinished(ids: string) {
return axios.get<never, BaseRespData<never>>(
`factory/podJomallOrderUs/updateToComplete`,
{ params:{ids} },
)
}
// 转至已完成
export function updateTrackingNumberAndRegister(id: number,trackingNumber:string) {
return axios.post<never, BaseRespData<never>>(
`factory/podJomallOrderUs/updateTrackingNumberAndRegister`,
{id,trackingNumber },
)
}
// 完成发货 // 完成发货
export function completeDeliveryApi(params: { export function completeDeliveryApi(params: {
orderIdList: (string | number)[] orderIdList: (string | number)[]
......
...@@ -181,11 +181,6 @@ const menu: MenuItem[] = [ ...@@ -181,11 +181,6 @@ const menu: MenuItem[] = [
label: '下载生产客户端', label: '下载生产客户端',
}, },
{ {
index: '/system/external-authorisation',
id: 5,
label: '外部授权',
},
{
index: '/system/customers', index: '/system/customers',
id: 6, id: 6,
label: '客户管理', label: '客户管理',
......
...@@ -252,8 +252,8 @@ ...@@ -252,8 +252,8 @@
</ElFormItem> </ElFormItem>
<ElFormItem> <ElFormItem>
<span> <span>
<ElButton link @click="resetSearchForm" style="font-size: 12px" <ElButton link style="font-size: 12px" @click="resetSearchForm"
><span title="重置查询条件">重置</span></ElButton ><span title="重置查询条件">重置</span></ElButton
> >
</span> </span>
</ElFormItem> </ElFormItem>
...@@ -471,7 +471,7 @@ ...@@ -471,7 +471,7 @@
<ElFormItem v-if="status === 'WAIT_SHIPMENT'"> <ElFormItem v-if="status === 'WAIT_SHIPMENT'">
<span class="item"> <span class="item">
<ElButton type="primary" @click="completeDelivery()" <ElButton type="primary" @click="completeDelivery()"
>完成发货</ElButton >完成发货</ElButton
> >
</span> </span>
</ElFormItem> </ElFormItem>
...@@ -491,7 +491,7 @@ ...@@ -491,7 +491,7 @@
selection.some((item) => item.shipmentType !== 1) selection.some((item) => item.shipmentType !== 1)
" "
@click="getOrderByIdApi('createLogisticsOrder')" @click="getOrderByIdApi('createLogisticsOrder')"
>创建物流订单</ElDropdownItem >创建物流订单</ElDropdownItem
> >
<ElDropdownItem <ElDropdownItem
:disabled=" :disabled="
...@@ -499,7 +499,7 @@ ...@@ -499,7 +499,7 @@
selection.some((item) => item.shipmentType !== 1) selection.some((item) => item.shipmentType !== 1)
" "
@click="getOrderByIdApi('getTrackingNumber')" @click="getOrderByIdApi('getTrackingNumber')"
>获取跟踪号</ElDropdownItem >获取跟踪号</ElDropdownItem
> >
<ElDropdownItem <ElDropdownItem
:disabled=" :disabled="
...@@ -507,7 +507,7 @@ ...@@ -507,7 +507,7 @@
selection.some((item) => item.shipmentType !== 1) selection.some((item) => item.shipmentType !== 1)
" "
@click="getOrderByIdApi('getPrintOrder')" @click="getOrderByIdApi('getPrintOrder')"
>获取打印面单</ElDropdownItem >获取打印面单</ElDropdownItem
> >
<ElDropdownItem <ElDropdownItem
:disabled=" :disabled="
...@@ -515,7 +515,7 @@ ...@@ -515,7 +515,7 @@
selection.some((item) => item.shipmentType !== 1) selection.some((item) => item.shipmentType !== 1)
" "
@click="getOrderByIdApi('cancelLogisticsOrder')" @click="getOrderByIdApi('cancelLogisticsOrder')"
>取消物流订单</ElDropdownItem >取消物流订单</ElDropdownItem
> >
<!-- <ElDropdownItem <!-- <ElDropdownItem
:disabled=" :disabled="
...@@ -553,7 +553,7 @@ ...@@ -553,7 +553,7 @@
> >
<span class="item"> <span class="item">
<ElButton type="primary" @click="downloadMaterial" <ElButton type="primary" @click="downloadMaterial"
>下载素材</ElButton >下载素材</ElButton
> >
</span> </span>
</ElFormItem> </ElFormItem>
...@@ -624,7 +624,7 @@ ...@@ -624,7 +624,7 @@
selection.length === 0 && cardSelection.length === 0 selection.length === 0 && cardSelection.length === 0
" "
@click="rejectOrder('TO_BE_CONFIRMED')" @click="rejectOrder('TO_BE_CONFIRMED')"
>待确认</ElDropdownItem >待确认</ElDropdownItem
> >
<ElDropdownItem <ElDropdownItem
v-if=" v-if="
...@@ -636,7 +636,7 @@ ...@@ -636,7 +636,7 @@
selection.length === 0 && cardSelection.length === 0 selection.length === 0 && cardSelection.length === 0
" "
@click="rejectOrder('CREATE_LOGISTICS')" @click="rejectOrder('CREATE_LOGISTICS')"
>待创建物流</ElDropdownItem >待创建物流</ElDropdownItem
> >
<ElDropdownItem <ElDropdownItem
v-if="status === 'PICKING' || status === 'IN_PRODUCTION'" v-if="status === 'PICKING' || status === 'IN_PRODUCTION'"
...@@ -644,7 +644,7 @@ ...@@ -644,7 +644,7 @@
selection.length === 0 && cardSelection.length === 0 selection.length === 0 && cardSelection.length === 0
" "
@click="rejectOrder('TO_BE_ARRANGE')" @click="rejectOrder('TO_BE_ARRANGE')"
>待排单</ElDropdownItem >待排单</ElDropdownItem
> >
<ElDropdownItem <ElDropdownItem
v-if="status === 'IN_PRODUCTION'" v-if="status === 'IN_PRODUCTION'"
...@@ -652,7 +652,7 @@ ...@@ -652,7 +652,7 @@
selection.length === 0 && cardSelection.length === 0 selection.length === 0 && cardSelection.length === 0
" "
@click="rejectOrder('PICKING')" @click="rejectOrder('PICKING')"
>待拣胚</ElDropdownItem >待拣胚</ElDropdownItem
> >
</ElDropdownMenu> </ElDropdownMenu>
</template> </template>
...@@ -666,6 +666,14 @@ ...@@ -666,6 +666,14 @@
<ElButton type="warning" @click="statusPush">状态推送</ElButton> <ElButton type="warning" @click="statusPush">状态推送</ElButton>
</span> </span>
</ElFormItem> </ElFormItem>
<ElFormItem
v-if="['WAIT_TRACK'].includes(status)"
>
<span class="item">
<ElButton type="success" @click="setFinish">转至已完成</ElButton>
</span>
</ElFormItem>
<ElFormItem v-if="status === 'COMPLETE'"> <ElFormItem v-if="status === 'COMPLETE'">
<span class="item"> <span class="item">
<ElButton type="success" @click="exportData">导出</ElButton> <ElButton type="success" @click="exportData">导出</ElButton>
...@@ -674,7 +682,7 @@ ...@@ -674,7 +682,7 @@
<ElFormItem v-if="status === 'BATCH_DOWNLOAD'"> <ElFormItem v-if="status === 'BATCH_DOWNLOAD'">
<span class="item"> <span class="item">
<ElButton type="danger" @click="handleBatchDelete('batch')" <ElButton type="danger" @click="handleBatchDelete('batch')"
>批量删除</ElButton >批量删除</ElButton
> >
</span> </span>
</ElFormItem> </ElFormItem>
...@@ -697,7 +705,7 @@ ...@@ -697,7 +705,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
...@@ -769,7 +777,7 @@ ...@@ -769,7 +777,7 @@
<span <span
v-if="interceptionStatus.production['0']" v-if="interceptionStatus.production['0']"
class="tabs-node_count blue" class="tabs-node_count blue"
>{{ interceptionStatus.production['0'] }}</span >{{ interceptionStatus.production['0'] }}</span
> >
</div> </div>
<div <div
...@@ -781,7 +789,7 @@ ...@@ -781,7 +789,7 @@
<span <span
v-if="interceptionStatus.production['1']" v-if="interceptionStatus.production['1']"
class="tabs-node_count blue" class="tabs-node_count blue"
>{{ interceptionStatus.production['1'] }}</span >{{ interceptionStatus.production['1'] }}</span
> >
</div> </div>
<div <div
...@@ -793,7 +801,7 @@ ...@@ -793,7 +801,7 @@
<span <span
v-if="interceptionStatus.production['2']" v-if="interceptionStatus.production['2']"
class="tabs-node_count red" class="tabs-node_count red"
>{{ interceptionStatus.production['2'] }}</span >{{ interceptionStatus.production['2'] }}</span
> >
</div> </div>
<div <div
...@@ -805,7 +813,7 @@ ...@@ -805,7 +813,7 @@
<span <span
v-if="interceptionStatus.shipment['0']" v-if="interceptionStatus.shipment['0']"
class="tabs-node_count blue" class="tabs-node_count blue"
>{{ interceptionStatus.shipment['0'] }}</span >{{ interceptionStatus.shipment['0'] }}</span
> >
</div> </div>
<div <div
...@@ -817,7 +825,7 @@ ...@@ -817,7 +825,7 @@
<span <span
v-if="interceptionStatus.shipment['1']" v-if="interceptionStatus.shipment['1']"
class="tabs-node_count blue" class="tabs-node_count blue"
>{{ interceptionStatus.shipment['1'] }}</span >{{ interceptionStatus.shipment['1'] }}</span
> >
</div> </div>
<div <div
...@@ -829,7 +837,7 @@ ...@@ -829,7 +837,7 @@
<span <span
v-if="interceptionStatus.shipment['2']" v-if="interceptionStatus.shipment['2']"
class="tabs-node_count red" class="tabs-node_count red"
>{{ interceptionStatus.shipment['2'] }}</span >{{ interceptionStatus.shipment['2'] }}</span
> >
</div> </div>
</div> </div>
...@@ -870,7 +878,9 @@ ...@@ -870,7 +878,9 @@
" "
placement="bottom" placement="bottom"
> >
<el-icon color="#E6A23C"><InfoFilled /></el-icon> <el-icon color="#E6A23C">
<InfoFilled />
</el-icon>
</el-tooltip> </el-tooltip>
<span class="serial-number">{{ index + 1 }}</span> <span class="serial-number">{{ index + 1 }}</span>
</div> </div>
...@@ -1005,7 +1015,7 @@ ...@@ -1005,7 +1015,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"
...@@ -1047,14 +1057,14 @@ ...@@ -1047,14 +1057,14 @@
> >
<!-- <span class="goods-item-info-item-label">补胚状态:</span> --> <!-- <span class="goods-item-info-item-label">补胚状态:</span> -->
<el-tag size="small" effect="dark" type="danger" <el-tag size="small" effect="dark" type="danger"
>补胚中 >补胚中
</el-tag> </el-tag>
</div> </div>
</div> </div>
<div class="goods-item-info"> <div class="goods-item-info">
<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 class="goods-item-info-item-value"> <span class="goods-item-info-item-value">
{{ item.productPrice }} {{ item.productPrice }}
...@@ -1081,14 +1091,14 @@ ...@@ -1081,14 +1091,14 @@
<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' ||
status === 'CREATE_LOGISTICS' status === 'CREATE_LOGISTICS'
? '数量:' ? '数量:'
: '已生产数量:' : '已生产数量:'
}}</span> }}</span>
<span class="goods-item-info-item-value"> <span class="goods-item-info-item-value">
{{ {{
status === 'EXCEPTION_ORDER' || status === 'EXCEPTION_ORDER' ||
...@@ -1156,7 +1166,7 @@ ...@@ -1156,7 +1166,7 @@
type="success" type="success"
style="height: 23px" style="height: 23px"
@click="applyForReplenishment(item)" @click="applyForReplenishment(item)"
>申请补胚 >申请补胚
</el-button> </el-button>
</div> </div>
...@@ -1172,7 +1182,7 @@ ...@@ -1172,7 +1182,7 @@
type="primary" type="primary"
style="height: 23px; padding: 0" style="height: 23px; padding: 0"
@click="downloadMaterialItem(item)" @click="downloadMaterialItem(item)"
>下载素材 >下载素材
</el-button> </el-button>
<el-button <el-button
link link
...@@ -1180,7 +1190,7 @@ ...@@ -1180,7 +1190,7 @@
type="warning" type="warning"
style="height: 23px; margin: 0" style="height: 23px; margin: 0"
@click="downloadTifItem('tiff', item.id)" @click="downloadTifItem('tiff', item.id)"
>TIF排版 >TIF排版
</el-button> </el-button>
<el-button <el-button
link link
...@@ -1188,7 +1198,7 @@ ...@@ -1188,7 +1198,7 @@
type="warning" type="warning"
style="height: 23px; margin: 0" style="height: 23px; margin: 0"
@click="downloadTifItem('png', item.id)" @click="downloadTifItem('png', item.id)"
>PNG排版 >PNG排版
</el-button> </el-button>
</div> </div>
</div> </div>
...@@ -1371,17 +1381,17 @@ ...@@ -1371,17 +1381,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">
...@@ -1446,9 +1456,9 @@ ...@@ -1446,9 +1456,9 @@
</div> </div>
</template> </template>
<template #failReason="{ row }"> <template #failReason="{ row }">
<span v-html="row.failReason" style="white-space: pre-line"></span> <span style="white-space: pre-line" v-html="row.failReason"></span>
</template> </template>
<template #operate="{ row }"> <template #operate="{ row }">
<div <div
v-if="status === 'BATCH_DOWNLOAD'" v-if="status === 'BATCH_DOWNLOAD'"
class="operate-box-vertical" class="operate-box-vertical"
...@@ -1522,6 +1532,9 @@ ...@@ -1522,6 +1532,9 @@
</ElButton> </ElButton>
</span> </span>
<span v-if="['WAIT_TRACK'].includes(status)" class="operate-item">
<ElButton link type="warning" @click="updateTrackingNumber">修改跟踪号</ElButton>
</span>
<!-- <span <!-- <span
v-if="!row.expressSheet && row.status === 'TO_BE_CONFIRMED'" v-if="!row.expressSheet && row.status === 'TO_BE_CONFIRMED'"
class="operate-item" class="operate-item"
...@@ -1587,7 +1600,7 @@ ...@@ -1587,7 +1600,7 @@
class="operate-item" class="operate-item"
> >
<ElButton link type="primary" @click="logTrajectory(row)" <ElButton link type="primary" @click="logTrajectory(row)"
>物流轨迹</ElButton >物流轨迹</ElButton
> >
</span> </span>
</div> </div>
...@@ -1630,7 +1643,9 @@ ...@@ -1630,7 +1643,9 @@
" "
placement="bottom" placement="bottom"
> >
<el-icon color="#E6A23C"><InfoFilled /></el-icon> <el-icon color="#E6A23C">
<InfoFilled />
</el-icon>
</el-tooltip> </el-tooltip>
</template> </template>
<template <template
...@@ -1668,8 +1683,8 @@ ...@@ -1668,8 +1683,8 @@
</div> </div>
<Icon <Icon
name="caozuorizhi" name="caozuorizhi"
@click="(e: MouseEvent) => operationLog(cardItem.podJomallOrderUsId, e)"
style="width: 28px; height: 28px" style="width: 28px; height: 28px"
@click="(e: MouseEvent) => operationLog(cardItem.podJomallOrderUsId, e)"
> >
<template #title> <template #title>
<title>操作日志</title> <title>操作日志</title>
...@@ -1713,7 +1728,7 @@ ...@@ -1713,7 +1728,7 @@
:title="`商品名称:${cardItem?.productName || ''}`" :title="`商品名称:${cardItem?.productName || ''}`"
> >
<span class="grid-item-value" <span class="grid-item-value"
>{{ cardItem?.productName }} >{{ cardItem?.productName }}
</span> </span>
</div> </div>
<div <div
...@@ -1840,7 +1855,7 @@ ...@@ -1840,7 +1855,7 @@
</div> </div>
<div v-if="cardItem.isReplenishment" class="grid-item"> <div v-if="cardItem.isReplenishment" class="grid-item">
<el-tag size="small" type="danger" effect="dark" <el-tag size="small" type="danger" effect="dark"
>补胚中 >补胚中
</el-tag> </el-tag>
</div> </div>
</div> </div>
...@@ -1853,10 +1868,10 @@ ...@@ -1853,10 +1868,10 @@
<div class="pagination"> <div class="pagination">
<div class="total"> <div class="total">
<span <span
>已选择 >已选择
<span style="color: red">{{ <span style="color: red">{{
selection.length || cardSelection.length selection.length || cardSelection.length
}}</span> }}</span>
条数据</span 条数据</span
> >
</div> </div>
...@@ -1873,15 +1888,15 @@ ...@@ -1873,15 +1888,15 @@
></ElPagination> ></ElPagination>
<div class="pageSize"> <div class="pageSize">
<span <span
>自定义条数 >自定义条数
<span <span
><el-input ><el-input
v-model="pageSize" v-model="pageSize"
type="number" type="number"
style="width: 100px" style="width: 100px"
clearable clearable
@blur="inputBlur" @blur="inputBlur"
></el-input ></el-input
></span> ></span>
/</span /</span
> >
...@@ -1993,7 +2008,8 @@ ...@@ -1993,7 +2008,8 @@
link link
style="margin-left: 10px" style="margin-left: 10px"
@click="changeChinaTime('Asia/Shanghai')" @click="changeChinaTime('Asia/Shanghai')"
>北京时间</el-button >北京时间
</el-button
> >
<el-button <el-button
:type="timeType === 'America/New_York' ? 'primary' : ''" :type="timeType === 'America/New_York' ? 'primary' : ''"
...@@ -2001,7 +2017,8 @@ ...@@ -2001,7 +2017,8 @@
link link
style="margin-left: 10px" style="margin-left: 10px"
@click="changeChinaTime('America/New_York')" @click="changeChinaTime('America/New_York')"
>新泽西时间</el-button >新泽西时间
</el-button
> >
<el-button <el-button
:type="timeType === 'America/Los_Angeles' ? 'primary' : ''" :type="timeType === 'America/Los_Angeles' ? 'primary' : ''"
...@@ -2009,7 +2026,8 @@ ...@@ -2009,7 +2026,8 @@
link link
style="margin-left: 10px" style="margin-left: 10px"
@click="changeChinaTime('America/Los_Angeles')" @click="changeChinaTime('America/Los_Angeles')"
>洛杉矶时间</el-button >洛杉矶时间
</el-button
> >
</div> </div>
</div> </div>
...@@ -2029,7 +2047,7 @@ ...@@ -2029,7 +2047,7 @@
:print-order="printOrder" :print-order="printOrder"
:warehouse-list="warehouseList" :warehouse-list="warehouseList"
@set-printer="handlePrinterChange" @set-printer="handlePrinterChange"
@set-warehouseId="handleWarehouseIdChange" @set-warehouse-id="handleWarehouseIdChange"
@refresh="onFastRefresh" @refresh="onFastRefresh"
/> />
<InspPackagOrder <InspPackagOrder
...@@ -2286,7 +2304,7 @@ ...@@ -2286,7 +2304,7 @@
:loading="exportLoading" :loading="exportLoading"
type="primary" type="primary"
@click="submitExportForm" @click="submitExportForm"
>确认</el-button >确认</el-button
> >
</span> </span>
</template> </template>
...@@ -2294,7 +2312,7 @@ ...@@ -2294,7 +2312,7 @@
<el-dialog v-model="dialogVisible" width="35%"> <el-dialog v-model="dialogVisible" width="35%">
<img :src="dialogImageUrl" alt="商品预览图片" /> <img :src="dialogImageUrl" alt="商品预览图片" />
</el-dialog> </el-dialog>
<el-dialog title="物流轨迹" v-model="timeLineVisible" width="1000px"> <el-dialog v-model="timeLineVisible" title="物流轨迹" width="1000px">
<el-timeline> <el-timeline>
<el-timeline-item <el-timeline-item
v-for="(item, index) in timeLine" v-for="(item, index) in timeLine"
...@@ -2379,7 +2397,7 @@ import { ...@@ -2379,7 +2397,7 @@ import {
get17TrackInfoApi, get17TrackInfoApi,
getAccountCodeByFactoryIdApi, getAccountCodeByFactoryIdApi,
printPickPdfByBatchNumberApi, printPickPdfByBatchNumberApi,
printProductionPdfByBatchNumberApi, printProductionPdfByBatchNumberApi, changeToFinished, updateTrackingNumberAndRegister,
} from '@/api/podUsOrder' } from '@/api/podUsOrder'
import { BaseRespData } from '@/types/api' import { BaseRespData } from '@/types/api'
...@@ -2423,16 +2441,18 @@ import { isArray, isString } from '@/utils/validate' ...@@ -2423,16 +2441,18 @@ import { isArray, isString } from '@/utils/validate'
import platformJson from '../../../json/platform.json' import platformJson from '../../../json/platform.json'
import { getToken } from '@/api/axios' import { getToken } from '@/api/axios'
import usePermissionBtnStore from '@/store/permission' import usePermissionBtnStore from '@/store/permission'
const permissionBtns = usePermissionBtnStore() const permissionBtns = usePermissionBtnStore()
import { import {
useRouter, useRouter,
type NavigationGuardNext, type NavigationGuardNext,
type RouteLocationNormalized, type RouteLocationNormalized,
} from 'vue-router' } from 'vue-router'
declare global { declare global {
interface Window { interface Window {
ActiveXObject: { ActiveXObject: {
new (type: string): XMLHttpRequest new(type: string): XMLHttpRequest
} }
VBS_BinaryToArray: { VBS_BinaryToArray: {
(data: unknown): { toArray(): number[] } (data: unknown): { toArray(): number[] }
...@@ -2463,6 +2483,37 @@ const exportForm = ref({ ...@@ -2463,6 +2483,37 @@ const exportForm = ref({
resource: '', resource: '',
}) })
//updateTrackingNumber
const updateTrackingNumber = async () => {
if (selection.value.length !== 1) {
return ElMessage.warning('请选择一条数据')
}
const { value } = await ElMessageBox.prompt('请输入物流跟踪号', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /.+/,
inputErrorMessage: '请输入物流跟踪号',
inputPlaceholder: '物流跟踪号',
})
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const res = await updateTrackingNumberAndRegister(selection.value[0].id, value)
if (res.code !== 200) return
ElMessage.success('操作成功')
search()
await loadTabData()
} catch (e) {
console.error(e)
} finally {
loading.close()
}
}
const exportData = () => { const exportData = () => {
exportVisible.value = true exportVisible.value = true
} }
...@@ -2800,8 +2851,9 @@ const handleReComposingDesign = async (row: PodUsOrderListData) => { ...@@ -2800,8 +2851,9 @@ const handleReComposingDesign = async (row: PodUsOrderListData) => {
} }
} }
const tableColumns = computed(() => { const tableColumns = computed(() => {
let arr = []
if (status.value === 'BATCH_DOWNLOAD') { if (status.value === 'BATCH_DOWNLOAD') {
return [ arr = [
{ {
label: '批次号', label: '批次号',
prop: 'batchArrangeNum', prop: 'batchArrangeNum',
...@@ -2870,8 +2922,9 @@ const tableColumns = computed(() => { ...@@ -2870,8 +2922,9 @@ const tableColumns = computed(() => {
prop: 'operate', prop: 'operate',
}, },
] ]
return arr
} }
return [ arr = [
{ {
label: '序号', label: '序号',
prop: 'serialNumber', prop: 'serialNumber',
...@@ -2917,16 +2970,28 @@ const tableColumns = computed(() => { ...@@ -2917,16 +2970,28 @@ const tableColumns = computed(() => {
prop: 'exceptionReason', prop: 'exceptionReason',
slot: 'exceptionReason', slot: 'exceptionReason',
align: 'left', align: 'left',
},{
label: '物流跟踪状态',
width: 220,
prop: 'track17_Status',
align: 'left',
}, },
{ {
label: '操作', label: '操作',
slot: 'operate', slot: 'operate',
width: 80, width: 120,
align: 'center', align: 'center',
fixed: 'right', fixed: 'right',
prop: 'operate', prop: 'operate',
}, },
] ]
if(!['WAIT_TRACK','IN_TRANSIT'].includes(status.value)){
const index = arr.findIndex(item => item.prop === 'track17_Status')
if(index>=0){
arr.splice(index,1)
}
}
return arr
}) })
const rightMenuRef = ref() const rightMenuRef = ref()
const rightClick = (e: MouseEvent) => { const rightClick = (e: MouseEvent) => {
...@@ -3035,16 +3100,16 @@ const loadTabData = async () => { ...@@ -3035,16 +3100,16 @@ const loadTabData = async () => {
// 发货拦截数量 // 发货拦截数量
const shipmentCount = (statusRes.data as InterceptStateGroupData)?.shipment const shipmentCount = (statusRes.data as InterceptStateGroupData)?.shipment
? Object.values( ? Object.values(
(statusRes.data as InterceptStateGroupData).shipment, (statusRes.data as InterceptStateGroupData).shipment,
).reduce((sum: number, value: unknown) => sum + (Number(value) || 0), 0) ).reduce((sum: number, value: unknown) => sum + (Number(value) || 0), 0)
: 0 : 0
// 生产拦截数量 // 生产拦截数量
const productionCount = (statusRes.data as InterceptStateGroupData) const productionCount = (statusRes.data as InterceptStateGroupData)
?.production ?.production
? Object.values( ? Object.values(
(statusRes.data as InterceptStateGroupData).production, (statusRes.data as InterceptStateGroupData).production,
).reduce((sum: number, value: unknown) => sum + (Number(value) || 0), 0) ).reduce((sum: number, value: unknown) => sum + (Number(value) || 0), 0)
: 0 : 0
tabsNav.value.splice(completeIndex + 1, 0, { tabsNav.value.splice(completeIndex + 1, 0, {
...@@ -3370,8 +3435,8 @@ const downloadTif = async (type: string) => { ...@@ -3370,8 +3435,8 @@ const downloadTif = async (type: string) => {
a.href = window.URL.createObjectURL(blob) a.href = window.URL.createObjectURL(blob)
a.target = '_blank' a.target = '_blank'
a.download = (res.message as string).split('/')[ a.download = (res.message as string).split('/')[
(res.message as string).split('/').length - 1 (res.message as string).split('/').length - 1
] ]
a.click() a.click()
pngDownloadLoading.value = false pngDownloadLoading.value = false
}) })
...@@ -3418,8 +3483,8 @@ const downloadTifItem = async (type: string, id: number) => { ...@@ -3418,8 +3483,8 @@ const downloadTifItem = async (type: string, id: number) => {
a.href = window.URL.createObjectURL(blob) a.href = window.URL.createObjectURL(blob)
a.target = '_blank' a.target = '_blank'
a.download = (res.message as string).split('/')[ a.download = (res.message as string).split('/')[
(res.message as string).split('/').length - 1 (res.message as string).split('/').length - 1
] ]
a.click() a.click()
pngDownloadLoading.value = false pngDownloadLoading.value = false
}) })
...@@ -3924,11 +3989,13 @@ const arrangeFinish = async () => { ...@@ -3924,11 +3989,13 @@ const arrangeFinish = async () => {
loading.close() loading.close()
} }
} }
interface timeLineType { interface timeLineType {
time_iso?: string time_iso?: string
time_utc?: string time_utc?: string
description?: string description?: string
} }
const timeLineVisible = ref(false) const timeLineVisible = ref(false)
const timeLine = ref<timeLineType[]>([]) const timeLine = ref<timeLineType[]>([])
const logTrajectory = async (row: { id: string }) => { const logTrajectory = async (row: { id: string }) => {
...@@ -4087,8 +4154,8 @@ const rejectOrder = async (type: string) => { ...@@ -4087,8 +4154,8 @@ const rejectOrder = async (type: string) => {
orderStatus: type, orderStatus: type,
productList: selection.value.length productList: selection.value.length
? selection.value.flatMap( ? selection.value.flatMap(
(item: PodUsOrderListData) => item.productList || [], (item: PodUsOrderListData) => item.productList || [],
) )
: cardSelection.value, : cardSelection.value,
reasonStr: value, reasonStr: value,
}) })
...@@ -4946,8 +5013,8 @@ const interceptChange = async (status: boolean) => { ...@@ -4946,8 +5013,8 @@ const interceptChange = async (status: boolean) => {
? 1 ? 1
: 3 : 3
: interceptCurrent.value === 1 : interceptCurrent.value === 1
? 2 ? 2
: 4 : 4
try { try {
const res = await interceptUpdateApi({ const res = await interceptUpdateApi({
orderIds: selection.value.map((item) => item.id), orderIds: selection.value.map((item) => item.id),
...@@ -4998,6 +5065,34 @@ const statusPush = async () => { ...@@ -4998,6 +5065,34 @@ const statusPush = async () => {
} }
} }
// 转至已完成
const setFinish = async () => {
if (selection.value.length === 0) {
return ElMessage.warning('请选择数据')
}
await ElMessageBox.confirm('是否转至已完成?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const res = await changeToFinished(selection.value.map((item) => item.id).join(','))
if (res.code !== 200) return
ElMessage.success('操作成功')
search()
await loadTabData()
} catch (e) {
console.error(e)
} finally {
loading.close()
}
}
// 完成发货 // 完成发货
const completeDelivery = async () => { const completeDelivery = async () => {
if (selection.value.length === 0) { if (selection.value.length === 0) {
...@@ -5052,6 +5147,7 @@ const completeDelivery = async () => { ...@@ -5052,6 +5147,7 @@ const completeDelivery = async () => {
const tempChinaLogs = ref<LogListData[]>([]) const tempChinaLogs = ref<LogListData[]>([])
const timeType = ref<string>('Asia/Shanghai') const timeType = ref<string>('Asia/Shanghai')
function changeChinaTime(zone: string) { function changeChinaTime(zone: string) {
timeType.value = zone timeType.value = zone
logList.value = tempChinaLogs.value.map((el) => { logList.value = tempChinaLogs.value.map((el) => {
...@@ -5064,11 +5160,13 @@ function changeChinaTime(zone: string) { ...@@ -5064,11 +5160,13 @@ function changeChinaTime(zone: string) {
} }
const token = getToken() as string const token = getToken() as string
async function getPermission() { async function getPermission() {
const res = await getAccountCodeByFactoryIdApi({ token }) const res = await getAccountCodeByFactoryIdApi({ token })
permissionBtns.setBtn(res.data) permissionBtns.setBtn(res.data)
console.log(res) console.log(res)
} }
getPermission() getPermission()
const globalProperties = const globalProperties =
getCurrentInstance()?.appContext.config.globalProperties // 获取全局挂载 getCurrentInstance()?.appContext.config.globalProperties // 获取全局挂载
...@@ -5134,6 +5232,7 @@ useRouter().beforeEach((to, from, next) => { ...@@ -5134,6 +5232,7 @@ useRouter().beforeEach((to, from, next) => {
// width: 100px; // width: 100px;
// height: 65px; // height: 65px;
position: relative; position: relative;
img { img {
width: 65%; width: 65%;
} }
...@@ -5240,6 +5339,7 @@ useRouter().beforeEach((to, from, next) => { ...@@ -5240,6 +5339,7 @@ useRouter().beforeEach((to, from, next) => {
display: flex; display: flex;
overflow: hidden; overflow: hidden;
width: 100%; width: 100%;
.grid-item-value { .grid-item-value {
display: flex; display: flex;
flex: 1; flex: 1;
...@@ -5367,6 +5467,7 @@ useRouter().beforeEach((to, from, next) => { ...@@ -5367,6 +5467,7 @@ useRouter().beforeEach((to, from, next) => {
font-size: 15px; font-size: 15px;
} }
} }
.orderNumber { .orderNumber {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
...@@ -5374,6 +5475,7 @@ useRouter().beforeEach((to, from, next) => { ...@@ -5374,6 +5475,7 @@ useRouter().beforeEach((to, from, next) => {
flex: 1; flex: 1;
min-width: 0; /* 关键属性 */ min-width: 0; /* 关键属性 */
} }
.customizedQuantity { .customizedQuantity {
height: 28px; height: 28px;
width: 28px; width: 28px;
...@@ -5387,6 +5489,7 @@ useRouter().beforeEach((to, from, next) => { ...@@ -5387,6 +5489,7 @@ useRouter().beforeEach((to, from, next) => {
font-weight: 700; font-weight: 700;
box-sizing: border-box; box-sizing: border-box;
} }
.triangle-box { .triangle-box {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -5413,6 +5516,7 @@ useRouter().beforeEach((to, from, next) => { ...@@ -5413,6 +5516,7 @@ useRouter().beforeEach((to, from, next) => {
flex-wrap: wrap; flex-wrap: wrap;
} }
} }
.el-dropdown-link { .el-dropdown-link {
cursor: pointer; cursor: pointer;
color: var(--el-color-success); color: var(--el-color-success);
...@@ -5420,15 +5524,18 @@ useRouter().beforeEach((to, from, next) => { ...@@ -5420,15 +5524,18 @@ useRouter().beforeEach((to, from, next) => {
align-items: center; align-items: center;
outline: none; outline: none;
} }
.el-timeline-item__wrapper { .el-timeline-item__wrapper {
padding-left: 15px; padding-left: 15px;
top: -4px; top: -4px;
} }
.el-timeline .el-timeline
> .el-timeline-item:first-child > .el-timeline-item:first-child
.el-timeline-item__timestamp.is-top { .el-timeline-item__timestamp.is-top {
color: #409eff; color: #409eff;
} }
.flex-between { .flex-between {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
......
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