|
@@ -157,11 +157,11 @@
|
|
|
this.formData = data.formData
|
|
|
this.dataUrl = data.dataUrl
|
|
|
})
|
|
|
+ this.getAllbrandlist()
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getAgentArea()
|
|
|
this.getTasknum()
|
|
|
- this.getAllbrandlist()
|
|
|
},
|
|
|
methods: {
|
|
|
getAgentArea() {
|
|
@@ -196,6 +196,7 @@
|
|
|
taskNum: "",
|
|
|
disabledGroup: false,
|
|
|
checked: false,
|
|
|
+ seriesCode: ""
|
|
|
})
|
|
|
}
|
|
|
return res;
|
|
@@ -285,9 +286,15 @@
|
|
|
if (item.checked == true) {
|
|
|
this.checkedAgentlist.filter(e => (e.brand === item.brand && e.agent_id != item.agent_id)).forEach(e => e.disabledGroup =
|
|
|
false)
|
|
|
+ this.checkedAgentlist.filter(e => (e.seriesCode === item.seriesCode && e.agent_id != item.agent_id)).forEach(e =>
|
|
|
+ e.disabledGroup =
|
|
|
+ false)
|
|
|
} else {
|
|
|
this.checkedAgentlist.filter(e => (e.brand === item.brand && e.agent_id != item.agent_id)).forEach(e => e.disabledGroup =
|
|
|
true)
|
|
|
+ this.checkedAgentlist.filter(e => (e.seriesCode === item.seriesCode && e.agent_id != item.agent_id)).forEach(e =>
|
|
|
+ e.disabledGroup =
|
|
|
+ true)
|
|
|
}
|
|
|
},
|
|
|
clickitem(item, e) {
|
|
@@ -301,7 +308,15 @@
|
|
|
getCooperation() {
|
|
|
if (this.cooperations != null) {
|
|
|
this.form.cooperation = this.cooperations.toString();
|
|
|
+ this.allbrandList.map(item => {
|
|
|
+ this.agentList.map(e => {
|
|
|
+ if (e.brand == item.brandCode) {
|
|
|
+ e.seriesCode = item.seriesCode
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
this.checkedAgentlist = this.agentList.filter(item => this.cooperations.indexOf(item.brand) > -1)
|
|
|
+ console.log(this.checkedAgentlist)
|
|
|
this.checkedBrandlist = this.checkedAgentlist.reduce((res, item, index, array) => {
|
|
|
res.push(item.brand)
|
|
|
return res;
|
|
@@ -322,7 +337,7 @@
|
|
|
this.$refs.uForm.validate(valid => {
|
|
|
if (valid) {
|
|
|
this.brandAgentLvQueryList = this.checkedAgentlist.filter(item => (item.disabledGroup != true))
|
|
|
- let checkenLength = this.checkedAgentlist.filter(item => (item.checked == false&&item.disabledGroup==false))
|
|
|
+ let checkenLength = this.checkedAgentlist.filter(item => (item.checked == false && item.disabledGroup == false))
|
|
|
if (!this.brandAgentLvQueryList.length) return this.$u.toast('未正确选择经销商,请正确选择');
|
|
|
if (checkenLength.length != 0) return this.$u.toast('请选择' + checkenLength[0].brand + "品牌签约任务");
|
|
|
if (!this.protocol) return this.$u.toast('请阅读并同意用户协议和隐私协议');
|
|
@@ -376,7 +391,7 @@
|
|
|
this.$u.route({
|
|
|
url: 'pages/login/index',
|
|
|
})
|
|
|
- uni.$emit('loginphone',this.formData.phone)
|
|
|
+ uni.$emit('loginphone', this.formData.phone)
|
|
|
}, 2000)
|
|
|
}
|
|
|
if (res.data.code == 500) {
|