Browse Source

修复车辆配载编辑问题

dev-xx
qb 1 year ago
parent
commit
cee52c9807
  1. 39
      src/option/distribution/addVehicleStowage.js
  2. 22
      src/option/waybill/WaybillOrderList.js
  3. 72
      src/views/basicdata/warehouse/goodsAllocation/BasicdataGoodsAllocation.vue
  4. 55
      src/views/basicdata/warehouse/tray/basicdataTray.vue
  5. 17
      src/views/distribution/artery/AddVehicleStowage.vue
  6. 2
      src/views/distribution/artery/VehicleStowage.vue
  7. 15
      src/views/distribution/artery/VehicleStowageDetails.vue

39
src/option/distribution/addVehicleStowage.js

@ -754,8 +754,19 @@ export const detailsColumnList = [
sortable: true, sortable: true,
}, },
{ {
prop: 'orderLineCost', prop: 'costPiece',
label: '订单干线成本', label: '按件成本',
type: 2,
values: '',
width: '130',
checkarr: [],
fixed: false,
isshowSummary: true,
sortable: true,
},
{
prop: 'costZhang',
label: '按比例成本',
type: 2, type: 2,
values: '', values: '',
width: '130', width: '130',
@ -974,30 +985,6 @@ export const detailsColumnList = [
isColumnMerge: true, isColumnMerge: true,
sortable: true, sortable: true,
}, },
{
prop: 'totalFee',
label: '单件成本 (按件)',
type: 2,
values: '',
width: '150',
checkarr: [],
fixed: false,
isshowSummary: true,
isColumnMerge: true,
sortable: true,
},
{
prop: 'totalFee',
label: '单件成本 (按收入)',
type: 2,
values: '',
width: '150',
checkarr: [],
fixed: false,
isshowSummary: true,
isColumnMerge: true,
sortable: true,
},
// { // {
// prop: 'freight', // prop: 'freight',
// label: '作废运单号', // label: '作废运单号',

22
src/option/waybill/WaybillOrderList.js

@ -175,9 +175,9 @@ export const columnList = [
fixed: false, fixed: false,
sortable: true, sortable: true,
}, },
/* { {
prop: 'carrierName', prop: 'costPiece',
label: '单价', label: '按件分摊',
type: 1, type: 1,
values: '', values: '',
width: '130', width: '130',
@ -186,15 +186,25 @@ export const columnList = [
sortable: true, sortable: true,
}, },
{ {
prop: 'carrierName', prop: 'costZhang',
label: '件数', label: '按比例分摊',
type: 1, type: 1,
values: '', values: '',
width: '130', width: '130',
checkarr: [], checkarr: [],
fixed: false, fixed: false,
sortable: true, sortable: true,
}, */ },
{
prop: 'costNum',
label: '成本分摊件数',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{ {
prop: 'totalCount', prop: 'totalCount',
label: '总数', label: '总数',

72
src/views/basicdata/warehouse/goodsAllocation/BasicdataGoodsAllocation.vue

@ -1,5 +1,5 @@
<template> <template>
<basic-container> <basic-container v-loading="loadingObj.pageLoading">
<avue-crud <avue-crud
:option="option" :option="option"
v-model:search="search" v-model:search="search"
@ -137,6 +137,10 @@ export default {
qrCodeObj: [], qrCodeObj: [],
dialogVisible: false, dialogVisible: false,
html: '', // html: '', //
/** 页面loading */
loadingObj: {
pageLoading: false,
},
}; };
}, },
computed: { computed: {
@ -423,41 +427,35 @@ export default {
// LODOP.PREVIEW(); //() // LODOP.PREVIEW(); //()
LODOP.PRINT(); // LODOP.PRINT(); //
}, },
handleqr() { async handleqr() {
if (this.selectionList.length === 0) { try {
this.$message.warning('请选择至少一条数据'); if (this.selectionList.length === 0) {
return; this.$message.warning('请选择至少一条数据');
} return;
}
let checkcode = []; let checkcode = [];
this.selectionList.map(item => { this.selectionList.map(item => {
checkcode.push(item.id); checkcode.push(item.id);
// checkcode.push(item.orderPackageCode) // checkcode.push(item.orderPackageCode)
}); });
let qr = checkcode.join(','); let qr = checkcode.join(',');
console.log(qr); console.log(qr);
this.html = ''; this.html = '';
getPrintTemplate(qr).then(res => { this.loadingObj.pageLoading = true;
// this.orderPackageCode = res.data const res = await getPrintTemplate(qr);
console.log(res.data);
this.html = this.getHtmls(res.data.data.dataList, res.data.data.templateHtml);
});
this.dialogVisible = true;
/* this.dialogVisible = true; const { code, data } = res.data;
this.qrCodeObj=[]; if (code !== 200) return;
this.selectionList.forEach(item=>{
// console.log(">>>>>>>>>>",item);
//
let params={}
getTemplate(Object.assign(params,item)).then(res=>{
let url = window.URL.createObjectURL(res.data); // data
console.log(">>>>>>>>>>",url);
this.qrCodeObj.push(url);
})
})*/ this.html = this.getHtmls(data.dataList, data.templateHtml);
this.dialogVisible = true;
} catch (error) {
console.log('error :>> ', error);
} finally {
this.loadingObj.pageLoading = false;
}
}, },
handleExport() { handleExport() {
let downloadUrl = `/blade-BasicdataGoodsAllocation/BasicdataGoodsAllocation/export-BasicdataGoodsAllocation?${ let downloadUrl = `/blade-BasicdataGoodsAllocation/BasicdataGoodsAllocation/export-BasicdataGoodsAllocation?${
@ -542,7 +540,7 @@ export default {
} }
getList(page.currentPage, page.pageSize, values).then(res => { getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data; const data = res.data.data;
console.log(res,'res================================================================>'); console.log(res, 'res================================================================>');
this.page.total = data.total; this.page.total = data.total;
this.data = data.records; this.data = data.records;
this.loading = false; this.loading = false;
@ -586,10 +584,10 @@ export default {
margin-right: 0; margin-right: 0;
} }
} }
:deep(.el-card){ :deep(.el-card) {
height: 100%;
.el-card__body{
height: 100%; height: 100%;
} .el-card__body {
height: 100%;
}
} }
</style> </style>

55
src/views/basicdata/warehouse/tray/basicdataTray.vue

@ -1,5 +1,5 @@
<template> <template>
<basic-container> <basic-container v-loading="loadingObj.pageLoading">
<avue-crud <avue-crud
:option="option" :option="option"
v-model:search="search" v-model:search="search"
@ -191,6 +191,9 @@ export default {
data: [], data: [],
html: null, // html: null, //
dialogVisible: false, dialogVisible: false,
loadingObj: {
pageLoading: false,
},
}; };
}, },
computed: { computed: {
@ -359,7 +362,7 @@ export default {
let pri_html = ''; let pri_html = '';
pri_html = this.getHtmls(res.data.data.dataList, res.data.data.templateHtml); pri_html = this.getHtmls(res.data.data.dataList, res.data.data.templateHtml);
// console.log(pri_html); // console.log(pri_html);
console.log(123123) console.log(123123);
that.w_print(pri_html); that.w_print(pri_html);
}); });
// checkcode.push(item.orderPackageCode) // checkcode.push(item.orderPackageCode)
@ -382,26 +385,34 @@ export default {
// LODOP.PREVIEW(); //() // LODOP.PREVIEW(); //()
LODOP.PRINT(); // LODOP.PRINT(); //
}, },
handleqr() { async handleqr() {
if (this.selectionList.length === 0) { try {
this.$message.warning('请选择至少一条数据'); this.loadingObj.pageLoading = true;
return;
}
let checkcode = []; if (this.selectionList.length === 0) {
this.selectionList.map(item => { this.$message.warning('请选择至少一条数据');
checkcode.push(item.id); return;
}); }
let checkcode = [];
this.selectionList.map(item => {
checkcode.push(item.id);
});
let qr = checkcode.join(','); let qr = checkcode.join(',');
console.log(qr); console.log(qr);
this.html = ''; this.html = '';
getPrintTemplate(qr).then(res => { const res = await getPrintTemplate(qr);
// this.orderPackageCode = res.data
console.log(res.data); console.log(res.data);
this.html = this.getHtmls(res.data.data.dataList, res.data.data.templateHtml); const { code, data } = res.data;
}); if (code !== 200) return;
this.dialogVisible = true; this.html = this.getHtmls(data.dataList, data.templateHtml);
this.dialogVisible = true;
} catch (error) {
console.log('error :>> ', error);
} finally {
this.loadingObj.pageLoading = false;
}
}, },
Details(row) { Details(row) {
this.$router.push({ this.$router.push({
@ -527,7 +538,7 @@ export default {
}, },
selectionClear() { selectionClear() {
this.selectionList = []; this.selectionList = [];
console.log(this.query,'query'); console.log(this.query, 'query');
this.$refs.crud.toggleSelection(); this.$refs.crud.toggleSelection();
}, },
currentChange(currentPage) { currentChange(currentPage) {
@ -542,14 +553,14 @@ export default {
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
const { warehouseId, trayStatus, type, palletCode,palletName } = this.query; const { warehouseId, trayStatus, type, palletCode, palletName } = this.query;
let values = { let values = {
warehouseId: warehouseId, warehouseId: warehouseId,
trayStatus: trayStatus, trayStatus: trayStatus,
type: type, type: type,
palletCode: palletCode, palletCode: palletCode,
palletName:palletName palletName: palletName,
}; };
getList(page.currentPage, page.pageSize, values).then(res => { getList(page.currentPage, page.pageSize, values).then(res => {

17
src/views/distribution/artery/AddVehicleStowage.vue

@ -910,7 +910,7 @@ const initDispatchOrder = async item => {
if (code !== 200) return; if (code !== 200) return;
item.lineCarsOrderList = data; item.lineCarsOrderList = data;
item.renderData = data; item.renderData = data;
item.MappingData = data.map(val => val.carsOrderId); item.MappingData = data;
details.orderCodeList = [ details.orderCodeList = [
...new Set([ ...new Set([
@ -1446,10 +1446,10 @@ const handleRemoveWaybill = async (index: number) => {
_node.lineCarsOrderList = _node.lineCarsOrderList.filter((val, index) => { _node.lineCarsOrderList = _node.lineCarsOrderList.filter((val, index) => {
// //
if (Number(details.pageType) === 2) { if (Number(details.pageType) === 2) {
if (val.carsOrderId) { // if (val.carsOrderId) {
const _index = _node.MappingData.indexOf(val.carsOrderId); // const _index = _node.MappingData.indexOf(val.carsOrderId);
_node.MappingData.splice(_index, 1); // _node.MappingData.splice(_index, 1);
} // }
} }
const _flag = !_selectList.includes(val); const _flag = !_selectList.includes(val);
@ -1705,7 +1705,12 @@ const editSubmit = async () => {
}); });
submitData.addCarsLoadLineList[details.active].addList = _lineCarsOrderList; submitData.addCarsLoadLineList[details.active].addList = _lineCarsOrderList;
submitData.addCarsLoadLineList[details.active].removeList = details._removeList;
for (let i = 0; i < _removeList.length; i++) {
const value = _removeList[i];
value.id = value.carsOrderId;
}
submitData.addCarsLoadLineList[details.active].removeList = _removeList;
const res = await postUpdateCarsLoadBasicData(submitData); const res = await postUpdateCarsLoadBasicData(submitData);
const { code, msg } = res.data; const { code, msg } = res.data;

2
src/views/distribution/artery/VehicleStowage.vue

@ -60,7 +60,7 @@
<!-- 头部左侧按钮模块 --> <!-- 头部左侧按钮模块 -->
<div class="avue-crud__left"> <div class="avue-crud__left">
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增配载 </el-button> <el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增配载 </el-button>
<el-button type="primary" icon="el-icon-printer" @click="searchReset"> </el-button> <!-- <el-button type="primary" icon="el-icon-printer" @click="searchReset"> </el-button> -->
<el-button type="primary" icon="el-icon-printer" @click="handleShowListOfLoadedWagons"> <el-button type="primary" icon="el-icon-printer" @click="handleShowListOfLoadedWagons">
装载清单 装载清单
</el-button> </el-button>

15
src/views/distribution/artery/VehicleStowageDetails.vue

@ -667,7 +667,7 @@ const initOriginWarehouseOrder = async (params = {}) => {
data.carsLoadWaybillInfoList.forEach(val => { data.carsLoadWaybillInfoList.forEach(val => {
details.oldData.push( details.oldData.push(
...val.carsLoadOrderInfoList.map((item, index) => { ...val.carsLoadOrderInfoList.map((item, index) => {
item = { ...item, ...val }; item = { ...val, ...item };
delete item.carsLoadOrderInfoList; delete item.carsLoadOrderInfoList;
if (index === 0) item.mergeColumnIndex = val.carsLoadOrderInfoList.length; if (index === 0) item.mergeColumnIndex = val.carsLoadOrderInfoList.length;
else { else {
@ -946,6 +946,19 @@ const back = () => {
/** 成本分摊 */ /** 成本分摊 */
const handleCostApportionments = async () => { const handleCostApportionments = async () => {
let _flag = false;
for (let i = 0; i < details.oldData.length; i++) {
const value = details.oldData[i];
if (!value.checkUserName) {
_flag = true;
break;
}
}
if (_flag) return ElMessage.error('请先审核运单再进行成本分摊!!!');
ElMessageBox.confirm('确定要进行费用分摊吗?', '提示', { ElMessageBox.confirm('确定要进行费用分摊吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',

Loading…
Cancel
Save