预入库的删除功能
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) {
|
export function moveRecord(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -70,6 +79,7 @@ export function backoutRecord(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 一键入库
|
// 一键入库
|
||||||
export function recordFinish(data) {
|
export function recordFinish(data) {
|
||||||
return request({
|
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) {
|
// export function delBill(id) {
|
||||||
return request({
|
// return request({
|
||||||
url: '/wisdom/bill/' + id,
|
// url: '/wisdom/bill/' + id,
|
||||||
method: 'delete'
|
// method: 'delete'
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 查询库存单据详细
|
// 查询库存单据详细
|
||||||
// export function getBill(id) {
|
// export function getBill(id) {
|
||||||
|
|||||||
@@ -78,11 +78,12 @@
|
|||||||
}}</span>
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="picDetailFun(scope.row.billNo, 0, 1)">入库图片</el-button>
|
<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="billClick(scope.row, 'bill', 'rk')">入库单</el-button>
|
||||||
<el-button link type="primary" @click="editData(scope.row)">修改</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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -127,6 +128,9 @@
|
|||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleOneClickStockDelete">一键撤销</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleOneClickStockDelete">一键撤销</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" plain icon="Delete" @click="handleOneClickStockDel">一键删除</el-button>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table v-loading="detailLoading" show-overflow-tooltip border :data="stockList"
|
<el-table v-loading="detailLoading" show-overflow-tooltip border :data="stockList"
|
||||||
@selection-change="printSelectionChange">
|
@selection-change="printSelectionChange">
|
||||||
@@ -598,12 +602,14 @@ import {
|
|||||||
listBill,
|
listBill,
|
||||||
addBill,
|
addBill,
|
||||||
updateBill,
|
updateBill,
|
||||||
|
delBill,
|
||||||
listStock,
|
listStock,
|
||||||
appendBill,
|
appendBill,
|
||||||
moveRecord,
|
moveRecord,
|
||||||
updateRecord,
|
updateRecord,
|
||||||
backoutRecord,
|
backoutRecord,
|
||||||
recordFinish
|
recordFinish,
|
||||||
|
recordRemove
|
||||||
} from "@/api/wisdom/bill";
|
} from "@/api/wisdom/bill";
|
||||||
import {
|
import {
|
||||||
uploadContract,
|
uploadContract,
|
||||||
@@ -1116,6 +1122,14 @@ function editForm() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除单据
|
||||||
|
const delData = (row) => {
|
||||||
|
delBill([row.id]).then((response) => {
|
||||||
|
proxy.$modal.msgSuccess("删除成功");
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//双击单据,查询明细
|
//双击单据,查询明细
|
||||||
const billDoubleClickObj = ref({});
|
const billDoubleClickObj = ref({});
|
||||||
const detailLoading = ref(false); //加载列表详情
|
const detailLoading = ref(false); //加载列表详情
|
||||||
@@ -1296,6 +1310,7 @@ const handleStockDelete = (row) => {
|
|||||||
})
|
})
|
||||||
.catch(() => { });
|
.catch(() => { });
|
||||||
};
|
};
|
||||||
|
|
||||||
// 一键撤销
|
// 一键撤销
|
||||||
const handleOneClickStockDelete = (row) => {
|
const handleOneClickStockDelete = (row) => {
|
||||||
if (checkStockList.value.length == 0) {
|
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