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/sellOut/sellOutBillEdit.vue |  128 ++++++++++++++++++++++++++----------------
 1 files changed, 80 insertions(+), 48 deletions(-)

diff --git a/src/views/sell/sellOut/sellOutBillEdit.vue b/src/views/sell/sellOut/sellOutBillEdit.vue
index 83812f3..c54c9eb 100644
--- a/src/views/sell/sellOut/sellOutBillEdit.vue
+++ b/src/views/sell/sellOut/sellOutBillEdit.vue
@@ -43,7 +43,7 @@
             <el-col :span="6">
               <el-form-item label="閿�鍞憳" prop="HEmpName">
                 <el-input v-model="form.HEmpName" placeholder="璇疯緭鍏ラ攢鍞憳" disabled>
-                  <el-button slot="append" icon="el-icon-search"></el-button>
+                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4)"></el-button>
                 </el-input>
               </el-form-item>
             </el-col>
@@ -352,13 +352,14 @@
       <Dept @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="deptShow" />
       <Warehouse @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="warehouseShow" />
       <Material @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="materialShow" />
+      <GyEmployee @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyEmployeeShow" />
       <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="openRowHide" width="816px" append-to-body>
-      <RowSettings :colName="btResList" HModName="Kf_SellOutBillList" @rowEditClose="rowSetClose" v-if="rowHideShow" />
+      <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose" v-if="rowHideShow" />
     </el-dialog>
   </div>
 </template>
@@ -369,11 +370,12 @@
 import Warehouse from '@/views/component/warehouse'
 import Material from '@/views/component/material'
 import RowSettings from '@/views/component/rowSettings'
