Commit 4a7ddea5 by zhuzhequan

podus 修改

parent 9c654b70
......@@ -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: {
orderIdList: (string | number)[]
......
......@@ -181,11 +181,6 @@ const menu: MenuItem[] = [
label: '下载生产客户端',
},
{
index: '/system/external-authorisation',
id: 5,
label: '外部授权',
},
{
index: '/system/customers',
id: 6,
label: '客户管理',
......
......@@ -252,7 +252,7 @@
</ElFormItem>
<ElFormItem>
<span>
<ElButton link @click="resetSearchForm" style="font-size: 12px"
<ElButton link style="font-size: 12px" @click="resetSearchForm"
><span title="重置查询条件">重置</span></ElButton
>
</span>
......@@ -666,6 +666,14 @@
<ElButton type="warning" @click="statusPush">状态推送</ElButton>
</span>
</ElFormItem>
<ElFormItem
v-if="['WAIT_TRACK'].includes(status)"
>
<span class="item">
<ElButton type="success" @click="setFinish">转至已完成</ElButton>
</span>
</ElFormItem>
<ElFormItem v-if="status === 'COMPLETE'">
<span class="item">
<ElButton type="success" @click="exportData">导出</ElButton>
......@@ -870,7 +878,9 @@
"
placement="bottom"
>
<el-icon color="#E6A23C"><InfoFilled /></el-icon>
<el-icon color="#E6A23C">
<InfoFilled />
</el-icon>
</el-tooltip>
<span class="serial-number">{{ index + 1 }}</span>
</div>
......@@ -1446,7 +1456,7 @@
</div>
</template>
<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 #operate="{ row }">
<div
......@@ -1522,6 +1532,9 @@
</ElButton>
</span>
<span v-if="['WAIT_TRACK'].includes(status)" class="operate-item">
<ElButton link type="warning" @click="updateTrackingNumber">修改跟踪号</ElButton>
</span>
<!-- <span
v-if="!row.expressSheet && row.status === 'TO_BE_CONFIRMED'"
class="operate-item"
......@@ -1630,7 +1643,9 @@
"
placement="bottom"
>
<el-icon color="#E6A23C"><InfoFilled /></el-icon>
<el-icon color="#E6A23C">
<InfoFilled />
</el-icon>
</el-tooltip>
</template>
<template
......@@ -1668,8 +1683,8 @@
</div>
<Icon
name="caozuorizhi"
@click="(e: MouseEvent) => operationLog(cardItem.podJomallOrderUsId, e)"
style="width: 28px; height: 28px"
@click="(e: MouseEvent) => operationLog(cardItem.podJomallOrderUsId, e)"
>
<template #title>
<title>操作日志</title>
......@@ -1993,7 +2008,8 @@
link
style="margin-left: 10px"
@click="changeChinaTime('Asia/Shanghai')"
>北京时间</el-button
>北京时间
</el-button
>
<el-button
:type="timeType === 'America/New_York' ? 'primary' : ''"
......@@ -2001,7 +2017,8 @@
link
style="margin-left: 10px"
@click="changeChinaTime('America/New_York')"
>新泽西时间</el-button
>新泽西时间
</el-button
>
<el-button
:type="timeType === 'America/Los_Angeles' ? 'primary' : ''"
......@@ -2009,7 +2026,8 @@
link
style="margin-left: 10px"
@click="changeChinaTime('America/Los_Angeles')"
>洛杉矶时间</el-button
>洛杉矶时间
</el-button
>
</div>
</div>
......@@ -2029,7 +2047,7 @@
:print-order="printOrder"
:warehouse-list="warehouseList"
@set-printer="handlePrinterChange"
@set-warehouseId="handleWarehouseIdChange"
@set-warehouse-id="handleWarehouseIdChange"
@refresh="onFastRefresh"
/>
<InspPackagOrder
......@@ -2294,7 +2312,7 @@
<el-dialog v-model="dialogVisible" width="35%">
<img :src="dialogImageUrl" alt="商品预览图片" />
</el-dialog>
<el-dialog title="物流轨迹" v-model="timeLineVisible" width="1000px">
<el-dialog v-model="timeLineVisible" title="物流轨迹" width="1000px">
<el-timeline>
<el-timeline-item
v-for="(item, index) in timeLine"
......@@ -2379,7 +2397,7 @@ import {
get17TrackInfoApi,
getAccountCodeByFactoryIdApi,
printPickPdfByBatchNumberApi,
printProductionPdfByBatchNumberApi,
printProductionPdfByBatchNumberApi, changeToFinished, updateTrackingNumberAndRegister,
} from '@/api/podUsOrder'
import { BaseRespData } from '@/types/api'
......@@ -2423,16 +2441,18 @@ import { isArray, isString } from '@/utils/validate'
import platformJson from '../../../json/platform.json'
import { getToken } from '@/api/axios'
import usePermissionBtnStore from '@/store/permission'
const permissionBtns = usePermissionBtnStore()
import {
useRouter,
type NavigationGuardNext,
type RouteLocationNormalized,
} from 'vue-router'
declare global {
interface Window {
ActiveXObject: {
new (type: string): XMLHttpRequest
new(type: string): XMLHttpRequest
}
VBS_BinaryToArray: {
(data: unknown): { toArray(): number[] }
......@@ -2463,6 +2483,37 @@ const exportForm = ref({
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 = () => {
exportVisible.value = true
}
......@@ -2800,8 +2851,9 @@ const handleReComposingDesign = async (row: PodUsOrderListData) => {
}
}
const tableColumns = computed(() => {
let arr = []
if (status.value === 'BATCH_DOWNLOAD') {
return [
arr = [
{
label: '批次号',
prop: 'batchArrangeNum',
......@@ -2870,8 +2922,9 @@ const tableColumns = computed(() => {
prop: 'operate',
},
]
return arr
}
return [
arr = [
{
label: '序号',
prop: 'serialNumber',
......@@ -2917,16 +2970,28 @@ const tableColumns = computed(() => {
prop: 'exceptionReason',
slot: 'exceptionReason',
align: 'left',
},{
label: '物流跟踪状态',
width: 220,
prop: 'track17_Status',
align: 'left',
},
{
label: '操作',
slot: 'operate',
width: 80,
width: 120,
align: 'center',
fixed: 'right',
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 rightClick = (e: MouseEvent) => {
......@@ -3924,11 +3989,13 @@ const arrangeFinish = async () => {
loading.close()
}
}
interface timeLineType {
time_iso?: string
time_utc?: string
description?: string
}
const timeLineVisible = ref(false)
const timeLine = ref<timeLineType[]>([])
const logTrajectory = async (row: { id: string }) => {
......@@ -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 () => {
if (selection.value.length === 0) {
......@@ -5052,6 +5147,7 @@ const completeDelivery = async () => {
const tempChinaLogs = ref<LogListData[]>([])
const timeType = ref<string>('Asia/Shanghai')
function changeChinaTime(zone: string) {
timeType.value = zone
logList.value = tempChinaLogs.value.map((el) => {
......@@ -5064,11 +5160,13 @@ function changeChinaTime(zone: string) {
}
const token = getToken() as string
async function getPermission() {
const res = await getAccountCodeByFactoryIdApi({ token })
permissionBtns.setBtn(res.data)
console.log(res)
}
getPermission()
const globalProperties =
getCurrentInstance()?.appContext.config.globalProperties // 获取全局挂载
......@@ -5134,6 +5232,7 @@ useRouter().beforeEach((to, from, next) => {
// width: 100px;
// height: 65px;
position: relative;
img {
width: 65%;
}
......@@ -5240,6 +5339,7 @@ useRouter().beforeEach((to, from, next) => {
display: flex;
overflow: hidden;
width: 100%;
.grid-item-value {
display: flex;
flex: 1;
......@@ -5367,6 +5467,7 @@ useRouter().beforeEach((to, from, next) => {
font-size: 15px;
}
}
.orderNumber {
white-space: nowrap;
overflow: hidden;
......@@ -5374,6 +5475,7 @@ useRouter().beforeEach((to, from, next) => {
flex: 1;
min-width: 0; /* 关键属性 */
}
.customizedQuantity {
height: 28px;
width: 28px;
......@@ -5387,6 +5489,7 @@ useRouter().beforeEach((to, from, next) => {
font-weight: 700;
box-sizing: border-box;
}
.triangle-box {
position: absolute;
top: 0;
......@@ -5413,6 +5516,7 @@ useRouter().beforeEach((to, from, next) => {
flex-wrap: wrap;
}
}
.el-dropdown-link {
cursor: pointer;
color: var(--el-color-success);
......@@ -5420,15 +5524,18 @@ useRouter().beforeEach((to, from, next) => {
align-items: center;
outline: none;
}
.el-timeline-item__wrapper {
padding-left: 15px;
top: -4px;
}
.el-timeline
> .el-timeline-item:first-child
.el-timeline-item__timestamp.is-top {
> .el-timeline-item:first-child
.el-timeline-item__timestamp.is-top {
color: #409eff;
}
.flex-between {
display: flex;
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