From 6ea478a58480965b6dcb66176acb2f5ff75b0a1d Mon Sep 17 00:00:00 2001
From: 陈婷婷 <506607603@qq.com>
Date: 星期三, 17 十二月 2025 09:18:11 +0800
Subject: [PATCH] 条码生成物料选择

---
 src/views/warehouse/barcodeMaster/Gy_BarCodeBill.vue |   90 +++++++++++++++++++++++++++------------------
 1 files changed, 54 insertions(+), 36 deletions(-)

diff --git a/src/views/warehouse/barcodeMaster/Gy_BarCodeBill.vue b/src/views/warehouse/barcodeMaster/Gy_BarCodeBill.vue
index bead72d..e05983a 100644
--- a/src/views/warehouse/barcodeMaster/Gy_BarCodeBill.vue
+++ b/src/views/warehouse/barcodeMaster/Gy_BarCodeBill.vue
@@ -51,7 +51,8 @@
                 <el-col :span="6">
                     <el-form-item label="閫夊崟鍙�" prop="HSourceBillNo">
                         <el-input v-model="form.HSourceBillNo" placeholder="璇疯緭鍏ラ�夊崟鍙�" disabled>
-                            <el-button class="input-search-btn"  slot="append" icon="el-icon-search" @click="openDataDialog(null)"></el-button>
+                            <el-button class="input-search-btn" slot="append" icon="el-icon-search"
+                                @click="openDataDialog(null)"></el-button>
                         </el-input>
                     </el-form-item>
                 </el-col>
@@ -83,7 +84,11 @@
                         </el-table-column>
                         <el-table-column align="center" label="鐗╂枡浠g爜" prop="HMaterNumber" width="120"
                             show-overflow-tooltip>
-                            <template slot-scope="scope"><el-input v-model="scope.row.HMaterNumber" /></template>
+                            <template slot-scope="scope">
+                                <el-input v-model="scope.row.HMaterNumber"
+                                    @keyup.native.f7="openDataDialog(3, scope.row)"
+                                    @dblclick.native="openDataDialog(3, scope.row)" />
+                            </template>
                         </el-table-column>
                         <el-table-column align="center" label="鐗╂枡鍚嶇О" prop="HMaterName" width="120"
                             show-overflow-tooltip>
@@ -93,7 +98,7 @@
                             show-overflow-tooltip>
                             <template slot-scope="scope">{{ scope.row.HMaterModel }}</template>
                         </el-table-column>
-                       
+
                         <el-table-column align="center" label="鏁伴噺" prop="HQty" width="120" show-overflow-tooltip>
                             <template slot-scope="scope">
                                 <el-input-number v-model="scope.row.HQty" :min="0" controls-position="right"
@@ -189,9 +194,9 @@
                         <el-table-column align="center" label="杈呭姪灞炴�т唬鐮�" prop="HAuxPropNumber" width="120"
                             show-overflow-tooltip>
                             <template slot-scope="scope">
-                            <el-input v-model="scope.row.HAuxPropNumber" 
-                            @keyup.native.f7="openDataDialog(1, scope.row)"
-                            @dblclick.native="openDataDialog(1, scope.row)" />
+                                <el-input v-model="scope.row.HAuxPropNumber"
+                                    @keyup.native.f7="openDataDialog(1, scope.row)"
+                                    @dblclick.native="openDataDialog(1, scope.row)" />
                             </template>
                         </el-table-column>
                         <el-table-column align="center" label="杈呭姪灞炴�у悕绉�" prop="HAuxPropName" width="120"
@@ -231,7 +236,8 @@
                 </el-tab-pane>
                 <el-tab-pane label="鏉$爜淇℃伅" name="tiaoma">
                     <el-table :data="editTmData" style="width: 100%" height="480" width="100%" ref="tbzbTable"
-                        @selection-change="handleTableWlxxZbEdit" :row-class-name="tiaomaZbIndex" border v-if="editTmData.length>0">
+                        @selection-change="handleTableWlxxZbEdit" :row-class-name="tiaomaZbIndex" border
+                        v-if="editTmData.length > 0">
                         <el-table-column align="center" label="搴忓彿" type="index" width="80" fixed />
                         <template v-for="(item, index) in tmBtList">
                             <el-table-column align="center" :prop="item.field" :label="item.title" :width="item.width"
@@ -241,7 +247,8 @@
                 </el-tab-pane>
                 <el-tab-pane label="妗f鍒楄〃" name="dangan">
                     <el-table :data="editDaData" style="width: 100%" height="480" width="100%" ref="dazbTable"
-                        @selection-change="handleTableDangan" :row-class-name="danganZbIndex" border v-if="editDaData.length>0">
+                        @selection-change="handleTableDangan" :row-class-name="danganZbIndex" border
+                        v-if="editDaData.length > 0">
                         <el-table-column type="selection" width="55" align="center" />
                         <el-table-column align="center" label="搴忓彿" type="index" width="80" fixed />
                         <template v-for="(item, index) in daBtList">
@@ -260,20 +267,15 @@
         <el-dialog :title="dialogTitle" :visible.sync="openData" width="1280px" append-to-body @close="closeBill">
             <HSourceReportHtml @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName"
                 :HOrgID='this.form.HOrgID' :HSouceBillType="HSouceBillType" v-if="ScICMOBillShow" />
