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/purchase/cgPoInStockBill/cgPoInStockBill.vue |  170 +++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 117 insertions(+), 53 deletions(-)

diff --git a/src/views/purchase/cgPoInStockBill/cgPoInStockBill.vue b/src/views/purchase/cgPoInStockBill/cgPoInStockBill.vue
index f27247e..c76e1b7 100644
--- a/src/views/purchase/cgPoInStockBill/cgPoInStockBill.vue
+++ b/src/views/purchase/cgPoInStockBill/cgPoInStockBill.vue
@@ -9,15 +9,27 @@
       class="searchBox"
     >
       <el-row>
-        <el-form-item label="鏃ユ湡" style="margin-left: 100px">
+        <el-form-item label="寮�濮嬫棩鏈�" style="margin-left: 100px">
           <el-date-picker
-            v-model="dateRange"
+            v-model="sTime"
+            type="date"
+            placeholder="寮�濮嬫棩鏈�"
+            style="width: 150px"
+            :disabled="queryParams.HInitTimeCycle != -1"
             value-format="yyyy-MM-dd"
-            type="daterange"
-            range-separator="-"
-            start-placeholder="寮�濮嬫棩鏈�"
-            end-placeholder="缁撴潫鏃ユ湡"
-          ></el-date-picker>
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="缁撴潫鏃ユ湡">
+          <el-date-picker
+            v-model="eTime"
+            type="date"
+            placeholder="缁撴潫鏃ユ湡"
+            style="width: 150px"
+            :disabled="queryParams.HInitTimeCycle != -1"
+            value-format="yyyy-MM-dd"
+          >
+          </el-date-picker>
         </el-form-item>
         <el-form-item label="鏃ユ湡闂撮殧">
           <el-select
@@ -245,12 +257,15 @@
         >
       </el-col>
       <el-col :span="1.5">
+        <el-button type="primary" icon="el-icon-plus" size="mini" @click="onClickMethod_pushBarCodeProduce(row = rowForm, OperationType = 4)" :disabled="disabledFlag_pushBarCode">涓嬫帹鏉$爜</el-button>
+      </el-col>
+      <el-col :span="1.5">
         <el-button
           type="primary"
           icon="el-icon-edit"
           size="mini"
           :disabled="single"
-          @click="handleEdit((row = rowForm), (OperationType = 3))"
+          @click="handleEdit((row = rowForm), (OperationType = 3), (copyType = -1))"
           >缂栬緫</el-button
         >
       </el-col>
@@ -260,7 +275,7 @@
           icon="el-icon-edit"
           size="mini"
           :disabled="single"
-          @click="handleEdit((row = rowForm), (OperationType = 2))"
+          @click="handleEdit((row = rowForm), (OperationType = 2), (copyType = 1))"
           >澶嶅埗</el-button
         >
       </el-col>
@@ -449,7 +464,7 @@
                 }}</span>
                 <el-button
                   type="text"
-                  @click="handleEdit(row, (OperationType = 3))"
+                  @click.stop="handleEdit(row, (OperationType = 3), (copyType = 1))"
                   v-else-if="column.property == '鍗曟嵁鍙�'"
                   >{{ row.鍗曟嵁鍙� }}</el-button
                 >
@@ -480,16 +495,22 @@
           v-if="rowHideShow"
         />
       </el-dialog>
+       <!-- 涓嬫帹鏉$爜 -->
+      <el-dialog title="涓嬫帹鏉$爜" :visible.sync="openFlag_pushBarCode" width="1480px" class="xsckdBox" append-to-body :before-close="close">
+        <div style="height: 70vh" v-if="openFlag_pushBarCode">
+          <iframe :src="iframeUrl" frameborder="0" width="100%" height="100%"></iframe>
+        </div>
+      </el-dialog>
       <!-- 缂栬緫 -->
       <el-dialog
-        title="缂栬緫鑱屽憳"
+        title="缂栬緫鏀舵枡閫氱煡鍗�"
         :visible.sync="openEdit"
         width="1480px"
         append-to-body
         class="xsckdBox"
         :before-close="close"
       >
-        <edit
+        <!-- <edit
           :OperationType="OperationType"
           :linterid="this.rowForm.HItemID"
           :HSouceBillType="this.rowForm.HSourceBillType"
