From 5171e5adac2b83ceb4d4948e51e422c414bf0b80 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Mon, 27 May 2024 11:34:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=A4=96=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../unplannedissueRequestMain.data.ts | 2 +- .../unplannedreceiptRequestMain/index.vue | 16 ++- .../unplannedreceiptRequestMain.data.ts | 130 +++++++++++++++++- 3 files changed, 144 insertions(+), 4 deletions(-) diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts index 0a397834e..73bda1c1a 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts @@ -605,7 +605,7 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive searchCondition: [{ key: 'code', // 查询列表中字段 value: 'usageCode', // 指查询具体值 - message: '请选择领用描述!1111', // 当前置条件为空时 弹出信息提示 + message: '请选择领用描述!', // 当前置条件为空时 弹出信息提示 isMainValue: true // 表示查询条件不是主表的字段的值 }] }, diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index 7986b0870..4de91f7c6 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -191,11 +191,19 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => row['itemCode'] = val[0]['code'] row['uom'] = val[0]['uom'] } - } else { + } else if(formField === 'costcentreCode'){ + row['costcentreCode'] = val[0]['costcentreCode'] + } else if(formField === 'qadProjectCode'){ + row['qadProjectCode'] = val[0]['projectCode'] + }else { row[formField] = val[0][searchField] } } else { const setV = {} + if(formField === 'usageDescription'){ + setV['usageDescription'] = val[0]['usageDescription'] + setV['usageCode'] = val[0]['code'] + } setV[formField] = val[0][searchField] formRef.setValues(setV) } @@ -213,6 +221,12 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { setV['itemCode'] = val[0]['code'] setV['uom'] = val[0]['uom'] } + if(formField === 'costcentreCode'){ + setV['costcentreCode'] = val[0]['costcentreCode'] + } + if(formField === 'qadProjectCode'){ + setV['qadProjectCode'] = val[0]['projectCode'] + } formRef.setValues(setV) }) } diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts index aa618a17e..db47c288f 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts @@ -2,8 +2,8 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import * as getRequestsettingApi from '@/api/wms/requestsetting/index' -import * as BalanceApi from '@/api/wms/balance' -import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' +import * as SubjectAccountApi from '@/api/wms/subjectAccount' +import { SubjectAccount } from '@/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data' import * as ItembasicApi from '@/api/wms/itembasic' import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' @@ -150,6 +150,35 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive } } }, + { + label: '领用代码', + field: 'usageCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + isTable:false, + }, + { + label: '领用描述', + field: 'usageDescription', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请科目账户信息', + searchField: 'usageDescription', + searchTitle: '科目账户信息', + searchAllSchemas: SubjectAccount.allSchemas, + searchPage: SubjectAccountApi.getSubjectAccountPage + } + } + }, { label: '到库区类型范围', field: 'toAreaTypes', @@ -401,6 +430,9 @@ export const UnplannedreceiptRequestMainRules = reactive({ remark: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], + usageDescription:[ + { required: true, message: '请选择领用描述', trigger: 'blur' } + ], }) /** @@ -749,6 +781,94 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive