From 798ff0bede63be7b7645d92acec5b449a0376c73 Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期二, 20 一月 2026 11:10:00 +0800
Subject: [PATCH] 1.递交

---
 src/views/workOrder/workOrderList.vue |  523 ++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 437 insertions(+), 86 deletions(-)

diff --git a/src/views/workOrder/workOrderList.vue b/src/views/workOrder/workOrderList.vue
index f9ed3a2..f3bd61b 100644
--- a/src/views/workOrder/workOrderList.vue
+++ b/src/views/workOrder/workOrderList.vue
@@ -505,6 +505,7 @@
 
       <div class="elTableDiv">
         <el-table
+          ref="tableDataRef2"
           :data="tableDataDetail"
           border
           height="210px"
@@ -513,18 +514,18 @@
           :header-cell-style="this.$headerCellStyle"
           :cell-style="this.$cellStyle"
         >
-          <!--          <el-table-column-->
-          <!--            width="50"-->
-          <!--            type="index"-->
-          <!--            prop="搴忓彿"-->
-          <!--            fixed-->
-          <!--          />   -->
           <el-table-column
             width="50"
-            prop="seq"
-            label="搴忓彿"
+            type="index"
+            prop="搴忓彿"
             fixed
           />
+          <!--          <el-table-column-->
+          <!--            width="50"-->
+          <!--            prop="seq"-->
+          <!--            label="搴忓彿"-->
+          <!--            fixed-->
+          <!--          />-->
           <el-table-column
             prop="wo_code"
             show-tooltip-when-overflow
@@ -612,24 +613,6 @@
                     @click="pre(row,2)"
                   />
                 </el-tooltip>
-                <!--                          <el-tooltip class="item" effect="dark" content="鎵撳嵃宸ュ簭" placement="top">-->
-                <!--                            <i-->
-                <!--                              v-if="tableDataDetail.length!==row.seq"-->
-                <!--                              class="el-icon-printer"-->
-                <!--                              :style="{color:$store.state.settings.theme}"-->
-                <!--                              style="cursor: pointer;margin-right: 15px"-->
-                <!--                              @click="supplementSmallClick(row)"-->
-                <!--                            />-->
-                <!--                          </el-tooltip>-->
-                <!--                          <el-tooltip class="item" effect="dark" content="琛ユ墦鐢熶骇鍏ュ簱鏉$爜" placement="top">-->
-                <!--                            <i-->
-                <!--                              v-if="tableDataDetail.length===row.seq"-->
-                <!--                              class="  el-icon-camera"-->
-                <!--                              :style="{color:$store.state.settings.theme}"-->
-                <!--                              style="cursor: pointer;margin-right: 15px"-->
-                <!--                              @click="getProductInHouseLabCode(row.wo_code)"-->
-                <!--                            />-->
-                <!--                          </el-tooltip>-->
               </div>
             </template>
           </el-table-column>
@@ -758,22 +741,32 @@
           label="浜у搧鍚嶇О/缂栫爜"
           prop="partcode"
         >
-          <el-select
-            v-model="dialogForm.partcode"
-            filterable
-            :disabled="operation!=='add'"
-            :popper-append-to-body="false"
+          <el-button
+            v-waves
+            type="primary"
             style="width: 200px"
-            placeholder="璇烽�夋嫨"
-            @change="partcodeChangeDialog"
-          >
-            <el-option
-              v-for="item in partArr"
-              :key="item.partcode"
-              :label="item.partname+'/'+item.partcode"
-              :value="item.partcode"
-            />
-          </el-select>
+            icon="el-icon-circle-plus-outline"
+            @click="selectSuitpart"
+          >閫夋嫨鐗╂枡</el-button>
+          <div v-if="dialogForm.partcode.toString().trim().length>0">
+            宸查�夋嫨{{ dialogForm.partcode }} {{ dialogForm.partname }}
+          </div>
+          <!--          <el-select-->
+          <!--            v-model="dialogForm.partcode"-->
+          <!--            filterable-->
+          <!--            :disabled="operation!=='add'"-->
+          <!--            :popper-append-to-body="false"-->
+          <!--            style="width: 200px"-->
+          <!--            placeholder="璇烽�夋嫨"-->
+          <!--            @change="partcodeChangeDialog"-->
+          <!--          >-->
+          <!--            <el-option-->
+          <!--              v-for="item in partArr"-->
+          <!--              :key="item.partcode"-->
+          <!--              :label="item.partname+'/'+item.partcode"-->
+          <!--              :value="item.partcode"-->
+          <!--            />-->
+          <!--          </el-select>-->
         </el-form-item>
         <!--        <el-form-item v-if="operation!=='add'" label="浜у搧鍚嶇О" prop="partname">-->
         <!--          <el-input v-model="dialogForm.partname" disabled style="width: 200px" />-->
