From 4bad62e4fd67ba8759f79263e4b08bf9ab6d64d0 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期五, 31 五月 2024 15:59:56 +0800
Subject: [PATCH] 消息通知样式优化

---
 src/components/do/b1-ins-order/add.vue |  120 ++++++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 76 insertions(+), 44 deletions(-)

diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index ce543ab..9ca4c9d 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -92,7 +92,7 @@
 
 <template>
   <div class="ins_order_add">
-    <div>
+    <div v-show="!configShow">
       <el-row class="title">
         <el-col :span="6" style="padding-left: 20px;">濮旀墭鍗曚俊鎭�</el-col>
         <el-col :span="18" style="text-align: right;">
@@ -107,7 +107,7 @@
           <el-button size="medium" @click="templateDia=true" v-show="active==1">
             <span style="color: #3A7BFA;">淇濆瓨妯℃澘</span>
           </el-button>
-          <el-button size="medium" type="primary" @click="$parent.playOrder(4)">鍏夌氦閰嶇疆</el-button>
+          <el-button size="medium" type="primary" @click="openConfig">鍏夌氦閰嶇疆</el-button>
           <el-button size="medium" type="primary" @click="save" :loading="saveLoad" v-show="active==1">鎻愪氦</el-button>
           <!-- 瀹℃牳 -->
           <el-button size="medium" @click="upInsOrderOfState(2)" :loading="saveLoad" v-show="active==3"
@@ -120,7 +120,7 @@
         </el-col>
       </el-row>
     </div>
-    <div class="search">
+    <div class="search" v-show="!configShow">
       <el-row>
         <el-col class="search_thing" :span="6">
           <div class="search_label">濮旀墭缂栧彿锛�</div>
@@ -222,6 +222,30 @@
           </div>
         </el-col>
         <el-col class="search_thing" :span="6">
+          <div class="search_label"><span class="required-span">* </span>宸ョ▼鍚嶇О锛�</div>
+          <div class="search_input">
+            <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addObj.engineering" :readonly="active>1"></el-input>
+          </div>
+        </el-col>
+        <el-col class="search_thing" :span="6">
+          <div class="search_label"><span class="required-span">* </span>宸ョ▼鍚嶇ОEN锛�</div>
+          <div class="search_input">
+            <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addObj.engineeringEn" :readonly="active>1"></el-input>
+          </div>
+        </el-col>
+        <el-col class="search_thing" :span="6">
+          <div class="search_label"><span class="required-span">* </span>鐢熶骇鍗曚綅锛�</div>
+          <div class="search_input">
+            <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addObj.production" :readonly="active>1"></el-input>
+          </div>
+        </el-col>
+        <el-col class="search_thing" :span="6">
+          <div class="search_label"><span class="required-span">* </span>鐢熶骇鍗曚綅EN锛�</div>
+          <div class="search_input">
+            <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addObj.productionEn" :readonly="active>1"></el-input>
+          </div>
+        </el-col>
+        <el-col class="search_thing" :span="6">
           <div class="search_label">鏄惁鐣欐牱锛�</div>
           <div class="search_input">
             <el-radio-group v-model="addObj.isLeave">
@@ -245,30 +269,6 @@
             <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addObj.otcCode" :readonly="active>1"></el-input>
           </div>
         </el-col>
-        <el-col class="search_thing" :span="6">
-          <div class="search_label">宸ョ▼鍚嶇О锛�</div>
-          <div class="search_input">
-            <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addObj.value1" :readonly="active>1"></el-input>
-          </div>
-        </el-col>
-        <el-col class="search_thing" :span="6">
-          <div class="search_label">宸ョ▼鍚嶇ОEN锛�</div>
-          <div class="search_input">
-            <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addObj.value2" :readonly="active>1"></el-input>
-          </div>
-        </el-col>
-        <el-col class="search_thing" :span="6">
-          <div class="search_label">鐢熶骇鍗曚綅锛�</div>
-          <div class="search_input">
-            <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addObj.value3" :readonly="active>1"></el-input>
-          </div>
-        </el-col>
-        <el-col class="search_thing" :span="6">
-          <div class="search_label">鐢熶骇鍗曚綅EN锛�</div>
-          <div class="search_input">
-            <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addObj.value4" :readonly="active>1"></el-input>
-          </div>
-        </el-col>
         <el-col class="search_thing" :span="6" style="align-items: flex-start;margin: 8px 0;">
           <div class="search_label">澶囨敞锛�</div>
           <div class="search_input">
@@ -278,7 +278,7 @@
         </el-col>
       </el-row>
     </div>
-    <div>
+    <div v-show="!configShow">
       <el-table class="el-table sampleTable" ref="sampleTable" :data="sampleList" height="250px" tooltip-effect="dark"
         border @selection-change="selectSample" highlight-current-row @row-click="rowClick" style="margin-top: 10px;">
         <el-table-column type="selection" width="60" :selectable="selectable" v-if="active==1"></el-table-column>
