From 9fd5c98eb80c80775d43c581cc7155cf0168d26c Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期五, 26 十二月 2025 13:43:16 +0800
Subject: [PATCH] 1.存货绑定工艺路线绑定显示优化2.生成工单修改优化

---
 src/views/materialManager/inventoryList.vue  |   25 ++++
 vue.config.js                                |    2 
 package.json                                 |    5 +
 src/views/workOrder/produceOrderList.vue     |  127 +++++++++++++------------
 .env.production                              |    5 
 src/views/basicSettings/organizationList.vue |    2 
 src/views/workOrder/workOrderList.vue        |   89 +++++++++++------
 7 files changed, 157 insertions(+), 98 deletions(-)

diff --git a/.env.production b/.env.production
index a69b2eb..a4a5155 100644
--- a/.env.production
+++ b/.env.production
@@ -6,4 +6,7 @@
 
 # 鏂囦欢涓嬭浇鍦板潃   涓嬭浇鏁版嵁妯℃澘鍦板潃
 # 鏈湴鏈嶅姟鍣�
-VUE_APP_BASE_API_FILE = 'http://192.168.1.21:9000/'
+VUE_APP_BASE_API_FILE = 'http://121.196.36.24:8049/'
+
+# 瀹㈡埛 浼樻
+# VUE_APP_BASE_API_FILE = 'http://192.168.0.120:8000/'
diff --git a/package.json b/package.json
index 6b02bfc..cc3953f 100644
--- a/package.json
+++ b/package.json
@@ -16,6 +16,8 @@
   "dependencies": {
     "@jiaminghi/data-view": "^2.10.0",
     "@microsoft/signalr": "^7.0.9",
+    "@vue-office/pdf": "^2.0.10",
+    "@vue/composition-api": "^1.7.2",
     "array-to-tree": "^3.3.2",
     "axios": "0.18.1",
     "core-js": "3.6.5",
@@ -42,10 +44,13 @@
     "vue-count-to": "^1.0.13",
     "vue-cron": "^1.0.9",
     "vue-cron-editor-buefy": "^0.2.17",
+    "vue-demi": "^0.14.10",
     "vue-easy-print": "0.0.8",
+    "vue-pdf": "^4.3.0",
     "vue-print-nb": "^1.7.5",
     "vue-router": "3.0.6",
     "vue-splitpane": "^1.0.6",
+    "vue-webview": "0.0.34",
     "vuedraggable": "^2.24.3",
     "xlsx": "0.14.1"
   },
diff --git a/src/views/basicSettings/organizationList.vue b/src/views/basicSettings/organizationList.vue
index 681c698..fd57cf9 100644
--- a/src/views/basicSettings/organizationList.vue
+++ b/src/views/basicSettings/organizationList.vue
@@ -93,7 +93,7 @@
           </el-table-column>
           <el-table-column
             prop="islastreport"
-            label="鏄惁鏈亾鎶ュ伐"
+            label="鏄惁鍙樉绀烘湯閬�"
             sortable="custom"
           >
             <template slot-scope="{row}">
diff --git a/src/views/materialManager/inventoryList.vue b/src/views/materialManager/inventoryList.vue
index 3b285ad..047291d 100644
--- a/src/views/materialManager/inventoryList.vue
+++ b/src/views/materialManager/inventoryList.vue
@@ -676,8 +676,10 @@
         }}
       </div>
       <el-divider />
-      <div style="margin-bottom: 10px">
+      <div style="margin-bottom: 10px;display: flex;align-items: center">
         <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 宸ヨ壓璺嚎闆嗗悎
+        <el-input v-model="filterRoute" style="width: 200px;margin-left: 10px;" placeholder="璇疯緭鍏ュ伐鑹鸿矾绾胯繘琛岃繃婊�" @input="filterRouteChange" />
+
       </div>
 
       <div class="myCheckboxGroup">
@@ -956,6 +958,7 @@
         <div style="width:calc(100% - 460px)">
           <div style="margin-bottom: 10px">
             <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 宸ヨ壓璺嚎闆嗗悎
+            <el-input v-model="filterRoute" style="width: 200px;margin-left: 10px;" placeholder="璇疯緭鍏ュ伐鑹鸿矾绾胯繘琛岃繃婊�" @input="filterRouteChange2" />
           </div>
 
           <div class="myCheckboxGroup">
@@ -1361,7 +1364,10 @@
       batchRouteDataSelectedIndex: 0, // 宸︿晶浜у搧閫変腑鍊� 甯﹀嚭鍙充晶宸ヨ壓璺嚎
 
       dialogVisibleBatchStep: false,
