|
@@ -3,8 +3,7 @@
|
|
<view class="content-form">
|
|
<view class="content-form">
|
|
<view class="form-data">
|
|
<view class="form-data">
|
|
<u-form :model="form" ref="uForm" :label-width="140" :error-type="['toast']">
|
|
<u-form :model="form" ref="uForm" :label-width="140" :error-type="['toast']">
|
|
- <u-form-item prop="time" label="用户类型:" required>
|
|
|
|
- <!-- <view v-if="userDetailInfo">{{form.addressType}}</view> -->
|
|
|
|
|
|
+ <u-form-item prop="addressType" label="用户类型:" required>
|
|
<v-select ref="addressType" placeholder="请选择用户类型" @itemChange="chooseType" code="ORDER_ADDRESS_TYPE" style="width: 100%"></v-select>
|
|
<v-select ref="addressType" placeholder="请选择用户类型" @itemChange="chooseType" code="ORDER_ADDRESS_TYPE" style="width: 100%"></v-select>
|
|
</u-form-item>
|
|
</u-form-item>
|
|
<u-form-item prop="contactName" label="用户名称:" required>
|
|
<u-form-item prop="contactName" label="用户名称:" required>
|
|
@@ -83,7 +82,7 @@
|
|
},
|
|
},
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
console.log(option,option.id,'ppppppppp')
|
|
console.log(option,option.id,'ppppppppp')
|
|
- this.userDetailInfo={}
|
|
|
|
|
|
+ // this.userDetailInfo={}
|
|
this.getDetailData()
|
|
this.getDetailData()
|
|
// 查看
|
|
// 查看
|
|
// if(option && option.id){
|
|
// if(option && option.id){
|
|
@@ -104,8 +103,10 @@
|
|
getDetailData(){
|
|
getDetailData(){
|
|
userDetail().then(res=>{
|
|
userDetail().then(res=>{
|
|
if(res.status==200){
|
|
if(res.status==200){
|
|
|
|
+ this.$u.vuex('vuex_userInfoData',res.data)
|
|
this.userDetailInfo=res.data
|
|
this.userDetailInfo=res.data
|
|
this.$refs.addressType.setVal(res.data.addressType)
|
|
this.$refs.addressType.setVal(res.data.addressType)
|
|
|
|
+ this.form.addressType=res.data.addressType
|
|
this.form.contactMobile=res.data.contactMobile
|
|
this.form.contactMobile=res.data.contactMobile
|
|
this.form.contactName=res.data.contactName
|
|
this.form.contactName=res.data.contactName
|
|
this.form.contactAddress=res.data.contactAddress
|
|
this.form.contactAddress=res.data.contactAddress
|
|
@@ -113,8 +114,7 @@
|
|
this.imageHeader=res.data.imageHeader
|
|
this.imageHeader=res.data.imageHeader
|
|
this.form.lat=res.data.latitude
|
|
this.form.lat=res.data.latitude
|
|
this.form.lng=res.data.longitude
|
|
this.form.lng=res.data.longitude
|
|
-
|
|
|
|
- console.log(res)
|
|
|
|
|
|
+ console.log(res,'------------------------res')
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -201,6 +201,7 @@
|
|
},
|
|
},
|
|
// 提交
|
|
// 提交
|
|
submit(){
|
|
submit(){
|
|
|
|
+ console.log(this.form.addressType,'-------------this.form.addressType')
|
|
this.$refs.uForm.validate(valid => {
|
|
this.$refs.uForm.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
console.log('验证通过');
|
|
console.log('验证通过');
|
|
@@ -211,6 +212,7 @@
|
|
})
|
|
})
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
|
|
+
|
|
const testVal=/^1[34578]\d{9}$/
|
|
const testVal=/^1[34578]\d{9}$/
|
|
if (!testVal.test(this.form.contactMobile)) {
|
|
if (!testVal.test(this.form.contactMobile)) {
|
|
uni.showToast({
|
|
uni.showToast({
|