From f9971e230a549754cc985db1e625336f5fd38ff2 Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期二, 19 九月 2023 11:22:46 +0800
Subject: [PATCH] 	modified:   src/components/view/Processingproducts.vue 	modified:   src/components/view/equipmentmaintain.vue 	modified:   src/components/view/sale.vue 	modified:   src/components/view/standard.vue 	modified:   src/components/view/technology.vue

---
 src/components/view/standard.vue |  153 +++++++++++++++++++++++++++++---------------------
 1 files changed, 89 insertions(+), 64 deletions(-)

diff --git a/src/components/view/standard.vue b/src/components/view/standard.vue
index f3355c9..00b294b 100644
--- a/src/components/view/standard.vue
+++ b/src/components/view/standard.vue
@@ -13,26 +13,32 @@
     </div>
     <div class="thing">
       <div class="left">
-        <el-row :gutter="5" >
-          <el-col :span="21">
-            <el-input v-model="search" suffix-icon="el-icon-search" placeholder="璇疯緭鍏ユ悳绱㈠唴瀹�" size="small" clearable></el-input>
-          </el-col>
-          <el-col :span="2">
-            <el-button size="mini" icon="el-icon-plus" @click="bomLeftAdd=true"></el-button>
-          </el-col>
-        </el-row>
-        <el-row style="margin-top: 16px;">
-          <el-tree :data="list" ref="tree" default-expand-all :props="{ children: 'children', label: 'name' }"
-          node-key="id" :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current>
-          <div class="custom-tree-node" slot-scope="{ node, data }">
-            <span><i :class="`node_i ${data.code != '[5]' ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i>
-              {{ data.code }}{{ data.name }}</span>
-            <el-button type="text" size="mini" @click.stop="remove(node, data)">
-              <i class="el-icon-delete"></i>
-            </el-button>
-          </div>
-        </el-tree>
-        </el-row>
+        <div class="left_search">
+          <el-row :gutter="5">
+            <el-col :span="21">
+              <el-input v-model="search" suffix-icon="el-icon-search" placeholder="璇疯緭鍏ユ悳绱㈠唴瀹�" size="small" clearable></el-input>
+            </el-col>
+            <el-col :span="2">
+              <el-button size="mini" icon="el-icon-plus" @click="bomLeftAdd=true"></el-button>
+            </el-col>
+          </el-row>
+        </div>
+        <div class="left_tree">
+          <el-row>
+            <el-col :span="24">
+              <el-tree :data="list" ref="tree" default-expand-all :props="{ children: 'children', label: 'name' }"
+              node-key="id" :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current>
+              <div class="custom-tree-node" slot-scope="{ node, data }">
+                <span><i :class="`node_i ${data.code != '[5]' ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i>
+                  {{ data.code }}{{ data.name }}</span>
+                <el-button type="text" size="mini" @click.stop="remove(node, data)">
+                  <i class="el-icon-delete"></i>
+                </el-button>
+              </div>
+            </el-tree>
+            </el-col>
+          </el-row>
+        </div>
       </div>
       <div class="right">
         <div class="choose">
@@ -82,25 +88,25 @@
            ref="technologyForm" :rules="technologyRules" label-width="90px">
            <el-row>
             <el-col :span="12">
-              <el-form-item label="宸ュ簭:" prop="tefather">
+              <el-form-item label="宸ュ簭:" prop="tefather"  style="display: flex;">
                 <el-select size="small" 
-                filterable allow-create default-first-option
+                filterable allow-create default-first-option style="width: 100%;"
                 v-model="technologyForm.tefather" placeholder="璇疯緭鍏ユ垨閫夋嫨宸ュ簭">
                   <el-option :value="item.father" :label="item.father" v-for="(item,index) in fatherList" :key="index"></el-option>
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="12">
-              <el-form-item label="宸ヨ壓鍚嶇О:" prop="tename">
-                <el-input size="small" placeholder="璇疯緭鍏ュ伐鑹哄悕绉�" 
+              <el-form-item label="宸ヨ壓鍚嶇О:" prop="tename" style="display: flex;">
+                <el-input  style="width: 100%;" size="small" placeholder="璇疯緭鍏ュ伐鑹哄悕绉�" 
                 clearable v-model="technologyForm.tename"></el-input>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row>
             <el-col :span="12">
-              <el-form-item label="璁惧缁�:" prop="deviceGroup">
-                <el-select placeholder="璇烽�夋嫨璁惧缁�" size="small"
+              <el-form-item label="璁惧缁�:" prop="deviceGroup" style="display: flex;">
+                <el-select placeholder="璇烽�夋嫨璁惧缁�" size="small" style="width: 100%;"
                 v-model="technologyForm.deviceGroup">
                 <el-option :value="item.father" 
                 v-for="(item,index) in deviceList" :key="index" :label="item.father"></el-option>
@@ -108,8 +114,8 @@
               </el-form-item>
             </el-col>
             <el-col :span="12">
-              <el-form-item label="鐢熶骇瀹氶:" prop="productionQuota">
-                <el-input size="small" clearable v-model.number="technologyForm.productionQuota" placeholder="璇疯緭鍏ョ敓浜у畾棰�" />
+              <el-form-item label="鐢熶骇瀹氶:" prop="productionQuota" style="display: flex;">
+                <el-input style="width: 100%;" size="small" clearable v-model.number="technologyForm.productionQuota" placeholder="璇疯緭鍏ョ敓浜у畾棰�" />
               </el-form-item>
             </el-col>
           </el-row>
@@ -254,6 +260,11 @@
                   <template slot-scope="scope">
                       <el-input size="mini" v-model="scope.row.num"
                       placeholder="璇疯緭鍏�"></el-input>
