From ff3e3dcb4b1a85bbf530c017fe3add8c0c2d5fa7 Mon Sep 17 00:00:00 2001
From: 陈婷婷 <506607603@qq.com>
Date: 星期一, 24 十一月 2025 08:41:44 +0800
Subject: [PATCH] 容器主档编辑
---
src/views/basic/gyStockPlace/gyStockPlace.vue | 81 +++++++++++++++++++---------------------
1 files changed, 38 insertions(+), 43 deletions(-)
diff --git a/src/views/basic/gyStockPlace/gyStockPlace.vue b/src/views/basic/gyStockPlace/gyStockPlace.vue
index 92720f7..c9af3c0 100644
--- a/src/views/basic/gyStockPlace/gyStockPlace.vue
+++ b/src/views/basic/gyStockPlace/gyStockPlace.vue
@@ -1,5 +1,5 @@
<template>
- <div style="padding: 10px">
+ <div style="padding: 10px;position: relative">
<el-form
:model="queryParams"
ref="queryForm"
@@ -488,7 +488,6 @@
OperationType: null, //淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
HInterID: null,
baseURL: process.env.VUE_APP_BASE_API,
- user: "admin",
currentRow: [],
lastSelectedRowIndex: null, // 鐢ㄤ簬璁板綍涓婃鐐瑰嚮鐨勮绱㈠紩
lastSelectedRow: null, // 涓婁竴娆¢�変腑鐨勮
@@ -709,37 +708,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.queryParams.HOrgName = response.data.data.find(
- (e) => e.ID == data.HUSEORGID
- )?.Name;
- }
- this.getList();
- })
- .catch((error) => {
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
- })
- .catch((error) => {
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
- },
getList() {
this.tableShow = false;
this.loading = true;
@@ -753,7 +721,7 @@
.get(this.baseURL + "/Gy_StockPlace/list2Page", {
params: {
sWhere: `${this.sWhere}`,
- user: this.user,
+ user: sessionStorage["HUserName"],
page: this.page,
size: this.pageSize,
},
@@ -842,7 +810,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) => {
@@ -1000,6 +973,9 @@
this.selectedRow = row; // 璁板綍褰撳墠閫変腑鐨勮
this.lastSelectedRowIndex = this.tableData.indexOf(row);
this.$refs.tableData.toggleRowSelection(row);
+ if (this.openPage) {
+ this.$emit("deptEmit", row, 9);
+ }
},
//閫変腑琛岄珮浜牱寮�
rowStyle({ row, rowIndex }) {
@@ -1010,16 +986,32 @@
//鍙屽嚮琛�
handleDblclick(row, column, cell, event) {
this.OperationType = 3;
- this.handleEdit();
+ if (this.openPage) {
+ this.$emit("deptEmitDb", row, 9);
+ } 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];
+ }
}
},
//鎵撳紑渚ц竟鎼滅储寮圭獥
@@ -1133,7 +1125,7 @@
.get(this.baseURL + "/Xt_User/getOrgIDListByUser", {
params: {
HModName: this.HModName,
- user: this.user,
+ user: sessionStorage["HUserName"],
HOrgID: this.zuzhiId,
},
})
@@ -1216,7 +1208,10 @@
if (!this.rowForm.瀹℃牳浜�) {
axios
.get(this.baseURL + "Deltet_Gy_StockPlace", {
- params: { HItemID: this.rowForm.HItemID.toString(), user: this.user },
+ params: {
+ HItemID: this.rowForm.HItemID.toString(),
+ user: sessionStorage["HUserName"],
+ },
})
.then((response) => {
if (response.data.count == 1) {
@@ -1286,7 +1281,7 @@
}
}
var sSubStr = JSON.stringify(num);
- var sMainSub = sSubStr + "&鍜�" + this.user;
+ var sMainSub = sSubStr + "&鍜�" + sessionStorage["HUserName"];
axios({
method: "post",
url: this.baseURL + "/Gy_Warehouse/Gy_Process_Excel",
--
Gitblit v1.9.1