马远东 3 months ago
parent
commit
7ea0d096f6
  1. 2
      src/router/views/index.js
  2. 4
      src/utils/print.js
  3. 1
      src/views/distribution/artery/TripartiteTransfer.vue
  4. 8
      src/views/distribution/artery/TripartiteTransferDetails.vue
  5. 1
      src/views/distribution/artery/VehicleArrivalManagement.vue
  6. 2
      src/views/distribution/artery/VehicleStowage.vue
  7. 29
      src/views/distribution/artery/VehicleStowageDetails.vue
  8. 351
      src/views/distribution/inventory/CreateOrder.vue
  9. 16
      src/views/finance/ReconciliationDepositSlip.vue
  10. 272
      src/views/waybill/CreateZeroOrder.vue

2
src/router/views/index.js

@ -251,6 +251,7 @@ export default [
name: '中转详情',
meta: {
i18n: 'data',
keepAlive: true,
},
component: () =>
import(
@ -262,6 +263,7 @@ export default [
name: '配载详情',
meta: {
i18n: 'data',
keepAlive: true,
},
component: () =>
import(

4
src/utils/print.js

@ -25,7 +25,7 @@ const handleDeliveryPrint = (LODOP, templateData) => {
// LODOP.SET_PRINT_STYLE('FontColor', '#000000');
// // 设置打印整宽且不变形
LODOP.SET_PRINT_MODE('PRINT_PAGE_PERCENT', '100%');
LODOP.SET_PRINT_PAGESIZE(1, 2160, 1396.5, '');
LODOP.SET_PRINT_PAGESIZE(1, '216.0mm', '139.7mm', '');
// LODOP.SET_PRINT_PAGESIZE(1, 240 + 'mm', 139.7 + 'mm', '');
// // 设置打印后自动关闭
LODOP.SET_PRINT_MODE('AUTO_CLOSE_PREWINDOW', 1);
@ -56,7 +56,7 @@ const print = (nodeList, type = 'deliveryPrint') => {
if (type === 'titlePrint') handleTitlePrint(LODOP, templateData);
else handleDeliveryPrint(LODOP, templateData);
// LODOP.NewPage()
// LODOP.NewPage();
LODOP.PRINT(); //直接打印
// LODOP.PRINT_DESIGN();
});

1
src/views/distribution/artery/TripartiteTransfer.vue

@ -1231,6 +1231,7 @@ const handleCancelStartCar = () => {
/** 查看详情 */
const handleGoDetils = ({ row }) => {
$store.commit('DEL_ONCE_TAG', '/distribution/artery/TripartiteTransferDetails');
$router.push({
path: '/distribution/artery/TripartiteTransferDetails',
query: {

8
src/views/distribution/artery/TripartiteTransferDetails.vue

@ -825,10 +825,10 @@ const handleGoWayBillDetail = ({ row }) => {
});
};
watch($route, () => {
if ($route.path !== '/distribution/artery/TripartiteTransferDetails') return;
onLoad();
});
// watch($route, () => {
// if ($route.path !== '/distribution/artery/TripartiteTransferDetails') return;
// });
onLoad();
</script>
<style scoped lang="scss">
.fo-fl {

1
src/views/distribution/artery/VehicleArrivalManagement.vue

@ -1222,6 +1222,7 @@ const handleEditStowage = ({ row }) => {
/** 前往配载详情 */
const handleGoWaybill = ({ row }) => {
console.log('row :>> ', row);
$store.commit('DEL_ONCE_TAG', '/distribution/artery/VehicleStowageDetails');
$router.push({
path: '/distribution/artery/VehicleStowageDetails',
query: {

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

@ -1209,6 +1209,8 @@ const handleDirectGoMarketDetails = ({ row }) => {
/** 前往配载详情 */
const handleGoWaybill = ({ row }) => {
console.log('row :>> ', row);
$store.commit('DEL_ONCE_TAG', '/distribution/artery/VehicleStowageDetails');
$router.push({
path: '/distribution/artery/VehicleStowageDetails',
query: {

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

@ -429,6 +429,12 @@
</edittablehead>
</template>
<script lang="ts">
export default {
name: '/distribution/artery/VehicleStowageDetails',
};
</script>
<script setup lang="ts">
import {
ref,
@ -1149,17 +1155,18 @@ const handleExport = () => {
exportExcelByDom(exportColumnListNode.value.$el, `${details.form.carsNo} - ${dateNow()}.xlsx`);
};
watch(
() => $route.query,
() => {
console.log('1231 :>> ', 1231);
if ($route.path !== '/distribution/artery/VehicleStowageDetails') return;
onLoad();
},
{
immediate: true,
}
);
// watch(
// () => $route.query,
// () => {
// console.log('1231 :>> ', 1231);
// if ($route.path !== '/distribution/artery/VehicleStowageDetails') return;
// onLoad();
// },
// {
// immediate: true,
// }
// );
onLoad();
</script>
<style scoped lang="scss">

351
src/views/distribution/inventory/CreateOrder.vue

@ -3648,226 +3648,229 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
if (!formEl) return;
formEl.validate(async valid => {
if (!valid) return false;
try {
// loading
details.loadingObj.submitLoadingBtn = true;
//
const _flag = details.goodsList.every(val => {
if (!val.goodsName || !isNumber(val.num) || val.num === 0) return false;
return true;
});
// loading
details.loadingObj.submitLoadingBtn = true;
if (!_flag) {
return ElMessage({
type: 'warning',
message: '请填写正确的货物名称和件数',
const timer = setTimeout(async () => {
try {
//
const _flag = details.goodsList.every(val => {
if (!val.goodsName || !isNumber(val.num) || val.num === 0) return false;
return true;
});
}
// if (!(details.query.totalFreight > 0)) {
// return ElMessage.warning('');
// }
if (totalCost.value === 0) return ElMessage.warning('合计费用不能等于0');
if (!_flag) {
return ElMessage({
type: 'warning',
message: '请填写正确的货物名称和件数',
});
}
const submitData = {
...details.totalObj,
...details.query,
waybillDetailList: details.goodsList,
advanceIds: info.value.advanceIds,
huilaiPay: 1,
addList: [],
removeList: [],
};
// if (!(details.query.totalFreight > 0)) {
// return ElMessage.warning('');
// }
if (totalCost.value === 0) return ElMessage.warning('合计费用不能等于0');
const submitData = {
...details.totalObj,
...details.query,
waybillDetailList: details.goodsList,
advanceIds: info.value.advanceIds,
huilaiPay: 1,
addList: [],
removeList: [],
};
submitData.customerTrain = details.query.trainNumber;
submitData.customerTrain = details.query.trainNumber;
const { destination, departure } = submitData;
const { destination, departure } = submitData;
if (destination.length === 1) {
return ElMessage({ message: '请选择正确到站地址', type: 'warning' });
}
if (departure.length === 1) {
return ElMessage({ message: '请选择正确发站地址', type: 'warning' });
}
if (destination.length === 1) {
return ElMessage({ message: '请选择正确到站地址', type: 'warning' });
}
if (departure.length === 1) {
return ElMessage({ message: '请选择正确发站地址', type: 'warning' });
}
//
const _findeLocation = details.regionOptione
.find(val => val.value === destination[0])
.children.find(val => val.value === destination[1]);
//
const _findeLocation = details.regionOptione
.find(val => val.value === destination[0])
.children.find(val => val.value === destination[1]);
let _item: any = {};
if (destination.length === 2) {
_item = _findeLocation;
} else {
_item = _findeLocation.children.find(val => val.value === destination[2]);
}
submitData.destination = _item.label;
submitData.destinationCode = _item.value;
let _item: any = {};
if (destination.length === 2) {
_item = _findeLocation;
} else {
_item = _findeLocation.children.find(val => val.value === destination[2]);
}
submitData.destination = _item.label;
submitData.destinationCode = _item.value;
//
const _findeDeparture = details.regionOptione
.find(val => val.value === departure[0])
.children.find(val => val.value === departure[1]);
//
const _findeDeparture = details.regionOptione
.find(val => val.value === departure[0])
.children.find(val => val.value === departure[1]);
let _itemDeparture: any = {};
if (departure.length === 2) {
_itemDeparture = _findeDeparture;
} else {
_itemDeparture = _findeDeparture.children.find(val => val.value === departure[2]);
}
let _itemDeparture: any = {};
if (departure.length === 2) {
_itemDeparture = _findeDeparture;
} else {
_itemDeparture = _findeDeparture.children.find(val => val.value === departure[2]);
}
submitData.departure = _itemDeparture.label;
submitData.departureCode = _itemDeparture.value;
submitData.departure = _itemDeparture.label;
submitData.departureCode = _itemDeparture.value;
console.log('submitData :>> ', submitData);
console.log('submitData :>> ', submitData);
// let numFlag = false;
// let numFlag = false;
// for (const iterator of details.goodsList) {
// if (iterator.subtotalFreight <= 0 || !iterator.subtotalFreight) {
// numFlag = true;
// break;
// }
// }
// for (const iterator of details.goodsList) {
// if (iterator.subtotalFreight <= 0 || !iterator.subtotalFreight) {
// numFlag = true;
// break;
// }
// }
// if (numFlag) return ElMessage.warning('');
// if (numFlag) return ElMessage.warning('');
const _content = handleDetectionPayWay();
if (_content) {
return ElMessage.warning(_content);
}
submitData.goodsName = submitData.waybillDetailList.map(val => val.goodsName).join(',');
const _content = handleDetectionPayWay();
if (_content) {
return ElMessage.warning(_content);
}
submitData.goodsName = submitData.waybillDetailList.map(val => val.goodsName).join(',');
let res: any = {};
//
if (details.pageInfo.type !== 'edit') {
submitData.addList = deepClone(details.goodsList);
submitData.removeList = [];
let res: any = {};
//
if (details.pageInfo.type !== 'edit') {
submitData.addList = deepClone(details.goodsList);
submitData.removeList = [];
delete submitData.goodsList;
delete submitData.goodsList;
submitData.waybillType = 1;
if (getObjType(submitData.receipt) === 'array')
submitData.receipt = submitData.receipt.join(',');
submitData.waybillType = 1;
if (getObjType(submitData.receipt) === 'array')
submitData.receipt = submitData.receipt.join(',');
submitData.updateAdvanceDetailList = [];
submitData.updateAdvanceDetailList = [];
for (let i = 0; i < details.package.data.length; i++) {
const value = details.package.data[i];
const _obj = {
...value,
id: value.advanceDetailId,
incomeCategoryId: value.confirmIncomeCategoryId,
incomeCategoryName: value.confirmIncomeCategoryName,
costCategoryId: value.confirmCostCategoryId,
costCategoryName: value.confirmCostCategoryName,
};
for (let i = 0; i < details.package.data.length; i++) {
const value = details.package.data[i];
submitData.updateAdvanceDetailList.push(_obj);
}
console.log('submitData :>> ', submitData);
handleComputedPlanPrice(submitData);
const _obj = {
...value,
id: value.advanceDetailId,
incomeCategoryId: value.confirmIncomeCategoryId,
incomeCategoryName: value.confirmIncomeCategoryName,
costCategoryId: value.confirmCostCategoryId,
costCategoryName: value.confirmCostCategoryName,
};
//
submitData.updateAdvanceDetailList.push(_obj);
}
console.log('submitData :>> ', submitData);
handleComputedPlanPrice(submitData);
if (details.submitType === 'haveData') res = await postOpenOrderOpenWaybill(submitData);
else {
submitData.waybillType = 2;
//
res = await postOpenOrderOpenZeroWaybill(submitData);
}
const { code, data, msg } = res.data;
if (code !== 200) return;
if (msg) ElMessage.success(msg);
if (details.submitType === 'haveData') res = await postOpenOrderOpenWaybill(submitData);
else {
submitData.waybillType = 2;
details.waybillId = getObjType(data) === 'object' ? data.waybillId || '' : '';
res = await postOpenOrderOpenZeroWaybill(submitData);
}
const { code, data, msg } = res.data;
if (code !== 200) return;
if (msg) ElMessage.success(msg);
// ,
if (details.pageInfo.type === 'add') details.popUpShow.titleVisited = true;
} else {
submitData.waybillId = details.pageInfo.id;
details.waybillId = getObjType(data) === 'object' ? data.waybillId || '' : '';
// ,
if (details.pageInfo.type === 'add') details.popUpShow.titleVisited = true;
} else {
submitData.waybillId = details.pageInfo.id;
const oldGoodsList = [...details.deepCloneGoodsList];
const oldGoodsList = [...details.deepCloneGoodsList];
for (let iterator of details.goodsList) {
// Id updateType: 1; 2
if (iterator.id) {
//
for (let iterator of details.goodsList) {
// Id updateType: 1; 2
if (iterator.id) {
//
// ,
const _item = oldGoodsList.splice(
oldGoodsList.findIndex(val => val.id === iterator.id),
1
);
// ,
const _item = oldGoodsList.splice(
oldGoodsList.findIndex(val => val.id === iterator.id),
1
);
//
let _flag = false;
//
let _flag = false;
for (const key in iterator) {
_flag = iterator[key] !== _item[key];
// 退
if (_flag) break;
}
for (const key in iterator) {
_flag = iterator[key] !== _item[key];
// 退
if (_flag) break;
}
if (_flag) submitData.addList.push({ ...iterator, updateType: 2 });
} else {
submitData.addList.push({ ...iterator, updateType: 1 });
if (_flag) submitData.addList.push({ ...iterator, updateType: 2 });
} else {
submitData.addList.push({ ...iterator, updateType: 1 });
}
}
}
submitData.removeList = oldGoodsList;
submitData.removeList = oldGoodsList;
delete submitData.goodsList;
delete submitData.goodsList;
submitData.waybillType = 1;
if (getObjType(submitData.receipt) === 'array')
submitData.receipt = submitData.receipt.join(',');
submitData.waybillType = 1;
if (getObjType(submitData.receipt) === 'array')
submitData.receipt = submitData.receipt.join(',');
submitData.updateAdvanceDetailList = [];
submitData.updateAdvanceDetailList = [];
for (let i = 0; i < details.package.data.length; i++) {
const value = details.package.data[i];
if (
value.cloneCostCategoryId === value.confirmCostCategoryId &&
value.cloneIncomeCategoryId === value.confirmIncomeCategoryId
)
continue;
const _obj = {
id: value.advanceDetailId,
incomeCategoryId: value.confirmIncomeCategoryId,
incomeCategoryName: value.confirmIncomeCategoryName,
costCategoryId: value.confirmCostCategoryId,
costCategoryName: value.confirmCostCategoryName,
};
for (let i = 0; i < details.package.data.length; i++) {
const value = details.package.data[i];
submitData.updateAdvanceDetailList.push(_obj);
}
handleComputedPlanPrice(submitData);
if (
value.cloneCostCategoryId === value.confirmCostCategoryId &&
value.cloneIncomeCategoryId === value.confirmIncomeCategoryId
)
continue;
//
details.submitData = submitData;
const response = await postUpdateWaybillVerify(submitData);
if (response.data.code !== 200) return;
const _obj = {
id: value.advanceDetailId,
incomeCategoryId: value.confirmIncomeCategoryId,
incomeCategoryName: value.confirmIncomeCategoryName,
costCategoryId: value.confirmCostCategoryId,
costCategoryName: value.confirmCostCategoryName,
};
if (!response.data.data || response.data.data.length === 0)
return ElMessage.warning('没有更改的数据');
submitData.updateAdvanceDetailList.push(_obj);
}
handleComputedPlanPrice(submitData);
details.changeData = response.data.data;
details.popUpShow.causeVisited = true;
await nextTick();
//
details.submitData = submitData;
const response = await postUpdateWaybillVerify(submitData);
if (response.data.code !== 200) return;
setNodeHeight(tableNode.value.$el, '40vh');
if (!response.data.data || response.data.data.length === 0)
return ElMessage.warning('没有更改的数据');
details.changeData = response.data.data;
details.popUpShow.causeVisited = true;
await nextTick();
setNodeHeight(tableNode.value.$el, '40vh');
}
} catch (error) {
console.log('error :>> ', error);
} finally {
clearTimeout(timer);
$store.commit('EDIT_REFRESHITEM', { title: 'TemporaryStorageList', status: true });
details.loadingObj.submitLoadingBtn = false;
}
} catch (error) {
console.log('error :>> ', error);
} finally {
$store.commit('EDIT_REFRESHITEM', { title: 'TemporaryStorageList', status: true });
details.loadingObj.submitLoadingBtn = false;
}
}, 500);
});
};

16
src/views/finance/ReconciliationDepositSlip.vue

@ -235,7 +235,11 @@ import {
handleTranslationDataSeclect,
getObjType,
} from '@/utils/util';
import { columnList, confirmColumnList,columnListB } from '@/option/finance/ReconciliationDepositSlip';
import {
columnList,
confirmColumnList,
columnListB,
} from '@/option/finance/ReconciliationDepositSlip';
import { useRouter } from 'vue-router';
import { deepClone } from '@/utils/util';
import { ElMessage, ElMessageBox } from 'element-plus';
@ -460,9 +464,9 @@ const searchChange = () => {
/** 清空表单 */
const searchReset = () => {
// details.query = {};
console.log(details,'details');
details.pageStatus == 1 ? (details.pageInfo[0].query={}) : (details.pageInfo[1].query={});
console.log(details, 'details');
details.pageStatus == 1 ? (details.pageInfo[0].query = {}) : (details.pageInfo[1].query = {});
details.page.pageNum = 1;
handleClearTableQuery(details.pageStatus === 1 ? details.columnList1 : details.columnList2);
initOnLoad();
@ -563,6 +567,7 @@ const handleFullScrean = (_type: 'open' | 'close', _name: string) => {
/** 生成对账单 */
const handleConfirm = async () => {
await nextTick();
if (details.selectionList.length === 0) return ElMessage.warning('请选择需要确认的数据');
const _errorArr = [];
@ -583,7 +588,8 @@ const handleConfirm = async () => {
return ElMessage.warning(`收货单位不一致,请移除不一致数据`);
if (value.destinationWarehouseName !== _destinationWarehouseName)
return ElMessage.warning(`目的仓不一致,请移除不一致数据`);
if (Number(value.signStatus) !== 2) return ElMessage.warning(`存在未签收完成的数据`);
if (details.pageStatus === 2 && Number(value.signStatus) !== 2)
return ElMessage.warning(`存在未签收完成的数据`);
}
details.popUpShow.confirmVisited = true;

272
src/views/waybill/CreateZeroOrder.vue

@ -2857,185 +2857,189 @@ const handleSubmit = async (formEl: FormInstance | undefined) => {
await nextTick();
if (!formEl) return;
formEl.validate(async valid => {
formEl.validate(valid => {
if (valid) {
try {
details.loadingObj.submitLoadingBtn = true;
details.loadingObj.submitLoadingBtn = true;
let _arr = [];
const timer = setTimeout(async () => {
try {
let _arr = [];
for (let i = 0; i < details.goodsList.length; i++) {
const val = details.goodsList[i];
//
if (!val.goodsName || !isNumber(val.num) || val.num === 0)
return ElMessage.warning('请填写正确的货物名称和件数');
for (let i = 0; i < details.goodsList.length; i++) {
const val = details.goodsList[i];
//
if (!val.goodsName || !isNumber(val.num) || val.num === 0)
return ElMessage.warning('请填写正确的货物名称和件数');
if (_arr.includes(val.goodsName)) return ElMessage.warning('存在重复的货物名称,请移除');
}
if (_arr.includes(val.goodsName))
return ElMessage.warning('存在重复的货物名称,请移除');
}
// if (!(details.query.totalFreight > 0)) return ElMessage.warning('');
if (totalCost.value === 0) return ElMessage.warning('合计费用不能等于0');
// if (!(details.query.totalFreight > 0)) return ElMessage.warning('');
if (totalCost.value === 0) return ElMessage.warning('合计费用不能等于0');
console.log('submit!');
const submitData = {
...details.totalObj,
...details.query,
advanceIds: details.info.advanceIds,
huilaiPay: 1,
addList: [],
removeList: [],
};
console.log('submit!');
const submitData = {
...details.totalObj,
...details.query,
advanceIds: details.info.advanceIds,
huilaiPay: 1,
addList: [],
removeList: [],
};
submitData.customerTrain = details.query.trainNumber;
submitData.customerTrain = details.query.trainNumber;
const { destination, departure } = submitData;
const { destination, departure } = submitData;
console.log('destination :>> ', destination);
if (destination.length === 1) {
return ElMessage({ message: '请选择正确到站地址', type: 'warning' });
}
console.log('destination :>> ', destination);
if (destination.length === 1) {
return ElMessage({ message: '请选择正确到站地址', type: 'warning' });
}
if (departure.length === 1)
return ElMessage({ message: '请选择正确发站地址', type: 'warning' });
if (departure.length === 1)
return ElMessage({ message: '请选择正确发站地址', type: 'warning' });
//
const _findeLocation = details.regionOptione
.find(val => val.value === destination[0])
.children.find(val => val.value === destination[1]);
//
const _findeLocation = details.regionOptione
.find(val => val.value === destination[0])
.children.find(val => val.value === destination[1]);
let _item: any = {};
if (destination.length === 2) {
_item = _findeLocation;
} else {
_item = _findeLocation.children.find(val => val.value === destination[2]);
}
let _item: any = {};
if (destination.length === 2) {
_item = _findeLocation;
} else {
_item = _findeLocation.children.find(val => val.value === destination[2]);
}
submitData.destination = _item.label;
submitData.destinationCode = _item.value;
submitData.destination = _item.label;
submitData.destinationCode = _item.value;
//
const _findeDeparture = details.regionOptione
.find(val => val.value === departure[0])
.children.find(val => val.value === departure[1]);
//
const _findeDeparture = details.regionOptione
.find(val => val.value === departure[0])
.children.find(val => val.value === departure[1]);
let _itemDeparture: any = {};
if (departure.length === 2) {
_itemDeparture = _findeDeparture;
} else {
_itemDeparture = _findeDeparture.children.find(val => val.value === departure[2]);
}
let _itemDeparture: any = {};
if (departure.length === 2) {
_itemDeparture = _findeDeparture;
} else {
_itemDeparture = _findeDeparture.children.find(val => val.value === departure[2]);
}
submitData.departure = _itemDeparture.label;
submitData.departureCode = _itemDeparture.value;
submitData.departure = _itemDeparture.label;
submitData.departureCode = _itemDeparture.value;
// let numFlag = false;
// let numFlag = false;
// for (const iterator of details.goodsList) {
// if (iterator.subtotalFreight <= 0 || !iterator.subtotalFreight) {
// numFlag = true;
// break;
// }
// for (const iterator of details.goodsList) {
// if (iterator.subtotalFreight <= 0 || !iterator.subtotalFreight) {
// numFlag = true;
// break;
// }
// }
// }
// if (numFlag) return ElMessage.warning('');
// if (numFlag) return ElMessage.warning('');
const _content = handleDetectionPayWay();
if (_content) return ElMessage.warning(_content);
const _content = handleDetectionPayWay();
if (_content) return ElMessage.warning(_content);
submitData.goodsName = details.goodsList.map(val => val.goodsName).join(',');
let res: any = {};
//
if (details.pageInfo.type !== 'edit') {
submitData.addList = details.goodsList;
submitData.removeList = [];
submitData.goodsName = details.goodsList.map(val => val.goodsName).join(',');
let res: any = {};
//
if (details.pageInfo.type !== 'edit') {
submitData.addList = details.goodsList;
submitData.removeList = [];
if (typeof submitData.receipt === 'object')
submitData.receipt = submitData.receipt.join(',');
if (typeof submitData.receipt === 'object')
submitData.receipt = submitData.receipt.join(',');
//
details.submitData = submitData;
//
details.submitData = submitData;
// -- 2
submitData.waybillType = 2;
handleComputedPlanPrice(submitData);
// -- 2
submitData.waybillType = 2;
handleComputedPlanPrice(submitData);
console.log('submitData :>> ', submitData);
res = await postOpenOrderOpenZeroWaybill(submitData);
console.log('submitData :>> ', submitData);
res = await postOpenOrderOpenZeroWaybill(submitData);
const { code, data, msg } = res.data;
if (code !== 200) return;
ElMessage({
message: msg,
type: 'success',
});
const { code, data, msg } = res.data;
if (code !== 200) return;
ElMessage({
message: msg,
type: 'success',
});
details.waybillId = getObjType(data) === 'object' ? data.waybillId || '' : '';
details.waybillId = getObjType(data) === 'object' ? data.waybillId || '' : '';
// ,
if (details.pageInfo.type !== 'edit') details.popUpShow.titleVisited = true;
} else {
submitData.waybillId = details.pageInfo.id;
// ,
if (details.pageInfo.type !== 'edit') details.popUpShow.titleVisited = true;
} else {
submitData.waybillId = details.pageInfo.id;
const oldGoodsList = [...details.deepCloneGoodsList];
const oldGoodsList = [...details.deepCloneGoodsList];
for (let iterator of details.goodsList) {
// Id updateType: 1; 2
if (iterator.id) {
//
for (let iterator of details.goodsList) {
// Id updateType: 1; 2
if (iterator.id) {
//
// ,
const _item = oldGoodsList.splice(
oldGoodsList.findIndex(val => val.id === iterator.id),
1
);
// ,
const _item = oldGoodsList.splice(
oldGoodsList.findIndex(val => val.id === iterator.id),
1
);
//
let _flag = false;
//
let _flag = false;
for (const key in iterator) {
_flag = iterator[key] !== _item[key];
// 退
if (_flag) break;
}
for (const key in iterator) {
_flag = iterator[key] !== _item[key];
// 退
if (_flag) break;
}
if (_flag) submitData.addList.push({ ...iterator, updateType: 2 });
} else {
submitData.addList.push({ ...iterator, updateType: 1 });
if (_flag) submitData.addList.push({ ...iterator, updateType: 2 });
} else {
submitData.addList.push({ ...iterator, updateType: 1 });
}
}
}
submitData.removeList = oldGoodsList;
submitData.removeList = oldGoodsList;
delete submitData.goodsList;
delete submitData.goodsList;
submitData.waybillType = 1;
if (typeof submitData.receipt === 'object')
submitData.receipt = submitData.receipt.join(',');
console.log('submitData :>> ', submitData);
submitData.waybillType = 1;
if (typeof submitData.receipt === 'object')
submitData.receipt = submitData.receipt.join(',');
console.log('submitData :>> ', submitData);
handleComputedPlanPrice(submitData);
//
details.submitData = submitData;
handleComputedPlanPrice(submitData);
//
details.submitData = submitData;
const response = await postUpdateWaybillVerify(submitData);
if (response.data.code !== 200) return;
const response = await postUpdateWaybillVerify(submitData);
if (response.data.code !== 200) return;
if (!response.data.data || response.data.data.length === 0)
return ElMessage.warning('没有更改的数据');
if (!response.data.data || response.data.data.length === 0)
return ElMessage.warning('没有更改的数据');
details.changeData = response.data.data;
details.popUpShow.causeVisited = true;
await nextTick();
details.changeData = response.data.data;
details.popUpShow.causeVisited = true;
await nextTick();
setNodeHeight(tableNode.value.$el, '40vh');
setNodeHeight(tableNode.value.$el, '40vh');
}
} catch (error) {
console.log('error :>> ', error);
} finally {
clearTimeout(timer);
// laoding
details.loadingObj.submitLoadingBtn = false;
}
} catch (error) {
console.log('error :>> ', error);
} finally {
// laoding
details.loadingObj.submitLoadingBtn = false;
}
}, 500);
} else {
console.log('error submit!');
return false;

Loading…
Cancel
Save