+                  </template>
+                </el-table-column>
+                <el-table-column label="鎿嶄綔" width="60">
+                  <template slot-scope="scope">
+                      <el-button type="text" @click="removeMTableRow(scope.$index)">鍒犻櫎</el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -671,6 +682,10 @@
     getChildData(data){
       this.childIds = data;
     },
+    //鐗╂枡娓呭崟-鏂板bom-琛ㄦ牸鍒犻櫎琛�
+    removeMTableRow(index){
+      this.materialForm.tableList.splice(index,1);
+    },
     //鍒犻櫎鎸夐挳
     deleteDataBtn(){
       let ids;
@@ -724,10 +739,8 @@
           }).then(res=>{
             this.selectVersion();
             this.$message.success(res.message);
-          }).catch(error=>{
-            this.$message.error(error.message);
           })
-        }).catch(() => {});
+        })
     },
     //鍙充晶bom,纭鏂板
     confirmAdd(formName){
@@ -742,7 +755,7 @@
                 deviceGroup: this.technologyForm.deviceGroup,
                 father: this.technologyForm.tefather,
                 name: this.technologyForm.tename,
-                productionQuota: Number.parseInt(this.technologyForm.productionQuota),
+                productionQuota: this.technologyForm.productionQuota,
               }
               this.submitBomAdd(this.$api.url.addTechnology,obj);
           }else if(type == 1){
@@ -785,7 +798,6 @@
         this.selectAll();
         this.$message.success(res.message);
       }).catch(error=>{
-        this.$message.error(error.message);
       })
     },
     //娓呯┖鏂板bom琛ㄥ崟
@@ -970,34 +982,34 @@
     },
     handleSelect(item) {
         console.log(item);
-      },
-      querySearch(queryString, cb) {
-        var restaurants = this.restaurants;
-        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
-        // 璋冪敤 callback 杩斿洖寤鸿鍒楄〃鐨勬暟鎹�
-        cb(results);
-      },
-      querySearchName(queryString, cb) {
-        var restaurants = this.bomName;
-        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
-        // 璋冪敤 callback 杩斿洖寤鸿鍒楄〃鐨勬暟鎹�
-        cb(results);
-      },
-      querySearchStandar(queryString, cb) {
-        var restaurants = this.bomStandard;
-        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
-        // 璋冪敤 callback 杩斿洖寤鸿鍒楄〃鐨勬暟鎹�
-        cb(results);
-      },
-      loadFatherType(){
-        return [{label:"姗¤兌杩炴帴鍣�",value: "姗¤兌杩炴帴鍣�"},{label:"閲戝睘杩炴帴鍣�",value: "閲戝睘杩炴帴鍣�"},
-        {label:"婀挎彃鎷旂數杩炴帴鍣�",value: "婀挎彃鎷旂數杩炴帴鍣�"},{label:"鍒嗘敮缁勪欢",value: "鍒嗘敮缁勪欢"}]
-      },
-      createFilter(queryString) {
-        return (restaurant) => {
-          return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
-        };
-      },
+    },
+    querySearch(queryString, cb) {
+      var restaurants = this.restaurants;
+      var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
+      // 璋冪敤 callback 杩斿洖寤鸿鍒楄〃鐨勬暟鎹�
+      cb(results);
+    },
+    querySearchName(queryString, cb) {
+      var restaurants = this.bomName;
+      var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
+      // 璋冪敤 callback 杩斿洖寤鸿鍒楄〃鐨勬暟鎹�
+      cb(results);
+    },
+    querySearchStandar(queryString, cb) {
+      var restaurants = this.bomStandard;
+      var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
+      // 璋冪敤 callback 杩斿洖寤鸿鍒楄〃鐨勬暟鎹�
+      cb(results);
+    },
+    loadFatherType(){
+      return [{label:"姗¤兌杩炴帴鍣�",value: "姗¤兌杩炴帴鍣�"},{label:"閲戝睘杩炴帴鍣�",value: "閲戝睘杩炴帴鍣�"},
+      {label:"婀挎彃鎷旂數杩炴帴鍣�",value: "婀挎彃鎷旂數杩炴帴鍣�"},{label:"鍒嗘敮缁勪欢",value: "鍒嗘敮缁勪欢"}]
+    },
+    createFilter(queryString) {
+      return (restaurant) => {
+        return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
+      };
+    },
     selectDataList() {
 				this.list.forEach(a => {
 					a.code = '[1]'
@@ -1022,7 +1034,7 @@
 						})
 					}
 				})
-			},
+		},
     handleSelectionChange() {
 
     },
@@ -1055,8 +1067,8 @@
             this.versionVal = res.data[0];
           })
         }
+        this.selectAll()
       })
-      this.selectAll()
     },
     //鍙充晶鏁版嵁
     selectAll() {
@@ -1300,16 +1312,29 @@
   height: calc(100% - 48px);
   background-color: #fff;
   display: flex;
+  
 }
 
 .thing .left {
   width: 295px;
   height: calc(100% - 32px);
-  overflow-y: auto;
   border-right: 3px solid rgb(245, 247, 251);
   padding: 16px;
 }
 
+.thing .left .left_search{
+  width:95%;
+  height: 32px;
+  line-height: 32px;
+  margin-bottom: 5px;
+}
+
+.thing .left .left_tree{
+  width: 100%;
+  height: calc(100% - 32px);
+  overflow-y: scroll;
+}
+
 .thing .left .custom-tree-node span {
   font-size: 14px;
 }

--
Gitblit v1.9.3