@@ -856,6 +849,7 @@
             class="stepSelectedValueClass"
             style="width: 930px;"
             multiple
+            filterable
             placeholder="璇烽�夋嫨鐩稿搴斿伐搴�"
             @change="stepSelectedValueChange"
           >
@@ -1541,6 +1535,7 @@
             </div>
             <div
               id="qrCode0"
+              :key="formApprove.mesordercode"
               style="width: 22%;height:90px;
                         margin-top: 20px;
                         overflow-y: scroll;display: flex;
@@ -1571,22 +1566,29 @@
               width="70"
               align="center"
             />
+            <!--            <el-table-column-->
+            <!--              id="column1"-->
+            <!--              prop="stepqrcode"-->
+            <!--              label="宸ュ簭浜岀淮鐮�"-->
+            <!--              width="100"-->
+            <!--              align="center"-->
+            <!--            >-->
+            <!--              <template slot-scope="{row}">-->
+
+            <!--                <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" :key="'qrCodeDiv'+row.seq" class="tableColumn" />-->
+            <!--              </template>-->
+            <!--            </el-table-column>-->
             <el-table-column
               id="column1"
-              prop="stepqrcode"
-              label="宸ュ簭浜岀淮鐮�"
+              prop="stepcode"
+              label="宸ュ簭缂栫爜"
               width="100"
               align="center"
-            >
-              <template slot-scope="{row}">
-
-                <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" :key="'qrCodeDiv'+row.seq" class="tableColumn" />
-              </template>
-            </el-table-column>
+            />
             <el-table-column
               id="column2"
               prop="stepname"
-              label="宸ュ簭"
+              label="宸ュ簭鍚嶇О"
               width="120"
               align="center"
             />
@@ -1670,6 +1672,7 @@
             </div>
             <div
               id="qrCode1"
+              :key="formApprove.mesordercode"
               style="width: 22%;height:90px;
                         margin-top: 20px;
                         overflow-y: scroll;display: flex;
@@ -1700,18 +1703,25 @@
               width="70"
               align="center"
             />
+            <!--            <el-table-column-->
+            <!--              id="column1"-->
+            <!--              prop="stepqrcode"-->
+            <!--              label="宸ュ簭浜岀淮鐮�"-->
+            <!--              width="100"-->
+            <!--              align="center"-->
+            <!--            >-->
+            <!--              <template slot-scope="{row}">-->
+
+            <!--                <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" :key="'qrCodeDiv'+row.seq" class="tableColumn" />-->
+            <!--              </template>-->
+            <!--            </el-table-column>-->
             <el-table-column
               id="column1"
-              prop="stepqrcode"
-              label="宸ュ簭浜岀淮鐮�"
+              prop="stepcode"
+              label="宸ュ簭缂栫爜"
               width="100"
               align="center"
-            >
-              <template slot-scope="{row}">
-
-                <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" :key="'qrCodeDiv'+row.seq" class="tableColumn" />
-              </template>
-            </el-table-column>
+            />
             <el-table-column
               id="column2"
               prop="stepname"
@@ -2493,7 +2503,7 @@
             label="浜у搧鍚嶇О"
             prop="partcode"
           >
-            <div style="width: 200px;">{{ partArr.find(item => item.partcode === i.partcode).partname }}</div>
+            <div style="width: 200px;">{{ suitobjectTableData.find(item => item.partcode === i.partcode).partname }}</div>
           </el-form-item>
           <el-form-item
             label="浜у搧缂栫爜"
@@ -2504,7 +2514,7 @@
 
           <el-form-item label="浜у搧瑙勬牸" prop="partspec">
             <div style="width: 200px;">{{
-              partArr.find(item => item.partcode === i.partcode).partspec ? partArr.find(item => item.partcode === i.partcode).partspec : '/'
+              suitobjectTableData.find(item => item.partcode === i.partcode).partspec ? suitobjectTableData.find(item => item.partcode === i.partcode).partspec : '/'
             }}
             </div>
           </el-form-item>
