|
@@ -199,6 +199,17 @@
|
|
|
@row-del="rowDelBankOfDeposit"
|
|
|
></avue-crud>
|
|
|
</basic-container>
|
|
|
+ <containerTitle title="收发货地址"></containerTitle>
|
|
|
+ <basic-container>
|
|
|
+ <avue-crud
|
|
|
+ :option="addressOption"
|
|
|
+ v-model="addressForm"
|
|
|
+ :data="addressData"
|
|
|
+ @row-save="rowSaveAddress"
|
|
|
+ @row-update="rowUpdateAddress"
|
|
|
+ @row-del="rowDelAddress"
|
|
|
+ ></avue-crud>
|
|
|
+ </basic-container>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<flow-dialog :switchDialog="switchDialog" @onClose="onClose()">
|
|
@@ -218,7 +229,8 @@ import {
|
|
|
corpsbank,
|
|
|
corpsfiles,
|
|
|
corpsitem,
|
|
|
- areaTypeTree
|
|
|
+ areaTypeTree,
|
|
|
+ corpsAddrDelete,
|
|
|
} from "@/api/basicData/customerInformation";
|
|
|
import customerContact from "./configuration/customerContact.json";
|
|
|
import advantageProject from "./configuration/advantageProject.json";
|
|
@@ -226,6 +238,7 @@ import bankOfDeposit from "./configuration/bankOfDeposit.json";
|
|
|
import flowDialog from "@/components/flow-dialog/main";
|
|
|
import { supplierParameter } from "@/enums/management-type";
|
|
|
import { gainUser } from "@/api/basicData/customerInquiry";
|
|
|
+import addressOption from "./configuration/addressOption.json";
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
@@ -538,7 +551,10 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
- paymentOption: []
|
|
|
+ paymentOption: [],
|
|
|
+ addressOption: addressOption,
|
|
|
+ addressForm: {},
|
|
|
+ addressData: []
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
@@ -565,9 +581,11 @@ export default {
|
|
|
this.contactsData = this.form.corpsAttnList;
|
|
|
this.bankOfDepositData = this.form.corpsBankList;
|
|
|
this.advantageProjectData = this.form.corpsItems;
|
|
|
+ this.addressData = this.form.corpsAddrList.length > 0?this.form.corpsAddrList: [];
|
|
|
delete this.form.corpsAttnList;
|
|
|
delete this.form.corpsBankList;
|
|
|
delete this.form.corpsItems;
|
|
|
+ delete this.form.corpsAddrList;
|
|
|
});
|
|
|
} else {
|
|
|
//新增时根据左侧选中树结构给客户类别赋值
|
|
@@ -702,6 +720,7 @@ export default {
|
|
|
this.form.corpsAttnList = this.contactsData;
|
|
|
this.form.corpsBankList = this.bankOfDepositData;
|
|
|
this.form.corpsItems = this.advantageProjectData;
|
|
|
+ this.form.corpsAddrList = this.addressData;
|
|
|
if (typeof this.form.corpsTypeId == "object") {
|
|
|
this.form.corpsTypeId = this.form.corpsTypeId.join(",");
|
|
|
}
|
|
@@ -750,7 +769,40 @@ export default {
|
|
|
},
|
|
|
onClose(val) {
|
|
|
this.switchDialog = val;
|
|
|
- }
|
|
|
+ },
|
|
|
+ //新增收发货地址保存触发
|
|
|
+ rowSaveAddress(row, done, loading) {
|
|
|
+ this.addressData.push(row);
|
|
|
+ done();
|
|
|
+ },
|
|
|
+ //修改收发货地址优势项目触发
|
|
|
+ rowUpdateAddress(row, index, done, loading) {
|
|
|
+ done(row);
|
|
|
+ },
|
|
|
+ //删除收发货地址优势项目触发
|
|
|
+ rowDelAddress(row, index, donerowDel) {
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ if (row.id) {
|
|
|
+ corpsAddrDelete(row.id).then(res => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.addressData.splice(index, 1);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.addressData.splice(index, 1);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|