入驻,实名修改
This commit is contained in:
parent
b8beee15fb
commit
620462349e
|
|
@ -13,9 +13,9 @@ export default {
|
|||
})
|
||||
let userInfo = _this.getCurUserInfo();
|
||||
// request 触发前拼接 url
|
||||
args.url = 'https://www.opsoul.com:8881' + args.url;
|
||||
// args.url = 'https://www.opsoul.com:8881' + args.url;
|
||||
// args.url = 'http://127.0.0.1:80' + args.url;
|
||||
// args.url = 'http://192.168.2.36:80' + args.url;
|
||||
args.url = 'http://192.168.2.43:80' + args.url;
|
||||
|
||||
if (!args.data) {
|
||||
args.data = {}
|
||||
|
|
@ -189,6 +189,14 @@ export default {
|
|||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async noticeMsg(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/wx/noticeMsg',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async sendVertifyCode(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/tool/sms/send',
|
||||
|
|
@ -583,6 +591,22 @@ export default {
|
|||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async getWorkerAreaEdit(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/worker/area/worker/edit',
|
||||
method: 'GET',
|
||||
data: params
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async getWorkerGoodsCategoryEdit(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/worker/goods/category/worker/edit',
|
||||
method: 'GET',
|
||||
data: params
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async qrPay(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/pay/ali/qr',
|
||||
|
|
|
|||
|
|
@ -184,20 +184,20 @@
|
|||
:candidates="specialSkill[index].specialSubTypeList"
|
||||
:showField="'goodsCategoryName'" placeholder="请选择"
|
||||
v-model="specialSkill[index].specialSubTypeObj"
|
||||
@input="chooseSpecialSkill($event, 1, index)"></my-uni-combox>
|
||||
@input="chooseSpecialSkill($event, 1, index)" @tap="reloadTargetCategory(1, index)"></my-uni-combox>
|
||||
<!-- <my-uni-combox class="flex-sub"
|
||||
:candidates="specialSkill[index].specialSubSubTypeList"
|
||||
:showField="'goodsCategoryName'" placeholder="请选择"
|
||||
v-model="specialSkill[index].specialSubSubTypeObj"
|
||||
@input="chooseSpecialSkill($event, 2, index)"></my-uni-combox> -->
|
||||
<my-uni-combox class="flex-sub" :candidates="specialSkill[index].specialSkillList"
|
||||
:showField="'specialSkillName'" placeholder="请选择"
|
||||
:showField="'goodsCategoryName'" placeholder="请选择"
|
||||
v-model="specialSkill[index].specialSkillObj"
|
||||
@input="chooseSpecialSkill($event, 3, index)"></my-uni-combox>
|
||||
@input="chooseSpecialSkill($event, 3, index)" @tap="reloadTargetCategory(2, index)"></my-uni-combox>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-start align-center margin-top-sm" v-if="specialSkill[index].specialSubTypeObj.isCert == 1">
|
||||
<view class="flex justify-start align-center margin-top-sm" v-if="specialSkill[index].specialSkillObj.isCert == 1">
|
||||
<view>技能证书:</view>
|
||||
<view class="grid col-1 upload-pic-grid grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(url, index0) in specialSkill[index].skillCert"
|
||||
|
|
@ -216,7 +216,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-start align-center margin-top-sm" v-if="specialSkill[index].specialSubTypeObj.isSure == 1">
|
||||
<view class="flex justify-start align-center margin-top-sm" v-if="specialSkill[index].specialSkillObj.isSure == 1">
|
||||
<view>保险证明:</view>
|
||||
<view class="grid col-1 upload-pic-grid grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(url, index0) in specialSkill[index].insurCert"
|
||||
|
|
@ -235,7 +235,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-start align-center" v-if="specialSkill[index].specialSubTypeObj.isSure == 1">
|
||||
<view class="flex justify-start align-center" v-if="specialSkill[index].specialSkillObj.isSure == 1">
|
||||
<view>保险日期:</view>
|
||||
<uni-datetime-picker style="width: 75%;"
|
||||
:value="[specialSkill[index].insurStartDate, specialSkill[index].insurEndDate]"
|
||||
|
|
@ -359,7 +359,7 @@
|
|||
:src="item.credential" :data-url="item.credential"
|
||||
@click="viewImage($event, [item.credential])"></image>
|
||||
</view>
|
||||
<view v-if="item.dangerous == 1" class="margin-bottom-xs">
|
||||
<view v-if="item.insurance" class="margin-bottom-xs">
|
||||
<view class="margin-bottom-xs">保险证明:</view>
|
||||
<image style="width: 200px; height: 200px; background-color: #eeeeee;" mode="aspectFit"
|
||||
:src="item.insurance" :data-url="item.insurance"
|
||||
|
|
@ -441,7 +441,14 @@
|
|||
this.curCertifyInfo = res.data;
|
||||
if (this.curCertifyInfo && this.curCertifyInfo.workerCertificationId) {
|
||||
// 存在认证记录
|
||||
this.servSpecialSkills = this.curCertifyInfo.specialSkills;
|
||||
let servSpecialSkills = [];
|
||||
this.curCertifyInfo.specialSkills.forEach(item => {
|
||||
servSpecialSkills.push({
|
||||
...item,
|
||||
specialSkillName: item.threeDeptGoodsCategory.goodsCategoryName
|
||||
})
|
||||
})
|
||||
this.servSpecialSkills = servSpecialSkills;
|
||||
this.curCertifyInfo.otherServArr = this.curCertifyInfo.otherServ.split(",");
|
||||
} else {
|
||||
this.loadAreaList();
|
||||
|
|
@ -449,6 +456,8 @@
|
|||
}
|
||||
},
|
||||
async showForm() {
|
||||
this.loadAreaList();
|
||||
this.loadSpecialSkillType();
|
||||
if (this.curCertifyInfo) {
|
||||
let idCardImgList = [];
|
||||
if (this.curCertifyInfo.idCardUrl1) {
|
||||
|
|
@ -476,6 +485,23 @@
|
|||
companyArea.push(areaList[0]);
|
||||
companyArea.push(subAreaList[0]);
|
||||
companyArea.push(subSubAreaList[0]);
|
||||
// 特殊技能
|
||||
let specialSkill = [];
|
||||
this.curCertifyInfo.specialSkills.forEach(item => {
|
||||
specialSkill.push({
|
||||
specialTypeObj: item.firstDeptGoodsCategory,
|
||||
specialTypeList: item.specialTypeList,
|
||||
specialSubTypeObj: item.twoDeptGoodsCategory,
|
||||
specialSubTypeList: [],
|
||||
specialSkillList: [],
|
||||
specialSkillObj: item.threeDeptGoodsCategory,
|
||||
skillCert: [item.credential],
|
||||
insurCert: [item.insurance],
|
||||
insurStartDate: item.insuranceStart,
|
||||
insurEndDate: item.insuranceEnd
|
||||
})
|
||||
});
|
||||
this.specialSkill = specialSkill;
|
||||
|
||||
this.realNameInfo = {
|
||||
...this.curCertifyInfo,
|
||||
|
|
@ -487,8 +513,6 @@
|
|||
|
||||
this.curCertifyInfo = null;
|
||||
}
|
||||
this.loadAreaList();
|
||||
this.loadSpecialSkillType();
|
||||
},
|
||||
preStep() {
|
||||
this.curStep = this.curStep === 0 ? 0 : --this.curStep;
|
||||
|
|
@ -592,11 +616,38 @@
|
|||
});
|
||||
this.specialTypeList = typeList.data;
|
||||
},
|
||||
async reloadTargetCategory(colIndex, specialSkillIndex) {
|
||||
switch(colIndex) {
|
||||
case 1: {
|
||||
if (this.specialSkill[specialSkillIndex].specialTypeObj
|
||||
&& (!this.specialSkill[specialSkillIndex].specialSubTypeList
|
||||
|| this.specialSkill[specialSkillIndex].specialSubTypeList.length === 0)) {
|
||||
let res = await this.$request.listByStep({
|
||||
goodsCategoryId: this.specialSkill[specialSkillIndex].specialTypeObj.goodsCategoryId,
|
||||
type: 1
|
||||
});
|
||||
this.specialSkill[specialSkillIndex].specialSubTypeList = res.data;
|
||||
}
|
||||
} break;
|
||||
case 2: {
|
||||
if (this.specialSkill[specialSkillIndex].specialSubTypeObj
|
||||
&& (!this.specialSkill[specialSkillIndex].specialSkillList
|
||||
|| this.specialSkill[specialSkillIndex].specialSkillList.length === 0)) {
|
||||
let res = await this.$request.listByStep({
|
||||
goodsCategoryId: this.specialSkill[specialSkillIndex].specialSubTypeObj.goodsCategoryId,
|
||||
type: 1
|
||||
});
|
||||
this.specialSkill[specialSkillIndex].specialSkillList = res.data;
|
||||
}
|
||||
} break;
|
||||
default: break;
|
||||
}
|
||||
},
|
||||
async chooseSpecialSkill(e, type, index) {
|
||||
let funName = "listByStep";
|
||||
if (type === 1) {
|
||||
funName = "qrySpecialSkillList";
|
||||
}
|
||||
// if (type === 1) {
|
||||
// funName = "qrySpecialSkillList";
|
||||
// }
|
||||
let res = await this.$request[funName]({
|
||||
goodsCategoryId: e.goodsCategoryId,
|
||||
type: 1
|
||||
|
|
@ -728,10 +779,10 @@
|
|||
let specialSkills = [];
|
||||
// 特殊技能参数
|
||||
this.specialSkill.forEach((item) => {
|
||||
if (item.specialSkillObj && item.specialSkillObj.specialSkillId) {
|
||||
if (item.specialSkillObj && item.specialSkillObj.goodsCategoryId) {
|
||||
specialSkills.push({
|
||||
workerId: workerId,
|
||||
specialSkillId: item.specialSkillObj.specialSkillId,
|
||||
specialSkillId: item.specialSkillObj.goodsCategoryId,
|
||||
credential: item.skillCert[0],
|
||||
insurance: item.insurCert[0],
|
||||
insuranceStart: item.insurStartDate,
|
||||
|
|
|
|||
|
|
@ -33,10 +33,10 @@
|
|||
@input="chooseRegion($event, 0, index)"></my-uni-combox>
|
||||
<my-uni-combox class="flex-sub margin-right-xs" :candidates="servArea[index].cityList"
|
||||
:showField="'areaName'" placeholder="选择城市" v-model="servArea[index].cityObj"
|
||||
@input="chooseRegion($event, 1, index)"></my-uni-combox>
|
||||
@input="chooseRegion($event, 1, index)" @tap="reloadTargetArea(1, index)"></my-uni-combox>
|
||||
<my-uni-combox class="flex-sub" :candidates="servArea[index].districtList"
|
||||
:showField="'areaName'" placeholder="选择地区" v-model="servArea[index].districtObj"
|
||||
@input="chooseRegion($event, 2, index)"></my-uni-combox>
|
||||
@input="chooseRegion($event, 2, index)" @tap="reloadTargetArea(2, index)"></my-uni-combox>
|
||||
</view>
|
||||
<checkbox-group @change="checkStreet($event, index)" class="grid col-2 margin-top-xs">
|
||||
<view v-for="(item0, index0) in servArea[index].streetList" class="margin-tb-xs">
|
||||
|
|
@ -82,7 +82,7 @@
|
|||
@input="chooseType($event, 0, index)"></my-uni-combox>
|
||||
<my-uni-combox class="flex-sub" :candidates="servSkill[index].subTypeList"
|
||||
:showField="'goodsCategoryName'" placeholder="请选择" v-model="servSkill[index].subTypeObj"
|
||||
@input="chooseType($event, 1, index)"></my-uni-combox>
|
||||
@input="chooseType($event, 1, index)" @tap="reloadTargetCategory(1, index)"></my-uni-combox>
|
||||
</view>
|
||||
<checkbox-group @change="checkGoodType($event, index)" class="grid col-3 margin-top-xs">
|
||||
<view v-for="(item0, index0) in servSkill[index].subSubTypeList" class="margin-tb-xs">
|
||||
|
|
@ -257,12 +257,60 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
loadData() {
|
||||
async loadData() {
|
||||
this.curUserInfo = this.$request.getCurUserInfo();
|
||||
this.loadProvinceList();
|
||||
this.loadTypeList();
|
||||
await this.loadProvinceList();
|
||||
await this.loadTypeList();
|
||||
await this.loadExistData();
|
||||
// this.loadSpecialSkill();
|
||||
},
|
||||
async loadExistData() {
|
||||
this.loadServAreas();
|
||||
this.loadServSkills();
|
||||
},
|
||||
async loadServAreas() {
|
||||
let res = await this.$request.getWorkerAreaEdit({
|
||||
workerId: this.curUserInfo.workerId
|
||||
});
|
||||
let servArea = [];
|
||||
for(let i = 0; i < res.data.length; i++) {
|
||||
let item = res.data[i];
|
||||
let streetListRes = await this.$request.areaListByStep({
|
||||
parentCode: item.districtArea.areaCode
|
||||
});
|
||||
servArea.push({
|
||||
cityList: [],
|
||||
districtList: [],
|
||||
streetList: streetListRes.data,
|
||||
provinceObj: item.provinceArea,
|
||||
cityObj: item.cityArea,
|
||||
districtObj: item.districtArea,
|
||||
streetIds: item.streetIds
|
||||
})
|
||||
}
|
||||
this.servArea = servArea;
|
||||
},
|
||||
async loadServSkills() {
|
||||
let res = await this.$request.getWorkerGoodsCategoryEdit({
|
||||
workerId: this.curUserInfo.workerId
|
||||
});
|
||||
let servSkill = [];
|
||||
for(let i = 0; i < res.data.length; i++) {
|
||||
let item = res.data[i];
|
||||
let subSubTypeRes = await this.$request.listByStep({
|
||||
goodsCategoryId: item.twoGoodsCategory.goodsCategoryId,
|
||||
type: 1
|
||||
});
|
||||
servSkill.push({
|
||||
subTypeList: [],
|
||||
subSubTypeList: subSubTypeRes.data,
|
||||
typeObj: item.oneGoodsCategory,
|
||||
subTypeObj: item.twoGoodsCategory,
|
||||
subSubTypeIds: item.categoryIds
|
||||
})
|
||||
}
|
||||
this.servSkill = servSkill;
|
||||
},
|
||||
/* 服务区域 start */
|
||||
async loadProvinceList() {
|
||||
let res = await this.$request.areaListByStep();
|
||||
|
|
@ -318,6 +366,31 @@
|
|||
delServArea(index) {
|
||||
this.servArea.splice(index, 1);
|
||||
},
|
||||
async reloadTargetArea(colIndex, areaIndex) {
|
||||
switch(colIndex) {
|
||||
case 1: {
|
||||
if (this.servArea[areaIndex].provinceObj
|
||||
&& (!this.servArea[areaIndex].cityList
|
||||
|| this.servArea[areaIndex].cityList.length === 0)) {
|
||||
let res = await this.$request.areaListByStep({
|
||||
parentCode: this.servArea[areaIndex].provinceObj.areaCode,
|
||||
});
|
||||
this.servArea[areaIndex].cityList = res.data;
|
||||
}
|
||||
} break;
|
||||
case 2: {
|
||||
if (this.servArea[areaIndex].cityObj
|
||||
&& (!this.servArea[areaIndex].districtList
|
||||
|| this.servArea[areaIndex].districtList.length === 0)) {
|
||||
let res = await this.$request.areaListByStep({
|
||||
parentCode: this.servArea[areaIndex].cityObj.areaCode,
|
||||
});
|
||||
this.servArea[areaIndex].districtList = res.data;
|
||||
}
|
||||
} break;
|
||||
default: break;
|
||||
}
|
||||
},
|
||||
/* 服务区域 end */
|
||||
/* 服务技能 start */
|
||||
async loadTypeList() {
|
||||
|
|
@ -372,6 +445,22 @@
|
|||
delServSkill(index) {
|
||||
this.servSkill.splice(index, 1);
|
||||
},
|
||||
async reloadTargetCategory(colIndex, servSkillIndex) {
|
||||
switch(colIndex) {
|
||||
case 1: {
|
||||
if (this.servSkill[servSkillIndex].typeObj
|
||||
&& (!this.servSkill[servSkillIndex].subTypeList
|
||||
|| this.servSkill[servSkillIndex].subTypeList.length === 0)) {
|
||||
let res = await this.$request.listByStep({
|
||||
goodsCategoryId: this.servSkill[servSkillIndex].typeObj.goodsCategoryId,
|
||||
type: 1
|
||||
});
|
||||
this.servSkill[servSkillIndex].subTypeList = res.data;
|
||||
}
|
||||
} break;
|
||||
default: break;
|
||||
}
|
||||
},
|
||||
/* 服务技能 end */
|
||||
/* 特殊技能 start */
|
||||
async loadSpecialSkill() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue