Commit ac2d99bf by LJM

寄售召回

parent 4cec9ad3
...@@ -107,8 +107,7 @@ ...@@ -107,8 +107,7 @@
import Vue from 'vue'; import Vue from 'vue';
import Menu from "@/components/menu.vue"; import Menu from "@/components/menu.vue";
import {Autocomplete, Button, Cascader, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip} from 'element-ui' import {Autocomplete, Button, Cascader, DatePicker, Descriptions, DescriptionsItem, Dialog, Divider, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Link, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip} from 'element-ui'
import {codeToText, regionData} from 'element-china-area-data' import {pcaTextArr} from 'element-china-area-data'
Vue.prototype.$message = Message Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm; Vue.prototype.$confirm = MessageBox.confirm;
...@@ -118,8 +117,8 @@ export default { ...@@ -118,8 +117,8 @@ export default {
name: "consignmentRecall", name: "consignmentRecall",
data() { data() {
return { return {
options: regionData, options: pcaTextArr,
selectedOptions: [], selectedOptions: ['广东省', '深圳市', '龙岗区'],
multipleSelection: [], multipleSelection: [],
total: 0, total: 0,
page: 1, page: 1,
...@@ -180,9 +179,9 @@ export default { ...@@ -180,9 +179,9 @@ export default {
*/ */
handleChange(value) { handleChange(value) {
if (value && value.length) { if (value && value.length) {
this.updateConsignmentRecallReceiptInfoParams.province = codeToText[value[0]]; this.updateConsignmentRecallReceiptInfoParams.province = value[0];//省
this.updateConsignmentRecallReceiptInfoParams.city = codeToText[value[1]]; this.updateConsignmentRecallReceiptInfoParams.city = value[1];//市
this.updateConsignmentRecallReceiptInfoParams.district = codeToText[value[2]]; this.updateConsignmentRecallReceiptInfoParams.district = value[2];//区
} else { } else {
this.updateConsignmentRecallReceiptInfoParams.province = ''; this.updateConsignmentRecallReceiptInfoParams.province = '';
this.updateConsignmentRecallReceiptInfoParams.city = ''; this.updateConsignmentRecallReceiptInfoParams.city = '';
...@@ -272,7 +271,7 @@ export default { ...@@ -272,7 +271,7 @@ export default {
this.dialogVisible_1 = true; this.dialogVisible_1 = true;
break; break;
case 2: case 2:
// 作废:校验待提审或进行中(未发货未入库)状态 // 作废:待提审、待退货出库状态可作废
const invalidCancel = this.multipleSelection.filter(item => !(['0', '2'].includes(item.recall_status))); const invalidCancel = this.multipleSelection.filter(item => !(['0', '2'].includes(item.recall_status)));
if (invalidCancel.length) { if (invalidCancel.length) {
this.$message.warning('待提审、待退货出库状态才可作废'); this.$message.warning('待提审、待退货出库状态才可作废');
...@@ -282,6 +281,7 @@ export default { ...@@ -282,6 +281,7 @@ export default {
this.dialogVisible_2 = true; this.dialogVisible_2 = true;
break; break;
case 3: case 3:
this.getConsignmentRecallReceiptInfo();
this.dialogVisible_3 = true; this.dialogVisible_3 = true;
break; break;
} }
...@@ -327,12 +327,34 @@ export default { ...@@ -327,12 +327,34 @@ export default {
}) })
}, },
/** /**
* 寄售召回-获取收货地址
*/
getConsignmentRecallReceiptInfo() {
this.$http('GET', "/api/consignmentRecall/getConsignmentRecallReceiptInfo", {}).then(res => {
if (res.code === 0) {
this.updateConsignmentRecallReceiptInfoParams = res.data;
}
})
},
/**
* 寄售召回-修改收货地址 * 寄售召回-修改收货地址
*/ */
updateConsignmentRecallReceiptInfo(formName) { updateConsignmentRecallReceiptInfo(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
alert('submit!'); this.$http('POST', "/api/consignmentRecall/updateConsignmentRecallReceiptInfo", this.updateConsignmentRecallReceiptInfoParams).then(res => {
if (res.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
onClose: () => {
this.dialogVisible_3 = false;
}
});
} else {
this.$message.error(res.msg || '操作失败');
}
})
} else { } else {
console.log('error submit!!'); console.log('error submit!!');
return false; return false;
......
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