From 69ed1555e7be98d643e5cf9c55b591c44d52d1b9 Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期五, 01 十一月 2024 11:24:24 +0800 Subject: [PATCH] 修改标签打印格式 --- src/components/do/b1-inspect-order-plan/Inspection.vue | 93 ++++++++++++++++++++++++++-------------------- 1 files changed, 53 insertions(+), 40 deletions(-) diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue index 2735646..ebed918 100644 --- a/src/components/do/b1-inspect-order-plan/Inspection.vue +++ b/src/components/do/b1-inspect-order-plan/Inspection.vue @@ -735,11 +735,12 @@ </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" /> + <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" @@ -863,41 +864,43 @@ </span> </el-dialog> <el-dialog title="璇曢獙淇℃伅" :visible.sync="experimentDia" width="50%"> - <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 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;" 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 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> - <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> <span slot="footer" class="dialog-footer"> <el-button @click="experimentDia = false">鍙� 娑�</el-button> <el-button type="primary" @click="submit0">纭� 瀹�</el-button> @@ -906,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> @@ -915,7 +918,6 @@ <script> import ValueTable from '../../tool/value-table.vue' - import Circuit from './circuit.vue' import file from '../../../util/file' import excelFunction from '../../../util/excelFountion' import CircuitParameters1 from './circuit-parameters1.vue' @@ -927,7 +929,6 @@ props: ['sonLaboratory', 'orderId', 'state','inspectorList','version','orderStateId','isLook','num1','noBack'], components: { ValueTable, - Circuit, CircuitParameters1, CircuitParameters2, filePreview, @@ -986,7 +987,8 @@ }, componentData0: { entity: { - insOrderId:'' + insOrderId:'', + sonLaboratory:this.sonLaboratory }, isIndex: true, showSelect: false, @@ -3264,8 +3266,15 @@ } }, handleSubmit(){ + if(!this.otherForm.temperature){ + this.$message.error('璇疯緭鍏ユ俯搴�') + return + } + if(!this.otherForm.humidity){ + this.$message.error('璇疯緭鍏ユ箍搴�') + return + } this.experimentDia = true - console.log(6666,this.sampleProduct) if (this.sonLaboratory === '鐢佃矾璇曢獙') { this.experimentDia0 = true } @@ -3743,7 +3752,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: '鍙栨秷', @@ -3754,6 +3764,9 @@ }else{ this.$emit('goback') } + } catch (error) { + this.$emit('goback') + } } } } -- Gitblit v1.9.3