From 7fb0a8f0ab16c149484bf043754cd10cfa94de2f Mon Sep 17 00:00:00 2001
From: wangyi <2946747746@qq.com>
Date: 星期一, 19 一月 2026 14:48:05 +0800
Subject: [PATCH] 增加了业务员,保管员和验收员的对应的显示

---
 src/views/basic/gyStockPlace/gyStockPlace.vue |  235 +++++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 156 insertions(+), 79 deletions(-)

diff --git a/src/views/basic/gyStockPlace/gyStockPlace.vue b/src/views/basic/gyStockPlace/gyStockPlace.vue
index 8378ca9..32f4bc2 100644
--- a/src/views/basic/gyStockPlace/gyStockPlace.vue
+++ b/src/views/basic/gyStockPlace/gyStockPlace.vue
@@ -1,5 +1,5 @@
 <template>
-  <div style="padding: 10px">
+  <div style="padding: 10px; position: relative">
     <el-form
       :model="queryParams"
       ref="queryForm"
@@ -23,10 +23,17 @@
             @keyup.enter.native="handleQuery"
             class="ForFilteringSchemes"
           />
+        </el-form-item><el-form-item label="浠撳簱鍚嶇О" prop="HWHName">
+          <el-input
+            v-model="queryParams.HWHName"
+            placeholder="璇疯緭鍏ヤ粨搴撳悕绉�"
+            @keyup.enter.native="handleQuery"
+            class="ForFilteringSchemes"
+          />
         </el-form-item>
         <el-form-item label="缁勭粐">
           <el-select
-            v-model="queryParams.HOrgName"
+            v-model="queryParams.HOrgID"
             placeholder="璇烽�夋嫨"
             class="ForFilteringSchemes"
           >
@@ -34,7 +41,7 @@
               v-for="(item, index) in organizationList"
               :key="index"
               :label="item.Name"
-              :value="item.Name"
+              :value="item.ID.toString()"
             >
             </el-option>
           </el-select>
@@ -62,8 +69,8 @@
           <el-card class="box-card">
             <div slot="header" class="clearfix"><span>杩囨护</span></div>
             <div>
-              <el-form-item label-width="0">
-                <el-row>
+              <el-row>
+                <el-form-item label-width="0">
                   <el-col :span="7">
                     <el-select
                       v-model="queryParams.ColName1"
@@ -104,10 +111,10 @@
                       class="ForFilteringSchemes"
                     />
                   </el-col>
-                </el-row>
-              </el-form-item>
-              <el-form-item label-width="0">
-                <el-row>
+                </el-form-item>
+              </el-row>
+              <el-row>
+                <el-form-item label-width="0">
                   <el-col :span="7">
                     <el-select
                       v-model="queryParams.ColName2"
@@ -149,10 +156,10 @@
                       class="ForFilteringSchemes"
                     />
                   </el-col>
-                </el-row>
-              </el-form-item>
-              <el-form-item label-width="0">
-                <el-row>
+                </el-form-item>
+              </el-row>
+              <el-row>
+                <el-form-item label-width="0">
                   <el-col :span="7">
                     <el-select
                       v-model="queryParams.ColName"
@@ -192,14 +199,24 @@
                       class="ForFilteringSchemes"
                     />
                   </el-col>
-                </el-row>
-              </el-form-item>
+                </el-form-item>
+              </el-row>
             </div>
           </el-card>
         </el-collapse-item>
       </el-collapse>
     </el-form>
     <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="get_PrintReport"
+          id="btn-printer"
+          >搴撲綅鐮佹墦鍗�</el-button
+        >
+      </el-col>
       <el-col :span="1.5">
         <el-button
           type="primary"
@@ -248,12 +265,12 @@
           >闅愯棌鍒楄缃�</el-button
         >
       </el-col>
-      <el-col :span="1.5">
+      <el-col :span="1.5" class="zy-hidden">
         <el-button type="primary" icon="el-icon-help" size="mini" @click="handleSearch"
           >鎼� 绱�</el-button
         >
       </el-col>
-      <el-col :span="1.5">
+      <el-col :span="1.5" class="zy-hidden">
         <el-button type="primary" icon="el-icon-refresh" size="mini" @click="resetQuery"
           >閲� 缃�</el-button
         >
@@ -302,9 +319,9 @@
                 }}</span>
                 <el-button
                   type="text"
