Merge branch 'master' of http://git.feashow.cn/odjbin/city-store-transfer
# Conflicts: # pages/publish/publishTransfer/publishTransfer.vue
This commit is contained in:
@@ -1,60 +1,62 @@
|
||||
<template>
|
||||
<view class="form">
|
||||
<u-form :model="form" ref="uForm">
|
||||
<u-form-item prop="image">
|
||||
<view class="upload">
|
||||
<u-upload max-count="5" upload-icon="photo"></u-upload>
|
||||
<text class="count">发布房源图片({{ShopInfomation.count}}/5)</text>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item label="标题" label-position="top" border-bottom="true" prop="title">
|
||||
<u-input v-model="form.title" placeholder="请输入标题以便吸引人的注意哦" placeholder-class="input-class"
|
||||
border="none"></u-input>
|
||||
<u-form-item label="标题" label-position="top" border-bottom="true" prop="title" label-width="auto">
|
||||
<u-input v-model="form.title" placeholder="请输入标题以便吸引人的注意哦" placeholder-class="input-class" border="none"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="区域" label-position="top" border-bottom="true" right-icon="arrow-right" prop="region">
|
||||
<text @click="show1 = true" class="checktext">请选择所属区域</text>
|
||||
<u-form-item label="区域" label-position="top" border-bottom="true" right-icon="arrow-right" prop="region" label-width="auto">
|
||||
<text @click="show1 = true" class="checkedtext" v-if="form.region.length>0">{{form.region}}</text>
|
||||
<text @click="show1 = true" class="checktext" v-else>请选择所属区域</text>
|
||||
|
||||
<view class="arrow-icon">
|
||||
<u-icon name="arrow-right" size="30px"></u-icon>
|
||||
<u-icon name="arrow-right" size="30px" @click="show1 = true"></u-icon>
|
||||
</view>
|
||||
<u-picker :columns="regionColumns" :show="show1" :closeOnClickOverlay="true" @close="show1 = false"
|
||||
v-model="form.region"></u-picker>
|
||||
v-model="form.region" @confirm="regionConfirm"></u-picker>
|
||||
</u-form-item>
|
||||
<u-form-item label="地址" label-position="top" border-bottom="true" prop="place">
|
||||
<u-form-item label="地址" label-position="top" border-bottom="true" prop="place" label-width="auto">
|
||||
<u-input v-model="form.place" placeholder="请输入店铺地址" placeholder-class="input-class" border="none"
|
||||
@change="changeAddress"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="行业" label-position="top" border-bottom="true" class="picker">
|
||||
<text @click="show2 = true" class="checktext">请选择行业类型</text>
|
||||
<u-form-item label="行业" label-position="top" border-bottom="true" class="picker" label-width="auto" prop="trade" >
|
||||
<text @click="show2 = true" class="checkedtext" v-if="form.trade.length>0">{{form.trade}}</text>
|
||||
<text @click="show2 = true" class="checktext" v-else>请选择店铺行业</text>
|
||||
<view class="arrow-icon">
|
||||
<u-icon name="arrow-right" size="30px"></u-icon>
|
||||
<u-icon name="arrow-right" size="30px" @click="show2 = true"></u-icon>
|
||||
</view>
|
||||
<u-picker mode="region" :show="show2" :closeOnClickOverlay="true" @close="show2 = false"
|
||||
v-model="form.trade"></u-picker>
|
||||
<u-picker mode="region" :show="show2" :closeOnClickOverlay="true" @close="show2 = false" :columns="[Classcolumns]"
|
||||
v-model="form.trade" @confirm="tradeConfirm"></u-picker>
|
||||
</u-form-item>
|
||||
<u-form-item label="业态" label-position="top" border-bottom="true">
|
||||
<text @click="show3 = true" class="checktext">请选择行业业态</text>
|
||||
<u-form-item label="业态" label-position="top" border-bottom="true" label-width="auto" prop="karma">
|
||||
<text @click="show3 = true" class="checkedtext" v-if="form.karma.length>0">{{form.karma}}</text>
|
||||
<text @click="show3 = true" class="checktext" v-else>请选择店铺业态</text>
|
||||
<view class="arrow-icon">
|
||||
<u-icon name="arrow-right" size="30px"></u-icon>
|
||||
<u-icon name="arrow-right" size="30px" @click="show3 = true"></u-icon>
|
||||
</view>
|
||||
<u-picker mode="region" :show="show3" :closeOnClickOverlay="true" @close="show3 = false"
|
||||
v-model="form.karma"></u-picker>
|
||||
<u-picker mode="region" :show="show3" :closeOnClickOverlay="true" @close="show3 = false" :columns="[Karmacolumns]"
|
||||
v-model="form.karma" @confirm="karmaConfirm"></u-picker>
|
||||
</u-form-item>
|
||||
<u-form-item label="面积" label-position="top" border-bottom="true" prop="size">
|
||||
<u-form-item label="面积" label-position="top" border-bottom="true" label-width="auto" prop="size">
|
||||
<u-input v-model="form.size" placeholder="请输入店铺面积" placeholder-class="input-class" border="none"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="租金(元/月)" label-position="top" border-bottom="true" label-width="100%" prop="rent">
|
||||
<u-form-item label="租金(元/月)" label-position="top" border-bottom="true" label-width="auto" prop="rent">
|
||||
<u-input v-model="form.rent" placeholder="请输入店铺租金" placeholder-class="input-class" border="none"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="转让费(万元)" label-position="top" border-bottom="true" label-width="100%" prop="sell">
|
||||
<u-form-item label="转让费(万元)" label-position="top" border-bottom="true" label-width="auto" prop="sell">
|
||||
<u-input v-model="form.sell" placeholder="请输入店铺转让费" placeholder-class="input-class" border="none"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="联系人" label-position="top" border-bottom="true" label-width="100%" prop="name">
|
||||
<u-form-item label="联系人" label-position="top" border-bottom="true" label-width="auto" prop="name">
|
||||
<u-input v-model="form.name" placeholder="请输入联系人姓名" placeholder-class="input-class" border="none"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="手机号码" label-position="top" border-bottom="true" label-width="100%" prop="call">
|
||||
<u-form-item label="手机号码" label-position="top" border-bottom="true" label-width="auto" prop="call">
|
||||
<u-input v-model="form.call" placeholder="请输入联系人手机号码" placeholder-class="input-class" border="none"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="详情介绍" label-position="top" border-bottom="true" label-width="100%" prop="introduce">
|
||||
<u-form-item label="详情介绍" label-position="top" border-bottom="true" label-width="auto" prop="introduce">
|
||||
<u-input v-model="form.introduce" placeholder="请输入介绍详情" placeholder-class="input-class" border="none"></u-input>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
@@ -90,25 +92,79 @@
|
||||
call: '',
|
||||
introduce: ''
|
||||
},
|
||||
columns: [
|
||||
|
||||
],
|
||||
Classcolumns: [],
|
||||
ClassCheckId:'',
|
||||
Karmacolumns: [],
|
||||
pid:[],
|
||||
show1: false,
|
||||
show2: false,
|
||||
show3: false,
|
||||
rules: {
|
||||
'title': [{
|
||||
type: 'string',
|
||||
require: true,
|
||||
required: true,
|
||||
message: '请输入标题',
|
||||
trigger: ['change', 'blur']
|
||||
}],
|
||||
'trade': [{
|
||||
required: true,
|
||||
message: '请选择行业',
|
||||
trigger: ['change', 'blur']
|
||||
}],
|
||||
'region': [{
|
||||
required: true,
|
||||
message: '请选择地区',
|
||||
trigger: ['change', 'blur']
|
||||
}],
|
||||
'karma': [{
|
||||
required: true,
|
||||
message: '请选择业态',
|
||||
trigger: ['change', 'blur']
|
||||
}],
|
||||
'name': [{
|
||||
required: true,
|
||||
message: '请输入姓名',
|
||||
trigger: ['change', 'blur']
|
||||
}],
|
||||
'sell': [{
|
||||
required: true,
|
||||
message: '请输入转让金',
|
||||
trigger: ['change', 'blur']
|
||||
}],
|
||||
'introduce': [{
|
||||
required: true,
|
||||
message: '请输入介绍',
|
||||
trigger: ['change', 'blur']
|
||||
}],
|
||||
'size': [{
|
||||
required: true,
|
||||
message: '请输入面积',
|
||||
trigger: ['change', 'blur']
|
||||
}],
|
||||
'rent': [{
|
||||
required: true,
|
||||
message: '请输入租金',
|
||||
trigger: ['change', 'blur']
|
||||
}],
|
||||
'place': [{
|
||||
type: 'string',
|
||||
require: true,
|
||||
required: true,
|
||||
message: '请输入地址',
|
||||
trigger: ['change', 'blur']
|
||||
}],
|
||||
'call':[{
|
||||
required: true,
|
||||
message: '请输入电话号码',
|
||||
},
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if(value) {
|
||||
return this.$u.test.mobile(value);
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
message: '号码不正确',
|
||||
trigger: ['change','blur'],
|
||||
}]
|
||||
|
||||
},
|
||||
}
|
||||
@@ -119,11 +175,6 @@
|
||||
url: '/pages/publish/chooseAddress/chooseAddress'
|
||||
})
|
||||
},
|
||||
confirmArea(e) {
|
||||
this.ShopInfomation.city = e.value[0]
|
||||
this.ShopInfomation.area = e.value[1]
|
||||
this.show1 = false
|
||||
},
|
||||
submit() {
|
||||
this.$refs.uForm.validate().then(res => {
|
||||
console.log("提交表单信息:" + JSON.stringify(this.form))
|
||||
@@ -135,8 +186,8 @@
|
||||
})
|
||||
},
|
||||
changeAddress(e) {
|
||||
console.log('changeAddress', e);
|
||||
// this.getAddressList(e)
|
||||
// console.log('changeAddress', e);
|
||||
this.getAddressList(e)
|
||||
},
|
||||
getAddressList(value) {
|
||||
var that = this
|
||||
@@ -153,9 +204,49 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
tradeConfirm(e){
|
||||
this.show2 = false
|
||||
this.form.trade = e.value[0]
|
||||
this.ClassCheckId = this.pid[e.indexs[0]]
|
||||
this.$api.getClassList(this.ClassCheckId).then(res => {
|
||||
// console.log(res);
|
||||
this.Karmacolumns = res.data.data.map((item) => {
|
||||
return item = item.name
|
||||
})
|
||||
})
|
||||
},
|
||||
karmaConfirm(e){
|
||||
this.show3 = false
|
||||
this.form.karma = e.value[0]
|
||||
},
|
||||
regionConfirm(e){
|
||||
this.show1 = false
|
||||
this.form.region = e.value[0]
|
||||
},
|
||||
},
|
||||
onReady() {
|
||||
this.$refs.uForm.setRules(this.rules)
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
this.$api.getClassList().then(res =>{
|
||||
// console.log(res.data.data.length);
|
||||
this.Classcolumns = res.data.data.map((item) => {
|
||||
return item = item.name
|
||||
})
|
||||
this.pid = res.data.data.map((item) => {
|
||||
return item = item.id
|
||||
})
|
||||
|
||||
})
|
||||
},
|
||||
computed:{
|
||||
isChecked(index){
|
||||
if(index.length > 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -203,7 +294,12 @@
|
||||
font-weight: 1px;
|
||||
color: #c1c4c7;
|
||||
}
|
||||
|
||||
.checkedtext{
|
||||
margin-top: 5rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 1px;
|
||||
border-style: none;
|
||||
}
|
||||
.picker {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
Reference in New Issue
Block a user