@@ -2560,6 +2570,7 @@
               class="stepSelectedValueClass"
               style="width: 930px;"
               multiple
+              filterable
               placeholder="璇烽�夋嫨鐩稿搴斿伐搴�"
               @change="val=>stepSelectedValueChangeBatchUpdate(val,index)"
             >
@@ -2679,6 +2690,183 @@
       </span>
     </el-dialog>
 
+    <!--閫夋嫨鐗╂枡-->
+    <el-dialog
+      v-el-drag-dialog
+      :title="dialogForm.suitobject==='P'?'閫夋嫨鐗╂枡':'閫夋嫨鐗╂枡绫诲埆'"
+      :visible.sync="dialogVisibleSuitobject"
+      width="1460px"
+      :close-on-click-modal="false"
+      top="5vh"
+      @closed="handleCloseSuitobject"
+      @close="handleCloseSuitobject"
+    >
+
+      <div style="display: flex">
+        <div style="width: 300px;margin-right: 20px;background:#fff">
+
+          <div style="margin: 20px 10px 0 10px;display: flex;justify-content: space-between;">
+            <div style="display: flex;">
+              <div
+                style="width: 5px;height: 100%;border-radius: 5px;"
+                :style="{background:$store.state.settings.theme}"
+              />
+              <div style="margin-left: 8px;">瀛樿揣妗f</div>
+            </div>
+          </div>
+
+          <el-tree
+            ref="treeLeftRef"
+            style="padding: 10px;overflow: auto;height: 600px;"
+            :data="treeLeft"
+            node-key="code"
+            highlight-current
+            :props="defaultPropsLeft"
+            :default-expand-all="true"
+            :expand-on-click-node="false"
+            @node-click="getTMaterielData"
+          />
+        </div>
+        <div
+          style=" width:calc(100% - 300px);"
+        >
+          <div class="bodyTopFormGroup">
+            <el-form
+              ref="suitobjectForm"
+              :model="suitobjectForm"
+              label-width="80px"
+              inline
+              style="display: flex;"
+            >
+              <div class="elForm">
+                <el-form-item label="瀛樿揣缂栫爜" style=" display: flex;">
+                  <el-input
+                    v-model="suitobjectForm.partcode"
+                    placeholder="璇疯緭鍏�"
+                    :style="{minWidth:'100px',width:150+'px'}"
+                  />
+                </el-form-item>
+                <el-form-item label="瀛樿揣鍚嶇О" style=" display: flex;">
+                  <el-input
+                    v-model="suitobjectForm.partname"
+                    placeholder="璇疯緭鍏�"
+                    :style="{minWidth:'100px',width:150+'px'}"
+                  />
+                </el-form-item>
+                <el-form-item label="瀛樿揣瑙勬牸" style=" display: flex;">
+                  <el-input
+                    v-model="suitobjectForm.partspec"
+                    placeholder="璇疯緭鍏�"
+                    :style="{minWidth:'100px',width:150+'px'}"
+                  />
+                </el-form-item>
+
+              </div>
+              <div class="bodySearchReset">
+                <el-button
+                  v-waves
+                  type="primary"
+                  icon="el-icon-search"
+                  @click="getTMaterielData($refs.treeLeftRef.getCurrentNode())"
+                >鏌ヨ
+                </el-button>
+                <el-button
+                  v-waves
+                  type="info"
+                  icon="el-icon-refresh"
+                  @click="resetSuitobject"
+                >閲嶇疆
+                </el-button>
+              </div>
+            </el-form>
+          </div>
+
+          <div class="elTableDiv">
+            <el-table
+              ref="tableDataRef3"
+              class="tableFixed"
+              :data="suitobjectTableData"
+              height="520"
+              border
+              row-class-name="custom-row"
+              highlight-current-row
+              :header-cell-style="this.$headerCellStyle"
+              :cell-style="this.$cellStyle"
+              row-key="partcode"
+              @row-click="rowClick2"
+            >
+
+              <el-table-column
+                width="50"
+                fixed
+              >
+                <template slot-scope="{row}">
+                  <el-radio
+                    v-model="dialogForm.partcode"
+                    :label="row.partcode"
+                    style="color: transparent;padding-left: 10px;"
+                  />
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="rowNum"
+                width="70"
+                fixed
+                label="搴忓彿"
+              />
+              <el-table-column
+                prop="partcode"
+                label="瀛樿揣缂栫爜"
+              />
+              <el-table-column
+                prop="partname"
+                label="瀛樿揣鍚嶇О"
+                show-tooltip-when-overflow
+                min-width="200"
+              />
+              <el-table-column
+                prop="partspec"
+                label="瑙勬牸鍨嬪彿"
+              >
+                <template slot-scope="{row}">
+                  {{ row.partspec ? row.partspec : '/' }}
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="idinventoryclassname"
+                label="鎵�灞炵被鍒�"
+              />
+            </el-table>
+          </div>
+
+          <!--鍒嗛〉-->
+          <pagination
+            :total="suitobjectTotal"
+            :page.sync="suitobjectForm.page"
+            :limit.sync="suitobjectForm.rows"
+            align="right"
+            layout="total,prev, pager, next,sizes,jumper"
+            popper-class="select_bottom"
+            @pagination="getTMaterielData($refs.treeLeftRef.getCurrentNode())"
+          />
+
+        </div>
+      </div>
+
+      <span slot="footer" class="dialog-footer">
+        <div class="footerButton">
+          <el-button v-waves @click="dialogVisibleCancelSuitobject">杩� 鍥�</el-button>
+          <el-button
+            v-waves
+            :loading="$store.state.app.buttonIsDisabled"
+            :disabled="$store.state.app.buttonIsDisabled"
+            type="primary"
+            @click="dialogVisibleConfirmSuitobject"
+          >纭� 璁�</el-button>
+        </div>
+      </span>
+    </el-dialog>
+
   </div>
 </template>
 
