|
@@ -48,6 +48,8 @@ export default {
|
|
|
form: {
|
|
|
cmpMailType: 0
|
|
|
},
|
|
|
+ info: {},
|
|
|
+ email: {},
|
|
|
rules: {
|
|
|
companyAddress: [{
|
|
|
required: true,
|
|
@@ -81,6 +83,7 @@ export default {
|
|
|
reqdata: {}
|
|
|
})
|
|
|
.then((res) => {
|
|
|
+ this.email = res.list.some(item => item.useType === 1) ? res.list.find(item => item.useType === 1) : {}
|
|
|
this.form = Object.assign({}, this.form, res.list.some(item => item.useType === 1) ? res.list.find(item => item.useType === 1) : {})
|
|
|
})
|
|
|
},
|
|
@@ -93,6 +96,8 @@ export default {
|
|
|
})
|
|
|
.then((res) => {
|
|
|
this.form = Object.assign({}, this.form, res.object)
|
|
|
+ this.info = res.object
|
|
|
+ this.form.emailId = res.object.id
|
|
|
})
|
|
|
},
|
|
|
determine () {
|
|
@@ -104,14 +109,16 @@ export default {
|
|
|
if (!a) return
|
|
|
let url = '/companyInfo/updateCompanyInfo'
|
|
|
let reqdata = this.form
|
|
|
+ reqdata.id = this.info.id
|
|
|
this.$api
|
|
|
.post(url, {
|
|
|
reqdata
|
|
|
})
|
|
|
.then((res) => {
|
|
|
let reqdata = this.form
|
|
|
+ reqdata.id = this.email.id
|
|
|
reqdata.useType = 1
|
|
|
- let url = reqdata.id ? '/companyAccount/updateCompanyAccount' : '/companyAccount/saveReceiverMail'
|
|
|
+ let url = this.email.id ? '/companyAccount/updateCompanyAccount' : '/companyAccount/saveReceiverMail'
|
|
|
this.$api
|
|
|
.post(url, {
|
|
|
reqdata
|