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/basic/gyEmployee/gyEmployee.vue | 146 +++++++++++++++++++++++++++---------------------
1 files changed, 81 insertions(+), 65 deletions(-)
diff --git a/src/views/basic/gyEmployee/gyEmployee.vue b/src/views/basic/gyEmployee/gyEmployee.vue
index f54ae10..5329a60 100644
--- a/src/views/basic/gyEmployee/gyEmployee.vue
+++ b/src/views/basic/gyEmployee/gyEmployee.vue
@@ -1,5 +1,5 @@
<template>
- <div style="padding: 10px">
+ <div style="padding: 10px; position: relative">
<el-form
:model="queryParams"
ref="queryForm"
@@ -8,7 +8,7 @@
class="searchBox"
>
<el-row>
- <el-form-item label="鑱屽憳浠g爜" prop="HNumber">
+ <el-form-item label="鑱屽憳浠g爜" prop="HNumber" style="padding-left: 100px">
<el-input
v-model="queryParams.HNumber"
placeholder="璇疯緭鍏ヨ亴鍛樹唬鐮�"
@@ -34,7 +34,7 @@
v-for="(item, index) in organizationList"
:key="index"
:label="item.Name"
- :value="item.ID"
+ :value="item.ID.toString()"
>
</el-option>
</el-select>
@@ -299,12 +299,12 @@
>闅愯棌鍒楄缃�</el-button
>
</el-col>
- <el-col :span="1.5">
+ <el-col :span="1.5" class="zy-hidden">
<el-button type="primary" icon="el-icon-help" size="mini" @click="handleSearch"
>鎼� 绱�</el-button
>
</el-col>
- <el-col :span="1.5">
+ <el-col :span="1.5" class="zy-hidden">
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>閲� 缃�</el-button
>
@@ -353,9 +353,9 @@
}}</span>
<el-button
type="text"
- @click="handleEdit(row, (OperationType = 3))"
- v-else-if="column.property == '鍗曟嵁鍙�'"
- >{{ row.鍗曟嵁鍙� }}</el-button
+ @click.stop="handleEdit(row, (OperationType = 3))"
+ v-else-if="column.property == '鑱屽憳浠g爜'"
+ >{{ row.鑱屽憳浠g爜 }}</el-button
>
<span v-else>{{ row[column.label] }}</span>
</div>
@@ -499,17 +499,17 @@
import RowSettings from "@/views/component/rowSettings";
import Edit from "@/views/basic/gyEmployee/gyEmployeeEdit";
import gySource from "@/views/basic/gySource";
-import { env } from "echarts";
export default {
- name: "GySource",
+ name: "GyEmployee",
components: { RowSettings, Edit, gySource },
props: {
openPage: { type: String },
},
data() {
return {
- HModName: "Gy_Source",
+ activeSeach: "",
+ HModName: "Gy_EmployeeList",
editShow: false,
openEdit: false,
totalNameList: [],
@@ -517,7 +517,7 @@
openPrintList: false,
printListShow: false,
HClassTag: "ForFilteringSchemes", //杩囨护鏉′欢鐨刢lass绫�
- HBillType: "1205",
+ HBillType: "Gy_EmployeeList",
openBtnHide: false,
btnHideShow: false,
rowHideShow: false,
@@ -562,11 +562,11 @@
openData: false, //鏁版嵁寮圭獥
dialogTitle: "",
zuzhiId: "",
- organizationList: [], //缁勭粐鍒楄〃
+ organizationList: JSON.parse(sessionStorage["organizationList"]), //缁勭粐鍒楄〃
subDisabled: false, //缂栬緫椤甸潰淇濆瓨鎸夐挳鏄惁绂佺敤(true绂佺敤锛宖alse鍙敤)
OperationType: null, //淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
HInterID: null,
- baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/",
+ baseURL: process.env.VUE_APP_BASE_API,
user: "admin",
currentRow: [],
lastSelectedRowIndex: null, // 鐢ㄤ簬璁板綍涓婃鐐瑰嚮鐨勮绱㈠紩
@@ -586,7 +586,7 @@
dateRange: [],
// 鏌ヨ鍙傛暟
queryParams: {
- HOrgID: null,
+ HOrgID: sessionStorage["OrganizationID"],
HName: null,
HNumber: null,
Comparator1: "",
@@ -649,7 +649,8 @@
};
},
created() {
- this.fetchData();
+ // this.fetchData();
+ this.handleQuery();
this.riqiChange();
},
methods: {
@@ -684,7 +685,7 @@
defaintOperationByCompanyName() {
var result = false;
axios
- .get(this.baseURL + "/Xt_getInfo/getCompanyName")
+ .get(this.$baseUrl + "/Xt_getInfo/getCompanyName")
.then((response) => {
var data1 = response.data;
if (data1.count == 1) {
@@ -769,33 +770,6 @@
this.dbEmitData(this.deptform, this.dialogTypeNum);
this.deptform = {};
},
- fetchData() {
- //鐧诲綍鐢ㄦ埛淇℃伅
- axios
- .get(
- "http://47.96.97.237/API/Web/GetUser?UserName=001&PassWord=123456&HOrgName=100038"
- )
- .then((response) => {
- let data = response.data.data[0];
- this.zuzhiId = data.HUSEORGID; //鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇榛樿鐨勭粍缁嘔D
- this.queryParams.HOrgID = data.HUSEORGID;
- this.user = data.Czymc;
- axios
- .get(this.baseURL + "/Web/GetOrganizations", {})
- .then((response) => {
- if (response.data.count == 1) {
- this.organizationList = response.data.data; //缁勭粐鍒楄〃
- }
- this.getList();
- })
- .catch((error) => {
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
- })
- .catch((error) => {
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
- },
getList() {
this.tableShow = false;
this.loading = true;
@@ -804,18 +778,21 @@
}
// this.queryParams.HOrgID = 100038
this.sWhere += " and HUSEORGID = '" + this.queryParams.HOrgID + "'";
+ let OrgName =
+ this.organizationList.find((e) => e.ID == this.queryParams.HOrgID)?.Name || "";
//鐢熶骇璧勬枡鍒楄〃
axios
- .get(this.baseURL + "/Gy_Employee/listPage", {
+ .get(this.$baseUrl + "/Gy_Employee/listPage", {
params: {
sWhere: this.sWhere,
- user: this.user,
- Organization: "娴欐睙鏅轰簯杩堟��",
+ user: sessionStorage["HUserName"],
+ Organization: OrgName,
page: this.page,
size: this.pageSize,
},
})
.then((response) => {
+ console.log(response.data.data);
this.tyResList = response.data.data; //鎬绘暟鎹�
let data1 = response.data;
let option = [];
@@ -899,7 +876,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((error) => {
@@ -909,7 +891,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,
@@ -1057,6 +1039,9 @@
this.selectedRow = row; // 璁板綍褰撳墠閫変腑鐨勮
this.lastSelectedRowIndex = this.tableData.indexOf(row);
this.$refs.tableData.toggleRowSelection(row);
+ if (this.openPage) {
+ this.$emit("deptEmit", row, 4);
+ }
},
//閫変腑琛岄珮浜牱寮�
rowStyle({ row, rowIndex }) {
@@ -1067,16 +1052,32 @@
//鍙屽嚮琛�
handleDblclick(row, column, cell, event) {
this.OperationType = 3;
- this.handleEdit();
+ if (this.openPage) {
+ this.$emit("deptEmitDb", row, 4);
+ } else {
+ this.handleEdit(row);
+ }
},
// 澶氶�夋閫変腑鏁版嵁
handleSelectionChange(selection) {
// this.rowForm = {}
- this.ids = selection.map((item) => item.HItemID);
- this.single = selection.length != 1;
- this.multiple = !selection.length;
- if (!this.single) {
+ if (this.openPage) {
+ //鍒楄〃鍗曢��
+ if (selection.length > 1) {
+ const del_row = selection.shift();
+ this.$refs.tableData.toggleRowSelection(del_row, false); //璁剧疆杩欎竴琛屽彇娑堥�変腑
+ }
+ this.rowForm = {};
+ this.ids = selection.map((item) => item.HItemID);
this.rowForm = selection[0];
+ } else {
+ //澶氶��
+ this.ids = selection.map((item) => item.HItemID);
+ this.single = selection.length != 1;
+ this.multiple = !selection.length;
+ if (!this.single) {
+ this.rowForm = selection[0];
+ }
}
},
//鎵撳紑渚ц竟鎼滅储寮圭獥
@@ -1185,10 +1186,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,
},
})
@@ -1249,7 +1250,8 @@
});
},
//鎵撳紑淇敼缁勪欢寮圭獥
- handleEdit() {
+ handleEdit(row) {
+ this.rowForm = row
this.$nextTick(() => {
this.openEdit = true;
this.editShow = true;
@@ -1268,8 +1270,11 @@
.then(() => {
if (!this.rowForm.瀹℃牳浜�) {
axios
- .get(this.baseURL + "DeltetGy_Employee", {
- params: { HItemID: this.rowForm.HItemID.toString(), user: this.user },
+ .get(this.$baseUrl + "DeltetGy_Employee", {
+ params: {
+ HItemID: this.rowForm.HItemID.toString(),
+ user: sessionStorage["HUserName"],
+ },
})
.then((response) => {
if (response.data.count == 1) {
@@ -1293,8 +1298,12 @@
var InterID = form.HItemID || form.HInterID;
//閫昏緫瀹℃牳鏂规硶
axios
- .get(this.baseURL + "/Gy_Employee/AuditGy_Employee", {
- params: { HInterID: InterID, IsAudit: num, CurUserName: this.user },
+ .get(this.$baseUrl + "/Gy_Employee/AuditGy_Employee", {
+ params: {
+ HInterID: InterID,
+ IsAudit: num,
+ CurUserName: sessionStorage["HUserName"],
+ },
})
.then((response) => {
let result = response.data;
@@ -1314,8 +1323,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((response) => {
let result = response.data;
@@ -1381,10 +1394,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,
},
@@ -1439,4 +1452,7 @@
.xsckdBox .el-date-editor.el-input {
width: 100%;
}
+.zy-hidden {
+ display: none;
+}
</style>
--
Gitblit v1.9.1