单据编辑

prod
anthonywj 2 years ago
parent 7f62666f6e
commit b7822c7f22

@ -41,6 +41,7 @@ export function submitOrderWeb(query) {
data: query data: query
}); });
} }
export function submitCodes(query) { export function submitCodes(query) {
return axios({ return axios({
url: "/warehouse/inout/submitCodes", url: "/warehouse/inout/submitCodes",
@ -48,6 +49,7 @@ export function submitCodes(query) {
data: query data: query
}); });
} }
export function submitBiz(query) { export function submitBiz(query) {
return axios({ return axios({
url: "/warehouse/inout/submitBiz", url: "/warehouse/inout/submitBiz",
@ -425,3 +427,22 @@ export function filterOrderTrace(params) {
}); });
} }
export function deleteInvByBillNo(query) {
return axios({
url: "/udiwms/inout/order/finish/delete",
method: "post",
data: query
});
}
export function deleteInvByCode(query) {
return axios({
url: "/udiwms/inout/code/finish/delete",
method: "post",
data: query
});
}

@ -43,14 +43,6 @@
<span>{{ scope.row.createTime }}</span> <span>{{ scope.row.createTime }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="校验状态" prop="status" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag :type="(scope.row.status ===-1 ) | statusFilterType">{{-->
<!-- checkStatus[scope.row.status]-->
<!-- }}-->
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" width="150"> <el-table-column label="操作" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -403,7 +395,7 @@
<script> <script>
import { import {
deleteByOrderId, deleteByOrderId,
filterOrderTrace, updateOrderInfo filterOrderTrace, updateOrderInfo, deleteInvByBillNo
} from "../../api/inout/order"; } from "../../api/inout/order";
import {isBlank} from "@/utils/strUtil"; import {isBlank} from "@/utils/strUtil";
import {getBizDetailList} from "@/api/inout/orderDetailBiz"; import {getBizDetailList} from "@/api/inout/orderDetailBiz";
@ -565,22 +557,6 @@ export default {
this.list = []; this.list = [];
}); });
}, },
deleteOrders(data) {
this.loading = true;
this.deleteData.billNo = data.billNo;
deleteByOrderId(this.deleteData)
.then((response) => {
if (response.code == 20000) {
this.getList();
this.$message({
type: "success",
message: "删除成功!",
});
}
})
.catch(() => {
});
},
deleteAllOrder() { deleteAllOrder() {
if (this.list.length > 0) { if (this.list.length > 0) {
this.$confirm("是否确认删除此单据和所有关联单据?", "提示", { this.$confirm("是否确认删除此单据和所有关联单据?", "提示", {
@ -588,7 +564,22 @@ export default {
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}).then(() => { }).then(() => {
//TODO let billNos = [];
this.list.forEach(item => {
billNos.push(item.billNo);
});
let params = {
billNos: billNos
};
deleteInvByBillNo(params).then((res) => {
if (res.code === 20000) {
this.$message.success("删除成功");
this.list = [];
this.detailList = [];
}
}).catch((error) => {
this.$message.error("删除失败");
})
}).catch(() => { }).catch(() => {
}); });
} }
@ -631,7 +622,16 @@ export default {
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
//TODO let query = {billNo: row.billNo};
deleteInvByBillNo(query).then((res) => {
if (res.code === 20000) {
this.$message.success("修改成功");
this.getList();
}
}).catch((error) => {
this.$message.error(error.message);
})
}) })
.catch(() => { .catch(() => {
}); });

@ -97,7 +97,7 @@
<script> <script>
import { import {
filterOrderTrace, updateOrderInfo deleteInvByCode, updateOrderInfo
} from "../../api/inout/order"; } from "../../api/inout/order";
import {getCodeListForEdit} from "@/api/inout/code"; import {getCodeListForEdit} from "@/api/inout/code";
import {isBlank} from "@/utils/strUtil"; import {isBlank} from "@/utils/strUtil";
@ -219,7 +219,16 @@ export default {
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
//TODO deleteInvByCode(row).then((res) => {
if (res.code === 20000) {
this.$message.success("操作成功");
this.getList();
} else {
this.$message.error(res.message);
}
}).catch((error) => {
this.$message.error(error.message);
});
}) })
.catch(() => { .catch(() => {
}); });

Loading…
Cancel
Save