+import GyEmployee from '@/views/basic/gyEmployee/gyEmployee.vue'
 import moment from 'moment';
 
 export default {
-  name: 'SellOutBill',
-  components: { Dept, Warehouse, Material, RowSettings },
+  name: 'SellOutBillEdit',
+  components: { Dept, Warehouse, Material, RowSettings, GyEmployee },
   props: {
     OperationType: { type: Number, },
     linterid: { type: Number, },
@@ -383,6 +385,7 @@
   },
   data() {
     return {
+      HModName: "Kf_SellOutBill",
       formShow: false,
       temp: undefined,
       formLoading: true,
@@ -397,6 +400,7 @@
       deptShow: false,//閮ㄩ棬鏁版嵁缁勪欢
       warehouseShow: false,//浠撳簱鏁版嵁缁勪欢
       materialShow: false,//鐗╂枡鏁版嵁缁勪欢
+      gyEmployeeShow: false,//閿�鍞憳鏁版嵁缁勪欢
       deptform: {},//寮圭獥閫変腑鏁版嵁
       openData: false,//鏁版嵁寮圭獥
       dialogTitle: '',
@@ -464,12 +468,9 @@
     this.fetchData()
     this.getdata()
   },
-  beforeDestroy() {
-    this.$destroy()
-  },
   methods: {
     fetchData() {
-      axios.get(this.baseURL + "/Web/GetOrganizations", {
+      axios.get(this.$baseUrl + "/Web/GetOrganizations", {
       }).then(response => {
         if (response.data.count == 1) {
           this.organizationList = response.data.data;//缁勭粐鍒楄〃
@@ -479,10 +480,8 @@
       });
     },
     getdata() {
-      console.log(this.copyType, this.OperationType)
       this.formShow = false
       this.formLoading = true
-
       if (this.OperationType == 4) {
         this.zzSelDis = true
         this.handleAdd()
@@ -490,7 +489,7 @@
         var dataArray = [];
         for (var i = 0; i < data.length; i++) {
           // this.getPushSourceBillInit(data[i].hmainid, data[i].hsubid);
-          axios.get(this.baseURL + '/Xs_SeOrderBill/loadXs_SeOrderBill_Push', {
+          axios.get(this.$baseUrl + '/Xs_SeOrderBill/loadXs_SeOrderBill_Push', {
             params: {
               "HInterID": data[i].hmainid
               , "HSubID": data[i].hsubid
@@ -609,7 +608,7 @@
     },
     //鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栨簮鍗曢攢鍞鍗曟暟鎹�
     getPushSourceBillInit(HSourceInterID, HSourceEntryID) {
-      axios.get(this.baseURL + '/Xs_SeOrderBill/loadXs_SeOrderBill_Push', {
+      axios.get(this.$baseUrl + '/Xs_SeOrderBill/loadXs_SeOrderBill_Push', {
         params: {
           "HInterID": HSourceInterID
           , "HSubID": HSourceEntryID
@@ -630,10 +629,8 @@
       this.openRowHide = true
     },
     rowSetClose(val) {
-
       this.rowHideShow = false
       this.openRowHide = val
-      this.$destroy()
     },
 
     organizationChange(val) {
@@ -643,28 +640,39 @@
     //閮ㄩ棬寮圭獥璧嬪��
     dbEmitData(deptRow, num) {
       // num=1閮ㄩ棬 num=2鍑哄簱浠撳簱
-      if (num == 1) {
-        this.form.HDeptName = deptRow.閮ㄩ棬鍚嶇О
-        this.form.HDeptID = deptRow.HItemID
-        this.form.HEmpID = deptRow.HEmpID
-        this.form.HManagerName = deptRow.璐熻矗浜�
-        this.openData = false
-      } else if (num == 2) {
-        this.editData[this.zbIndex].HWHID = deptRow.HItemID;
-        this.editData[this.zbIndex].鍙戣揣浠撳簱 = deptRow.浠撳簱鍚嶇О;
-        this.openData = false
+      if (deptRow.HItemID) {
+        if (num == 1) {
+          this.form.HDeptName = deptRow.閮ㄩ棬鍚嶇О
+          this.form.HDeptID = deptRow.HItemID
+          this.form.HManagerName = deptRow.璐熻矗浜�
+          this.deptShow = false
+          this.openData = false
+        } else if (num == 2) {
+          this.editData[this.zbIndex].HWHID = deptRow.HItemID;
+          this.editData[this.zbIndex].鍙戣揣浠撳簱 = deptRow.浠撳簱鍚嶇О;
+          this.warehouseShow = false
+          this.openData = false
+        } else if (num == 3) {
+          this.editData[this.zbIndex].HMaterID = deptRow.HItemID;
+          this.editData[this.zbIndex].鐗╂枡浠g爜 = deptRow.鐗╂枡浠g爜;
+          this.editData[this.zbIndex].鐗╂枡鍚嶇О = deptRow.鐗╂枡鍚嶇О;
+          this.editData[this.zbIndex].HUnitID = deptRow.HUnitID;
+          this.editData[this.zbIndex].瑙勬牸鍨嬪彿 = deptRow.瑙勬牸鍨嬪彿
+          this.editData[this.zbIndex].璁¢噺鍗曚綅 = deptRow.璁¢噺鍗曚綅鍚嶇О
+          this.editData[this.zbIndex].HTaxPrice = deptRow.鍚◣鎴愭湰浠�
+          this.editData[this.zbIndex].HTaxRate = deptRow.榛樿绋庣巼
+          this.materialShow = false
+          this.openData = false
+        } else if (num == 4) {
+          this.form.HEmpName = deptRow.鑱屽憳鍚嶇О
+          this.form.HEmpID = deptRow.HItemID
+          this.gyEmployeeShow = false
+          this.openData = false
+        }
+      } else {
+        this.$modal.msgError("璇烽�夋嫨鍗曟潯鏁版嵁!");
       }
-      else if (num == 3) {
-        this.editData[this.zbIndex].HMaterID = deptRow.HItemID;
-        this.editData[this.zbIndex].鐗╂枡浠g爜 = deptRow.鐗╂枡浠g爜;
-        this.editData[this.zbIndex].鐗╂枡鍚嶇О = deptRow.鐗╂枡鍚嶇О;
-        this.editData[this.zbIndex].HUnitID = deptRow.HUnitID;
-        this.editData[this.zbIndex].瑙勬牸鍨嬪彿 = deptRow.瑙勬牸鍨嬪彿
-        this.editData[this.zbIndex].璁¢噺鍗曚綅 = deptRow.璁¢噺鍗曚綅鍚嶇О
-        this.editData[this.zbIndex].HTaxPrice = deptRow.鍚◣鎴愭湰浠�
-        this.editData[this.zbIndex].HTaxRate = deptRow.榛樿绋庣巼
-        this.openData = false
-      }
+
     },
     emitData(deptRow, num) {
       this.dialogTypeNum = num
@@ -759,10 +767,20 @@
     //閫�鍑�
     close() {
       this.reset()
-
       if (!this.OperationType && !this.copyType) {
-        // this.$router.back()
-        window.close()
+        const obj = { fullPath: this.$route.path, path: this.$route.path, name: this.$route.name, };
+        this.$tab.closePage(obj).then(res => {
+          const latestView = res.visitedViews.slice(-1)[0]
+          if (latestView) {
+            this.$router.push(latestView.fullPath)
+          } else {
+            if (obj.name === 'Dashboard') {
+              this.$router.replace({ path: '/redirect' + obj.fullPath })
+            } else {
+              this.$router.push('/')
+            }
+          }
+        });
       } else {
         this.formShow = false
         this.$emit('editClose', false)
@@ -770,7 +788,7 @@
     },
     //鏍规嵁鐢ㄦ埛鑾峰彇瀵瑰簲鑱屽憳銆侀儴闂ㄣ�侀攢鍞富绠�
     getCzyglByUser() {
-      axios.get(this.baseURL + '/Xs_SeOrderBill/getCzyglByUser', {
+      axios.get(this.$baseUrl + '/Xs_SeOrderBill/getCzyglByUser', {
         params: { "CurUserName": sessionStorage["HUserName"] }
       }).then(response => {
         let dataForm = response.data.data[0]
@@ -800,7 +818,7 @@
       })
     },
     getHBillNo() {
-      axios.get(this.baseURL + "/WEBSController/GetMaxBillNoAndID_Json", {
+      axios.get(this.$baseUrl + "/WEBSController/GetMaxBillNoAndID_Json", {
         params: {
           HBillType: '1205'
         }
@@ -816,7 +834,7 @@
     },
     //鑾峰彇閿�鍞嚭搴撳崟瀵瑰簲鐨勬潯鐮佹槑缁�
     getBarCodeNoteBySellOutBill(rowHmainid) {
-      axios.get(this.baseURL + '/Kf_SellOutBill/BarCodeNote', {
+      axios.get(this.$baseUrl + '/Kf_SellOutBill/BarCodeNote', {
         params: { "HInterID": rowHmainid }
       }).then(response => {
         if (response.data.count == 1) {
@@ -831,14 +849,19 @@
     },
     //#region 鏍规嵁瀹㈡埛鑾峰彇瀹㈡埛浣欓
     getCustomerBalance(HCusID) {
-      axios.get(this.baseURL + '/Xs_CusRatingChangeBill/getCustomerBalance', {
+      axios.get(this.$baseUrl + '/Xs_CusRatingChangeBill/getCustomerBalance', {
         params: { "HCusID": HCusID, 'CurUserName': sessionStorage["HUserName"] }
       }).then(response => {
+        if(response.data.count == 0) {
+          this.$modal.msgWarning(response.data.Message);
+          return
+        }
         var data = response.data.data[0];
         this.form.HCusBalance = data.HCusBalance
         this.form.HCreditRating_Now = data.HCreditRating_Now
         this.form.HAvailableBalance = data.HAvailableBalance
       }).catch(error => {
+        console.error(error)
         this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
       });
     },
@@ -846,8 +869,7 @@
     handleUpdate() {
       this.reset()
       let rowHmainid = this.linterid
-      console.log(this.linterid)
-      axios.get(this.baseURL + "/Kf_SellOutBill/cx", {
+      axios.get(this.$baseUrl + "/Kf_SellOutBill/cx", {
         params: { 'HInterID': rowHmainid }
       }).then(response => {
         if (response.data.count == 1) {
@@ -1000,11 +1022,15 @@
     },
     //鏍规嵁瀹㈡埛甯﹀嚭鑱旂郴浜恒�佽仈绯荤數璇�
     getCustomerByCusID(HCusID) {
-      axios.get(this.baseURL + "/Xs_SeOrderBill/getCustomerByCusID", {
+      axios.get(this.$baseUrl + "/Xs_SeOrderBill/getCustomerByCusID", {
         params: {
           HCusID: HCusID
         }
       }).then(response => {
+        if(response.data.count == 0) {
+          this.$modal.msgWarning(response.data.Message);
+          return
+        }
         this.form.鑱旂郴浜� = response.data.data[0].HLinkMan
         this.form.鑱旂郴鐢佃瘽 = response.data.data[0].HLinkPhone
         // this.form = response.data.data[0]
@@ -1150,7 +1176,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 => {
         if (response.data.count == 1) {
@@ -1180,7 +1206,7 @@
               var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"] + ';' + this.OperationType;
               axios({
                 method: 'post',
-                url: this.baseURL + "/Kf_SellOutBill/SaveSellOutBillList",
+                url: this.$baseUrl + "/Kf_SellOutBill/SaveSellOutBillList",
                 data: {
                   'msg': sMainSub
                 },
@@ -1207,7 +1233,7 @@
     set_CheckBill(num, form) {
       var InterID = form.hmainid || form.HInterID
       //閫昏緫瀹℃牳鏂规硶
-      axios.get(this.baseURL + "/Kf_SellOutBill/AuditKf_SellOutBill", {
+      axios.get(this.$baseUrl + "/Kf_SellOutBill/AuditKf_SellOutBill", {
         params: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] }
       }).then(response => {
         let result = response.data
@@ -1225,9 +1251,11 @@
       this.deptShow = false
       this.warehouseShow = false
       this.materialShow = false
+      this.gyEmployeeShow = false
     },
     //  鎵撳紑鏁版嵁鍒楄〃寮圭獥
     openDataDialog(num, row) {
+      //num1閮ㄩ棬锛�2鍑哄簱浠撳簱锛�3鐗╂枡锛�4閿�鍞憳
       if (row) {
         this.zbIndex = row.index - 1
       }
@@ -1244,6 +1272,10 @@
         this.dialogTitle = '鐗╂枡鍒楄〃'
         this.materialShow = true
         this.openData = true
+      } else if (num == 4) {
+        this.dialogTitle = '閿�鍞憳鍒楄〃'
+        this.gyEmployeeShow = true
+        this.openData = true
       }
     },
   }

--
Gitblit v1.9.1