Przeglądaj źródła

commit -m 供应商注册修改资料

zhengjinyi 4 lat temu
rodzic
commit
44274b12bc
3 zmienionych plików z 121 dodań i 146 usunięć
  1. 117 140
      pages/login/apply-supplier.vue
  2. 4 4
      pages/login/login.vue
  3. 0 2
      pages/login/register-supplier.vue

+ 117 - 140
pages/login/apply-supplier.vue

@@ -16,19 +16,19 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">公司名称:</view>
-					<input class="row-input" type="text" name="input" v-model="twoParmas.name" placeholder="请输入您的公司名称" maxlength="30"/>
+					<input class="row-input" type="text" name="input" v-model="shopInfo.name" placeholder="请输入您的公司名称" maxlength="30"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">联系人:</view>
-					<input class="row-input" type="text" name="input" v-model="twoParmas.linkMan" placeholder="请输入联系人姓名" maxlength="6"/>
+					<input class="row-input" type="text" name="input" v-model="shopInfo.linkMan" placeholder="请输入联系人姓名" maxlength="6"/>
 				</view>
 			</view>
 			<view class="register-row none clearfix">
 				<view class="register-from">
 					<view class="label">邮箱:</view>
-					<input class="row-input" type="text" name="input" v-model="twoParmas.email" placeholder="请输入邮箱地址" maxlength="30"/>
+					<input class="row-input" type="text" name="input" v-model="shopInfo.email" placeholder="请输入邮箱地址" maxlength="30"/>
 				</view>
 			</view>
 			<view class="register-row text clearfix">
@@ -38,7 +38,7 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">公司简称:</view>
-					<input class="row-input" type="text" v-model="postParmas.sname" placeholder="请输入您的公司简称" maxlength="10"/>
+					<input class="row-input" type="text" v-model="shopInfo.sname" placeholder="请输入您的公司简称" maxlength="10"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
@@ -51,11 +51,11 @@
 				</view>
 			</view>
 			<view class="register-row text-textarea clearfix">
-				<view class="textarea show" v-if="isShowInput" @click="showTextareaFocus">{{postParmas.address ? postParmas.address :'详细地址:如道路、门牌号、小区等'}}</view>
+				<view class="textarea show" v-if="isShowInput" @click="showTextareaFocus">{{shopInfo.address ? shopInfo.address :'详细地址:如道路、门牌号、小区等'}}</view>
 				<textarea 	v-else
 							class="textarea" 
 							type="text" 
-							v-model="postParmas.address" 
+							v-model="shopInfo.address" 
 							placeholder="详细地址:如道路、门牌号、小区等" 
 							placeholder-class="placeholder"
 							maxlength="40"
@@ -68,16 +68,16 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">营业执照编号:</view>
-					<input class="row-input" type="text" v-model="postParmas.socialCreditCode" placeholder="请填写社会统一信用代码" maxlength="18"/>
+					<input class="row-input" type="text" v-model="shopInfo.socialCreditCode" placeholder="请填写社会统一信用代码" maxlength="18"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-picture">
 					<view class="label">营业执照:</view>
 					<view class="upload-picture">
-						<view class="upload-none" v-if="postParmas.businessLicenseImage === ''"  @click="chooseBusinessImage"><text class="iconfont icon-jiahao"></text></view>
+						<view class="upload-none" v-if="shopInfo.businessLicenseImage === ''"  @click="chooseBusinessImage"><text class="iconfont icon-jiahao"></text></view>
 						<view class="upload-image" v-else>
-							<image :src="postParmas.businessLicenseImage" mode="" @click="viewBusinessImage"></image>
+							<image :src="shopInfo.businessLicenseImage" mode="" @click="viewBusinessImage"></image>
 							<view class="upload-del" @click="delBusinessImage">
 								<text class='iconfont icon-shanchu1'></text>
 							</view>
@@ -92,12 +92,12 @@
 					<text class="iconfont icon-xiayibu"></text>
 				</view>
 			</view>
-			<view class="register-row none clearfix" v-if="postParmas.firstShopType == 1">
+			<view class="register-row none clearfix" v-if="shopInfo.firstShopType == 1">
 				<view class="register-from radio">
 					<view class="label">医疗类型:</view>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="postParmas.firstShopType == 1">
