From 9b0325c0573010ca8e59d6feb593ace7df744bb8 Mon Sep 17 00:00:00 2001
From: xzg <4727863@qq.com>
Date: Mon, 14 Oct 2024 14:52:56 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B4=A7=E4=BD=8D=E4=BF=A1=E6=81=AF=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E6=98=AF=E5=90=A6=E4=B8=8A=E6=9E=B6=E5=BC=80=E5=85=B3?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=BB=93=E5=BA=93=E9=85=8D=E7=BD=AE?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=98=AF=E5=90=A6=E8=87=AA=E5=8A=A8=E4=B8=8A?=
=?UTF-8?q?=E6=9E=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/basicdata/basicdataGoodsAllocation.js | 9 ++++-
.../basicdata/basicdataGoodsAllocation.js | 12 ++++++
.../BasicdataGoodsAllocation.vue | 40 +++++++++++++++++++
.../warehouse/basicdataWarehouse.vue | 18 ++++++++-
.../Traincostbreakdown.vue | 4 +-
5 files changed, 80 insertions(+), 3 deletions(-)
diff --git a/src/api/basicdata/basicdataGoodsAllocation.js b/src/api/basicdata/basicdataGoodsAllocation.js
index 78b09d87..1797d765 100644
--- a/src/api/basicdata/basicdataGoodsAllocation.js
+++ b/src/api/basicdata/basicdataGoodsAllocation.js
@@ -8,7 +8,14 @@ export const getList = params => {
params,
});
};
-
+/** 是否自动上架 */
+export const $_updateDefault = data => {
+ return request({
+ url: '/api/logpm-basicdata/goodsAllocation/updateDefault',
+ method: 'post',
+ data,
+ });
+};
export const getDetail = id => {
return request({
url: '/api/logpm-basicdata/goodsAllocation/detail',
diff --git a/src/option/basicdata/basicdataGoodsAllocation.js b/src/option/basicdata/basicdataGoodsAllocation.js
index 5553d26b..b2852322 100644
--- a/src/option/basicdata/basicdataGoodsAllocation.js
+++ b/src/option/basicdata/basicdataGoodsAllocation.js
@@ -25,6 +25,18 @@ export const columnList = [
sortable: true,
head: false,
},
+
+ {
+ prop: 'isDefault',
+ label: '是否自动上架',
+ type: 6,
+ values: '',
+ width: '130',
+ checkarr: [],
+ fixed: false,
+ sortable: true,
+ head: false,
+ },
{
prop: 'goodsAreaName',
label: '货区名称',
diff --git a/src/views/basicdata/warehouse/goodsAllocation/BasicdataGoodsAllocation.vue b/src/views/basicdata/warehouse/goodsAllocation/BasicdataGoodsAllocation.vue
index 1b2093c1..d0c5524e 100644
--- a/src/views/basicdata/warehouse/goodsAllocation/BasicdataGoodsAllocation.vue
+++ b/src/views/basicdata/warehouse/goodsAllocation/BasicdataGoodsAllocation.vue
@@ -108,6 +108,14 @@
handleDownAllocation(false, slotProps.scope)">一键下架
+
+
+
@@ -181,6 +189,7 @@ import {
disable,
enable,
getNode,
+ $_updateDefault,
downAllocation,
} from '@/api/basicdata/basicdataGoodsAllocation';
@@ -559,6 +568,37 @@ const handleView = ({ row }) => {
},
});
};
+const handleMakeCargo = async row => {
+ row.isDefault = !row.isDefault ? 1 : 0;
+ ElMessageBox.confirm(`是否确认${row.isDefault ? '关闭' : '开启'}{操作?`, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning',
+ })
+ .then(async () => {
+ try {
+ details.loadingObj.list = true;
+ let data = {
+ id: row.id,
+ isDefault: !row.isDefault ? 1 : 0,
+ };
+ await $_updateDefault(data).then(res => {
+ if (res.data.code == 200) {
+ ElMessage.success(res.data.msg);
+ }
+ });
+ } catch (e) {
+ console.log(e);
+ } finally {
+ details.loadingObj.list = false;
+ onLoad();
+ }
+ })
+ .catch(() => {
+ console.log(row,'row');
+
+ });
+};