From c880739ec4cd5ede33b31eb98ad5f7628ea288e5 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期一, 11 十二月 2023 17:41:40 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/plan/manufacturingorder/productorder-form.vue |  155 +++++++++++++++++++++++----------------------------
 1 files changed, 70 insertions(+), 85 deletions(-)

diff --git a/src/views/plan/manufacturingorder/productorder-form.vue b/src/views/plan/manufacturingorder/productorder-form.vue
index 039af71..affcd01 100644
--- a/src/views/plan/manufacturingorder/productorder-form.vue
+++ b/src/views/plan/manufacturingorder/productorder-form.vue
@@ -8,7 +8,7 @@
       </div>
       <div class="btn-group header-right" v-if="editable">
         <el-button :disabled="isSubmit" v-thinclick="`dataFormSubmit`"
-          >淇濆瓨</el-button
+          type="primary">淇濆瓨</el-button
         >
       </div>
     </div>
@@ -89,6 +89,7 @@
             <el-col :span="3">
               <el-form-item label="瀹屾垚鏁伴噺" prop="qtyFinished">
                 <el-input-number
+                  style= "width: 90%"
                   v-model="dataForm.qtyFinished"
                   placeholder=""
                   :controls="false"
@@ -107,7 +108,7 @@
                 </el-date-picker>
               </el-form-item>
             </el-col>
-            <el-col :span="6">
+            <!-- <el-col :span="6">
               <el-form-item label="澶栨姢棰滆壊" prop="outerColor">
                 <el-input
                   readonly
@@ -124,11 +125,8 @@
                   placeholder=""
                 ></el-input>
               </el-form-item>
-            </el-col>
-          </el-row>
-
-          <el-row :gutter="10">
-            <el-col :span="6">
+            </el-col> -->
+             <el-col :span="6">
               <el-form-item label="澶囨敞" prop="remark">
                 <el-input v-model="dataForm.remark" placeholder=""></el-input>
               </el-form-item>
@@ -151,44 +149,43 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="8">
-              <el-col
-                :span="8"
-                v-if="permissions.plan_manufacturingorder_bom_sure"
-              >
-                <el-form-item label="BOM纭">
-                  <el-switch v-model="dataForm.bomConfirmStatus"> </el-switch>
-                </el-form-item>
-              </el-col>
-              <el-col
-                :span="8"
-                v-if="permissions.plan_manufacturingorder_process_sure"
-              >
-                <el-form-item label="宸ヨ壓纭">
-                  <el-switch v-model="dataForm.processConfirmStatus">
-                  </el-switch>
-                </el-form-item>
-              </el-col>
-              <el-col
-                :span="8"
-                v-if="permissions.plan_manufacturingorder_test_sure"
-              >
-                <el-form-item label="妫�娴嬫爣鍑嗙‘璁�">
-                  <el-switch v-model="dataForm.standardConfirmStatus">
-                  </el-switch>
-                </el-form-item>
-              </el-col>
+          </el-row>
+            <!-- <el-col
+              :span="2"
+              v-if="permissions.plan_manufacturingorder_bom_sure"
+            >
+              <el-form-item label="BOM纭" label-width="110px">
+                <el-switch v-model="dataForm.bomConfirmStatus"> </el-switch>
+              </el-form-item>
             </el-col>
-            <el-col :span="4">
+            <el-col
+              :span="2"
+              v-if="permissions.plan_manufacturingorder_process_sure"
+            >
+              <el-form-item label="宸ヨ壓纭" label-width="110px">
+                <el-switch v-model="dataForm.processConfirmStatus">
+                </el-switch>
+              </el-form-item>
+            </el-col>
+            <el-col
+              :span="2"
+              v-if="permissions.plan_manufacturingorder_test_sure"
+            >
+              <el-form-item label="妫�娴嬫爣鍑嗙‘璁�" label-width="140px">
+                <el-switch v-model="dataForm.standardConfirmStatus">
+                </el-switch>
+              </el-form-item>
+            </el-col> -->
+            <!-- <el-col :span="2">
               <el-form-item
                 label="IFS杞﹂棿璁㈠崟鎺ユ敹鏃舵姤鍛婂伐搴�"
                 prop="isReportOperation"
-                label-width="200px"
+                label-width="250px"
               >
                 <el-switch v-model="dataForm.isReportOperation" disabled>
                 </el-switch>
               </el-form-item>
-            </el-col>
+            </el-col> -->
             <!-- <el-col :span="2">
               <el-form-item label="BOM纭">
                 <el-switch >
@@ -207,7 +204,7 @@
                 </el-switch>
               </el-form-item>
             </el-col> -->
-          </el-row>
+         
         </div>
         <div class="productorder-detail">
           <el-card class="productorder-list">
@@ -229,15 +226,7 @@
                             <el-option
                               v-for="item in dataForm.routingList"
                               :key="item.id"
-                              :label="
-                                item.routingNo +
-                                  '-' +
-                                  item.bomTypeDb +
-                                  '-' +
-                                  item.alternativeNo +
-                                  '-' +
-                                  item.alternativeDesc
-                              "
+                              :label="item.routingNo "
                               :value="item.id"
                             >
                             </el-option>
