1.添加盘点相关接口

feature-order-fix
x_z 2 years ago
parent ef574c117e
commit 1baccb1175

@ -7,3 +7,11 @@ export function getCountCodesList(params) {
params: params
});
}
export function deleteCode(data) {
return axios({
url: "/invCount/codes/deleteCode",
method: "post",
data: data
});
}

@ -39,3 +39,11 @@ export function submitAudit(params) {
params: params
});
}
export function deleteCountOrderDetail(data) {
return axios({
url: "/invCount/codes/deleteCode",
method: "post",
data: data
});
}

@ -199,11 +199,17 @@
show-overflow-tooltip></el-table-column>
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="showCodes(scope.row)"
>码详情
</el-button>
<el-button
type="text"
size="small"
@click.stop="true"
@click.native="deleteCodeArray(scope.$index, scope.row)"
@click.native="deleteOrderDetail(scope.$index, scope.row)"
>删除
</el-button
>
@ -287,19 +293,21 @@ import {isBlank} from "@/utils/strUtil";
import {filterAllByUser} from "@/api/basic/invWarehouse";
import {getSpaceCodeList} from "@/api/inventory/invSpace";
import {filterProducts} from "@/api/inventory/InvProducts";
import {saveCountOrder} from "@/api/inventory/invCountOrder";
import {saveCountOrder, getCountOrderDetailList, deleteCountOrderDetail} from "@/api/inventory/invCountOrder";
import {getCountCodesList, deleteCode} from "@/api/inventory/invCountCodes";
export default {
name: "closeDialog",
props: {
data: {
type: Object,
required: true,
},
closeDialog: {
type: Function,
required: true,
},
countOrder: {
type: Object,
required: true,
}
},
data() {
return {
@ -343,6 +351,7 @@ export default {
},
productList: [],
scanText: "扫码录入:",
codesList: []
};
},
methods: {
@ -386,15 +395,16 @@ export default {
this.getInvProducts();
},
locInChange() {
this.formData.invWarehouseCode = null;
this.formData.invSpaceCode = null;
//
let params = {pcode: this.formData.locStorageCode}
filterSubByInv(params).then((res) => {
this.subInvList = res.data || [];
});
this.formData.invWarehouseCode = null;
this.formData.invSpaceCode = null;
},
subStorageChange() {
this.formData.invSpaceCode = null;
//
let params = {
invStorageCode: this.formData.locStorageCode,
@ -403,11 +413,10 @@ export default {
getSpaceCodeList(params).then((res) => {
this.spaceList = res.data || [];
});
this.formData.invSpaceCode = null;
},
selectProductFunction() {
if (isBlank(this.formData.locStorageCode) || isBlank(this.formData.invWarehouseCode)) {
this.$message.warning("请先选择当前仓库和分库");
this.$message.warning("请先选择当前仓库货位信息");
return;
}
this.selectInvProductVisible = true;
@ -465,17 +474,51 @@ export default {
});
this.selectInvProductVisible = false;
},
deleteCodeArray(index, row) {
for (let i = 0; i < this.codeArray.length; i++) {
if (this.codeArray[i] === row) {
this.codeArray.splice(i, 1);
return;
}
deleteOrderDetail(index, row) {
if (isBlank(row.id)) {
//
this.codeArray.splice(index, 1);
} else {
//
let params = {id: row.id}
deleteCountOrderDetail(params).then((res) => {
if (res.code === 20000) {
this.$message.success("删除成功");
let detailParam = {
orderId: this.formData.orderId
}
getCountOrderDetailList(detailParam).then((result) => {
this.codeArray = result.data.list || [];
})
} else {
this.$message.error(res.data);
}
})
}
},
showCodes(row) {
let params = {
orderId: this.formData.orderId,
productId: row.productId
};
getCountCodesList(params).then((res) => {
this.codesList = res.data.list;
});
},
},
created() {
this.getStorage();
this.formData = this.countOrder;
if (!isBlank(this.formData.orderId)) {
//
let params = {orderId: this.formData.orderId};
getCountOrderDetailList(params).then((res) => {
if (res.code === 20000) {
this.productList = res.data.list || [];
this.total = res.data.total || 0;
}
})
}
},
};
</script>

@ -116,6 +116,7 @@
>
<addCountOrder
:closeDialog="closeAddDialog"
:countOrder="countOrder"
></addCountOrder>
</el-dialog>
@ -157,7 +158,7 @@ export default {
2: "已审核"
},
addCountOrderVisible: false,
countOrder: null
};
},
methods: {
@ -270,13 +271,15 @@ export default {
},
addCountOrder() {
this.addCountOrderVisible = true;
this.countOrder = {};
},
closeAddDialog() {
this.addCountOrderVisible = false;
this.getList();
},
editOrder() {
editOrder(row) {
this.addCountOrderVisible = true;
this.countOrder = row;
},
},
components: {

Loading…
Cancel
Save