-                  @click="handleEdit(row, (OperationType = 3))"
-                  v-else-if="column.property == '鍗曟嵁鍙�'"
-                  >{{ row.鍗曟嵁鍙� }}</el-button
+                  @click.stop="handleEdit(row, (OperationType = 3))"
+                  v-else-if="column.property == '浠撲綅浠g爜'"
+                  >{{ row.浠撲綅浠g爜 }}</el-button
                 >
                 <span v-else>{{ row[column.label] }}</span>
               </div>
@@ -341,6 +358,7 @@
         append-to-body
         class="xsckdBox"
         :before-close="close"
+        @close="beforeEditCloseHandler"
       >
         <edit
           :OperationType="OperationType"
@@ -349,6 +367,7 @@
           :copyType="copyType"
           @editCloseGy="editGyClose"
           v-if="editShow"
+          ref="editRef"
         />
       </el-dialog>
       <el-dialog
@@ -409,6 +428,22 @@
         />
       </el-dialog>
     </div>
+    <el-dialog
+      title="鎵撳嵃妯℃澘閫夋嫨"
+      :visible.sync="openPrintList"
+      width="800px"
+      append-to-body
+    >
+      <PrintList
+        :linterid="encodeURI(rowSel.toString())"
+        :MyMsg="rowSel.toString()"
+        Type="HGyStockPlaceBarCode"
+        HModName="HGyStockPlaceBarCode"
+        @rowEditClose="rowSetClose"
+        v-if="printListShow"
+      />
+      <!-- <div>111</div> -->
+    </el-dialog>
   </div>
 </template>
 
@@ -417,16 +452,21 @@
 import RowSettings from "@/views/component/rowSettings";
 import Edit from "@/views/basic/gyStockPlace/gyStockPlaceEdit";
 import GyStockPlace from "@/views/basic/gyStockPlace/gyStockPlace";