@@ -595,8 +584,19 @@
 
               <el-tab-pane label="浜у搧缁撴瀯" id="ta1" key="ta1" name="ta1">
                 <el-row>
-                  <el-col :span="11">
-                    <el-form-item label="瀹屾暣BOM">
+                  <el-col :span="2" style="text-align: center">
+                    <el-button
+                      type="text"
+                      size="small"
+                      icon="el-icon-circle-plus-outline"
+                      style="color:#f56c6c;"
+                      :disabled="!dataForm.id"
+                      @click="addStruct()"
+                      >娣诲姞鍏冪礌
+                    </el-button>
+                  </el-col>
+                  <el-col :offset="11" :span="11">
+                    <!-- <el-form-item label="瀹屾暣BOM">
                       <el-select
                         @change="bomSelectChanged"
                         disabled
@@ -622,35 +622,18 @@
                         >
                         </el-option>
                       </el-select>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :offset="11" :span="2" style="text-align: center">
-                    <el-button
-                      type="text"
-                      size="small"
-                      icon="el-icon-circle-plus-outline"
-                      style="color:#f56c6c;"
-                      :disabled="!dataForm.id"
-                      @click="addStruct()"
-                      >娣诲姞鍏冪礌
-                    </el-button>
+                    </el-form-item> -->
                   </el-col>
                 </el-row>
                 <el-row>
                   <el-table
-                    default-expand-all
-                    :data="components"
+                    :data="components[0]"
                     @selection-change="structSelectionChange"
-                    row-key="id"
                     border
-                    :tree-props="{
-                      children: 'children'
-                    }"
                     style="width: 100%"
                     height="400px"
-                    :default-sort="{ prop: 'index' }"
                   >
-                    <el-table-column type="selection" width="40" fixed="left" />
+                    <!-- <el-table-column type="selection" width="40" fixed="left" /> -->
                     <el-table-column
                       type="index"
                       width="50"
@@ -668,7 +651,7 @@
                     />
                     <el-table-column
                       prop="partName"
-                      width=""
+                      width="200"
                       header-align="center"
                       align="left"
                       label="闆朵欢"
@@ -1071,6 +1054,7 @@
 
   data() {
     return {
+      componentsTable:[],
       typeOptions: [],
       paramTemplateSelArr: [],
       paramTemplateSelCol: 'operationTemplateNo',
@@ -1245,7 +1229,8 @@
         }
       }
     },
-
+    components(newVal,oldVal){
+    },
     currentRouting(newValue, oldValue) {
       if (newValue && newValue.id) {
         if (this.dataForm.id != null && this.dataForm.id !== 0) {
@@ -1295,7 +1280,7 @@
       if (newValue && newValue.id) {
         // 鏌ヨ浜у搧缁撴瀯瀵瑰簲鐨勭粍浠�
         getBom(newValue.id).then((response) => {
-          this.components = [response.data.data.tree]
+          // this.components = [response.data.data.tree]
         })
       }
     },
@@ -1397,6 +1382,7 @@
     },
     // 鏌ヨ褰撳墠杞﹂棿璁㈠崟淇℃伅
     getOrderInfo() {
+      let that=this
       getManufacturingOrder(this.dataForm.id).then((response) => {
         this.dataForm = response.data.data
         // 鎶婂伐鑹烘寕涓婂幓
@@ -1416,7 +1402,7 @@
         }
         // 鎶婁骇鍝佺粨鏋勭粍浠舵寕涓婂幓
         if (this.dataForm.bomRoot) {
-          this.components = [this.dataForm.bomRoot]
+          that.components = [this.dataForm.bomRoot]
         }
       })
     },
@@ -2097,7 +2083,6 @@
     },
     // 鏂板宸ュ簭
     addOperation(operation) {
-      console.log('operation', operation)
     },
     insertOperation(operation) {},
     structSelectionChange(val) {
@@ -2105,17 +2090,17 @@
     },
     // 鎵撳紑bom鑺傜偣
     addStruct() {
-      if (this.structSelection.length <= 0) {
-        this.$message.error('璇烽�夋嫨闇�瑕佹坊鍔犲厓绱犵殑鑺傜偣')
-      } else {
-        if (this.structSelection.length === 1) {
-          this.selectedStruct = this.structSelection[0]
-          this.moId = this.dataForm.id
-          this.showStructForm = true
-        } else {
-          this.$message.error('鍙兘涓哄崟涓妭鐐规坊鍔犲厓绱�')
-        }
-      }
+      this.selectedStruct = this.structSelection[0]
+      this.moId = this.dataForm.id
+      this.showStructForm = true
+      // if (this.structSelection.length <= 0) {
+      //   this.$message.error('璇烽�夋嫨闇�瑕佹坊鍔犲厓绱犵殑鑺傜偣')
+      // } else {
+      //   if (this.structSelection.length === 1) {
+      //   } else {
+      //     this.$message.error('鍙兘涓哄崟涓妭鐐规坊鍔犲厓绱�')
+      //   }
+      // }
     },
     refreshBom(node) {
       if (this.selectedStruct.children != null) {

--
Gitblit v1.9.3