xhj 2 年 前
コミット
d34b1ffc29
1 ファイル変更24 行追加9 行削除
  1. 24 9
      card/create/create.vue

+ 24 - 9
card/create/create.vue

@@ -95,6 +95,13 @@
 				<input v-model="companyName" :disabled="true" placeholder="请填写公司名称" placeholder-class="placeholder" class="ipt flex" />
 			</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" :disabled="true" placeholder="请填写职位" placeholder-class="placeholder" class="ipt flex" />
 			</view>
@@ -153,6 +160,7 @@ export default {
 			nums: 0,
 			brief:'',//简介
 			address:'',//详细地址
+			inDate:'',//入司时间
 			
 			honorImgUrls:[],//荣誉
 			
@@ -198,6 +206,7 @@ export default {
 						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();
@@ -226,11 +235,11 @@ export default {
 					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()
 			});
 		},
 		jumpUrl(url) {
@@ -380,7 +389,10 @@ export default {
 			this.city = data.data[0] + data.data[1] + data.data[2];
 			this.areaCode = data.ids[2];
 		},
-
+		inDateChange(e){
+			console.log(e.detail.value)
+			this.inDate = e.detail.value
+		},
 		/**
 		 * 提交名片
 		 */
@@ -397,6 +409,7 @@ export default {
 			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,11 +419,13 @@ export default {
 			dataP.wechatCode = this.wechatCode;
 			dataP.companyName = this.companyName;
 			dataP.job = this.employmentInfo.actrank;
-			dataP.areaCode = {
-				id:this.areaCode,
-				name :this.city
-			};
-			dataP.areaCode = JSON.stringify(dataP.areaCode)
+			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.jobNumber = this.jobNumber;
 			dataP.honorImg = this.honorImgUrls.join(',');