|
@@ -785,6 +785,7 @@ export default {
|
|
|
components: { Queryfrom, Menu, DialogTemplate, Deliver, OutBound },
|
|
|
data() {
|
|
|
return {
|
|
|
+ selection: [], //勾选的数据
|
|
|
// 出库单 start
|
|
|
outBoundShow: false,
|
|
|
// 出库单 end
|
|
@@ -1951,6 +1952,7 @@ export default {
|
|
|
// )
|
|
|
// ]
|
|
|
// );
|
|
|
+ this.selection = selection;
|
|
|
this.myDelIds = selection.map((item) => item.saleOrderId);
|
|
|
console.log(this.myDelIds);
|
|
|
this.ids = selection.map((item) => item.saleOrderSaleNo);
|
|
@@ -3017,6 +3019,16 @@ export default {
|
|
|
// 自定义删除按钮
|
|
|
async myDeleteHandler(row) {
|
|
|
console.log(row);
|
|
|
+ let stateArr = ["2", "3", "4", "5", "6", "8"];
|
|
|
+ let isDeleteValidate = this.selection.some((item) => {
|
|
|
+ return stateArr.includes(item.status);
|
|
|
+ });
|
|
|
+ console.log(this.selection);
|
|
|
+ console.log(isDeleteValidate);
|
|
|
+ if (isDeleteValidate) {
|
|
|
+ this.$message.error("仅允许删除订单状态为'未提交'或'未通过'的订单");
|
|
|
+ return;
|
|
|
+ }
|
|
|
await this.$confirm("是否确认删除选中的数据?", "警告", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|