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/system/user/xtUserListEdit.vue | 224 ++++++++++++++++++++++++++++++++++++-------------------
1 files changed, 146 insertions(+), 78 deletions(-)
diff --git a/src/views/system/user/xtUserListEdit.vue b/src/views/system/user/xtUserListEdit.vue
index 7053293..eb61b8d 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: '',
@@ -316,15 +327,18 @@
Czybm: [
{ required: true, message: "缂栫爜涓嶈兘涓虹┖!", trigger: "blur" }
],
- Czybm: [
- { required: true, message: "缂栫爜涓嶈兘涓虹┖!", trigger: "blur" }
+ Czymc: [
+ { required: true, message: "鐢ㄦ埛鍚嶄笉鑳戒负绌�!", trigger: "blur" }
],
Czmm: [
- { required: true, message: "鐢ㄦ埛鍚嶄笉鑳戒负绌�!", trigger: "blur" }
+ { required: true, message: "瀵嗙爜涓嶈兘涓虹┖!", trigger: "blur" }
],
Czyyz: [
{ required: true, message: "纭瀵嗙爜涓嶈兘涓虹┖!", trigger: "blur" },
{ required: true, validator: equalToPassword, trigger: "blur" }
+ ],
+ HDept: [
+ { required: true, message: "瀵瑰簲閮ㄩ棬涓嶈兘涓虹┖!", trigger: "blur" }
],
HWHName: [
{ validator: equalToHWHName, trigger: "blur" }
@@ -353,7 +367,7 @@
},
getUserGroup() {
//瑙掕壊鍒楄〃
- axios.get(this.baseURL + '/Xt_UserGroup/list', {
+ axios.get(this.$baseUrl + '/Xt_UserGroup/list', {
params: {
sWhere: '',
},
@@ -369,12 +383,11 @@
},
get_DisplayUserGroupInfoList() {
var sWhere = "and UserId='" + this.linterid + "'";
- axios.get(this.baseURL + '/Xt_UserGroup/UserGroupInfoList', {
+ axios.get(this.$baseUrl + '/Xt_UserGroup/UserGroupInfoList', {
params: {
sWhere: sWhere,
},
}).then(response => {
- console.log(response)
let data1 = response.data
if (data1.count == 1) {
if (data1.data.length > 0)
@@ -387,7 +400,6 @@
}
}
}).catch(error => {
- console.log(error)
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
},
@@ -401,7 +413,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
@@ -435,14 +447,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 +473,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 +525,6 @@
this.deptform = {}
this.openData = false
},
-
//閿�鍞嚭搴撳崟鏂板缂栬緫琛ㄥ崟鍒濆鍖�
reset() {
this.form = {
@@ -534,13 +579,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() {
@@ -553,7 +593,7 @@
handleUpdate() {
this.reset()
let rowHmainid = this.linterid
- axios.get(this.baseURL + "/Xt_User/EditUser", {
+ axios.get(this.$baseUrl + "/Xt_User/EditUser", {
params: { 'HID': rowHmainid }
}).then(response => {
if (response.data.code == 1) {
@@ -610,7 +650,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;
@@ -618,51 +657,68 @@
},
// 缂栬緫鎻愪氦淇濆瓨
submitForm() {
- this.$refs["form"].validate(valid => {
- console.log(this.form)
- if (valid) {
-
- var num = [];
- var Sav = ''
- if (this.OperationType == 1) {
- Sav = 'Add'
- } else if (this.OperationType == 3) {
- Sav = "Update"
- }
+ if (!this.form.Czybm) {
+ this.$modal.msgError("缂栫爜涓嶈兘涓虹┖!");
+ } else if (!this.form.Czymc) {
+ this.$modal.msgError("鐢ㄦ埛鍚嶄笉鑳戒负绌�!");
+ } else if (!this.form.Czmm) {
+ this.$modal.msgError("瀵嗙爜涓嶈兘涓虹┖!");
+ } else if (!this.form.Czyyz) {
+ this.$modal.msgError("纭瀵嗙爜涓嶈兘涓虹┖!");
+ } else if (this.form.Czmm != this.form.Czyyz) {
+ this.$modal.msgError("瀵嗙爜鍜岀‘璁ゅ瘑鐮佷笉涓�鏍�!");
+ } else if (!this.form.HDept) {
+ this.$modal.msgError("閮ㄩ棬涓嶈兘涓虹┖!");
+ } else if (this.form.HWHName == this.form.HSCWHName) {
+ this.$modal.msgError("瀵瑰簲浠撳簱鍜岃皟鍏ヤ粨搴撲笉鑳界浉鍚岋紒");
+ } else {
+ this.$refs["form"].validate(valid => {
+ if (valid) {
- 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;
- axios({
- method: 'post',
- url: this.baseURL + "/Xt_User/SaveUser",
- data: {
- 'msg': sMainStr
- },
- }).then(response => {
- if (response.data.count == 1) {
- this.formShow = false
- this.$emit('editClose', false)
- this.$modal.msgSuccess(response.data.Message);
+ var num = [];
+ var Sav = ''
+ if (this.OperationType == 1) {
+ Sav = 'Add'
+ } else if (this.OperationType == 3) {
+ Sav = "Update"
}
- }).catch(error => {
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
- }
- });
+ for (var i = 0; i < this.checkedSysZb.length; i++) {
+ num.push(this.checkedSysZb[i].HGroupID)
+ }
+ var sSubStr = num.toString() == "" ? "-1" : num.toString();
+ var sMainStr = JSON.stringify(this.form) + ';' + Sav + ';' + sSubStr;
+ axios({
+ method: 'post',
+ url: this.$baseUrl + "/Xt_User/SaveUser",
+ data: {
+ 'msg': sMainStr
+ },
+ }).then(response => {
+ if (response.data.count == 1) {
+ this.formShow = false
+ this.$emit('editClose', false)
+ this.$modal.msgSuccess(response.data.Message);
+ } else {
+ this.$modal.msgError(response.data.Message)
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ }
+ });
+ }
},
showReset() {
this.deptShow = false
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 +736,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