diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts index 999ad81c7..167feec0e 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts @@ -1,5 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' +import { TableColumn } from '@/types/table' /** * @returns {Array} 计划外入库任务主表 @@ -699,11 +700,21 @@ export const UnplannedreceiptJobDetail = useCrudSchemas(reactive([ field: 'reason', dictType: DICT_TYPE.UNPLANNED_RECEIPT_REASON, dictClass: 'string', - isTable: true, - sort: 'custom', + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return cellValue + }, table: { width: 150 }, + form: { + componentProps: { + filterable: true + } + }, + tableForm: { + type: 'Select', + filterable: true + } }, { label: '货主代码', diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts index d2b9f57b7..afcc31947 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts @@ -1,5 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' +import { TableColumn } from '@/types/table' /** * @returns {Array} 计划外入库记录主表 @@ -514,11 +515,21 @@ export const UnplannedreceiptRecordDetail = useCrudSchemas(reactive { + return cellValue + }, table: { width: 150 }, + form: { + componentProps: { + filterable: true + } + }, + tableForm: { + type: 'Select', + filterable: true + } }, { label: '货主代码', diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index 983eb7684..05319c4c8 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -55,6 +55,7 @@ @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" @inputNumberChange="inputNumberChange" + @tableFormSelectOnBlur="tableFormSelectOnBlur" /> @@ -72,6 +73,7 @@ @searchTableSuccessDetail="searchTableSuccessDetail" :detailValidate="detailValidate" @detailBasicFormOnChange="qtyOnChange" + @onBlur="onBlur" /> @@ -634,6 +636,18 @@ const qtyOnChange = (field,val) =>{ } } +const onBlur = (field, e) => { + if (field == 'reason') { + detailRef.value.formRef.formRef.formModel[field] = e.target.value + } +} + +const tableFormSelectOnBlur = (field, val, row, index) => { + if (field == 'reason') { + tableData.value[index][field] = val.target.value + } +} + /** 初始化 **/ 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 0997c043f..902bad166 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts @@ -745,13 +745,20 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive { + return cellValue + }, table: { width: 150 }, + form: { + componentProps: { + filterable: true + } + }, tableForm: { - type: 'Select' + type: 'Select', + filterable: true } }, {