|
|
|
@ -480,7 +480,7 @@
|
|
|
|
|
:size="ElButtonS[0].size" |
|
|
|
|
:icon="ElButtonS[0].icon" |
|
|
|
|
@click="DeleteEvent(props.row)" |
|
|
|
|
>删除</el-button |
|
|
|
|
>移除</el-button |
|
|
|
|
> |
|
|
|
|
</div> |
|
|
|
|
<span v-if="item.type == 6">{{ |
|
|
|
@ -598,6 +598,8 @@
|
|
|
|
|
:placeholder="'请输入' + props.row.firsts + '数量'" |
|
|
|
|
v-model="props.row.zeroQuantity" |
|
|
|
|
:disabled="props.row.checkbox" |
|
|
|
|
:min="0" |
|
|
|
|
:max="props.row.maxQuantity" |
|
|
|
|
/> |
|
|
|
|
</span> |
|
|
|
|
<span v-if="item.type == 4">{{ |
|
|
|
@ -1734,46 +1736,57 @@ const ZcSelectChange = (select, val) => {
|
|
|
|
|
}; |
|
|
|
|
// 增值服务确认提交 |
|
|
|
|
const ConfirmSubmission = () => { |
|
|
|
|
TcData.value = TcTemp.value; //临时存储的数据给到正式提交的表格 |
|
|
|
|
TcZcInput.value.num = TcTemp.value.length; //增加的包件总数 |
|
|
|
|
let data = JSON.parse(JSON.stringify(TcData.value)); |
|
|
|
|
// 判断零担是否已经输入数量 |
|
|
|
|
TcTemp.value.forEach(item => { |
|
|
|
|
if (item.conditions == 3) { |
|
|
|
|
//表示当前是零担数据 |
|
|
|
|
|
|
|
|
|
let DataInfo = { |
|
|
|
|
...TcZcInput.value, //弹窗信息 |
|
|
|
|
}; |
|
|
|
|
DataInfo.reservationId = RouterReservationId.value; //预约客户ID(必带参数) |
|
|
|
|
DataInfo.deliveryId = RouterId.value; //配送任务ID(必带参数) |
|
|
|
|
DataInfo.addvalueType = 1; //增值服务项类型 (必带参数) |
|
|
|
|
DataInfo.packageEntityList = data; //选中的所有包件信息 |
|
|
|
|
console.log(DataInfo, '最后要提交的值'); |
|
|
|
|
if (item.zeroQuantity) { |
|
|
|
|
console.log(item.firsts + '没有输入数量'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// 如果增值服务表格有参数就走下面新增接口 |
|
|
|
|
// addvalueDetailId存在表示增值服务列表有值,说明不是新增,是修改 |
|
|
|
|
if (addvalueDetailId.value) { |
|
|
|
|
//修改接口 |
|
|
|
|
DataInfo.addvalueDetailId = addvalueDetailId.value; //增值服务详情ID |
|
|
|
|
$_updateSignAddValuePackage(DataInfo).then(res => { |
|
|
|
|
console.log(res, '返回成功的值'); |
|
|
|
|
TcData.value = []; //重置表格数据 |
|
|
|
|
TcTemp.value = []; //重置表格临时数据 |
|
|
|
|
ConfirmationInformation.value = false; //关闭弹窗 |
|
|
|
|
dialogBatchDelete.value = false; //关闭弹窗 |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
// 新增接口 |
|
|
|
|
$_saveSignAddValuePackage(DataInfo).then(res => { |
|
|
|
|
console.log(res, '提交之后返回的值'); |
|
|
|
|
TcData.value = []; //重置表格数据 |
|
|
|
|
TcTemp.value = []; //重置表格临时数据 |
|
|
|
|
ConfirmationInformation.value = false; //关闭弹窗 |
|
|
|
|
dialogBatchDelete.value = false; //关闭弹窗 |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
// TcData.value = TcTemp.value; //临时存储的数据给到正式提交的表格 |
|
|
|
|
// TcZcInput.value.num = TcTemp.value.length; //增加的包件总数 |
|
|
|
|
// let data = JSON.parse(JSON.stringify(TcData.value)); |
|
|
|
|
|
|
|
|
|
// let DataInfo = { |
|
|
|
|
// ...TcZcInput.value, //弹窗信息 |
|
|
|
|
// }; |
|
|
|
|
// DataInfo.reservationId = RouterReservationId.value; //预约客户ID(必带参数) |
|
|
|
|
// DataInfo.deliveryId = RouterId.value; //配送任务ID(必带参数) |
|
|
|
|
// DataInfo.addvalueType = 1; //增值服务项类型 (必带参数) |
|
|
|
|
// DataInfo.packageEntityList = data; //选中的所有包件信息 |
|
|
|
|
// console.log(DataInfo, '最后要提交的值'); |
|
|
|
|
|
|
|
|
|
// // 如果增值服务表格有参数就走下面新增接口 |
|
|
|
|
// // addvalueDetailId存在表示增值服务列表有值,说明不是新增,是修改 |
|
|
|
|
// if (addvalueDetailId.value) { |
|
|
|
|
// //修改接口 |
|
|
|
|
// DataInfo.addvalueDetailId = addvalueDetailId.value; //增值服务详情ID |
|
|
|
|
// $_updateSignAddValuePackage(DataInfo).then(res => { |
|
|
|
|
// console.log(res, '返回成功的值'); |
|
|
|
|
// TcData.value = []; //重置表格数据 |
|
|
|
|
// TcTemp.value = []; //重置表格临时数据 |
|
|
|
|
// ConfirmationInformation.value = false; //关闭弹窗 |
|
|
|
|
// dialogBatchDelete.value = false; //关闭弹窗 |
|
|
|
|
// }); |
|
|
|
|
// } else { |
|
|
|
|
// // 新增接口 |
|
|
|
|
// $_saveSignAddValuePackage(DataInfo).then(res => { |
|
|
|
|
// console.log(res, '提交之后返回的值'); |
|
|
|
|
// TcData.value = []; //重置表格数据 |
|
|
|
|
// TcTemp.value = []; //重置表格临时数据 |
|
|
|
|
// ConfirmationInformation.value = false; //关闭弹窗 |
|
|
|
|
// dialogBatchDelete.value = false; //关闭弹窗 |
|
|
|
|
// }); |
|
|
|
|
// } |
|
|
|
|
}; |
|
|
|
|
// 增值服务取消 |
|
|
|
|
const TCancellation = () => { |
|
|
|
|
TcZcInput.value = {}; //重置 |
|
|
|
|
ConfirmationInformation.value = fasle; //关闭表单弹窗 |
|
|
|
|
ConfirmationInformation.value = false; //关闭表单弹窗 |
|
|
|
|
console.log(TcZcInput.value, '表单数据'); |
|
|
|
|
}; |
|
|
|
|
// 刷新按钮 |
|
|
|
@ -1790,7 +1803,7 @@ const searchHide = () => {
|
|
|
|
|
const serviceSearch = val => { |
|
|
|
|
console.log('增值服务搜索'); |
|
|
|
|
ValueAddedFunction({ |
|
|
|
|
reservationId: '1723897534330003457', |
|
|
|
|
reservationId: RouterReservationId.value, |
|
|
|
|
...TcSoInput.value, |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
@ -1891,23 +1904,23 @@ const valueAddedServices = val => {
|
|
|
|
|
}).then(res => { |
|
|
|
|
editLoading.value = false; //关闭加载效果 |
|
|
|
|
console.log(res, '增值服务上楼的返回值'); |
|
|
|
|
if (res.data) { |
|
|
|
|
if (res.data.data) { |
|
|
|
|
if (res.data.data.addvalueDetailId) { |
|
|
|
|
addvalueDetailId.value = res.data.data.addvalueDetailId; |
|
|
|
|
console.log('当前不是第一次,为新增操作'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
res.data.data.packageEntityList.forEach(item => { |
|
|
|
|
item.checkbox = true; |
|
|
|
|
console.log(item); |
|
|
|
|
}); |
|
|
|
|
const packageList = res.data.data ? res.data.data.packageEntityList : []; |
|
|
|
|
dataAdded.value = packageList; |
|
|
|
|
TabTitle.value[0].value = res.data.data?.distance ?? '暂无数据'; //距离 |
|
|
|
|
TabTitle.value[1].value = res.data.data?.fee ?? '暂无数据'; //费用 |
|
|
|
|
TabTitle.value[2].value = res.data.data?.floolNum ?? '暂无数据'; //楼层 |
|
|
|
|
TabTitle.value[3].value = packageList.length ? packageList.length : '暂无数据'; //件数 |
|
|
|
|
res.data.data.packageEntityList.forEach(item => { |
|
|
|
|
item.checkbox = true; |
|
|
|
|
console.log(item); |
|
|
|
|
}); |
|
|
|
|
const packageList = res.data.data ? res.data.data.packageEntityList : []; |
|
|
|
|
dataAdded.value = packageList; |
|
|
|
|
TabTitle.value[0].value = res.data.data?.distance ?? '暂无数据'; //距离 |
|
|
|
|
TabTitle.value[1].value = res.data.data?.fee ?? '暂无数据'; //费用 |
|
|
|
|
TabTitle.value[2].value = res.data.data?.floolNum ?? '暂无数据'; //楼层 |
|
|
|
|
TabTitle.value[3].value = packageList.length ? packageList.length : '暂无数据'; //件数 |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
const ServiceChange = val => { |
|
|
|
|