From ed2342a8cadcd9519858ecd5d440fcba4d66a02d Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期五, 06 九月 2024 17:01:44 +0800 Subject: [PATCH] 电路检验版本选择 --- src/components/do/b1-inspect-order-plan/Inspection.vue | 49 ++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 44 insertions(+), 5 deletions(-) diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue index 9e9cf63..dd840df 100644 --- a/src/components/do/b1-inspect-order-plan/Inspection.vue +++ b/src/components/do/b1-inspect-order-plan/Inspection.vue @@ -282,7 +282,7 @@ <el-input clearable v-model="sampleProduct.length" disabled size="small" placeholder="璇疯緭鍏�" ></el-input> </el-form-item> <el-form-item label="璇曢獙鏍囧噯:"> - <span>{{ insOrder.testRequirements?insOrder.testRequirements:'-' }}</span> + <span>{{ currentSample.testRequirements?currentSample.testRequirements:'-' }}</span> </el-form-item> <el-form-item label="涓嬪彂鏃堕棿:"> <el-input clearable v-model="insOrder.sendTime" disabled size="small" placeholder="璇疯緭鍏�"></el-input> @@ -309,11 +309,11 @@ <el-radio-button :label="item.templateId" v-for="(item,index) in tableLists" :key="index" size="small">{{ item.templateName }}</el-radio-button> </el-radio-group> - <span style="margin-left: 20px;margin-right: 10px;">妯℃澘鐗堟湰:</span> + <!-- <span style="margin-left: 20px;margin-right: 10px;">妯℃澘鐗堟湰:</span> <el-radio-group v-model="currentTableState" size="small"> <el-radio-button label="0" size="small">鐗堟湰涓�</el-radio-button> <el-radio-button label="1" size="small">鐗堟湰浜�</el-radio-button> - </el-radio-group> + </el-radio-group> --> </div> <div style="display: flex;align-items: center;"> <span v-if="casing.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='鎴愬搧缂嗘楠屽師濮嬭褰�'"> 濂楃锛�</span> @@ -913,6 +913,21 @@ <el-button type="primary" @click="submitDataGet()" :loading="getDataIndexLoading">纭� 瀹�</el-button> </span> </el-dialog> + <el-dialog + title="閫夋嫨鐢佃矾妫�楠屾ā鏉跨増鏈�" + :visible.sync="versionDialogVisible" + width="30%" + :close-on-click-modal="false" + :close-on-press-escape="false" + :show-close="false"> + <el-radio-group v-model="currentTableState"> + <el-radio :label="0">鐢佃皟-鐢佃矾妫�楠屽師濮嬭褰�</el-radio> + <el-radio :label="1">闈炵數璋�-鐢佃矾妫�楠屽師濮嬭褰�</el-radio> + </el-radio-group> + <span slot="footer" class="dialog-footer"> + <el-button type="primary" :loading="versionLoading" @click="saveVersion">纭� 瀹�</el-button> + </span> + </el-dialog> </div> </template> @@ -924,7 +939,7 @@ import CircuitParameters1 from './circuit-parameters1.vue' import CircuitParameters2 from './circuit-parameters2.vue' export default { - props: ['sonLaboratory', 'orderId', 'state','inspectorList'], + props: ['sonLaboratory', 'orderId', 'state','inspectorList','version','orderStateId'], components: { ValueTable, Circuit, @@ -933,6 +948,8 @@ }, data() { return { + versionLoading:false, + versionDialogVisible:false, currentTableState:0, sagData: [], sagForm: { @@ -1110,7 +1127,7 @@ getDataIndexLoading:false, changeType:null, getDataTypeId:'', - getDataType:null + getDataType:null, } }, // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭� @@ -1137,6 +1154,7 @@ this.scrollInit() this.getPower() this.startWorker() + this.currentTableState = this.version }, watch: { // 鐩戝惉浠诲姟id锛岃幏鍙栦换鍔′俊鎭� @@ -2365,6 +2383,10 @@ this.tableList = null; this.tableList = [this.tableLists[0]] this.currentTable = this.tableLists[0].templateId; + console.log(111,this.currentTable); + if(this.tableLists.find(m=>m.templateId==this.currentTable)&&this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('鐢佃矾璇曢獙')&&this.currentTableState!=0&&this.currentTableState!=1){ + this.versionDialogVisible = true + } // 澶勭悊椤甸潰鍒楄〃鏁版嵁 this.handleTableData() } @@ -3593,6 +3615,23 @@ async getCurrentItem(){ let list = await this.getCurrentProduct(this.currentSample.id,0) this.currentSample.insProduct = this.HaveJson(list) + }, + saveVersion(){ + if(this.currentTableState!=0&&this.currentTableState!=1){ + this.$message.error('璇烽�夋嫨鐗堟湰') + return + } + this.versionLoading = true; + this.$axios.post(this.$api.insOrderPlan.chooseVersion, { + orderStateId: this.orderStateId, + version: this.currentTableState + }).then(res => { + this.versionLoading = false; + if(res.code==201){ + return + } + this.versionDialogVisible = false + }) } } } -- Gitblit v1.9.3