@@ -2697,7 +2885,7 @@
   MesOrderSearch, MesOrderSopSearch, UpdateMesOrderStepListSearch,
   UpdateMesOrderStepSearch
 } from '@/api/WorkOrder'
-import { PartSelect } from '@/api/ProductModel'
+import { PartSelect, TMaterielClassTree, TMaterielData } from '@/api/ProductModel'
 import { PrentOrganization, PrentOrganizationNoCompany, StepData } from '@/api/GeneralBasicData'
 import Sortable from 'sortablejs'
 import ElDragSelect from '@/components/DragSelect'
@@ -2705,6 +2893,7 @@
 import DateType from '@/components/DateType'
 import { PartSelectRpute, PartSelectRputeList, RouteSelectStep, RouteSelectStepList } from '@/api/basicSettings'
 import { DeviceSopSearch } from '@/api/DeviceManager'
+import arrayToTree from 'array-to-tree'
 
 export default {
   name: 'WorkOrderList',
@@ -2994,7 +3183,34 @@
       partCode: '',
 
       dialogVisibleBatchUpdate: false, // 鎵归噺淇敼
-      formData3: []
+      formData3: [],
+
+      dialogVisibleSuitobject: false,
+      treeLeft: [
+        {
+          code: '-1',
+          name: '鍏ㄩ儴'
+        }
+      ], // 宸︿晶鏍�
+      treeLeftArr: [],
+      defaultPropsLeft: {
+        children: 'children',
+        label: 'name'
+      },
+
+      suitobjectTableData: [],
+      suitobjectForm: {
+        inventoryclasscode: '',
+        partcode: '',
+        partname: '',
+        partspec: '',
+        page: 1,
+        rows: 20,
+        prop: 'lm_date', // 鎺掑簭瀛楁
+        order: 'desc' // 鎺掑簭瀛楁
+      },
+      suitobjectTotal: 0
+
     }
   },
   watch: {
@@ -3004,7 +3220,9 @@
         // do something with the new and old value of stepSelectedValue
         console.log(val, 1)
         console.log(this.stepTableData, 3)
+
         const arr = JSON.parse(JSON.stringify(this.stepTableData))
+        console.log(arr, 33, this.dialogForm.mesqty)
         const arrStepcode = arr.map(i => i.stepcode)
         this.stepTableData = []
         val.forEach(i => {
@@ -3040,6 +3258,96 @@
     // })
   },
   methods: {
+    selectSuitpart() {
+      this.dialogVisibleSuitobject = true
+      this.$nextTick(() => {
+        this.$refs.treeLeftRef.setCurrentKey('-1')
+        this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode())
+      })
+    },
+    handleCloseSuitobject() {
+      this.suitobjectForm = {
+        inventoryclasscode: '',
+        partcode: '',
+        partname: '',
+        partspec: '',
+        page: 1,
+        rows: 20,
+        prop: 'lm_date', // 鎺掑簭瀛楁
+        order: 'desc' // 鎺掑簭瀛楁
+      }
+    },
+    dialogVisibleCancelSuitobject() {
+      this.dialogVisibleSuitobject = false
+    },
+
+    dialogVisibleConfirmSuitobject() {
+      this.dialogForm.routecode = ''
+
+      if (this.mesSetting.route) {
+        this.getPartcodeChangeDialog()
+      } else {
+        this.getBasicProcessData()
+      }
+
+      this.dialogVisibleSuitobject = false
+    },
+
+    rowClick2(row, event, column) {
+      this.dialogForm.partcode = row.partcode
+      this.dialogForm.partname = this.suitobjectTableData.find(i => i.partcode === row.partcode).partname
+      this.dialogForm.partspec = this.suitobjectTableData.find(i => i.partcode === row.partcode).partspec
+    },
+
+    resetSuitobject() {
+      this.suitobjectForm.inventoryclasscode = ''
+      this.suitobjectForm.partcode = ''
+      this.suitobjectForm.partname = ''
+      this.suitobjectForm.partspec = ''
+      this.$refs.treeLeftRef.setCurrentKey('-1')
+      this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode())
+    },
+    async getTMaterielClassTree() {
+      const res = await TMaterielClassTree()
+      res.data.forEach(i => {
+        i.idparent = i.idparent ? i.idparent : '-1'
+      })
+      this.treeLeftArr = res.data
+      this.treeLeftArr.forEach(e => {
+        e.name = e.code + ' ' + e.name
+      })
+      this.treeLeft = arrayToTree(this.treeLeft.concat(res.data), {
+        parentProperty: 'idparent',
+        customID: 'code',
+        childrenProperty: 'children'
+      })
+    },
+    async getTMaterielData(node) {
+      const result = this.getChildrenCodeMethod(node, [])
+      if (result.includes('-1')) {
+        result.shift()
+      }
+      this.suitobjectForm.inventoryclasscode = result.join(',')
+      const res = await TMaterielData(this.suitobjectForm)
+
+      this.suitobjectTableData = res.data
+      this.suitobjectTotal = res.count
+
+      this.$nextTick(() => {
+        this.$refs.tableDataRef3.doLayout()
+      })
+    },
+    // 閫掑綊鍙栧瓙闆嗙殑鎵�鏈塩ode
+    getChildrenCodeMethod(node, result) {
+      result.push(node.code)
+      if (node.children && node.children.length > 0) {
+        node.children.forEach(i => {
+          this.getChildrenCodeMethod(i, result)
+        })
+      }
+      return result
+    },
+
     mesqtyInputChange(val) {
       if (this.stepTableData && this.stepTableData.length > 0) {
         this.stepTableData.forEach(i => {
@@ -3119,7 +3427,8 @@
         if (i.stepdata.length > 0) {
           i.stepdata.forEach(j => {
             j.ratio = parseFloat(j.ratio) > 0 ? parseFloat(j.ratio) : 0
-            j.sumqty = Math.round(parseFloat(i.canupdate_qty) * (1 + (parseFloat(j.ratio) > 0 ? parseFloat(j.ratio) / 100 : 0)))
+            // j.sumqty = Math.round(parseFloat(i.canupdate_qty) * (1 + (parseFloat(j.ratio) > 0 ? parseFloat(j.ratio) / 100 : 0)))
+            j.sumqty = Math.round(parseFloat(this.formData3[index].mesqty) * (1 + (parseFloat(j.ratio) > 0 ? parseFloat(j.ratio) / 100 : 0)))
           })
           this.formData3[index].stepTableData = i.stepdata
           this.formData3[index].stepSelectedValue = i.stepdata.map(j => j.stepcode)
@@ -3178,6 +3487,7 @@
       const flag2 = []
       const data = []
       this.formData3.forEach((i, index) => {
+        const islastreport = this.wkshopcodeArr.find(j => j.torg_code === i.wkshopcode).islastreport
         const workListSub = []
         if (i.stepTableData.length > 0) {
           i.stepTableData.forEach((it, j) => {
@@ -3189,10 +3499,12 @@
                 isbott: j === 0 ? 'Y' : 'N',
                 isend: j === i.stepTableData.length - 1 ? 'Y' : 'N',
                 ratio: it.ratio,
-                sumqty: it.sumqty
+                sumqty: it.sumqty,
+                isShow: islastreport === 'N' ? 'Y' : (j === i.stepTableData.length - 1 ? 'Y' : 'N')
               }
             )
           })
+          console.log(JSON.parse(JSON.stringify(workListSub)))
 
           if (this.mesSetting.isOrder) {
             const f = workListSub.every((item, index, array) => {
@@ -3449,6 +3761,7 @@
         if (res.code === '200') {
           this.getSelect()
           this.getPrentOrganizationNoCompany()
+          this.getTMaterielClassTree()
         }
       })
     },
@@ -3490,8 +3803,8 @@
     },
     async getSelect() {
       // 鑾峰彇浜у搧淇℃伅
-      const { data: res1 } = await PartSelect()
-      this.partArr = res1
+      // const { data: res1 } = await PartSelect()
+      // this.partArr = res1
 
       // 鑾峰彇缁勭粐
       const { data: res2 } = await PrentOrganization()
@@ -3684,6 +3997,9 @@
       this.dialogForm.mesmaxqty = res.canupdate_qty
       if (this.mesSetting.route) { // 鎸夊伐鑹鸿矾绾胯蛋妯″紡
         if (!this.dialogForm.routecode) {
+          return this.$message.error('璇峰厛灏嗕骇鍝佺粦瀹氬伐鑹鸿矾绾�!')
+        }
+        if (!this.dialogForm.routecode) {
           await this.getPartcodeChangeDialog()
         } else {
           const { data: res } = await PartSelectRpute({ partcode: this.dialogForm.partcode })
@@ -3700,7 +4016,8 @@
                 stepname: i.stepname,
                 stepprice: i.stepprice,
                 ratio: parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) : 0,
-                sumqty: Math.round(parseFloat(res.canupdate_qty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0)))
+                // sumqty: Math.round(parseFloat(res.canupdate_qty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0)))
+                sumqty: Math.round(parseFloat(this.dialogForm.mesqty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0)))
               }
             )
           })
@@ -3734,7 +4051,8 @@
                 stepname: i.stepname,
                 stepprice: i.stepprice,
                 ratio: parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) : 0,
-                sumqty: Math.round(parseFloat(res.canupdate_qty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0)))
+                // sumqty: Math.round(parseFloat(res.canupdate_qty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0)))
+                sumqty: Math.round(parseFloat(this.dialogForm.mesqty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0)))
               }
             )
           })
