diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index dc0f6fc36..3d21b3965 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -1110,8 +1110,8 @@ const openImage=(item)=>{ * @param field 当前操作字段 * @param cur 改变后值 */ - const detailBasicFormOnChange = (field, cur) => { - emit('detailBasicFormOnChange', field, cur) + const detailBasicFormOnChange = (field, cur, formRef) => { + emit('detailBasicFormOnChange', field, cur, formRef) } /** diff --git a/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue b/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue index 2f862cd0f..165a6c03e 100644 --- a/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue +++ b/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue @@ -76,6 +76,8 @@ @searchTableSuccessDetail="searchTableSuccessDetail" @detailOpenForm="detailOpenForm" :detailValidate="detailValidate" + @detailBasicFormOnChange="qtyOnChange" + /> @@ -185,6 +187,16 @@ const isItemType = async (itemCode, labelTypeParams) => { if (!isType) labelType.value = labelTypeOld return isType } +const qtyOnChange = (field, cur, formRef) => { + console.log('qtyOnChange',field, cur) + console.log(formRef.value) + if(field == 'qty' ){ + const setV = { + amount:Number(Number(cur * formRef.value.formModel.singlePrice).toFixed(2)) + } + formRef.value.setValues(setV) + } +} const inputNumberChange = (field, index, row, val) => { if(field == 'qty' ){ row.amount = Number(Number(row.qty * row.singlePrice).toFixed(2)) diff --git a/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts b/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts index a985c19ff..72537c9a9 100644 --- a/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts +++ b/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts @@ -759,6 +759,7 @@ export const ProductionscrapRequestDetail = useCrudSchemas(reactive