From 07a41ade45c962e93a9d449ce1be0eec52e66a6a Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期三, 19 三月 2025 10:44:32 +0800 Subject: [PATCH] 内部单不能修改报告 --- src/components/view/b1-inspection-order.vue | 153 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 146 insertions(+), 7 deletions(-) diff --git a/src/components/view/b1-inspection-order.vue b/src/components/view/b1-inspection-order.vue index 3c82c0d..5a5db44 100644 --- a/src/components/view/b1-inspection-order.vue +++ b/src/components/view/b1-inspection-order.vue @@ -188,9 +188,12 @@ v-model="componentData.entity.entrustCode" @keyup.enter.native="refreshTable()"></el-input></div> </div> <div class="search_thing" style="width: 20%;"> - <div class="search_label" style="width: 120px;">澶栭儴濮旀墭缂栧彿锛�</div> - <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable - v-model="componentData.entity.outEntrustCode" @keyup.enter.native="refreshTable()"></el-input></div> + <div class="search_label">璁㈠崟绫诲瀷锛�</div> + <div class="search_input"> + <el-select v-model="componentData.entity.formType" size="small" style="width: 100%;" @change="refreshTable()"> + <el-option v-for="(a,ai) in formType" :key="ai" :label="a.label" :value="a.value"></el-option> + </el-select> + </div> </div> <div class="search_thing" style="width: 20%;"> <div class="search_label">鏍峰搧鍚嶇О锛�</div> @@ -206,6 +209,11 @@ <div class="search_label">鏍峰搧缂栧彿锛�</div> <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="componentData.entity.sampleCode" @keyup.enter.native="refreshTable()"></el-input></div> + </div> + <div class="search_thing" style="width: 20%;" v-if="more"> + <div class="search_label" style="width: 120px;">澶栭儴濮旀墭缂栧彿锛�</div> + <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable + v-model="componentData.entity.outEntrustCode" @keyup.enter.native="refreshTable()"></el-input></div> </div> <div class="search_thing" style="width: 20%;" v-if="more"> <div class="search_label">涓嬪崟鏃堕棿锛�</div> @@ -369,6 +377,82 @@ :componentData="componentDataDataLook"/> </div> </el-dialog> + <!-- 鏂�-璺熸姤鍛婄敓鎴愮殑涓�鏍� --> + <el-dialog + title="鏁版嵁鏌ョ湅" + :visible.sync="lookDialogVisible" + width="60%" + :append-to-body="true" + :modal="!lookDialogVisible0" + > + <div style="max-height: 75vh;overflow-y: auto;"> + <template v-for="(a,b) in sampleList"> + <el-divider></el-divider> + <p style="margin: 10px 0;font-weight: 700;">鏍峰搧锛�<el-tag size="small">{{a.insSample.sample}}</el-tag> 鏍峰搧缂栧彿锛歿{a.insSample.sampleCode}}</p> + <el-card class="box-card" style="margin-top: 16px;" v-for="(item,index) in a.historyList" :key="index"> + <div slot="header" style="display: flex;justify-content: space-between;"> + <span>{{ item.laboratory }}</span> + </div> + <el-table + :data="item.insOrderUserList" + border + style="width: 100%"> + <el-table-column + prop="submitTime" + label="鎻愪氦鏃ユ湡" + min-width="150"> + </el-table-column> + <el-table-column + prop="submitUserName" + label="鎻愪氦浜�" + min-width="90"> + </el-table-column> + <el-table-column + prop="term" + label="瀹為獙闃舵" + min-width="120"> + </el-table-column> + <el-table-column + prop="note" + label="瀹為獙鎿嶄綔" + min-width="120"> + </el-table-column> + <el-table-column + prop="tell" + label="鍐嶆妫�楠屽師鍥�" + min-width="120"> + </el-table-column> + <el-table-column + fixed="right" + label="鎿嶄綔" + min-width="100"> + <template slot-scope="scope"> + <el-button @click="lookDetail(item,scope.row.num,a.insSample)" type="text" size="small">鏌ョ湅</el-button> + </template> + </el-table-column> + </el-table> + </el-card> + <p v-if="a.historyList.length==0" style="text-align: center;">鏆傛棤妫�楠屾暟鎹�</p> + </template> + </div> + </el-dialog> + <el-dialog + title="妫�楠岃鎯�" + :visible.sync="lookDialogVisible0" + width="100%" :fullscreen="true" :modal="false" :append-to-body="true"> + <Inspection v-if="lookDialogVisible0" + :orderId="sampleId" + :orderId0="orderId0" + :userInfo="{}" + :inspectorList="currentItem.inspectorList" + :sonLaboratory="currentItem.laboratory" + :state="2" + :orderStateId="currentItem.orderStateId" + :version="currentItem.version" + :isLook="true" + :num1="currentItem.num1" + :noBack="true"/> + </el-dialog> <el-dialog :title="deleteTilte" :visible.sync="deleteDialogVisible" width="80%"> <div style="height: 70vh;overflow-y: auto;" v-if="deleteDialogVisible"> <ValueTable ref="ValueTableDataDelete" :url="$api.insOrder.selectNoProducts+'?orderId='+orderId+'&ids='+this.revocationInsProductIds" @@ -514,11 +598,13 @@ <script> import ValueTable from '../tool/value-table.vue' import Add from '../do/b1-ins-order/add.vue' + import Inspection from '../do/b1-inspect-order-plan/Inspection.vue' import vueQr from 'vue-qr' import PrintJS from 'print-js' export default { components: { ValueTable, + Inspection, Add, vueQr }, @@ -573,6 +659,7 @@ appointed:null, issueTime:null, motorNumber:null, + formType:null, // orderBy: { // field: '', // order: '' @@ -837,7 +924,15 @@ BZinfo:[], BZDialogVisible:false, downVisible:false, - downList:[] + downList:[], + formType:[], + currentInfo:{}, + sampleList:[], + lookDialogVisible:false, + lookDialogVisible0:false, + sampleId:null, + orderId0:null, + currentItem:{}, } }, watch:{ @@ -876,6 +971,7 @@ this.getAuthorizedPerson() this.getInsStateDicts() this.selectEnumByCategoryForOrderType() + this.selectEnumByCategoryForSampleForm() }, methods: { selectMethod(val){ @@ -949,7 +1045,7 @@ this.loadPint = false; let arr1 = [] a.insProduct.forEach(b=>{ - arr1.push(b.inspectionItem) + arr1.push(b.inspectionItemSubclass) }) a.item = [...new Set(arr1)].join(',') }) @@ -1114,9 +1210,45 @@ }, // 鏁版嵁鏌ョ湅 handleDataLook(row) { - this.componentDataDataLook.entity.id = row.id - this.dataDialogVisible = true; + // this.componentDataDataLook.entity.id = row.id + // this.dataDialogVisible = true; + + this.currentInfo = row + this.$axios.get(this.$api.insReport.getInsOrderStateCount+'?id='+row.id).then(res => { + this.sampleList = res.data + this.sampleList.forEach(a=>{ + a.historyList = a.insOrderStates + a.historyList.forEach(item => { + item.arr = [] + this.$set(item,'numValue',1) + if(item.num>0){ + for(var i=0;i<item.num;i++){ + item.arr.push({ + label:'璁板綍'+(i+1), + value:i+1 + }) + } + } + }) + }) + this.lookDialogVisible = true + }) }, + // 鏌ョ湅妫�楠岃鎯� + lookDetail(row,value,insSample){ + this.lookDialogVisible0 = true + let inspectorList = [] + if(row.userName){ + inspectorList = row.userName.split(',') + } + this.sampleId = insSample.id + this.orderId0 = insSample.insOrderId + this.currentItem = { + num1:value, + inspectorList:inspectorList, + ...row + } + }, // 涓嬭浇鎶ュ憡 download(row) { this.downList = row.reportDtos @@ -1304,6 +1436,13 @@ this.refreshTable('page') this.upIndex++ }, + selectEnumByCategoryForSampleForm() { + this.$axios.post(this.$api.enums.selectEnumByCategory, { + category: "璁㈠崟绫诲瀷" + }).then(res => { + this.formType = res.data + }) + }, getUserMenu() { this.$axios.get(this.$api.user.getUserMenu).then(res => { let data = [] -- Gitblit v1.9.3