+			<view class="register-row clearfix" v-if="shopInfo.firstShopType == 1">
 				<view class="register-from radio">
 					<radio-group @change="radioChange">
 						<label class="row-input" v-for="(item, index) in supplierList" :key="item.value">
@@ -186,7 +186,7 @@
 				tabCurrentIndex:3,	
 				auditStatus:'',			//审核状态
 				isPreviewImage:false,   //预览图片开关
-				postParmas:{
+				shopInfo:{
 					userId:'',				//用户ID
 					shopID:'',				//供应商ID
 					linkMan:'',
@@ -207,6 +207,7 @@
 					secondShopType: '',
 					mainpro:'',
 					isAgreed:0,
+					whichStep:3
 				},
 				addressText:'请选择公司所在地区',
 				isDisabled:true,
@@ -214,8 +215,8 @@
 				textareaFocus:false,
 				organizationTypeText:'请选择公司类型',
 				supplierList:supplierList,//医疗类型
-				supplierMedicaCampList:supplierMedicaCampNullList,//主营内容
-				mentuzCampList:[],		//医美主营
+				medicaCampList:supplierMedicaCampNullList,//主营内容
+				supplierMedicaCampList:[],
 				typtIndex:0,
 				organizationType:0,
 				current:0,
@@ -239,160 +240,120 @@
 			},
 			GetSupplierInfo(){
 				this.$api.getStorage().then((resolve) =>{
-					this.postParmas.userId = resolve.userID
-					this.auditStatus = resolve.auditStatus
-					this.ShopService.shopInfo({userId:this.postParmas.userId}).then(response =>{
+					this.shopInfo.userId = resolve.userID
+					this.ShopService.shopInfo({userId:this.shopInfo.userId}).then(response =>{
 						let responseData = response.data
 						let supplierShop = responseData.shop
 						let supplierUser = responseData.user
-						this.auditStatus = responseData.status
+						this.auditStatus = supplierShop.status
 						if(supplierUser.auditNoteList!=null){
-							this.errorList =supplierUser.auditNoteList
+							this.errorList = supplierUser.auditNoteList
 						}
-						this.registerEmail = supplierUser.email	
-						this.clubID = supplierUser.clubID
-						this.clubName = this.$reg.checkData(supplierShop.name)
-						this.abbreviation = this.$reg.checkData(supplierShop.sname)
-						if( supplierShop.provinceID){
-							this.addressData.provinceID = ''
-						}else{
-							this.addressData.provinceID = supplierShop.provinceID
-						}
-						if( supplierShop.cityID){
-							this.addressData.cityID = ''
-						}else{
-							this.addressData.cityID = supplierShop.cityID
-						}
-						if( supplierShop.townID){
-							this.addressData.townID = ''
-						}else{
-							this.addressData.townID = supplierShop.townID
-						}
-						this.addressData.address = supplierShop.provincialAddress ? supplierShop.provincialAddress:'请选择机构所在地区'
-						this.addressData.addressDetail = this.$reg.checkData(supplierShop.address)
-						this.socialCreditCode = this.$reg.checkData(supplierShop.socialCreditCode)
-						this.firstClubType = supplierShop.firstClubType
-						this.secondClubType = this.$reg.checkData(supplierShop.secondClubType)
-						this.uploadBusinessImage = this.$reg.checkData(supplierShop.businessLicenseImage) 
-						this.uploadMentuzImage = this.$reg.checkData(supplierShop.headpic)
-						this.uploadMedicalImage = this.$reg.checkData(supplierShop.medicalPracticeLicenseImg)
-						this.department = this.$reg.checkData(supplierShop.department)		
+						this.shopInfo.shopID = supplierUser.shopID
+						this.shopInfo.name = this.$reg.checkData(supplierShop.name)
+						this.shopInfo.linkMan = this.$reg.checkData(supplierShop.linkMan)
+						this.shopInfo.email = this.$reg.checkData(supplierUser.email)
+						this.shopInfo.sname = this.$reg.checkData(supplierShop.sname)
+						this.addressText = supplierShop.provincialAddress ? supplierShop.provincialAddress : '请选择公司所在地区'
+						this.shopInfo.address = supplierShop.address
+						this.shopInfo.provinceID = supplierShop.provinceID
+						this.shopInfo.cityID = supplierShop.cityID
+						this.shopInfo.townID = supplierShop.townID
+						this.shopInfo.socialCreditCode = this.$reg.checkData(supplierShop.socialCreditCode)
+						this.shopInfo.businessLicenseImage = this.$reg.checkData(supplierShop.businessLicenseImage) 
+						this.shopInfo.firstShopType = supplierShop.firstShopType
+						this.shopInfo.secondShopType = this.$reg.checkData(supplierShop.secondShopType)
 						//机构类型&&主营项目
-						switch(this.firstClubType){
+						switch(this.shopInfo.firstShopType){
 							case '1':
-								this.organizationTypeText = '医'
-								this.isOrganizationType = 1
+								this.organizationTypeText = '医疗'
+								this.shopInfo.firstShopType = 1
 								break;
 							case '2':
-								this.organizationTypeText = '生美'
-								this.isOrganizationType = 2
+								this.organizationTypeText = '非医疗'
+								this.shopInfo.firstShopType = 2
 								break;
 							case null:
 								this.organizationTypeText = '请选择公司类型'
-								this.isOrganizationType = 0
+								this.shopInfo.firstShopType = 0
 								break;
 						}	
-						if(supplierShop.mainpro == "" || supplierShop.mainpro == null){
-							this.mentuzCampList = this.mentuzCampNullList
-							this.medicaCampList = this.medicaCampNullList
-							console.log(this.medicaCampList)
-							console.log(this.mentuzCampList)
-						}else{
-							if(this.firstClubType == '1'){
-								this.mentuzCampList = this.setNewMainpro(supplierShop.mainpro)
-								this.medicaCampList = this.medicaCampNullList							
-							}else{
-								this.medicaCampList = this.setNewMainpro(supplierShop.mainpro)
-								this.mentuzCampList = this.mentuzCampNullList
-							}
+						if(supplierShop.mainpro){
+							this.supplierMedicaCampList = this.setNewMainpro(supplierShop.mainpro)
+							console.log(this.supplierMedicaCampList)
 							this.mainpro = supplierShop.mainpro;
-						}
-						//机构类型
-						switch(this.secondClubType){
-							case '1':this.current = 0;break;
-							case '2':this.current = 1;this.isDepartment=true;break;
-							case '3':this.current = 2;this.isDepartment=true;break;
+						}else{
+							this.supplierMedicaCampList = this.medicaCampList
+							console.log(this.supplierMedicaCampList)
 						}
 					}).catch(error =>{
 						this.$util.msg(error.msg,2000)
 					})
 				})
 			},
-			organizationUpdateInfo(){//提交审核
+			SupplierRegisteredThree(){//提交审核
 				if(!this.isMainproCheck){
 					let mainproList = []
-					if(this.firstClubType == '1'){
-						this.mentuzCampList.forEach(item =>{
-							mainproList.push(item.name)
-						})
-					}else{
-						this.medicaCampList.forEach(item =>{
-							mainproList.push(item.name)
-						})
-					}
-					this.mainpro = mainproList.join('/')
+					this.supplierMedicaCampList.forEach(item =>{
+						mainproList.push(item.name)
+					})
+					this.shopInfo.mainpro = mainproList.join('/')
+				}
+				if( this.shopInfo.name == ''){
+					this.$util.msg('请输入您的公司名称',2000);
+					return
 				}
-				if( this.registerEmail == ''){
+				if( this.shopInfo.linkMan == ''){
+					this.$util.msg('请输入联系人名称',2000);
+					return
+				}
+				if( this.shopInfo.email == ''){
 					this.$util.msg('请输入邮箱地址',2000);
 					return
 				}
-				if( !this.$reg.isEmail(this.registerEmail)){
+				if(!this.$reg.isEmail(this.shopInfo.email)){
 					this.$util.msg('请输入正确的邮箱地址',2000);
 					return
 				}
-				if( this.clubName == ''){
-					this.$util.msg('请输入机构名称',2000);
+				if( this.shopInfo.townID == ''){
+					this.$util.msg('请选择公司地址',2000);
 					return
 				}
-				if( this.addressData.townID == ''){
-					this.$util.msg('请选择机构地址',2000);
+				if( this.shopInfo.address == ''){
+					this.$util.msg('请填写公司详细地址',2000);
 					return
 				}
-				if( this.addressData.addressDetail == ''){
-					this.$util.msg('请填写机构详细地址',2000);
+				if( this.shopInfo.socialCreditCode == ''){
+					this.$util.msg('请填写统一社会信用代码',2000);
 					return
 				}
-				if( this.uploadBusinessImage == ''){
+				if( !this.shopInfo.businessLicenseImage){
 					this.$util.msg('请上传您的营业执照',2000);
 					return
 				}
-				if(this.isOrganizationType!=0){
-					if(this.mainpro == ''){
-						this.$util.msg('请选择住机构主营内容',2000);
-						return
-					}
+				if(this.shopInfo.firstShopType == 0){
+					this.$util.msg('请选择公司类型',2000);
+					return
 				}
-				let params ={
-						userID:this.userID,
-						clubID:this.clubID,					//会所ID
-						contractEmail1:this.registerEmail,
-						name:this.clubName,
-						sname:this.abbreviation,
-						provinceID:this.addressData.provinceID,
-						cityID:this.addressData.cityID,
-						townID:this.addressData.townID,
-						address:this.addressData.addressDetail,
-						socialCreditCode:this.socialCreditCode,
-						businessLicenseImage:this.uploadBusinessImage,
-						headpic:this.uploadMentuzImage,
-						firstClubType:this.isOrganizationType,  //机构类型分类 医美:1和生美:2
-						secondClubType:this.secondClubType,		//机构类型二级分类 诊所:1,门诊:2,医院:3
-						department:this.department,				//科室
-						medicalPracticeLicenseImg:this.uploadMedicalImage,//资质图片
-						mainpro:this.mainpro,
+				if(this.shopInfo.mainpro == ''){
+					this.$util.msg('请选择主营内容',2000);
+					return
 				}
-				this.UserService.OrganizationRegister(params).then(response =>{
-					this.$util.msg('您的升级申请已提交审核',2000);
-					setTimeout(()=>{
-						uni.navigateBack();
-					},2000)
+				if(this.shopInfo.isAgreed == 0){
+					this.$util.msg('请勾选同意协议',2000);
+					return
+				}
+				this.UserService.appSupplierRegister(this.shopInfo).then(response =>{
+					this.$util.modal('','您的资料已提交成功,系统将在1-2个工作日内进行审核~','知道了','',false,() =>{
+						this.$api.switchTabTo('/pages/tabBar/home/index')
+					})
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000);
 				})
 			},
 			chooseBusinessImage() {//营业执照图片上传
 				uploadFileImage().then(res =>{
-					this.postParmas.businessLicenseImage = JSON.parse(res.data).data
+					this.shopInfo.businessLicenseImage = JSON.parse(res.data).data
 				})
 			},
 			viewBusinessImage(e) {
@@ -409,16 +370,16 @@
 			},
 			delBusinessImage(){
 				this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
-					 this.postParmas.businessLicenseImage = ''
+					 this.shopInfo.businessLicenseImage = ''
 				})
 			},
 			radioChange(e) {
-				this.postParmas.secondShopType = e.target.value;
-				console.log(this.postParmas.secondShopType)
+				this.shopInfo.secondShopType = e.target.value;
+				console.log(this.shopInfo.secondShopType)
 			},
 			chooseMaleLike(e){
 				this.isMainproCheck = true
-				this.postParmas.mainpro = this.checkLikes(e,this.supplierMedicaCampList)
+				this.shopInfo.mainpro = this.checkLikes(e,this.supplierMedicaCampList)
 			},
 			bindPickerChange(e) {
 				let self = this
@@ -426,8 +387,8 @@
 					title:'标题',
 					itemList: ['医疗', '非医疗'],
 					success: (e) => {
-						self.postParmas.firstShopType = e.tapIndex+1
-						console.log(self.postParmas.firstShopType)
+						self.shopInfo.firstShopType = e.tapIndex+1
+						console.log(self.shopInfo.firstShopType)
 						switch(e.tapIndex){
 							case 0:
 								this.organizationTypeText = '医疗'
@@ -456,13 +417,13 @@
 			},
 			onConfirm(e) {
 				this.addressText = e.name;
-				this.postParmas.townID = e.townCode;
-				this.postParmas.cityID = e.cityCode;
-				this.postParmas.provinceID = e.provinceCode;
-				console.log(this.postParmas)
+				this.shopInfo.townID = e.townCode;
+				this.shopInfo.cityID = e.cityCode;
+				this.shopInfo.provinceID = e.provinceCode;
+				console.log(this.shopInfo)
 			},	
 			onTextareaInput(e){
-			   this.postParmas.address = e.detail.value;
+			   this.shopInfo.address = e.detail.value;
 			},
 			onBlurInput(e){//
 				if(e.detail.value ===''){
@@ -471,17 +432,12 @@
 					this.isDisabled = false
 				}
 			},
-			addCustomItem(){//添加主营内容
-				let item = {value:`${this.supplierMedicaCampList.length+1}`,name:this.customItemValue,checked:true}
-				this.supplierMedicaCampList.push(item)
-				console.log(this.supplierMedicaCampList)
-			},
 			agreeCheck() {
 				this.isCheck = !this.isCheck
 				if(this.isCheck){
-					this.postParmas.isAgreed = 1
+					this.shopInfo.isAgreed = 1
 				}else{
-					this.postParmas.isAgreed = 0
+					this.shopInfo.isAgreed = 0
 				}
 			},
 			checkLikes(e,list){
@@ -510,7 +466,7 @@
 					this.$util.msg('请输入自定义主营内容',2000);
 				}else{
 					if(this.isOrganizationType == 1){
-						let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue,checked:true}
+						let item = {value:`${this.supplierMedicaCampList.length+1}`,name:this.customItemValue,checked:true}
 						if(this.checkedArray(this.customItemValue,this.mentuzCampList)){
 							this.$util.msg('主营内容已存在!',2000)
 						}else{
@@ -647,6 +603,27 @@
 				&.none{
 					margin-bottom: 0;
 				}
+				.error-title{
+					line-height: 40rpx;
+					font-size: $font-size-28;
+					color: $text-color;
+					text-align: left;
+				}
+				.error-main{
+					padding: 10rpx 0;
+					.error-item{
+						padding:0 20rpx;
+						margin:10rpx;
+						background: #F53636;
+						height: 52rpx;
+						line-height: 52rpx;
+						border-radius: 26rpx;
+						font-size: $font-size-26;
+						color: #FFFFFF;
+						text-align: center;
+						display: inline-block;
+					}
+				}
 				&.login{
 					display: flex;
 				}

+ 4 - 4
pages/login/login.vue

@@ -38,8 +38,8 @@
 				isShowEye:false,
 				iconEyes:'icon-yanjing_yincang_o',
 				iconEyen:'icon-yanjing_xianshi_o',
-				accountNumber:'',  //用户登录账号
-				password:'',	   //用户登录密码	
+				accountNumber:'18857775555',  //用户登录账号
+				password:'1111aaaa',	   //用户登录密码	
 				toestText:'',
 				telPhone:'',
 				loginType:'',		//跳转类型
@@ -86,9 +86,9 @@
 							this.$store.commit('updateStatus',response.data)
 							this.$api.navigateTo('/pages/login/apply-supplier')
 						})
+					}else{
+						this.$util.msg(response.msg,2000);
 					}
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000);
 				})
 			},
 			storeUpdataeStatus(data){

+ 0 - 2
pages/login/register-supplier.vue

@@ -299,7 +299,6 @@
 				organizationTypeText:'请选择公司类型',
 				supplierList:supplierList,//医疗类型
 				supplierMedicaCampList:supplierMedicaCampNullList,//主营内容
-				mentuzCampList:[],		//医美主营
 				typtIndex:0,
 				organizationType:0,
 				current:0,
@@ -569,7 +568,6 @@
 			addCustomItem(){//添加主营内容
 				let item = {value:`${this.supplierMedicaCampList.length+1}`,name:this.customItemValue,checked:true}
 				this.supplierMedicaCampList.push(item)
-				console.log(this.supplierMedicaCampList)
 			},
 			agreeCheck() {
 				this.isCheck = !this.isCheck