From b711b21f88e2c1a1aae00874276f5d343975434f Mon Sep 17 00:00:00 2001
From: qq_41295110 <qq_41295110@noreply.gitcode.com>
Date: 星期五, 05 十二月 2025 13:35:20 +0800
Subject: [PATCH] 器具现有模块添加下推,选源单以及各页面接口调整

---
 src/views/scMould/warehouse/Sc_MouldOutRequestBillList.vue |   79 +++++++++++++++++++++++++++++++++++++--
 1 files changed, 75 insertions(+), 4 deletions(-)

diff --git a/src/views/scMould/warehouse/Sc_MouldOutRequestBillList.vue b/src/views/scMould/warehouse/Sc_MouldOutRequestBillList.vue
index f84ab8f..430c829 100644
--- a/src/views/scMould/warehouse/Sc_MouldOutRequestBillList.vue
+++ b/src/views/scMould/warehouse/Sc_MouldOutRequestBillList.vue
@@ -136,6 +136,10 @@
           @click="handleEdit(row = rowForm, OperationType = 1, copyType = 1)">澶嶅埗</el-button>
       </el-col>
       <el-col :span="1.5">
+        <el-button type="primary" icon="el-icon-tickets" size="mini"
+          @click="handlePush(row = rowForm, OperationType = 4)">涓嬫帹锛堝櫒鍏烽鐢ㄥ嚭搴撳崟锛�</el-button>
+      </el-col>
+      <el-col :span="1.5">
         <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete">鍒犻櫎
         </el-button>
       </el-col>
@@ -199,6 +203,11 @@
         <edit :OperationType=OperationType :linterid=this.rowForm.hmainid :HSouceBillType=this.rowForm.HSourceBillType
           :copyType="copyType" @editClose="editClose" v-if="editShow" />
       </el-dialog>
+      <!-- 涓嬫帹 -->
+      <el-dialog title="涓嬫帹鍣ㄥ叿棰嗙敤鍑哄簱鍗�" :visible.sync="openPush" width="1480px" append-to-body class="xsckdBox" @close="close">
+        <push :OperationType='4' :propsData='pushData' :HSouceBillType=BillType
+         @editClose="pushClose" v-if="pushShow" />
+      </el-dialog>
       <el-dialog title="鎵撳嵃妯℃澘閫夋嫨" :visible.sync="openPrintList" width="800px" append-to-body>
         <PrintList :linterid=this.rowForm.hmainid :MyMsg=this.rowForm.hmainid :Type='HModName'
           :HModName='HModName' @rowEditClose="rowSetClose" v-if="printListShow" />
@@ -212,18 +221,27 @@
 import axios from 'axios'
 import RowSettings from '@/views/component/rowSettings'
 import Edit from '@/views/scMould/warehouse/Sc_MouldOutRequestBillEdit'
