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/gy/gyDepartment.vue | 76 ++++++++++++++++++++++++++------------
1 files changed, 52 insertions(+), 24 deletions(-)
diff --git a/src/views/basic/gy/gyDepartment.vue b/src/views/basic/gy/gyDepartment.vue
index edeec23..68e8c85 100644
--- a/src/views/basic/gy/gyDepartment.vue
+++ b/src/views/basic/gy/gyDepartment.vue
@@ -1,5 +1,5 @@
<template>
- <div style="padding: 10px;">
+ <div style="padding: 10px; position: relative;">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="98px" class="searchBox">
<el-row>
<el-form-item label="閮ㄩ棬浠g爜" prop="HNumber" style="margin-left: 100px;">
@@ -109,7 +109,7 @@
</el-col>
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
- @click="handleEdit(row = rowForm, OperationType = 2)">澶嶅埗</el-button>
+ @click="handleEdit(row = rowForm, copyType = 1)">澶嶅埗</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete">鍒犻櫎
@@ -168,8 +168,7 @@
<RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose" v-if="rowHideShow" />
</el-dialog>
<!-- 缂栬緫 -->
- <el-dialog title="缂栬緫鐢熶骇璧勬枡" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox"
- @close="close">
+ <el-dialog title="缂栬緫閮ㄩ棬璧勬枡" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox" @close="close">
<edit :OperationType=OperationType :linterid=this.rowForm.HItemID :HSouceBillType=this.rowForm.HSourceBillType
:copyType="copyType" @editCloseGy="editGyClose" v-if="editShow" />
</el-dialog>
@@ -264,7 +263,7 @@
open: false,
// 鏌ヨ鍙傛暟
queryParams: {
- HOrgID: null,
+ HOrgID: sessionStorage["OrganizationID"] - 0,
HName: null,
HNumber: null,
Comparator1: '',
@@ -373,10 +372,9 @@
if (this.pageSize == 0) {
this.pageSize = 50
}
- this.queryParams.HOrgID = sessionStorage["OrganizationID"]-0
this.sWhere += " and HUSEORGID = '" + this.queryParams.HOrgID + "'"
//鐢熶骇璧勬枡鍒楄〃
- axios.get(this.baseURL + '/Gy_Department/list', {
+ axios.get(this.$baseUrl + '/Gy_Department/list', {
params: {
"sWhere": this.sWhere,
"user": sessionStorage["HUserName"],
@@ -448,7 +446,7 @@
},
DisPlay_HideColumn(HModName, user, option, dataOption) {
this.totalNameList = []
- axios.get(this.baseURL + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', {
+ axios.get(this.$baseUrl + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', {
params: {
"HModName": HModName,
"user": user,
@@ -589,6 +587,9 @@
this.selectedRow = row; // 璁板綍褰撳墠閫変腑鐨勮
this.lastSelectedRowIndex = this.tableData.indexOf(row);
this.$refs.tableData.toggleRowSelection(row);
+ if (this.openPage) {
+ this.$emit('deptEmit', row, 1)
+ }
},
//閫変腑琛岄珮浜牱寮�
rowStyle({ row, rowIndex }) {
@@ -599,16 +600,32 @@
//鍙屽嚮琛�
handleDblclick(row, column, cell, event) {
this.OperationType = 3
- this.handleEdit()
+ if (this.openPage) {
+ this.$emit('deptEmitDb', row, 1)
+ } else {
+ this.handleEdit();
+ }
},
// 澶氶�夋閫変腑鏁版嵁
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]
+ }
}
},
/** 鎼滅储鎸夐挳鎿嶄綔 */
@@ -688,6 +705,7 @@
}
// this.sWhere += this.addSWhereByOpenType()
// this.sWhere += this.getOrgIDByUser()
+ this.clearData()
this.getList()
},
@@ -705,7 +723,7 @@
//鏍规嵁鐢ㄦ埛鑾峰彇鐢ㄦ埛鍏宠仈缁勭粐鐨勮繃婊ゆ潯浠�
getOrgIDByUser() {
var res = "";
- axios.get(this.baseURL + '/Xt_User/getOrgIDListByUser', {
+ axios.get(this.$baseUrl + '/Xt_User/getOrgIDListByUser', {
params: {
HModName: this.HModName,
user: sessionStorage["HUserName"],
@@ -740,15 +758,23 @@
ColContent2: '',
ColContent: '',
}
+ this.clearData()
this.resetForm("queryForm")
this.getList()
},
-
+ clearData() {
+ this.single = true
+ this.multiple = true
+ this.OperationType = 0
+ this.copyType = 0
+ this.ids = []
+ },
//閫�鍑�
close() {
this.tableShow = true
this.openEdit = false
- this.editShow= false
+ this.editShow = false
+ this.clearData()
this.getList()
},
//鎵撳紑鏂板缁勪欢寮圭獥
@@ -771,15 +797,15 @@
editGyClose(val) {
this.editShow = false
this.openEdit = false
- this.multiple = true,
- this.getList()
+ this.clearData()
+ this.getList()
},
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete() {
this.$modal.confirm('纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠').then(() => {
if (!this.rowForm.瀹℃牳浜�) {
- axios.get(this.baseURL + "DeltetGy_Source", {
- params: { 'HItemID': this.rowForm.HItemID.toString(), 'user': sessionStorage["HUserName"] }
+ axios.get(this.$baseUrl + "DeltetGy_Department", {
+ params: { 'HItemID': this.rowForm.HItemID, 'user': sessionStorage["HUserName"] }
}).then(response => {
if (response.data.count == 1) {
this.getList()
@@ -799,7 +825,7 @@
set_CheckBill(num, form) {
var InterID = form.HItemID || form.HInterID
//閫昏緫瀹℃牳鏂规硶
- axios.get(this.baseURL + "/Gy_Source/AuditGy_Source", {
+ axios.get(this.$baseUrl + "/Gy_Department/AuditGy_Department", {
params: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] }
}).then(response => {
let result = response.data
@@ -810,15 +836,16 @@
else {
this.$modal.msgError("閿欒:" + result.code + result.Message,);
}
+ this.clearData()
}).catch(error => {
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
},
// 鍙嶇鐢�/绂佺敤鏁版嵁
set_De_Stop(num, form) {
- var InterID = form.HItemID || form.HInterID
+ var InterID = form.HItemID.toString() || form.HInterID.toString()
//閫昏緫瀹℃牳鏂规硶
- axios.get(this.baseURL + "/Gy_Source/StopGy_Source", {
+ axios.get(this.$baseUrl + "/Gy_Department/StopGy_Department", {
params: { "HInterID": InterID, "IsStop": num, "CurUserName": sessionStorage["HUserName"] }
}).then(response => {
let result = response.data
@@ -829,6 +856,7 @@
else {
this.$modal.msgError("閿欒:" + result.code + result.Message,);
}
+ this.clearData()
}).catch(error => {
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
@@ -882,7 +910,7 @@
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
},
--
Gitblit v1.9.1