From 08060af301df07f95c92260f293cf97adfc5752f Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Mon, 26 Feb 2024 14:40:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8E=9F=E5=9B=A0=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../unplannedreceiptJobMain.data.ts | 15 +++++++++++++-- .../unplannedreceiptRecordMain.data.ts | 15 +++++++++++++-- .../unplannedreceiptRequestMain/index.vue | 14 ++++++++++++++ .../unplannedreceiptRequestMain.data.ts | 13 ++++++++++--- 4 files changed, 50 insertions(+), 7 deletions(-) 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 } }, {