From 35d048aa5c0eecd6a737c04278779b0720b0e3db Mon Sep 17 00:00:00 2001 From: jinlin <jinlin> Date: 星期一, 04 十二月 2023 11:18:12 +0800 Subject: [PATCH] 6 --- web/src/views/modules/configItemWarehouse/ConfigItemWarehouse-AddOrUpdate.vue | 52 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 44 insertions(+), 8 deletions(-) diff --git a/web/src/views/modules/configItemWarehouse/ConfigItemWarehouse-AddOrUpdate.vue b/web/src/views/modules/configItemWarehouse/ConfigItemWarehouse-AddOrUpdate.vue index 974750f..7b4f338 100644 --- a/web/src/views/modules/configItemWarehouse/ConfigItemWarehouse-AddOrUpdate.vue +++ b/web/src/views/modules/configItemWarehouse/ConfigItemWarehouse-AddOrUpdate.vue @@ -1,5 +1,5 @@ <template> - <zt-dialog ref="dialog" column="3" @confirm="formSubmit"> + <zt-dialog ref="dialog" column="3" :title="title" :stepMarker="stepMarker" @confirm="formSubmit" > <el-form ref="dataForm" style="padding-top: 0" :inline="true" :disabled="dataForm.disabled" :model="dataForm" label-width="120px" class="warehouseFormAuto"> <div > <el-form-item label-width="60px" label="缂栧彿:" style="width:100%;margin-bottom: -5px"> @@ -8,7 +8,7 @@ </div> <div style="border: 1px solid rgba(0,0,0,.2);width: 99%"> <div style="border-bottom: 1px solid rgba(0,0,0,.2);" class="warehouseContentWidth"> - <el-form-item class="marginTopAndMarginBottom" label="椤圭洰缂栧彿" style="width: 49%"> + <el-form-item class="marginTopAndMarginBottom" label="椤圭洰缂栧彿" style="width: 49%"> <el-input v-model="dataForm.project.code" placeholder="璇疯緭鍏ラ」鐩紪鍙�"></el-input> </el-form-item> <el-form-item class="marginTopAndMarginBottom" label="椤圭洰鍚嶇О" style="width: 49%"> @@ -142,7 +142,7 @@ </el-table> <div class="el-border-top"> <el-form-item label="瀹℃牳缁撴灉" style="width: 99%"> - <zt-dict v-model="dataForm.configItemWarehouse.cmAuditResults" placeholder="瀹℃牳缁撴灉" dict="is_pass" :radio="true" + <zt-dict :disabled="getRoleName.indexOf('CM瑙掕壊')===-1" v-model="dataForm.configItemWarehouse.cmAuditResults" placeholder="瀹℃牳缁撴灉" dict="is_pass" :radio="true" clearable></zt-dict> </el-form-item> <el-form-item label="瀹℃牳浜猴細" style="width: 48%"> @@ -177,7 +177,7 @@ </div> <div style="width: calc(100% - 120px)" class="el-border-left"> <el-form-item class="el-CMTextarea" style="width: 100%;padding: 5px"> - <el-input type="textarea" :rows="2" placeholder="璇疯緭鍏ュ唴瀹�" v-model="dataForm.configItemWarehouse.projectCmOperations"></el-input> + <el-input v-if="getRoleName.indexOf('CM瑙掕壊')>=0" type="textarea" :rows="2" placeholder="璇疯緭鍏ュ唴瀹�" v-model="dataForm.configItemWarehouse.projectCmOperations"></el-input> </el-form-item> <el-form-item label-width="80%" label="鎿嶄綔浜猴細" style="width: 65%"> <span>{{dataForm.configItemWarehouse.operator}}</span> @@ -207,6 +207,8 @@ data() { return { disabled:true, + stepMarker: '', + title: '鏌ョ湅', dataForm: { id: '', configItemWarehouse:{ @@ -236,11 +238,13 @@ cmAuditList:[], configItemList:[], qaAuditList:[], + flowInfoDto: {} } } }, computed:{ getRoleName(){ + console.log(this.$store.state.user.roleName,'this.$store.state.user.roleName') return this.$store.state.user.roleName || '' }, }, @@ -249,10 +253,25 @@ return index += 1 }, init(id,row){ - this.dataForm.id = row.id - this.dataForm.projectId = row.projectId - // this.dataForm.disabled + console.log(id,row,'鍏ュ簱鍗曠殑') + if (id) { + this.dataForm.id = id + } else { + this.dataForm.id = row.id + } + if(row.projectId){ + this.dataForm.projectId =row.projectId + } this.getInfo() + if (!this.dataForm.disabled) { + if (!row.stepMarker) { + this.stepMarker = 'pzxrk_first' + this.title = '鍏ュ簱鐢宠' + } else { + this.title = row.stepName + this.stepMarker = row.stepMarker + } + } console.log(this.dataForm.id,this.dataForm.projectId,'params params') }, addConfigItemWarehouseRow(){ @@ -273,10 +292,27 @@ ...this.dataForm, ...res.data } + if(this.dataForm.project === null){ + this.dataForm.project={} + } + if(this.dataForm.configItemWarehouse === null){ + this.dataForm.circulatOrder={} + } + if(this.dataForm.flowInfoDto === null){ + this.dataForm.flowInfoDto={} + } console.log(this.dataForm,"getInfo this.dataForm") }, // 琛ㄥ崟鎻愪氦 - async formSubmit() { + async formSubmit(submitType) { + if (submitType == 'tj' || submitType == 'bl') { + let flowInfo = { + flowCode: 'pzxrk', + stepIdMark: this.stepMarker, + submitType: submitType + } + this.dataForm.flowInfoDto = flowInfo; + } let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/configItemWarehouse/ConfigItemWarehouse/', this.dataForm) if (res.success) { await this.$tip.success() -- Gitblit v1.9.1