diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts index fea632e0a..17e70ea8c 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts @@ -645,6 +645,28 @@ export const UnplannedreceiptJobDetail = useCrudSchemas(reactive([ width: 150 }, }, + { + label: '单价', + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, + { + label: '金额', + field: 'amount', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + } + }, { label: '到库位代码', field: 'toLocationCode', diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index c86c086a7..5740d00fc 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -54,6 +54,7 @@ @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" + @inputNumberChange="inputNumberChange" /> @@ -70,6 +71,7 @@ :Echo="Echo" @searchTableSuccessDetail="searchTableSuccessDetail" :detailValidate="detailValidate" + @detailBasicFormOnChange="qtyOnChange" /> @@ -85,6 +87,7 @@ @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess" @submitForm="submitFormLabel" + /> @@ -569,6 +572,17 @@ const submitFormLabel = async (formType, data) => { } } +const inputNumberChange = (field, index, row, val) => { + if(field == 'qty' || field == 'singlePrice'){ + row.amount = row.qty * row.singlePrice + } +} +const qtyOnChange = (field,val) =>{ + if(field == 'qty' || field == 'singlePrice'){ + detailRef.value.formRef.formRef.formModel.amount = detailRef.value.formRef.formRef.formModel.qty * detailRef.value.formRef.formRef.formModel.singlePrice + } +} + /** 初始化 **/ onMounted(async () => { getList() diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts index 5e8537215..8fb5e7200 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts @@ -537,6 +537,48 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive