|
@@ -32,7 +32,7 @@
|
|
|
<dr-popover-select v-model="form.customerName" title="客户" type="CUSTOMER_PARAM_ZT" :dataMapping="{
|
|
|
customer: 'id',
|
|
|
customerName: 'name',
|
|
|
- }" :source.sync="form">
|
|
|
+ }" :source.sync="form" :disabled="true">
|
|
|
</dr-popover-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -239,7 +239,7 @@
|
|
|
|
|
|
export default {
|
|
|
name: "CustomersContact",
|
|
|
- props: ['operatingState', 'row', 'disable', 'state', 'customersId', 'customersName'],
|
|
|
+ props: ['operatingState', 'row', 'disable', 'state', 'customersId', 'customersName', 'customersCode'],
|
|
|
model: {
|
|
|
prop: 'isAdd0',
|
|
|
event: 'jugislist'
|
|
@@ -276,7 +276,47 @@
|
|
|
customerName: null,
|
|
|
},
|
|
|
// 表单参数
|
|
|
- form: {},
|
|
|
+ form: {
|
|
|
+ id: null,
|
|
|
+ code: null,
|
|
|
+ name: null,
|
|
|
+ gander: null,
|
|
|
+ customer: null,
|
|
|
+ customer_name: null,
|
|
|
+ customer_code: null,
|
|
|
+ contact_classification: null,
|
|
|
+ birthday: null,
|
|
|
+ birthplace: null,
|
|
|
+ hobby: null,
|
|
|
+ state: null,
|
|
|
+ superior_contact_name: null,
|
|
|
+ superior_contact: null,
|
|
|
+ section: null,
|
|
|
+ position: null,
|
|
|
+ job_title: null,
|
|
|
+ power: null,
|
|
|
+ support: null,
|
|
|
+ field_expertise: null,
|
|
|
+ decision_maker: null,
|
|
|
+ telephone: null,
|
|
|
+ mail: null,
|
|
|
+ address: null,
|
|
|
+ visit_time: null,
|
|
|
+ visit_place: null,
|
|
|
+ organization: null,
|
|
|
+ organization_name: null,
|
|
|
+ area: null,
|
|
|
+ department: null,
|
|
|
+ department_name: null,
|
|
|
+ department_code: null,
|
|
|
+ create_by: null,
|
|
|
+ create_time: null,
|
|
|
+ update_by: null,
|
|
|
+ update_time: null,
|
|
|
+ del_flag: null,
|
|
|
+ bo_id: null,
|
|
|
+ zt_id: null
|
|
|
+ },
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
name: [{
|
|
@@ -349,61 +389,28 @@
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- if (this.operatingState == 'Browse') {
|
|
|
- this.handleBrowse(this.row);
|
|
|
- } else if (this.operatingState == 'Update') {
|
|
|
- this.handleUpdate(this.row);
|
|
|
- }
|
|
|
+ this.initialization();
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 初始化
|
|
|
+ initialization() {
|
|
|
+ // 客户数据赋值
|
|
|
+ this.form.customer = this.customersId;
|
|
|
+ this.form.customerCode = this.customersCode;
|
|
|
+ this.form.customerName = this.customersName;
|
|
|
+ if (this.operatingState == 'Browse') {
|
|
|
+ this.handleBrowse(this.row);
|
|
|
+ } else if (this.operatingState == 'Update') {
|
|
|
+ this.handleUpdate(this.row);
|
|
|
+ }
|
|
|
+ },
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
this.$emit('jugislist', false);
|
|
|
},
|
|
|
- // 表单重置
|
|
|
- reset() {
|
|
|
- this.form = {
|
|
|
- boId: null,
|
|
|
- delFlag: null,
|
|
|
- updateTime: null,
|
|
|
- updateBy: null,
|
|
|
- createDate: null,
|
|
|
- createBy: null,
|
|
|
- departmentName: null,
|
|
|
- departmentCode: null,
|
|
|
- area: null,
|
|
|
- organization: null,
|
|
|
- visitPlace: null,
|
|
|
- visitTime: null,
|
|
|
- address: null,
|
|
|
- mail: null,
|
|
|
- telephone: null,
|
|
|
- decisionMaker: null,
|
|
|
- fieldExpertise: null,
|
|
|
- support: null,
|
|
|
- power: null,
|
|
|
- jobTitle: null,
|
|
|
- position: null,
|
|
|
- section: null,
|
|
|
- superiorContact: null,
|
|
|
- state: null,
|
|
|
- hobby: null,
|
|
|
- birthplace: null,
|
|
|
- birthday: null,
|
|
|
- contactClassification: null,
|
|
|
- customerName: null,
|
|
|
- customerCode: null,
|
|
|
- gander: null,
|
|
|
- name: null,
|
|
|
- code: null,
|
|
|
- id: null
|
|
|
- };
|
|
|
- this.resetForm("form");
|
|
|
- },
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
this.operatingState = "Update";
|
|
|
- this.reset();
|
|
|
const id = row.id || this.ids
|
|
|
getContact(id).then(response => {
|
|
|
this.form = response.data;
|
|
@@ -412,7 +419,6 @@
|
|
|
},
|
|
|
/** 查看按钮操作 */
|
|
|
handleBrowse(row) {
|
|
|
- this.reset();
|
|
|
const id = row.id || this.ids
|
|
|
getContact(id).then(response => {
|
|
|
this.form = response.data;
|