Browse Source

修改商配页面暂未合并

dev-xx
qb 1 year ago
parent
commit
4aa27bbb2f
  1. 2
      src/option/distribution/addVehicleStowage.js
  2. 638
      src/views/distribution/artery/AddVehicleStowage.vue
  3. 2
      src/views/distribution/deliverylist/distributionDeliveryListdis.vue
  4. 2
      src/views/distribution/deliverylist/distributionDeliveryListmar.vue
  5. 3078
      src/views/distribution/reservation/reservationAddFrom copy.vue
  6. 3234
      src/views/distribution/turndelivery/deliveryDiscuss copy.vue

2
src/option/distribution/addVehicleStowage.js

@ -489,7 +489,7 @@ export const newColumnList = [
sortable: true,
},
{
prop: 'loadingNum',
prop: 'realNum',
label: '装车数',
type: 2,
values: '',

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

@ -1,5 +1,5 @@
<template>
<basic-container>
<basic-container v-loading="details.loadingObj.pageLoading" element-loading-text="数据加载中...">
<div class="avue-crud">
<!-- 基础信息 -->
<div class="w100">
@ -23,15 +23,21 @@
</div>
<!-- 控件 -->
<div v-if="Number(details.pageType) === 1">
<div v-if="Number(details.pageType) !== 3">
<!-- 删除节点 -->
<el-button icon="Delete" v-if="index !== 0" @click="handleDelNode(index)" />
<el-button
icon="Delete"
v-if="index !== 0"
@click="handleDelNode(index, item)"
/>
<!-- 新增节点 -->
<el-button
v-if="index === details.nodeInfoData.length - 1"
v-if="
(index === details.nodeInfoData.length - 1 && index === 0) || index !== 0
"
type="primary"
icon="Plus"
@click="handleAddNode"
@click="handleAddNode(index)"
/>
</div>
</div>
@ -47,8 +53,19 @@
@change="val => destinationWarehouseNameChange(val, index)"
:remote-method="remoteMethod"
:loading="details.loadingObj.loading"
:disabled="Number(details.pageType) !== 1 || index === 0"
:disabled="
Number(details.pageType) === 3
? true
: Number(details.pageType) === 1
? index === 0
: index <= details.active
"
>
<!-- Number(details.pageType) !== 3 &&
( Number(details.pageType) === 1 ||
index === 0) ||
(Number(details.pageType) === 2 ||
index > details.active) -->
<el-option
v-for="val in details.options"
:key="val.warehouseName"
@ -60,6 +77,7 @@
</el-step>
</el-steps>
<!-- 第一排 -->
<div class="form_row mt10">
<!-- 车牌号 -->
<div class="form_row_item">
@ -147,6 +165,7 @@
</div>
</div>
<!-- 第二排 -->
<div class="form_row">
<!-- 经办人 -->
<div class="form_row_item">
@ -206,6 +225,7 @@
</div> -->
</div>
<!-- 备注 -->
<el-form-item label="备注">
<el-input autosize v-model="form.remark" type="textarea" placeholder="备注" />
</el-form-item>
@ -439,16 +459,22 @@
:loading="item.loading"
@inputTxt="(value, row) => item.itemInputsc(value, row, index)"
@selection="list => item.selectionChange(list, index)"
:isselectfun="
row => {
console.log(row);
return !Boolean(row.realNum);
}
"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '计划数'">
<el-input-number
:controls="false"
v-if="Number(details.pageType) === 1"
v-if="Number(details.pageType) === 1 || !slotProps.scope.row.carsOrderId"
v-model="slotProps.scope.row.planNum"
controls-position="right"
:precision="0"
:min="0"
:min="slotProps.scope.row.realNum || 1"
:max="slotProps.scope.row.stockNum"
:step="1"
/>
@ -475,8 +501,9 @@
<!-- 页面底部占位 -->
<div class="footer"></div>
<!-- 底部提交 -->
<div class="button-container">
<el-button class="submitButton" @click="back"> 关闭 </el-button>
<el-button class="submitButton" icon="CircleClose" @click="back"> 关闭 </el-button>
<el-button
class="submitButton"
@ -642,6 +669,8 @@ const details = reactive<any>({
list: false,
oldListLoading: false,
loading: false,
/** 整页loading */
pageLoading: false,
},
/** 列表复选框选中的数据 */
selectionList: [],
@ -666,7 +695,7 @@ const details = reactive<any>({
},
/** 列表Dom节点 */
listNode: '',
form: { loadingType: '2' },
form: { loadingType: '2', chargeType: '1', loadType: '1' },
/** 全屏 */
fullscreenObj: {
/** 装车明细 */
@ -733,13 +762,17 @@ const details = reactive<any>({
warehouseIndex: 0,
/** 步骤条激活位置 */
active: computed(() => {
if (Number(details.pageType) === 1) return details.nodeInfoData.length;
if (Number(details.pageType) === 1) return details.nodeInfoData.length + 1;
else if (Number(details.pageType) === 2) return details.warehouseIndex;
}),
/** 被选中的orderCode组成的list */
orderCodeList: [],
/** 计划数修改的信息 */
editInfo: {},
/** 所有的仓库节点id组成的list */
allCarsLineList: [],
/** 编辑时记录被删除的node节点信息 */
remveNodeList: [],
});
const btnLoadingObj = reactive({
@ -789,7 +822,7 @@ const setTabelHeight = async () => {
console.log('_listNode :>> ', _listNode);
if (_listNode.length === 0) return;
setNodeHeight(_listNode, '400px');
setNodeHeight(_listNode, '55vh');
};
//
@ -872,10 +905,20 @@ const initDispatchOrder = async item => {
if (code !== 200) return;
item.lineCarsOrderList = data;
item.renderData = data;
item.MappingData = data.map(val => val.carsOrderId);
details.orderCodeList = [
...new Set([
...details.orderCodeList,
...data.map(val => val.orderCode + ',' + val.waybillNo),
]),
];
} catch (error) {
} finally {
//
item.loading = false;
return null;
}
};
@ -885,150 +928,120 @@ const onLoad = async () => {
details.loadId = $route.query.loadId;
details.pageType = $route.query.type;
//
if (Number(details.pageType) === 1) {
details.form = {};
const res = await postloadFindLoadInitData();
const { code, data } = res.data;
if (code !== 200) return;
details.pageInfo = data;
console.log('data.startWarehouseInfo.nodeName :>> ', data.startWarehouseInfo.nodeName);
details.nodeInfoData = [
{
nodeName: data.startWarehouseInfo.warehouseName,
nodeId: data.startWarehouseInfo.warehouseId,
linkMan: data.startWarehouseInfo.linkMan,
linkPhone: data.startWarehouseInfo.linkMobile,
linkAddress: data.startWarehouseInfo.linkAddress,
},
];
details.nodeInfoData = handleEditForbidden(details.nodeInfoData);
console.log('details.nodeInfoData :>> ', details.nodeInfoData);
details.form.startWarehouseName = data.startWarehouseInfo.warehouseName;
details.form.startWarehouseId = data.startWarehouseInfo.warehouseId;
}
//
else {
console.log('222 :>> ', 222);
const res = await postSelectEditDetailByLoadId({ loadId: details.loadId });
console.log('res :>> ', res);
const { code, data } = res.data;
details.nodeInfoData = handleEditForbidden(
data.allCarsLineList.map((val, index) => {
const _node = {
...val,
//
query: {},
//
selectionList: [],
//
lineCarsOrderList: [],
/** 渲染数据 */
renderData: [],
filterData: [],
//
newColumnList: deepClone(newColumnList),
loading: false,
selectionChange(list, index) {
details.nodeInfoData[index].selectionList = list;
console.log('list :>> ', list);
},
itemInputsc(value, row, index) {
console.log('this :>> ', this);
try {
//
const reg = new RegExp(value, 'i');
this.query[row.prop] = reg;
if (value === '') delete this.query[row.prop];
if (Object.keys(this.query).length === 0)
return (this.renderData = this.lineCarsOrderList);
const _data = this.lineCarsOrderList.filter(value => {
let _flag = true;
for (let key in this.query) {
if (!this.query[key].test(value[key])) _flag = false;
if (!_flag) break;
}
return _flag;
});
this.renderData = _data;
} catch (error) {
console.log('error :>> ', error);
} finally {
}
},
};
if (val.nodeName === data.warehouseName) {
//
details.warehouseIndex = index;
}
// //
// val.query = {};
// //
// val.selectionList = [];
// //
// val.lineCarsOrderList = [];
// //
// val.renderData = [];
// val.newColumnList = deepClone(newColumnList);
// val.filterData = [];
// val.loading = false;
// val.selectionChange = (list, index) => {
// details.nodeInfoData[index].selectionList = list;
// console.log('list :>> ', list);
// };
// val.itemInputsc = (value, row, index) => {
// console.log('this :>> ', this);
// try {
// //
// const reg = new RegExp(value, 'i');
// this.query[row.prop] = reg;
// if (value === '') delete this.query[row.prop];
// if (Object.keys(this.query).length === 0)
// return (this.renderData = this.lineCarsOrderList);
// const _data = this.lineCarsOrderList.filter(value => {
// let _flag = true;
// for (let key in this.query) {
// if (!this.query[key].test(value[key])) _flag = false;
// if (!_flag) break;
// }
// return _flag;
// });
// this.renderData = _data;
// } catch (error) {
// console.log('error :>> ', error);
// } finally {
// }
// };
if (Number(details.pageType) === 2) initDispatchOrder(_node);
return _node;
})
);
details.form = data.carsLoadEntity;
details.pageInfo.loadType = data.loadType;
details.pageInfo.chargeType = data.chargeType;
details.pageInfo.startWarehouseInfo.warehouseId = data.carsLoadEntity.startWarehouseId;
details.pageInfo.startWarehouseInfo.warehouseName = data.carsLoadEntity.startWarehouseName;
//
if (Number(details.pageType) === 2) initOriginWarehouseOrder();
//
setTabelHeight();
try {
details.loadingObj.pageLoading = true;
//
if (Number(details.pageType) === 1) {
details.form = { loadingType: '2', chargeType: '1', loadType: '1' };
const res = await postloadFindLoadInitData();
const { code, data } = res.data;
if (code !== 200) return;
details.pageInfo = data;
console.log('data.startWarehouseInfo.nodeName :>> ', data.startWarehouseInfo.nodeName);
details.nodeInfoData = [
{
nodeName: data.startWarehouseInfo.warehouseName,
nodeId: data.startWarehouseInfo.warehouseId,
linkMan: data.startWarehouseInfo.linkMan,
linkPhone: data.startWarehouseInfo.linkMobile,
linkAddress: data.startWarehouseInfo.linkAddress,
},
];
details.nodeInfoData = handleEditForbidden(details.nodeInfoData);
console.log('details.nodeInfoData :>> ', details.nodeInfoData);
details.form.startWarehouseName = data.startWarehouseInfo.warehouseName;
details.form.startWarehouseId = data.startWarehouseInfo.warehouseId;
}
//
else {
console.log('222 :>> ', 222);
const res = await postSelectEditDetailByLoadId({ loadId: details.loadId });
console.log('res :>> ', res);
const { code, data } = res.data;
if (code !== 200) return;
details.allCarsLineList = data.allWarehouseIds;
const promiseArr = [];
details.nodeInfoData = handleEditForbidden(
data.allCarsLineList.map((val, index) => {
const _node = {
...val,
//
query: {},
//
selectionList: [],
//
lineCarsOrderList: [],
/** 渲染数据 */
renderData: [],
//
newColumnList: deepClone(newColumnList),
loading: false,
selectionChange(list, index) {
details.nodeInfoData[index].selectionList = list;
console.log('list :>> ', list);
},
itemInputsc(value, row, index) {
console.log('this :>> ', this);
try {
//
const reg = new RegExp(value, 'i');
this.query[row.prop] = reg;
if (value === '') delete this.query[row.prop];
if (Object.keys(this.query).length === 0)
return (this.renderData = this.lineCarsOrderList);
const _data = this.lineCarsOrderList.filter(value => {
let _flag = true;
for (let key in this.query) {
if (!this.query[key].test(value[key])) _flag = false;
if (!_flag) break;
}
return _flag;
});
this.renderData = _data;
} catch (error) {
console.log('error :>> ', error);
} finally {
}
},
MappingData: [],
};
if (val.nodeName === data.warehouseName) {
//
details.warehouseIndex = index;
}
if (Number(details.pageType) === 2) promiseArr.push(initDispatchOrder(_node));
return _node;
})
);
details.form = data.carsLoadEntity;
details.pageInfo.loadType = data.loadType;
details.pageInfo.chargeType = data.chargeType;
details.pageInfo.startWarehouseInfo.warehouseId = data.carsLoadEntity.startWarehouseId;
details.pageInfo.startWarehouseInfo.warehouseName = data.carsLoadEntity.startWarehouseName;
//
if (Number(details.pageType) === 2) {
await Promise.all(promiseArr);
initOriginWarehouseOrder();
}
//
setTabelHeight();
}
} catch (error) {
} finally {
details.loadingObj.pageLoading = false;
}
};
@ -1219,7 +1232,7 @@ const handleComputedNum = () => {
handleComputedNum();
/** 新增目的仓 */
const handleAddNode = () => {
const handleAddNode = (index: number) => {
const _flag = details.nodeInfoData.every(val => val.nodeName);
if (!_flag) {
return ElMessage({
@ -1228,7 +1241,7 @@ const handleAddNode = () => {
});
}
details.nodeInfoData.push({
details.nodeInfoData.splice(index + 1, 0, {
//
query: {},
//
@ -1237,7 +1250,6 @@ const handleAddNode = () => {
lineCarsOrderList: [],
/** 渲染数据 */
renderData: [],
filterData: [],
//
newColumnList: deepClone(newColumnList),
loading: false,
@ -1274,7 +1286,10 @@ const handleAddNode = () => {
} finally {
}
},
MappingData: [],
});
// details.nodeInfoData.push();
details.nodeInfoData = handleEditForbidden(details.nodeInfoData);
// ,
if (details.data.length === 0) initOriginWarehouseOrder();
@ -1283,10 +1298,33 @@ const handleAddNode = () => {
};
/** 删除目的仓 */
const handleDelNode = (index: number) => {
details.nodeInfoData.splice(index, 1);
const handleDelNode = (index: number, row) => {
console.log('row :>> ', row);
ElMessageBox.confirm('确认删除该节点吗?', '', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
const value = details.nodeInfoData.splice(index, 1);
const _id = value[0].id;
for (const iterator of row.lineCarsOrderList) {
const _code = iterator.orderCode + ',' + iterator.waybillNo;
const _index = details.orderCodeList.indexOf(_code);
// +
details.orderCodeList.splice(_index, 1);
}
setTabelHeight();
if (!_id) return;
details.allCarsLineList[index] = '移除';
// id
details.remveNodeList.push({ id: _id });
details.page.pageNum = 1;
initOriginWarehouseOrder();
})
.catch(() => {});
};
/** 加入调度池 */
@ -1301,56 +1339,28 @@ const handleAddWaybill = async (index: number) => {
console.log('_node :>> ', _node);
//
if (Number(details.pageType) === 1) {
for (let item of details.selectionList) {
item.planNum = item.stockNum;
item.loadingNum = 0;
_node.lineCarsOrderList.push(item);
}
if (Number(details.pageType) === 3) return;
for (let item of details.selectionList) {
item.totalNum = item.totalNum || 20;
item.planNum = item.stockNum;
item.loadingNum = 0;
_node.lineCarsOrderList.push(item);
}
details.orderCodeList = [
...new Set([
...details.orderCodeList,
...details.selectionList.map(val => val.orderCode + ',' + val.waybillNo),
]),
];
details.orderCodeList = [
...new Set([
...details.orderCodeList,
...details.selectionList.map(val => val.orderCode + ',' + val.waybillNo),
]),
];
_node.renderData = _node.lineCarsOrderList;
_node.renderData = _node.lineCarsOrderList;
console.log('details.orderCodeList :>> ', details.orderCodeList);
console.log('details.orderCodeList :>> ', details.orderCodeList);
const orderCodes = details.selectionList.map(val => val.orderCode);
clearSelectionList();
details.page.pageNum = 1;
initOriginWarehouseOrder();
}
//
else if (Number(details.pageType) === 2) {
console.log('_node :>> ', _node);
const submitData = {
loadId: details.loadId,
carsOrderList: details.selectionList.map(val => {
return {
nodeId: details.pageInfo.startWarehouseInfo.warehouseId,
nodeName: details.pageInfo.startWarehouseInfo.warehouseName,
orderCode: val.orderCode,
waybillNo: val.waybillNo,
totalNum: val.totalNum,
planNum: val.stockNum,
type: val.type,
finalNodeId: _node.nodeId,
};
}),
};
const res = await postAddOrderToFinalNodeId(submitData);
const { code, data } = res.data;
if (code !== 200) return;
ElMessage.success('移除成功');
initDispatchOrder(_node);
initOriginWarehouseOrder();
}
// postAddOrderToFinalNodeId
clearSelectionList();
details.page.pageNum = 1;
initOriginWarehouseOrder();
};
/** 移除调度池 */
@ -1358,48 +1368,43 @@ const handleRemoveWaybill = async (index: number) => {
const _node = details.nodeInfoData[index];
console.log('details.nodeInfoData[index] :>> ', details.nodeInfoData[index]);
//
if (Number(details.pageType) === 1) {
if (!_node.nodeName || !_node.nodeId) {
return ElMessage({
type: 'warning',
message: '未选择目的仓或目的仓信息异常',
});
}
//
const _selectList = [..._node.selectionList];
//
_node.lineCarsOrderList = _node.lineCarsOrderList.filter((val, index) => {
const _flag = !_selectList.includes(val);
if (!_flag) {
const _code = val.orderCode + ',' + val.waybillNo;
const _index = details.orderCodeList.indexOf(_code);
// +
details.orderCodeList.splice(_index, 1);
}
return _flag;
});
_node.renderData = _node.renderData.filter((val, index) => {
const _flag = !_selectList.includes(val);
return _flag;
if (!_node.nodeName || !_node.nodeId) {
return ElMessage({
type: 'warning',
message: '未选择目的仓或目的仓信息异常',
});
clearSelectionList();
initOriginWarehouseOrder();
}
//
else if (Number(details.pageType) === 2) {
console.log('_node :>> ', _node);
const submitData = {
carsOrderIds: _node.selectionList.map(val => val.carsOrderId).join(','),
};
const res = await postRemoveCarsOrderByCarsOrderId(submitData);
const { code, data } = res.data;
if (code !== 200) return;
ElMessage.success('移除成功');
initDispatchOrder(_node);
initOriginWarehouseOrder();
}
//
const _selectList = [..._node.selectionList];
//
_node.lineCarsOrderList = _node.lineCarsOrderList.filter((val, index) => {
//
if (Number(details.pageType) === 2) {
console.log('_node :>> ', _node);
if (val.carsOrderId) {
const _index = _node.MappingData.indexOf(val.carsOrderId);
_node.MappingData.splice(_index, 1);
}
}
const _flag = !_selectList.includes(val);
if (!_flag) {
const _code = val.orderCode + ',' + val.waybillNo;
const _index = details.orderCodeList.indexOf(_code);
// +
details.orderCodeList.splice(_index, 1);
}
return _flag;
});
_node.renderData = _node.renderData.filter((val, index) => {
const _flag = !_selectList.includes(val);
return _flag;
});
clearSelectionList();
initOriginWarehouseOrder();
};
/** 查询司机信息 */
@ -1445,7 +1450,7 @@ const handleSubmitEdit = async () => {
btnLoadingObj.editPlanNumBtn = true;
const submitData = {
carsOrderIds: details.editInfo.carsOrderId,
carsOrderId: details.editInfo.carsOrderId,
planNum: details.editInfo.enterPlanNum,
};
@ -1453,7 +1458,8 @@ const handleSubmitEdit = async () => {
const { code } = res.data;
if (code !== 200) return;
ElMessage.success('修改成功');
initDispatchOrder(details.editInfo.item);
details.editInfo.planNum = details.editInfo.enterPlanNum;
// initDispatchOrder(details.editInfo.item);
details.popUpShow.editPlanNumberVisited = false;
} catch (error) {
console.log('error :>> ', error);
@ -1466,7 +1472,7 @@ const handleSubmitEdit = async () => {
/** 关闭页面 */
const back = () => {
$store.commit('DEL_TAG_CURRENT');
$router.back('-1');
$router.back();
};
/** 新增提交 */
@ -1475,6 +1481,8 @@ const addSubmit = async () => {
btnLoadingObj.submitBtn = true;
const _warehouseIds = [];
const _warehouseNames = [];
//
const _flag = details.nodeInfoData.every((value, index) => {
_warehouseNames.push(value.nodeName);
if (index === 0) return true;
@ -1492,7 +1500,9 @@ const addSubmit = async () => {
const submitData = {
...form.value,
carsLoadLineList: JSON.parse(JSON.stringify(details.nodeInfoData)),
//
addCarsLoadLineList: JSON.parse(JSON.stringify(details.nodeInfoData)),
removeCarsLoadLineList: [],
};
//
@ -1501,9 +1511,10 @@ const addSubmit = async () => {
submitData.carsLineName = _warehouseNames.join('->');
let _lineCarsOrderList = [];
submitData.carsLoadLineList.forEach((val, i) => {
submitData.addCarsLoadLineList.forEach((val, i) => {
val.nodeType = '1';
val.sort = i + 1;
val.updateType = 2;
delete val.blackList;
if (i === 0) return;
//
@ -1511,7 +1522,8 @@ const addSubmit = async () => {
delete val.selectionList;
delete val.loading;
delete val.data;
delete val.filterData;
delete val.renderData;
delete val.newColumnList;
_lineCarsOrderList = [
..._lineCarsOrderList,
@ -1525,7 +1537,8 @@ const addSubmit = async () => {
delete val.lineCarsOrderList;
});
submitData.carsLoadLineList[0].lineCarsOrderList = _lineCarsOrderList;
submitData.addCarsLoadLineList[0].addList = _lineCarsOrderList;
submitData.addCarsLoadLineList[0].removeList = [];
console.log('submitData :>> ', submitData);
const res = await postSaveNew(submitData);
@ -1540,15 +1553,106 @@ const addSubmit = async () => {
} catch (error) {
} finally {
btnLoadingObj.submitBtn = false;
return false;
}
};
/** 修改提交 */
const editSubmit = async () => {
try {
btnLoadingObj.submitBtn = false;
btnLoadingObj.submitBtn = true;
const _warehouseIds = [];
const _warehouseNames = [];
//
const _flag = details.nodeInfoData.every((value, index) => {
_warehouseNames.push(value.nodeName);
if (index === 0) return true;
_warehouseIds.push(value.nodeId);
return value.nodeName && value.nodeId;
});
if (!_flag) {
return ElMessage({
type: 'warning',
message: '节点信息有误',
});
}
const submitData = {
...form.value,
//
addCarsLoadLineList: JSON.parse(JSON.stringify(details.nodeInfoData)),
removeCarsLoadLineList: details.remveNodeList,
};
const submitData = { loadId: details.loadId, ...details.form };
const _nodeInfoData = JSON.parse(JSON.stringify(details.nodeInfoData));
//
submitData.endWarehouseIds = _warehouseIds.join(',');
submitData.endWarehouseNames = _warehouseNames.slice(1).join(',');
submitData.carsLineName = _warehouseNames.join('->');
let _lineCarsOrderList = [];
let _removeList = [];
submitData.addCarsLoadLineList.forEach((val, i) => {
val.nodeType = '1';
val.sort = i + 1;
const _index = details.allCarsLineList.indexOf(val.nodeId);
console.log('_index :>> ', _index);
if (_index === -1) {
//
val.updateType = 2;
//
} else if (_index !== i) {
val.updateType = 1;
//
} else val.updateType = 0;
delete val.blackList;
if (i === 0) return;
//
delete val.query;
delete val.selectionList;
delete val.loading;
delete val.data;
delete val.renderData;
delete val.newColumnList;
delete val.itemInputsc;
delete val.selectionChange;
//
const _addArr = [];
for (let index = 0; index < val.lineCarsOrderList.length; index++) {
const element = val.lineCarsOrderList[index];
//
if (!element.carsOrderId)
_addArr.push({
...element,
nodeId: submitData.startWarehouseId,
nodeName: submitData.startWarehouseName,
finalNodeId: val.nodeId,
});
}
console.log('_addArr.length :>> ', _addArr.length);
console.log('val.MappingData.length :>> ', val.MappingData.length);
// ,
if ((val.updateType !== 2 && _addArr.length > 0) || val.MappingData.length > 0)
val.updateType = 1;
_lineCarsOrderList = [..._lineCarsOrderList, ..._addArr];
_removeList = [..._removeList, ...val.MappingData];
delete val.lineCarsOrderList;
});
submitData.addCarsLoadLineList[details.active].addList = _lineCarsOrderList;
submitData.addCarsLoadLineList[details.active].removeList = details._removeList;
// const submitData = { loadId: details.loadId, ...details.form };
console.log('details.form :>> ', details.form);
@ -1566,6 +1670,7 @@ const editSubmit = async () => {
console.log('error :>> ', error);
} finally {
btnLoadingObj.submitBtn = false;
return false;
}
};
@ -1577,7 +1682,7 @@ const nodeCostSubmit = async () => {
const submitData = {
loadId: details.loadId,
...details.form,
carsLoadLineList: details.nodeInfoData,
addCarsLoadLineList: details.nodeInfoData,
};
console.log('details.nodeInfoData :>> ', details.nodeInfoData);
@ -1597,6 +1702,7 @@ const nodeCostSubmit = async () => {
console.log('error :>> ', error);
} finally {
btnLoadingObj.submitBtn = false;
return false;
}
};
@ -1607,11 +1713,19 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
console.log('111 :>> ', 111);
formEl.validate(async (valid, fields) => {
if (valid) {
//
if (Number(details.pageType) === 1) addSubmit();
//
else if (Number(details.pageType) === 2) editSubmit();
else if (Number(details.pageType) === 3) nodeCostSubmit();
try {
details.loadingObj.pageLoading = true;
//
if (Number(details.pageType) === 1) await addSubmit();
//
else if (Number(details.pageType) === 2) await editSubmit();
else if (Number(details.pageType) === 3) await nodeCostSubmit();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
} else {
console.log('error submit!', fields);
}

2
src/views/distribution/deliverylist/distributionDeliveryListdis.vue

@ -829,7 +829,7 @@ export default {
//tabs
handleClick(tab, event) {
console.log('tab------------------>', tab.props.name);
this.query = {};
// this.query = {};
switch (tab.props.name) {
case 'first':
break;

2
src/views/distribution/deliverylist/distributionDeliveryListmar.vue

@ -869,7 +869,7 @@ export default {
//tabs
handleClick(tab, event) {
console.log('tab------------------>', tab.props.name);
this.query = {};
// this.query = {};
switch (tab.props.name) {
case 'first':
break;

3078
src/views/distribution/reservation/reservationAddFrom copy.vue

File diff suppressed because it is too large Load Diff

3234
src/views/distribution/turndelivery/deliveryDiscuss copy.vue

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save