From e41c8ce514dffeb999d737ea8dbda30ab8b60aa0 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期五, 28 六月 2024 10:56:17 +0800
Subject: [PATCH] 优化

---
 src/components/do/b1-ins-order/fiberoptic-config.vue |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/components/do/b1-ins-order/fiberoptic-config.vue b/src/components/do/b1-ins-order/fiberoptic-config.vue
index 11e71cd..768bde7 100644
--- a/src/components/do/b1-ins-order/fiberoptic-config.vue
+++ b/src/components/do/b1-ins-order/fiberoptic-config.vue
@@ -53,7 +53,7 @@
               </el-table-column>
               <el-table-column label="绠¤壊鏍�" show-overflow-tooltip>
                 <template slot-scope="scope">
-                  <el-select v-model="scope.row.color" size="mini" :disabled="active!=1">
+                  <el-select v-model="scope.row.color" size="mini" :disabled="active!=1" allow-create filterable >
                     <el-option v-for="(color,i) in colors" :key="i" :label="color.lable"
                       :value="color.value"></el-option>
                   </el-select>
@@ -187,7 +187,7 @@
               </el-table-column>
               <el-table-column prop="color" label="鍏夌氦鑹叉爣" width="120">
                 <template slot-scope="scope">
-                  <el-select v-model="scope.row.color" size="mini" :disabled="active!=1">
+                  <el-select v-model="scope.row.color" size="mini" :disabled="active!=1" allow-create filterable >
                     <el-option v-for="(color,i) in colors" :key="i" :label="color.lable"
                       :value="color.value"></el-option>
                   </el-select>
@@ -588,12 +588,12 @@
             this.$message.error('鏈�夋嫨鍏夌氦甯�')
             return
           }
-          this.selectFibers.forEach(a => {
+          this.selectFibers.forEach((a,index) => {
             a.fiber = []
             for (var i = 0; i < parseInt(a.num); i++) {
               let fiber = {
                 bushColor: a.color,
-                color: colors2[i].label,
+                color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label,
                 model: model,
                 standard: standard,
                 productList: this.HaveJson(this.productList)
@@ -603,12 +603,12 @@
             }
           })
         } else {
-          this.selectBushing.forEach(a => {
+          this.selectBushing.forEach((a,index) => {
             a.fiber = []
             for (var i = 0; i < parseInt(a.testNum); i++) {
               let fiber = {
                 bushColor: a.color,
-                color: colors2[i].label,
+                color: colors2[(i+(parseInt(a.testNum))*index)>colors2.length?0:i+(parseInt(a.testNum))*index].label,
                 model: model,
                 standard: standard,
                 productList: this.HaveJson(this.productList)

--
Gitblit v1.9.3