|
|
|
@ -1165,7 +1165,25 @@
|
|
|
|
|
:isShowRefresh="false" |
|
|
|
|
> |
|
|
|
|
<template #default="slotProps"> |
|
|
|
|
<template v-if="slotProps.scope.column.label === '是否维护'"> |
|
|
|
|
<template v-if="slotProps.scope.column.label === '方数'"> |
|
|
|
|
<el-input-number |
|
|
|
|
:controls="false" |
|
|
|
|
v-model="slotProps.scope.row.confirmVolume" |
|
|
|
|
:precision="4" |
|
|
|
|
:value-on-clear="0" |
|
|
|
|
/> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<template v-else-if="slotProps.scope.column.label === '重量'"> |
|
|
|
|
<el-input-number |
|
|
|
|
:controls="false" |
|
|
|
|
v-model="slotProps.scope.row.confirmWeight" |
|
|
|
|
:precision="3" |
|
|
|
|
:value-on-clear="0" |
|
|
|
|
/> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<template v-else-if="slotProps.scope.column.label === '是否维护'"> |
|
|
|
|
<el-tag |
|
|
|
|
:class="{ |
|
|
|
|
red: slotProps.scope.row.MaintenanceOrNot === '否', |
|
|
|
@ -2091,6 +2109,33 @@ getList({}).then(res => {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
/** 初始化包件数据 */ |
|
|
|
|
const initPackage = element => { |
|
|
|
|
element.MaintenanceOrNot = element.incomeCategoryId ? '是' : '否'; |
|
|
|
|
|
|
|
|
|
// 收入结算 |
|
|
|
|
element.confirmIncomeCategoryName = element.incomeCategoryName || '其它'; |
|
|
|
|
element.confirmIncomeCategoryId = element.incomeCategoryId || ''; |
|
|
|
|
element.incomeCategoryName = element.incomeCategoryName || '其它'; |
|
|
|
|
element.incomeCategory = element.incomeCategoryName || '其它'; |
|
|
|
|
element.incomeCategoryId = element.incomeCategoryId || ''; |
|
|
|
|
|
|
|
|
|
// 成本结算 |
|
|
|
|
element.confirmCostCategoryName = element.costCategoryName || '其它'; |
|
|
|
|
element.confirmCostCategoryId = element.costCategoryId || ''; |
|
|
|
|
element.costCategoryName = element.costCategoryName || '其它'; |
|
|
|
|
element.costCategory = element.costCategoryName || '其它'; |
|
|
|
|
element.costCategoryId = element.costCategoryId || ''; |
|
|
|
|
|
|
|
|
|
element.volume = isNumber(element.volume) ? Number(element.volume) : 0; |
|
|
|
|
element.confirmVolume = element.volume; // 配置包条提交时再反写体积 |
|
|
|
|
element.initVolume = element.volume; // 编辑提交时对比是否编辑 |
|
|
|
|
|
|
|
|
|
element.weight = isNumber(element.weight) ? Number(element.weight) : 0; |
|
|
|
|
element.confirmWeight = element.weight; // 配置包条提交时再反写重量 |
|
|
|
|
element.initWeight = element.weight; // 编辑提交时对比是否编辑 |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 初始化获取暂存单转运单信息 */ |
|
|
|
|
const onLoad = async (idsArr = []) => { |
|
|
|
|
try { |
|
|
|
@ -2191,6 +2236,8 @@ const onLoad = async (idsArr = []) => {
|
|
|
|
|
val.chargeType = val.chargeType || 1; |
|
|
|
|
|
|
|
|
|
val.goodsListOptions = []; |
|
|
|
|
|
|
|
|
|
val.goodsId = val.goodsId || ''; |
|
|
|
|
// 计算运费小计 |
|
|
|
|
handleComputed(val); |
|
|
|
|
// 计算件数最大值 |
|
|
|
@ -2228,21 +2275,7 @@ const onLoad = async (idsArr = []) => {
|
|
|
|
|
for (let i = 0; i < details.package.data.length; i++) { |
|
|
|
|
const element = details.package.data[i]; |
|
|
|
|
|
|
|
|
|
element.MaintenanceOrNot = element.incomeCategoryId ? '是' : '否'; |
|
|
|
|
|
|
|
|
|
// 收入结算 |
|
|
|
|
element.confirmIncomeCategoryName = element.incomeCategoryName || '其它'; |
|
|
|
|
element.confirmIncomeCategoryId = element.incomeCategoryId || ''; |
|
|
|
|
element.incomeCategoryName = element.incomeCategoryName || '其它'; |
|
|
|
|
element.incomeCategory = element.incomeCategoryName || '其它'; |
|
|
|
|
element.incomeCategoryId = element.incomeCategoryId || ''; |
|
|
|
|
|
|
|
|
|
// 成本结算 |
|
|
|
|
element.confirmCostCategoryName = element.costCategoryName || '其它'; |
|
|
|
|
element.confirmCostCategoryId = element.costCategoryId || ''; |
|
|
|
|
element.costCategoryName = element.costCategoryName || '其它'; |
|
|
|
|
element.costCategory = element.costCategoryName || '其它'; |
|
|
|
|
element.costCategoryId = element.costCategoryId || ''; |
|
|
|
|
initPackage(element); |
|
|
|
|
|
|
|
|
|
!element.incomeCategoryId && (_flag = true); |
|
|
|
|
} |
|
|
|
@ -2402,23 +2435,13 @@ const onEditLoad = async () => {
|
|
|
|
|
for (let i = 0; i < details.package.data.length; i++) { |
|
|
|
|
const element = details.package.data[i]; |
|
|
|
|
|
|
|
|
|
element.MaintenanceOrNot = element.incomeCategoryId ? '是' : '否'; |
|
|
|
|
initPackage(element); |
|
|
|
|
|
|
|
|
|
// 收入结算 |
|
|
|
|
element.confirmIncomeCategoryName = element.incomeCategoryName || '其它'; |
|
|
|
|
element.confirmIncomeCategoryId = element.incomeCategoryId || ''; |
|
|
|
|
element.cloneIncomeCategoryId = element.incomeCategoryId || ''; // 编辑提交时, 跟据confirmIncomeCategoryId判断是否修改 |
|
|
|
|
element.incomeCategoryName = element.incomeCategoryName || '其它'; |
|
|
|
|
element.incomeCategory = element.incomeCategoryName || '其它'; |
|
|
|
|
element.incomeCategoryId = element.incomeCategoryId || ''; |
|
|
|
|
|
|
|
|
|
// 成本结算 |
|
|
|
|
element.confirmCostCategoryName = element.costCategoryName || '其它'; |
|
|
|
|
element.confirmCostCategoryId = element.costCategoryId || ''; |
|
|
|
|
element.cloneCostCategoryId = element.costCategoryId || ''; // 编辑提交时, 跟据confirmCostCategoryId判断是否修改 |
|
|
|
|
element.costCategoryName = element.costCategoryName || '其它'; |
|
|
|
|
element.costCategory = element.costCategoryName || '其它'; |
|
|
|
|
element.costCategoryId = element.costCategoryId || ''; |
|
|
|
|
|
|
|
|
|
!element.incomeCategoryId && (_flag = true); |
|
|
|
|
} |
|
|
|
@ -3902,7 +3925,9 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
|
|
|
|
|
|
|
|
|
|
if ( |
|
|
|
|
value.cloneCostCategoryId === value.confirmCostCategoryId && |
|
|
|
|
value.cloneIncomeCategoryId === value.confirmIncomeCategoryId |
|
|
|
|
value.cloneIncomeCategoryId === value.confirmIncomeCategoryId && |
|
|
|
|
value.initVolume === value.volume && |
|
|
|
|
value.initWeight === value.weight |
|
|
|
|
) |
|
|
|
|
continue; |
|
|
|
|
|
|
|
|
@ -3912,6 +3937,8 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
|
|
|
|
|
incomeCategoryName: value.confirmIncomeCategoryName, |
|
|
|
|
costCategoryId: value.confirmCostCategoryId, |
|
|
|
|
costCategoryName: value.confirmCostCategoryName, |
|
|
|
|
weight: value.weight, |
|
|
|
|
volume: value.volume, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
submitData.updateAdvanceDetailList.push(_obj); |
|
|
|
@ -4750,10 +4777,15 @@ const handleClearPackageQuery = () => {
|
|
|
|
|
|
|
|
|
|
/** 确认包件结算品类弹窗 */ |
|
|
|
|
const handleSubmitPackage = () => { |
|
|
|
|
console.log('details.goodsList :>> ', details.goodsList); |
|
|
|
|
const _goodsArr = []; |
|
|
|
|
|
|
|
|
|
for (let i = 0; i < details.package.data.length; i++) { |
|
|
|
|
const value = details.package.data[i]; |
|
|
|
|
console.log('value :>> ', value); |
|
|
|
|
|
|
|
|
|
value.weight = value.confirmWeight; |
|
|
|
|
value.volume = value.confirmVolume; |
|
|
|
|
|
|
|
|
|
// if (!value.incomeCategoryId) return ElMessage.error('请选择包件结算品类'); |
|
|
|
|
value.confirmCostCategoryId = value.costCategoryId; |
|
|
|
|