+import Push from '@/views/scMould/warehouse/Sc_MouldProdOutBillEdit'
 import PrintList from '@/views/component/printList'
 import moment from 'moment';
 
 export default {
   name: 'Sc_MouldOutRequestBillList',
-  components: { RowSettings, Edit, PrintList },
+  components: { RowSettings, Edit,Push, PrintList },
+  props: {
+    openPage: { type: String, },
+    HOrgID: { type: String, },
+  },
   data() {
     return {
       HModName: "Sc_MouldOutRequestBillList",
+      rowList:[],
       activeSeach: '',
       editShow: false,
       openEdit: false,
+      pushShow: false,
+      openPush: false,
+      pushData:'',
       totalNameList: [],
       tableShow: true,
       openPrintList: false,
@@ -312,10 +330,14 @@
       page: 1,
       pageSize: 0,
       total: 0,
+      BillType:'3849',
     };
   },
   created() {
     // this.fetchData()
+    if(this.openPage && this.HOrgID){
+      this.queryParams.HStockOrgID = this.HOrgID
+    }
     this.riqiChange()
     this.getList();
   },
@@ -397,7 +419,7 @@
           "user": sessionStorage["HUserName"],
           "page": this.page,
           "size": this.pageSize,
-          "Type":"3849",
+          "Type": this.BillType,
         },
       }).then(response => {
         this.tyResList = response.data.data//鎬绘暟鎹�
@@ -583,10 +605,13 @@
       this.selectedRow = row; // 璁板綍褰撳墠閫変腑鐨勮
       this.lastSelectedRowIndex = this.tableData.indexOf(row);
       this.$refs.tableData.toggleRowSelection(row);
+      if (this.openPage) {
+        this.$emit('deptEmit', this.rowList, this.BillType)
+      }
     },
     //閫変腑琛岄珮浜牱寮�
     rowStyle({ row, rowIndex }) {
-      if (this.ids.includes(row.hmainid)) {
+      if (this.ids.includes(row.sorderid)) {
         return { "background": "#ecf5ff" }
       }
     },
@@ -598,7 +623,8 @@
     // 澶氶�夋閫変腑鏁版嵁
     handleSelectionChange(selection) {
       // this.rowForm = {}
-      this.ids = selection.map(item => item.hmainid)
+      this.rowList=selection
+      this.ids = selection.map(item => item.sorderid)
       this.single = selection.length != 1
       this.multiple = !selection.length
       if (!this.single) {
@@ -743,6 +769,8 @@
       this.tableShow = true
       this.openEdit = false
       this.editShow = false
+      this.openPush = false
+      this.pushShow = false
       this.clearData()
       this.getList()
     },
@@ -758,6 +786,41 @@
       this.editShow = true
       this.openEdit = true
     },
+    //鎵撳紑涓嬫帹缁勪欢寮圭獥
+    handlePush() {
+      if (this.rowList && this.rowList.length > 0) {
+        var dataArray = [];
+        var HSupTypeID_Temp = this.rowList[0].HSupTypeID
+        for (var i = 0; i < this.rowList.length; i++) {
+            if (this.rowList[i].鍗曟嵁鐘舵�� != "宸插鏍�") {
+                this.$modal.msgError("涓嬫帹澶辫触锛佹墍閫夊崟鎹��" + this.rowList[i].鍗曟嵁鍙� + "銆戜笉涓哄凡瀹℃牳鐘舵��,涓嶅厑璁镐笅鎺紒")
+                return;
+            }
+            if (this.rowList[i].HQtyMust <= 0) {
+                this.$modal.msgError("涓嬫帹澶辫触锛佹墍閫夊崟鎹��" + this.rowList[i].鍗曟嵁鍙� + "銆戝搴斿彲涓嬫帹鏁伴噺蹇呴』澶т簬 0 锛�")
+                return;
+            }
+            if (this.rowList[i].HSupTypeID != HSupTypeID_Temp) {
+                this.$modal.msgError("涓嬫帹澶辫触锛佹墍閫夊崟鎹搴斿線鏉ョ被鍨嬪繀椤讳竴鑷达紒")
+                return;
+            }
+            var temp = {
+                "hmainid": this.rowList[i].hmainid
+                , "hsubid": this.rowList[i].hsubid
+                , "HBillType": this.rowList[i].HBillType
+            }
+            dataArray.push(temp);
+        }
+        var datajson = {
+            "data": dataArray
+        };
+        this.pushData = JSON.stringify(datajson)
+        this.pushShow = true
+        this.openPush = true
+      } else {
+          this.$modal.msgError("璇烽�夋嫨鏁版嵁涓嬫帹锛�")
+      }
+    },
     //鍏抽棴缂栬緫椤甸潰
     editClose(val) {
       this.open = val
@@ -766,6 +829,14 @@
       this.clearData()
       this.getList()
     },
+    //鍏抽棴涓嬫帹椤甸潰
+    pushClose(val) {
+      this.open = val
+      this.pushShow = false
+      this.openPush = val
+      this.clearData()
+      this.getList()
+    },
     //娓呴櫎閫変腑鏁版嵁鐨勭紦瀛�
     clearData(){
       this.ids = []

--
Gitblit v1.9.1