@@ -373,8 +373,9 @@
         <el-table-column prop="section" label="鍖洪棿" width="120" show-overflow-tooltip></el-table-column>
         <el-table-column prop="ask" label="瑕佹眰鍊�" min-width="220px">
           <template slot-scope="scope">
-            <el-input size="small" placeholder="瑕佹眰鍊�" v-model="scope.row.ask" clearable type="textarea" readonly
-              :autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row)" :readonly="active>1"></el-input>
+            <el-input size="small" placeholder="瑕佹眰鍊�" v-model="scope.row.ask" clearable type="textarea"
+              :autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row)" v-if="active==1&&isAskOnlyRead"></el-input>
+              <span v-else>{{ scope.row.ask }}</span>
           </template>
         </el-table-column>
       </el-table>
@@ -540,14 +541,17 @@
         </el-row>
       </span>
     </el-dialog>
+    <fiberOpticConfig :currentId="currentId" v-if="configShow"/>
   </div>
 </template>
 
 <script>
   import ValueTable from '../../tool/value-table.vue'
+  import fiberOpticConfig from './fiberoptic-config.vue'
   export default {
     components: {
-      ValueTable
+      ValueTable,
+      fiberOpticConfig
     },
     props: {
       active: {
@@ -588,10 +592,11 @@
           orderType: null,
           send: 1,
           formType: '閫佹',
-          value1: null,
-          value2: null,
-          value3: null,
-          value4: null,
+          engineering: null,
+          engineeringEn: null,
+          production: null,
+          productionEn: null,
+          companyId: null
         },
         sample: {
           sampleCode: null,
@@ -666,7 +671,10 @@
         noLoading: false,
         orderType: [],
         filters: [],
-        formType: []
+        formType: [],
+        configShow: false,
+        currentMethod: null,
+        isAskOnlyRead:false
       }
     },
     watch: {
@@ -734,19 +742,14 @@
           this.$message.error('鏈�夋嫨鏁版嵁')
           return
         }
-        delete selects['orderBy']
-        delete selects['updateUser']
-        delete selects['updateTime']
-        this.addObj.userId = selects.id
         this.addObj.company = selects.company
-        this.addObj.custom = selects.name
         this.addObj.code = selects.code
-        this.addObj.phone = selects.phone
+        this.addObj.companyId = selects.id
         this.selectUserDia = false
       },
       save() {
-        if (!this.addObj.custom) {
-          this.$message.error('鏈�夋嫨涓嬪崟瀹㈡埛')
+        if (!this.addObj.companyId) {
+          this.$message.error('鏈�夋嫨瀹㈡埛鍗曚綅')
           return
         }
         if (!this.addObj.type) {
@@ -755,6 +758,14 @@
           this.$message.error('璇疯緭鍏ユ潵鏍锋柟寮�')
         } else if (!this.addObj.orderType) {
           this.$message.error('璇烽�夋嫨妫�楠岀被鍒�')
+        }else if (!this.addObj.engineering) {
+          this.$message.error('璇疯緭鍏ュ伐绋嬪悕绉�')
+        } else if (!this.addObj.engineeringEn) {
+          this.$message.error('璇疯緭鍏ュ伐绋嬪悕绉癊N')
+        }else if (!this.addObj.production) {
+          this.$message.error('璇疯緭鍏ョ敓浜у崟浣�')
+        }else if (!this.addObj.productionEn) {
+          this.$message.error('璇疯緭鍏ョ敓浜у崟浣岴N')
         } else if (this.sampleList.length < 1) {
           this.$message.error('璇锋坊鍔犱竴涓牱鍝�')
         } else if (!this.sampleList.every(m => m.sample)) {
@@ -1044,6 +1055,13 @@
         })
       },
       rowClick(row, column, event) {
+        this.currentMethod = row
+        let obj = this.methods.find(a=>a.id==this.currentMethod.standardMethodListId)
+        if(obj&&obj.code=='濮旀墭瑕佹眰'){
+          this.isAskOnlyRead = true
+        }else{
+          this.isAskOnlyRead = false
+        }
         this.productList = row.insProduct
         setTimeout(() => {
           this.productList.forEach(a => {
@@ -1171,6 +1189,13 @@
       },
       methodChange(val, row) {
         if(val===null||val==='')return
+        this.currentMethod = row
+        let obj = this.methods.find(a=>a.id==this.currentMethod.standardMethodListId)
+        if(obj&&obj.code=='濮旀墭瑕佹眰'){
+          this.isAskOnlyRead = true
+        }else{
+          this.isAskOnlyRead = false
+        }
         this.getProductLoad = true
         this.$axios.post(this.$api.standardTree.selectStandardProductList, {
           model: row.model + '-' + row.modelNum,
@@ -1310,6 +1335,13 @@
       filterHandler(value, row, column) {
         const property = column['property'];
         return row[property] === value;
+      },
+      openConfig(){
+        if(this.sampleIds.length===0){
+          this.$message.error("鏈�夋嫨鏍峰搧")
+          return
+        }
+        this.configShow = true
       }
     }
   }

--
Gitblit v1.9.3