wms特殊收货改2

master
mengjiao 8 months ago
parent caf05678e3
commit 675af0d52e

@ -36,9 +36,10 @@ export function updateBpprocure(data) {
}
// 删除白坯原材料采购单
export function delBpprocure(ID) {
export function delBpprocure(IDs) {
return request({
url: '/wms/bpprocure/' + ID,
method: 'delete'
url: '/wms/bpprocure/remove',
method: 'post',
data: IDs
})
}

@ -82,6 +82,7 @@
<el-table v-loading="loading" :data="bpprocureList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="id" align="center" prop="id" v-if="false" />
<el-table-column label="采购单号" align="center" prop="procureCode" />
<el-table-column label="物料编码" align="center" prop="materialCode" />
<el-table-column label="物料名称" align="center" prop="materialName" />
@ -91,24 +92,6 @@
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="价格" align="center" prop="price" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['wms:bpprocure:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['wms:bpprocure:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
@ -281,7 +264,7 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.ID)
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
@ -294,7 +277,7 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const ID = row.ID || this.ids
const ID = row.id || this.ids
getBpprocure(ID).then(response => {
this.form = response.data;
this.open = true;
@ -323,7 +306,7 @@ export default {
},
handlePrint() {
//
const selectedData = this.bpprocureList.filter(item => this.ids.includes(item.ID));
const selectedData = this.bpprocureList.filter(item => this.ids.includes(item.id));
if (selectedData.length === 0) {
this.$message.warning("请先选择要打印的记录");
return;
@ -398,9 +381,9 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const IDs = row.ID || this.ids;
const IDs = row.id || this.ids;
this.$modal.confirm('是否确认删除白坯原材料采购单编号为"' + IDs + '"的数据项?').then(function() {
return delBpprocure(IDs);
return delBpprocure(JSON.stringify(IDs));
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");

Loading…
Cancel
Save