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');
+
+ });
+};