|
|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <view>
|
|
|
+ <view v-if="!loading">
|
|
|
<view class="form">
|
|
|
<view class="li ddflex">
|
|
|
<view class="label">头像</view>
|
|
|
@@ -10,12 +10,12 @@
|
|
|
</view>
|
|
|
<view class="li ddflex">
|
|
|
<view class="label">姓名</view>
|
|
|
- <input v-model="realName" placeholder="请填写你的真实姓名" placeholder-class="placeholder" class="ipt flex" />
|
|
|
+ <input v-model="realName" :disabled="true" placeholder="请填写你的真实姓名" placeholder-class="placeholder" class="ipt flex" />
|
|
|
</view>
|
|
|
|
|
|
<view class="li ddflex">
|
|
|
<view class="label">工号</view>
|
|
|
- <input v-model="jobNumber" placeholder="请输入工号" placeholder-class="placeholder" class="ipt flex" />
|
|
|
+ <input v-model="jobNumber" :disabled="true" placeholder="请输入工号" placeholder-class="placeholder" class="ipt flex" />
|
|
|
</view>
|
|
|
|
|
|
<view class="li ddflex">
|
|
|
@@ -27,7 +27,7 @@
|
|
|
|
|
|
<view class="li ddflex">
|
|
|
<view class="label">执业证书</view>
|
|
|
- <input v-model="realName" placeholder="请输入执业证书编号" placeholder-class="placeholder" class="ipt flex" />
|
|
|
+ <input v-model="certificateNo" :disabled="true" placeholder="请输入执业证书编号" placeholder-class="placeholder" class="ipt flex" />
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -36,7 +36,7 @@
|
|
|
<view class="li ddflex">
|
|
|
<view class="label">手机</view>
|
|
|
<input v-model="phone" maxlength="11" type="number" placeholder="请填写手机号" placeholder-class="placeholder" class="ipt flex" />
|
|
|
- <view class="tong ddflex" @click="intWechatNumber"><image src="../static/images/wxth.png"></image>微信同号</view>
|
|
|
+ <!-- <view class="tong ddflex" @click="intWechatNumber"><image src="../static/images/wxth.png"></image>微信同号</view> -->
|
|
|
</view>
|
|
|
<view class="li ddflex">
|
|
|
<view class="label">微信号</view>
|
|
|
@@ -92,11 +92,24 @@
|
|
|
<view class="tit ddflex"><view class="flex">公司信息</view></view>
|
|
|
<view class="li ddflex">
|
|
|
<view class="label">公司</view>
|
|
|
- <input v-model="companyName" placeholder="请填写公司名称" placeholder-class="placeholder" class="ipt flex" />
|
|
|
+ <input v-model="companyName" :disabled="true" placeholder="请填写公司名称" placeholder-class="placeholder" class="ipt flex" />
|
|
|
+ </view>
|
|
|
+ <view class="li ddflex">
|
|
|
+ <view class="label">公司简介</view>
|
|
|
+ <input v-if="!companyIntroduction" @tap="jumpUrl('/card/editDesc/editDesc?isCompanyIntroduction=true')" :disabled="true" maxlength="11" type="number" placeholder="请填写公司简介" placeholder-class="placeholder" class="ipt flex" />
|
|
|
+ <view class="fflex" v-else style="color: #47C776;" @tap="jumpUrl('/card/editDesc/editDesc?isCompanyIntroduction=true')">已完善</view>
|
|
|
+ <image src="../../static/images/rico.png" class="rico"></image>
|
|
|
+ </view>
|
|
|
+ <view class="li ddflex">
|
|
|
+ <view class="label">入司时间</view>
|
|
|
+ <picker mode="date" v-model="inDate" :disabled="true" @change="inDateChange">
|
|
|
+ {{inDate?inDate:'请填写公司名称'}}
|
|
|
+ </picker>
|
|
|
+ <!-- <input v-model="companyName" :disabled="true" placeholder="请填写公司名称" placeholder-class="placeholder" class="ipt flex" /> -->
|
|
|
</view>
|
|
|
<view class="li ddflex">
|
|
|
<view class="label">职位</view>
|
|
|
- <input v-model="job" placeholder="请填写职位" placeholder-class="placeholder" class="ipt flex" />
|
|
|
+ <input v-model="job" :disabled="true" placeholder="请填写职位" placeholder-class="placeholder" class="ipt flex" />
|
|
|
</view>
|
|
|
<!-- <view class="li ddflex" @click="jumpUrl('/card/industry/industry?isPoistion=true')">
|
|
|
<view class="label">行业</view>
|
|
|
@@ -105,17 +118,10 @@
|
|
|
</view> -->
|
|
|
<view class="li ddflex">
|
|
|
<view class="label">所在地区</view>
|
|
|
- <view :class="['item flex', city ? 'active' : '']">
|
|
|
- <!-- #ifdef MP-WEIXIN -->
|
|
|
- <picker class="picker flex" mode="region" :value="morCity" @change="bindCity">
|
|
|
- <view :class="city?'':'placeholder'">{{ city ? city : '请选择地区' }}</view>
|
|
|
- </picker>
|
|
|
- <!-- #endif -->
|
|
|
- <!-- #ifdef APP-PLUS -->
|
|
|
- <pickerAddress class="picker flex" @change="bindAddressChange">
|
|
|
+ <view :class="['item flex', city ? 'active' : '']" @click="chooseLocation()">
|
|
|
+ <!-- <pickerAddress class="picker flex" @change="bindAddressChange" :disabled="true" @click="chooseLocation()"> -->
|
|
|
<view :class="city?'':'placeholder'">{{ city ? city : '请选择地区' }}</view>
|
|
|
- </pickerAddress>
|
|
|
- <!-- #endif -->
|
|
|
+ <!-- </pickerAddress> -->
|
|
|
</view>
|
|
|
<image src="../../static/images/rico.png" class="rico"></image>
|
|
|
<!-- <picker class="picker flex">
|
|
|
@@ -136,10 +142,10 @@
|
|
|
|
|
|
<script>
|
|
|
const req = require('../../utils/request.js');
|
|
|
-const api = require('../../utils/api.js');
|
|
|
const util = require('../../utils/util.js');
|
|
|
+var QQMapWX = require('../../utils/qqmap.js');
|
|
|
var app = getApp();
|
|
|
-import pickerAddress from '../components/wangding-pickerAddress/wangding-pickerAddress.vue';
|
|
|
+import pickerAddress from '../../components/wangding-pickerAddress/wangding-pickerAddress.vue';
|
|
|
export default {
|
|
|
components: { pickerAddress },
|
|
|
data() {
|
|
|
@@ -161,6 +167,8 @@ export default {
|
|
|
nums: 0,
|
|
|
brief:'',//简介
|
|
|
address:'',//详细地址
|
|
|
+ inDate:'',//入司时间
|
|
|
+ companyIntroduction:'',//公司简介
|
|
|
|
|
|
honorImgUrls:[],//荣誉
|
|
|
|
|
|
@@ -169,15 +177,27 @@ export default {
|
|
|
city: '',
|
|
|
areaCode: '',
|
|
|
morCity: [],
|
|
|
+ location:{},
|
|
|
+ longitude:'',
|
|
|
+ latitude:'',
|
|
|
|
|
|
userCard:null,//用户IP名片
|
|
|
+ employmentInfo:'',
|
|
|
+ saleNo:null,
|
|
|
+ certificateNo:null,
|
|
|
+ loading:true
|
|
|
};
|
|
|
},
|
|
|
- onLoad(opt) {
|
|
|
+ async onLoad(opt) {
|
|
|
this.isEdit = opt.isEdit;
|
|
|
this.id = opt.id;
|
|
|
+ this.saleNo = opt.saleNo
|
|
|
+
|
|
|
+ await req.silenceLogin(opt.saleNo)
|
|
|
+ this.loading = false
|
|
|
console.log('getUserCard')
|
|
|
this.getUserCard()
|
|
|
+ this.getEmploymentInfo()
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
@@ -185,19 +205,34 @@ export default {
|
|
|
return new Promise((resolve,reject)=>{
|
|
|
req.getRequest('/api/user/info',{},res=>{
|
|
|
this.avatar = res.avatar;
|
|
|
- this.realName = res.realName ? res.realName : res.nickName;
|
|
|
this.phone = res.mobile;
|
|
|
resolve();
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ getEmploymentInfo(){
|
|
|
+ return new Promise((resolve,reject)=>{
|
|
|
+ req.getRequest('/api/visiting/card/employmentInfo',{jobNumber:this.saleNo},res=>{
|
|
|
+ if(res.name){
|
|
|
+ this.employmentInfo = res;
|
|
|
+ this.realName = this.employmentInfo.name;
|
|
|
+ this.certificateNo = this.employmentInfo.professionalCertificateNo
|
|
|
+ this.jobNumber = this.employmentInfo.salesNo
|
|
|
+ this.companyName = this.employmentInfo.branchName
|
|
|
+ this.job = this.employmentInfo.actrankName
|
|
|
+ this.inDate = this.employmentInfo.inDate
|
|
|
+ }
|
|
|
+ else return req.msg("员工信息不存在")
|
|
|
+ resolve();
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
// 用户名片信息
|
|
|
getUserCard(){
|
|
|
req.getRequest('/api/visiting/card/userInfo', {}, res => {
|
|
|
console.log('getUserCard',res)
|
|
|
this.userCard = res
|
|
|
if(!res){
|
|
|
- // this.getCompanyData()
|
|
|
this.getUserInfo()
|
|
|
}else{
|
|
|
this.id = res.id
|
|
|
@@ -210,30 +245,18 @@ export default {
|
|
|
this.wechatCode = res.wechatCode;
|
|
|
this.email = res.email;
|
|
|
this.companyName = res.companyName;
|
|
|
+ this.companyIntroduction = res.companyIntroduction
|
|
|
this.industryName = res.industryName;
|
|
|
this.tradeId = res.tradeId;
|
|
|
this.address = res.address;
|
|
|
this.job = res.job;
|
|
|
- res.areaCode = JSON.parse(res.areaCode)
|
|
|
- this.morCity = [res.areaCode.id.substring(0,2)+'0000',res.areaCode.id.substring(0,4)+'00',res.areaCode.id]
|
|
|
- this.city = res.areaCode.name
|
|
|
+ this.morCity = [res.areaCode.substring(0,2)+'0000',res.areaCode.substring(0,4)+'00',res.areaCode]
|
|
|
+ this.city = res.areaCodeName
|
|
|
this.areaCode = this.morCity[2];
|
|
|
}
|
|
|
+ this.getEmploymentInfo()
|
|
|
});
|
|
|
},
|
|
|
- getCompanyData(){
|
|
|
- req.getRequest('/api/CKBCompany/info',{},res=>{
|
|
|
- if(res){
|
|
|
- this.companyName = res.title
|
|
|
- this.industryName = res.trade
|
|
|
- this.tradeId = res.industryId
|
|
|
- this.address = res.address
|
|
|
- this.morCity = JSON.parse(res.areaCode).map(item=>{return item.id})
|
|
|
- this.areaCode = JSON.parse(res.areaCode).map(item=>{return item.id})[2]
|
|
|
- this.city = JSON.parse(res.areaCode).map(item=>{return item.name}).join('')
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
jumpUrl(url) {
|
|
|
uni.navigateTo({
|
|
|
url: url
|
|
|
@@ -381,7 +404,55 @@ export default {
|
|
|
this.city = data.data[0] + data.data[1] + data.data[2];
|
|
|
this.areaCode = data.ids[2];
|
|
|
},
|
|
|
-
|
|
|
+ chooseLocation() {
|
|
|
+ var tha = this;
|
|
|
+ uni.chooseLocation({
|
|
|
+ success: function(res) {
|
|
|
+ if (res.name) {
|
|
|
+ tha.address = res.name;
|
|
|
+ tha.reverseGeocoder(res);
|
|
|
+ console.log('地址数据》》》:', res);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ reverseGeocoder(location) {
|
|
|
+ // #ifdef H5
|
|
|
+ location = location.latitude + ',' + location.longitude
|
|
|
+ let url = 'https://apis.map.qq.com/ws/geocoder/v1/?address=';
|
|
|
+ this.$jsonp(url, {
|
|
|
+ key: req.public.mapLBSKEY,
|
|
|
+ location: location,
|
|
|
+ output: 'jsonp'
|
|
|
+ }).then(data => {
|
|
|
+ console.log('解析后的地址地址数据:', data);
|
|
|
+ data = data.result
|
|
|
+ this.city = data.ad_info.province+data.ad_info.city+data.ad_info.district
|
|
|
+ this.areaCode = data.ad_info.adcode;
|
|
|
+ this.morCity = [this.areaCode.substring(0,2)+'0000',this.areaCode.substring(0,4)+'00',this.areaCode]
|
|
|
+ this.longitude = data.ad_info.location.lng
|
|
|
+ this.latitude = data.ad_info.location.lat
|
|
|
+ }).catch(err => {
|
|
|
+ console.log(err);
|
|
|
+ });
|
|
|
+ // #endif
|
|
|
+ // #ifndef H5
|
|
|
+ QQMapWX.initMap();
|
|
|
+ QQMapWX.reverseGeocoder(location, data => {
|
|
|
+ console.log('解析后的地址地址数据:', data);
|
|
|
+
|
|
|
+ this.city = data.ad_info.province+data.ad_info.city+data.ad_info.district
|
|
|
+ this.areaCode = data.ad_info.adcode;
|
|
|
+ this.morCity = [this.areaCode.substring(0,2)+'0000',this.areaCode.substring(0,4)+'00',this.areaCode]
|
|
|
+ this.longitude = data.ad_info.location.lng
|
|
|
+ this.latitude = data.ad_info.location.lat
|
|
|
+ });
|
|
|
+ //#endif
|
|
|
+ },
|
|
|
+ inDateChange(e){
|
|
|
+ console.log(e.detail.value)
|
|
|
+ this.inDate = e.detail.value
|
|
|
+ },
|
|
|
/**
|
|
|
* 提交名片
|
|
|
*/
|
|
|
@@ -395,9 +466,11 @@ export default {
|
|
|
if (!this.wechat) return req.msg('请填写微信号');
|
|
|
if (!this.wechatCode) return req.msg('请上传微信二维码');
|
|
|
if (!this.companyName) return req.msg('请填写公司名称');
|
|
|
+ if (!this.companyIntroduction) return req.msg('请填写公司简介');
|
|
|
if (!this.job) return req.msg('请填写职位')
|
|
|
if (!this.areaCode) return req.msg('请选择所在地区');
|
|
|
if (!this.address) return req.msg('请填写详细地址');
|
|
|
+ if (!this.inDate) return req.msg("请选择入司时间")
|
|
|
var dataP = {};
|
|
|
dataP.avatar = this.avatar;
|
|
|
dataP.realName = this.realName;
|
|
|
@@ -406,13 +479,18 @@ export default {
|
|
|
dataP.wechat = this.wechat;
|
|
|
dataP.wechatCode = this.wechatCode;
|
|
|
dataP.companyName = this.companyName;
|
|
|
- dataP.job = this.job;
|
|
|
- dataP.areaCode = {
|
|
|
- id:this.areaCode,
|
|
|
- name :this.city
|
|
|
- };
|
|
|
- dataP.areaCode = JSON.stringify(dataP.areaCode)
|
|
|
+ dataP.companyIntroduction = this.companyIntroduction;
|
|
|
+ dataP.job = this.employmentInfo.actrank;
|
|
|
+ dataP.inDate = this.inDate;
|
|
|
+ // dataP.areaCode = {
|
|
|
+ // id:this.areaCode,
|
|
|
+ // name :this.city
|
|
|
+ // };
|
|
|
+ dataP.areaCode = this.areaCode
|
|
|
+ dataP.areaCodeName = this.city
|
|
|
dataP.address = this.address;
|
|
|
+ dataP.longitude = this.longitude;
|
|
|
+ dataP.latitude = this.latitude;
|
|
|
dataP.jobNumber = this.jobNumber;
|
|
|
dataP.honorImg = this.honorImgUrls.join(',');
|
|
|
dataP.styleImg = this.styleImgUrls.join(',');
|