From 6ab47fcc9f200a78dd7fd010fc4129cd178e79b2 Mon Sep 17 00:00:00 2001
From: wangyi <2946747746@qq.com>
Date: 星期二, 07 四月 2026 15:49:05 +0800
Subject: [PATCH] 采购入库单bug修改

---
 src/views/purchase/cgPoInStockBill/cgPoInStockBill.vue |   64 +++++++++++++++++++++++++++++++
 1 files changed, 63 insertions(+), 1 deletions(-)

diff --git a/src/views/purchase/cgPoInStockBill/cgPoInStockBill.vue b/src/views/purchase/cgPoInStockBill/cgPoInStockBill.vue
index 8bb8a14..3b250b4 100644
--- a/src/views/purchase/cgPoInStockBill/cgPoInStockBill.vue
+++ b/src/views/purchase/cgPoInStockBill/cgPoInStockBill.vue
@@ -288,6 +288,8 @@
           >鍒犻櫎
         </el-button>
       </el-col>
+      
+      
       <el-col :span="1.5">
         <el-button
           type="primary"
@@ -401,6 +403,10 @@
         >
       </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-download"
@@ -409,6 +415,7 @@
           >闅愯棌鍒楄缃�</el-button
         >
       </el-col>
+      
       <el-col :span="1.5">
         <el-button type="primary" icon="el-icon-help" size="mini" @click="handleSearch"
           >鎼� 绱�</el-button
@@ -499,6 +506,10 @@
         <div style="height: 70vh" v-if="openFlag_pushBarCode">
           <iframe :src="iframeUrl" frameborder="0" width="100%" height="100%"></iframe>
         </div>
+      </el-dialog>
+       <el-dialog title="涓嬫帹瀹归噰璐叆搴撳崟" :visible.sync="openPush" width="1480px" append-to-body class="xsckdBox" @close="close">
+        <push :OperationType='5' :propsData='pushData' :HSouceBillType=BillType
+         @editClose="pushClose" v-if="pushShow" />
       </el-dialog>
       <!-- 缂栬緫 -->
       <el-dialog
@@ -616,12 +627,13 @@
 <script>
 import axios from "axios";
 import RowSettings from "@/views/component/rowSettings";
+import Push from '@/views/CaiGouGuanLi/CaiGouRuKu/Kf_POStockInBillEdit'
 import gySource from "@/views/basic/gySource";
 import dayjs from "dayjs";
 
 export default {
   name: "cgPoInStockBill",
-  components: { RowSettings, gySource },
+  components: { RowSettings, gySource ,Push},
   props: {
     openPage: { type: String },
   },
@@ -629,6 +641,7 @@
     return {
       iframeUrl: "",
       activeSeach: "",
+      pushShow: false,
       dateRange: [],
       HModName: "cgPoInStockBill",
       editShow: false,
@@ -1198,6 +1211,37 @@
         return { background: "#ecf5ff" };
       }
     },
+
+     //鎵撳紑涓嬫帹缁勪欢寮圭獥
+    handlePush() {
+      if (this.rowList && this.rowList.length > 0) {
+        var dataArray = [];
+        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;
+            }
+            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("璇烽�夋嫨鏁版嵁涓嬫帹锛�")
+      }
+    },
     //鍙屽嚮琛�
     handleDblclick(row, column, cell, event) {
       this.OperationType = 3;
@@ -1206,6 +1250,7 @@
     // 澶氶�夋閫変腑鏁版嵁
     handleSelectionChange(selection) {
       // this.rowForm = {}
+      this.rowList = selection;
       this.ids = selection.map((item) => item.hmainid);
       this.single = selection.length != 1;
       this.multiple = !selection.length;
@@ -1369,11 +1414,28 @@
       this.resetForm("queryForm");
       this.getList();
     },
+     //鍏抽棴涓嬫帹椤甸潰
+    pushClose(val) {
+      this.open = val
+      this.pushShow = false
+      this.openPush = val
+      this.clearData()
+      this.getList()
+    },
+    //娓呴櫎閫変腑鏁版嵁鐨勭紦瀛�
+    clearData(){
+      this.ids = []
+      this.multiple = true
+      this.single = true
+      this.OperationType = 0
+      this.copyType = 0
+    },
 
     //閫�鍑�
     close() {
       this.tableShow = true;
       this.openEdit = false;
+      this.pushShow = false;
       this.openFlag_pushBarCode = false;
       this.disabledFlag_pushBarCode = true;
       this.getList();

--
Gitblit v1.9.1