-
-                 <GyProperty
-                   @deptEmitDb="dbEmitData"
-                   @deptEmit="emitData"
-                   :openPage="HModName"
-                   v-if="propertyShow"
-                 />
+            <Material @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="materialShow" />
+            <GyProperty @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="propertyShow" />
             <div slot="footer" class="dialog-footer">
                 <el-button type="primary" @click="deptClickSub">纭� 瀹�</el-button>
                 <el-button @click="deptClose">鍙� 娑�</el-button>
             </div>
         </el-dialog>
         <el-dialog title="鎵撳嵃妯℃澘閫夋嫨" :visible.sync="openPrintList" width="800px" append-to-body>
-            <PrintList :linterid="rowSel.toString()" :MyMsg="rowSel.toString()" Type="HGy_BarCodeBill" 
+            <PrintList :linterid="rowSel.toString()" :MyMsg="rowSel.toString()" Type="HGy_BarCodeBill"
                 HModName="HGy_BarCodeBill" @rowEditClose="rowSetClose" v-if="printListShow" />
             <!-- <div>111</div> -->
         </el-dialog>
@@ -285,10 +287,11 @@
 import PrintList from "@/views/component/printList";
 import moment from 'moment';
 import GyProperty from "@/views/basic/gyProperty/gyPropertyList.vue";
+import Material from '@/views/gyMaterial/GyMaterial.vue'
 
 export default {
     name: 'Gy_BarCodeBill',
-    components: { HSourceReportHtml, PrintList, GyProperty },
+    components: { HSourceReportHtml, PrintList, GyProperty, Material },
     props: {
         OperationType: { type: Number, },
         linterid: { type: Number, },
@@ -297,7 +300,7 @@
     },
     data() {
         return {
-            rowSel:[],
+            rowSel: [],
             HModName: "Gy_BarCodeBill",
             danganSelList: [],
             openPrintList: false,
@@ -536,8 +539,8 @@
         this.getdata()
     },
     methods: {
-        closeBill(){
-            this.ScICMOBillShow=false
+        closeBill() {
+            this.ScICMOBillShow = false
         },
         get_PrintReport() {
             if (this.danganSelList.length == 0) {
@@ -545,7 +548,7 @@
             } else {
                 this.rowSel = [];
                 for (var i = 0; i < this.danganSelList.length; i++) {
-                     this.rowSel.push(this.danganSelList[i].HItemID.toString());
+                    this.rowSel.push(this.danganSelList[i].HItemID.toString());
                 }
                 this.printListShow = true;
                 this.openPrintList = true;
@@ -783,15 +786,24 @@
         },
         //寮圭獥璧嬪��
         dbEmitData(deptRow, num) {
-            if(num) {
-                if(num == 'gyProperty') {
+            if (num) {
+                if (num == 'gyProperty') {
                     this.editWlxxData[this.zbIndex].HAuxPropID = deptRow.HItemID;
                     this.editWlxxData[this.zbIndex]["HAuxPropName"] = deptRow["杈呭姪灞炴�у悕绉�"];
                     this.editWlxxData[this.zbIndex]["HAuxPropNumber"] = deptRow["杈呭姪灞炴�т唬鐮�"];
                     this.propertyShow = false;
                     this.openData = false;
+                } else if (num == 3) {
+                    this.editWlxxData[this.zbIndex].HMaterID = deptRow.HItemID;
+                    this.editWlxxData[this.zbIndex].HMaterNumber = deptRow.鐗╂枡浠g爜;
+                    this.editWlxxData[this.zbIndex].HMaterName = deptRow.鐗╂枡鍚嶇О;
+                    this.editWlxxData[this.zbIndex].HMaterModel = deptRow.瑙勬牸鍨嬪彿
+                    this.editWlxxData[this.zbIndex].HUnitID = deptRow.HUnitID;
+                    this.editWlxxData[this.zbIndex].HUnitName = deptRow.璁¢噺鍗曚綅鍚嶇О
+                    this.editWlxxData[this.zbIndex].HUnitNumber = deptRow.璁¢噺鍗曚綅浠g爜
+                    this.materialShow = false
+                    this.openData = false
                 }
-
                 return
             }
             console.log(deptRow)
@@ -1212,6 +1224,7 @@
             this.danganSelList = selection
         },
         showReset() {
+            this.materialShow = false
             this.ScICMOBillShow = false
         },
         //  鎵撳紑鏁版嵁鍒楄〃寮圭獥
@@ -1220,15 +1233,20 @@
             if (row) {
                 this.zbIndex = row.index - 1
             }
-            if(num) {
-                switch(num) {
-                    case 1: 
-                    this.dialogTitle = '杈呭姪灞炴�у垪琛�'
-                    this.propertyShow = true
-                    this.openData = true
-                    ;break;
+            if (num) {
+                switch (num) {
+                    case 1:
+                        this.dialogTitle = '杈呭姪灞炴�у垪琛�'
+                        this.propertyShow = true
+                        this.openData = true
+                            ; break;
+                    case 3:
+                        this.dialogTitle = '鐗╂枡鍒楄〃'
+                        this.materialShow = true
+                        this.openData = true
+                        break;
                 }
-            }else {
+            } else {
                 this.showReset()
                 this.HSouceBillType = this.getSupType()
                 this.dialogTitle = this.getSupType() + '鍒楄〃'
@@ -1241,8 +1259,8 @@
 };
 </script>
 <style>
-    .input-search-btn {
-        background-color: rgb(24, 144, 255) !important;
-        color: #fff !important;
-    }
+.input-search-btn {
+    background-color: rgb(24, 144, 255) !important;
+    color: #fff !important;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.9.1