|
@@ -83,17 +83,17 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
<el-select
|
|
|
- v-else-if="item.prop === 'creditRating'"
|
|
|
- size="small"
|
|
|
- style="width: 100%;"
|
|
|
- v-model="form[item.prop]"
|
|
|
- placeholder=""
|
|
|
+ v-else-if="item.prop === 'creditRating'"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%;"
|
|
|
+ v-model="form[item.prop]"
|
|
|
+ placeholder=""
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in creditRatingList"
|
|
|
- :key="item.id"
|
|
|
- :label="item.dictValue"
|
|
|
- :value="item.dictValue"
|
|
|
+ v-for="item in creditRatingList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.dictValue"
|
|
|
+ :value="item.dictValue"
|
|
|
>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -187,9 +187,12 @@
|
|
|
<containerTitle title="客户联系人"></containerTitle>
|
|
|
<basic-container>
|
|
|
<avue-crud
|
|
|
+ ref="crud"
|
|
|
:option="customerContact"
|
|
|
v-model="contactsForm"
|
|
|
:data="contactsData"
|
|
|
+ @saveColumn="saveColumn"
|
|
|
+ @resetColumn="resetColumn"
|
|
|
@row-save="rowSave"
|
|
|
@row-update="rowUpdate"
|
|
|
@row-del="rowDel"
|
|
@@ -209,9 +212,12 @@
|
|
|
<containerTitle title="客户开户行"></containerTitle>
|
|
|
<basic-container>
|
|
|
<avue-crud
|
|
|
+ ref="crud2"
|
|
|
:option="bankOfDeposit"
|
|
|
v-model="bankOfDepositForm"
|
|
|
:data="bankOfDepositData"
|
|
|
+ @saveColumn="saveColumn2"
|
|
|
+ @resetColumn="resetColumn2"
|
|
|
@row-save="rowSaveBankOfDeposit"
|
|
|
@row-update="rowUpdateBankOfDeposit"
|
|
|
@row-del="rowDelBankOfDeposit"
|
|
@@ -220,9 +226,12 @@
|
|
|
<containerTitle title="收发货地址"></containerTitle>
|
|
|
<basic-container>
|
|
|
<avue-crud
|
|
|
+ ref="crud3"
|
|
|
:option="addressOption"
|
|
|
v-model="addressForm"
|
|
|
:data="addressData"
|
|
|
+ @saveColumn="saveColumn3"
|
|
|
+ @resetColumn="resetColumn3"
|
|
|
@row-save="rowSaveAddress"
|
|
|
@row-update="rowUpdateAddress"
|
|
|
@row-del="rowDelAddress"
|
|
@@ -248,7 +257,7 @@ import {
|
|
|
corpsfiles,
|
|
|
corpsitem,
|
|
|
areaTypeTree,
|
|
|
- corpsAddrDelete,
|
|
|
+ corpsAddrDelete
|
|
|
} from "@/api/basicData/customerInformation";
|
|
|
import customerContact from "./configuration/customerContact.json";
|
|
|
import advantageProject from "./configuration/advantageProject.json";
|
|
@@ -265,7 +274,7 @@ export default {
|
|
|
form: {},
|
|
|
disabled: false,
|
|
|
contactsForm: {},
|
|
|
- creditRatingList:[],
|
|
|
+ creditRatingList: [],
|
|
|
advantageProjectForm: {},
|
|
|
bankOfDepositForm: {},
|
|
|
contactsData: [],
|
|
@@ -274,13 +283,13 @@ export default {
|
|
|
dic: [],
|
|
|
dicArea: [],
|
|
|
props: {
|
|
|
- value: 'name',
|
|
|
- label: 'name',
|
|
|
- multiple: true,
|
|
|
+ value: "name",
|
|
|
+ label: "name",
|
|
|
+ multiple: true
|
|
|
},
|
|
|
- customerContact: customerContact,
|
|
|
- advantageProject: advantageProject,
|
|
|
- bankOfDeposit: bankOfDeposit,
|
|
|
+ customerContact: {},
|
|
|
+ advantageProject:advantageProject,
|
|
|
+ bankOfDeposit: {},
|
|
|
contactInformation: {
|
|
|
column: [
|
|
|
{
|
|
@@ -564,10 +573,11 @@ export default {
|
|
|
mock: {
|
|
|
type: "county"
|
|
|
}
|
|
|
- },{
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "信用等级",
|
|
|
prop: "creditRating",
|
|
|
- span: 8,
|
|
|
+ span: 8
|
|
|
},
|
|
|
{
|
|
|
label: "备注",
|
|
@@ -580,12 +590,12 @@ export default {
|
|
|
]
|
|
|
},
|
|
|
paymentOption: [],
|
|
|
- addressOption: addressOption,
|
|
|
+ addressOption: {},
|
|
|
addressForm: {},
|
|
|
addressData: []
|
|
|
};
|
|
|
},
|
|
|
- props: {
|
|
|
+ props: {
|
|
|
detailData: {
|
|
|
type: Object
|
|
|
}
|
|
@@ -593,7 +603,19 @@ export default {
|
|
|
components: {
|
|
|
flowDialog
|
|
|
},
|
|
|
- created() {
|
|
|
+ async created() {
|
|
|
+ this.customerContact = await this.getColumnData(
|
|
|
+ this.getColumnName(147),
|
|
|
+ customerContact
|
|
|
+ );
|
|
|
+ this.bankOfDeposit = await this.getColumnData(
|
|
|
+ this.getColumnName(148),
|
|
|
+ bankOfDeposit
|
|
|
+ );
|
|
|
+ this.addressOption = await this.getColumnData(
|
|
|
+ this.getColumnName(149),
|
|
|
+ addressOption
|
|
|
+ );
|
|
|
corpstypeTree({ corpType: supplierParameter.code }).then(res => {
|
|
|
this.dic = res.data.data;
|
|
|
});
|
|
@@ -615,9 +637,12 @@ 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: [];
|
|
|
+ this.addressData =
|
|
|
+ this.form.corpsAddrList.length > 0 ? this.form.corpsAddrList : [];
|
|
|
if (this.form.belongtoarea) {
|
|
|
- this.form.belongtoarea = this.form.belongtoarea.split(',').map(item => item.split('/'));
|
|
|
+ this.form.belongtoarea = this.form.belongtoarea
|
|
|
+ .split(",")
|
|
|
+ .map(item => item.split("/"));
|
|
|
}
|
|
|
delete this.form.corpsAttnList;
|
|
|
delete this.form.corpsBankList;
|
|
@@ -625,7 +650,7 @@ export default {
|
|
|
delete this.form.corpsAddrList;
|
|
|
});
|
|
|
} else if (this.detailData.treeDeptId) {
|
|
|
- this.$set(this.form, 'corpsTypeId', this.detailData.treeDeptId)
|
|
|
+ this.$set(this.form, "corpsTypeId", this.detailData.treeDeptId);
|
|
|
}
|
|
|
gainUser().then(res => {
|
|
|
this.userList = res.data.data;
|
|
@@ -748,7 +773,9 @@ export default {
|
|
|
}
|
|
|
this.disabled = true;
|
|
|
if (this.form.belongtoarea) {
|
|
|
- this.form.belongtoarea = this.form.belongtoarea.map(e => e.join('/')).join(',')
|
|
|
+ this.form.belongtoarea = this.form.belongtoarea
|
|
|
+ .map(e => e.join("/"))
|
|
|
+ .join(",");
|
|
|
}
|
|
|
if (this.form.adminProfiles) {
|
|
|
this.form.adminProfiles = this.form.adminProfiles.join(",");
|
|
@@ -767,9 +794,11 @@ export default {
|
|
|
type: "success",
|
|
|
message: this.form.id ? "修改成功!" : "新增成功!"
|
|
|
});
|
|
|
- this.form = res.data.data
|
|
|
+ this.form = res.data.data;
|
|
|
if (this.form.belongtoarea) {
|
|
|
- this.form.belongtoarea = this.form.belongtoarea.split(',').map(item => item.split('/'));
|
|
|
+ this.form.belongtoarea = this.form.belongtoarea
|
|
|
+ .split(",")
|
|
|
+ .map(item => item.split("/"));
|
|
|
}
|
|
|
this.disabled = false;
|
|
|
}
|
|
@@ -780,7 +809,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
backToList() {
|
|
|
- this.$emit("goBack");
|
|
|
+ this.$emit("goBack");
|
|
|
},
|
|
|
openFlow() {
|
|
|
this.switchDialog = !this.switchDialog;
|
|
@@ -797,6 +826,90 @@ export default {
|
|
|
rowUpdateAddress(row, index, done, loading) {
|
|
|
done(row);
|
|
|
},
|
|
|
+ async saveColumn() {
|
|
|
+ const inSave = await this.saveColumnData(
|
|
|
+ this.getColumnName(147),
|
|
|
+ this.customerContact
|
|
|
+ );
|
|
|
+ if (inSave) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.crud.doLayout();
|
|
|
+ });
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs.crud.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async resetColumn() {
|
|
|
+ this.customerContact = customerContact;
|
|
|
+ const inSave = await this.delColumnData(
|
|
|
+ this.getColumnName(147),
|
|
|
+ customerContact
|
|
|
+ );
|
|
|
+ if (inSave) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.crud.doLayout();
|
|
|
+ });
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.$refs.crud.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async saveColumn2() {
|
|
|
+ const inSave = await this.saveColumnData(
|
|
|
+ this.getColumnName(148),
|
|
|
+ this.bankOfDeposit
|
|
|
+ );
|
|
|
+ if (inSave) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.crud2.doLayout();
|
|
|
+ });
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs.crud2.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async resetColumn2() {
|
|
|
+ this.bankOfDeposit = bankOfDeposit;
|
|
|
+ const inSave = await this.delColumnData(
|
|
|
+ this.getColumnName(148),
|
|
|
+ bankOfDeposit
|
|
|
+ );
|
|
|
+ if (inSave) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.crud2.doLayout();
|
|
|
+ });
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.$refs.crud2.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async saveColumn3() {
|
|
|
+ const inSave = await this.saveColumnData(
|
|
|
+ this.getColumnName(149),
|
|
|
+ this.addressOption
|
|
|
+ );
|
|
|
+ if (inSave) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.crud3.doLayout();
|
|
|
+ });
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs.crud3.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async resetColumn3() {
|
|
|
+ this.addressOption = addressOption;
|
|
|
+ const inSave = await this.delColumnData(
|
|
|
+ this.getColumnName(149),
|
|
|
+ addressOption
|
|
|
+ );
|
|
|
+ if (inSave) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.crud3.doLayout();
|
|
|
+ });
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.$refs.crud3.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
//删除收发货地址优势项目触发
|
|
|
rowDelAddress(row, index, donerowDel) {
|
|
|
this.$confirm("确定将选择数据删除?", {
|
|
@@ -820,7 +933,7 @@ export default {
|
|
|
this.addressData.splice(index, 1);
|
|
|
}
|
|
|
});
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|