Merge branch 'feature/task1.0.0' into msb_test

merge-requests/87/merge
张征 3 years ago
commit fd33b79f7e

@ -212,13 +212,7 @@ export default {
onCanceloperation() {
let vm = this;
vm.isOperation = false;
vm.$set(vm.selectData.area, "value", "");
vm.$set(vm.selectData.city, "value", "");
vm.$set(vm.selectData.province, "value", "");
vm.$set(vm, "detailAddress", "");
vm.$set(vm, "defaultAddress", "");
vm.$set(vm, "addressUser", "");
vm.$set(vm, "addressPhone", "");
vm.clearForm();
vm.$emit("onSaveSuccess");
},
onEdit() {
@ -274,8 +268,8 @@ export default {
},
async onAddAddress() {
let vm = this;
let curItem = vm.addressList[vm.editIndex]
console.log(`vm.addressPhone != curItem.phone`,vm.addressPhone , curItem);
let curItem = vm.addressList[vm.editIndex];
console.log(`vm.addressPhone != curItem.phone`, vm.addressPhone, curItem);
if (!vm.selectData?.area?.code) {
vm.$message.error("请选择所在区域~");
return;
@ -313,13 +307,7 @@ export default {
}
if (!res.error) {
vm.$message.success("添加成功!");
vm.$set(vm.selectData.area, "value", "");
vm.$set(vm.selectData.city, "value", "");
vm.$set(vm.selectData.province, "value", "");
vm.$set(vm, "detailAddress", "");
vm.$set(vm, "defaultAddress", "");
vm.$set(vm, "addressUser", "");
vm.$set(vm, "addressPhone", "");
vm.clearForm();
vm.$emit("onSaveSuccess");
vm.isEdit = false;
vm.getAddressData();
@ -332,6 +320,19 @@ export default {
vm.$emit("emitAddress", item);
vm.dialogVisible = false;
},
clearForm() {
let vm = this;
vm.$set(vm.selectData.area, "value", "");
vm.$set(vm.selectData.city, "value", "");
vm.$set(vm.selectData.province, "value", "");
vm.$set(vm.selectData.area, "code", "");
vm.$set(vm.selectData.city, "code", "");
vm.$set(vm.selectData.province, "code", "");
vm.$set(vm, "detailAddress", "");
vm.$set(vm, "defaultAddress", "");
vm.$set(vm, "addressUser", "");
vm.$set(vm, "addressPhone", "");
},
},
};
</script>

Loading…
Cancel
Save