|
|
|
@ -40,47 +40,44 @@
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<!-- 控件模块 --> |
|
|
|
|
<el-row> |
|
|
|
|
<div class="avue-crud__header"> |
|
|
|
|
<!-- 头部左侧按钮模块 --> |
|
|
|
|
<div class="avue-crud__left"> |
|
|
|
|
<!-- 车辆配载 --> |
|
|
|
|
<template v-if="details.pageInfo.type === 'VehicleStowage'"> |
|
|
|
|
<el-button type="primary" icon="Edit" @click="handleShowTransfer('add')" |
|
|
|
|
>计划仓更改 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="primary" icon="List" @click="handleBatchUnLoad">批量卸车</el-button> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<!-- 三方中转 --> |
|
|
|
|
<template v-if="details.pageInfo.type === 'TripartiteTransfer'"> |
|
|
|
|
<el-button type="primary" icon="Edit" @click="handleShowTransfer('add')"> |
|
|
|
|
中转批量签收 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="primary" icon="List" @click="handleBatchUnLoad">批量卸车</el-button> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<!-- 到车管理 --> |
|
|
|
|
<template v-if="details.pageInfo.type === 'VehicleArrivalManagement'"> |
|
|
|
|
<el-button type="primary" icon="List" @click="handleBatchUnLoad">批量卸车</el-button> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<el-button type="primary" icon="Delete" @click="searchReset()">删除</el-button> |
|
|
|
|
<el-button type="primary" icon="Printer" @click="searchReset()">二维码</el-button> |
|
|
|
|
</div> |
|
|
|
|
<!-- 头部右侧按钮模块 --> |
|
|
|
|
<div class="avue-crud__right"> |
|
|
|
|
<el-button icon="el-icon-refresh" @click="searchChange" circle></el-button> |
|
|
|
|
<el-button icon="Operation" @click="showdrawer(true)" circle></el-button> |
|
|
|
|
<el-button icon="el-icon-search" @click="searchHide" circle></el-button> |
|
|
|
|
</div> |
|
|
|
|
<div class="avue-crud__header"> |
|
|
|
|
<!-- 头部左侧按钮模块 --> |
|
|
|
|
<div class="avue-crud__left"> |
|
|
|
|
<!-- 车辆配载 --> |
|
|
|
|
<template v-if="details.pageInfo.type === 'VehicleStowage'"> |
|
|
|
|
<el-button type="primary" icon="Edit" @click="handleShowTransfer('add')" |
|
|
|
|
>计划仓更改 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="primary" icon="List" @click="handleBatchUnLoad">批量卸车</el-button> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<!-- 三方中转 --> |
|
|
|
|
<template v-if="details.pageInfo.type === 'TripartiteTransfer'"> |
|
|
|
|
<el-button type="primary" icon="Edit" @click="handleShowTransfer('add')"> |
|
|
|
|
中转批量签收 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="primary" icon="List" @click="handleBatchUnLoad">批量卸车</el-button> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<!-- 到车管理 --> |
|
|
|
|
<template v-if="details.pageInfo.type === 'VehicleArrivalManagement'"> |
|
|
|
|
<el-button type="primary" icon="List" @click="handleBatchUnLoad">批量卸车</el-button> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<el-button type="primary" icon="Delete" @click="handleBatchRemove">删除</el-button> |
|
|
|
|
<el-button type="primary" icon="Printer" @click="handleBatchBarcode">二维码</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<!-- 表格 --> |
|
|
|
|
<!-- 头部右侧按钮模块 --> |
|
|
|
|
<div class="avue-crud__right"> |
|
|
|
|
<el-button icon="el-icon-refresh" @click="searchChange" circle></el-button> |
|
|
|
|
<el-button icon="Operation" @click="showdrawer(true)" circle></el-button> |
|
|
|
|
<el-button icon="el-icon-search" @click="searchHide" circle></el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- 列表模块 --> |
|
|
|
|
<tablecmt |
|
|
|
|
ref="tableNodeRef" |
|
|
|
|
:columnList="details.detailsColumnList" |
|
|
|
|
:tableData="data" |
|
|
|
|
:loading="loadingObj.list" |
|
|
|
@ -97,24 +94,29 @@
|
|
|
|
|
" |
|
|
|
|
> |
|
|
|
|
<template #default="slotProps"> |
|
|
|
|
<el-text |
|
|
|
|
type="text" |
|
|
|
|
@click="handleZeroUnLoad(slotProps.scope)" |
|
|
|
|
v-if=" |
|
|
|
|
Number(slotProps.scope.row.scanStatus) === 1 && Number(slotProps.scope.row.type) === 2 |
|
|
|
|
" |
|
|
|
|
> |
|
|
|
|
零担卸车 |
|
|
|
|
</el-text> |
|
|
|
|
<el-text |
|
|
|
|
type="text" |
|
|
|
|
@click="handleOrderUnLoad(slotProps.scope)" |
|
|
|
|
v-if=" |
|
|
|
|
Number(slotProps.scope.row.scanStatus) === 1 && Number(slotProps.scope.row.type) === 1 |
|
|
|
|
" |
|
|
|
|
> |
|
|
|
|
包件卸车 |
|
|
|
|
</el-text> |
|
|
|
|
<!-- 零担 --> |
|
|
|
|
<template v-if="Number(slotProps.scope.row.type) === 2"> |
|
|
|
|
<el-text |
|
|
|
|
type="text" |
|
|
|
|
@click="handleZeroUnLoad(slotProps.scope)" |
|
|
|
|
v-if="Number(slotProps.scope.row.scanStatus) === 1" |
|
|
|
|
> |
|
|
|
|
零担卸车 |
|
|
|
|
</el-text> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<!-- 包件 --> |
|
|
|
|
<template v-else-if="Number(slotProps.scope.row.type) === 1"> |
|
|
|
|
<el-text |
|
|
|
|
type="text" |
|
|
|
|
@click="handleOrderUnLoad(slotProps.scope)" |
|
|
|
|
v-if="Number(slotProps.scope.row.scanStatus) === 1" |
|
|
|
|
> |
|
|
|
|
包件卸车 |
|
|
|
|
</el-text> |
|
|
|
|
|
|
|
|
|
<el-text @click="printOrder(slotProps.scope)"> 二维码 </el-text> |
|
|
|
|
</template> |
|
|
|
|
</template> |
|
|
|
|
</tablecmt> |
|
|
|
|
|
|
|
|
@ -166,6 +168,24 @@
|
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 打印二维码 --> |
|
|
|
|
<el-dialog |
|
|
|
|
class="el-dialog-QRCode" |
|
|
|
|
title="二维码" |
|
|
|
|
:visible.sync="details.popUpShow.QRCodeVisible" |
|
|
|
|
width="780px" |
|
|
|
|
v-model="details.popUpShow.QRCodeVisible" |
|
|
|
|
> |
|
|
|
|
<div class="el-dialog-QRCode-container"> |
|
|
|
|
<div v-html="details.html"></div> |
|
|
|
|
</div> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<!-- <el-button type="primary" @click="ddd">导 出</el-button>--> |
|
|
|
|
<el-button type="primary" @click="printTemplate">打 印</el-button> |
|
|
|
|
<el-button @click="details.popUpShow.QRCodeVisible = false">取 消</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 列表配置显示 --> |
|
|
|
|
<edittablehead |
|
|
|
|
@setcolum="setnewcolum" |
|
|
|
@ -189,12 +209,15 @@ import {
|
|
|
|
|
postTransferUnloadPackage, |
|
|
|
|
postTransferUnloadZero, |
|
|
|
|
postBatchTransferUnload, |
|
|
|
|
postRemoveCarsLoadScan, |
|
|
|
|
} from '@/api/distribution/truckLoadingDetails'; |
|
|
|
|
import { getShowAdvancePackgeCode } from '@/api/waybill/orderPackageListDetails'; |
|
|
|
|
/** 获取字典 */ |
|
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; |
|
|
|
|
import { downloadXls } from '@/utils/util'; |
|
|
|
|
import { downloadXls, getHtmls } from '@/utils/util'; |
|
|
|
|
import { detailsColumnList } from '@/option/distribution/TripartiteTransfer'; |
|
|
|
|
import { useRouter, useRoute } from 'vue-router'; |
|
|
|
|
import print from '@/utils/print'; |
|
|
|
|
|
|
|
|
|
const details = reactive<any>({ |
|
|
|
|
/** 是否开启搜索 */ |
|
|
|
@ -243,6 +266,8 @@ const details = reactive<any>({
|
|
|
|
|
list: false, |
|
|
|
|
/** 页面loading */ |
|
|
|
|
pageLoading: false, |
|
|
|
|
/** 查看二维码 */ |
|
|
|
|
QRCodeVisible: false, |
|
|
|
|
}, |
|
|
|
|
/** 列表复选框选中的数据 */ |
|
|
|
|
selectionList: [], |
|
|
|
@ -310,6 +335,8 @@ const details = reactive<any>({
|
|
|
|
|
], |
|
|
|
|
/** 个人仓库信息 */ |
|
|
|
|
myWarehouseData: {}, |
|
|
|
|
/** 打印的二维码 */ |
|
|
|
|
html: '', |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const { |
|
|
|
@ -333,6 +360,9 @@ const $route = useRoute();
|
|
|
|
|
const permission = computed(() => mapGetters(['permission', 'tagWel', 'tagList'])); |
|
|
|
|
console.log('permission :>> ', permission); |
|
|
|
|
|
|
|
|
|
// 表格实例 |
|
|
|
|
const tableNodeRef = ref(); |
|
|
|
|
|
|
|
|
|
/** 初始化表格表头 */ |
|
|
|
|
const initTableSelect = () => { |
|
|
|
|
for (const iterator of details.detailsColumnList) { |
|
|
|
@ -923,6 +953,101 @@ const handleZeroUnLoadSubmit = async () => {
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 单列查看包条码 */ |
|
|
|
|
const printOrder = async ({ row }) => { |
|
|
|
|
try { |
|
|
|
|
details.loadingObj.pageLoading = true; |
|
|
|
|
|
|
|
|
|
let qr = { |
|
|
|
|
orderPackageCodes: row.scanCode, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const res = await getShowAdvancePackgeCode(qr); |
|
|
|
|
|
|
|
|
|
if (res.data.code !== 200) return; |
|
|
|
|
details.popUpShow.QRCodeVisible = true; |
|
|
|
|
console.log(res.data); |
|
|
|
|
details.html = ''; |
|
|
|
|
details.html = getHtmls(res.data.data.dataList, res.data.data.templateHtml); |
|
|
|
|
} catch (error) { |
|
|
|
|
console.log('error :>> ', error); |
|
|
|
|
} finally { |
|
|
|
|
details.loadingObj.pageLoading = false; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 批量查看二维码 */ |
|
|
|
|
const handleBatchBarcode = async () => { |
|
|
|
|
if (details.selectionList.length === 0) |
|
|
|
|
return ElMessage.warning({ message: '请选择需要查看的数据' }); |
|
|
|
|
|
|
|
|
|
const _arr = []; |
|
|
|
|
for (const iterator of details.selectionList) { |
|
|
|
|
if (Number(iterator.type) === 1) _arr.push(iterator); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
tableNodeRef.value.handleClearSelect(); |
|
|
|
|
tableNodeRef.value.handleCheckSelect(_arr); |
|
|
|
|
|
|
|
|
|
if (_arr.length === 0) return ElMessage.warning('零担无法查看二维码'); |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
details.loadingObj.pageLoading = true; |
|
|
|
|
|
|
|
|
|
let qr = { |
|
|
|
|
orderPackageCodes: _arr.map(val => val.scanCode).join(','), |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const res = await getShowAdvancePackgeCode(qr); |
|
|
|
|
|
|
|
|
|
if (res.data.code !== 200) return; |
|
|
|
|
details.popUpShow.QRCodeVisible = true; |
|
|
|
|
console.log(res.data); |
|
|
|
|
details.html = ''; |
|
|
|
|
details.html = getHtmls(res.data.data.dataList, res.data.data.templateHtml); |
|
|
|
|
} catch (error) { |
|
|
|
|
console.log('error :>> ', error); |
|
|
|
|
} finally { |
|
|
|
|
details.loadingObj.pageLoading = false; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 打印包条码 */ |
|
|
|
|
const printTemplate = () => { |
|
|
|
|
const orderNodeList = document.querySelectorAll('.el-dialog-QRCode .el-dialog__body>div>div>div'); |
|
|
|
|
print(orderNodeList); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 批量移除 */ |
|
|
|
|
const handleBatchRemove = async () => { |
|
|
|
|
if (details.selectionList.length === 0) return ElMessage.warning('请选择需要删除的数据'); |
|
|
|
|
|
|
|
|
|
ElMessageBox.confirm('是否批量删除数据', '提示', { |
|
|
|
|
confirmButtonText: '确认', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
center: true, |
|
|
|
|
}) |
|
|
|
|
// 异常提交 |
|
|
|
|
.then(async () => { |
|
|
|
|
try { |
|
|
|
|
details.loadingObj.pageLoading = true; |
|
|
|
|
|
|
|
|
|
const submitData = { carsLoadScanIds: details.selectionList.map(val => val.id).join(',') }; |
|
|
|
|
const response = await postRemoveCarsLoadScan(submitData); |
|
|
|
|
const { code, msg } = response.data; |
|
|
|
|
|
|
|
|
|
if (code !== 200) return; |
|
|
|
|
ElMessage.success({ message: msg }); |
|
|
|
|
onLoad(); |
|
|
|
|
} catch (error) { |
|
|
|
|
console.log('error :>> ', error); |
|
|
|
|
} finally { |
|
|
|
|
details.loadingObj.pageLoading = false; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
watch( |
|
|
|
|
$route, |
|
|
|
|
(newVal, oldVal) => { |
|
|
|
@ -1020,11 +1145,12 @@ watch(
|
|
|
|
|
|
|
|
|
|
:deep(.el-table tr) { |
|
|
|
|
&.Abnormal { |
|
|
|
|
background: #dc2e2e; |
|
|
|
|
background: #e54b4b; |
|
|
|
|
|
|
|
|
|
.tabculconte, |
|
|
|
|
.el-tooltip, |
|
|
|
|
.el-button--text { |
|
|
|
|
.el-button--text, |
|
|
|
|
.el-text { |
|
|
|
|
color: #fff !important; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1037,4 +1163,9 @@ watch(
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.el-dialog-QRCode-container { |
|
|
|
|
max-height: 80vh; |
|
|
|
|
overflow-y: scroll; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|