@@ -497,7 +518,10 @@
           :copyType="copyType"
           @editCloseGy="editGyClose"
           v-if="editShow"
-        />
+        /> -->
+        <div style="height: 70vh" v-if="openEdit">
+          <iframe :src="iframeUrl" frameborder="0" width="100%" height="100%"></iframe>
+        </div>
       </el-dialog>
       <el-dialog
         :title="upload.title"
@@ -597,24 +621,26 @@
 import dayjs from "dayjs";
 
 export default {
-  name: "GySource",
+  name: "cgPoInStockBill",
   components: { RowSettings, gySource },
   props: {
     openPage: { type: String },
   },
   data() {
     return {
+      iframeUrl: "",
       activeSeach: "",
       dateRange: [],
-      HModName: "Cg_POOrderBillList",
+      HModName: "cgPoInStockBill",
       editShow: false,
       openEdit: false,
+      openFlag_pushBarCode: false,              //涓嬫帹鏉$爜-寮圭獥鏄剧ず鏍囪
       totalNameList: [],
       tableShow: true,
       openPrintList: false,
       printListShow: false,
       HClassTag: "ForFilteringSchemes", //杩囨护鏉′欢鐨刢lass绫�
-      HBillType: "1202",
+      HBillType: "1103",
       openBtnHide: false,
       btnHideShow: false,
       rowHideShow: false,
@@ -646,6 +672,7 @@
         { label: "杩�30澶�", value: 29 },
         { label: "杩戝崐骞�", value: 180 },
         { label: "杩戜竴骞�", value: 365 },
+        { label: "浠绘剰闂撮殧", value: -1 },
       ],
       hPriceTypeList: ["鎴愭湰浠�", "缁撶畻浠�"],
       addBtnShow: false,
@@ -664,11 +691,11 @@
       OperationType: null, //淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
       HInterID: null,
       baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/",
-      user: "admin",
       currentRow: [],
       lastSelectedRowIndex: null, // 鐢ㄤ簬璁板綍涓婃鐐瑰嚮鐨勮绱㈠紩
       lastSelectedRow: null, // 涓婁竴娆¢�変腑鐨勮
       selectedRow: null, // 褰撳墠閫変腑鐨勮
+      disabledFlag_pushBarCode:true,        //涓嬫帹鏉$爜 鎸夐挳绂佺敤鏍囪
       rowForm: {},
       checkedSysZb: [],
       editData: [], //鐢熶骇璧勬枡瀛愯〃
@@ -759,10 +786,18 @@
   },
   mounted() {
     this.queryParams.HOrgID = sessionStorage["Organization"];
+    window.editGyClose = () => {
+      this.editGyClose(); // 缁勪欢鍐呯殑鏂规硶缁戝畾鍒皐indows
+    };
   },
   created() {
     this.riqiChange();
-    this.getList();
+    // this.getList();
+    this.handleQuery();
+  },
+  beforeDestroy() {
+    // 缁勪欢閿�姣佹椂娓呯悊鍏ㄥ眬鏂规硶锛岄伩鍏嶅唴瀛樻硠婕�
+    delete window.editGyClose;
   },
   methods: {
     onDateScanOptionChangerHandler(e) {
@@ -805,7 +840,7 @@
     defaintOperationByCompanyName() {
       var result = false;
       axios
-        .get(this.baseURL + "/Xt_getInfo/getCompanyName")
+        .get(this.$baseUrl + "/Xt_getInfo/getCompanyName")
         .then((res) => {
           var data1 = res.data;
           if (data1.count == 1) {
@@ -840,6 +875,9 @@
       this.getList();
     },
     riqiChange() {
+      if (this.queryParams.HInitTimeCycle == -1) {
+        return;
+      }
       const end = new Date();
       const start = new Date();
       start.setTime(start.getTime() - 3600 * 1000 * 24 * this.queryParams.HInitTimeCycle);
@@ -851,7 +889,6 @@
       const ddE = String(end.getDate()).padStart(2, "0");
       this.sTime = yyyyS + "-" + mmS + "-" + ddS;
       this.eTime = yyyyE + "-" + mmE + "-" + ddE;
-      this.dateRange = [this.sTime, this.eTime];
     },
     organizationChange(val) {
       // let options=undefined
@@ -897,17 +934,15 @@
         this.pageSize = 50;
       }
 
-      if (this.dateRange.length > 0) {
-        this.sWhere +=
-          " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.dateRange[0] + "'";
-        this.sWhere +=
-          " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + this.dateRange[1] + "'";
+      if (this.sTime && this.eTime) {
+        this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.sTime + "'";
+        this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + this.eTime + "'";
       }
       try {
-        let res = await axios.get(this.baseURL + "Cg_POInStockBill/page", {
+        let res = await axios.get(this.$baseUrl + "Cg_POInStockBill/page", {
           params: {
             sWhere: this.sWhere,
-            user: this.user,
+            user: sessionStorage["HUserName"],
             page: this.page,
             size: this.pageSize,
           },
@@ -995,7 +1030,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 (err) {
         this.$modal.msgError(`鑾峰彇鏀舵枡閫氱煡鍗曢敊璇�: ${err}`);
@@ -1004,7 +1044,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,
@@ -1162,7 +1202,7 @@
     //鍙屽嚮琛�
     handleDblclick(row, column, cell, event) {
       this.OperationType = 3;
-      this.handleEdit();
+      this.handleEdit(row, 3, 1);
     },
     // 澶氶�夋閫変腑鏁版嵁
     handleSelectionChange(selection) {
@@ -1172,6 +1212,9 @@
       this.multiple = !selection.length;
       if (!this.single) {
         this.rowForm = selection[0];
+        this.disabledFlag_pushBarCode = false;
+      }else{
+        this.disabledFlag_pushBarCode = true;
       }
     },
     //鎵撳紑渚ц竟鎼滅储寮圭獥
@@ -1279,10 +1322,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,
           },
         })
@@ -1332,18 +1375,29 @@
     close() {
       this.tableShow = true;
       this.openEdit = false;
+      this.openFlag_pushBarCode = false;
+      this.disabledFlag_pushBarCode = true;
       this.getList();
     },
     //鎵撳紑鏂板缁勪欢寮圭獥
     handleAddEdit() {
       this.rowForm.HItemID = 0;
+      this.iframeUrl = `/iframe/CgPoInStockBillEdit?HInterID=${0}&OperationType=${1}&copyType=${-1}`;
       this.$nextTick(() => {
         this.openEdit = true;
         this.editShow = true;
       });
     },
+    //涓嬫帹鐢熸垚鏉$爜
+    onClickMethod_pushBarCodeProduce(row, OperationType) {
+      this.iframeUrl = `/iframe/BarCode_JinLong?OperationType=${OperationType}&HSourceInterID=${row.hmainid}&HSourceEntryID=${row.hsubid}&HSourceBillType=${row.HBillType}&HSourceBillNo=${row.鍗曟嵁鍙穧`;
+      this.$nextTick(() => {
+        this.openFlag_pushBarCode = true;
+      });
+    },
     //鎵撳紑淇敼缁勪欢寮圭獥
-    handleEdit() {
+    handleEdit(row, OperationType, copyType) {
+      this.iframeUrl = `/iframe/CgPoInStockBillEdit?HInterID=${row.hmainid}&OperationType=${OperationType}&copyType=${copyType}`;
       this.$nextTick(() => {
         this.openEdit = true;
         this.editShow = true;
@@ -1357,27 +1411,29 @@
     },
     /** 鍒犻櫎鎸夐挳鎿嶄綔 */
     handleDelete() {
+      console.log("this.rowForm", this.rowForm)
       this.$modal
         .confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠")
         .then(() => {
           if (!this.rowForm.瀹℃牳浜�) {
             axios
-              .get(this.baseURL + "Cg_POInStockBill/DeltetPOInStockBill", {
+              .get(this.$baseUrl + "Cg_POInStockBill/DeltetPOInStockBill", {
                 params: {
-                  HInter: this.rowForm.hmainid.toString(),
-                  HsupId: this.rowForm.HsupId,
-                  HQty: this.rowForm.HQty,
-                  HSourceInterID: this.rowForm.HSourceInterID,
-                  HSourceEntryID: this.rowForm.HSourceEntryID,
-                  user: this.user,
+                  HInterID: this.rowForm.hmainid.toString(),
+                  HsupId: this.rowForm.HSupID,
+                  HQty: this.rowForm['鏁伴噺'],
+                  HSourceInterID: this.rowForm['婧愬崟涓诲唴鐮�'],
+                  HSourceEntryID: this.rowForm['婧愬崟瀛愬唴鐮�'],
+                  user: sessionStorage["HUserName"],
                 },
               })
               .then((res) => {
+                
                 if (res.data.count == 1) {
                   this.handleQuery();
                   this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
                 } else {
-                  this.$modal.msgError("閿欒:" + result.code + result.Message);
+                  this.$modal.msgError("閿欒:" + res.data.code + res.data.Message);
                 }
               })
               .catch((error) => {
@@ -1394,8 +1450,12 @@
       var InterID = form.HItemID || form.HInterID || form.hmainid;
       //閫昏緫瀹℃牳鏂规硶
       axios
-        .get(this.baseURL + "/Cg_POInStockBill/AuditCg_POInStockBill", {
-          params: { HInterID: InterID, IsAudit: num, CurUserName: this.user },
+        .get(this.$baseUrl + "/Cg_POInStockBill/AuditCg_POInStockBill", {
+          params: {
+            HInterID: InterID,
+            IsAudit: num,
+            CurUserName: sessionStorage["HUserName"],
+          },
         })
         .then((res) => {
           let result = res.data;
@@ -1415,12 +1475,12 @@
       let HInterID = form.HItemID || form.HInterID || form.hmainid;
       try {
         let res = await axios.get(
-          `${this.baseURL}/Cg_POInStockBill/CloseCg_POInStockBill`,
+          `${this.$baseUrl}/Cg_POInStockBill/CloseCg_POInStockBill`,
           {
             params: {
               HInterID: HInterID,
               Type: num,
-              user: this.user,
+              user: sessionStorage["HUserName"],
             },
           }
         );
@@ -1442,13 +1502,13 @@
       let HEntryID = form.HEntryID || form.hsubid;
       try {
         let res = await axios.get(
-          `${this.baseURL}/Cg_POInStockBill/CloseRowCg_POInStockBill`,
+          `${this.$baseUrl}/Cg_POInStockBill/CloseRowCg_POInStockBill`,
           {
             params: {
               HInterID: HInterID,
               HEntryID: HEntryID,
               ISAudit: num,
-              CurUserName: this.user,
+              CurUserName: sessionStorage["HUserName"],
             },
           }
         );
@@ -1469,12 +1529,12 @@
       let HInterID = form.HItemID || form.HInterID || form.hmainid;
       try {
         let res = await axios.get(
-          `${this.baseURL}/Cg_POInStockBill/DropCg_POInStockBill`,
+          `${this.$baseUrl}/Cg_POInStockBill/DropCg_POInStockBill`,
           {
             params: {
               HInterID: HInterID,
               Type: num,
-              user: this.user,
+              user: sessionStorage["HUserName"],
             },
           }
         );
@@ -1495,8 +1555,12 @@
       var InterID = form.HItemID || form.HInterID;
       //閫昏緫瀹℃牳鏂规硶
       axios
-        .get(this.baseURL + "/Gy_Employee/StopGy_Employee", {
-          params: { HInterID: InterID, IsStop: num, CurUserName: this.user },
+        .get(this.$baseUrl + "/Gy_Employee/StopGy_Employee", {
+          params: {
+            HInterID: InterID,
+            IsStop: num,
+            CurUserName: sessionStorage["HUserName"],
+          },
         })
         .then((res) => {
           let result = res.data;
@@ -1562,10 +1626,10 @@
         }
       }
       var sSubStr = JSON.stringify(num);
-      var sMainSub = sSubStr + "&鍜�" + this.user;
+      var sMainSub = sSubStr + "&鍜�" + sessionStorage["HUserName"];
       axios({
         method: "post",
-        url: this.baseURL + "/Gy_Source/Gy_Source_btnSave",
+        url: this.$baseUrl + "/Gy_Source/Gy_Source_btnSave",
         data: {
           sMainSub: sMainSub,
         },

--
Gitblit v1.9.1