From 9969561611d9261c90728643d8a35287f79b57b9 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期四, 05 十二月 2024 14:47:01 +0800
Subject: [PATCH] 调整标签打印为二维码

---
 src/components/do/b1-ins-order/add.vue |   38 +++++++++++++++++++++++++++-----------
 1 files changed, 27 insertions(+), 11 deletions(-)

diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 7d4e9ba..54397cd 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -134,9 +134,9 @@
   <div class="ins_order_add" style=" display: block; ">
     <div v-show="!configShow&&!equipConfigShow&&!cableConfigShow">
       <el-row class="title">
-        <el-col :span="6" style="padding-left: 20px;text-align: left;">濮旀墭鍗曚俊鎭�&nbsp;&nbsp;&nbsp;鍗曚綅鎴愭湰鎬讳环锛�<span
+        <el-col :span="8" style="padding-left: 20px;text-align: left;">濮旀墭鍗曚俊鎭�&nbsp;&nbsp;&nbsp;鍗曚綅鎴愭湰鎬讳环锛�<span
             style="color: #3A7BFA">锟{total.toFixed(2)}}</span></el-col>
-        <el-col :span="18" style="text-align: right;">
+        <el-col :span="16" style="text-align: right;">
           <el-select v-model="template" size="medium" placeholder="涓嬪崟妯℃澘" style="margin-right: 10px;" v-show="active==1"
             @change="selectInsOrderTemplateById">
             <el-option v-for="(a, ai) in templates" :key="ai" :value="a.id" :label="a.name">
@@ -234,7 +234,7 @@
             <div class="search_label"><span class="required-span">* </span>鏍峰搧鏁伴噺锛�</div>
             <div class="search_input">
               <el-input-number size="small" v-model="addObj.sampleNum" :min="1" :max="100" :precision="0"
-                style="width: 65%;" @change="addStandardTree" :disabled="active>1"></el-input-number>
+                style="width: 100%;" @change="addStandardTree" :disabled="active>1"></el-input-number>
             </div>
           </el-col>
           <!-- <el-col class="search_thing" :span="6">
@@ -356,7 +356,7 @@
                 :disabled="active>1"
                 type="date"
                 placeholder="閫夋嫨鏃ユ湡"
-                size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
+                size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;">
               </el-date-picker>
             </div>
           </el-col>
@@ -368,7 +368,7 @@
                 :disabled="active>1"
                 type="date"
                 placeholder="閫夋嫨鏃ユ湡"
-                size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
+                size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;">
               </el-date-picker>
             </div>
           </el-col>
@@ -1364,6 +1364,9 @@
       'addObj.sampleNum'(val) {
         this.model = null
         this.standardMethodListId = []
+      },
+      active(val){
+        this.saveLoad = false
       }
     },
     mounted() {
@@ -1412,7 +1415,7 @@
           })
         })
         // 鏂囦欢淇℃伅
-        this.componentData0.entity.insOrderId = this.currentId
+        this.componentData0.entity.insOrderId = this.currentId;
         this.$refs.fileList.selectList()
       }
     },
@@ -2781,7 +2784,23 @@
       // 淇濆瓨妯℃澘
       addTemplateDia() {
         if (this.templateName) {
-          this.templateLoading = true;
+          if(this.templates.find(m=>m.name==this.templateName)){
+            this.$confirm('宸插瓨鍦ㄥ悓鍚嶆ā鏉匡紝鏄惁杩涜鏇挎崲?', "鎻愮ず", {
+              confirmButtonText: "纭畾",
+              cancelButtonText: "鍙栨秷",
+              type: "warning"
+            }).then(() => {
+              this.saveTemplateDia()
+            }).catch(() => {})
+          }else{
+            this.saveTemplateDia()
+          }
+        } else {
+          this.$message.error('璇峰~鍐欐ā鏉垮悕绉�')
+        }
+      },
+      saveTemplateDia(){
+        this.templateLoading = true;
           this.$axios.post(this.$api.insOrder.addInsOrderTemplate, {
             name: this.templateName,
             thing: JSON.stringify({
@@ -2801,9 +2820,6 @@
             this.selectInsOrderTemplate()
             this.templateName = ''
           })
-        } else {
-          this.$message.error('璇峰~鍐欐ā鏉垮悕绉�')
-        }
       },
       // 鏌ヨ妯℃澘
       selectInsOrderTemplateById(e) {
@@ -2844,7 +2860,7 @@
         }).then(res => {
           this.orderType = res.data
           if (res.data.length > 0) {
-            this.addObj.orderType = res.data[0].value
+            this.addObj.orderType = 'C'
           }
         })
       },

--
Gitblit v1.9.3