1
This commit is contained in:
1 parent
02f3d39825
commit
07740940f2
1 file changed
+12
-3
@@ -120,7 +120,12 @@
|
||||
placeholder="请选择包装单位"
|
||||
@change="reComputeTotalAmount(row, $rowIndex)"
|
||||
>
|
||||
<el-option v-for="item in row.erpUnitVos" :key="item.id" :label="item.unit" :value="item" />
|
||||
<el-option
|
||||
v-for="item in row.erpUnitVos"
|
||||
:key="item.id"
|
||||
:label="item.spec ? item.unit + '-' + item.spec : item.unit"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
<!-- <el-select v-else v-model="row.unitId" value-key="id" placeholder="请选择包装单位">
|
||||
<el-option :key="row.id" :label="row.unit" :value="row.unitId" />
|
||||
@@ -158,7 +163,7 @@
|
||||
<template #default="{ row }">
|
||||
{{ row?.selectedUnitObj?.totalAmount }}
|
||||
<!-- <span v-if="row.selectedUnitObj && row.quantity">
|
||||
{{ Number(row.quantity * parseFloat(row.selectedUnitObj.realPrice || 0)).toFixed(2) }}
|
||||
{{ Number((row.quantity * parseFloat(row.selectedUnitObj.realPrice || 0)).toFixed(2)) }}
|
||||
</span> -->
|
||||
</template>
|
||||
<template #edit="{ row }">
|
||||
@@ -280,7 +285,11 @@ const getInitData = async () => {
|
||||
const selectedUnitObj = item.erpUnitVos.find((unit: any) => unit.id === item.unitId)
|
||||
return {
|
||||
...item,
|
||||
selectedUnitObj: { ...selectedUnitObj, realPrice: displayPrice(item?.realPrice, "") || 0 },
|
||||
selectedUnitObj: {
|
||||
...selectedUnitObj,
|
||||
realPrice: Number(displayPrice(item?.realPrice, "")) || 0,
|
||||
totalAmount: Number(displayPrice(item?.totalAmount, "")),
|
||||
},
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user