From a9ca5dafb781919fe8a24cd586258e9144966271 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 19 十一月 2025 11:07:38 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-VUEUI

---
 src/views/system/user/xtUserListEdit.vue |  132 +++++++++++++++++++++++++++++--------------
 1 files changed, 89 insertions(+), 43 deletions(-)

diff --git a/src/views/system/user/xtUserListEdit.vue b/src/views/system/user/xtUserListEdit.vue
index 7053293..fcb590b 100644
--- a/src/views/system/user/xtUserListEdit.vue
+++ b/src/views/system/user/xtUserListEdit.vue
@@ -35,7 +35,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" @click="openDataDialog(4)"></el-button>
+                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4, empType = '1')"></el-button>
                 </el-input>
               </el-form-item>
             </el-col>
@@ -84,7 +84,7 @@
             <el-col :span="6">
               <el-form-item label="瀵瑰簲淇濈" prop="HKeeper">
                 <el-input v-model="form.HKeeper" placeholder="璇疯緭鍏ュ搴斾繚绠�" disabled>
-                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4)"></el-button>
+                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4, empType = '2')"></el-button>
                 </el-input>
               </el-form-item>
             </el-col>
@@ -93,28 +93,28 @@
             <el-col :span="6">
               <el-form-item label="瀵瑰簲楠屾敹" prop="HSecManager">
                 <el-input v-model="form.HSecManager" placeholder="璇疯緭鍏ュ搴旈獙鏀�" disabled>
-                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4)"></el-button>
+                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4, empType = '3')"></el-button>
                 </el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="瀵瑰簲鐢熶骇璧勬簮" prop="HSourceName">
                 <el-input v-model="form.HSourceName" placeholder="璇疯緭鍏ュ搴旂敓浜ц祫婧�" disabled>
-                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4)"></el-button>
+                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(5)"></el-button>
                 </el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="瀵瑰簲涓氬姟鍛�" prop="HSellMan">
                 <el-input v-model="form.HSellMan" placeholder="璇疯緭鍏ュ搴斾笟鍔″憳" disabled>
-                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4)"></el-button>
+                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4, empType = '4')"></el-button>
                 </el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="瀵瑰簲閮ㄩ棬" prop="HDept">
                 <el-input v-model="form.HDept" placeholder="璇疯緭鍏ュ搴旈儴闂�" disabled>
-                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4)"></el-button>
+                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(1)"></el-button>
                 </el-input>
               </el-form-item>
             </el-col>
@@ -123,21 +123,21 @@
             <el-col :span="6">
               <el-form-item label="妫�楠屽憳" prop="HCheckEmpName">
                 <el-input v-model="form.HCheckEmpName" placeholder="璇疯緭鍏ユ楠屽憳" disabled>
-                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4)"></el-button>
+                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4, empType = '5')"></el-button>
                 </el-input>
               </el-form-item>
             </el-col>
             <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(4)"></el-button>
+                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(2, ckType = '1')"></el-button>
                 </el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="璋冨叆浠撳簱" prop="HSCWHName">
                 <el-input v-model="form.HSCWHName" placeholder="璇疯緭鍏ヨ皟鍏ヤ粨搴�" disabled>
-                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4)"></el-button>
+                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(2, ckType = '2')"></el-button>
                 </el-input>
               </el-form-item>
             </el-col>
@@ -153,7 +153,7 @@
             <el-col :span="6">
               <el-form-item label="瀵瑰簲渚涘簲鍟�" prop="HSupName">
                 <el-input v-model="form.HSupName" placeholder="璇疯緭鍏ュ搴斾緵搴斿晢" disabled>
-                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4)"></el-button>
+                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(6)"></el-button>
                 </el-input>
               </el-form-item>
             </el-col>
@@ -167,7 +167,7 @@
             <el-col :span="6">
               <el-form-item label="瀹㈡埛" prop="HCusName">
                 <el-input v-model="form.HCusName" placeholder="璇疯緭鍏ュ鎴�" disabled>
-                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(4)"></el-button>
+                  <el-button slot="append" icon="el-icon-search" @click="openDataDialog(7)"></el-button>
                 </el-input>
               </el-form-item>
             </el-col>
@@ -198,10 +198,13 @@
     </el-form>
     <!-- 閮ㄩ棬寮圭獥 -->
     <el-dialog :title="dialogTitle" :visible.sync="openData" 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" />
+      <Dept @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="deptShow" />
+      <Warehouse @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="warehouseShow" />
+      <Material @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="materialShow" />
       <GyEmployee @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyEmployeeShow" />
