From d3a7b64c6855523c1d4b4978df09eda788c0064c Mon Sep 17 00:00:00 2001 From: value <z1292839451@163.com> Date: 星期三, 24 四月 2024 18:20:41 +0800 Subject: [PATCH] 检验模板调整 --- src/components/view/b1-inspection-order.vue | 80 +++++++++++++++++++++++++++------------ 1 files changed, 55 insertions(+), 25 deletions(-) diff --git a/src/components/view/b1-inspection-order.vue b/src/components/view/b1-inspection-order.vue index 0200bd6..c09dd5f 100644 --- a/src/components/view/b1-inspection-order.vue +++ b/src/components/view/b1-inspection-order.vue @@ -86,9 +86,9 @@ v-model="componentData.entity.entrustCode" @keyup.enter.native="refreshTable()"></el-input></div> </div> <div class="search_thing"> - <div class="search_label">鏍峰搧鍚嶇О锛�</div> + <div class="search_label">鏍峰搧绫诲瀷锛�</div> <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable - v-model="componentData.entity.sample" @keyup.enter.native="refreshTable()"></el-input></div> + v-model="componentData.entity.sampleType" @keyup.enter.native="refreshTable()"></el-input></div> </div> <div class="search_thing" style="padding-left: 30px;"> <el-button size="small" @click="refresh()">閲� 缃�</el-button> @@ -100,7 +100,7 @@ <li v-for="(m,i) in tabList" :key="i" :class="{active:i==tabIndex}" @click="handleTab(m,i)">{{m.label}}</li> </ul> <ValueTable ref="ValueTable" :url="$api.insOrder.selectInsOrderParameter" :componentData="componentData" - :key="upIndex" style="height: calc(100% - 44px)" /> + :key="'b'+upIndex" style="height: calc(100% - 44px)" /> </div> <!-- 瀹℃牳 --> <el-dialog title="涓嬪崟瀹℃牳" :visible.sync="verifyDialogVisible" width="30%" :before-close="handleClose"> @@ -157,8 +157,8 @@ <el-col class="search_thing" :span="22"> <div class="search_label"><span class="required-span" v-show="distributeData.type==2">* </span>鎸囨淳浜哄憳锛�</div> <div class="search_input"> - <el-select v-model="distributeData.userId" placeholder="璇烽�夋嫨" size="small" style="width: 100%;"> - <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> + <el-select v-model="distributeData.userId" placeholder="璇烽�夋嫨" size="small" style="width: 100%;" clearable> + <el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value"> </el-option> </el-select> </div> @@ -172,10 +172,10 @@ </el-row> </span> </el-dialog> - <el-dialog title="鏁版嵁鏌ョ湅" :visible.sync="dataDialogVisible" width="70%" :before-close="handleClose2"> - <div style="height: 70vh;overflow-y: auto;"> - <ValueTable ref="ValueTableDataLook" :url="$api.deviceScope.selectDeviceParameter" - :componentData="componentDataDataLook" :key="upIndex" /> + <el-dialog title="鏁版嵁鏌ョ湅" :visible.sync="dataDialogVisible" width="70%"> + <div style="height: 70vh;overflow-y: auto;" v-if="dataDialogVisible"> + <ValueTable ref="ValueTableDataLook" :url="$api.insOrder.selectSampleAndProductByOrderId" + :componentData="componentDataDataLook"/> </div> </el-dialog> </div> @@ -217,7 +217,7 @@ componentData: { entity: { entrustCode: null, - sample: null, + sampleType: null, state: 0, orderBy: { field: 'id', @@ -298,8 +298,9 @@ }, componentDataDataLook: { entity: { + id: 0, orderBy: { - field: 'id', + field: 'sampleCode', order: 'asc' } }, @@ -308,21 +309,21 @@ select: false, do: [], tagField: { - deviceStatus: { + insState: { + select: [] + }, + insResult: { select: [{ - value: 0, - type: 'success', - label: '姝e父' - }, { value: 1, - type: 'warning', - label: '鎶ュ簾' - }, { - value: 2, - type: 'danger', - label: '淇濅慨' + label: '鍚堟牸', + type: 'success' + },{ + value: 0, + label: '涓嶅悎鏍�', + type: 'danger' }] - } + }, + inspectionValueType: {select: []} }, selectField: {}, requiredAdd: [], @@ -362,6 +363,8 @@ this.getPower() this.getUserMenu() this.getAuthorizedPerson() + this.getInsStateDicts() + this.selectEnumByCategoryForInspectionValueType() }, methods: { getAuthorizedPerson() { @@ -429,6 +432,7 @@ }, // 鏁版嵁鏌ョ湅 handleDataLook(row) { + this.componentDataDataLook.entity.id = row.id this.dataDialogVisible = true; }, // 涓嬭浇鎶ュ憡 @@ -447,7 +451,7 @@ handleIssued(row) { this.issuedDialogVisible = true; this.$axios.post(this.$api.insOrder.selectOrderManDay, { - id: row.sampleId + id: row.id }).then(res => { this.distributeData.orderId = row.id this.distributeData.sampleId = row.sampleId @@ -513,7 +517,33 @@ }) this.componentData.tagField.createUser.select = data }) - } + }, + getInsStateDicts() { + this.$axios.post(this.$api.enums.selectEnumByCategory, { + category: "妫�楠屼换鍔$姸鎬�" + }).then(res => { + let data = res.data + this.insStateList = data + data.forEach(ele => { + //0:寰呮楠� 1:妫�楠屼腑 2:宸叉楠� 3:寰呭鏍� 4:澶嶆牳鏈�氳繃 5:澶嶆牳閫氳繃 + if (['2', '5'].includes(ele.value)) { + ele.type = 'success' + } else if (['1', '3'].includes(ele.value)) { + ele.type = 'warning' + } else if (['0', '4'].includes(ele.value)) { + ele.type = 'danger' + } + }) + this.componentDataDataLook.tagField.insState.select = data + }) + }, + selectEnumByCategoryForInspectionValueType() { + this.$axios.post(this.$api.enums.selectEnumByCategory, { + category: "妫�楠屽�肩被鍨�" + }).then(res => { + this.componentDataDataLook.tagField.inspectionValueType.select = res.data + }) + }, } } </script> -- Gitblit v1.9.3