@@ -3795,7 +4113,7 @@
       this.routecodeArr = res
 
       // if (this.mesSetting.route) { // 鎸夊伐鑹鸿矾绾胯蛋妯″紡
-      this.dialogForm.routecode = this.partArr.find(item => item.partcode === this.dialogForm.partcode).default_route
+      this.dialogForm.routecode = this.suitobjectTableData.find(item => item.partcode === this.dialogForm.partcode).default_route
       if (this.dialogForm.routecode && !this.sourceType) {
         await this.routecodeChange()
       } else {
@@ -3915,6 +4233,10 @@
           if (this.mesSetting.route && !this.dialogForm.routecode) {
             return this.$message.error('璇烽�夋嫨宸ヨ壓璺嚎锛�')
           }
+
+          const islastreport = this.wkshopcodeArr.find(i => i.torg_code === this.dialogForm.wkshopcode).islastreport
+
+          // console.log(islastreport === 'N', islastreport)
           const workListSub = []
           this.stepTableData.forEach((i, j) => {
             workListSub.push(
@@ -3925,7 +4247,8 @@
                 isbott: j === 0 ? 'Y' : 'N',
                 isend: j === this.stepTableData.length - 1 ? 'Y' : 'N',
                 ratio: i.ratio,
-                sumqty: i.sumqty
+                sumqty: i.sumqty,
+                isShow: islastreport === 'N' ? 'Y' : (j === this.stepTableData.length - 1 ? 'Y' : 'N')
               }
             )
           })