-      batchStepSelectedValue: []
+      batchStepSelectedValue: [],
+
+      filterRoute: '',
+      routeOperationArrTemp: []
     }
   },
   watch: {
@@ -1397,6 +1403,13 @@
     this.getSelectApi()
   },
   methods: {
+    filterRouteChange(val) {
+      this.dialogFormRoute.routeOperationArr = this.routeOperationArrTemp.filter(i => i.name.includes(val))
+    },
+    filterRouteChange2(val) {
+      this.batchRouteDataSelected = this.routeOperationArrTemp.filter(i => i.routename.includes(val))
+    },
+
     // 宸ヨ壓鐐瑰嚮 ,鎸夊伐搴忚蛋
     async routeClick2(row) {
       this.dialogVisibleStep = true
@@ -1571,6 +1584,7 @@
         if (this.mesSetting.route) { // 鎸夊伐鑹鸿矾绾�
           this.batchRouteData = res.data
           this.batchRouteDataSelected = this.batchRouteData[0].children
+          this.routeOperationArrTemp = this.batchRouteData[0].children
           this.batchRouteDataSelectedIndex = 0
           this.batchRouteData[this.batchRouteDataSelectedIndex].children.forEach((item, index) => {
             item.isSelected1 = false
@@ -1642,9 +1656,10 @@
       this.defaultroute_code = ''
       this.defaultroute_codeArr = []
       this.batchRouteData = []
+      this.filterRoute = ''
     },
     partcodeSelected(val, index) {
-      this.batchRouteDataSelected = val.children
+      this.batchRouteDataSelected = val.children.filter(i => i.routename.includes(this.filterRoute))
       this.batchRouteDataSelectedIndex = index
       this.batchRouteData[this.batchRouteDataSelectedIndex].children.forEach((item, index) => {
         item.isSelected1 = false
@@ -1698,6 +1713,7 @@
             loading.close()
             this.dialogVisibleRoute = true
             this.dialogFormRoute.routeOperationArr = res.data
+            this.routeOperationArrTemp = res.data
             // let waitFlag = false// 鍥炴樉绛夊緟鏄惁鏀捐
 
             this.dialogFormRoute.routeOperationArr.forEach((item, index) => {
@@ -1738,6 +1754,7 @@
     handleCloseRoute() {
       this.dialogFormRoute.routeOperationArr = []
       this.defaultroute_codeArr = []
+      this.filterRoute = ''
     },
     // 鍙栨秷
     routeDialogVisibleCancel() {
@@ -2220,6 +2237,8 @@
   .myCheckboxGroup {
     display: flex;
     flex-wrap: wrap;
+    max-height: 200px;
+    overflow: auto;
 
     .myCheckbox {
       //border: 1px solid $main_color;
diff --git a/src/views/workOrder/produceOrderList.vue b/src/views/workOrder/produceOrderList.vue
index 978206d..00bf307 100644
--- a/src/views/workOrder/produceOrderList.vue
+++ b/src/views/workOrder/produceOrderList.vue
@@ -286,66 +286,66 @@
             width="150"
             sortable="custom"
           />
-<!--          <el-table-column-->
-<!--            prop="priuserdefnvc1"-->
-<!--            label="瀹㈡埛鍚嶇О"-->
-<!--            width="110"-->
-<!--            sortable="custom"-->
-<!--          >-->
-<!--            <template slot-scope="{row}">-->
-<!--              {{ row.priuserdefnvc1 ? row.priuserdefnvc1 : '/' }}-->
-<!--            </template>-->
-<!--          </el-table-column>-->
-<!--          <el-table-column-->
-<!--            prop="priuserdefnvc6"-->
-<!--            label="瀹㈡埛缂栫爜"-->
-<!--            width="110"-->
-<!--            sortable="custom"-->
-<!--          >-->
-<!--            <template slot-scope="{row}">-->
-<!--              {{ row.priuserdefnvc6 ? row.priuserdefnvc6 : '/' }}-->
-<!--            </template>-->
-<!--          </el-table-column>-->
-<!--          <el-table-column-->
-<!--            prop="priuserdefnvc2"-->
-<!--            label="瀵瑰唴鍚嶇О"-->
-<!--            width="110"-->
-<!--            sortable="custom"-->
-<!--          >-->
-<!--            <template slot-scope="{row}">-->
-<!--              {{ row.priuserdefnvc2 ? row.priuserdefnvc2 : '/' }}-->
-<!--            </template>-->
-<!--          </el-table-column>-->
-<!--          <el-table-column-->
-<!--            prop="priuserdefnvc3"-->
-<!--            label="CTP鏃ユ湡"-->
-<!--            width="110"-->
-<!--            sortable="custom"-->
-<!--          >-->
-<!--            <template slot-scope="{row}">-->
-<!--              {{ row.priuserdefnvc3 ? row.priuserdefnvc3 : '/' }}-->
-<!--            </template>-->
-<!--          </el-table-column>-->
-<!--          <el-table-column-->
-<!--            prop="priuserdefnvc4"-->
-<!--            label="閽㈠垁缂栧彿"-->
-<!--            width="110"-->
-<!--            sortable="custom"-->
-<!--          >-->
-<!--            <template slot-scope="{row}">-->
-<!--              {{ row.priuserdefnvc4 ? row.priuserdefnvc4 : '/' }}-->
-<!--            </template>-->
-<!--          </el-table-column>-->
-<!--          <el-table-column-->
-<!--            prop="priuserdefnvc5"-->
-<!--            label="鐩掑瀷"-->
-<!--            width="110"-->
-<!--            sortable="custom"-->
-<!--          >-->
-<!--            <template slot-scope="{row}">-->
-<!--              {{ row.priuserdefnvc5 ? row.priuserdefnvc5 : '/' }}-->
-<!--            </template>-->
-<!--          </el-table-column>-->
+          <!--          <el-table-column-->
+          <!--            prop="priuserdefnvc1"-->
+          <!--            label="瀹㈡埛鍚嶇О"-->
+          <!--            width="110"-->
+          <!--            sortable="custom"-->
+          <!--          >-->
+          <!--            <template slot-scope="{row}">-->
+          <!--              {{ row.priuserdefnvc1 ? row.priuserdefnvc1 : '/' }}-->
+          <!--            </template>-->
+          <!--          </el-table-column>-->
+          <!--          <el-table-column-->
+          <!--            prop="priuserdefnvc6"-->
+          <!--            label="瀹㈡埛缂栫爜"-->
+          <!--            width="110"-->
+          <!--            sortable="custom"-->
+          <!--          >-->
+          <!--            <template slot-scope="{row}">-->
+          <!--              {{ row.priuserdefnvc6 ? row.priuserdefnvc6 : '/' }}-->
+          <!--            </template>-->
+          <!--          </el-table-column>-->
+          <!--          <el-table-column-->
+          <!--            prop="priuserdefnvc2"-->
+          <!--            label="瀵瑰唴鍚嶇О"-->
+          <!--            width="110"-->
+          <!--            sortable="custom"-->
+          <!--          >-->
+          <!--            <template slot-scope="{row}">-->
+          <!--              {{ row.priuserdefnvc2 ? row.priuserdefnvc2 : '/' }}-->
+          <!--            </template>-->
+          <!--          </el-table-column>-->
+          <!--          <el-table-column-->
+          <!--            prop="priuserdefnvc3"-->
+          <!--            label="CTP鏃ユ湡"-->
+          <!--            width="110"-->
+          <!--            sortable="custom"-->
+          <!--          >-->
+          <!--            <template slot-scope="{row}">-->
+          <!--              {{ row.priuserdefnvc3 ? row.priuserdefnvc3 : '/' }}-->
+          <!--            </template>-->
+          <!--          </el-table-column>-->
+          <!--          <el-table-column-->
+          <!--            prop="priuserdefnvc4"-->
+          <!--            label="閽㈠垁缂栧彿"-->
+          <!--            width="110"-->
+          <!--            sortable="custom"-->
+          <!--          >-->
+          <!--            <template slot-scope="{row}">-->
+          <!--              {{ row.priuserdefnvc4 ? row.priuserdefnvc4 : '/' }}-->
+          <!--            </template>-->
+          <!--          </el-table-column>-->
+          <!--          <el-table-column-->
+          <!--            prop="priuserdefnvc5"-->
+          <!--            label="鐩掑瀷"-->
+          <!--            width="110"-->
+          <!--            sortable="custom"-->
+          <!--          >-->
+          <!--            <template slot-scope="{row}">-->
+          <!--              {{ row.priuserdefnvc5 ? row.priuserdefnvc5 : '/' }}-->
+          <!--            </template>-->
+          <!--          </el-table-column>-->
           <el-table-column
             prop="clerkuser"
             label="閿�鍞笟鍔″憳"
@@ -734,7 +734,8 @@
         saleOrderDeliveryDate: '', // 棰勮浜や粯鏃ユ湡
 
         paystartdate: '', //   棰勮寮�宸ユ棩鏈�
-        payenddate: ''//  棰勮瀹屽伐鏃ユ湡
+        payenddate: '', //  棰勮瀹屽伐鏃ユ湡
+        islastreport: ''
       },
       operation: '',
       dialogFormRules: {
@@ -992,6 +993,7 @@
           data.push({
             'erporderid': i.id,
             'sbid': i.sbid,
+            'islastreport': i.islastreport,
             'erpordercode': i.wo,
             'partcode': i.partcode,
             'wkshopcode': i.wkshp_code,
@@ -1045,6 +1047,7 @@
 
       this.$nextTick(() => {
         this.dialogForm.sbid = row.sbid
+        this.dialogForm.islastreport = row.islastreport
         this.dialogForm.erporderid = row.id
         this.dialogForm.erpordercode = row.wo
         this.dialogForm.saleordercode = row.saleOrderCode
@@ -1076,6 +1079,7 @@
       this.dialogForm = {
         erporderid: '', // 璁㈠崟id
         sbid: '', // 璁㈠崟鏄庣粏id
+        islastreport: '', //
         erpordercode: '', // 璁㈠崟缂栧彿
         saleordercode: '', // 閿�鍞鍗�
 
@@ -1124,6 +1128,7 @@
           this.$store.state.app.buttonIsDisabled = true
           const data = {
             'sbid': this.dialogForm.sbid,
+            'islastreport': this.dialogForm.islastreport,
             'erporderid': this.dialogForm.erporderid,
             'erpordercode': this.dialogForm.erpordercode,
             'saleordercode': this.dialogForm.saleordercode,
diff --git a/src/views/workOrder/workOrderList.vue b/src/views/workOrder/workOrderList.vue
index c2b0780..59fe59e 100644
--- a/src/views/workOrder/workOrderList.vue
+++ b/src/views/workOrder/workOrderList.vue
@@ -598,24 +598,24 @@
             show-tooltip-when-overflow
             prop="delive_qty"
           />
-          <!--          <el-table-column-->
-          <!--            label="鎿嶄綔"-->
-          <!--            width="120"-->
-          <!--            fixed="right"-->
-          <!--          >-->
-          <!--            <template slot-scope="{row}">-->
-          <!--              <div class="operationClass">-->
-          <!--                <el-tooltip v-del-tab-index class="item" effect="dark" content="SOP棰勮" placement="top">-->
-          <!--                  <i-->
-          <!--                    v-if="mesSetting.tech"-->
-          <!--                    class="el-icon-files"-->
-          <!--                    style="cursor: pointer;color:#42b983;margin-right: 15px"-->
-          <!--                    @click="pre(row,2)"-->
-          <!--                  />-->
-          <!--                </el-tooltip>-->
-          <!--              </div>-->
-          <!--            </template>-->
-          <!--          </el-table-column>-->
+          <el-table-column
+            label="鎿嶄綔"
+            width="120"
+            fixed="right"
+          >
+            <template slot-scope="{row}">
+              <div class="operationClass">
+                <el-tooltip v-del-tab-index class="item" effect="dark" content="SOP棰勮" placement="top">
+                  <i
+                    v-if="mesSetting.tech"
+                    class="el-icon-files"
+                    style="cursor: pointer;color:#42b983;margin-right: 15px"
+                    @click="pre(row,2)"
+                  />
+                </el-tooltip>
+              </div>
+            </template>
+          </el-table-column>
         </el-table>
       </div>
     </div>
@@ -3166,6 +3166,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) => {
@@ -3177,10 +3178,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) => {
@@ -3905,6 +3908,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(
@@ -3915,7 +3922,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')
               }
             )
           })
@@ -3932,7 +3940,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, // 宸ュ崟鍙�
@@ -3951,6 +3959,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 => {
@@ -4034,8 +4044,13 @@
       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
           // this.tableDataPrint = res3
           this.tableDataPrint = this.chunkArray(res3, 8)
 
@@ -4445,12 +4460,12 @@
         data_sources: row.data_sources
       }
       const { data: res } = await UpdateMesOrderStepSearch(data)
-
-      if (row.islastreport === 'Y') {
-        this.tableDataDetail = res.stepdata.filter(i => i.isend === 'Y')
-      } else {
-        this.tableDataDetail = res.stepdata
-      }
+      this.tableDataDetail = res.stepdata
+      // if (row.islastreport === 'Y') {
+      //   this.tableDataDetail = res.stepdata.filter(i => i.isend === 'Y')
+      // } else {
+      //   this.tableDataDetail = res.stepdata
+      // }
     },
     // 宸ュ簭鍒犻櫎
     stepDel(row) {
@@ -4566,10 +4581,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 {
diff --git a/vue.config.js b/vue.config.js
index 627559e..91a57bc 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -53,7 +53,7 @@
     proxy: {
       [process.env.VUE_APP_BASE_API]: {
         target: 'http://121.196.36.24:8049', // 鏈湴
-        // target: 'http://192.168.1.21:9000', // 娴欐睙浼樻浣撹偛鐢ㄥ搧鑲′唤鏈夐檺鍏徃
+        // target: 'http://192.168.0.120:8000', // 娴欐睙浼樻浣撹偛鐢ㄥ搧鑲′唤鏈夐檺鍏徃
         changeOrigin: true, // 璇锋眰璺ㄥ煙鏃讹紝闇� 閰嶇疆姝ら」
         pathRewrite: { // 璺緞閲嶅啓,鏇挎崲target涓殑璇锋眰鍦板潃
           ['^' + process.env.VUE_APP_BASE_API]: '/api/'

--
Gitblit v1.9.3