From 178a342345a52f17939306f072779f97917857a9 Mon Sep 17 00:00:00 2001 From: long <18782126717@163.com> Date: Thu, 1 Dec 2022 18:02:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2=E5=87=BA?= =?UTF-8?q?=E5=BA=93=E6=B5=81=E7=A8=8B=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/ProcessMaterialWarehousingForm.vue | 26 ++++++++++++++++--- .../form/ProcessMaterialsDelivery.vue | 12 +++++++++ src/views/user/Login.vue | 1 - 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/src/views/activiti/form/ProcessMaterialWarehousingForm.vue b/src/views/activiti/form/ProcessMaterialWarehousingForm.vue index 6fe1cf7..1ca51e0 100644 --- a/src/views/activiti/form/ProcessMaterialWarehousingForm.vue +++ b/src/views/activiti/form/ProcessMaterialWarehousingForm.vue @@ -52,7 +52,7 @@ placeholder="物资类型" disabled /> - + @@ -166,6 +166,7 @@ import JSelectItem from '@/components/jeecgbiz/JSelectItem' selectedMainId:'', processUdgetPlanId:'', processUdgetPlanIds:'', + isTargetLibrary: false, refKeys: ['processMaterialWarehousingList', ], tableKeys:['processMaterialWarehousingList', ], activeKey: 'processMaterialWarehousingList', @@ -310,7 +311,7 @@ import JSelectItem from '@/components/jeecgbiz/JSelectItem' validatorRules: { // 'blur'是鼠标失去焦点的时候会触发验证 processUdgetPlanId: {rules: [{ required: true, message: '关联预算流程不能为空!' }]}, - targetLibrary: {rules:[{ required: true, message: '入库目标库不能为空!' }]}, + targetLibrary: {rules:[{ required: this.isTargetLibrary, message: '入库目标库不能为空!' }]}, warehousingBatch: {rules:[ { required: true, message: '入库总批次不能为空!'}]} }, } @@ -470,6 +471,12 @@ import JSelectItem from '@/components/jeecgbiz/JSelectItem' } } formData.describes=this.describes; + if (formData.materialType==1){ + if (!formData.targetLibrary){ + this.$message.error("请选择入库目标库"); + return; + } + } console.log('格式化后的数据', formData) this.form.validateFields((err, values) => { if (!err) { @@ -516,6 +523,12 @@ import JSelectItem from '@/components/jeecgbiz/JSelectItem' throw this.throwNotFunction('classifyIntoFormData') } let formData = this.classifyIntoFormData(allValues) + if (formData.materialType==1){ + if (!formData.targetLibrary){ + this.$message.error("请选择入库目标库"); + return; + } + } formData.fileId = getStringArry(formData.fileId) for (let i = 0; i < formData.processMaterialWarehousingListList.length; i++) { if (i==0){ @@ -662,7 +675,14 @@ import JSelectItem from '@/components/jeecgbiz/JSelectItem' this.$message.error(msg) }, async getPlanList (val) { - console.log(val,"传值") + + if (val.length>0){ + if (val[0].materialType==1){ + this.isTargetLibrary=true; + }else { + this.isTargetLibrary=false; + } + } let ids=[] if (!!val){ for (let i = 0; i < val.length; i++) { diff --git a/src/views/activiti/form/ProcessMaterialsDelivery.vue b/src/views/activiti/form/ProcessMaterialsDelivery.vue index d386cd1..818886b 100644 --- a/src/views/activiti/form/ProcessMaterialsDelivery.vue +++ b/src/views/activiti/form/ProcessMaterialsDelivery.vue @@ -84,6 +84,18 @@ required: false } }, + created() { + let userInfo = sessionStorage.getItem('USER_INFORMATION') + let user= JSON.parse(userInfo) + //项目部从总库出库 + if (user.orgType==2){ + this.noDisabled=false + } + //生成小队从项目部出库 + if (user.orgType==3){ + this.onlineDisabled=false + } + }, methods: { afterSub(formData) { this.$emit('afterSubmit', formData) diff --git a/src/views/user/Login.vue b/src/views/user/Login.vue index 630a625..446d106 100644 --- a/src/views/user/Login.vue +++ b/src/views/user/Login.vue @@ -223,7 +223,6 @@ captcha: that.inputCodeContent, checkKey: that.currdatetime } - console.log("登录参数",loginParams) that.Login(loginParams).then((res) => { this.$refs.loginSelect.show(res.result) }).catch((err) => {