进价可编辑
This commit is contained in:
1 parent
4ccb9175c2
commit
f0869d0856
1 file changed
+6
-1
@@ -126,10 +126,13 @@
|
||||
</template>
|
||||
</vxe-column>
|
||||
|
||||
<vxe-column field="unitPrice" title="进价">
|
||||
<vxe-column field="unitPrice" title="进价" :edit-render="{ autoFocus: 'input', placeholder: '请输入' }">
|
||||
<template #default="{ row }">
|
||||
{{ row.purchasePrice ?? row.erpUnitVos?.find((item: any) => item.id == row.unitId)?.purchasePrice }}
|
||||
</template>
|
||||
<template #edit="{ row }">
|
||||
<el-input v-model="row.purchasePrice" />
|
||||
</template>
|
||||
</vxe-column>
|
||||
|
||||
<vxe-column field="totalAmount" title="累计总金额">
|
||||
@@ -249,6 +252,8 @@ const dataRules = ref({
|
||||
const validRules = ref<VxeTablePropTypes.EditRules<any>>({
|
||||
unitId: [{ required: true, message: "必须选择" }],
|
||||
quantity: [{ required: true, type: "number", min: 1, max: 99, message: "数值范围1~99" }],
|
||||
unitPrice: [{ required: true, type: "number", min: 0, message: "请输入数值" }],
|
||||
purchasePrice: [{ required: true, type: "number", min: 0, message: "请输入数值" }],
|
||||
})
|
||||
|
||||
// 初始化数据
|
||||
|
||||
Reference in new issue
Block a user