|
@@ -11,9 +11,9 @@
|
|
</view>
|
|
</view>
|
|
<view class="cu-form-group">
|
|
<view class="cu-form-group">
|
|
<view class="title">代理门店</view>
|
|
<view class="title">代理门店</view>
|
|
- <picker mode="multiSelector" @change="MultiChange" @columnchange="MultiColumnChange" :value="multiIndex" :range="multiArray" range-key="title">
|
|
|
|
|
|
+ <picker mode="selector" @change="agentChange" :value="agentIndex" :range="agentArray" range-key="title">
|
|
<view class="picker">
|
|
<view class="picker">
|
|
- {{multiArray[0][multiIndex[0]].title}},{{multiArray[1][multiIndex[1]].title}}
|
|
|
|
|
|
+ {{agentArray[agentIndex].title}}
|
|
</view>
|
|
</view>
|
|
</picker>
|
|
</picker>
|
|
</view>
|
|
</view>
|
|
@@ -29,10 +29,10 @@
|
|
<view class="title">区域</view>
|
|
<view class="title">区域</view>
|
|
<input placeholder="请输入区域" data-val="region" @input="bindInput"></input>
|
|
<input placeholder="请输入区域" data-val="region" @input="bindInput"></input>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
<view class="padding flex flex-direction bg-white">
|
|
<view class="padding flex flex-direction bg-white">
|
|
<button class="cu-btn bg-blue margin-tb-sm lg" @tap="submit">立即提交</button>
|
|
<button class="cu-btn bg-blue margin-tb-sm lg" @tap="submit">立即提交</button>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="bg-white padding-lr padding-bottom">申请经济人后等待后台审核</view>
|
|
</form>
|
|
</form>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
@@ -49,11 +49,8 @@
|
|
mobile: '',
|
|
mobile: '',
|
|
region: '',
|
|
region: '',
|
|
},
|
|
},
|
|
- multiArray: [
|
|
|
|
- [],
|
|
|
|
- [],
|
|
|
|
- ],
|
|
|
|
- multiIndex: [0, 0],
|
|
|
|
|
|
+ agentArray: [],
|
|
|
|
+ agentIndex: 0,
|
|
townArray: [
|
|
townArray: [
|
|
[],
|
|
[],
|
|
[],
|
|
[],
|
|
@@ -67,10 +64,10 @@
|
|
_this.userinfo = _this.checkLogin("/pages/my/myinfo");
|
|
_this.userinfo = _this.checkLogin("/pages/my/myinfo");
|
|
//公司
|
|
//公司
|
|
_this.$req.ajax({
|
|
_this.$req.ajax({
|
|
- path: "index/getWorker",
|
|
|
|
|
|
+ path: "index/getAgent",
|
|
data: {}
|
|
data: {}
|
|
}).then((data) => {
|
|
}).then((data) => {
|
|
- _this.multiArray = data;
|
|
|
|
|
|
+ _this.agentArray = data;
|
|
}).catch((err) => {
|
|
}).catch((err) => {
|
|
uni.showModal({
|
|
uni.showModal({
|
|
title: '信息提示',
|
|
title: '信息提示',
|
|
@@ -98,43 +95,12 @@
|
|
var dataval = e.currentTarget.dataset.val;
|
|
var dataval = e.currentTarget.dataset.val;
|
|
_this.forminfo[dataval] = e.detail.value;
|
|
_this.forminfo[dataval] = e.detail.value;
|
|
},
|
|
},
|
|
- MultiChange(e) {
|
|
|
|
- this.multiIndex = e.detail.value
|
|
|
|
|
|
+ agentChange(e) {
|
|
|
|
+ this.agentIndex = e.detail.value
|
|
},
|
|
},
|
|
TownChange(e) {
|
|
TownChange(e) {
|
|
this.townIndex = e.detail.value
|
|
this.townIndex = e.detail.value
|
|
},
|
|
},
|
|
- MultiColumnChange(e) {
|
|
|
|
- let multi = _this.multiIndex;
|
|
|
|
- //公司变更
|
|
|
|
- if (e.detail.column == 0) {
|
|
|
|
- let workerid = _this.multiArray[0][e.detail.value].id;
|
|
|
|
- _this.$req.ajax({
|
|
|
|
- path: "index/getAgentByWorker",
|
|
|
|
- data: {workerid:workerid}
|
|
|
|
- }).then((data) => {
|
|
|
|
- let multiArray = _this.multiArray;
|
|
|
|
- multiArray[1] = data;
|
|
|
|
- _this.multiArray = multiArray;
|
|
|
|
- multi = [e.detail.value,0];
|
|
|
|
- _this.multiIndex = multi;
|
|
|
|
- _this.$forceUpdate();
|
|
|
|
- }).catch((err) => {
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '信息提示',
|
|
|
|
- content: err,
|
|
|
|
- showCancel: false
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //门店变更
|
|
|
|
- if (e.detail.column == 1) {
|
|
|
|
- multi[1] = e.detail.value;
|
|
|
|
- _this.multiIndex = multi;
|
|
|
|
- _this.$forceUpdate();
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
TownColumnChange(e) {
|
|
TownColumnChange(e) {
|
|
let townIndex = _this.townIndex;
|
|
let townIndex = _this.townIndex;
|
|
//公司变更
|
|
//公司变更
|
|
@@ -161,7 +127,6 @@
|
|
_this.isRotate = true;
|
|
_this.isRotate = true;
|
|
|
|
|
|
let data = _this.forminfo;
|
|
let data = _this.forminfo;
|
|
- console.log(data,22);
|
|
|
|
let validate = {"title":"姓名","mobile":"手机号","region":"区域"};
|
|
let validate = {"title":"姓名","mobile":"手机号","region":"区域"};
|
|
for (var i in validate) {
|
|
for (var i in validate) {
|
|
if (data[i] == "") {
|
|
if (data[i] == "") {
|
|
@@ -176,8 +141,8 @@
|
|
}
|
|
}
|
|
|
|
|
|
data.userid = _this.userinfo.id;
|
|
data.userid = _this.userinfo.id;
|
|
- data.workerid = _this.multiArray[0][_this.multiIndex[0]].id;
|
|
|
|
- data.agentid = _this.multiArray[1][_this.multiIndex[1]].id;
|
|
|
|
|
|
+ data.workerid = _this.agentArray[_this.agentIndex].workerid;
|
|
|
|
+ data.agentid = _this.agentArray[_this.agentIndex].id;
|
|
data.town = _this.townArray[0][_this.townIndex[0]];
|
|
data.town = _this.townArray[0][_this.townIndex[0]];
|
|
data.village = _this.townArray[1][_this.townIndex[1]];
|
|
data.village = _this.townArray[1][_this.townIndex[1]];
|
|
|
|
|