From 340e0b6c93523c58ef1579a67373f2fe3c43dca4 Mon Sep 17 00:00:00 2001 From: yufei_wang <2267742828@qq.com> Date: Fri, 20 Sep 2024 09:45:00 +0800 Subject: [PATCH] =?UTF-8?q?HL-6067=E8=AE=A1=E5=88=92=E5=A4=96=E5=87=BA?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E9=95=BF=E6=98=A514=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=EF=BC=8C=E5=B7=B2=E7=BB=8F=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E9=A2=86=E7=94=A8=E5=8E=9F=E5=9B=A0=E4=BB=A3=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=BB=A3=E7=A0=81=E5=BF=85=E5=A1=AB=EF=BC=8C?= =?UTF-8?q?=E4=BD=86=E6=98=AF=E8=BF=98=E6=98=AF=E5=87=BA=E7=8E=B0=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E5=A4=96=E5=87=BA=E5=85=A5=E5=BA=93=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=EF=BC=8C=E6=B2=A1=E6=9C=89=E5=A1=AB=E5=86=99?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=BB=A3=E7=A0=81=E7=B3=BB=E7=BB=9F=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E4=BF=9D=E5=AD=98=E9=80=9A=E8=BF=87=EF=BC=8C=E8=AF=A6?= =?UTF-8?q?=E8=A7=81HL-5757?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../unplannedissueRequestMain/index.vue | 4 +++ .../unplannedissueRequestMain.data.ts | 3 ++ .../unplannedreceiptRequestMain/index.vue | 36 ++++++++++--------- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue index 64dcbae7c..c7d328cce 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue @@ -151,6 +151,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => if(formField === 'reasonCodeRequisition'){ setV['reasonCodeRequisition'] = val[0]['code'] setV['reasonDescRequisition'] = val[0]['accountingName'] + // 项目是否必填 + if(UnplannedissueRequestMainRules['projectCode']){ + UnplannedissueRequestMainRules['projectCode'][0].required = val[0]['isProject']=='TRUE' + } } if(formField === 'projectCode'){ setV['projectCode'] = val[0]['projectCode'] diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts index 434031a00..ecd638f82 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts @@ -674,6 +674,9 @@ export const UnplannedissueRequestMainRules = reactive({ reasonCodeRequisition: [ { required: true, message: '请输入领用原因代码', trigger: 'blur' } ], + projectCode: [ + { required: false, message: '请输入项目代码', trigger: 'blur' } + ], }) /** diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index 9d3005e6d..c79258b9a 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -247,22 +247,26 @@ 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 - } - } + // 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(UnplannedreceiptRequestMainRules['projectCode']){ + UnplannedreceiptRequestMainRules['projectCode'][0].required = val[0]['isProject']=='TRUE' } } if(formField === 'projectCode'){