From c2ae35e820981535c87d449c9891f06764476d21 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Thu, 29 Aug 2024 14:20:31 +0800 Subject: [PATCH] =?UTF-8?q?HL-5757=20=E8=AE=A1=E5=88=92=E5=A4=96=E5=87=BA?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E7=95=8C=E9=9D=A2=E5=A2=9E=E5=8A=A0=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E9=80=BB=E8=BE=91=E6=A0=A1=E9=AA=8C=EF=BC=8C=E6=A0=B9?= =?UTF-8?q?=E6=8D=AE=E8=BE=93=E5=85=A5=E7=9A=84=E9=A2=86=E7=94=A8=E5=8E=9F?= =?UTF-8?q?=E5=9B=A0=E4=BB=A3=E7=A0=81=EF=BC=8C=E6=9F=A5=E6=89=BE=E7=A7=91?= =?UTF-8?q?=E7=9B=AE=E9=85=8D=E7=BD=AE=E8=A1=A8=EF=BC=8C=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=BF=85=E5=A1=AB=E5=AD=97=E6=AE=B5=E4=B8=BA?= =?UTF-8?q?YES=EF=BC=8C=E7=95=8C=E9=9D=A2=E5=A1=AB=E5=86=99=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E4=BB=A3=E7=A0=81=E4=B8=BA=E7=A9=BA=EF=BC=8C=E5=88=99?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E9=A1=B9=E7=9B=AE=E4=BB=A3=E7=A0=81=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=EF=BC=8C=E5=BF=85=E9=A1=BB=E6=8C=87=E5=AE=9A=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../unplannedreceiptRequestMain/index.vue | 18 ++++++++++++++++++ .../unplannedreceiptRequestMain.data.ts | 3 +++ 2 files changed, 21 insertions(+) diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index 0cae01ffb..0d40145df 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -133,6 +133,7 @@ import { getAccessToken } from '@/utils/auth' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' +import * as SubjectAccountApi from '@/api/wms/subjectAccount' const { loadStart, loadDone } = usePageLoading() // 计划外入库申请 defineOptions({ name: 'UnplannedreceiptRequestMain' }) @@ -246,6 +247,23 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } if(formField === 'reasonCodeRequisition'){ setV['reasonCodeRequisition'] = val[0]['code'] + let accountRes = await SubjectAccountApi.getSubjectAccountPage({ + pageSize: 20, + pageNo: 1, + code: val[0]['code'], + costcentreType: formRef.formModel['costCenterType'], + sort: '', + by: 'ASC' + }) + console.log('UnplannedreceiptRequestMainRules',UnplannedreceiptRequestMainRules) + if( UnplannedreceiptRequestMainRules['projectCode']){ + UnplannedreceiptRequestMainRules['projectCode'][0]['required'] = false + if(accountRes&&accountRes.list&&accountRes.list.length>0){ + if(accountRes.list[0]['isProject']=='TRUE'){ + UnplannedreceiptRequestMainRules['projectCode'][0]['required'] = true + } + } + } } if(formField === 'projectCode'){ setV['projectCode'] = val[0]['projectCode'] diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts index cd7947c15..53bf8f0cd 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts @@ -650,6 +650,9 @@ export const UnplannedreceiptRequestMainRules = reactive({ costCenterType: [ { required: true, message: '请输入成本中心类型', trigger: 'blur' } ], + projectCode: [ + { required: false, message: '请输入项目代码', trigger: 'blur' } + ], reasonCodeRequisition: [ { required: true, message: '请输入领用原因代码', trigger: 'blur' } ],