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/sell/XsSeOutStockBillEdit.vue |  113 +++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 82 insertions(+), 31 deletions(-)

diff --git a/src/views/sell/XsSeOutStockBillEdit.vue b/src/views/sell/XsSeOutStockBillEdit.vue
index b2eaeb2..be337c7 100644
--- a/src/views/sell/XsSeOutStockBillEdit.vue
+++ b/src/views/sell/XsSeOutStockBillEdit.vue
@@ -4,10 +4,10 @@
       <el-button type="primary" @click="handleAdd((OperationType = 1))" v-if="addBtnShow"
         >鏂板</el-button
       >
-      <el-button type="primary" @click="submitForm" :disabled="subDisabled"
+      <!-- <el-button type="primary" @click="submitForm" :disabled="subDisabled"
         >淇� 瀛�</el-button
       >
-      <el-button type="primary" @click="set_CheckBill(0, form)">瀹� 鏍�</el-button>
+      <el-button type="primary" @click="set_CheckBill(0, form)">瀹� 鏍�</el-button> -->
       <el-button type="primary" @click="close">閫� 鍑�</el-button>
       <!-- <el-button @click="cancel">鍙� 娑�</el-button> -->
     </div>
@@ -20,7 +20,7 @@
           <el-row>
             <el-col :span="6">
               <el-form-item label="鍗曟嵁缂栧彿" prop="HBillNo">
-                <el-input v-model="form.HBillNo" placeholder="璇疯緭鍏ュ崟鎹紪鍙�" />
+                <el-input v-model="form.HBillNo" placeholder="璇疯緭鍏ュ崟鎹紪鍙�" disabled />
               </el-form-item>
             </el-col>
             <el-col :span="6">
@@ -53,11 +53,7 @@
             <el-col :span="6">
               <el-form-item label="浠撳簱" prop="HWHName">
                 <el-input v-model="form.HWHName" placeholder="璇烽�夋嫨浠撳簱" disabled>
-                  <el-button
-                    slot="append"
-                    icon="el-icon-search"
-                    @click="openDataDialog(1)"
-                  ></el-button>
+                  <el-button slot="append" icon="el-icon-search"></el-button>
                 </el-input>
               </el-form-item>
             </el-col>
@@ -87,22 +83,26 @@
                 <el-input v-model="form.HLinkPhone" placeholder="璇疯緭鍏ヨ仈绯荤數璇�" />
               </el-form-item>
             </el-col>
+          </el-row>
+          <el-row>
             <el-col :span="6">
               <el-form-item label="澶囨敞" prop="HRemark">
                 <el-input v-model="form.HRemark" placeholder="璇疯緭鍏ュ娉�" />
               </el-form-item>
             </el-col>
-          </el-row>
-          <el-row>
             <el-col :span="6">
               <el-form-item label="椤圭洰浠g爜" prop="HProjectNumber">
-                <el-input v-model="form.HProjectNumber" placeholder="璇烽�夋嫨椤圭洰浠g爜">
+                <el-input
+                  v-model="form.HProjectNumber"
+                  placeholder="璇烽�夋嫨椤圭洰浠g爜"
+                  disabled
+                >
                   <el-button slot="append" icon="el-icon-search"></el-button>
                 </el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">
-              <el-form-item label="椤圭洰鍚嶇О" prop="HProjectName">
+              <el-form-item label="椤圭洰鍚嶇О" prop="HProjectName" class="zy-hidden">
                 <el-input v-model="form.HProjectName" disabled> </el-input>
               </el-form-item>
             </el-col>
@@ -357,7 +357,7 @@
             ></el-input-number>
           </template>
         </el-table-column>
-        <el-table-column align="center" label="褰撳墠搴撳瓨" width="120">
+        <el-table-column align="center" label="褰撳墠搴撳瓨" width="120" v-if="false">
           <template slot-scope="scope">
             <span>{{ scope.row.HInventoryQty }}</span>
           </template>
@@ -397,9 +397,15 @@
       width="1280px"
       append-to-body
     >
-      <Dept @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="deptShow" />
-      <Warehouse @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="warehouseShow" />
-      <Material @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="materialShow" />
+      <div style="height: 70vh" v-if="openData">
+        <iframe
+          :src="iframeUrl"
+          frameborder="0"
+          width="100%"
+          height="100%"
+          ref="iframeInstance"
+        ></iframe>
+      </div>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="deptClickSub">纭� 瀹�</el-button>
         <el-button @click="deptClose">鍙� 娑�</el-button>