@@ -3942,7 +4265,7 @@
               return this.$message.error('鏈夊簭鎶ュ伐鎯呭喌涓嬶紝瓒呮姤姣斾緥鍚庨亾宸ュ簭涓嶈兘澶т簬鍓嶉亾宸ュ簭锛�')
             }
           }
-          console.log(isNaN(this.dialogForm.mesqty - this.dialogForm.mesqtyinit))
+          // console.log(isNaN(this.dialogForm.mesqty - this.dialogForm.mesqtyinit))
           const data = {
             wostatus: this.dialogForm.mesorderstus, // 宸ュ崟鐘舵��
             wocode: this.dialogForm.mesordercode, // 宸ュ崟鍙�
@@ -3961,6 +4284,8 @@
             routecode: this.dialogForm.routecode,
             workListSub
           }
+
+          // console.log(JSON.parse(JSON.stringify(data)))
 
           this.$store.state.app.buttonIsDisabled = true
           AddUpdateMesOrder(data, this.operation === 'add' ? 'Add' : 'Update').then(res => {
@@ -4009,6 +4334,7 @@
         }
         this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
         this.$refs.tableDataRef.doLayout()
+        this.$refs.tableDataRef2.doLayout()
       })
     },
     // 宸ヨ壓璺嚎鏀惧ぇ闀滅偣鍑�
