diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts index 9f2668ef9..96c9e6e94 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts @@ -1,5 +1,6 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' +import { TableColumn } from '@/types/table' /** * @returns {Array} 计划外出库任务主表 @@ -669,11 +670,21 @@ export const UnplannedissueJobDetail = useCrudSchemas(reactive([ field: 'reason', dictType: DICT_TYPE.UNPLANNED_ISSUE_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/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.data.ts index 9635f4391..783a7594e 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.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} 计划外出库记录主表 @@ -443,11 +444,21 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive( field: 'reason', dictType: DICT_TYPE.UNPLANNED_ISSUE_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/unplannedissue/unplannedissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue index c477ec814..fcefc2809 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue @@ -54,6 +54,7 @@ @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" + @tableFormSelectOnBlur="tableFormSelectOnBlur" /> @@ -70,6 +71,7 @@ :Echo="Echo" @searchTableSuccessDetail="searchTableSuccessDetail" :detailValidate="detailValidate" + @onBlur="onBlur" /> @@ -400,6 +402,18 @@ const submitForm = async (formType, data) => { } } +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 + } +} + // 子表新增/编辑校验 const detailValidate = (data) => { let tag = false; diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts index 9acae343f..e12e112c3 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts @@ -515,13 +515,20 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive field: 'reason', dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON, dictClass: 'string', - isTable: true, - sort: 'custom', + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return cellValue + }, table: { width: 150 }, + form: { + componentProps: { + filterable: true + } + }, tableForm: { - type: 'Select' + type: 'Select', + filterable: true } }, {