|
|
|
@ -88,6 +88,7 @@
|
|
|
|
|
> |
|
|
|
|
<template #default="slotProps"> |
|
|
|
|
<el-text @click="handleShowDetails(slotProps.scope)"> 详情 </el-text> |
|
|
|
|
<el-text @click="handleShowZero(slotProps.scope)"> 零担补录 </el-text> |
|
|
|
|
</template> |
|
|
|
|
</tablecmt> |
|
|
|
|
|
|
|
|
@ -135,13 +136,13 @@
|
|
|
|
|
</el-button> |
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
|
<el-button icon="el-icon-refresh" @click="searchChange" circle></el-button> |
|
|
|
|
<!-- <el-button icon="el-icon-refresh" @click="searchChange" circle></el-button> --> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- 列表模块 --> |
|
|
|
|
<tablecmt |
|
|
|
|
class="mt10 detailsTable" |
|
|
|
|
class="mt10" |
|
|
|
|
style="height: 60vh" |
|
|
|
|
:columnList="details.detailsColumnList" |
|
|
|
|
:tableData="details.detailsInfo.data" |
|
|
|
@ -168,6 +169,7 @@
|
|
|
|
|
> |
|
|
|
|
零担签收 |
|
|
|
|
</el-text> |
|
|
|
|
|
|
|
|
|
<el-text |
|
|
|
|
@click="handleOrderSigin(slotProps.scope)" |
|
|
|
|
v-if=" |
|
|
|
@ -202,6 +204,74 @@
|
|
|
|
|
</el-row> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 直发零担补录 --> |
|
|
|
|
<el-dialog |
|
|
|
|
title="零担补录" |
|
|
|
|
v-model="details.popUpShow.directGoMarketVisited" |
|
|
|
|
width="80%" |
|
|
|
|
append-to-body |
|
|
|
|
class="truckLoadingDetailPopUp" |
|
|
|
|
@close="onLoad" |
|
|
|
|
align-center |
|
|
|
|
> |
|
|
|
|
<div class="flex-c-sb"> |
|
|
|
|
<div></div> |
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
|
<el-button icon="el-icon-refresh" @click="searchChange" circle></el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- 列表模块 --> |
|
|
|
|
<tablecmt |
|
|
|
|
class="mt10 zeroTable" |
|
|
|
|
ref="zeroTableRef" |
|
|
|
|
style="height: 60vh" |
|
|
|
|
:columnList="details.zeroInfo.columnList" |
|
|
|
|
:tableData="details.zeroInfo.data" |
|
|
|
|
:loading="loadingObj.zeroLoading" |
|
|
|
|
@inputTxt=" |
|
|
|
|
(value, col) => { |
|
|
|
|
details.zeroInfo.query[col.prop] = value; |
|
|
|
|
!value && delete details.zeroInfo.query[col.prop]; |
|
|
|
|
initZeroData(); |
|
|
|
|
} |
|
|
|
|
" |
|
|
|
|
@timeCheck="() => {}" |
|
|
|
|
@selectCheck="() => {}" |
|
|
|
|
@selection="list => selectionChange(list, 3)" |
|
|
|
|
:isShowRefresh="false" |
|
|
|
|
> |
|
|
|
|
<template #default="slotProps"> </template> |
|
|
|
|
</tablecmt> |
|
|
|
|
|
|
|
|
|
<!-- 分页模块 --> |
|
|
|
|
<div class="avue-crud__pagination flex-c-sb" style="width: 100%"> |
|
|
|
|
<div style="font-size: 14px">勾选数量: {{ details.zeroInfo.selectionList.length }}</div> |
|
|
|
|
<!-- 分页模块 --> |
|
|
|
|
<el-pagination |
|
|
|
|
align="right" |
|
|
|
|
background |
|
|
|
|
@size-change="size => sizeChange(size, 3)" |
|
|
|
|
@current-change="current => currentChange(current, 3)" |
|
|
|
|
:current-page="details.zeroInfo.page.pageNum" |
|
|
|
|
:page-sizes="[30, 50, 80, 120]" |
|
|
|
|
:page-size="details.zeroInfo.page.pageSize" |
|
|
|
|
layout="total, sizes, prev, pager, next, jumper" |
|
|
|
|
:total="details.zeroInfo.page.total" |
|
|
|
|
> |
|
|
|
|
</el-pagination> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="flex-c-sb mt20"> |
|
|
|
|
<div></div> |
|
|
|
|
<div> |
|
|
|
|
<el-button icon="CircleClose"> 关 闭 </el-button> |
|
|
|
|
<el-button type="primary" icon="Position" @click="handleZeroSubmit"> 提 交 </el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 零担签收 --> |
|
|
|
|
<el-dialog |
|
|
|
|
title="零担签收" |
|
|
|
@ -340,7 +410,9 @@ import {
|
|
|
|
|
postSignPackage, |
|
|
|
|
postSignZero, |
|
|
|
|
postUploadSignPhoto, |
|
|
|
|
postSignOrderZeroSuppleList, |
|
|
|
|
} from '@/api/distribution/directGoMarket'; |
|
|
|
|
import { postAddZeroSupple } from '@/api/distribution/zeroAdditionalRecording'; |
|
|
|
|
import { postFindSignPhotoList } from '@/api/distribution/directMerchantSign.js'; |
|
|
|
|
/** 获取字典 */ |
|
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; |
|
|
|
@ -353,6 +425,7 @@ import {
|
|
|
|
|
ChecksWhetherTheWarehouseIsSelected, |
|
|
|
|
} from '@/utils/util'; |
|
|
|
|
import { columnList, detailsColumnList } from '@/option/distribution/directGoMarketDetails'; |
|
|
|
|
import { oldColumnList } from '@/option/distribution/zeroAdditionalRecording'; |
|
|
|
|
import { useRouter, useRoute } from 'vue-router'; |
|
|
|
|
import type { UploadProps } from 'element-plus'; |
|
|
|
|
import { getToken } from '@/utils/auth'; |
|
|
|
@ -411,6 +484,7 @@ const details = reactive<any>({
|
|
|
|
|
loading: false, |
|
|
|
|
/** 更新归属仓库 */ |
|
|
|
|
editWarehouseLoading: false, |
|
|
|
|
zeroLoading: false, |
|
|
|
|
}, |
|
|
|
|
/** 列表复选框选中的数据 */ |
|
|
|
|
selectionList: [], |
|
|
|
@ -434,6 +508,8 @@ const details = reactive<any>({
|
|
|
|
|
transferVisited: false, |
|
|
|
|
/** 签收包件详情 */ |
|
|
|
|
SiginOrderDetailsVisited: false, |
|
|
|
|
/** 直发商家零担补录 */ |
|
|
|
|
directGoMarketVisited: false, |
|
|
|
|
/** 更新签收单归属仓库 */ |
|
|
|
|
editWarehouseVisited: false, |
|
|
|
|
/** 上传签收图片 */ |
|
|
|
@ -510,6 +586,21 @@ const details = reactive<any>({
|
|
|
|
|
}, |
|
|
|
|
data: [], |
|
|
|
|
}, |
|
|
|
|
/** 直发零担补录数据 */ |
|
|
|
|
zeroInfo: { |
|
|
|
|
columnList: deepClone(oldColumnList), |
|
|
|
|
/** 复选框被选中数据 */ |
|
|
|
|
selectionList: [], |
|
|
|
|
/** 查询数据 */ |
|
|
|
|
query: {}, |
|
|
|
|
/** 分页参 */ |
|
|
|
|
page: { |
|
|
|
|
pageNum: 1, |
|
|
|
|
pageSize: 30, |
|
|
|
|
total: 0, |
|
|
|
|
}, |
|
|
|
|
data: [], |
|
|
|
|
}, |
|
|
|
|
/** 预览图片地址 */ |
|
|
|
|
dialogImageUrl: '', |
|
|
|
|
/** 上传图片文件list */ |
|
|
|
@ -539,6 +630,8 @@ const $route = useRoute();
|
|
|
|
|
|
|
|
|
|
const tableNodeRef = ref(); |
|
|
|
|
|
|
|
|
|
const zeroTableRef = ref(); |
|
|
|
|
|
|
|
|
|
// vuex实例 |
|
|
|
|
const $store = useStore(); |
|
|
|
|
|
|
|
|
@ -734,8 +827,23 @@ const selectsc = (index, row) => {
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 表格表头复选框选择 */ |
|
|
|
|
const selectionChange = (list: any) => { |
|
|
|
|
const selectionChange = (list: any, type) => { |
|
|
|
|
switch (type) { |
|
|
|
|
// 详情 |
|
|
|
|
case 2: |
|
|
|
|
details.detailsInfo.selectionList = list; |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
// 零担直发商家 |
|
|
|
|
case 3: |
|
|
|
|
details.zeroInfo.selectionList = list; |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
// 签收外层 |
|
|
|
|
default: |
|
|
|
|
details.selectionList = list; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 每页数量改变执行的回调 */ |
|
|
|
@ -747,6 +855,12 @@ const sizeChange = (pageSize: number, type) => {
|
|
|
|
|
onLoadDetails(); |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
// 零担直发商家 |
|
|
|
|
case 3: |
|
|
|
|
details.zeroInfo.page.pageSize = pageSize; |
|
|
|
|
initZeroData(); |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
// 签收外层 |
|
|
|
|
default: |
|
|
|
|
details.page.pageSize = pageSize; |
|
|
|
@ -764,6 +878,12 @@ const currentChange = (pageNum: number, type) => {
|
|
|
|
|
onLoadDetails(); |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
// 零担直发商家 |
|
|
|
|
case 3: |
|
|
|
|
details.zeroInfo.page.pageNum = pageNum; |
|
|
|
|
initZeroData(); |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
// 签收外层 |
|
|
|
|
default: |
|
|
|
|
details.page.pageNum = pageNum; |
|
|
|
@ -786,6 +906,80 @@ const handleShowDetails = ({ row }) => {
|
|
|
|
|
onLoadDetails(); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 零担补录数据 */ |
|
|
|
|
const initZeroData = async () => { |
|
|
|
|
try { |
|
|
|
|
details.loadingObj.zeroLoading = true; |
|
|
|
|
|
|
|
|
|
const submitData = { |
|
|
|
|
...details.zeroInfo.query, |
|
|
|
|
...details.zeroInfo.page, |
|
|
|
|
signOrderId: details.showDetailsSiginOrder.id, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const res = await postSignOrderZeroSuppleList(submitData); |
|
|
|
|
|
|
|
|
|
const { code, data } = res.data; |
|
|
|
|
console.log('data :>> ', data); |
|
|
|
|
if (code !== 200) return; |
|
|
|
|
details.zeroInfo.data = data.records || []; |
|
|
|
|
details.zeroInfo.page.total = data.total; |
|
|
|
|
} catch (error) { |
|
|
|
|
console.log('error :>> ', error); |
|
|
|
|
} finally { |
|
|
|
|
details.loadingObj.zeroLoading = false; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 显示零担补录弹窗 */ |
|
|
|
|
const handleShowZero = async ({ row }) => { |
|
|
|
|
details.showDetailsSiginOrder = row; |
|
|
|
|
|
|
|
|
|
details.popUpShow.directGoMarketVisited = true; |
|
|
|
|
|
|
|
|
|
initZeroData(); |
|
|
|
|
|
|
|
|
|
await nextTick(); |
|
|
|
|
setNodeHeight(zeroTableRef.value.$el, '60vh'); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const handleZeroSubmit = async () => { |
|
|
|
|
try { |
|
|
|
|
details.loadingObj.zeroLoading = true; |
|
|
|
|
|
|
|
|
|
if (details.zeroInfo.selectionList.length === 0) return ElMessage.warning('请选择补录数据'); |
|
|
|
|
|
|
|
|
|
const submitData = { |
|
|
|
|
loadId: details.pageInfo.loadId, |
|
|
|
|
zeroSuppleList: [], |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
for (const iterator of details.zeroInfo.selectionList) { |
|
|
|
|
const _obj = { |
|
|
|
|
orderCode: iterator.orderCode, |
|
|
|
|
waybillNo: iterator.waybillNo, |
|
|
|
|
enterNum: iterator.stockNum || 0, |
|
|
|
|
finalNodeId: details.showDetailsSiginOrder.loadId, |
|
|
|
|
signOrderId: details.showDetailsSiginOrder.id, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
submitData.zeroSuppleList.push(_obj); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log('submitData :>> ', submitData); |
|
|
|
|
const res = await postAddZeroSupple(submitData); |
|
|
|
|
|
|
|
|
|
const { code } = res.data; |
|
|
|
|
if (code !== 200) return ElMessage.error('提交失败'); |
|
|
|
|
ElMessage.success('提交成功'); |
|
|
|
|
initZeroData(); |
|
|
|
|
} catch (error) { |
|
|
|
|
console.log('error :>> ', error); |
|
|
|
|
} finally { |
|
|
|
|
details.loadingObj.zeroLoading = false; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 签收 -- 订单 */ |
|
|
|
|
const handleOrderSigin = async ({ row }) => { |
|
|
|
|
if (!ChecksWhetherTheWarehouseIsSelected()) |
|
|
|
|