@@ -4043,10 +4369,17 @@
       MesOrderPrintSearch(data2).then(res2 => {
         if (res2.code === '200') {
           this.dialogVisibleApprove = true
+          let res3 = []
+          if (row.islastreport === 'Y') {
+            res3 = res2.data.recordset.filter(i => i.isshow === 'Y')
+          } else {
+            res3 = res2.data.recordset
+          }
 
-          const res3 = res2.data.recordset
+          console.log(JSON.parse(JSON.stringify(res2.data.recordset)))
+
           // this.tableDataPrint = res3
-          this.tableDataPrint = this.chunkArray(res3, 8)
+          this.tableDataPrint = this.chunkArray(res3, 15)
 
           this.formApprove.mesordercode = res3[0].wo_code
           this.formApprove.m_po = res3[0].m_po || '/'
@@ -4123,15 +4456,15 @@
           correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
         })
       } else {
-        new QRCode(this.$refs['qrCodeDiv' + seq], {
-          text: text,
-          width: size === 'big' ? 90 : 60,
-          height: size === 'big' ? 90 : 60,
-          // colorDark: '#333333', // 浜岀淮鐮侀鑹�
-          colorDark: '#000', // 浜岀淮鐮侀鑹�
-          colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
-          correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
-        })
+        // new QRCode(this.$refs['qrCodeDiv' + seq], {
+        //   text: text,
+        //   width: size === 'big' ? 90 : 60,
+        //   height: size === 'big' ? 90 : 60,
+        //   // colorDark: '#333333', // 浜岀淮鐮侀鑹�
+        //   colorDark: '#000', // 浜岀淮鐮侀鑹�
+        //   colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
+        //   correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
+        // })
       }
     },
 
@@ -4455,6 +4788,11 @@
       }
       const { data: res } = await UpdateMesOrderStepSearch(data)
       this.tableDataDetail = res.stepdata
+      // if (row.islastreport === 'Y') {
+      //   this.tableDataDetail = res.stepdata.filter(i => i.isend === 'Y')
+      // } else {
+      //   this.tableDataDetail = res.stepdata
+      // }
     },
     // 宸ュ簭鍒犻櫎
     stepDel(row) {
@@ -4530,7 +4868,7 @@
     getSummaries(param) {
       const { columns, data } = param
       const sums = []
-      const i = 9
+      const i = 11
       columns.forEach((column, index) => {
         if (index === i) {
           sums[index] = '鎬绘暟'
@@ -4552,6 +4890,7 @@
 
       this.$nextTick(() => {
         this.$refs.tableDataRef.doLayout()
+        this.$refs.tableDataRef2.doLayout()
       })
       return sums
     }
@@ -4569,10 +4908,22 @@
 $main_color: #42b983;
 
 .stepSelectedValueClass {
-  ::v-deep input {
-    //min-height: 34px !important;
-    height: 68px !important;
+  //::v-deep input {
+  //  //min-height: 34px !important;
+  //  height: 98px !important;
+  //}
+
+  ::v-deep .el-input__inner{
+    height: 120px!important;
   }
+
+  ::v-deep .el-select__tags>span{
+    display: flex ;
+    align-items: center;
+    justify-content: flex-start;
+    flex-wrap: wrap;
+  }
+
 }
 
 .dialogVisibleRoute {

--
Gitblit v1.9.3