+      <GySource @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gySourceShow" />
+      <GySupplier @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gySupplierShow" />
+      <GyCustomer @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyCustomerShow" />
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="deptClickSub">纭� 瀹�</el-button>
         <el-button @click="deptClose">鍙� 娑�</el-button>
@@ -215,15 +218,18 @@
 
 <script>
 import axios from 'axios'
-import Dept from '@/views/component/dept'
-import Warehouse from '@/views/component/warehouse'
+import Dept from '@/views/basic/gy/gyDepartment.vue'
+import Warehouse from '@/views/basic/gyWarehouse/gyWarehouse.vue'
 import Material from '@/views/component/material'
 import RowSettings from '@/views/component/rowSettings'
 import GyEmployee from '@/views/basic/gyEmployee/gyEmployee.vue'
+import GySource from '@/views/basic/production/gySource.vue'
+import GySupplier from '@/views/basic/gy/gySupplier.vue'
+import GyCustomer from '@/views/GyCustomer'
 
 export default {
   name: 'XtUserListEdit',
-  components: { Dept, Warehouse, Material, RowSettings, GyEmployee },
+  components: { Dept, Warehouse, Material, RowSettings, GyEmployee, GySource, GySupplier, GyCustomer },
   props: {
     OperationType: { type: Number, },
     linterid: {},
@@ -240,7 +246,7 @@
       }
     }
     const equalToHWHName = (rule, value, callback) => {
-      if (this.form.HWHName&&this.form.HSCWHName&&(this.form.HWHName == this.form.HSCWHName)) {
+      if (this.form.HWHName && this.form.HSCWHName && (this.form.HWHName == this.form.HSCWHName)) {
         callback(new Error("瀵瑰簲浠撳簱鍜岃皟鍏ヤ粨搴撲笉鑳界浉鍚岋紒"))
       } else {
         callback()
@@ -248,6 +254,8 @@
     }
     return {
       HModName: "Xt_UserListEdit",
+      empType: '',
+      ckType: '',
       formShow: false,
       temp: undefined,
       formLoading: true,
@@ -261,7 +269,10 @@
       deptShow: false,//閮ㄩ棬鏁版嵁缁勪欢
       warehouseShow: false,//浠撳簱鏁版嵁缁勪欢
       materialShow: false,//鐗╂枡鏁版嵁缁勪欢
-      gyEmployeeShow: false,//閿�鍞憳鏁版嵁缁勪欢
+      gyEmployeeShow: false,//鑱屽憳鏁版嵁缁勪欢
+      gySourceShow: false,
+      gySupplierShow: false,
+      gyCustomerShow: false,
       deptform: {},//寮圭獥閫変腑鏁版嵁
       openData: false,//鏁版嵁寮圭獥
       dialogTitle: '',
@@ -374,7 +385,6 @@
           sWhere: sWhere,
         },
       }).then(response => {
-        console.log(response)
         let data1 = response.data
         if (data1.count == 1) {
           if (data1.data.length > 0)
@@ -387,7 +397,6 @@
             }
         }
       }).catch(error => {
-        console.log(error)
         this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
       });
     },
@@ -435,14 +444,18 @@
       // num=1閮ㄩ棬 num=2鍑哄簱浠撳簱
       if (deptRow.HItemID) {
         if (num == 1) {
-          this.form.HDeptName = deptRow.閮ㄩ棬鍚嶇О
+          this.form.HDept = 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.浠撳簱鍚嶇О;
+          if (this.ckType == '1') {
+            this.form.HWHName = deptRow.浠撳簱鍚嶇О;
+            this.form.HWhID = deptRow.HItemID;
+          } else if (this.ckType == '2') {
+            this.form.HSCWHName = deptRow.浠撳簱鍚嶇О;
+            this.form.HSCWHID = deptRow.HItemID;
+          }
           this.warehouseShow = false
           this.openData = false
         } else if (num == 3) {
@@ -457,9 +470,39 @@
           this.materialShow = false
           this.openData = false
         } else if (num == 4) {
-          this.form.HEmpName = deptRow.鑱屽憳鍚嶇О
-          this.form.HEmpID = deptRow.HItemID
+          if (this.empType == '1') {
+            this.form.HEmpName = deptRow.鑱屽憳鍚嶇О
+            this.form.HEmpID = deptRow.HItemID
+          } else if (this.empType == '2') {
+            this.form.HKeeper = deptRow.鑱屽憳鍚嶇О
+            this.form.HKeeperID = deptRow.HItemID
+          } else if (this.empType == '3') {
+            this.form.HSecManager = deptRow.鑱屽憳鍚嶇О
+            this.form.HSecManagerID = deptRow.HItemID
+          } else if (this.empType == '4') {
+            this.form.HSellMan = deptRow.鑱屽憳鍚嶇О
+            this.form.HSellManID = deptRow.HItemID
+          } else if (this.empType == '5') {
+            this.form.HCheckEmpName = deptRow.鑱屽憳鍚嶇О
+            this.form.HCheckEmpID = deptRow.HItemID
+          }
           this.gyEmployeeShow = false
+          this.openData = false
+        } else if (num == 5) {
+          this.form.HSourceName = deptRow.鐢熶骇璧勬簮鍚嶇О
+          this.form.HSourceID = deptRow.HItemID
+          this.gySourceShow = false
+          this.openData = false
+        } else if (num == 6) {
+          this.form.HSupName = deptRow.渚涘簲鍟嗗悕绉�
+          this.form.HSupID = deptRow.HItemID
+          this.gySupplierShow = false
+          this.openData = false
+        } else if (num == 7) {
+          console.log(deptRow)
+          this.form.HCusName = deptRow.瀹㈡埛鍚嶇О
+          this.form.HCusID = deptRow.HItemID
+          this.gyCustomerShow = false
           this.openData = false
         }
       } else {
@@ -479,7 +522,6 @@
       this.deptform = {}
       this.openData = false
     },
