Commit 4e13c0fe by LJM

取消发货加提示

parent be816f5f
......@@ -415,7 +415,6 @@ export default {
}).catch(() => {
})
}
}
}
......
......@@ -212,12 +212,18 @@ export default {
},
updateBrand() {
if (this.multipleSelection.length > 1) {
this.$message("只能选择一条数据")
return
this.$message({
message:'只能选择一条数据',
type: 'warning'
});
return false;
}
if (this.multipleSelection.length == 0) {
this.$message("请至少选择一条数据")
return
this.$message({
message:'请至少选择一条数据',
type: 'warning'
});
return false;
}
this.updateGoodsdata = JSON.parse(JSON.stringify(this.multipleSelection));
this.dialogVisible = true
......@@ -244,10 +250,6 @@ export default {
})
},
submit() {
if (this.formParam.keyword && this.formParam.keyword.length == 1) {
this.$message("关键词不能少于2个字符");
return
}
this.page = 1;
this.getData();
},
......
......@@ -69,7 +69,7 @@
<script>
import Vue from 'vue';
import Menu from "@/components/menu.vue";
import {Autocomplete, Button, Dialog, Form, FormItem, Input, Message, Option, Pagination, Select, Table, TableColumn, Tag} from 'element-ui'
import {Autocomplete, Button, Dialog, Form, FormItem, Input, Message, MessageBox, Option, Pagination, Select, Table, TableColumn, Tag} from 'element-ui'
Vue.prototype.$message = Message;
Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Pagination);
......@@ -82,7 +82,7 @@ export default {
limit: 10,
page: 1,
dialogVisible: false,
logs:[],
logs: [],
formInline: {
stock_in_sn: "",
goods_name: '',
......@@ -163,7 +163,6 @@ export default {
});
return false;
}
let stock_in_ids = [];
stock_in_ids = this.multipleSelection.map(obj => {
return obj.stock_in_id;
......@@ -182,22 +181,28 @@ export default {
//待入库
let status = status_arr.every(ele => ele === 1)
if (status) {
this.$http('POST', "/api/purchase/cancelSupDelivery", {stock_in_ids: stock_in_ids.join(',')}).then(res => {
if (res.code == 0) {
this.$message({
message: "操作成功",
type: 'success',
duration: 2000,
onClose() {
self.getData();
}
});
} else {
this.$message({
message: res.msg,
type: 'error'
});
}
MessageBox.confirm('确定取消发货吗?', {
type: 'error'
}).then(() => {
this.$http('POST', "/api/purchase/cancelSupDelivery", {stock_in_ids: stock_in_ids.join(',')}).then(res => {
if (res.code == 0) {
this.$message({
message: "操作成功",
type: 'success',
duration: 2000,
onClose() {
self.getData();
}
});
} else {
this.$message({
message: res.msg,
type: 'error'
});
}
})
}).catch(() => {
})
} else {
this.$message({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment