From 90ef20e23e11803d967582f93f58f0b52cddb3a1 Mon Sep 17 00:00:00 2001
From: gaoluyang <gaoluyang@rengu.cc>
Date: 星期二, 23 七月 2024 13:44:36 +0800
Subject: [PATCH] 装备电缆-下单时样品型号根据×位置拼接

---
 src/components/do/b1-ins-order/add.vue |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 623669a..16b48a1 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -844,7 +844,8 @@
       <div>
         <div v-if="isShowInput" style="margin-bottom: 6px">
           <span>寰幆娆℃暟:</span>
-          <el-input size="small" type="number" v-model="temperatureTestNum" style="width: 120px"></el-input>
+          <!-- <el-input size="small" type="number" v-model="temperatureTestNum" style="width: 120px"></el-input> -->
+          <el-input-number v-model="temperatureTestNum" :min="2" :max="1000000" size="small" label=""></el-input-number>
         </div>
         <el-checkbox-group v-model="temperatureTest" @change="handleTemperatureTestChange" style="display: flex;flex-direction: column;">
           <el-checkbox v-for="item in temperatureList" :label="item" :key="item" style="margin-bottom: 6px">{{item}}</el-checkbox>
@@ -1728,9 +1729,22 @@
           str: JSON.stringify({
             insOrder: this.addObj,
             list: JSON.stringify(sampleList.map(a => {
-              a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ?
-                '' : (
-                  '-' + a.modelNum))
+              if (this.PROJECT === '瑁呭鐢电紗') {
+                if (a.modelNum) {
+                  const index = a.modelNum.indexOf('脳')
+                  if (index === 0) {
+                    a.model = a.model + a.modelNum
+                  } else if (index === -1) {
+                    a.model = a.model + '-' + a.modelNum
+                  } else {
+                    a.model = a.modelNum + a.model
+                  }
+                } else {
+                  a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum))
+                }
+              } else {
+                a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum))
+              }
               a.insProduct = a.insProduct.filter(b=>b.state === 1)
               return a
             })),
@@ -2655,6 +2669,7 @@
       getTotal() {
         this.totalArr = []
         this.total = 0;
+        console.log(this.sampleList)
         this.sampleList.forEach(item => {
           if (item.insProduct && item.insProduct.length > 0) {
             item.insProduct.forEach(a => {
@@ -2700,6 +2715,7 @@
             if (item.manHourGroup === '' || !item.manHourGroup) {
               return true
             } else {
+              console.log(item)
               mySet.add(item.manHourGroup)
               let num2 = mySet.size
               if (num2 > num1) {

--
Gitblit v1.9.3