@@ -442,6 +448,9 @@
   },
   data() {
     return {
+      dialogEnabledNum: -1,
+      iframeUrl: "",
+      iframeInstance: null,
       OperationType2: 1,
       HInterID2: 0,
       CopyType2: 1,
@@ -521,7 +530,13 @@
     this.getdata();
     this.getHSourceBillType();
   },
+  mounted() {
+    window.iFrameMaterialCallback = (data) => {
+      this.iFrameMaterialCallback(data); // 缁勪欢鍐呯殑鏂规硶缁戝畾鍒皐indows
+    };
+  },
   beforeDestroy() {
+    delete window.iFrameMaterialCallback;
     if (window.parent) {
       console.log(window.parent);
     } else {
@@ -529,9 +544,22 @@
     }
   },
   methods: {
+    iFrameMaterialCallback(data) {
+      // 鐗╂枡鍒楄〃杩斿洖鐩戝惉鍑芥暟
+      console.log("iFrameMaterialCallbackData: ", data);
+      this.editData[this.zbIndex].HMaterID = data.HItemID;
+      this.editData[this.zbIndex].鐗╂枡浠g爜 = data.鐗╂枡浠g爜;
+      this.editData[this.zbIndex].鐗╂枡鍚嶇О = data.鐗╂枡鍚嶇О;
+      this.editData[this.zbIndex].HUnitID = data.HUnitID;
+      this.editData[this.zbIndex].瑙勬牸鍨嬪彿 = data.瑙勬牸鍨嬪彿;
+      this.editData[this.zbIndex].璁¢噺鍗曚綅 = data.璁¢噺鍗曚綅鍚嶇О;
+      this.editData[this.zbIndex].HTaxPrice = data.鍚◣鎴愭湰浠�;
+      this.editData[this.zbIndex].HTaxRate = data.榛樿绋庣巼;
+      this.deptClose();
+    },
     getHSourceBillType() {
       axios
-        .get(`${this.baseURL}/Web/GetHSourceBillType`, {
+        .get(`${this.$baseUrl}/Web/GetHSourceBillType`, {
           params: {
             HName: "鍙戣揣閫氱煡鍗�",
             Num: 2,
@@ -557,7 +585,7 @@
     },
     fetchData() {
       axios
-        .get(this.baseURL + "/Web/GetOrganizations", {})
+        .get(this.$baseUrl + "/Web/GetOrganizations", {})
         .then((response) => {
           if (response.data.count == 1) {
             this.organizationList = response.data.data.map((item) => {
@@ -588,7 +616,7 @@
         for (var i = 0; i < data.length; i++) {
           // this.getPushSourceBillInit(data[i].hmainid, data[i].hsubid);
           axios
-            .get(this.baseURL + "/Xs_SeOutStockBill/cx", {
+            .get(this.$baseUrl + "/Xs_SeOutStockBill/cx", {
               params: {
                 HInterID: data[i].hmainid,
               },
@@ -711,7 +739,7 @@
     //鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栨簮鍗曢攢鍞鍗曟暟鎹�
     getPushSourceBillInit(HSourceInterID, HSourceEntryID) {
       axios
-        .get(this.baseURL + "/Xs_SeOrderBill/loadXs_SeOrderBill_Push", {
+        .get(this.$baseUrl + "/Xs_SeOrderBill/loadXs_SeOrderBill_Push", {
           params: {
             HInterID: HSourceInterID,
             HSubID: HSourceEntryID,
@@ -774,8 +802,25 @@
       this.deptform = deptRow;
     },
     deptClickSub() {
-      this.dbEmitData(this.deptform, this.dialogTypeNum);
-      this.deptform = {};
+      // this.dbEmitData(this.deptform, this.dialogTypeNum);
+      // this.deptform = {};
+      let selectedRow = this.$refs.iframeInstance.contentWindow.selectedRow;
+      console.log(selectedRow);
+      if (this.dialogEnabledNum == 3) {
+        // 淇敼閫変腑鐗╂枡瀵瑰簲瀛愯〃鏁版嵁
+
+        this.editData[this.zbIndex].HMaterID = selectedRow.HItemID;
+        this.editData[this.zbIndex].鐗╂枡浠g爜 = selectedRow.鐗╂枡浠g爜;
+        this.editData[this.zbIndex].鐗╂枡鍚嶇О = selectedRow.鐗╂枡鍚嶇О;
+        this.editData[this.zbIndex].HUnitID = selectedRow.HUnitID;
+        this.editData[this.zbIndex].瑙勬牸鍨嬪彿 = selectedRow.瑙勬牸鍨嬪彿;
+        this.editData[this.zbIndex].璁¢噺鍗曚綅 = selectedRow.璁¢噺鍗曚綅鍚嶇О;
+        this.editData[this.zbIndex].HTaxPrice = selectedRow.鍚◣鎴愭湰浠�;
+        this.editData[this.zbIndex].HTaxRate = selectedRow.榛樿绋庣巼;
+      }
+
+      selectedRow = null; // 鎵嬪姩缃┖锛屾柟渚縂C鍥炴敹锛岄槻姝㈡硠闇�
+      this.deptClose();
     },
     deptClose() {
       this.deptform = {};
@@ -876,7 +921,7 @@
     //鏍规嵁鐢ㄦ埛鑾峰彇瀵瑰簲鑱屽憳銆侀儴闂ㄣ�侀攢鍞富绠�
     getCzyglByUser() {
       axios
-        .get(this.baseURL + "/Xs_SeOrderBill/getCzyglByUser", {
+        .get(this.$baseUrl + "/Xs_SeOrderBill/getCzyglByUser", {
           params: { CurUserName: sessionStorage["HUserName"] },
         })
         .then((response) => {
@@ -909,7 +954,7 @@
     },
     getHBillNo() {
       axios
-        .get(this.baseURL + "/WEBSController/GetMaxBillNoAndID_Json", {
+        .get(this.$baseUrl + "/WEBSController/GetMaxBillNoAndID_Json", {
           params: {
             HBillType: "1402",
           },
@@ -928,7 +973,7 @@
     //鑾峰彇閿�鍞嚭搴撳崟瀵瑰簲鐨勬潯鐮佹槑缁�
     getBarCodeNoteBySellOutBill(rowHmainid) {
       axios
-        .get(this.baseURL + "/Kf_SellOutBill/BarCodeNote", {
+        .get(this.$baseUrl + "/Kf_SellOutBill/BarCodeNote", {
           params: { HInterID: rowHmainid },
         })
         .then((response) => {
@@ -947,7 +992,7 @@
     //#region 鏍规嵁瀹㈡埛鑾峰彇瀹㈡埛浣欓
     getCustomerBalance(HCusID) {
       axios
-        .get(this.baseURL + "/Xs_CusRatingChangeBill/getCustomerBalance", {
+        .get(this.$baseUrl + "/Xs_CusRatingChangeBill/getCustomerBalance", {
           params: { HCusID: HCusID, CurUserName: sessionStorage["HUserName"] },
         })
         .then((response) => {
@@ -965,7 +1010,7 @@
       this.reset();
       let rowHmainid = this.HInterID2;
       axios
-        .get(this.baseURL + "/Xs_SeOutStockBill/cx", {
+        .get(this.$baseUrl + "/Xs_SeOutStockBill/cx", {
           params: { HInterID: rowHmainid },
         })
         .then((response) => {
@@ -1075,7 +1120,7 @@
     //鏍规嵁瀹㈡埛甯﹀嚭鑱旂郴浜恒�佽仈绯荤數璇�
     getCustomerByCusID(HCusID) {
       axios
-        .get(this.baseURL + "/Xs_SeOrderBill/getCustomerByCusID", {
+        .get(this.$baseUrl + "/Xs_SeOrderBill/getCustomerByCusID", {
           params: {
             HCusID: HCusID,
           },
@@ -1228,7 +1273,7 @@
       var sql = `exec h_p_Xt_GetMaxBillNo_SubType '1205','${this.form.HDate}',0,0,0,'${Type}','${this.form.HDeptID}'`;
       axios({
         method: "get",
-        url: this.baseURL + "/CommonModel/searchMethod",
+        url: this.$baseUrl + "/CommonModel/searchMethod",
         params: { sql: sql, user: sessionStorage["HUserName"], ModRightNameCheck: "" },
       })
         .then((response) => {
@@ -1267,7 +1312,7 @@
                 this.OperationType;
               axios({
                 method: "post",
-                url: this.baseURL + "/Kf_SellOutBill/SaveSellOutBillList",
+                url: this.$baseUrl + "/Kf_SellOutBill/SaveSellOutBillList",
                 data: {
                   msg: sMainSub,
                 },
@@ -1297,7 +1342,7 @@
       var InterID = form.hmainid || form.HInterID;
       //閫昏緫瀹℃牳鏂规硶
       axios
-        .get(this.baseURL + "/Kf_SellOutBill/AuditKf_SellOutBill", {
+        .get(this.$baseUrl + "/Kf_SellOutBill/AuditKf_SellOutBill", {
           params: {
             HInterID: InterID,
             IsAudit: num,
@@ -1323,6 +1368,7 @@
     },
     //  鎵撳紑鏁版嵁鍒楄〃寮圭獥
     openDataDialog(num, row) {
+      this.dialogEnabledNum = num;
       if (row) {
         this.zbIndex = row.index - 1;
       }
@@ -1337,6 +1383,7 @@
         this.openData = true;
       } else if (num == 3) {
         this.dialogTitle = "鐗╂枡鍒楄〃";
+        this.iframeUrl = `/iframe/GyMaterial?openType=2`;
         this.materialShow = true;
         this.openData = true;
       }
@@ -1348,4 +1395,8 @@
 .xsckdBox .el-date-editor.el-input {
   width: 100%;
 }
+
+.zy-hidden {
+  display: none;
+}
 </style>

--
Gitblit v1.9.1