-
     //閿�鍞嚭搴撳崟鏂板缂栬緫琛ㄥ崟鍒濆鍖�
     reset() {
       this.form = {
@@ -534,13 +576,8 @@
     //閫�鍑�
     close() {
       this.reset()
-      if (!this.OperationType && !this.copyType) {
-        const obj = { path: "/system/user/xtUserListEdit", name: "xtUserListEdit" };
-        this.$tab.closePage(obj);
-      } else {
-        this.formShow = false
-        this.$emit('editClose', false)
-      }
+      this.formShow = false
+      this.$emit('editClose', false)
     },
     /** 鏂板鎸夐挳鎿嶄綔 */
     handleAdd() {
@@ -610,7 +647,6 @@
 
     /** 缂栬緫椤靛瓙琛ㄥ閫夋閫変腑鏁版嵁 */
     handleTableZbEdit(selection) {
-      console.log(selection)
       this.checkedSysZb = selection
       // this.editData.forEach(row => {
       //   row.AuthorityHID = this.checkedSysZb.some(selectedRow => selectedRow.GroupId === row.HGroupID) ? 1 : 0;
@@ -619,9 +655,7 @@
     // 缂栬緫鎻愪氦淇濆瓨
     submitForm() {
       this.$refs["form"].validate(valid => {
-          console.log(this.form)
         if (valid) {
-         
           var num = [];
           var Sav = ''
           if (this.OperationType == 1) {
@@ -629,13 +663,11 @@
           } else if (this.OperationType == 3) {
             Sav = "Update"
           }
-
           for (var i = 0; i < this.checkedSysZb.length; i++) {
             num.push(this.checkedSysZb[i].HGroupID)
           }
-           console.log(num,Sav)
           var sSubStr = num.toString() == "" ? "-1" : num.toString();
-          var sMainStr = JSON.stringify(this.form) + ';' + Sav + ';' + sSubStr;        
+          var sMainStr = JSON.stringify(this.form) + ';' + Sav + ';' + sSubStr;
           axios({
             method: 'post',
             url: this.baseURL + "/Xt_User/SaveUser",
@@ -659,10 +691,12 @@
       this.warehouseShow = false
       this.materialShow = false
       this.gyEmployeeShow = false
+      this.gySourceShow = false
+      this.gySupplierShow = false
+      this.gyCustomerShow = false
     },
     //  鎵撳紑鏁版嵁鍒楄〃寮圭獥
     openDataDialog(num, row) {
-      //num1閮ㄩ棬锛�2鍑哄簱浠撳簱锛�3鐗╂枡锛�4閿�鍞憳
       if (row) {
         this.zbIndex = row.index - 1
       }
@@ -680,9 +714,21 @@
         this.materialShow = true
         this.openData = true
       } else if (num == 4) {
-        this.dialogTitle = '閿�鍞憳鍒楄〃'
+        this.dialogTitle = '鑱屽憳鍒楄〃'
         this.gyEmployeeShow = true
         this.openData = true
+      } else if (num == 5) {
+        this.dialogTitle = '鐢熶骇璧勬簮鍒楄〃'
+        this.gySourceShow = true
+        this.openData = true
+      } else if (num == 6) {
+        this.dialogTitle = '渚涘簲鍟嗗垪琛�'
+        this.gySupplierShow = true
+        this.openData = true
+      } else if (num == 7) {
+        this.dialogTitle = '瀹㈡埛鍒楄〃'
+        this.gyCustomerShow = true
+        this.openData = true
       }
     },
   }

--
Gitblit v1.9.1