Commit 4e13c0fe by LJM

取消发货加提示

parent be816f5f
...@@ -415,7 +415,6 @@ export default { ...@@ -415,7 +415,6 @@ export default {
}).catch(() => { }).catch(() => {
}) })
} }
} }
} }
......
...@@ -212,12 +212,18 @@ export default { ...@@ -212,12 +212,18 @@ export default {
}, },
updateBrand() { updateBrand() {
if (this.multipleSelection.length > 1) { if (this.multipleSelection.length > 1) {
this.$message("只能选择一条数据") this.$message({
return message:'只能选择一条数据',
type: 'warning'
});
return false;
} }
if (this.multipleSelection.length == 0) { if (this.multipleSelection.length == 0) {
this.$message("请至少选择一条数据") this.$message({
return message:'请至少选择一条数据',
type: 'warning'
});
return false;
} }
this.updateGoodsdata = JSON.parse(JSON.stringify(this.multipleSelection)); this.updateGoodsdata = JSON.parse(JSON.stringify(this.multipleSelection));
this.dialogVisible = true this.dialogVisible = true
...@@ -244,10 +250,6 @@ export default { ...@@ -244,10 +250,6 @@ export default {
}) })
}, },
submit() { submit() {
if (this.formParam.keyword && this.formParam.keyword.length == 1) {
this.$message("关键词不能少于2个字符");
return
}
this.page = 1; this.page = 1;
this.getData(); this.getData();
}, },
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<script> <script>
import Vue from 'vue'; import Vue from 'vue';
import Menu from "@/components/menu.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.prototype.$message = Message;
Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Pagination); Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Pagination);
...@@ -82,7 +82,7 @@ export default { ...@@ -82,7 +82,7 @@ export default {
limit: 10, limit: 10,
page: 1, page: 1,
dialogVisible: false, dialogVisible: false,
logs:[], logs: [],
formInline: { formInline: {
stock_in_sn: "", stock_in_sn: "",
goods_name: '', goods_name: '',
...@@ -163,7 +163,6 @@ export default { ...@@ -163,7 +163,6 @@ export default {
}); });
return false; return false;
} }
let stock_in_ids = []; let stock_in_ids = [];
stock_in_ids = this.multipleSelection.map(obj => { stock_in_ids = this.multipleSelection.map(obj => {
return obj.stock_in_id; return obj.stock_in_id;
...@@ -182,6 +181,9 @@ export default { ...@@ -182,6 +181,9 @@ export default {
//待入库 //待入库
let status = status_arr.every(ele => ele === 1) let status = status_arr.every(ele => ele === 1)
if (status) { if (status) {
MessageBox.confirm('确定取消发货吗?', {
type: 'error'
}).then(() => {
this.$http('POST', "/api/purchase/cancelSupDelivery", {stock_in_ids: stock_in_ids.join(',')}).then(res => { this.$http('POST', "/api/purchase/cancelSupDelivery", {stock_in_ids: stock_in_ids.join(',')}).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.$message({ this.$message({
...@@ -199,6 +201,9 @@ export default { ...@@ -199,6 +201,9 @@ export default {
}); });
} }
}) })
}).catch(() => {
})
} else { } else {
this.$message({ this.$message({
message: '请选择待入库状态', 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