|
@@ -134,7 +134,7 @@
|
|
</view>
|
|
</view>
|
|
<view class="register-fiexd clearfix" :style="{ paddingBottom: isIphoneX ? '68rpx' : '36rpx' }">
|
|
<view class="register-fiexd clearfix" :style="{ paddingBottom: isIphoneX ? '68rpx' : '36rpx' }">
|
|
<view class="register-row">
|
|
<view class="register-row">
|
|
- <view class="register-btn sub" @click.stop="organizationUpdateInfo">确定</view>
|
|
|
|
|
|
+ <view class="register-btn sub" @click.stop="handleConfirm">确定</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 地址 -->
|
|
<!-- 地址 -->
|
|
@@ -201,32 +201,23 @@ export default {
|
|
}
|
|
}
|
|
],
|
|
],
|
|
params: {
|
|
params: {
|
|
- userId: '', // 用户ID
|
|
|
|
- clubId: '', // 会所ID
|
|
|
|
- bindMobile: '',
|
|
|
|
- isAgreed: 0,
|
|
|
|
- password: '',
|
|
|
|
- passWordConfirm: '',
|
|
|
|
- smsCode: '',
|
|
|
|
- avatarUrl: '',
|
|
|
|
- nickName: '',
|
|
|
|
- source: 1,
|
|
|
|
- unionId: '',
|
|
|
|
- linkMan: '',
|
|
|
|
- name: '',
|
|
|
|
|
|
+ name:'',
|
|
|
|
+ linkMan:'',
|
|
provinceId: '',
|
|
provinceId: '',
|
|
cityId: '',
|
|
cityId: '',
|
|
- townId: '',
|
|
|
|
|
|
+ townId:'',
|
|
address: '',
|
|
address: '',
|
|
- shopPhoto: '',
|
|
|
|
- businessLicense: '',
|
|
|
|
- medicalPracticeLicense: ''
|
|
|
|
|
|
+ organizeType:1, //外部商城机构类型 0内部机构 1外部机构
|
|
|
|
+ shopPhoto:'',
|
|
|
|
+ businessLicense:'',
|
|
|
|
+ medicalPracticeLicense:'',
|
|
},
|
|
},
|
|
- handleAddress: '请选择机构所在地区'
|
|
|
|
|
|
+ textareaFocus: false,
|
|
|
|
+ handleAddress:'请选择机构所在地区',
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
- this.organizationInfo()
|
|
|
|
|
|
+ this.updateModifyInfo()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
hanldNavigateBack() {
|
|
hanldNavigateBack() {
|
|
@@ -236,136 +227,76 @@ export default {
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- async organizationInfo() {
|
|
|
|
|
|
+ async updateModifyInfo() {
|
|
const resolve =await this.$api.getStorage()
|
|
const resolve =await this.$api.getStorage()
|
|
this.params.userId = resolve.userId ? resolve.userId : 0
|
|
this.params.userId = resolve.userId ? resolve.userId : 0
|
|
|
|
+ if(resolve.clubStatus === 92){
|
|
|
|
+ this.isUnderLogin = true
|
|
|
|
+ }
|
|
try{
|
|
try{
|
|
const res =await this.UserService.OrganizationUpdateModifyInfo({ userId: this.params.userId })
|
|
const res =await this.UserService.OrganizationUpdateModifyInfo({ userId: this.params.userId })
|
|
- console.log('res',res)
|
|
|
|
- this.handleInstallInfo(res.data)
|
|
|
|
|
|
+ let club = res.data.club
|
|
|
|
+ let user = res.data.user
|
|
|
|
+ this.params.clubId = user.clubId
|
|
|
|
+ this.handleAddress = club.provincialAddress ? club.provincialAddress : '请选择机构所在地区'
|
|
|
|
+ this.params.name = club.name
|
|
|
|
+ this.params.linkMan = club.linkMan
|
|
|
|
+ this.params.provinceId = club.provinceId
|
|
|
|
+ this.params.cityId = club.cityId
|
|
|
|
+ this.params.townId = club.townId
|
|
|
|
+ this.params.address = club.address
|
|
|
|
+ this.params.organizeType = club.organizeType
|
|
|
|
+ this.params.socialCreditCode = club.socialCreditCode
|
|
|
|
+ this.params.shopPhoto = club.shopPhoto
|
|
|
|
+ this.params.businessLicense = club.businessLicense
|
|
|
|
+ this.params.medicalPracticeLicense = club.medicalPracticeLicense
|
|
}catch(error){
|
|
}catch(error){
|
|
this.$util.msg(error.msg, 2000)
|
|
this.$util.msg(error.msg, 2000)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // 初始化机构资料
|
|
|
|
- handleInstallInfo(data){
|
|
|
|
- let organizationClub = data.club
|
|
|
|
- let organizationUser = data.user
|
|
|
|
- this.params.clubId = organizationUser.clubId
|
|
|
|
- this.params.clubId = organizationUser.clubId
|
|
|
|
- this.params.name = organizationClub.name ? organizationClub.name : ''
|
|
|
|
- this.params.linkMan = organizationClub.linkMan
|
|
|
|
- if (organizationClub.provinceId == null) {
|
|
|
|
- this.params.provinceId = ''
|
|
|
|
- } else {
|
|
|
|
- this.params.provinceId = organizationClub.provinceId
|
|
|
|
|
|
+ handleConfirm(){
|
|
|
|
+ // 提交审核
|
|
|
|
+ if (this.params.linkMan == '') {
|
|
|
|
+ this.$util.msg('请输入联系人名称', 2000)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (this.params.name == '') {
|
|
|
|
+ this.$util.msg('请输入机构名称', 2000)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (this.params.townId == '') {
|
|
|
|
+ this.$util.msg('请选择机构地址', 2000)
|
|
|
|
+ return
|
|
}
|
|
}
|
|
- if (organizationClub.cityId == null) {
|
|
|
|
- this.params.cityId = ''
|
|
|
|
- } else {
|
|
|
|
- this.params.cityId = organizationClub.cityId
|
|
|
|
|
|
+ if (this.params.addressDetail == '') {
|
|
|
|
+ this.$util.msg('请填写机构详细地址', 2000)
|
|
|
|
+ return
|
|
}
|
|
}
|
|
- if (organizationClub.townId == null) {
|
|
|
|
- this.params.townId = ''
|
|
|
|
- } else {
|
|
|
|
- this.params.townId = organizationClub.townId
|
|
|
|
|
|
+ if (this.params.businessLicense == '') {
|
|
|
|
+ this.$util.msg('请上传营业执照', 2000)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (this.params.shopPhoto == '') {
|
|
|
|
+ this.$util.msg('请上传门头照', 2000)
|
|
|
|
+ return
|
|
}
|
|
}
|
|
- this.handleAddress = organizationClub.provincialAddress
|
|
|
|
- ? organizationClub.provincialAddress
|
|
|
|
- : ''
|
|
|
|
- this.params.address = organizationClub.address ? organizationClub.address : ''
|
|
|
|
- this.params.socialCreditCode = this.$reg.checkData(organizationClub.socialCreditCode)
|
|
|
|
- this.params.businessLicense = this.$reg.checkData(organizationClub.businessLicense)
|
|
|
|
- this.params.medicalPracticeLicense = this.$reg.checkData(
|
|
|
|
- organizationClub.medicalPracticeLicense
|
|
|
|
- )
|
|
|
|
- this.params.shopPhoto = this.$reg.checkData(organizationClub.shopPhoto)
|
|
|
|
- console.log('params',this.params)
|
|
|
|
|
|
+ if (this.params.medicalPracticeLicense == '') {
|
|
|
|
+ this.$util.msg('请上传医疗执业许可证', 2000)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.clubUpdate(this.params)
|
|
},
|
|
},
|
|
- organizationUpdateInfo() {
|
|
|
|
- //提交审核
|
|
|
|
- let params = {}
|
|
|
|
- if (this.userIdentity === 4) {
|
|
|
|
- params = {
|
|
|
|
- userId: this.userId,
|
|
|
|
- clubId: this.clubId, //会所ID
|
|
|
|
- linkMan: this.linkMan,
|
|
|
|
- fax: this.clubFax,
|
|
|
|
- contractPhone: this.clubTelePhone,
|
|
|
|
- profile: this.profile
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- if (this.contractEmail == '') {
|
|
|
|
- this.$util.msg('请输入邮箱地址', 2000)
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (!this.$reg.isEmail(this.contractEmail)) {
|
|
|
|
- this.$util.msg('请输入正确的邮箱地址', 2000)
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (this.name == '') {
|
|
|
|
- this.$util.msg('请输入机构名称', 2000)
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (this.addressData.townId == '') {
|
|
|
|
- this.$util.msg('请选择机构地址', 2000)
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (this.addressData.addressDetail == '') {
|
|
|
|
- this.$util.msg('请填写机构详细地址', 2000)
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (this.businessLicense == '') {
|
|
|
|
- this.$util.msg('请上传您的营业执照', 2000)
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (this.firstClubType == 1) {
|
|
|
|
- if (this.medicalPracticeLicense == '') {
|
|
|
|
- this.$util.msg('请上传您的资质许可证', 2000)
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (this.firstClubType == 1 || this.firstClubType == 2) {
|
|
|
|
- if (this.mainProduct == '') {
|
|
|
|
- this.$util.msg('请选择住机构主营内容', 2000)
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- params = {
|
|
|
|
- userId: this.userId,
|
|
|
|
- clubId: this.clubId, //会所ID
|
|
|
|
- name: this.name,
|
|
|
|
- linkMan: this.linkMan,
|
|
|
|
- linkManIdentity: this.linkManIdentity,
|
|
|
|
- shortName: this.shortName,
|
|
|
|
- contractEmail: this.contractEmail,
|
|
|
|
- provinceId: this.addressData.provinceId,
|
|
|
|
- cityId: this.addressData.cityId,
|
|
|
|
- townId: this.addressData.townId,
|
|
|
|
- address: this.addressData.addressDetail,
|
|
|
|
- socialCreditCode: this.socialCreditCode,
|
|
|
|
- businessLicense: this.businessLicense,
|
|
|
|
- shopPhoto: this.shopPhoto,
|
|
|
|
- firstClubType: this.firstClubType, //机构类型分类 医美:0和生美:1
|
|
|
|
- secondClubType: this.secondClubType, //机构类型二级分类 诊所:1,门诊:2,医院:3
|
|
|
|
- department: this.department, //科室
|
|
|
|
- medicalPracticeLicense: this.medicalPracticeLicense, //资质图片
|
|
|
|
- mainProduct: this.mainProduct,
|
|
|
|
- fax: this.clubFax,
|
|
|
|
- contractPhone: this.clubTelePhone,
|
|
|
|
- profile: this.profile
|
|
|
|
- }
|
|
|
|
|
|
+ async clubUpdate(params) {
|
|
|
|
+ // 修改资料
|
|
|
|
+ try{
|
|
|
|
+ await this.UserService.updateOrganize(params)
|
|
|
|
+ this.$util.msg('保存成功', 2000)
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
+ this.$api.navigateBack(1)
|
|
|
|
+ },2000)
|
|
|
|
+ }catch(error){
|
|
|
|
+ this.$util.msg(error.msg, 2000)
|
|
}
|
|
}
|
|
- this.UserService.OrganizationUpdate(params)
|
|
|
|
- .then(response => {
|
|
|
|
- this.$util.msg('修改成功', 2000, true, 'success')
|
|
|
|
- setTimeout(() => {
|
|
|
|
- uni.navigateBack()
|
|
|
|
- }, 2000)
|
|
|
|
- })
|
|
|
|
- .catch(error => {
|
|
|
|
- this.$util.msg(error.msg, 2000)
|
|
|
|
- })
|
|
|
|
},
|
|
},
|
|
// 三级联动选择
|
|
// 三级联动选择
|
|
showMulLinkageThreePicker() {
|
|
showMulLinkageThreePicker() {
|
|
@@ -454,9 +385,6 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
- this.$api.getStorage().then(resolve => {
|
|
|
|
- this.userIdentity = resolve.userIdentity
|
|
|
|
- })
|
|
|
|
if (this.isPreviewImage) {
|
|
if (this.isPreviewImage) {
|
|
this.isPreviewImage = false
|
|
this.isPreviewImage = false
|
|
return
|
|
return
|