|
@@ -7,11 +7,17 @@
|
|
|
//element talbe事件都能传
|
|
|
'selection-change': selectionChange,
|
|
|
}" :action-list="[
|
|
|
+ {
|
|
|
+ text: '入库',
|
|
|
+ disabled: selectData.length === 0,
|
|
|
+ action: () => openModalOne(false),
|
|
|
+ },
|
|
|
{
|
|
|
text: '申购',
|
|
|
disabled: selectData.length === 0,
|
|
|
action: () => openModal(),
|
|
|
},
|
|
|
+
|
|
|
|
|
|
]" @get-list="getList">
|
|
|
<template #code="{ item }">
|
|
@@ -131,13 +137,14 @@ const config = computed(() => {
|
|
|
attrs: {
|
|
|
label: "物品编码",
|
|
|
prop: "productCustomCode",
|
|
|
- // width: 150,
|
|
|
+ width: 150,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "物品名称",
|
|
|
prop: "productName",
|
|
|
+ width: 150,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -165,6 +172,20 @@ const config = computed(() => {
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
+ label: "退货单号",
|
|
|
+ prop: "backLogisticsCode",
|
|
|
+ width: 160,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "创建时间",
|
|
|
+ prop: "createTime",
|
|
|
+ width: 160,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
label: "操作",
|
|
|
width: "160",
|
|
|
align: "center",
|
|
@@ -181,7 +202,8 @@ const config = computed(() => {
|
|
|
},
|
|
|
el: "button",
|
|
|
click() {
|
|
|
- getDtl(row);
|
|
|
+ selectData.value = row;
|
|
|
+ openModal();
|
|
|
},
|
|
|
}
|
|
|
: {},
|
|
@@ -207,24 +229,7 @@ const config = computed(() => {
|
|
|
},
|
|
|
el: "button",
|
|
|
click() {
|
|
|
- ElMessageBox.confirm("您确定入库吗?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- }).then(() => {
|
|
|
- // 删除
|
|
|
- proxy
|
|
|
- .post("/excessGoodsDetails/inStock", {
|
|
|
- id: row.id,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- ElMessage({
|
|
|
- message: "操作成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- getList();
|
|
|
- });
|
|
|
- });
|
|
|
+ openModalOne(true, [row.id]);
|
|
|
},
|
|
|
}
|
|
|
: {},
|
|
@@ -413,6 +418,9 @@ const selectData = ref([]);
|
|
|
const selectionChange = (data) => {
|
|
|
selectData.value = data;
|
|
|
};
|
|
|
+onActivated(() => {
|
|
|
+ selectData.value = [];
|
|
|
+});
|
|
|
|
|
|
const openModal = () => {
|
|
|
proxy.$router.push({
|
|
@@ -426,6 +434,29 @@ const openModal = () => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+const openModalOne = (flag, arr = []) => {
|
|
|
+ let ids = [];
|
|
|
+ if (flag) {
|
|
|
+ ids = arr;
|
|
|
+ } else {
|
|
|
+ ids = selectData.value.map((x) => x.id);
|
|
|
+ }
|
|
|
+ ElMessageBox.confirm("您确定入库吗?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ // 删除
|
|
|
+ proxy.post("/excessGoodsDetails/inStock", ids).then((res) => {
|
|
|
+ ElMessage({
|
|
|
+ message: "操作成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ getList();
|
|
|
+ });
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
const deriveExcel = () => {
|
|
|
ElMessage({
|
|
|
message: "请稍后",
|