预入库的删除功能
This commit is contained in:
@@ -44,6 +44,15 @@ export function appendBill(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 删除库存单据
|
||||
export function delBill(data) {
|
||||
return request({
|
||||
url: '/wisdom/bill/delete',
|
||||
method: 'delete',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 移库
|
||||
export function moveRecord(data) {
|
||||
return request({
|
||||
@@ -70,6 +79,7 @@ export function backoutRecord(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 一键入库
|
||||
export function recordFinish(data) {
|
||||
return request({
|
||||
@@ -79,6 +89,15 @@ export function recordFinish(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 一键删除预入库
|
||||
export function recordRemove(data) {
|
||||
return request({
|
||||
url: '/wisdom/record/delete',
|
||||
method: 'delete',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -105,12 +124,12 @@ export function recordFinish(data) {
|
||||
|
||||
|
||||
// 删除库存单据
|
||||
export function delBill(id) {
|
||||
return request({
|
||||
url: '/wisdom/bill/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
// export function delBill(id) {
|
||||
// return request({
|
||||
// url: '/wisdom/bill/' + id,
|
||||
// method: 'delete'
|
||||
// })
|
||||
// }
|
||||
|
||||
// 查询库存单据详细
|
||||
// export function getBill(id) {
|
||||
|
||||
@@ -78,11 +78,12 @@
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" width="220">
|
||||
<el-table-column label="操作" align="center" fixed="right" width="260">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="picDetailFun(scope.row.billNo, 0, 1)">入库图片</el-button>
|
||||
<el-button link type="primary" @click="billClick(scope.row, 'bill', 'rk')">入库单</el-button>
|
||||
<el-button link type="primary" @click="editData(scope.row)">修改</el-button>
|
||||
<el-button link type="primary" @click="delData(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -127,6 +128,9 @@
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleOneClickStockDelete">一键撤销</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Delete" @click="handleOneClickStockDel">一键删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table v-loading="detailLoading" show-overflow-tooltip border :data="stockList"
|
||||
@selection-change="printSelectionChange">
|
||||
@@ -598,12 +602,14 @@ import {
|
||||
listBill,
|
||||
addBill,
|
||||
updateBill,
|
||||
delBill,
|
||||
listStock,
|
||||
appendBill,
|
||||
moveRecord,
|
||||
updateRecord,
|
||||
backoutRecord,
|
||||
recordFinish
|
||||
recordFinish,
|
||||
recordRemove
|
||||
} from "@/api/wisdom/bill";
|
||||
import {
|
||||
uploadContract,
|
||||
@@ -1116,6 +1122,14 @@ function editForm() {
|
||||
});
|
||||
}
|
||||
|
||||
// 删除单据
|
||||
const delData = (row) => {
|
||||
delBill([row.id]).then((response) => {
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
//双击单据,查询明细
|
||||
const billDoubleClickObj = ref({});
|
||||
const detailLoading = ref(false); //加载列表详情
|
||||
@@ -1296,6 +1310,7 @@ const handleStockDelete = (row) => {
|
||||
})
|
||||
.catch(() => { });
|
||||
};
|
||||
|
||||
// 一键撤销
|
||||
const handleOneClickStockDelete = (row) => {
|
||||
if (checkStockList.value.length == 0) {
|
||||
@@ -1322,6 +1337,27 @@ const handleOneClickStockDelete = (row) => {
|
||||
});
|
||||
};
|
||||
|
||||
// 一键删除
|
||||
const handleOneClickStockDel = () => {
|
||||
if (checkStockList.value.length == 0) {
|
||||
proxy.$modal.msgError("请勾选数据");
|
||||
return;
|
||||
}
|
||||
if (checkStockList.value.some(item => item.execStatus == 1)) {
|
||||
proxy.$modal.msgError("已入库数据不能删除");
|
||||
return;
|
||||
}
|
||||
const ids = checkStockList.value.map(item => item.id)
|
||||
recordRemove(ids).then((response) => {
|
||||
if (response.code == 200) {
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
detailList();
|
||||
} else {
|
||||
proxy.$modal.msgError("操作失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
// 一键入库
|
||||
|
||||
Reference in New Issue
Block a user