+import PrintList from "@/views/component/printList";
 
 export default {
   name: "GyStockPlace",
-  components: { RowSettings, Edit, GyStockPlace },
+  components: { RowSettings, Edit, GyStockPlace, PrintList },
   props: {
     openPage: { type: String },
   },
   data() {
     return {
-      HModName: "Gy_Warehouse",
+      rowSel: [],
+      danganSelList: [],
+      editRef: null,
+      activeSeach: "",
+      HModName: "Gy_StockPlace",
       editShow: false,
       openEdit: false,
       totalNameList: [],
@@ -479,12 +519,11 @@
       openData: false, //鏁版嵁寮圭獥
       dialogTitle: "",
       zuzhiId: "",
-      organizationList: [], //缁勭粐鍒楄〃
+      organizationList: JSON.parse(sessionStorage["organizationList"]), //缁勭粐鍒楄〃
       subDisabled: false, //缂栬緫椤甸潰淇濆瓨鎸夐挳鏄惁绂佺敤(true绂佺敤锛宖alse鍙敤)
       OperationType: null, //淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
       HInterID: null,
       baseURL: process.env.VUE_APP_BASE_API,
-      user: "admin",
       currentRow: [],
       lastSelectedRowIndex: null, // 鐢ㄤ簬璁板綍涓婃鐐瑰嚮鐨勮绱㈠紩
       lastSelectedRow: null, // 涓婁竴娆¢�変腑鐨勮
@@ -503,7 +542,7 @@
       dateRange: [],
       // 鏌ヨ鍙傛暟
       queryParams: {
-        HOrgID: null,
+        HOrgID: sessionStorage["OrganizationID"],
         HName: null,
         HNumber: null,
         Comparator1: "",
@@ -528,7 +567,7 @@
       btResList: [],
       tableData: [], //閿�鍞嚭搴撳垪琛�(鍒嗛〉鏄剧ず)
       dataList: [],
-      titleData: ["HItemID", "HParentID"], //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+      titleData: ["HItemID", "HParentID", "閫夋嫨"], //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
       pageSizes: [50, 100, 500, 5000, 50000],
       page: 1,
       pageSize: 50,
@@ -566,14 +605,17 @@
     };
   },
   created() {
-    this.fetchData();
+    this.handleQuery();
     this.riqiChange();
   },
   methods: {
+    beforeEditCloseHandler() {
+      this.$refs.editRef.close();
+    },
     // 浠撲綅鍚屾(API涓殏鏃舵病鏈夊搴旂殑API)
     async handleSync() {
       try {
-        let res = await axios.get(this.baseURL + "/Gy_StockPlace/Gy_StockPlaceViewApi", {
+        let res = await axios.get(this.$baseUrl + "/Gy_StockPlace/Gy_StockPlaceViewApi", {
           params: {
             Number: this.queryParams.HSyncNumber,
             Type: "CW",
@@ -590,6 +632,33 @@
         }
       } catch (err) {
         this.$modal.msgError(`鎺ュ彛璇锋眰澶辫触: ${err}`);
+      }
+    },
+    get_PrintReport() {
+      if (this.danganSelList.length == 0) {
+        this.$modal.msgError("璇烽�夋嫨鏁版嵁");
+      } else {
+        this.rowSel = [];
+        for (var i = 0; i < this.danganSelList.length; i++) {
+          this.rowSel.push(`'${this.danganSelList[i]['鏉$爜缂栧彿'].toString()}'`);
+        }
+        this.printListShow = true;
+        this.openPrintList = true;
+        // axios.get(this.$baseUrl + "/Kf_SellOutBill/CheckSellOutBill_IsExist", {
+        //     params: { HInterID: this.rowForm.hmainid },
+        // })
+        //     .then((response) => {
+        //         var result = response.data;
+        //         if (result.count == 1) {
+        //             this.printListShow = true;
+        //             this.openPrintList = true;
+        //         } else {
+        //             this.$modal.msgError(result.code + result.Message);
+        //         }
+        //     })
+        //     .catch((error) => {
+        //         this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+        //     });
       }
     },
     getSummaries(param) {
@@ -623,7 +692,7 @@
     defaintOperationByCompanyName() {
       var result = false;
       axios
-        .get(this.baseURL + "/Xt_getInfo/getCompanyName")
+        .get(this.$baseUrl + "/Xt_getInfo/getCompanyName")
         .then((response) => {
           var data1 = response.data;
           if (data1.count == 1) {
@@ -702,37 +771,6 @@
       this.dbEmitData(this.deptform, this.dialogTypeNum);
       this.deptform = {};
     },
-    fetchData() {
-      //鐧诲綍鐢ㄦ埛淇℃伅
-      axios
-        .get(
-          "http://47.96.97.237/API/Web/GetUser?UserName=001&PassWord=123456&HOrgName=100038"
-        )
-        .then((response) => {
-          let data = response.data.data[0];
-          this.zuzhiId = data.HUSEORGID; //鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇榛樿鐨勭粍缁嘔D
-          this.queryParams.HOrgID = data.HUSEORGID;
-
-          this.user = data.Czymc;
-          axios
-            .get(this.baseURL + "/Web/GetOrganizations", {})
-            .then((response) => {
-              if (response.data.count == 1) {
-                this.organizationList = response.data.data; //缁勭粐鍒楄〃
-                this.queryParams.HOrgName = response.data.data.find(
-                  (e) => e.ID == data.HUSEORGID
-                )?.Name;
-              }
-              this.getList();
-            })
-            .catch((error) => {
-              this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
-            });
-        })
-        .catch((error) => {
-          this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
-        });
-    },
     getList() {
       this.tableShow = false;
       this.loading = true;
@@ -743,11 +781,10 @@
       this.sWhere += "";
       //浠撲綅鍒楄〃
       axios
-        .get(this.baseURL + "/Gy_StockPlace/list1page", {
+        .get(this.$baseUrl + "/Gy_StockPlace/list2Page", {
           params: {
             sWhere: `${this.sWhere}`,
-            user: this.user,
-            Organization: "娴欐睙鏅轰簯杩堟��",
+            user: sessionStorage["HUserName"],
             page: this.page,
             size: this.pageSize,
           },
@@ -836,7 +873,12 @@
               }
             }
             option.data = result;
-            this.DisPlay_HideColumn(this.HModName, this.user, option, this.dataList);
+            this.DisPlay_HideColumn(
+              this.HModName,
+              sessionStorage["HUserName"],
+              option,
+              this.dataList
+            );
           }
         })
         .catch((error) => {
@@ -846,7 +888,7 @@
     DisPlay_HideColumn(HModName, user, option, dataOption) {
       this.totalNameList = [];
       axios
-        .get(this.baseURL + "/Xt_grdAlignment_WMES/grdAlignmentWMESList", {
+        .get(this.$baseUrl + "/Xt_grdAlignment_WMES/grdAlignmentWMESList", {
           params: {
             HModName: HModName,
             user: user,
@@ -994,6 +1036,9 @@
       this.selectedRow = row; // 璁板綍褰撳墠閫変腑鐨勮
       this.lastSelectedRowIndex = this.tableData.indexOf(row);
       this.$refs.tableData.toggleRowSelection(row);
+      if (this.openPage) {
+        this.$emit("deptEmit", row, 9);
+      }
     },
     //閫変腑琛岄珮浜牱寮�
     rowStyle({ row, rowIndex }) {
@@ -1004,16 +1049,35 @@
     //鍙屽嚮琛�
     handleDblclick(row, column, cell, event) {
       this.OperationType = 3;
-      this.handleEdit();
+      if (this.openPage) {
+        this.$emit("deptEmitDb", row, 9);
+      } else {
+        this.handleEdit(row);
+      }
     },
     // 澶氶�夋閫変腑鏁版嵁
     handleSelectionChange(selection) {
+      console.log(selection)
+      this.danganSelList = selection;
+
       // this.rowForm = {}
-      this.ids = selection.map((item) => item.HItemID);
-      this.single = selection.length != 1;
-      this.multiple = !selection.length;
-      if (!this.single) {
+      if (this.openPage) {
+        //鍒楄〃鍗曢��
+        if (selection.length > 1) {
+          const del_row = selection.shift();
+          this.$refs.tableData.toggleRowSelection(del_row, false); //璁剧疆杩欎竴琛屽彇娑堥�変腑
+        }
+        this.rowForm = {};
+        this.ids = selection.map((item) => item.HItemID);
         this.rowForm = selection[0];
+      } else {
+        //澶氶��
+        this.ids = selection.map((item) => item.HItemID);
+        this.single = selection.length != 1;
+        this.multiple = !selection.length;
+        if (!this.single) {
+          this.rowForm = selection[0];
+        }
       }
     },
     //鎵撳紑渚ц竟鎼滅储寮圭獥
@@ -1099,8 +1163,13 @@
       if (this.queryParams.HName) {
         this.sWhere += " and 浠撲綅鍚嶇О like '%" + this.queryParams.HName + "%'";
       }
-      if (this.queryParams.HOrgName) {
-        this.sWhere += " and 缁勭粐鍚嶇О = '" + this.queryParams.HOrgName + "'";
+      if (this.queryParams.HWHName) {
+        this.sWhere += " and 浠撳簱鍚嶇О like '%" + this.queryParams.HWHName + "%'";
+      }
+      if (this.queryParams.HOrgID) {
+        let OrgName = this.organizationList.find((e) => e.ID == this.queryParams.HOrgID)
+          ?.Name;
+        this.sWhere += " and 缁勭粐鍚嶇О = '" + OrgName + "'";
       }
       // this.sWhere += this.addSWhereByOpenType()
       // this.sWhere += this.getOrgIDByUser()
@@ -1122,10 +1191,10 @@
     getOrgIDByUser() {
       var res = "";
       axios
-        .get(this.baseURL + "/Xt_User/getOrgIDListByUser", {
+        .get(this.$baseUrl + "/Xt_User/getOrgIDListByUser", {
           params: {
             HModName: this.HModName,
-            user: this.user,
+            user: sessionStorage["HUserName"],
             HOrgID: this.zuzhiId,
           },
         })
@@ -1152,6 +1221,7 @@
       this.queryParams = {
         HNumber: "",
         HName: "",
+        HWHName: "",
         HBillNo: "",
         HInitTimeCycle: 29,
         HProjectNumber: "",
@@ -1188,7 +1258,8 @@
       });
     },
     //鎵撳紑淇敼缁勪欢寮圭獥
-    handleEdit() {
+    handleEdit(row) {
+      this.rowForm = row;
       this.$nextTick(() => {
         this.openEdit = true;
         this.editShow = true;
@@ -1207,8 +1278,11 @@
         .then(() => {
           if (!this.rowForm.瀹℃牳浜�) {
             axios
-              .get(this.baseURL + "Deltet_Gy_StockPlace", {
-                params: { HItemID: this.rowForm.HItemID.toString(), user: this.user },
+              .get(this.$baseUrl + "Deltet_Gy_StockPlace", {
+                params: {
+                  HItemID: this.rowForm.HItemID.toString(),
+                  user: sessionStorage["HUserName"],
+                },
               })
               .then((response) => {
                 if (response.data.count == 1) {
@@ -1278,10 +1352,10 @@
         }
       }
       var sSubStr = JSON.stringify(num);
-      var sMainSub = sSubStr + "&鍜�" + this.user;
+      var sMainSub = sSubStr + "&鍜�" + sessionStorage["HUserName"];
       axios({
         method: "post",
-        url: this.baseURL + "/Gy_Warehouse/Gy_Process_Excel",
+        url: this.$baseUrl + "/Gy_Warehouse/Gy_Process_Excel",
         data: {
           sMainSub: sMainSub,
         },
@@ -1342,4 +1416,7 @@
   flex-direction: row;
   width: 60%;
 }
+.zy-hidden {
+  display: none;
+}
 </style>

--
Gitblit v1.9.1