入驻,实名修改

This commit is contained in:
donqi 2023-03-05 22:15:06 +08:00
parent b8beee15fb
commit 620462349e
3 changed files with 189 additions and 25 deletions

View File

@ -13,9 +13,9 @@ export default {
}) })
let userInfo = _this.getCurUserInfo(); let userInfo = _this.getCurUserInfo();
// request 触发前拼接 url // 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://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) { if (!args.data) {
args.data = {} args.data = {}
@ -189,6 +189,14 @@ export default {
}) })
return res[1].data; 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 = {}) { async sendVertifyCode(params = {}) {
let res = await uni.request({ let res = await uni.request({
url: '/tool/sms/send', url: '/tool/sms/send',
@ -583,6 +591,22 @@ export default {
}) })
return res[1].data; 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 = {}) { async qrPay(params = {}) {
let res = await uni.request({ let res = await uni.request({
url: '/pay/ali/qr', url: '/pay/ali/qr',

View File

@ -184,20 +184,20 @@
:candidates="specialSkill[index].specialSubTypeList" :candidates="specialSkill[index].specialSubTypeList"
:showField="'goodsCategoryName'" placeholder="请选择" :showField="'goodsCategoryName'" placeholder="请选择"
v-model="specialSkill[index].specialSubTypeObj" 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" <!-- <my-uni-combox class="flex-sub"
:candidates="specialSkill[index].specialSubSubTypeList" :candidates="specialSkill[index].specialSubSubTypeList"
:showField="'goodsCategoryName'" placeholder="请选择" :showField="'goodsCategoryName'" placeholder="请选择"
v-model="specialSkill[index].specialSubSubTypeObj" v-model="specialSkill[index].specialSubSubTypeObj"
@input="chooseSpecialSkill($event, 2, index)"></my-uni-combox> --> @input="chooseSpecialSkill($event, 2, index)"></my-uni-combox> -->
<my-uni-combox class="flex-sub" :candidates="specialSkill[index].specialSkillList" <my-uni-combox class="flex-sub" :candidates="specialSkill[index].specialSkillList"
:showField="'specialSkillName'" placeholder="请选择" :showField="'goodsCategoryName'" placeholder="请选择"
v-model="specialSkill[index].specialSkillObj" 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>
</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>技能证书</view>
<view class="grid col-1 upload-pic-grid grid-square flex-sub"> <view class="grid col-1 upload-pic-grid grid-square flex-sub">
<view class="bg-img" v-for="(url, index0) in specialSkill[index].skillCert" <view class="bg-img" v-for="(url, index0) in specialSkill[index].skillCert"
@ -216,7 +216,7 @@
</view> </view>
</view> </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>保险证明</view>
<view class="grid col-1 upload-pic-grid grid-square flex-sub"> <view class="grid col-1 upload-pic-grid grid-square flex-sub">
<view class="bg-img" v-for="(url, index0) in specialSkill[index].insurCert" <view class="bg-img" v-for="(url, index0) in specialSkill[index].insurCert"
@ -235,7 +235,7 @@
</view> </view>
</view> </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> <view>保险日期</view>
<uni-datetime-picker style="width: 75%;" <uni-datetime-picker style="width: 75%;"
:value="[specialSkill[index].insurStartDate, specialSkill[index].insurEndDate]" :value="[specialSkill[index].insurStartDate, specialSkill[index].insurEndDate]"
@ -359,7 +359,7 @@
:src="item.credential" :data-url="item.credential" :src="item.credential" :data-url="item.credential"
@click="viewImage($event, [item.credential])"></image> @click="viewImage($event, [item.credential])"></image>
</view> </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> <view class="margin-bottom-xs">保险证明</view>
<image style="width: 200px; height: 200px; background-color: #eeeeee;" mode="aspectFit" <image style="width: 200px; height: 200px; background-color: #eeeeee;" mode="aspectFit"
:src="item.insurance" :data-url="item.insurance" :src="item.insurance" :data-url="item.insurance"
@ -440,15 +440,24 @@
let res = await this.$request.getWorkerCertify(); let res = await this.$request.getWorkerCertify();
this.curCertifyInfo = res.data; this.curCertifyInfo = res.data;
if (this.curCertifyInfo && this.curCertifyInfo.workerCertificationId) { 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(","); this.curCertifyInfo.otherServArr = this.curCertifyInfo.otherServ.split(",");
} else { } else {
this.loadAreaList(); this.loadAreaList();
this.loadSpecialSkillType(); this.loadSpecialSkillType();
} }
}, },
async showForm() { async showForm() {
this.loadAreaList();
this.loadSpecialSkillType();
if (this.curCertifyInfo) { if (this.curCertifyInfo) {
let idCardImgList = []; let idCardImgList = [];
if (this.curCertifyInfo.idCardUrl1) { if (this.curCertifyInfo.idCardUrl1) {
@ -476,6 +485,23 @@
companyArea.push(areaList[0]); companyArea.push(areaList[0]);
companyArea.push(subAreaList[0]); companyArea.push(subAreaList[0]);
companyArea.push(subSubAreaList[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.realNameInfo = {
...this.curCertifyInfo, ...this.curCertifyInfo,
@ -487,8 +513,6 @@
this.curCertifyInfo = null; this.curCertifyInfo = null;
} }
this.loadAreaList();
this.loadSpecialSkillType();
}, },
preStep() { preStep() {
this.curStep = this.curStep === 0 ? 0 : --this.curStep; this.curStep = this.curStep === 0 ? 0 : --this.curStep;
@ -591,12 +615,39 @@
goodsCategoryId: res[0].goodsCategoryId goodsCategoryId: res[0].goodsCategoryId
}); });
this.specialTypeList = typeList.data; 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) { async chooseSpecialSkill(e, type, index) {
let funName = "listByStep"; let funName = "listByStep";
if (type === 1) { // if (type === 1) {
funName = "qrySpecialSkillList"; // funName = "qrySpecialSkillList";
} // }
let res = await this.$request[funName]({ let res = await this.$request[funName]({
goodsCategoryId: e.goodsCategoryId, goodsCategoryId: e.goodsCategoryId,
type: 1 type: 1
@ -728,10 +779,10 @@
let specialSkills = []; let specialSkills = [];
// //
this.specialSkill.forEach((item) => { this.specialSkill.forEach((item) => {
if (item.specialSkillObj && item.specialSkillObj.specialSkillId) { if (item.specialSkillObj && item.specialSkillObj.goodsCategoryId) {
specialSkills.push({ specialSkills.push({
workerId: workerId, workerId: workerId,
specialSkillId: item.specialSkillObj.specialSkillId, specialSkillId: item.specialSkillObj.goodsCategoryId,
credential: item.skillCert[0], credential: item.skillCert[0],
insurance: item.insurCert[0], insurance: item.insurCert[0],
insuranceStart: item.insurStartDate, insuranceStart: item.insurStartDate,

View File

@ -33,10 +33,10 @@
@input="chooseRegion($event, 0, index)"></my-uni-combox> @input="chooseRegion($event, 0, index)"></my-uni-combox>
<my-uni-combox class="flex-sub margin-right-xs" :candidates="servArea[index].cityList" <my-uni-combox class="flex-sub margin-right-xs" :candidates="servArea[index].cityList"
:showField="'areaName'" placeholder="选择城市" v-model="servArea[index].cityObj" :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" <my-uni-combox class="flex-sub" :candidates="servArea[index].districtList"
:showField="'areaName'" placeholder="选择地区" v-model="servArea[index].districtObj" :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> </view>
<checkbox-group @change="checkStreet($event, index)" class="grid col-2 margin-top-xs"> <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"> <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> @input="chooseType($event, 0, index)"></my-uni-combox>
<my-uni-combox class="flex-sub" :candidates="servSkill[index].subTypeList" <my-uni-combox class="flex-sub" :candidates="servSkill[index].subTypeList"
:showField="'goodsCategoryName'" placeholder="请选择" v-model="servSkill[index].subTypeObj" :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> </view>
<checkbox-group @change="checkGoodType($event, index)" class="grid col-3 margin-top-xs"> <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"> <view v-for="(item0, index0) in servSkill[index].subSubTypeList" class="margin-tb-xs">
@ -257,11 +257,59 @@
} }
}, },
methods: { methods: {
loadData() { async loadData() {
this.curUserInfo = this.$request.getCurUserInfo(); this.curUserInfo = this.$request.getCurUserInfo();
this.loadProvinceList(); await this.loadProvinceList();
this.loadTypeList(); await this.loadTypeList();
await this.loadExistData();
// this.loadSpecialSkill(); // 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 */ /* 服务区域 start */
async loadProvinceList() { async loadProvinceList() {
@ -317,6 +365,31 @@
}, },
delServArea(index) { delServArea(index) {
this.servArea.splice(index, 1); 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 */ /* 服务区域 end */
/* 服务技能 start */ /* 服务技能 start */
@ -371,6 +444,22 @@
}, },
delServSkill(index) { delServSkill(index) {
this.servSkill.splice(index, 1); 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 */ /* 服务技能 end */
/* 特殊技能 start */ /* 特殊技能 start */