|
@@ -13,16 +13,16 @@
|
|
|
<view style="margin-right: 10rpx;">
|
|
|
<u-icon name="order" size="36"></u-icon>
|
|
|
</view>
|
|
|
- <u-input placeholder="点击选择合作品牌" :disabled="true" @click="show = true;" v-model="form.cooperation"></u-input>
|
|
|
+ <u-input placeholder="点击选择合作品牌" :disabled="true" @click="brandShow = true;" v-model="form.cooperation"></u-input>
|
|
|
<view class="" slot="right">
|
|
|
<u-icon name="arrow-right" color="#666666" size="36"></u-icon>
|
|
|
</view>
|
|
|
</u-form-item>
|
|
|
</view>
|
|
|
</u-card>
|
|
|
- <u-popup mode="bottom" v-model="show">
|
|
|
+ <u-popup mode="bottom" v-model="brandShow">
|
|
|
<view class="u-flex u-row-between u-padding-left-40 u-padding-right-40" style="height: 90rpx;" @click="show = false;">
|
|
|
- <view style="padding: 16rpx;font-size:30rpx">
|
|
|
+ <view style="padding: 16rpx;font-size:30rpx" @click="brandShow=false">
|
|
|
取消
|
|
|
</view>
|
|
|
<view style="padding: 16rpx;color:#0095FF;font-size:30rpx" @click="getCooperation">
|
|
@@ -33,8 +33,12 @@
|
|
|
<view class="content">
|
|
|
<scroll-view scroll-y="true" style="height: 300rpx;">
|
|
|
<view class="u-flex u-row-center">
|
|
|
- <u-checkbox-group :wrap="true" @change="checkboxGroupChange">
|
|
|
- <u-checkbox v-model="item.checked" v-for="(item, index) in brandList" :key="index" :name="item.name" shape="circle">{{item.name}}</u-checkbox>
|
|
|
+ <u-checkbox-group :wrap="true" @change="checkboxGroupChange" style="display: flex;justify-content: center">
|
|
|
+ <u-checkbox v-model="item.checked" v-for="(item, index) in agentList" :key="index" :name="item.brand" shape="circle">
|
|
|
+ <view class="u-flex u-row-left" style="width: 150rpx;">
|
|
|
+ {{item.brand}}
|
|
|
+ </view>
|
|
|
+ </u-checkbox>
|
|
|
</u-checkbox-group>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
@@ -56,11 +60,12 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</u-card>
|
|
|
- <u-card :border="false" padding="30" box-shadow="0px 1px 10px rgba(0,0,0,0.2)" border-radius="20" :show-foot="false">
|
|
|
+ <u-card :border="false" padding="30" box-shadow="0px 1px 10px rgba(0,0,0,0.2)" border-radius="20" :show-foot="false"
|
|
|
+ v-for="(item, index) in checkedAgentlist" :key="index">
|
|
|
<view slot="head">
|
|
|
<view class="u-flex">
|
|
|
<view style="width: 8rpx;height: 34rpx;background: #0292FD;margin-right:20rpx;"></view>
|
|
|
- 赛轮合作品牌签约任务
|
|
|
+ {{item.brand}}合作品牌签约任务
|
|
|
</view>
|
|
|
</view>
|
|
|
<view slot="body">
|
|
@@ -69,20 +74,28 @@
|
|
|
<u-icon name="account" size="36"></u-icon>
|
|
|
</view>
|
|
|
<view class="">
|
|
|
- 某某代理商
|
|
|
+ {{item.name}}
|
|
|
</view>
|
|
|
</u-form-item>
|
|
|
- <u-form-item prop="lists">
|
|
|
+ <u-form-item prop="tasklist">
|
|
|
<view style="margin-right: 10rpx;">
|
|
|
<u-icon name="order" size="36"></u-icon>
|
|
|
</view>
|
|
|
- <u-input placeholder="点击选择签约任务" :disabled="true" @click="show = true;"></u-input>
|
|
|
+ <u-radio-group v-model="item.taskNum" @change="radioGroupChange">
|
|
|
+ <u-radio v-for="(i, index) in item.tasknameList" :key="index" :name="i.task" :disabled="i.taskdisabled">
|
|
|
+ {{i.task}}
|
|
|
+ </u-radio>
|
|
|
+ </u-radio-group>
|
|
|
+ <!-- <u-input placeholder="点击选择签约任务" :disabled="true" @click="item.taskShow = true" v-model="form.tasklist"></u-input>
|
|
|
<view class="" slot="right">
|
|
|
<u-icon name="arrow-right" color="#666666" size="36"></u-icon>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
</u-form-item>
|
|
|
+ <!-- <u-select v-model="item.taskShow" :list="item.taskList" value-name="numTask" label-name="signLv" @confirm="getTaskconfirm"></u-select> -->
|
|
|
</view>
|
|
|
+
|
|
|
</u-card>
|
|
|
+
|
|
|
<u-form-item prop="protocol" :border-bottom="false">
|
|
|
<view style="margin:0 30rpx;">
|
|
|
<u-checkbox-group>
|
|
@@ -106,18 +119,19 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- show: false,
|
|
|
+ brandShow: false,
|
|
|
loading: false,
|
|
|
form: {
|
|
|
cooperation: '',
|
|
|
- protocol: false
|
|
|
+ protocol: false,
|
|
|
},
|
|
|
form2: {},
|
|
|
formData: [],
|
|
|
dataUrl: [],
|
|
|
- agentList: [],
|
|
|
- brandList: [], //品牌
|
|
|
- nameList:""
|
|
|
+ agentList: [], //经销商信息
|
|
|
+ checkedAgentlist: [],
|
|
|
+ taskList: [],
|
|
|
+ tasknameList: []
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -128,6 +142,7 @@
|
|
|
this.dataUrl = data
|
|
|
})
|
|
|
this.getAgentArea()
|
|
|
+ this.getTasknum()
|
|
|
},
|
|
|
methods: {
|
|
|
getAgentArea() {
|
|
@@ -148,21 +163,50 @@
|
|
|
}).then(res => {
|
|
|
if (res.data.code == 0) {
|
|
|
this.agentList = res.data.Data.data
|
|
|
- // 从经销商里里面抽取品牌
|
|
|
- const list = this.agentList.map((item, index) => {
|
|
|
- return item.brandList;
|
|
|
- }).join(",").split(',')
|
|
|
- //去重
|
|
|
- const list2 = [...new Set(list)]
|
|
|
- //根据复选框的数据结构重组数组
|
|
|
- this.brandList = list2.reduce((res, item) => {
|
|
|
+ console.log(this.agentList)
|
|
|
+ this.agentList = this.agentList.reduce((res, item, index, array) => {
|
|
|
+ for (let i = 0; i < array[index].brandList.length; i++) {
|
|
|
+ res.push({
|
|
|
+ brand: array[index].brandList[i],
|
|
|
+ brandCode: array[index].brandList[i],
|
|
|
+ name: item.name,
|
|
|
+ kunnr: item.kunnr,
|
|
|
+ agent_id: item.kunnr,
|
|
|
+ tasknameList:this.tasknameList,
|
|
|
+ taskNum:"",
|
|
|
+ checked: false,
|
|
|
+ disabled: false,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ }, []);
|
|
|
+ console.log(this.agentList)
|
|
|
+ }
|
|
|
+ if (res.data.code == 500) {
|
|
|
+ this.$u.toast(res.data.msg);
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.log(err)
|
|
|
+ }).finally(() => {
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getTasknum() {
|
|
|
+ request({
|
|
|
+ url: '/sailun/appStoreBasicInfo/enum',
|
|
|
+ method: 'get',
|
|
|
+ data: {},
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 0) {
|
|
|
+ this.taskList = res.data.data
|
|
|
+ this.tasknameList = this.taskList.reduce((res, item) => {
|
|
|
res.push({
|
|
|
- name: item,
|
|
|
- checked: false,
|
|
|
- disabled: false
|
|
|
+ task: item.signLv,
|
|
|
+ taskdisabled: false,
|
|
|
})
|
|
|
return res;
|
|
|
}, []);
|
|
|
+ console.log(this.taskList)
|
|
|
}
|
|
|
if (res.data.code == 500) {
|
|
|
this.$u.toast(res.data.msg);
|
|
@@ -176,81 +220,76 @@
|
|
|
checkboxGroupChange(e) {
|
|
|
this.cooperations = e
|
|
|
},
|
|
|
+ radioGroupChange(e) {
|
|
|
+ console.log(e);
|
|
|
+ },
|
|
|
getCooperation() {
|
|
|
if (this.cooperations != null) {
|
|
|
this.form.cooperation = this.cooperations.toString();
|
|
|
- let coopList = this.form.cooperation.split(",")
|
|
|
-
|
|
|
- let a=this.agentList.forEach((item,index, array)=>
|
|
|
- {
|
|
|
- for (let i = 0; i < array[index].brandList.length; i++) {
|
|
|
- for (let j = 0; j < coopList.length; j++) {
|
|
|
- if(coopList[j] == array[index].brandList[i]){
|
|
|
- this.nameList+=array[index].name+','
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- this.nameList=[...new Set(this.nameList.split(',').filter(item => item))]
|
|
|
- this.show = false
|
|
|
+ this.checkedAgentlist = this.agentList.filter(item => this.cooperations.indexOf(item.brand) > -1)
|
|
|
+ this.brandShow = false
|
|
|
} else {
|
|
|
console.log("至少选择一项")
|
|
|
}
|
|
|
|
|
|
},
|
|
|
+ getTaskconfirm(e) {
|
|
|
+ console.log(e)
|
|
|
+ this.form.tasklist = e[0].label;
|
|
|
+ console.log(this.form.tasklist)
|
|
|
+ },
|
|
|
submit() {
|
|
|
- let data = {
|
|
|
- // "addressInfo": this.formData.addressInfo,
|
|
|
- "brandAgentLvQueryList": [{
|
|
|
- "agent_id": "string",
|
|
|
- "brand": "string",
|
|
|
- "brandCode": "string",
|
|
|
- "kunnr": "string",
|
|
|
- "lvCount": "string",
|
|
|
- "showLv": "string",
|
|
|
- "spart": "string",
|
|
|
- "vkorg": "string",
|
|
|
- "vtweg": "string"
|
|
|
- }],
|
|
|
- "city": "string",
|
|
|
- "contactName": "string",
|
|
|
- "district": "string",
|
|
|
- "jd": "string",
|
|
|
- "licenseUrl": "string",
|
|
|
- "mobileCode": "string",
|
|
|
- "province": "string",
|
|
|
- "storeImageUrl": "string",
|
|
|
- "storeName": "string",
|
|
|
- "storePhone": "string",
|
|
|
- "version": 0,
|
|
|
- "wd": "string"
|
|
|
- }
|
|
|
- console.log(data)
|
|
|
- request({
|
|
|
- url: '/sailun/appStoreBasicInfo/storeReg',
|
|
|
- method: 'post',
|
|
|
- data: data
|
|
|
- }).then(res => {
|
|
|
-
|
|
|
- console.log(res)
|
|
|
- if (res.data.code == 0) {
|
|
|
- this.loading = true
|
|
|
- setTimeout(() => {
|
|
|
- this.$u.route({
|
|
|
- url: 'pages/login/index',
|
|
|
- type: "reLaunch"
|
|
|
- })
|
|
|
- this.loading = false
|
|
|
- }, 2000)
|
|
|
- }
|
|
|
- if (res.data.code == 500) {
|
|
|
- this.$u.toast(res.data.msg);
|
|
|
- }
|
|
|
- }).catch(err => {
|
|
|
- console.log(err)
|
|
|
- }).finally(() => {
|
|
|
+ // console.log(this.)
|
|
|
+ // let data = {
|
|
|
+ // "brandAgentLvQueryList": [{
|
|
|
+ // "agent_id": "string",
|
|
|
+ // "brand": "string",
|
|
|
+ // "brandCode": "string",
|
|
|
+ // "kunnr": "string",
|
|
|
+ // "lvCount": "string",
|
|
|
+ // "showLv": "string",
|
|
|
+ // "spart": "string",
|
|
|
+ // "vkorg": "string",
|
|
|
+ // "vtweg": "string"
|
|
|
+ // }],
|
|
|
+ // "city": "string",
|
|
|
+ // "contactName": "string",
|
|
|
+ // "district": "string",
|
|
|
+ // "jd": "string",
|
|
|
+ // "licenseUrl": "string",
|
|
|
+ // "mobileCode": "string",
|
|
|
+ // "province": "string",
|
|
|
+ // "storeImageUrl": "string",
|
|
|
+ // "storeName": "string",
|
|
|
+ // "storePhone": "string",
|
|
|
+ // "version": 0,
|
|
|
+ // "wd": "string"
|
|
|
+ // }
|
|
|
+ // console.log(data)
|
|
|
+ // request({
|
|
|
+ // url: '/sailun/appStoreBasicInfo/storeReg',
|
|
|
+ // method: 'post',
|
|
|
+ // data: data
|
|
|
+ // }).then(res => {
|
|
|
+ // console.log(res)
|
|
|
+ // if (res.data.code == 0) {
|
|
|
+ // this.loading = true
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.$u.route({
|
|
|
+ // url: 'pages/login/index',
|
|
|
+ // type: "reLaunch"
|
|
|
+ // })
|
|
|
+ // this.loading = false
|
|
|
+ // }, 2000)
|
|
|
+ // }
|
|
|
+ // if (res.data.code == 500) {
|
|
|
+ // this.$u.toast(res.data.msg);
|
|
|
+ // }
|
|
|
+ // }).catch(err => {
|
|
|
+ // console.log(err)
|
|
|
+ // }).finally(() => {
|
|
|
|
|
|
- })
|
|
|
+ // })
|
|
|
},
|
|
|
}
|
|
|
}
|