From 7c0eaf011a06a3b5578fef0ae7b61c8c923e0c97 Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期一, 28 十月 2024 11:23:54 +0800
Subject: [PATCH] 正式库配置
---
src/components/do/b1-inspect-order-plan/Inspection.vue | 143 ++++++++++++++++++++++++++++++++++++-----------
1 files changed, 110 insertions(+), 33 deletions(-)
diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index ce9beb9..1c8dcce 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -260,7 +260,7 @@
<el-col :span="12" style="padding-left: 20px;text-align: left;" :class="{noShow:noBack}">妫�楠屽崟璇︽儏
</el-col>
<el-col :span="12" style="text-align: right;">
- <el-button size="small" type="primary" @click="versionDialogVisible=true" v-if="state==1">妫�楠屾ā鏉垮垏鎹�</el-button>
+ <el-button size="small" type="primary" @click="versionDialogVisible=true" v-if="state==1&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName.includes('鐢佃矾璇曢獙')">妫�楠屾ā鏉垮垏鎹�</el-button>
<el-button size="small" type="primary" @click="sampleVisible=true;uploadSample()">鏍峰搧鍒囨崲</el-button>
<el-button size="small" type="primary" @click="taskVisible=true" v-show="!isLook">浠诲姟鍒囨崲</el-button>
<el-button size="small" type="primary" @click="handleSubmit" v-if="state==1"
@@ -347,7 +347,7 @@
</div> -->
</div>
<!-- 甯歌妫�楠屽師濮嬭褰� -->
- <div class="center-box" id="nav" v-loading="tableLoading" v-if="!tableLists.find(m=>m.templateId==currentTable)||(!tableLists.find(m=>m.templateId==currentTable).templateName.includes('鐢佃矾璇曢獙'))">
+ <div class="center-box" id="nav" v-loading="tableLoading" v-if="!tableLists.find(m=>m.templateId==currentTable)||(!tableLists.find(m=>m.templateId==currentTable).templateName.includes('鐢佃矾璇曢獙')&&!tableLists.find(m=>m.templateId==currentTable).templateName.includes('娓╂箍搴﹁瘯楠�')&&!tableLists.find(m=>m.templateId==currentTable).templateName.includes('鍔熺巼瀹归噺'))">
<table border="1" class="tables" cellpadding="10" v-for="(item,index) in tableList" :key="index+currentTable+currentSample.id">
<tbody>
<tr v-for="(m,i) in item.arr" :key="i">
@@ -729,9 +729,18 @@
<CircuitParameters1 v-if="currentTableState==0" :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state" :num="currentSample.num1" :isLook="isLook" :currentNum="currentNum"></CircuitParameters1>
<CircuitParameters2 v-if="currentTableState==1" :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state" :num="currentSample.num1" :isLook="isLook" :currentNum="currentNum"></CircuitParameters2>
</div>
+ <!-- 娓╂箍搴﹁瘯楠� -->
+ <div v-else-if="tableLists.find(m=>m.templateId==currentTable).templateName.includes('娓╂箍搴﹁瘯楠�')">
+ <Humidity :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state" :isLook="isLook" :num="currentSample.num1"/>
+ </div>
+ <!-- 鍔熺巼璇曢獙 -->
+ <div v-else-if="tableLists.find(m=>m.templateId==currentTable).templateName.includes('鍔熺巼瀹归噺')">
+ <PowerCapacity :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state" :isLook="isLook" :num="currentSample.num1" />
+ </div>
<el-upload :action="action"
:data="{
- orderId:id
+ orderId:id,
+ sonLaboratory:sonLaboratory
}"
v-if="state==1&&fileAdd"
:on-success="handleSuccessUp" :show-file-list="false"
@@ -854,19 +863,43 @@
<el-button type="primary" :loading="versionLoading" @click="saveVersion">纭� 瀹�</el-button>
</span>
</el-dialog>
- <el-dialog title="璇曢獙淇℃伅" :visible.sync="experimentDia" width="400px">
- <div class="body" style="display: flex;padding: 10px;align-items: center;">
- <div class="search_label" style="width: 150px;"><span class="required-span">*</span>瀹為獙闃舵</div>
- <div class="search_input" style="width: 100%;">
- <el-input clearable v-model="experimentInfo.term" size="small" placeholder=""></el-input>
+ <el-dialog title="璇曢獙淇℃伅" :visible.sync="experimentDia" width="50%">
+ <div style="height: 80vh;overflow-y: auto;">
+ <div class="body" style="display: flex;padding: 10px;align-items: center;" v-if="experimentDia0">
+ <div class="search_label" style="width: 150px;"><span class="required-span">*</span>瀹為獙闃舵</div>
+ <div class="search_input" style="width: 100%;">
+ <el-input clearable v-model="experimentInfo.term" size="small" placeholder=""></el-input>
+ </div>
</div>
- </div>
- <div class="body" style="display: flex;padding: 10px;align-items: center;">
- <div class="search_label" style="width: 150px;"><span class="required-span">*</span>瀹為獙鎿嶄綔</div>
- <div class="search_input" style="width: 100%;">
- <el-input clearable v-model="experimentInfo.note" size="small" placeholder="" type="textarea"
- :rows="2"></el-input>
+ <div class="body" style="display: flex;padding: 10px;align-items: center;" v-if="experimentDia0">
+ <div class="search_label" style="width: 150px;"><span class="required-span">*</span>瀹為獙鎿嶄綔</div>
+ <div class="search_input" style="width: 100%;">
+ <el-input clearable v-model="experimentInfo.note" size="small" placeholder="" type="textarea"
+ :rows="2"></el-input>
+ </div>
</div>
+ <table border="1" cellpadding="10" class="thermal-table">
+ <tr style="font-size: 18px;font-weight: 500;background-color: #F0F1F5;padding: 10px 0;box-sizing: border-box;">
+ <td>鏍峰搧</td>
+ <td>鏍峰搧缂栧彿</td>
+ <td>鍨嬪彿</td>
+ <td>妫�楠岄」</td>
+ <td>妫�楠屽瓙椤�</td>
+ <td>宸ユ椂</td>
+ </tr>
+ <template v-for="(item,index) in sampleProduct">
+ <tr>
+ <td :rowspan="item.insProduct.length+1">{{ item.sample }}</td>
+ <td :rowspan="item.insProduct.length+1">{{ item.sampleCode }}</td>
+ <td :rowspan="item.insProduct.length+1">{{ item.model }}</td>
+ </tr>
+ <tr v-for="(m,i) in item.insProduct" :key="item.id+i">
+ <td>{{ m.inspectionItem }}</td>
+ <td>{{ m.inspectionItemSubclass }}</td>
+ <td><el-input-number v-model="m.outputWorkTime" :min="0" :max="100" label="宸ユ椂" size="small"></el-input-number></td>
+ </tr>
+ </template>
+ </table>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="experimentDia = false">鍙� 娑�</el-button>
@@ -876,7 +909,7 @@
<el-dialog
title="鏂囦欢棰勮"
:visible.sync="lookFileVisible"
- width="60%" fullscreen>
+ width="60%" fullscreen :modal="false">
<filePreview v-if="lookFileVisible" :fileUrl="currentFile.url"
:currentFile="currentFile" style="max-height: 87vh;overflow-y: auto;"/>
</el-dialog>
@@ -890,6 +923,8 @@
import excelFunction from '../../../util/excelFountion'
import CircuitParameters1 from './circuit-parameters1.vue'
import CircuitParameters2 from './circuit-parameters2.vue'
+ import Humidity from './humidity.vue'
+ import PowerCapacity from './power-capacity.vue'
import filePreview from '../../tool/file-preview.vue'
export default {
props: ['sonLaboratory', 'orderId', 'state','inspectorList','version','orderStateId','isLook','num1','noBack'],
@@ -898,12 +933,15 @@
Circuit,
CircuitParameters1,
CircuitParameters2,
- filePreview
+ filePreview,
+ Humidity,
+ PowerCapacity,
},
data() {
return {
lookFileVisible:false,//棰勮鏂囦欢
experimentDia:false,
+ experimentDia0:false,
experimentInfo:{
note:'',
term:''
@@ -951,7 +989,8 @@
},
componentData0: {
entity: {
- insOrderId:''
+ insOrderId:'',
+ sonLaboratory:this.sonLaboratory
},
isIndex: true,
showSelect: false,
@@ -3197,15 +3236,30 @@
}
},
submit0(){
- if(!this.experimentInfo.term){
- this.$message.error('璇疯緭鍏ュ疄楠岄樁娈�')
- return
+ if(this.sonLaboratory === '鐢佃矾璇曢獙'){
+ if(!this.experimentInfo.term){
+ this.$message.error('璇疯緭鍏ュ疄楠岄樁娈�')
+ return
+ }
+ if(!this.experimentInfo.note){
+ this.$message.error('璇疯緭鍏ュ疄楠屾搷浣�')
+ return
+ }
}
- if(!this.experimentInfo.note){
- this.$message.error('璇疯緭鍏ュ疄楠屾搷浣�')
+ let num =0
+ this.sampleProduct.forEach(item=>{
+ item.insProduct.forEach(a=>{
+ if(!a.outputWorkTime){
+ num++
+ }
+ })
+ })
+ if(num>0){
+ this.$message.error('璇疯緭鍏ュ畬鎴愬伐鏃�')
return
}
this.experimentDia = false
+ this.experimentDia0 = false
if(this.insOrder.orderType=='C'){
this.verifyUser = this.insOrder.prepareUserId
this.submit()
@@ -3214,15 +3268,10 @@
}
},
handleSubmit(){
+ this.experimentDia = true
+ console.log(6666,this.sampleProduct)
if (this.sonLaboratory === '鐢佃矾璇曢獙') {
- this.experimentDia = true
- } else {
- if(this.insOrder.orderType=='C'){
- this.verifyUser = this.insOrder.prepareUserId
- this.submit()
- }else{
- this.addVerifyDia = true
- }
+ this.experimentDia0 = true
}
},
submit() {
@@ -3237,14 +3286,33 @@
laboratory: this.sonLaboratory,
}).then(res => {
if (res.code === 200) {
+ let auxiliaryOutputWorkingHoursList = []
+ this.sampleProduct.forEach(item=>{
+ item.insProduct.forEach(a=>{
+ let obj = {
+ inspectionItem:a.inspectionItem,
+ outputWorkTime:a.outputWorkTime,
+ inspectionItemSubclass:a.inspectionItemSubclass,
+ sample:item.sampleCode,
+ insProductId:a.id,
+ num:item.num1
+ }
+ auxiliaryOutputWorkingHoursList.push(obj)
+ })
+ })
if(!res.data||res.data.length==0){
this.$axios.post(this.$api.insOrderPlan.submitPlan, {
orderId: this.orderId,
laboratory: this.sonLaboratory,
verifyUser: this.verifyUser,
entrustCode: this.insOrder.entrustCode,
+ auxiliaryOutputWorkingHoursList:auxiliaryOutputWorkingHoursList,
...this.experimentInfo
- }).then(res => {
+ }, {
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ noQs:true}).then(res => {
if (res.code === 200) {
this.$message.success("鎿嶄綔鎴愬姛")
this.$emit('goback')
@@ -3276,8 +3344,13 @@
orderId: this.orderId,
laboratory: this.sonLaboratory,
verifyUser: this.verifyUser,
+ auxiliaryOutputWorkingHoursList:auxiliaryOutputWorkingHoursList,
...this.experimentInfo
- }).then( res => {
+ }, {
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ noQs:true}).then( res => {
if (res.code === 200) {
this.submitLoading = false;
this.$message.success("鎿嶄綔鎴愬姛")
@@ -3674,7 +3747,8 @@
this.lookFileVisible = true
},
handleBack(){
- if(this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('鐢佃矾璇曢獙')){
+ try {
+ if(!this.isLook&&this.state==1&&this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('鐢佃矾璇曢獙')){
this.$confirm('璇风‘璁ゅ綋鍓嶆暟鎹槸鍚﹀叏閮ㄤ繚瀛橈紝鏄惁杩斿洖锛�', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
@@ -3685,6 +3759,9 @@
}else{
this.$emit('goback')
}
+ } catch (error) {
+ this.$emit('goback')
+ }
}
}
}
--
Gitblit v1.9.3