|
@@ -32,7 +32,8 @@
|
|
|
<u-line color="#e4e7ed"></u-line>
|
|
|
<view class="content">
|
|
|
<u-checkbox-group :wrap="true" @change="checkboxGroupChange" style="display: flex;justify-content: left">
|
|
|
- <u-checkbox v-model="item.checked" v-for="(item, index) in allbrandList" :key="index" :name="item.brandCode" shape="circle">
|
|
|
+ <u-checkbox v-model="item.checked" v-for="(item, index) in allbrandList" :key="index" :name="item.brandCode"
|
|
|
+ shape="circle">
|
|
|
<view class="u-flex u-row-left" style="width: 150rpx;">
|
|
|
{{item.brandCode}}
|
|
|
</view>
|
|
@@ -58,13 +59,13 @@
|
|
|
v-for="(item, index) in checkedAgentlist" :key="index">
|
|
|
<view slot="head">
|
|
|
<view class="u-flex u-row-between">
|
|
|
- <view class="u-flex">
|
|
|
- <view style="width: 8rpx;height: 34rpx;background: #0292FD;margin-right:20rpx;"></view>
|
|
|
- {{item.brand}}合作品牌签约任务
|
|
|
- </view>
|
|
|
+ <view class="u-flex">
|
|
|
+ <view style="width: 8rpx;height: 34rpx;background: #0292FD;margin-right:20rpx;"></view>
|
|
|
+ {{item.brand}}合作品牌签约任务
|
|
|
+ </view>
|
|
|
<view @click="delAgent(index)">
|
|
|
<u-icon name="close" color="#666666" size="36"></u-icon>
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view slot="body">
|
|
@@ -81,7 +82,8 @@
|
|
|
<u-icon name="order" size="36"></u-icon>
|
|
|
</view>
|
|
|
<u-radio-group v-model="item.taskNum" :disabled="item.disabledGroup" @change="changeRadiogroup(item)">
|
|
|
- <u-radio @click.native.prevent="clickitem(item,i.signLv)" :label-disabled="i.labelDisabled" v-for="(i, index2) in tasknameList" :key="index2" :name="i.signLv">
|
|
|
+ <u-radio @click.native.prevent="clickitem(item,i.signLv)" :label-disabled="i.labelDisabled" v-for="(i, index2) in tasknameList"
|
|
|
+ :key="index2" :name="i.signLv">
|
|
|
{{i.signLv}}
|
|
|
</u-radio>
|
|
|
</u-radio-group>
|
|
@@ -146,8 +148,8 @@
|
|
|
protocol: false,
|
|
|
querybrandList: [],
|
|
|
// brandList: [],
|
|
|
- allbrandList:[],//弹出窗获取brand数组
|
|
|
- checkedBrandlist:[]//选中brand组成一个新数组
|
|
|
+ allbrandList: [], //弹出窗获取brand数组
|
|
|
+ checkedBrandlist: [] //选中brand组成一个新数组
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -173,7 +175,7 @@
|
|
|
"area": this.formData.district,
|
|
|
"city": this.formData.city,
|
|
|
"province": this.formData.province,
|
|
|
- // "area": "市北区",
|
|
|
+ // "area": "李沧区",
|
|
|
// "city": "青岛市",
|
|
|
// "province": "山东省",
|
|
|
"spart": "10",
|
|
@@ -184,7 +186,7 @@
|
|
|
if (res.data.code == 0) {
|
|
|
this.agentList = res.data.Data.data
|
|
|
this.agentList = this.agentList.reduce((res, item, index, array) => {
|
|
|
- for (let i = 0; i < array[index].regionBrandList.length;i++) {
|
|
|
+ for (let i = 0; i < array[index].regionBrandList.length; i++) {
|
|
|
res.push({
|
|
|
brand: array[index].regionBrandList[i],
|
|
|
brandCode: array[index].regionBrandList[i],
|
|
@@ -193,7 +195,7 @@
|
|
|
agent_id: item.kunnr,
|
|
|
taskNum: "",
|
|
|
disabledGroup: false,
|
|
|
- checked:false,
|
|
|
+ checked: false,
|
|
|
})
|
|
|
}
|
|
|
return res;
|
|
@@ -233,7 +235,7 @@
|
|
|
}).catch(err => {
|
|
|
console.log(err)
|
|
|
}).finally(() => {
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
getQuerybrand() {
|
|
@@ -252,7 +254,7 @@
|
|
|
}).catch(err => {
|
|
|
console.log(err)
|
|
|
}).finally(() => {
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
getTasknum() {
|
|
@@ -262,7 +264,7 @@
|
|
|
data: {},
|
|
|
}).then(res => {
|
|
|
if (res.data.code == 0) {
|
|
|
- res.data.data.map((item, index)=> {
|
|
|
+ res.data.data.map((item, index) => {
|
|
|
item.checked = false;
|
|
|
})
|
|
|
this.tasknameList = res.data.data
|
|
@@ -280,7 +282,7 @@
|
|
|
this.cooperations = e
|
|
|
},
|
|
|
changeRadiogroup(item) {
|
|
|
- if (item.checked==true) {
|
|
|
+ if (item.checked == true) {
|
|
|
this.checkedAgentlist.filter(e => (e.brand === item.brand && e.agent_id != item.agent_id)).forEach(e => e.disabledGroup =
|
|
|
false)
|
|
|
} else {
|
|
@@ -288,22 +290,22 @@
|
|
|
true)
|
|
|
}
|
|
|
},
|
|
|
- clickitem (item,e) {
|
|
|
- if(item.checked==false){
|
|
|
- item.checked=true
|
|
|
- }else{
|
|
|
- item.checked=false
|
|
|
- item.taskNum=""
|
|
|
+ clickitem(item, e) {
|
|
|
+ if (item.checked == false) {
|
|
|
+ item.checked = true
|
|
|
+ } else {
|
|
|
+ item.checked = false
|
|
|
+ item.taskNum = ""
|
|
|
}
|
|
|
},
|
|
|
getCooperation() {
|
|
|
if (this.cooperations != null) {
|
|
|
this.form.cooperation = this.cooperations.toString();
|
|
|
this.checkedAgentlist = this.agentList.filter(item => this.cooperations.indexOf(item.brand) > -1)
|
|
|
- this.checkedBrandlist=this.checkedAgentlist.reduce((res, item, index, array) => {
|
|
|
- res.push(item.brand)
|
|
|
- return res;
|
|
|
- }, []);
|
|
|
+ this.checkedBrandlist = this.checkedAgentlist.reduce((res, item, index, array) => {
|
|
|
+ res.push(item.brand)
|
|
|
+ return res;
|
|
|
+ }, []);
|
|
|
this.getQuerybrand()
|
|
|
this.brandShow = false
|
|
|
} else {
|
|
@@ -313,16 +315,16 @@
|
|
|
getTaskconfirm(e) {
|
|
|
this.form.tasklist = e[0].label;
|
|
|
},
|
|
|
- delAgent(index){
|
|
|
- this.checkedAgentlist.splice(index,1)
|
|
|
+ delAgent(index) {
|
|
|
+ this.checkedAgentlist.splice(index, 1)
|
|
|
},
|
|
|
submit() {
|
|
|
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))
|
|
|
- if(!this.brandAgentLvQueryList.length) return this.$u.toast('未正确选择经销商,请正确选择');
|
|
|
- if(checkenLength.length!=0) return this.$u.toast('请选择'+checkenLength[0].brand+"品牌签约任务");
|
|
|
+ this.brandAgentLvQueryList = this.checkedAgentlist.filter(item => (item.disabledGroup != true))
|
|
|
+ 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('请阅读并同意用户协议和隐私协议');
|
|
|
this.setData()
|
|
|
} else {
|
|
@@ -360,7 +362,7 @@
|
|
|
"storePhone": this.formData.phone,
|
|
|
"version": 1.00,
|
|
|
"wd": this.formData.latitude,
|
|
|
- "addressInfo":this.formData.addressInfo
|
|
|
+ "addressInfo": this.formData.addressInfo
|
|
|
}
|
|
|
this.loading = true
|
|
|
request({
|