更新了信息更新
This commit is contained in:
parent
cf73e016e3
commit
229fa86c07
@ -1,163 +1,176 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<view class="title">寿宴</view>
|
<view class="title">寿宴</view>
|
||||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||||
<u-form-item labelWidth="auto" label="时间" required prop="cultivated_area" borderBottom>
|
<u-form-item labelWidth="auto" label="时间" required prop="cultivated_area" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面面积"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入门面面积"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="地点" required prop="cultivated_area" borderBottom>
|
<u-form-item labelWidth="auto" label="地点" required prop="cultivated_area" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="人数" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" label="人数" required prop="notes" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="请包办" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" label="请包办" required prop="notes" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无歌舞表演" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无歌舞表演" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无交通工具" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无交通工具" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无住宿" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无住宿" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</u--form>
|
</u--form>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
||||||
formData: {
|
formData: {
|
||||||
shop_front: '', //有无门面
|
shop_front: '', //有无门面
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.initRules()
|
this.initRules()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 初始化校验
|
// 初始化校验
|
||||||
initRules() {
|
initRules() {
|
||||||
let arr = Object.keys(this.formData);
|
let arr = Object.keys(this.formData);
|
||||||
arr.forEach(key => {
|
arr.forEach(key => {
|
||||||
this.rules[key] = {
|
this.rules[key] = {
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
this.$refs.breedingForm.clearValidate(rule.field);
|
this.$refs.breedingForm.clearValidate(rule.field);
|
||||||
value.trim() !== '' ? callback() : callback('不能为空');
|
value.trim() !== '' ? callback() : callback('不能为空');
|
||||||
},
|
},
|
||||||
trigger: ['change', 'blur']
|
trigger: ['change', 'blur']
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 校验
|
// 校验
|
||||||
async validate() {
|
async validate() {
|
||||||
return await this.$refs.breedingForm.validate();;
|
return await this.$refs.breedingForm.validate();;
|
||||||
},
|
},
|
||||||
// 选择土地规划
|
// 选择土地规划
|
||||||
changeLanPlan(e) {
|
changeLanPlan(e) {
|
||||||
let index = e.currentTarget.dataset.index;
|
let index = e.currentTarget.dataset.index;
|
||||||
this.formData.planning = e.detail.value;
|
this.formData.planning = e.detail.value;
|
||||||
},
|
},
|
||||||
// 选择时间
|
// 选择时间
|
||||||
changeDate(e) {
|
changeDate(e) {
|
||||||
let data = e.currentTarget.dataset;
|
let data = e.currentTarget.dataset;
|
||||||
this.formData[data.value] = e.detail.value;
|
this.formData[data.value] = e.detail.value;
|
||||||
},
|
},
|
||||||
// 新增开设店铺
|
// 新增开设店铺
|
||||||
pushBreedingList() {
|
pushBreedingList() {
|
||||||
this.formData.push({})
|
this.formData.push({})
|
||||||
},
|
},
|
||||||
// 删除开设店铺
|
// 删除开设店铺
|
||||||
removeBreedingList(index) {
|
removeBreedingList(index) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
confirmColor: '#f56c6c',
|
confirmColor: '#f56c6c',
|
||||||
content: '确定删除吗?',
|
content: '确定删除吗?',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
this.formData.splice(index, 1);
|
this.formData.splice(index, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.card{
|
.card {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin: 28rpx;
|
margin: 28rpx;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
border-radius: 14rpx;
|
margin-top: 0;
|
||||||
}
|
padding-top: 0;
|
||||||
.title {
|
border-radius: 0 0 14rpx 14rpx;
|
||||||
font-weight: 500;
|
}
|
||||||
font-size: 34rpx;
|
|
||||||
|
.tit {
|
||||||
&::before {
|
margin: 28rpx 28rpx 0 28rpx;
|
||||||
width: 8rpx;
|
padding: 28rpx 28rpx 0 28rpx;
|
||||||
height: 26rpx;
|
border-radius: 14rpx 14rpx 0 0;
|
||||||
border-radius: 4rpx;
|
background-color: $theme-oa-color;
|
||||||
background-color: #0122c7;
|
color: white;
|
||||||
content: "";
|
height: 100rpx;
|
||||||
display: inline-block;
|
display: flex;
|
||||||
margin-right: 8rpx;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
}
|
.title {
|
||||||
|
font-weight: 500;
|
||||||
.delete {
|
font-size: 34rpx;
|
||||||
margin: 22rpx 0;
|
|
||||||
// margin-bottom: 40rpx;
|
&::before {
|
||||||
width: 100%;
|
width: 8rpx;
|
||||||
height: 64rpx;
|
height: 26rpx;
|
||||||
line-height: 64rpx;
|
border-radius: 4rpx;
|
||||||
background: #f56c6c;
|
background-color: #0122c7;
|
||||||
border-radius: 14rpx;
|
content: "";
|
||||||
font-size: 28rpx;
|
display: inline-block;
|
||||||
color: #fff;
|
margin-right: 8rpx;
|
||||||
text-align: center;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.plus {
|
.delete {
|
||||||
margin: 22rpx 0;
|
margin: 22rpx 0;
|
||||||
// margin-bottom: 40rpx;
|
// margin-bottom: 40rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
line-height: 64rpx;
|
line-height: 64rpx;
|
||||||
background: $theme-oa-color;
|
background: #f56c6c;
|
||||||
border-radius: 14rpx;
|
border-radius: 14rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.plus {
|
||||||
|
margin: 22rpx 0;
|
||||||
|
// margin-bottom: 40rpx;
|
||||||
|
width: 100%;
|
||||||
|
height: 64rpx;
|
||||||
|
line-height: 64rpx;
|
||||||
|
background: $theme-oa-color;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -1,163 +1,176 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<view class="title">满月酒</view>
|
<view class="title">满月酒</view>
|
||||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||||
<u-form-item labelWidth="auto" label="时间" required prop="cultivated_area" borderBottom>
|
<u-form-item labelWidth="auto" label="时间" required prop="cultivated_area" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面面积"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入门面面积"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="地点" required prop="cultivated_area" borderBottom>
|
<u-form-item labelWidth="auto" label="地点" required prop="cultivated_area" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="人数" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" label="人数" required prop="notes" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="请包办" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" label="请包办" required prop="notes" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无歌舞表演" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无歌舞表演" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无交通工具" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无交通工具" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无住宿" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无住宿" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</u--form>
|
</u--form>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
||||||
formData: {
|
formData: {
|
||||||
shop_front: '', //有无门面
|
shop_front: '', //有无门面
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.initRules()
|
this.initRules()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 初始化校验
|
// 初始化校验
|
||||||
initRules() {
|
initRules() {
|
||||||
let arr = Object.keys(this.formData);
|
let arr = Object.keys(this.formData);
|
||||||
arr.forEach(key => {
|
arr.forEach(key => {
|
||||||
this.rules[key] = {
|
this.rules[key] = {
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
this.$refs.breedingForm.clearValidate(rule.field);
|
this.$refs.breedingForm.clearValidate(rule.field);
|
||||||
value.trim() !== '' ? callback() : callback('不能为空');
|
value.trim() !== '' ? callback() : callback('不能为空');
|
||||||
},
|
},
|
||||||
trigger: ['change', 'blur']
|
trigger: ['change', 'blur']
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 校验
|
// 校验
|
||||||
async validate() {
|
async validate() {
|
||||||
return await this.$refs.breedingForm.validate();;
|
return await this.$refs.breedingForm.validate();;
|
||||||
},
|
},
|
||||||
// 选择土地规划
|
// 选择土地规划
|
||||||
changeLanPlan(e) {
|
changeLanPlan(e) {
|
||||||
let index = e.currentTarget.dataset.index;
|
let index = e.currentTarget.dataset.index;
|
||||||
this.formData.planning = e.detail.value;
|
this.formData.planning = e.detail.value;
|
||||||
},
|
},
|
||||||
// 选择时间
|
// 选择时间
|
||||||
changeDate(e) {
|
changeDate(e) {
|
||||||
let data = e.currentTarget.dataset;
|
let data = e.currentTarget.dataset;
|
||||||
this.formData[data.value] = e.detail.value;
|
this.formData[data.value] = e.detail.value;
|
||||||
},
|
},
|
||||||
// 新增开设店铺
|
// 新增开设店铺
|
||||||
pushBreedingList() {
|
pushBreedingList() {
|
||||||
this.formData.push({})
|
this.formData.push({})
|
||||||
},
|
},
|
||||||
// 删除开设店铺
|
// 删除开设店铺
|
||||||
removeBreedingList(index) {
|
removeBreedingList(index) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
confirmColor: '#f56c6c',
|
confirmColor: '#f56c6c',
|
||||||
content: '确定删除吗?',
|
content: '确定删除吗?',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
this.formData.splice(index, 1);
|
this.formData.splice(index, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.card{
|
.card {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin: 28rpx;
|
margin: 28rpx;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
border-radius: 14rpx;
|
margin-top: 0;
|
||||||
}
|
padding-top: 0;
|
||||||
.title {
|
border-radius: 0 0 14rpx 14rpx;
|
||||||
font-weight: 500;
|
}
|
||||||
font-size: 34rpx;
|
|
||||||
|
.tit {
|
||||||
&::before {
|
margin: 28rpx 28rpx 0 28rpx;
|
||||||
width: 8rpx;
|
padding: 28rpx 28rpx 0 28rpx;
|
||||||
height: 26rpx;
|
border-radius: 14rpx 14rpx 0 0;
|
||||||
border-radius: 4rpx;
|
background-color: $theme-oa-color;
|
||||||
background-color: #0122c7;
|
color: white;
|
||||||
content: "";
|
height: 100rpx;
|
||||||
display: inline-block;
|
display: flex;
|
||||||
margin-right: 8rpx;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
}
|
.title {
|
||||||
|
font-weight: 500;
|
||||||
.delete {
|
font-size: 34rpx;
|
||||||
margin: 22rpx 0;
|
|
||||||
// margin-bottom: 40rpx;
|
&::before {
|
||||||
width: 100%;
|
width: 8rpx;
|
||||||
height: 64rpx;
|
height: 26rpx;
|
||||||
line-height: 64rpx;
|
border-radius: 4rpx;
|
||||||
background: #f56c6c;
|
background-color: #0122c7;
|
||||||
border-radius: 14rpx;
|
content: "";
|
||||||
font-size: 28rpx;
|
display: inline-block;
|
||||||
color: #fff;
|
margin-right: 8rpx;
|
||||||
text-align: center;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.plus {
|
.delete {
|
||||||
margin: 22rpx 0;
|
margin: 22rpx 0;
|
||||||
// margin-bottom: 40rpx;
|
// margin-bottom: 40rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
line-height: 64rpx;
|
line-height: 64rpx;
|
||||||
background: $theme-oa-color;
|
background: #f56c6c;
|
||||||
border-radius: 14rpx;
|
border-radius: 14rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.plus {
|
||||||
|
margin: 22rpx 0;
|
||||||
|
// margin-bottom: 40rpx;
|
||||||
|
width: 100%;
|
||||||
|
height: 64rpx;
|
||||||
|
line-height: 64rpx;
|
||||||
|
background: $theme-oa-color;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -1,176 +1,189 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<view class="title">白事</view>
|
<view class="title">白事</view>
|
||||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||||
<u-form-item labelWidth="auto" label="地点" required prop="cultivated_area" borderBottom>
|
<u-form-item labelWidth="auto" label="地点" required prop="cultivated_area" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="人数" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" label="人数" required prop="notes" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="请包办" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" label="请包办" required prop="notes" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无歌舞表演" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无歌舞表演" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无主持仪式" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无主持仪式" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无交通工具" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无交通工具" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无住宿" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无住宿" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无墓地" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无墓地" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</u--form>
|
</u--form>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
||||||
formData: {
|
formData: {
|
||||||
shop_front: '', //有无门面
|
shop_front: '', //有无门面
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.initRules()
|
this.initRules()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 初始化校验
|
// 初始化校验
|
||||||
initRules() {
|
initRules() {
|
||||||
let arr = Object.keys(this.formData);
|
let arr = Object.keys(this.formData);
|
||||||
arr.forEach(key => {
|
arr.forEach(key => {
|
||||||
this.rules[key] = {
|
this.rules[key] = {
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
this.$refs.breedingForm.clearValidate(rule.field);
|
this.$refs.breedingForm.clearValidate(rule.field);
|
||||||
value.trim() !== '' ? callback() : callback('不能为空');
|
value.trim() !== '' ? callback() : callback('不能为空');
|
||||||
},
|
},
|
||||||
trigger: ['change', 'blur']
|
trigger: ['change', 'blur']
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 校验
|
// 校验
|
||||||
async validate() {
|
async validate() {
|
||||||
return await this.$refs.breedingForm.validate();;
|
return await this.$refs.breedingForm.validate();;
|
||||||
},
|
},
|
||||||
// 选择土地规划
|
// 选择土地规划
|
||||||
changeLanPlan(e) {
|
changeLanPlan(e) {
|
||||||
let index = e.currentTarget.dataset.index;
|
let index = e.currentTarget.dataset.index;
|
||||||
this.formData.planning = e.detail.value;
|
this.formData.planning = e.detail.value;
|
||||||
},
|
},
|
||||||
// 选择时间
|
// 选择时间
|
||||||
changeDate(e) {
|
changeDate(e) {
|
||||||
let data = e.currentTarget.dataset;
|
let data = e.currentTarget.dataset;
|
||||||
this.formData[data.value] = e.detail.value;
|
this.formData[data.value] = e.detail.value;
|
||||||
},
|
},
|
||||||
// 新增开设店铺
|
// 新增开设店铺
|
||||||
pushBreedingList() {
|
pushBreedingList() {
|
||||||
this.formData.push({})
|
this.formData.push({})
|
||||||
},
|
},
|
||||||
// 删除开设店铺
|
// 删除开设店铺
|
||||||
removeBreedingList(index) {
|
removeBreedingList(index) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
confirmColor: '#f56c6c',
|
confirmColor: '#f56c6c',
|
||||||
content: '确定删除吗?',
|
content: '确定删除吗?',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
this.formData.splice(index, 1);
|
this.formData.splice(index, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.card{
|
.card {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin: 28rpx;
|
margin: 28rpx;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
border-radius: 14rpx;
|
margin-top: 0;
|
||||||
}
|
padding-top: 0;
|
||||||
.title {
|
border-radius: 0 0 14rpx 14rpx;
|
||||||
font-weight: 500;
|
}
|
||||||
font-size: 34rpx;
|
|
||||||
|
.tit {
|
||||||
&::before {
|
margin: 28rpx 28rpx 0 28rpx;
|
||||||
width: 8rpx;
|
padding: 28rpx 28rpx 0 28rpx;
|
||||||
height: 26rpx;
|
border-radius: 14rpx 14rpx 0 0;
|
||||||
border-radius: 4rpx;
|
background-color: $theme-oa-color;
|
||||||
background-color: #0122c7;
|
color: white;
|
||||||
content: "";
|
height: 100rpx;
|
||||||
display: inline-block;
|
display: flex;
|
||||||
margin-right: 8rpx;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
}
|
.title {
|
||||||
|
font-weight: 500;
|
||||||
.delete {
|
font-size: 34rpx;
|
||||||
margin: 22rpx 0;
|
|
||||||
// margin-bottom: 40rpx;
|
&::before {
|
||||||
width: 100%;
|
width: 8rpx;
|
||||||
height: 64rpx;
|
height: 26rpx;
|
||||||
line-height: 64rpx;
|
border-radius: 4rpx;
|
||||||
background: #f56c6c;
|
background-color: #0122c7;
|
||||||
border-radius: 14rpx;
|
content: "";
|
||||||
font-size: 28rpx;
|
display: inline-block;
|
||||||
color: #fff;
|
margin-right: 8rpx;
|
||||||
text-align: center;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.plus {
|
.delete {
|
||||||
margin: 22rpx 0;
|
margin: 22rpx 0;
|
||||||
// margin-bottom: 40rpx;
|
// margin-bottom: 40rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
line-height: 64rpx;
|
line-height: 64rpx;
|
||||||
background: $theme-oa-color;
|
background: #f56c6c;
|
||||||
border-radius: 14rpx;
|
border-radius: 14rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.plus {
|
||||||
|
margin: 22rpx 0;
|
||||||
|
// margin-bottom: 40rpx;
|
||||||
|
width: 100%;
|
||||||
|
height: 64rpx;
|
||||||
|
line-height: 64rpx;
|
||||||
|
background: $theme-oa-color;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -1,171 +1,184 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<view class="title">婚宴</view>
|
<view class="title">婚宴</view>
|
||||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||||
<u-form-item labelWidth="auto" label="时间" required prop="cultivated_area" borderBottom>
|
<u-form-item labelWidth="auto" label="时间" required prop="cultivated_area" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面面积"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入门面面积"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="地点" required prop="cultivated_area" borderBottom>
|
<u-form-item labelWidth="auto" label="地点" required prop="cultivated_area" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="人数" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" label="人数" required prop="notes" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="请包办" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" label="请包办" required prop="notes" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无歌舞表演" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无歌舞表演" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无主持仪式" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无主持仪式" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无交通工具" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无交通工具" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无住宿" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无住宿" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</u--form>
|
</u--form>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
||||||
formData: {
|
formData: {
|
||||||
shop_front: '', //有无门面
|
shop_front: '', //有无门面
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.initRules()
|
this.initRules()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 初始化校验
|
// 初始化校验
|
||||||
initRules() {
|
initRules() {
|
||||||
let arr = Object.keys(this.formData);
|
let arr = Object.keys(this.formData);
|
||||||
arr.forEach(key => {
|
arr.forEach(key => {
|
||||||
this.rules[key] = {
|
this.rules[key] = {
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
this.$refs.breedingForm.clearValidate(rule.field);
|
this.$refs.breedingForm.clearValidate(rule.field);
|
||||||
value.trim() !== '' ? callback() : callback('不能为空');
|
value.trim() !== '' ? callback() : callback('不能为空');
|
||||||
},
|
},
|
||||||
trigger: ['change', 'blur']
|
trigger: ['change', 'blur']
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 校验
|
// 校验
|
||||||
async validate() {
|
async validate() {
|
||||||
return await this.$refs.breedingForm.validate();;
|
return await this.$refs.breedingForm.validate();;
|
||||||
},
|
},
|
||||||
// 选择土地规划
|
// 选择土地规划
|
||||||
changeLanPlan(e) {
|
changeLanPlan(e) {
|
||||||
let index = e.currentTarget.dataset.index;
|
let index = e.currentTarget.dataset.index;
|
||||||
this.formData.planning = e.detail.value;
|
this.formData.planning = e.detail.value;
|
||||||
},
|
},
|
||||||
// 选择时间
|
// 选择时间
|
||||||
changeDate(e) {
|
changeDate(e) {
|
||||||
let data = e.currentTarget.dataset;
|
let data = e.currentTarget.dataset;
|
||||||
this.formData[data.value] = e.detail.value;
|
this.formData[data.value] = e.detail.value;
|
||||||
},
|
},
|
||||||
// 新增开设店铺
|
// 新增开设店铺
|
||||||
pushBreedingList() {
|
pushBreedingList() {
|
||||||
this.formData.push({})
|
this.formData.push({})
|
||||||
},
|
},
|
||||||
// 删除开设店铺
|
// 删除开设店铺
|
||||||
removeBreedingList(index) {
|
removeBreedingList(index) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
confirmColor: '#f56c6c',
|
confirmColor: '#f56c6c',
|
||||||
content: '确定删除吗?',
|
content: '确定删除吗?',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
this.formData.splice(index, 1);
|
this.formData.splice(index, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.card{
|
.card {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin: 28rpx;
|
margin: 28rpx;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
border-radius: 14rpx;
|
margin-top: 0;
|
||||||
}
|
padding-top: 0;
|
||||||
.title {
|
border-radius: 0 0 14rpx 14rpx;
|
||||||
font-weight: 500;
|
}
|
||||||
font-size: 34rpx;
|
|
||||||
|
.tit {
|
||||||
&::before {
|
margin: 28rpx 28rpx 0 28rpx;
|
||||||
width: 8rpx;
|
padding: 28rpx 28rpx 0 28rpx;
|
||||||
height: 26rpx;
|
border-radius: 14rpx 14rpx 0 0;
|
||||||
border-radius: 4rpx;
|
background-color: $theme-oa-color;
|
||||||
background-color: #0122c7;
|
color: white;
|
||||||
content: "";
|
height: 100rpx;
|
||||||
display: inline-block;
|
display: flex;
|
||||||
margin-right: 8rpx;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
}
|
.title {
|
||||||
|
font-weight: 500;
|
||||||
.delete {
|
font-size: 34rpx;
|
||||||
margin: 22rpx 0;
|
|
||||||
// margin-bottom: 40rpx;
|
&::before {
|
||||||
width: 100%;
|
width: 8rpx;
|
||||||
height: 64rpx;
|
height: 26rpx;
|
||||||
line-height: 64rpx;
|
border-radius: 4rpx;
|
||||||
background: #f56c6c;
|
background-color: #0122c7;
|
||||||
border-radius: 14rpx;
|
content: "";
|
||||||
font-size: 28rpx;
|
display: inline-block;
|
||||||
color: #fff;
|
margin-right: 8rpx;
|
||||||
text-align: center;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.plus {
|
.delete {
|
||||||
margin: 22rpx 0;
|
margin: 22rpx 0;
|
||||||
// margin-bottom: 40rpx;
|
// margin-bottom: 40rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
line-height: 64rpx;
|
line-height: 64rpx;
|
||||||
background: $theme-oa-color;
|
background: #f56c6c;
|
||||||
border-radius: 14rpx;
|
border-radius: 14rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.plus {
|
||||||
|
margin: 22rpx 0;
|
||||||
|
// margin-bottom: 40rpx;
|
||||||
|
width: 100%;
|
||||||
|
height: 64rpx;
|
||||||
|
line-height: 64rpx;
|
||||||
|
background: $theme-oa-color;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -117,11 +117,24 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.card{
|
.card {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin: 28rpx;
|
margin: 28rpx;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
border-radius: 14rpx;
|
margin-top: 0;
|
||||||
|
padding-top: 0;
|
||||||
|
border-radius: 0 0 14rpx 14rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tit {
|
||||||
|
margin: 28rpx 28rpx 0 28rpx;
|
||||||
|
padding: 28rpx 28rpx 0 28rpx;
|
||||||
|
border-radius: 14rpx 14rpx 0 0;
|
||||||
|
background-color: $theme-oa-color;
|
||||||
|
color: white;
|
||||||
|
height: 100rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.title {
|
.title {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
@ -1,333 +1,323 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="tit">
|
<view class="tit">
|
||||||
<text v-if="readonly">更新时间: {{update_time}}</text>
|
<text v-if="readonly">更新时间: {{update_time}}</text>
|
||||||
<text>养殖信息</text>
|
<text>养殖信息</text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="card">
|
<view class="card">
|
||||||
|
|
||||||
|
|
||||||
<!-- <view class="title">养殖信息</view> -->
|
<!-- <view class="title">养殖信息</view> -->
|
||||||
|
|
||||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||||
<u-form-item labelWidth="auto" label="有无养殖培训" required prop="breeding_training" borderBottom>
|
<u-form-item labelWidth="auto" label="有无养殖培训" required prop="breeding_training" borderBottom>
|
||||||
<u-radio-group :disabled="readonly" v-model="formData.breeding_training" style="margin: 16rpx;">
|
<u-radio-group :disabled="readonly" v-model="formData.breeding_training" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:label="item.label" :name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无注册成立养殖公司" required prop="breeding_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无注册成立养殖公司" required prop="breeding_company" borderBottom>
|
||||||
<u-radio-group :disabled="readonly" v-model="formData.breeding_company" style="margin: 16rpx;">
|
<u-radio-group :disabled="readonly" v-model="formData.breeding_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:label="item.label" :name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" labelPosition="top" label="备注" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" labelPosition="top" label="备注" required prop="notes" borderBottom>
|
||||||
<u--textarea :disabled="readonly" v-model="formData.notes" autoHeight placeholder="请输入备注"
|
<u--textarea :disabled="readonly" v-model="formData.notes" autoHeight placeholder="请输入备注" border="surround"
|
||||||
border="surround" count></u--textarea>
|
count></u--textarea>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="养殖类型" required prop="breeding_type" borderBottom>
|
<u-form-item labelWidth="auto" label="养殖类型" required prop="breeding_type" borderBottom>
|
||||||
<u--input :readonly="readonly" v-model="formData.breeding_type" placeholder="请输入养殖类型"></u--input>
|
<u--input :readonly="readonly" v-model="formData.breeding_type" placeholder="请输入养殖类型"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'breeding_time'">
|
<picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'breeding_time'">
|
||||||
<u-form-item labelWidth="auto" label="养殖开始时间" required prop="breeding_time" borderBottom>
|
<u-form-item labelWidth="auto" label="养殖开始时间" required prop="breeding_time" borderBottom>
|
||||||
<u--input :value="formData.breeding_time" placeholder="请选择养殖开始时间" disabled
|
<u--input :value="formData.breeding_time" placeholder="请选择养殖开始时间" disabled disabledColor="#fff"></u--input>
|
||||||
disabledColor="#fff"></u--input>
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
</u-form-item>
|
||||||
</u-form-item>
|
</picker>
|
||||||
</picker>
|
<picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'mature_time'">
|
||||||
<picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'mature_time'">
|
<u-form-item labelWidth="auto" label="上市时间" required prop="mature_time" borderBottom>
|
||||||
<u-form-item labelWidth="auto" label="上市时间" required prop="mature_time" borderBottom>
|
<u--input :value="formData.mature_time" placeholder="请选择上市时间" disabled disabledColor="#fff"></u--input>
|
||||||
<u--input :value="formData.mature_time" placeholder="请选择上市时间" disabled
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
disabledColor="#fff"></u--input>
|
</u-form-item>
|
||||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
</picker>
|
||||||
</u-form-item>
|
<u-form-item labelWidth="auto" label="产量(斤)" required prop="yield" borderBottom>
|
||||||
</picker>
|
<u--input :readonly="readonly" v-model="formData.yield" placeholder="请输入产量(斤)" type="number"></u--input>
|
||||||
<u-form-item labelWidth="auto" label="产量(斤)" required prop="yield" borderBottom>
|
</u-form-item>
|
||||||
<u--input :readonly="readonly" v-model="formData.yield" placeholder="请输入产量(斤)" type="number"></u--input>
|
<u-form-item labelWidth="auto" label="预计收益(元)" required prop="estimated_income" borderBottom>
|
||||||
</u-form-item>
|
<u--input :readonly="readonly" v-model="formData.estimated_income" placeholder="请输入预计收益(元)"
|
||||||
<u-form-item labelWidth="auto" label="预计收益(元)" required prop="estimated_income" borderBottom>
|
type="number"></u--input>
|
||||||
<u--input :readonly="readonly" v-model="formData.estimated_income" placeholder="请输入预计收益(元)" type="number"></u--input>
|
</u-form-item>
|
||||||
</u-form-item>
|
<u-form-item labelWidth="auto" labelPosition="top" label="农资农具使用情况" required prop="farm_tools" borderBottom>
|
||||||
<u-form-item labelWidth="auto" labelPosition="top" label="农资农具使用情况" required prop="farm_tools"
|
<u--textarea :disabled="readonly" v-model="formData.farm_tools" autoHeight placeholder="请输入农资农具使用情况"
|
||||||
borderBottom>
|
border="surround" count></u--textarea>
|
||||||
<u--textarea :disabled="readonly" v-model="formData.farm_tools" autoHeight placeholder="请输入农资农具使用情况"
|
</u-form-item>
|
||||||
border="surround" count></u--textarea>
|
<u-form-item labelWidth="auto" label="是否生态养殖" required prop="ecological_farming" borderBottom>
|
||||||
</u-form-item>
|
<u-radio-group :disabled="readonly" v-model="formData.ecological_farming" style="margin: 16rpx;">
|
||||||
<u-form-item labelWidth="auto" label="是否生态养殖" required prop="ecological_farming" borderBottom>
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
<u-radio-group :disabled="readonly" v-model="formData.ecological_farming" style="margin: 16rpx;">
|
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
:name="item.value">
|
||||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index"
|
</u-radio>
|
||||||
:label="item.label" :name="item.value">
|
</u-radio-group>
|
||||||
</u-radio>
|
</u-form-item>
|
||||||
</u-radio-group>
|
<u-form-item labelWidth="auto" label="现代化程度(%)" required prop="modernization" borderBottom>
|
||||||
</u-form-item>
|
<u--input :readonly="readonly" v-model="formData.modernization" placeholder="请输入现代化程度(%)" type="number"
|
||||||
<u-form-item labelWidth="auto" label="现代化程度(%)" required prop="modernization" borderBottom>
|
maxlength="3"></u--input>
|
||||||
<u--input :readonly="readonly" v-model="formData.modernization" placeholder="请输入现代化程度(%)" type="number" maxlength="3"></u--input>
|
</u-form-item>
|
||||||
</u-form-item>
|
<u-form-item labelWidth="auto" label="预售卖价格(元/500g)" required prop="pre_price" borderBottom>
|
||||||
<u-form-item labelWidth="auto" label="预售卖价格(元/500g)" required prop="pre_price" borderBottom>
|
<u--input :readonly="readonly" v-model="formData.pre_price" placeholder="请输入预售卖价格"></u--input>
|
||||||
<u--input :readonly="readonly" v-model="formData.pre_price" placeholder="请输入预售卖价格"></u--input>
|
</u-form-item>
|
||||||
</u-form-item>
|
<u-form-item labelWidth="auto" label="销售方式" required prop="method_sales" borderBottom>
|
||||||
<u-form-item labelWidth="auto" label="销售方式" required prop="method_sales" borderBottom>
|
<u-radio-group :disabled="readonly" v-model="formData.method_sales" style="margin: 16rpx;">
|
||||||
<u-radio-group :disabled="readonly" v-model="formData.method_sales" style="margin: 16rpx;">
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
v-for="(item, index) in [{value:1,label:'自销'},{value:0,label:'定点销售'}]" :key="index" :label="item.label"
|
||||||
v-for="(item, index) in [{value:1,label:'自销'},{value:0,label:'定点销售'}]" :key="index"
|
:name="item.value">
|
||||||
:label="item.label" :name="item.value">
|
</u-radio>
|
||||||
</u-radio>
|
</u-radio-group>
|
||||||
</u-radio-group>
|
</u-form-item>
|
||||||
</u-form-item>
|
<u-form-item labelWidth="auto" label="有无加工仓储" required prop="processing_storage" borderBottom>
|
||||||
<u-form-item labelWidth="auto" label="有无加工仓储" required prop="processing_storage" borderBottom>
|
<u-radio-group :disabled="readonly" v-model="formData.processing_storage" style="margin: 16rpx;">
|
||||||
<u-radio-group :disabled="readonly" v-model="formData.processing_storage" style="margin: 16rpx;">
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index"
|
:name="item.value">
|
||||||
:label="item.label" :name="item.value">
|
</u-radio>
|
||||||
</u-radio>
|
</u-radio-group>
|
||||||
</u-radio-group>
|
</u-form-item>
|
||||||
</u-form-item>
|
<u-form-item labelWidth="auto" label="有无宣传推广" required prop="promote" borderBottom>
|
||||||
<u-form-item labelWidth="auto" label="有无宣传推广" required prop="promote" borderBottom>
|
<u-radio-group :disabled="readonly" v-model="formData.promote" style="margin: 16rpx;">
|
||||||
<u-radio-group :disabled="readonly" v-model="formData.promote" style="margin: 16rpx;">
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index"
|
:name="item.value">
|
||||||
:label="item.label" :name="item.value">
|
</u-radio>
|
||||||
</u-radio>
|
</u-radio-group>
|
||||||
</u-radio-group>
|
</u-form-item>
|
||||||
</u-form-item>
|
<u-form-item labelWidth="auto" label="有无运输" required prop="transportation" borderBottom>
|
||||||
<u-form-item labelWidth="auto" label="有无运输" required prop="transportation" borderBottom>
|
<u-radio-group :disabled="readonly" v-model="formData.transportation" style="margin: 16rpx;">
|
||||||
<u-radio-group :disabled="readonly" v-model="formData.transportation" style="margin: 16rpx;">
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index"
|
:name="item.value">
|
||||||
:label="item.label" :name="item.value">
|
</u-radio>
|
||||||
</u-radio>
|
</u-radio-group>
|
||||||
</u-radio-group>
|
</u-form-item>
|
||||||
</u-form-item>
|
<u-form-item labelWidth="auto" label="是否有扩大经营需求" required prop="expand_business_needs" borderBottom>
|
||||||
<u-form-item labelWidth="auto" label="是否有扩大经营需求" required prop="expand_business_needs" borderBottom>
|
<u-radio-group :disabled="readonly" v-model="formData.expand_business_needs" style="margin: 16rpx;">
|
||||||
<u-radio-group :disabled="readonly" v-model="formData.expand_business_needs" style="margin: 16rpx;">
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
|
||||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index"
|
:name="item.value">
|
||||||
:label="item.label" :name="item.value">
|
</u-radio>
|
||||||
</u-radio>
|
</u-radio-group>
|
||||||
</u-radio-group>
|
</u-form-item>
|
||||||
</u-form-item>
|
<u-form-item labelWidth="auto" labelPosition="top" label="需求描述" prop="demand" borderBottom>
|
||||||
<u-form-item labelWidth="auto" labelPosition="top" label="需求描述" prop="demand" borderBottom>
|
<u--textarea :disabled="readonly" v-model="formData.demand" autoHeight placeholder="请输入需求描述" border="surround"
|
||||||
<u--textarea :disabled="readonly" v-model="formData.demand" autoHeight placeholder="请输入需求描述"
|
count></u--textarea>
|
||||||
border="surround" count></u--textarea>
|
</u-form-item>
|
||||||
</u-form-item>
|
<u-form-item labelWidth="auto" labelPosition="top" label="政策补助" prop="policy_subsidies" borderBottom>
|
||||||
<u-form-item labelWidth="auto" labelPosition="top" label="政策补助" prop="policy_subsidies" borderBottom>
|
<u--textarea :disabled="readonly" v-model="formData.policy_subsidies" autoHeight placeholder="请输入政策补助"
|
||||||
<u--textarea :disabled="readonly" v-model="formData.policy_subsidies" autoHeight
|
border="surround" count></u--textarea>
|
||||||
placeholder="请输入政策补助" border="surround" count></u--textarea>
|
</u-form-item>
|
||||||
</u-form-item>
|
</u--form>
|
||||||
</u--form>
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
readonly: {
|
readonly: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
datas: {
|
datas: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null
|
default: null
|
||||||
},
|
},
|
||||||
update_time: {
|
update_time: {
|
||||||
type: String,
|
type: String,
|
||||||
default: null
|
default: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
landPlanList: ['自己养', '出租', '代养', '租更多地扩大养殖'],
|
landPlanList: ['自己养', '出租', '代养', '租更多地扩大养殖'],
|
||||||
formData: {
|
formData: {
|
||||||
// "breeding_training": 1, //有无养殖培训
|
// "breeding_training": 1, //有无养殖培训
|
||||||
// "breeding_company": 0, //有无注册成立种殖公司
|
// "breeding_company": 0, //有无注册成立种殖公司
|
||||||
// "notes": "试试备注", //备注
|
// "notes": "试试备注", //备注
|
||||||
// "breeding_type": 22, //养殖类型
|
// "breeding_type": 22, //养殖类型
|
||||||
// "breeding_time": "2022-07-22", //养殖开始时间
|
// "breeding_time": "2022-07-22", //养殖开始时间
|
||||||
// "mature_time": "2022-07-22", //上市时间
|
// "mature_time": "2022-07-22", //上市时间
|
||||||
// "yield": 600, //产量
|
// "yield": 600, //产量
|
||||||
// "estimated_income": 1500, //预计收益
|
// "estimated_income": 1500, //预计收益
|
||||||
// "farm_tools": "收割机一台,打米机一台", //农资农具使用情况
|
// "farm_tools": "收割机一台,打米机一台", //农资农具使用情况
|
||||||
// "ecological_farming": 1, //是否生态养殖
|
// "ecological_farming": 1, //是否生态养殖
|
||||||
// "modernization": 30, //现代化程度
|
// "modernization": 30, //现代化程度
|
||||||
// "pre_price": "30.00", //预售卖价格
|
// "pre_price": "30.00", //预售卖价格
|
||||||
// "method_sales": 1, //销售方式
|
// "method_sales": 1, //销售方式
|
||||||
// "processing_storage": 0, //有无加工仓储
|
// "processing_storage": 0, //有无加工仓储
|
||||||
// "promote": 0, //有无宣传推广
|
// "promote": 0, //有无宣传推广
|
||||||
// "transportation": 0, //有无运输
|
// "transportation": 0, //有无运输
|
||||||
// "expand_business_needs": 0, //是否有扩大经营需求
|
// "expand_business_needs": 0, //是否有扩大经营需求
|
||||||
// "demand": "没有述求", //养殖述求
|
// "demand": "没有述求", //养殖述求
|
||||||
// "policy_subsidies": "无补助" ,//政策补助
|
// "policy_subsidies": "无补助" ,//政策补助
|
||||||
"breeding_training": "", //有无养殖培训
|
"breeding_training": "", //有无养殖培训
|
||||||
"breeding_company": "", //有无注册成立种殖公司
|
"breeding_company": "", //有无注册成立种殖公司
|
||||||
"notes": "", //备注
|
"notes": "", //备注
|
||||||
"breeding_type": "", //养殖类型
|
"breeding_type": "", //养殖类型
|
||||||
"area": "", //面积
|
"area": "", //面积
|
||||||
"breeding_time": "", //养殖开始时间
|
"breeding_time": "", //养殖开始时间
|
||||||
"mature_time": "", //上市时间
|
"mature_time": "", //上市时间
|
||||||
"yield": "", //产量
|
"yield": "", //产量
|
||||||
"estimated_income": "", //预计收益
|
"estimated_income": "", //预计收益
|
||||||
"farm_tools": "", //农资农具使用情况
|
"farm_tools": "", //农资农具使用情况
|
||||||
"ecological_farming": "", //是否生态养殖
|
"ecological_farming": "", //是否生态养殖
|
||||||
"modernization": "", //现代化程度
|
"modernization": "", //现代化程度
|
||||||
"pre_price": "", //预售卖价格
|
"pre_price": "", //预售卖价格
|
||||||
"method_sales": "", //销售方式
|
"method_sales": "", //销售方式
|
||||||
"processing_storage": "", //有无加工仓储
|
"processing_storage": "", //有无加工仓储
|
||||||
"promote": "", //有无宣传推广
|
"promote": "", //有无宣传推广
|
||||||
"transportation": "", //有无运输
|
"transportation": "", //有无运输
|
||||||
"expand_business_needs": "", //是否有扩大经营需求
|
"expand_business_needs": "", //是否有扩大经营需求
|
||||||
"demand": "", //养殖述求
|
"demand": "", //养殖述求
|
||||||
"policy_subsidies": "" //政策补助
|
"policy_subsidies": "" //政策补助
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.initRules();
|
this.initRules();
|
||||||
if (this.$props.readonly && this.$props.datas) {
|
if (this.$props.readonly && this.$props.datas) {
|
||||||
this.formData = this.$props.datas;
|
this.formData = this.$props.datas;
|
||||||
let keys = Object.keys(this.formData);
|
let keys = Object.keys(this.formData);
|
||||||
keys.forEach(item => {
|
keys.forEach(item => {
|
||||||
if (!isNaN(this.formData[item])&&this.formData[item]!=''&&this.formData[item]!=null&&this.formData[item]!=undefined){
|
if (!isNaN(this.formData[item]) && this.formData[item] != '' && this.formData[item] != null && this
|
||||||
parseFloat(this.formData[item])!='NaN'?this.formData[item] = parseFloat(this.formData[item]):null;
|
.formData[item] != undefined) {
|
||||||
}
|
parseFloat(this.formData[item]) != 'NaN' ? this.formData[item] = parseFloat(this.formData[item]) : null;
|
||||||
})
|
}
|
||||||
}
|
})
|
||||||
},
|
}
|
||||||
watch: {
|
},
|
||||||
datas(newValue, oldValue) {
|
watch: {
|
||||||
if (this.$props.readonly && newValue) {
|
datas(newValue, oldValue) {
|
||||||
this.formData = this.$props.datas;
|
if (this.$props.readonly && newValue) {
|
||||||
let keys = Object.keys(this.formData);
|
this.formData = this.$props.datas;
|
||||||
keys.forEach(item => {
|
let keys = Object.keys(this.formData);
|
||||||
if (!isNaN(this.formData[item])&&this.formData[item]!=''&&this.formData[item]!=null&&this.formData[item]!=undefined){
|
keys.forEach(item => {
|
||||||
parseFloat(this.formData[item])!='NaN'?this.formData[item] = parseFloat(this.formData[item]):null;
|
if (!isNaN(this.formData[item]) && this.formData[item] != '' && this.formData[item] != null && this
|
||||||
}
|
.formData[item] != undefined) {
|
||||||
})
|
parseFloat(this.formData[item]) != 'NaN' ? this.formData[item] = parseFloat(this.formData[item]) :
|
||||||
}
|
null;
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
methods: {
|
}
|
||||||
// 初始化校验
|
}
|
||||||
initRules() {
|
},
|
||||||
let arr = Object.keys(this.formData);
|
methods: {
|
||||||
let white = ['demand', 'policy_subsidies'];
|
// 初始化校验
|
||||||
arr = arr.filter(item => {
|
initRules() {
|
||||||
return !white.includes(item);
|
let arr = Object.keys(this.formData);
|
||||||
})
|
let white = ['demand', 'policy_subsidies'];
|
||||||
arr.forEach(key => {
|
arr = arr.filter(item => {
|
||||||
this.rules[key] = {
|
return !white.includes(item);
|
||||||
validator: (rule, value, callback) => {
|
})
|
||||||
this.$refs.breedingForm.clearValidate(rule.field);
|
arr.forEach(key => {
|
||||||
value.trim() !== '' ? callback() : callback('不能为空');
|
this.rules[key] = {
|
||||||
},
|
validator: (rule, value, callback) => {
|
||||||
trigger: ['change', 'blur']
|
this.$refs.breedingForm.clearValidate(rule.field);
|
||||||
}
|
value.trim() !== '' ? callback() : callback('不能为空');
|
||||||
})
|
},
|
||||||
},
|
trigger: ['change', 'blur']
|
||||||
// 校验
|
}
|
||||||
async validate() {
|
})
|
||||||
return await this.$refs.breedingForm.validate();
|
},
|
||||||
},
|
// 校验
|
||||||
// 选择土地规划
|
async validate() {
|
||||||
changeLanPlan(e) {
|
return await this.$refs.breedingForm.validate();
|
||||||
let index = e.currentTarget.dataset.index;
|
},
|
||||||
this.formData.planning = e.detail.value;
|
// 选择土地规划
|
||||||
},
|
changeLanPlan(e) {
|
||||||
// 选择时间
|
let index = e.currentTarget.dataset.index;
|
||||||
changeDate(e) {
|
this.formData.planning = e.detail.value;
|
||||||
let data = e.currentTarget.dataset;
|
},
|
||||||
this.formData[data.value] = e.detail.value;
|
// 选择时间
|
||||||
},
|
changeDate(e) {
|
||||||
},
|
let data = e.currentTarget.dataset;
|
||||||
}
|
this.formData[data.value] = e.detail.value;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.card {
|
.card {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin: 28rpx;
|
margin: 28rpx;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
border-radius: 0 0 14rpx 14rpx;
|
border-radius: 0 0 14rpx 14rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tit {
|
.tit {
|
||||||
margin: 28rpx 28rpx 0 28rpx;
|
margin: 28rpx 28rpx 0 28rpx;
|
||||||
padding: 28rpx 28rpx 0 28rpx;
|
padding: 28rpx 28rpx 0 28rpx;
|
||||||
border-radius: 14rpx 14rpx 0 0;
|
border-radius: 14rpx 14rpx 0 0;
|
||||||
background-color: $theme-oa-color;
|
background-color: $theme-oa-color;
|
||||||
color: white;
|
color: white;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
.title {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 34rpx;
|
||||||
|
|
||||||
.title {
|
&::before {
|
||||||
font-weight: 500;
|
width: 8rpx;
|
||||||
font-size: 34rpx;
|
height: 26rpx;
|
||||||
|
border-radius: 4rpx;
|
||||||
|
background-color: #0122c7;
|
||||||
|
content: "";
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 8rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&::before {
|
.delete {
|
||||||
width: 8rpx;
|
margin: 22rpx 0;
|
||||||
height: 26rpx;
|
// margin-bottom: 40rpx;
|
||||||
border-radius: 4rpx;
|
width: 100%;
|
||||||
background-color: #0122c7;
|
height: 64rpx;
|
||||||
content: "";
|
line-height: 64rpx;
|
||||||
display: inline-block;
|
background: #f56c6c;
|
||||||
margin-right: 8rpx;
|
border-radius: 14rpx;
|
||||||
}
|
font-size: 28rpx;
|
||||||
}
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
.delete {
|
.plus {
|
||||||
margin: 22rpx 0;
|
margin: 22rpx 0;
|
||||||
// margin-bottom: 40rpx;
|
// margin-bottom: 40rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
line-height: 64rpx;
|
line-height: 64rpx;
|
||||||
background: #f56c6c;
|
background: $theme-oa-color;
|
||||||
border-radius: 14rpx;
|
border-radius: 14rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.plus {
|
|
||||||
|
|
||||||
margin: 22rpx 0;
|
|
||||||
|
|
||||||
// margin-bottom: 40rpx;
|
|
||||||
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
height: 64rpx;
|
|
||||||
|
|
||||||
line-height: 64rpx;
|
|
||||||
|
|
||||||
background: $theme-oa-color;
|
|
||||||
|
|
||||||
border-radius: 14rpx;
|
|
||||||
|
|
||||||
font-size: 28rpx;
|
|
||||||
|
|
||||||
color: #fff;
|
|
||||||
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
@ -1,285 +1,298 @@
|
|||||||
<!-- 深加工 -->
|
<!-- 深加工 -->
|
||||||
<template>
|
<template>
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<view class="title">深加工</view>
|
<view class="title">深加工</view>
|
||||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||||
<u-form-item labelWidth="auto" label="是否在经营" required prop="shop_front" borderBottom>
|
<u-form-item labelWidth="auto" label="是否在经营" required prop="shop_front" borderBottom>
|
||||||
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<block v-if="formData.shop_front">
|
<block v-if="formData.shop_front">
|
||||||
<u-form-item labelWidth="auto" label="有无建设用地" required prop="shop_front" borderBottom>
|
<u-form-item labelWidth="auto" label="有无建设用地" required prop="shop_front" borderBottom>
|
||||||
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="面积" required prop="cultivated_area" borderBottom>
|
<u-form-item labelWidth="auto" label="面积" required prop="cultivated_area" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入面积"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入面积"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="经营地点" required prop="cultivated_area" borderBottom>
|
<u-form-item labelWidth="auto" label="经营地点" required prop="cultivated_area" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="材料来源" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" label="材料来源" required prop="notes" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无销售渠道" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无销售渠道" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无技术指导" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无技术指导" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无品牌" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无品牌" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无宣传推广" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无宣传推广" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无运输" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无运输" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="farm_tools" borderBottom>
|
<u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="farm_tools" borderBottom>
|
||||||
<u--textarea v-model="formData.farm_tools" autoHeight placeholder="请输入经营诉求" border="surround"
|
<u--textarea v-model="formData.farm_tools" autoHeight placeholder="请输入经营诉求" border="surround"
|
||||||
count></u--textarea>
|
count></u--textarea>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<u-form-item labelWidth="auto" label="有无建设用地" required prop="shop_front" borderBottom>
|
<u-form-item labelWidth="auto" label="有无建设用地" required prop="shop_front" borderBottom>
|
||||||
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<picker :range="storeTypeList" mode="selector" @change="changeLanPlan">
|
<picker :range="storeTypeList" mode="selector" @change="changeLanPlan">
|
||||||
<u-form-item labelWidth="auto" label="经营类型" required prop="planning" borderBottom>
|
<u-form-item labelWidth="auto" label="经营类型" required prop="planning" borderBottom>
|
||||||
<u--input :value="storeTypeList[formData.planning]" placeholder="请选择经营类型" disabled
|
<u--input :value="storeTypeList[formData.planning]" placeholder="请选择经营类型" disabled
|
||||||
disabledColor="#fff"></u--input>
|
disabledColor="#fff"></u--input>
|
||||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</picker>
|
</picker>
|
||||||
<u-form-item labelWidth="auto" label="经营地点" required prop="cultivated_area" borderBottom>
|
<u-form-item labelWidth="auto" label="经营地点" required prop="cultivated_area" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="人数" required prop="cultivated_area" borderBottom>
|
<u-form-item labelWidth="auto" label="人数" required prop="cultivated_area" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无食堂" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无食堂" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="材料来源" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" label="材料来源" required prop="notes" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="自动化办公程度" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" label="自动化办公程度" required prop="notes" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无用工需求" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无用工需求" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无品牌" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无品牌" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无宣传推广" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无宣传推广" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="库存情况" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" label="库存情况" required prop="notes" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无运输" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无运输" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="farm_tools" borderBottom>
|
<u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="farm_tools" borderBottom>
|
||||||
<u--textarea v-model="formData.farm_tools" autoHeight placeholder="请输入经营诉求" border="surround"
|
<u--textarea v-model="formData.farm_tools" autoHeight placeholder="请输入经营诉求" border="surround"
|
||||||
count></u--textarea>
|
count></u--textarea>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</block>
|
</block>
|
||||||
</u--form>
|
</u--form>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props:{
|
props:{
|
||||||
readonly: {
|
readonly: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
datas:{
|
datas:{
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null
|
default: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
||||||
formData: {
|
formData: {
|
||||||
shop_front: '', //有无门面
|
shop_front: '', //有无门面
|
||||||
manage: '',
|
manage: '',
|
||||||
// construction_land
|
// construction_land
|
||||||
// type
|
// type
|
||||||
// area
|
// area
|
||||||
// count
|
// count
|
||||||
// canteen
|
// canteen
|
||||||
|
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.initRules()
|
this.initRules()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 初始化校验
|
// 初始化校验
|
||||||
initRules() {
|
initRules() {
|
||||||
let arr = Object.keys(this.formData);
|
let arr = Object.keys(this.formData);
|
||||||
arr.forEach(key => {
|
arr.forEach(key => {
|
||||||
this.rules[key] = {
|
this.rules[key] = {
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
this.$refs.breedingForm.clearValidate(rule.field);
|
this.$refs.breedingForm.clearValidate(rule.field);
|
||||||
value.trim() !== '' ? callback() : callback('不能为空');
|
value.trim() !== '' ? callback() : callback('不能为空');
|
||||||
},
|
},
|
||||||
trigger: ['change', 'blur']
|
trigger: ['change', 'blur']
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 校验
|
// 校验
|
||||||
async validate() {
|
async validate() {
|
||||||
return await this.$refs.breedingForm.validate();;
|
return await this.$refs.breedingForm.validate();;
|
||||||
},
|
},
|
||||||
// 选择土地规划
|
// 选择土地规划
|
||||||
changeLanPlan(e) {
|
changeLanPlan(e) {
|
||||||
let index = e.currentTarget.dataset.index;
|
let index = e.currentTarget.dataset.index;
|
||||||
this.formData.planning = e.detail.value;
|
this.formData.planning = e.detail.value;
|
||||||
},
|
},
|
||||||
// 选择时间
|
// 选择时间
|
||||||
changeDate(e) {
|
changeDate(e) {
|
||||||
let data = e.currentTarget.dataset;
|
let data = e.currentTarget.dataset;
|
||||||
this.formData[data.value] = e.detail.value;
|
this.formData[data.value] = e.detail.value;
|
||||||
},
|
},
|
||||||
// 新增开设店铺
|
// 新增开设店铺
|
||||||
pushBreedingList() {
|
pushBreedingList() {
|
||||||
this.formData.push({})
|
this.formData.push({})
|
||||||
},
|
},
|
||||||
// 删除开设店铺
|
// 删除开设店铺
|
||||||
removeBreedingList(index) {
|
removeBreedingList(index) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
confirmColor: '#f56c6c',
|
confirmColor: '#f56c6c',
|
||||||
content: '确定删除吗?',
|
content: '确定删除吗?',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
this.formData.splice(index, 1);
|
this.formData.splice(index, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.card{
|
.card {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin: 28rpx;
|
margin: 28rpx;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
border-radius: 14rpx;
|
margin-top: 0;
|
||||||
}
|
padding-top: 0;
|
||||||
.title {
|
border-radius: 0 0 14rpx 14rpx;
|
||||||
font-weight: 500;
|
}
|
||||||
font-size: 34rpx;
|
|
||||||
|
.tit {
|
||||||
&::before {
|
margin: 28rpx 28rpx 0 28rpx;
|
||||||
width: 8rpx;
|
padding: 28rpx 28rpx 0 28rpx;
|
||||||
height: 26rpx;
|
border-radius: 14rpx 14rpx 0 0;
|
||||||
border-radius: 4rpx;
|
background-color: $theme-oa-color;
|
||||||
background-color: #0122c7;
|
color: white;
|
||||||
content: "";
|
height: 100rpx;
|
||||||
display: inline-block;
|
display: flex;
|
||||||
margin-right: 8rpx;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
}
|
.title {
|
||||||
|
font-weight: 500;
|
||||||
.delete {
|
font-size: 34rpx;
|
||||||
margin: 22rpx 0;
|
|
||||||
// margin-bottom: 40rpx;
|
&::before {
|
||||||
width: 100%;
|
width: 8rpx;
|
||||||
height: 64rpx;
|
height: 26rpx;
|
||||||
line-height: 64rpx;
|
border-radius: 4rpx;
|
||||||
background: #f56c6c;
|
background-color: #0122c7;
|
||||||
border-radius: 14rpx;
|
content: "";
|
||||||
font-size: 28rpx;
|
display: inline-block;
|
||||||
color: #fff;
|
margin-right: 8rpx;
|
||||||
text-align: center;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.plus {
|
.delete {
|
||||||
margin: 22rpx 0;
|
margin: 22rpx 0;
|
||||||
// margin-bottom: 40rpx;
|
// margin-bottom: 40rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
line-height: 64rpx;
|
line-height: 64rpx;
|
||||||
background: $theme-oa-color;
|
background: #f56c6c;
|
||||||
border-radius: 14rpx;
|
border-radius: 14rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.plus {
|
||||||
|
margin: 22rpx 0;
|
||||||
|
// margin-bottom: 40rpx;
|
||||||
|
width: 100%;
|
||||||
|
height: 64rpx;
|
||||||
|
line-height: 64rpx;
|
||||||
|
background: $theme-oa-color;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -1,143 +1,177 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="card">
|
<view>
|
||||||
<view class="title">装房</view>
|
<view class="tit">
|
||||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
<text v-if="readonly">更新时间: {{update_time}}</text>
|
||||||
<u-form-item labelWidth="auto" label="房屋面积" required prop="cultivated_area" borderBottom>
|
<text>装房</text>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面面积"></u--input>
|
</view>
|
||||||
</u-form-item>
|
<view class="card">
|
||||||
<u-form-item labelWidth="auto" label="装修风格" required prop="cultivated_area" borderBottom>
|
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<u-form-item labelWidth="auto" label="房屋面积(m²)" required prop="house_area" borderBottom>
|
||||||
</u-form-item>
|
<u--input :readonly="readonly" type="number" v-model="formData.house_area" placeholder="请输入房屋面积(m²)"></u--input>
|
||||||
<u-form-item labelWidth="auto" label="装修地点" required prop="notes" borderBottom>
|
</u-form-item>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
<u-form-item labelWidth="auto" label="装修风格" required prop="decoration_style" borderBottom>
|
||||||
</u-form-item>
|
<u--input :readonly="readonly" v-model="formData.decoration_style" placeholder="请输入装修风格"></u--input>
|
||||||
<u-form-item labelWidth="auto" label="装修预算" required prop="notes" borderBottom>
|
</u-form-item>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入服务对象"></u--input>
|
<u-form-item labelWidth="auto" label="装修地点" required prop="decoration_site" borderBottom>
|
||||||
</u-form-item>
|
<u--input :readonly="readonly" v-model="formData.decoration_site" placeholder="请输入装修地点"></u--input>
|
||||||
<u-form-item labelWidth="auto" label="装修类型" required prop="planting_company" borderBottom>
|
</u-form-item>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-form-item labelWidth="auto" label="装修预算" required prop="budget" borderBottom>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u--input :readonly="readonly" v-model="formData.budget" placeholder="请输入装修预算"></u--input>
|
||||||
v-for="(item, index) in [{value:1,label:'私人'},{value:0,label:'公共建设'}]" :key="index" :label="item.label"
|
</u-form-item>
|
||||||
:name="item.value">
|
<u-form-item labelWidth="auto" label="装修类型" required prop="decoration_type" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group :disabled="readonly" v-model="formData.decoration_type" style="margin: 16rpx;">
|
||||||
</u-radio-group>
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
</u-form-item>
|
v-for="(item, index) in [{value:1,label:'私人'},{value:0,label:'公共建设'}]" :key="index" :label="item.label"
|
||||||
|
:name="item.value">
|
||||||
</u-form-item>
|
</u-radio>
|
||||||
</u--form>
|
</u-radio-group>
|
||||||
|
</u-form-item>
|
||||||
</view>
|
|
||||||
</template>
|
</u-form-item>
|
||||||
|
</u--form>
|
||||||
<script>
|
|
||||||
export default {
|
</view>
|
||||||
data() {
|
</view>
|
||||||
return {
|
</template>
|
||||||
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
|
||||||
formData: {
|
<script>
|
||||||
shop_front: '', //有无门面
|
export default {
|
||||||
},
|
props: {
|
||||||
rules: {
|
readonly: {
|
||||||
|
type: Boolean,
|
||||||
}
|
default: false
|
||||||
}
|
},
|
||||||
},
|
datas: {
|
||||||
created() {
|
type: Object,
|
||||||
this.initRules()
|
default: null
|
||||||
},
|
},
|
||||||
methods: {
|
update_time: {
|
||||||
// 初始化校验
|
type: String,
|
||||||
initRules() {
|
default: null
|
||||||
let arr = Object.keys(this.formData);
|
}
|
||||||
arr.forEach(key => {
|
},
|
||||||
this.rules[key] = {
|
data() {
|
||||||
validator: (rule, value, callback) => {
|
return {
|
||||||
this.$refs.breedingForm.clearValidate(rule.field);
|
formData: {
|
||||||
value.trim() !== '' ? callback() : callback('不能为空');
|
house_area: '',
|
||||||
},
|
decoration_style: '',
|
||||||
trigger: ['change', 'blur']
|
decoration_site: '',
|
||||||
}
|
budget: '',
|
||||||
})
|
decoration_type: ''
|
||||||
},
|
},
|
||||||
// 校验
|
rules: {
|
||||||
async validate() {
|
|
||||||
return await this.$refs.breedingForm.validate();;
|
}
|
||||||
},
|
}
|
||||||
// 选择土地规划
|
},
|
||||||
changeLanPlan(e) {
|
created() {
|
||||||
let index = e.currentTarget.dataset.index;
|
this.initRules();
|
||||||
this.formData.planning = e.detail.value;
|
if (this.$props.readonly && this.$props.datas) {
|
||||||
},
|
this.formData = this.$props.datas;
|
||||||
// 选择时间
|
let keys = Object.keys(this.formData);
|
||||||
changeDate(e) {
|
keys.forEach(item => {
|
||||||
let data = e.currentTarget.dataset;
|
if (!isNaN(this.formData[item]) && this.formData[item] != '' && this.formData[item] != null && this
|
||||||
this.formData[data.value] = e.detail.value;
|
.formData[item] != undefined) {
|
||||||
},
|
parseFloat(this.formData[item]) != 'NaN' ? this.formData[item] = parseFloat(this.formData[item]) : null;
|
||||||
// 新增开设店铺
|
}
|
||||||
pushBreedingList() {
|
})
|
||||||
this.formData.push({})
|
}
|
||||||
},
|
},
|
||||||
// 删除开设店铺
|
watch: {
|
||||||
removeBreedingList(index) {
|
datas(newValue, oldValue) {
|
||||||
uni.showModal({
|
if (this.$props.readonly && newValue) {
|
||||||
confirmColor: '#f56c6c',
|
this.formData = this.$props.datas;
|
||||||
content: '确定删除吗?',
|
let keys = Object.keys(this.formData);
|
||||||
success: (res) => {
|
keys.forEach(item => {
|
||||||
if (res.confirm) {
|
if (!isNaN(this.formData[item]) && this.formData[item] != '' && this.formData[item] != null && this
|
||||||
this.formData.splice(index, 1);
|
.formData[item] != undefined) {
|
||||||
}
|
parseFloat(this.formData[item]) != 'NaN' ? this.formData[item] = parseFloat(this.formData[item]) :
|
||||||
}
|
null;
|
||||||
})
|
}
|
||||||
},
|
})
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
</script>
|
},
|
||||||
|
methods: {
|
||||||
<style lang="scss">
|
// 初始化校验
|
||||||
.card{
|
initRules() {
|
||||||
background-color: #fff;
|
let arr = Object.keys(this.formData);
|
||||||
margin: 28rpx;
|
arr.forEach(key => {
|
||||||
padding: 28rpx;
|
this.rules[key] = {
|
||||||
border-radius: 14rpx;
|
validator: (rule, value, callback) => {
|
||||||
}
|
this.$refs.breedingForm.clearValidate(rule.field);
|
||||||
.title {
|
value.trim() !== '' ? callback() : callback('不能为空');
|
||||||
font-weight: 500;
|
},
|
||||||
font-size: 34rpx;
|
trigger: ['change', 'blur']
|
||||||
|
}
|
||||||
&::before {
|
})
|
||||||
width: 8rpx;
|
},
|
||||||
height: 26rpx;
|
// 校验
|
||||||
border-radius: 4rpx;
|
async validate() {
|
||||||
background-color: #0122c7;
|
return await this.$refs.breedingForm.validate();;
|
||||||
content: "";
|
},
|
||||||
display: inline-block;
|
},
|
||||||
margin-right: 8rpx;
|
}
|
||||||
}
|
</script>
|
||||||
}
|
|
||||||
|
<style lang="scss">
|
||||||
.delete {
|
.card {
|
||||||
margin: 22rpx 0;
|
background-color: #fff;
|
||||||
// margin-bottom: 40rpx;
|
margin: 28rpx;
|
||||||
width: 100%;
|
padding: 28rpx;
|
||||||
height: 64rpx;
|
margin-top: 0;
|
||||||
line-height: 64rpx;
|
padding-top: 0;
|
||||||
background: #f56c6c;
|
border-radius: 0 0 14rpx 14rpx;
|
||||||
border-radius: 14rpx;
|
}
|
||||||
font-size: 28rpx;
|
|
||||||
color: #fff;
|
.tit {
|
||||||
text-align: center;
|
margin: 28rpx 28rpx 0 28rpx;
|
||||||
}
|
padding: 28rpx 28rpx 0 28rpx;
|
||||||
|
border-radius: 14rpx 14rpx 0 0;
|
||||||
.plus {
|
background-color: $theme-oa-color;
|
||||||
margin: 22rpx 0;
|
color: white;
|
||||||
// margin-bottom: 40rpx;
|
height: 100rpx;
|
||||||
width: 100%;
|
display: flex;
|
||||||
height: 64rpx;
|
justify-content: space-between;
|
||||||
line-height: 64rpx;
|
}
|
||||||
background: $theme-oa-color;
|
.title {
|
||||||
border-radius: 14rpx;
|
font-weight: 500;
|
||||||
font-size: 28rpx;
|
font-size: 34rpx;
|
||||||
color: #fff;
|
|
||||||
text-align: center;
|
&::before {
|
||||||
}
|
width: 8rpx;
|
||||||
|
height: 26rpx;
|
||||||
|
border-radius: 4rpx;
|
||||||
|
background-color: #0122c7;
|
||||||
|
content: "";
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 8rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete {
|
||||||
|
margin: 22rpx 0;
|
||||||
|
// margin-bottom: 40rpx;
|
||||||
|
width: 100%;
|
||||||
|
height: 64rpx;
|
||||||
|
line-height: 64rpx;
|
||||||
|
background: #f56c6c;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plus {
|
||||||
|
margin: 22rpx 0;
|
||||||
|
// margin-bottom: 40rpx;
|
||||||
|
width: 100%;
|
||||||
|
height: 64rpx;
|
||||||
|
line-height: 64rpx;
|
||||||
|
background: $theme-oa-color;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -1,133 +1,164 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="card">
|
<view>
|
||||||
<view class="title">翻新</view>
|
<view class="tit">
|
||||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
<text v-if="readonly">更新时间: {{update_time}}</text>
|
||||||
<u-form-item labelWidth="auto" labelPosition="top" label="维护内容" required prop="policy_subsidies" borderBottom>
|
<text>翻新房屋</text>
|
||||||
<u--textarea v-model="formData.policy_subsidies" autoHeight placeholder="请输入维护内容" border="surround"
|
</view>
|
||||||
count></u--textarea>
|
<view class="card">
|
||||||
</u-form-item>
|
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||||
<u-form-item labelWidth="auto" label="维护类型" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" labelPosition="top" label="维护内容" required prop="maintenance_contents" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u--textarea :readonly="readonly" v-model="formData.maintenance_contents" autoHeight placeholder="请输入维护内容" border="surround"
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
count></u--textarea>
|
||||||
v-for="(item, index) in [{value:1,label:'换'},{value:0,label:'修'}]" :key="index" :label="item.label"
|
</u-form-item>
|
||||||
:name="item.value">
|
<u-form-item labelWidth="auto" label="维护类型" required prop="maintenance_type" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group :disabled="readonly" v-model="formData.maintenance_type" style="margin: 16rpx;">
|
||||||
</u-radio-group>
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
</u-form-item>
|
v-for="(item, index) in [{value:1,label:'换'},{value:0,label:'修'}]" :key="index" :label="item.label"
|
||||||
</u--form>
|
:name="item.value">
|
||||||
|
</u-radio>
|
||||||
</view>
|
</u-radio-group>
|
||||||
</template>
|
</u-form-item>
|
||||||
|
</u--form>
|
||||||
<script>
|
|
||||||
export default {
|
</view>
|
||||||
data() {
|
</view>
|
||||||
return {
|
</template>
|
||||||
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
|
||||||
formData: {
|
<script>
|
||||||
shop_front: '', //有无门面
|
export default {
|
||||||
},
|
props: {
|
||||||
rules: {
|
readonly: {
|
||||||
|
type: Boolean,
|
||||||
}
|
default: false
|
||||||
}
|
},
|
||||||
},
|
datas: {
|
||||||
created() {
|
type: Object,
|
||||||
this.initRules()
|
default: null
|
||||||
},
|
},
|
||||||
methods: {
|
update_time: {
|
||||||
// 初始化校验
|
type: String,
|
||||||
initRules() {
|
default: null
|
||||||
let arr = Object.keys(this.formData);
|
}
|
||||||
arr.forEach(key => {
|
},
|
||||||
this.rules[key] = {
|
data() {
|
||||||
validator: (rule, value, callback) => {
|
return {
|
||||||
this.$refs.breedingForm.clearValidate(rule.field);
|
formData: {
|
||||||
value.trim() !== '' ? callback() : callback('不能为空');
|
maintenance_contents: '',
|
||||||
},
|
maintenance_type: ''
|
||||||
trigger: ['change', 'blur']
|
},
|
||||||
}
|
rules: {
|
||||||
})
|
|
||||||
},
|
}
|
||||||
// 校验
|
}
|
||||||
async validate() {
|
},
|
||||||
return await this.$refs.breedingForm.validate();;
|
created() {
|
||||||
},
|
this.initRules();
|
||||||
// 选择土地规划
|
if (this.$props.readonly && this.$props.datas) {
|
||||||
changeLanPlan(e) {
|
this.formData = this.$props.datas;
|
||||||
let index = e.currentTarget.dataset.index;
|
let keys = Object.keys(this.formData);
|
||||||
this.formData.planning = e.detail.value;
|
keys.forEach(item => {
|
||||||
},
|
if (!isNaN(this.formData[item]) && this.formData[item] != '' && this.formData[item] != null && this
|
||||||
// 选择时间
|
.formData[item] != undefined) {
|
||||||
changeDate(e) {
|
parseFloat(this.formData[item]) != 'NaN' ? this.formData[item] = parseFloat(this.formData[item]) : null;
|
||||||
let data = e.currentTarget.dataset;
|
}
|
||||||
this.formData[data.value] = e.detail.value;
|
})
|
||||||
},
|
}
|
||||||
// 新增开设店铺
|
},
|
||||||
pushBreedingList() {
|
watch: {
|
||||||
this.formData.push({})
|
datas(newValue, oldValue) {
|
||||||
},
|
if (this.$props.readonly && newValue) {
|
||||||
// 删除开设店铺
|
this.formData = this.$props.datas;
|
||||||
removeBreedingList(index) {
|
let keys = Object.keys(this.formData);
|
||||||
uni.showModal({
|
keys.forEach(item => {
|
||||||
confirmColor: '#f56c6c',
|
if (!isNaN(this.formData[item]) && this.formData[item] != '' && this.formData[item] != null && this
|
||||||
content: '确定删除吗?',
|
.formData[item] != undefined) {
|
||||||
success: (res) => {
|
parseFloat(this.formData[item]) != 'NaN' ? this.formData[item] = parseFloat(this.formData[item]) :
|
||||||
if (res.confirm) {
|
null;
|
||||||
this.formData.splice(index, 1);
|
}
|
||||||
}
|
})
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
},
|
},
|
||||||
},
|
methods: {
|
||||||
}
|
// 初始化校验
|
||||||
</script>
|
initRules() {
|
||||||
|
let arr = Object.keys(this.formData);
|
||||||
<style lang="scss">
|
arr.forEach(key => {
|
||||||
.card{
|
this.rules[key] = {
|
||||||
background-color: #fff;
|
validator: (rule, value, callback) => {
|
||||||
margin: 28rpx;
|
this.$refs.breedingForm.clearValidate(rule.field);
|
||||||
padding: 28rpx;
|
value.trim() !== '' ? callback() : callback('不能为空');
|
||||||
border-radius: 14rpx;
|
},
|
||||||
}
|
trigger: ['change', 'blur']
|
||||||
.title {
|
}
|
||||||
font-weight: 500;
|
})
|
||||||
font-size: 34rpx;
|
},
|
||||||
|
// 校验
|
||||||
&::before {
|
async validate() {
|
||||||
width: 8rpx;
|
return await this.$refs.breedingForm.validate();;
|
||||||
height: 26rpx;
|
},
|
||||||
border-radius: 4rpx;
|
},
|
||||||
background-color: #0122c7;
|
}
|
||||||
content: "";
|
</script>
|
||||||
display: inline-block;
|
|
||||||
margin-right: 8rpx;
|
<style lang="scss">
|
||||||
}
|
.card {
|
||||||
}
|
background-color: #fff;
|
||||||
|
margin: 28rpx;
|
||||||
.delete {
|
padding: 28rpx;
|
||||||
margin: 22rpx 0;
|
margin-top: 0;
|
||||||
// margin-bottom: 40rpx;
|
padding-top: 0;
|
||||||
width: 100%;
|
border-radius: 0 0 14rpx 14rpx;
|
||||||
height: 64rpx;
|
}
|
||||||
line-height: 64rpx;
|
|
||||||
background: #f56c6c;
|
.tit {
|
||||||
border-radius: 14rpx;
|
margin: 28rpx 28rpx 0 28rpx;
|
||||||
font-size: 28rpx;
|
padding: 28rpx 28rpx 0 28rpx;
|
||||||
color: #fff;
|
border-radius: 14rpx 14rpx 0 0;
|
||||||
text-align: center;
|
background-color: $theme-oa-color;
|
||||||
}
|
color: white;
|
||||||
|
height: 100rpx;
|
||||||
.plus {
|
display: flex;
|
||||||
margin: 22rpx 0;
|
justify-content: space-between;
|
||||||
// margin-bottom: 40rpx;
|
}
|
||||||
width: 100%;
|
.title {
|
||||||
height: 64rpx;
|
font-weight: 500;
|
||||||
line-height: 64rpx;
|
font-size: 34rpx;
|
||||||
background: $theme-oa-color;
|
|
||||||
border-radius: 14rpx;
|
&::before {
|
||||||
font-size: 28rpx;
|
width: 8rpx;
|
||||||
color: #fff;
|
height: 26rpx;
|
||||||
text-align: center;
|
border-radius: 4rpx;
|
||||||
}
|
background-color: #0122c7;
|
||||||
|
content: "";
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 8rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete {
|
||||||
|
margin: 22rpx 0;
|
||||||
|
// margin-bottom: 40rpx;
|
||||||
|
width: 100%;
|
||||||
|
height: 64rpx;
|
||||||
|
line-height: 64rpx;
|
||||||
|
background: #f56c6c;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plus {
|
||||||
|
margin: 22rpx 0;
|
||||||
|
// margin-bottom: 40rpx;
|
||||||
|
width: 100%;
|
||||||
|
height: 64rpx;
|
||||||
|
line-height: 64rpx;
|
||||||
|
background: $theme-oa-color;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -1,66 +1,103 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="card">
|
<view>
|
||||||
<view class="title">修房</view>
|
<view class="tit">
|
||||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
<text v-if="readonly">更新时间: {{update_time}}</text>
|
||||||
<u-form-item labelWidth="auto" label="修房类型" required prop="shop_front" borderBottom>
|
<text>修房</text>
|
||||||
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;">
|
</view>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<view class="card">
|
||||||
v-for="(item, index) in [{value:1,label:'自建'},{value:0,label:'外包'}]" :key="index" :label="item.label"
|
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||||
:name="item.value">
|
<u-form-item labelWidth="auto" label="修房类型" required prop="construction_type" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group :disabled="readonly" v-model="formData.construction_type" style="margin: 16rpx;">
|
||||||
</u-radio-group>
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
</u-form-item>
|
v-for="(item, index) in [{value:1,label:'自建'},{value:0,label:'外包'}]" :key="index" :label="item.label"
|
||||||
<u-form-item labelWidth="auto" label="建设面积" required prop="cultivated_area" borderBottom>
|
:name="item.value">
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面面积"></u--input>
|
</u-radio>
|
||||||
</u-form-item>
|
</u-radio-group>
|
||||||
<u-form-item labelWidth="auto" label="房屋风格" required prop="cultivated_area" borderBottom>
|
</u-form-item>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<u-form-item labelWidth="auto" label="建设面积(m²)" required prop="construction_area" borderBottom>
|
||||||
</u-form-item>
|
<u--input :readonly="readonly" type="number" v-model="formData.construction_area" placeholder="请输入建设面积(m²)"></u--input>
|
||||||
<u-form-item labelWidth="auto" label="修建地址" required prop="notes" borderBottom>
|
</u-form-item>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
<u-form-item labelWidth="auto" label="房屋风格" required prop="house_style" borderBottom>
|
||||||
</u-form-item>
|
<u--input :readonly="readonly" v-model="formData.house_style" placeholder="请输入房屋风格"></u--input>
|
||||||
<u-form-item labelWidth="auto" label="预算" required prop="notes" borderBottom>
|
</u-form-item>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入服务对象"></u--input>
|
<u-form-item labelWidth="auto" label="修建地址" required prop="construction_site" borderBottom>
|
||||||
</u-form-item>
|
<u--input :readonly="readonly" v-model="formData.construction_site" placeholder="请输入修建地址"></u--input>
|
||||||
<u-form-item labelWidth="auto" label="有无绿化" required prop="planting_company" borderBottom>
|
</u-form-item>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-form-item labelWidth="auto" label="预算" required prop="budget" borderBottom>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u--input :readonly="readonly" v-model="formData.budget" placeholder="请输入预算"></u--input>
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
</u-form-item>
|
||||||
:name="item.value">
|
<u-form-item labelWidth="auto" label="有无绿化" required prop="afforest" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group :disabled="readonly" v-model="formData.afforest" style="margin: 16rpx;">
|
||||||
</u-radio-group>
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
</u-form-item>
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
<u-form-item labelWidth="auto" label="有无装修" required prop="planting_company" borderBottom>
|
:name="item.value">
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
</u-radio>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
</u-radio-group>
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
</u-form-item>
|
||||||
:name="item.value">
|
<u-form-item labelWidth="auto" label="有无装修" required prop="fitment" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group :disabled="readonly" v-model="formData.fitment" style="margin: 16rpx;">
|
||||||
</u-radio-group>
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
</u-form-item>
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
<u-form-item labelWidth="auto" label="房屋类型" required prop="planting_company" borderBottom>
|
:name="item.value">
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
</u-radio>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
</u-radio-group>
|
||||||
v-for="(item, index) in [{value:1,label:'私人'},{value:0,label:'公共建设'}]" :key="index" :label="item.label"
|
</u-form-item>
|
||||||
:name="item.value">
|
<u-form-item labelWidth="auto" label="房屋类型" required prop="house_type" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group :disabled="readonly" v-model="formData.house_type" style="margin: 16rpx;">
|
||||||
</u-radio-group>
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
</u-form-item>
|
v-for="(item, index) in [{value:1,label:'私人'},{value:0,label:'公共建设'}]" :key="index" :label="item.label"
|
||||||
<u-form-item labelWidth="auto" label="修建地照片" required prop="planting_company" borderBottom>
|
:name="item.value">
|
||||||
|
</u-radio>
|
||||||
</u-form-item>
|
</u-radio-group>
|
||||||
</u--form>
|
</u-form-item>
|
||||||
|
<u-form-item labelWidth="auto" label="修建地照片" required prop="construction_site_img" borderBottom>
|
||||||
|
<u-upload :fileList="formData.construction_site_img?[{url:formData.construction_site_img}]:[]"
|
||||||
|
@afterRead="afterReadAvatar" @delete="formData.construction_site_img=''" :deletable="!readonly" :maxCount="1" width="250rpx" height="180rpx">
|
||||||
|
<view class="uplode">
|
||||||
|
<u-icon name="plus-circle-fill" color="#0022C7" size="28"></u-icon>
|
||||||
|
上传照片
|
||||||
|
<view class="up" style="opacity: 0;">
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-upload>
|
||||||
|
</u-form-item>
|
||||||
|
</u--form>
|
||||||
|
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
upLoadImage
|
||||||
|
} from "@/api/file.js"
|
||||||
export default {
|
export default {
|
||||||
|
props: {
|
||||||
|
readonly: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
datas: {
|
||||||
|
type: Object,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
update_time: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
|
||||||
formData: {
|
formData: {
|
||||||
shop_front: '', //有无门面
|
construction_type: '',
|
||||||
|
construction_area: '',
|
||||||
|
house_style: '',
|
||||||
|
construction_site: '',
|
||||||
|
budget: '',
|
||||||
|
afforest: '',
|
||||||
|
fitment: '',
|
||||||
|
house_type: '',
|
||||||
|
construction_site_img: ''
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
|
||||||
@ -68,7 +105,32 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.initRules()
|
this.initRules();
|
||||||
|
if (this.$props.readonly && this.$props.datas) {
|
||||||
|
this.formData = this.$props.datas;
|
||||||
|
let keys = Object.keys(this.formData);
|
||||||
|
keys.forEach(item => {
|
||||||
|
if (!isNaN(this.formData[item]) && this.formData[item] != '' && this.formData[item] != null && this
|
||||||
|
.formData[item] != undefined) {
|
||||||
|
parseFloat(this.formData[item]) != 'NaN' ? this.formData[item] = parseFloat(this.formData[item]) : null;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
datas(newValue, oldValue) {
|
||||||
|
if (this.$props.readonly && newValue) {
|
||||||
|
this.formData = this.$props.datas;
|
||||||
|
let keys = Object.keys(this.formData);
|
||||||
|
keys.forEach(item => {
|
||||||
|
if (!isNaN(this.formData[item]) && this.formData[item] != '' && this.formData[item] != null && this
|
||||||
|
.formData[item] != undefined) {
|
||||||
|
parseFloat(this.formData[item]) != 'NaN' ? this.formData[item] = parseFloat(this.formData[item]) :
|
||||||
|
null;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 初始化校验
|
// 初始化校验
|
||||||
@ -88,42 +150,38 @@
|
|||||||
async validate() {
|
async validate() {
|
||||||
return await this.$refs.breedingForm.validate();;
|
return await this.$refs.breedingForm.validate();;
|
||||||
},
|
},
|
||||||
// 选择土地规划
|
// 上传图片
|
||||||
changeLanPlan(e) {
|
afterReadAvatar(event) {
|
||||||
let index = e.currentTarget.dataset.index;
|
upLoadImage({
|
||||||
this.formData.planning = e.detail.value;
|
filePath: event.file.url,
|
||||||
},
|
name: 'file'
|
||||||
// 选择时间
|
}).then(res => {
|
||||||
changeDate(e) {
|
this.formData.construction_site_img = res.data.uri
|
||||||
let data = e.currentTarget.dataset;
|
})
|
||||||
this.formData[data.value] = e.detail.value;
|
},
|
||||||
},
|
|
||||||
// 新增开设店铺
|
|
||||||
pushBreedingList() {
|
|
||||||
this.formData.push({})
|
|
||||||
},
|
|
||||||
// 删除开设店铺
|
|
||||||
removeBreedingList(index) {
|
|
||||||
uni.showModal({
|
|
||||||
confirmColor: '#f56c6c',
|
|
||||||
content: '确定删除吗?',
|
|
||||||
success: (res) => {
|
|
||||||
if (res.confirm) {
|
|
||||||
this.formData.splice(index, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.card{
|
.card {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin: 28rpx;
|
margin: 28rpx;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
border-radius: 14rpx;
|
margin-top: 0;
|
||||||
|
padding-top: 0;
|
||||||
|
border-radius: 0 0 14rpx 14rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tit {
|
||||||
|
margin: 28rpx 28rpx 0 28rpx;
|
||||||
|
padding: 28rpx 28rpx 0 28rpx;
|
||||||
|
border-radius: 14rpx 14rpx 0 0;
|
||||||
|
background-color: $theme-oa-color;
|
||||||
|
color: white;
|
||||||
|
height: 100rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.title {
|
.title {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
@ -165,4 +223,24 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.uplode {
|
||||||
|
width: 250rpx;
|
||||||
|
height: 180rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-top: 30rpx;
|
||||||
|
border-radius: 15rpx;
|
||||||
|
border: 1px solid $theme-oa-color;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
color: $theme-oa-color;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.up {
|
||||||
|
position: absolute;
|
||||||
|
color: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -1,57 +1,84 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="card">
|
<view>
|
||||||
<view class="title">买卖房</view>
|
<view class="tit">
|
||||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
<text v-if="readonly">更新时间: {{update_time}}</text>
|
||||||
<u-form-item labelWidth="auto" label="地点" required prop="cultivated_area" borderBottom>
|
<text>买卖房</text>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面面积"></u--input>
|
</view>
|
||||||
</u-form-item>
|
<view class="card">
|
||||||
<u-form-item labelWidth="auto" label="房型" required prop="cultivated_area" borderBottom>
|
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<!-- <view class="title">买卖房</view> -->
|
||||||
</u-form-item>
|
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||||
<u-form-item labelWidth="auto" label="几房" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" label="地点" required prop="place" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
<u--input :readonly="readonly" v-model="formData.place" placeholder="请输入房屋地点"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="面积" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" label="房型" required prop="house_type" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入服务对象"></u--input>
|
<u--input :readonly="readonly" v-model="formData.house_type" placeholder="请输入房型"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="朝向" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" label="几房" required prop="rooms" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入服务对象"></u--input>
|
<u--input :readonly="readonly" v-model="formData.rooms" placeholder="请输入几房"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="楼层" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" label="面积(m²)" required prop="house_area" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入服务对象"></u--input>
|
<u--input :readonly="readonly" v-model="formData.house_area" type="number" placeholder="请输入房屋面积(m²)"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="装修类型" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="朝向" required prop="orientation" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u--input :readonly="readonly" v-model="formData.orientation" placeholder="请输入房屋朝向"></u--input>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
</u-form-item>
|
||||||
v-for="(item, index) in [{value:1,label:'精装'},{value:0,label:'清水'}]" :key="index" :label="item.label"
|
<u-form-item labelWidth="auto" label="楼层" required prop="floor" borderBottom>
|
||||||
:name="item.value">
|
<u--input :readonly="readonly" v-model="formData.floor" type="number" placeholder="请输入楼层"></u--input>
|
||||||
</u-radio>
|
</u-form-item>
|
||||||
</u-radio-group>
|
<u-form-item labelWidth="auto" label="装修类型" required prop="fitment" borderBottom>
|
||||||
</u-form-item>
|
<u-radio-group :disabled="readonly" v-model="formData.fitment" style="margin: 16rpx;">
|
||||||
<u-form-item labelWidth="auto" label="预算" required prop="notes" borderBottom>
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入服务对象"></u--input>
|
v-for="(item, index) in [{value:1,label:'精装'},{value:0,label:'清水'}]" :key="index" :label="item.label"
|
||||||
</u-form-item>
|
:name="item.value">
|
||||||
<u-form-item labelWidth="auto" label="付款类型" required prop="planting_company" borderBottom>
|
</u-radio>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
</u-radio-group>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
</u-form-item>
|
||||||
v-for="(item, index) in [{value:1,label:'按揭'},{value:0,label:'全款'}]" :key="index" :label="item.label"
|
<u-form-item labelWidth="auto" label="预算" required prop="budget" borderBottom>
|
||||||
:name="item.value">
|
<u--input :readonly="readonly" v-model="formData.budget" placeholder="请输入预算"></u--input>
|
||||||
</u-radio>
|
</u-form-item>
|
||||||
</u-radio-group>
|
<u-form-item labelWidth="auto" label="付款类型" required prop="payment_type" borderBottom>
|
||||||
</u-form-item>
|
<u-radio-group :disabled="readonly" v-model="formData.payment_type" style="margin: 16rpx;">
|
||||||
</u-form-item>
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
</u--form>
|
v-for="(item, index) in [{value:1,label:'按揭'},{value:0,label:'全款'}]" :key="index" :label="item.label"
|
||||||
|
:name="item.value">
|
||||||
|
</u-radio>
|
||||||
|
</u-radio-group>
|
||||||
|
</u-form-item>
|
||||||
|
</u-form-item>
|
||||||
|
</u--form>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
props: {
|
||||||
|
readonly: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
datas: {
|
||||||
|
type: Object,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
update_time: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
|
||||||
formData: {
|
formData: {
|
||||||
shop_front: '', //有无门面
|
place: "",
|
||||||
|
house_type: "",
|
||||||
|
rooms: "",
|
||||||
|
house_area: "",
|
||||||
|
orientation:"",
|
||||||
|
floor: "",
|
||||||
|
fitment: "",
|
||||||
|
budget: "",
|
||||||
|
payment_type: ""
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
|
||||||
@ -59,7 +86,32 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.initRules()
|
this.initRules();
|
||||||
|
if (this.$props.readonly && this.$props.datas) {
|
||||||
|
this.formData = this.$props.datas;
|
||||||
|
let keys = Object.keys(this.formData);
|
||||||
|
keys.forEach(item => {
|
||||||
|
if (!isNaN(this.formData[item]) && this.formData[item] != '' && this.formData[item] != null && this
|
||||||
|
.formData[item] != undefined) {
|
||||||
|
parseFloat(this.formData[item]) != 'NaN' ? this.formData[item] = parseFloat(this.formData[item]) : null;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
datas(newValue, oldValue) {
|
||||||
|
if (this.$props.readonly && newValue) {
|
||||||
|
this.formData = this.$props.datas;
|
||||||
|
let keys = Object.keys(this.formData);
|
||||||
|
keys.forEach(item => {
|
||||||
|
if (!isNaN(this.formData[item]) && this.formData[item] != '' && this.formData[item] != null && this
|
||||||
|
.formData[item] != undefined) {
|
||||||
|
parseFloat(this.formData[item]) != 'NaN' ? this.formData[item] = parseFloat(this.formData[item]) :
|
||||||
|
null;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 初始化校验
|
// 初始化校验
|
||||||
@ -79,42 +131,29 @@
|
|||||||
async validate() {
|
async validate() {
|
||||||
return await this.$refs.breedingForm.validate();;
|
return await this.$refs.breedingForm.validate();;
|
||||||
},
|
},
|
||||||
// 选择土地规划
|
|
||||||
changeLanPlan(e) {
|
|
||||||
let index = e.currentTarget.dataset.index;
|
|
||||||
this.formData.planning = e.detail.value;
|
|
||||||
},
|
|
||||||
// 选择时间
|
|
||||||
changeDate(e) {
|
|
||||||
let data = e.currentTarget.dataset;
|
|
||||||
this.formData[data.value] = e.detail.value;
|
|
||||||
},
|
|
||||||
// 新增开设店铺
|
|
||||||
pushBreedingList() {
|
|
||||||
this.formData.push({})
|
|
||||||
},
|
|
||||||
// 删除开设店铺
|
|
||||||
removeBreedingList(index) {
|
|
||||||
uni.showModal({
|
|
||||||
confirmColor: '#f56c6c',
|
|
||||||
content: '确定删除吗?',
|
|
||||||
success: (res) => {
|
|
||||||
if (res.confirm) {
|
|
||||||
this.formData.splice(index, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.card{
|
.card {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin: 28rpx;
|
margin: 28rpx;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
border-radius: 14rpx;
|
margin-top: 0;
|
||||||
|
padding-top: 0;
|
||||||
|
border-radius: 0 0 14rpx 14rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tit {
|
||||||
|
margin: 28rpx 28rpx 0 28rpx;
|
||||||
|
padding: 28rpx 28rpx 0 28rpx;
|
||||||
|
border-radius: 14rpx 14rpx 0 0;
|
||||||
|
background-color: $theme-oa-color;
|
||||||
|
color: white;
|
||||||
|
height: 100rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.title {
|
.title {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
@ -1,318 +1,331 @@
|
|||||||
<!-- 常住人口 -->
|
<!-- 常住人口 -->
|
||||||
<template>
|
<template>
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<view class="title">常住人口</view>
|
<view class="title">常住人口</view>
|
||||||
<u--form labelPosition="left" :model="residents" :rules="rules" ref="residentsForm">
|
<u--form labelPosition="left" :model="residents" :rules="rules" ref="residentsForm">
|
||||||
<block value="人口">
|
<block value="人口">
|
||||||
<block value="人员信息" v-for="(item, family_index) in residents.family" :key="'user'+family_index">
|
<block value="人员信息" v-for="(item, family_index) in residents.family" :key="'user'+family_index">
|
||||||
<u-form-item label="姓名" required prop="family.name" borderBottom>
|
<u-form-item label="姓名" required prop="family.name" borderBottom>
|
||||||
<u--input v-model="item.name" :readonly="readonly" placeholder="请输入姓名"></u--input>
|
<u--input v-model="item.name" :readonly="readonly" placeholder="请输入姓名"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<picker mode="date" value="1990-01-01" @change="changebirth_time" :disabled="readonly" :data-index="index">
|
<picker mode="date" value="1990-01-01" @change="changebirth_time" :disabled="readonly" :data-index="index">
|
||||||
<u-form-item labelWidth="auto" label="出生日期" required prop="family.birth_time" borderBottom>
|
<u-form-item labelWidth="auto" label="出生日期" required prop="family.birth_time" borderBottom>
|
||||||
<u--input :value="item.birth_time" placeholder="请选择出生日期" readonly></u--input>
|
<u--input :value="item.birth_time" placeholder="请选择出生日期" readonly></u--input>
|
||||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</picker>
|
</picker>
|
||||||
<picker mode="selector" :range="situationList" @change="changesituation" :disabled="readonly" :data-index="index">
|
<picker mode="selector" :range="situationList" @change="changesituation" :disabled="readonly" :data-index="index">
|
||||||
<u-form-item labelWidth="auto" label="就业情况" required prop="family.situation" borderBottom>
|
<u-form-item labelWidth="auto" label="就业情况" required prop="family.situation" borderBottom>
|
||||||
<u--input :value="situationList[item.situation]" placeholder="请选择就业情况" readonly></u--input>
|
<u--input :value="situationList[item.situation]" placeholder="请选择就业情况" readonly></u--input>
|
||||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</picker>
|
</picker>
|
||||||
<u-form-item labelWidth="auto" label="技能特长" required prop="family" borderBottom>
|
<u-form-item labelWidth="auto" label="技能特长" required prop="family" borderBottom>
|
||||||
<u--input v-model="item.skills" :readonly="readonly" placeholder="请输入技能特长"></u--input>
|
<u--input v-model="item.skills" :readonly="readonly" placeholder="请输入技能特长"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<button v-if="!readonly" class="delete"
|
<button v-if="!readonly" class="delete"
|
||||||
@click="removeFamily(index)">删除以上信息</button>
|
@click="removeFamily(index)">删除以上信息</button>
|
||||||
</block>
|
</block>
|
||||||
<button v-if="!readonly" class="plus" @click="pushFamily">添加常住人口</button>
|
<button v-if="!readonly" class="plus" @click="pushFamily">添加常住人口</button>
|
||||||
</block>
|
</block>
|
||||||
<block value="婴幼儿信息">
|
<block value="婴幼儿信息">
|
||||||
<u-form-item labelWidth="auto" label="是否存在学生、婴幼儿" required prop="child" borderBottom>
|
<u-form-item labelWidth="auto" label="是否存在学生、婴幼儿" required prop="child" borderBottom>
|
||||||
<u-radio-group v-model="residents.child" :disabled="readonly" style="margin: 16rpx;">
|
<u-radio-group v-model="residents.child" :disabled="readonly" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<block value="是" v-if="residents.child>0" v-for="(item,child_arr_index) in residents.child_arr" :key="'child'+child_arr_index">
|
<block value="是" v-if="residents.child>0" v-for="(item,child_arr_index) in residents.child_arr" :key="'child'+child_arr_index">
|
||||||
<u-form-item label="年龄" required prop="child_arr.age" borderBottom>
|
<u-form-item label="年龄" required prop="child_arr.age" borderBottom>
|
||||||
<u--input v-model="item.age" :readonly="readonly" placeholder="请输入年龄" type="number" maxlength="2"></u--input>
|
<u--input v-model="item.age" :readonly="readonly" placeholder="请输入年龄" type="number" maxlength="2"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<block v-if="item.age<4">
|
<block v-if="item.age<4">
|
||||||
<u-form-item labelWidth="auto" label="喂养方式" borderBottom>
|
<u-form-item labelWidth="auto" label="喂养方式" borderBottom>
|
||||||
<u-radio-group v-model="item.feeding" :disabled="readonly" style="margin: 16rpx;">
|
<u-radio-group v-model="item.feeding" :disabled="readonly" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'母乳'},{value:0,label:'奶粉'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'母乳'},{value:0,label:'奶粉'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<u-form-item label="年级" borderBottom>
|
<u-form-item label="年级" borderBottom>
|
||||||
<u--input v-model="item.grade" :readonly="readonly" placeholder="请输入年级"></u--input>
|
<u--input v-model="item.grade" :readonly="readonly" placeholder="请输入年级"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="是否补课" borderBottom>
|
<u-form-item labelWidth="auto" label="是否补课" borderBottom>
|
||||||
<u-radio-group v-model="item.is_lesson" style="margin: 16rpx;" :disabled="readonly">
|
<u-radio-group v-model="item.is_lesson" style="margin: 16rpx;" :disabled="readonly">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item v-if="item.is_lesson>0" label-width="auto" labelPosition="top" label="补课内容" borderBottom>
|
<u-form-item v-if="item.is_lesson>0" label-width="auto" labelPosition="top" label="补课内容" borderBottom>
|
||||||
<u--textarea v-model="item.lessons" :disabled="readonly" autoHeight placeholder="请输入需要的课程" border="surround"
|
<u--textarea v-model="item.lessons" :disabled="readonly" autoHeight placeholder="请输入需要的课程" border="surround"
|
||||||
count></u--textarea>
|
count></u--textarea>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</block>
|
</block>
|
||||||
<u-form-item label-width="auto" labelPosition="top" label="备注" borderBottom>
|
<u-form-item label-width="auto" labelPosition="top" label="备注" borderBottom>
|
||||||
<u--textarea v-model="item.notes" autoHeight :disabled="readonly"placeholder="请输入备注" border="surround" count></u--textarea>
|
<u--textarea v-model="item.notes" autoHeight :disabled="readonly"placeholder="请输入备注" border="surround" count></u--textarea>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<button v-if="residents.child_arr.length>1&&!readonly" class="delete"
|
<button v-if="residents.child_arr.length>1&&!readonly" class="delete"
|
||||||
@click="removeChildArr(index)">删除以上信息</button>
|
@click="removeChildArr(index)">删除以上信息</button>
|
||||||
</block>
|
</block>
|
||||||
<button v-if="residents.child>0&&!readonly" class="plus" @click="pushChildArr">添加学生、婴幼儿</button>
|
<button v-if="residents.child>0&&!readonly" class="plus" @click="pushChildArr">添加学生、婴幼儿</button>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
</u--form>
|
</u--form>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { Toast } from "../../libs/uniApi"
|
import { Toast } from "../../libs/uniApi"
|
||||||
export default {
|
export default {
|
||||||
props:{
|
props:{
|
||||||
readonly: {
|
readonly: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
datas: {
|
datas: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null
|
default: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
situationList: [ "做工地的","厂里打工","公司职员","政府上班","种地","在家赋闲","其他"],
|
situationList: [ "做工地的","厂里打工","公司职员","政府上班","种地","在家赋闲","其他"],
|
||||||
// 常住人口
|
// 常住人口
|
||||||
residents: {
|
residents: {
|
||||||
family: [
|
family: [
|
||||||
// {
|
// {
|
||||||
// name: '',
|
// name: '',
|
||||||
// birth_time: '',
|
// birth_time: '',
|
||||||
// situation: '', // 工作
|
// situation: '', // 工作
|
||||||
// skills: '', // 技能
|
// skills: '', // 技能
|
||||||
// }
|
// }
|
||||||
],
|
],
|
||||||
child: '', //是否存在婴幼儿
|
child: '', //是否存在婴幼儿
|
||||||
child_arr: [ //婴幼儿列表
|
child_arr: [ //婴幼儿列表
|
||||||
{
|
{
|
||||||
age: '',
|
age: '',
|
||||||
feeding: '', //喂养方式
|
feeding: '', //喂养方式
|
||||||
grade: '', //年级
|
grade: '', //年级
|
||||||
is_lesson: '', //是否补课
|
is_lesson: '', //是否补课
|
||||||
lessons: '', //课程
|
lessons: '', //课程
|
||||||
notes: '' //备注
|
notes: '' //备注
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// family: [{
|
// family: [{
|
||||||
// name: '超出',
|
// name: '超出',
|
||||||
// birth_time: '1988-08-08',
|
// birth_time: '1988-08-08',
|
||||||
// situation: 1, // 工作
|
// situation: 1, // 工作
|
||||||
// skills: '豆腐干大锅饭', // 技能
|
// skills: '豆腐干大锅饭', // 技能
|
||||||
// }],
|
// }],
|
||||||
// child: 1, //是否存在婴幼儿
|
// child: 1, //是否存在婴幼儿
|
||||||
// child_arr: [ //婴幼儿列表
|
// child_arr: [ //婴幼儿列表
|
||||||
// {
|
// {
|
||||||
// age: '3',
|
// age: '3',
|
||||||
// feeding: 1, //喂养方式
|
// feeding: 1, //喂养方式
|
||||||
// grade: '三', //年级
|
// grade: '三', //年级
|
||||||
// is_lesson: 1, //是否补课
|
// is_lesson: 1, //是否补课
|
||||||
// lessons: '数学', //课程
|
// lessons: '数学', //课程
|
||||||
// notes: '没有' //备注
|
// notes: '没有' //备注
|
||||||
// }
|
// }
|
||||||
// ],
|
// ],
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
family: {
|
family: {
|
||||||
validator: (rule, value, callback ) => {
|
validator: (rule, value, callback ) => {
|
||||||
if (Array.isArray(value) && value.length > 0) {
|
if (Array.isArray(value) && value.length > 0) {
|
||||||
for (let i = 0; i < value.length; i++) {
|
for (let i = 0; i < value.length; i++) {
|
||||||
const item = value[i];
|
const item = value[i];
|
||||||
for (const key in item) {
|
for (const key in item) {
|
||||||
// 检查每个属性值是否为空
|
// 检查每个属性值是否为空
|
||||||
if (!item[key]&&item[key]!==0) {
|
if (!item[key]&&item[key]!==0) {
|
||||||
callback(new Error('以上四项基本信息必填'));
|
callback(new Error('以上四项基本信息必填'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 数组每个属性都不为空,校验通过
|
// 数组每个属性都不为空,校验通过
|
||||||
callback();
|
callback();
|
||||||
} else {
|
} else {
|
||||||
// 数组为空,校验未通过
|
// 数组为空,校验未通过
|
||||||
callback(new Error('数组不能为空'));
|
callback(new Error('数组不能为空'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
trigger: ['change', 'blur']
|
trigger: ['change', 'blur']
|
||||||
},
|
},
|
||||||
child: {
|
child: {
|
||||||
validator: (rule, value, callback )=>{
|
validator: (rule, value, callback )=>{
|
||||||
typeof value==='number'?callback():callback('不能为空')
|
typeof value==='number'?callback():callback('不能为空')
|
||||||
},
|
},
|
||||||
trigger: ['change', 'blur']
|
trigger: ['change', 'blur']
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
datas(newValue, oldValue){
|
datas(newValue, oldValue){
|
||||||
if(this.$props.readonly&&newValue){
|
if(this.$props.readonly&&newValue){
|
||||||
this.residents = this.$props.datas;
|
this.residents = this.$props.datas;
|
||||||
if(!isNaN(this.residents.child))this.residents.child = +this.residents.child;
|
if(!isNaN(this.residents.child))this.residents.child = +this.residents.child;
|
||||||
this.residents.family.forEach(item=>{
|
this.residents.family.forEach(item=>{
|
||||||
if(!isNaN(item.situation))item.situation = +item.situation;
|
if(!isNaN(item.situation))item.situation = +item.situation;
|
||||||
})
|
})
|
||||||
this.residents.child_arr.forEach(item=>{
|
this.residents.child_arr.forEach(item=>{
|
||||||
if(!isNaN(item.feeding))item.feeding = +item.feeding;
|
if(!isNaN(item.feeding))item.feeding = +item.feeding;
|
||||||
if(!isNaN(item.is_lesson))item.is_lesson = +item.is_lesson;
|
if(!isNaN(item.is_lesson))item.is_lesson = +item.is_lesson;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if(this.$props.readonly){
|
if(this.$props.readonly){
|
||||||
this.residents = this.$props.datas;
|
this.residents = this.$props.datas;
|
||||||
if(!isNaN(this.residents.child))this.residents.child = +this.residents.child;
|
if(!isNaN(this.residents.child))this.residents.child = +this.residents.child;
|
||||||
this.residents.family.forEach(item=>{
|
this.residents.family.forEach(item=>{
|
||||||
if(!isNaN(item.situation))item.situation = +item.situation;
|
if(!isNaN(item.situation))item.situation = +item.situation;
|
||||||
})
|
})
|
||||||
this.residents.child_arr.forEach(item=>{
|
this.residents.child_arr.forEach(item=>{
|
||||||
if(!isNaN(item.feeding))item.feeding = +item.feeding;
|
if(!isNaN(item.feeding))item.feeding = +item.feeding;
|
||||||
if(!isNaN(item.is_lesson))item.is_lesson = +item.is_lesson;
|
if(!isNaN(item.is_lesson))item.is_lesson = +item.is_lesson;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async validate() {
|
async validate() {
|
||||||
let flag = false;
|
let flag = false;
|
||||||
if(this.residents.child) this.residents.child_arr.forEach(item=>{
|
if(this.residents.child) this.residents.child_arr.forEach(item=>{
|
||||||
if(item.age==''||item.age<0||item.age>200) flag = true;
|
if(item.age==''||item.age<0||item.age>200) flag = true;
|
||||||
})
|
})
|
||||||
if(flag){
|
if(flag){
|
||||||
Toast('请输入年龄');
|
Toast('请输入年龄');
|
||||||
await this.$u.sleep(500);
|
await this.$u.sleep(500);
|
||||||
return Promise.reject();
|
return Promise.reject();
|
||||||
}
|
}
|
||||||
return this.$refs.residentsForm.validate();
|
return this.$refs.residentsForm.validate();
|
||||||
},
|
},
|
||||||
// 选择生日
|
// 选择生日
|
||||||
changebirth_time(e) {
|
changebirth_time(e) {
|
||||||
let index = e.currentTarget.dataset.index;
|
let index = e.currentTarget.dataset.index;
|
||||||
this.residents.family[index].birth_time = e.detail.value;
|
this.residents.family[index].birth_time = e.detail.value;
|
||||||
},
|
},
|
||||||
// 选择就业
|
// 选择就业
|
||||||
changesituation(e) {
|
changesituation(e) {
|
||||||
let index = e.currentTarget.dataset.index;
|
let index = e.currentTarget.dataset.index;
|
||||||
this.residents.family[index].situation = e.detail.value;
|
this.residents.family[index].situation = e.detail.value;
|
||||||
},
|
},
|
||||||
// 添加人口
|
// 添加人口
|
||||||
pushFamily() {
|
pushFamily() {
|
||||||
this.residents.family.push({
|
this.residents.family.push({
|
||||||
name: '',
|
name: '',
|
||||||
birth_time: '',
|
birth_time: '',
|
||||||
situation: '', // 工作
|
situation: '', // 工作
|
||||||
skills: '', // 技能
|
skills: '', // 技能
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 删除人口
|
// 删除人口
|
||||||
removeFamily(index) {
|
removeFamily(index) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
confirmColor: '#f56c6c',
|
confirmColor: '#f56c6c',
|
||||||
content: '确定删除吗?',
|
content: '确定删除吗?',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
this.residents.family.splice(index, 1);
|
this.residents.family.splice(index, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 添加婴幼儿
|
// 添加婴幼儿
|
||||||
pushChildArr() {
|
pushChildArr() {
|
||||||
this.residents.child_arr.push({
|
this.residents.child_arr.push({
|
||||||
age: '',
|
age: '',
|
||||||
feeding: '', //喂养方式
|
feeding: '', //喂养方式
|
||||||
grade: '', //年级
|
grade: '', //年级
|
||||||
is_lesson: '', //是否补课
|
is_lesson: '', //是否补课
|
||||||
lessons: '', //课程
|
lessons: '', //课程
|
||||||
notes: '' //备注
|
notes: '' //备注
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 删除婴幼儿
|
// 删除婴幼儿
|
||||||
removeChildArr(index) {
|
removeChildArr(index) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
confirmColor: '#f56c6c',
|
confirmColor: '#f56c6c',
|
||||||
content: '确定删除吗?',
|
content: '确定删除吗?',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
this.residents.child_arr.splice(index, 1);
|
this.residents.child_arr.splice(index, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.card{
|
.card {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin: 28rpx;
|
margin: 28rpx;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
border-radius: 14rpx;
|
margin-top: 0;
|
||||||
}
|
padding-top: 0;
|
||||||
.title {
|
border-radius: 0 0 14rpx 14rpx;
|
||||||
font-weight: 500;
|
}
|
||||||
font-size: 34rpx;
|
|
||||||
|
.tit {
|
||||||
&::before {
|
margin: 28rpx 28rpx 0 28rpx;
|
||||||
width: 8rpx;
|
padding: 28rpx 28rpx 0 28rpx;
|
||||||
height: 26rpx;
|
border-radius: 14rpx 14rpx 0 0;
|
||||||
border-radius: 4rpx;
|
background-color: $theme-oa-color;
|
||||||
background-color: #0122c7;
|
color: white;
|
||||||
content: "";
|
height: 100rpx;
|
||||||
display: inline-block;
|
display: flex;
|
||||||
margin-right: 8rpx;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
}
|
.title {
|
||||||
.delete {
|
font-weight: 500;
|
||||||
margin: 22rpx 0;
|
font-size: 34rpx;
|
||||||
// margin-bottom: 40rpx;
|
|
||||||
width: 100%;
|
&::before {
|
||||||
height: 64rpx;
|
width: 8rpx;
|
||||||
line-height: 64rpx;
|
height: 26rpx;
|
||||||
background: #f56c6c;
|
border-radius: 4rpx;
|
||||||
border-radius: 14rpx;
|
background-color: #0122c7;
|
||||||
font-size: 28rpx;
|
content: "";
|
||||||
color: #fff;
|
display: inline-block;
|
||||||
text-align: center;
|
margin-right: 8rpx;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.plus {
|
.delete {
|
||||||
margin: 22rpx 0;
|
margin: 22rpx 0;
|
||||||
// margin-bottom: 40rpx;
|
// margin-bottom: 40rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
line-height: 64rpx;
|
line-height: 64rpx;
|
||||||
background: $theme-oa-color;
|
background: #f56c6c;
|
||||||
border-radius: 14rpx;
|
border-radius: 14rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.plus {
|
||||||
|
margin: 22rpx 0;
|
||||||
|
// margin-bottom: 40rpx;
|
||||||
|
width: 100%;
|
||||||
|
height: 64rpx;
|
||||||
|
line-height: 64rpx;
|
||||||
|
background: $theme-oa-color;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -1,269 +1,282 @@
|
|||||||
<!-- 深加工 -->
|
<!-- 深加工 -->
|
||||||
<template>
|
<template>
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<view class="title">粗加工</view>
|
<view class="title">粗加工</view>
|
||||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||||
<u-form-item labelWidth="auto" label="是否在经营" required prop="shop_front" borderBottom>
|
<u-form-item labelWidth="auto" label="是否在经营" required prop="shop_front" borderBottom>
|
||||||
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<block v-if="formData.shop_front">
|
<block v-if="formData.shop_front">
|
||||||
<u-form-item labelWidth="auto" label="有无建设用地" required prop="shop_front" borderBottom>
|
<u-form-item labelWidth="auto" label="有无建设用地" required prop="shop_front" borderBottom>
|
||||||
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="面积" required prop="cultivated_area" borderBottom>
|
<u-form-item labelWidth="auto" label="面积" required prop="cultivated_area" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入面积"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入面积"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="经营地点" required prop="cultivated_area" borderBottom>
|
<u-form-item labelWidth="auto" label="经营地点" required prop="cultivated_area" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="材料来源" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" label="材料来源" required prop="notes" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无销售渠道" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无销售渠道" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无技术指导" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无技术指导" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无品牌" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无品牌" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无宣传推广" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无宣传推广" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无运输" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无运输" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="farm_tools" borderBottom>
|
<u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="farm_tools" borderBottom>
|
||||||
<u--textarea v-model="formData.farm_tools" autoHeight placeholder="请输入经营诉求" border="surround"
|
<u--textarea v-model="formData.farm_tools" autoHeight placeholder="请输入经营诉求" border="surround"
|
||||||
count></u--textarea>
|
count></u--textarea>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<u-form-item labelWidth="auto" label="有无建设用地" required prop="shop_front" borderBottom>
|
<u-form-item labelWidth="auto" label="有无建设用地" required prop="shop_front" borderBottom>
|
||||||
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<picker :range="storeTypeList" mode="selector" @change="changeLanPlan">
|
<picker :range="storeTypeList" mode="selector" @change="changeLanPlan">
|
||||||
<u-form-item labelWidth="auto" label="经营类型" required prop="planning" borderBottom>
|
<u-form-item labelWidth="auto" label="经营类型" required prop="planning" borderBottom>
|
||||||
<u--input :value="storeTypeList[formData.planning]" placeholder="请选择经营类型" disabled
|
<u--input :value="storeTypeList[formData.planning]" placeholder="请选择经营类型" disabled
|
||||||
disabledColor="#fff"></u--input>
|
disabledColor="#fff"></u--input>
|
||||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</picker>
|
</picker>
|
||||||
<u-form-item labelWidth="auto" label="经营地点" required prop="cultivated_area" borderBottom>
|
<u-form-item labelWidth="auto" label="经营地点" required prop="cultivated_area" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="人数" required prop="cultivated_area" borderBottom>
|
<u-form-item labelWidth="auto" label="人数" required prop="cultivated_area" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无食堂" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无食堂" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="材料来源" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" label="材料来源" required prop="notes" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="自动化办公程度" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" label="自动化办公程度" required prop="notes" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无用工需求" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无用工需求" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无品牌" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无品牌" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无宣传推广" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无宣传推广" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="库存情况" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" label="库存情况" required prop="notes" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="有无运输" required prop="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无运输" required prop="planting_company" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="farm_tools" borderBottom>
|
<u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="farm_tools" borderBottom>
|
||||||
<u--textarea v-model="formData.farm_tools" autoHeight placeholder="请输入经营诉求" border="surround"
|
<u--textarea v-model="formData.farm_tools" autoHeight placeholder="请输入经营诉求" border="surround"
|
||||||
count></u--textarea>
|
count></u--textarea>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</block>
|
</block>
|
||||||
</u--form>
|
</u--form>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
||||||
formData: {
|
formData: {
|
||||||
shop_front: '', //有无门面
|
shop_front: '', //有无门面
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.initRules()
|
this.initRules()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 初始化校验
|
// 初始化校验
|
||||||
initRules() {
|
initRules() {
|
||||||
let arr = Object.keys(this.formData);
|
let arr = Object.keys(this.formData);
|
||||||
arr.forEach(key => {
|
arr.forEach(key => {
|
||||||
this.rules[key] = {
|
this.rules[key] = {
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
this.$refs.breedingForm.clearValidate(rule.field);
|
this.$refs.breedingForm.clearValidate(rule.field);
|
||||||
value.trim() !== '' ? callback() : callback('不能为空');
|
value.trim() !== '' ? callback() : callback('不能为空');
|
||||||
},
|
},
|
||||||
trigger: ['change', 'blur']
|
trigger: ['change', 'blur']
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 校验
|
// 校验
|
||||||
async validate() {
|
async validate() {
|
||||||
return await this.$refs.breedingForm.validate();;
|
return await this.$refs.breedingForm.validate();;
|
||||||
},
|
},
|
||||||
// 选择土地规划
|
// 选择土地规划
|
||||||
changeLanPlan(e) {
|
changeLanPlan(e) {
|
||||||
let index = e.currentTarget.dataset.index;
|
let index = e.currentTarget.dataset.index;
|
||||||
this.formData.planning = e.detail.value;
|
this.formData.planning = e.detail.value;
|
||||||
},
|
},
|
||||||
// 选择时间
|
// 选择时间
|
||||||
changeDate(e) {
|
changeDate(e) {
|
||||||
let data = e.currentTarget.dataset;
|
let data = e.currentTarget.dataset;
|
||||||
this.formData[data.value] = e.detail.value;
|
this.formData[data.value] = e.detail.value;
|
||||||
},
|
},
|
||||||
// 新增开设店铺
|
// 新增开设店铺
|
||||||
pushBreedingList() {
|
pushBreedingList() {
|
||||||
this.formData.push({})
|
this.formData.push({})
|
||||||
},
|
},
|
||||||
// 删除开设店铺
|
// 删除开设店铺
|
||||||
removeBreedingList(index) {
|
removeBreedingList(index) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
confirmColor: '#f56c6c',
|
confirmColor: '#f56c6c',
|
||||||
content: '确定删除吗?',
|
content: '确定删除吗?',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
this.formData.splice(index, 1);
|
this.formData.splice(index, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.card{
|
.card {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin: 28rpx;
|
margin: 28rpx;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
border-radius: 14rpx;
|
margin-top: 0;
|
||||||
}
|
padding-top: 0;
|
||||||
.title {
|
border-radius: 0 0 14rpx 14rpx;
|
||||||
font-weight: 500;
|
}
|
||||||
font-size: 34rpx;
|
|
||||||
|
.tit {
|
||||||
&::before {
|
margin: 28rpx 28rpx 0 28rpx;
|
||||||
width: 8rpx;
|
padding: 28rpx 28rpx 0 28rpx;
|
||||||
height: 26rpx;
|
border-radius: 14rpx 14rpx 0 0;
|
||||||
border-radius: 4rpx;
|
background-color: $theme-oa-color;
|
||||||
background-color: #0122c7;
|
color: white;
|
||||||
content: "";
|
height: 100rpx;
|
||||||
display: inline-block;
|
display: flex;
|
||||||
margin-right: 8rpx;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
}
|
.title {
|
||||||
|
font-weight: 500;
|
||||||
.delete {
|
font-size: 34rpx;
|
||||||
margin: 22rpx 0;
|
|
||||||
// margin-bottom: 40rpx;
|
&::before {
|
||||||
width: 100%;
|
width: 8rpx;
|
||||||
height: 64rpx;
|
height: 26rpx;
|
||||||
line-height: 64rpx;
|
border-radius: 4rpx;
|
||||||
background: #f56c6c;
|
background-color: #0122c7;
|
||||||
border-radius: 14rpx;
|
content: "";
|
||||||
font-size: 28rpx;
|
display: inline-block;
|
||||||
color: #fff;
|
margin-right: 8rpx;
|
||||||
text-align: center;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.plus {
|
.delete {
|
||||||
margin: 22rpx 0;
|
margin: 22rpx 0;
|
||||||
// margin-bottom: 40rpx;
|
// margin-bottom: 40rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
line-height: 64rpx;
|
line-height: 64rpx;
|
||||||
background: $theme-oa-color;
|
background: #f56c6c;
|
||||||
border-radius: 14rpx;
|
border-radius: 14rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.plus {
|
||||||
|
margin: 22rpx 0;
|
||||||
|
// margin-bottom: 40rpx;
|
||||||
|
width: 100%;
|
||||||
|
height: 64rpx;
|
||||||
|
line-height: 64rpx;
|
||||||
|
background: $theme-oa-color;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
File diff suppressed because it is too large
Load Diff
@ -42,8 +42,6 @@
|
|||||||
payMoney: {
|
payMoney: {
|
||||||
money: ''
|
money: ''
|
||||||
},
|
},
|
||||||
// 微信支付信息
|
|
||||||
payData: null,
|
|
||||||
payTimer: null,
|
payTimer: null,
|
||||||
timeCount: 5,
|
timeCount: 5,
|
||||||
task_id: -1, //任务id,当为任务时,不可自选充值金额
|
task_id: -1, //任务id,当为任务时,不可自选充值金额
|
||||||
@ -64,28 +62,6 @@
|
|||||||
this.loadTask();
|
this.loadTask();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
|
||||||
if(this.payData){
|
|
||||||
payStatus({
|
|
||||||
order_id: payData.order_id,
|
|
||||||
from: payData.from,
|
|
||||||
}).then((status)=>{
|
|
||||||
uni.showToast({
|
|
||||||
icon: status.data.pay_status?'success':'none',
|
|
||||||
title: status.data.pay_status?'支付成功':'支付失败'
|
|
||||||
})
|
|
||||||
if(this.task_id>0){
|
|
||||||
uni.$emit('upBuyShare');
|
|
||||||
uni.navigateBack();
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
userInfo().then(user=>{
|
|
||||||
this.$store.commit('setUserInfo', user.data);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
changePrice(index){
|
changePrice(index){
|
||||||
if(this.changeMoney == index)this.changeMoney = -1;
|
if(this.changeMoney == index)this.changeMoney = -1;
|
||||||
@ -110,7 +86,7 @@
|
|||||||
pay(){
|
pay(){
|
||||||
if(!this.payMoney.money)return Toast('请先填写充值金额!')
|
if(!this.payMoney.money)return Toast('请先填写充值金额!')
|
||||||
if(this.payMoney.money<=0)return Toast('充值金额不能小于0!')
|
if(this.payMoney.money<=0)return Toast('充值金额不能小于0!')
|
||||||
if(!this.payTimer){
|
if(this.payTimer==null){
|
||||||
this.goRecharge();
|
this.goRecharge();
|
||||||
this.payTimer = setInterval(()=>{
|
this.payTimer = setInterval(()=>{
|
||||||
this.timeCount--;
|
this.timeCount--;
|
||||||
@ -135,7 +111,6 @@
|
|||||||
queryData.task_id = this.task_id;
|
queryData.task_id = this.task_id;
|
||||||
}
|
}
|
||||||
let { data } = await recharge(queryData);
|
let { data } = await recharge(queryData);
|
||||||
this.payData = data;
|
|
||||||
let res = await payWay({
|
let res = await payWay({
|
||||||
order_id: data.order_id,
|
order_id: data.order_id,
|
||||||
from: data.from,
|
from: data.from,
|
||||||
@ -171,6 +146,24 @@
|
|||||||
success: (e) => {
|
success: (e) => {
|
||||||
// console.log('成功', e);
|
// console.log('成功', e);
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
payStatus({
|
||||||
|
order_id: data.order_id,
|
||||||
|
from: data.from,
|
||||||
|
}).then((status)=>{
|
||||||
|
uni.showToast({
|
||||||
|
icon: status.data.pay_status?'success':'none',
|
||||||
|
title: status.data.pay_status?'支付成功':'支付失败'
|
||||||
|
})
|
||||||
|
if(this.task_id>0){
|
||||||
|
uni.$emit('upBuyShare');
|
||||||
|
uni.navigateBack();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
userInfo().then(user=>{
|
||||||
|
this.$store.commit('setUserInfo', user.data);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
fail: (e) => {
|
fail: (e) => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
keyName="name" @change="changeHandler" @cancel="demandShow = false" @confirm="changeDemand"></u-picker>
|
keyName="name" @change="changeHandler" @cancel="demandShow = false" @confirm="changeDemand"></u-picker>
|
||||||
</u--form>
|
</u--form>
|
||||||
<!-- <button @click="addArchives" class="btn">完成更新</button> -->
|
<!-- <button @click="addArchives" class="btn">完成更新</button> -->
|
||||||
<mybtn text="完成更新" @click="$u.throttle(addArchives, 2000)"></mybtn>
|
<mybtn text="完成更新" @click="$u.throttle(addArchives, 1500)"></mybtn>
|
||||||
<u-modal :show="modelShow" title="警告" content='确定要删除该信息吗' closeOnClickOverlay showCancelButton
|
<u-modal :show="modelShow" title="警告" content='确定要删除该信息吗' closeOnClickOverlay showCancelButton
|
||||||
@close="modelShow=false" @cancel="modelShow=false" @confirm="deleteDemand(deleteIndex)"></u-modal>
|
@close="modelShow=false" @cancel="modelShow=false" @confirm="deleteDemand(deleteIndex)"></u-modal>
|
||||||
</view>
|
</view>
|
||||||
@ -105,7 +105,6 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
listMap: new Map(),
|
|
||||||
demandShow: false,
|
demandShow: false,
|
||||||
demandLoading: false,
|
demandLoading: false,
|
||||||
demandList: [], //更多需求
|
demandList: [], //更多需求
|
||||||
@ -135,15 +134,9 @@
|
|||||||
this.task_id = +options.task_id || 0;
|
this.task_id = +options.task_id || 0;
|
||||||
this.initInformationDetails({ id: options.id });
|
this.initInformationDetails({ id: options.id });
|
||||||
this.initCategoryBusinessList();
|
this.initCategoryBusinessList();
|
||||||
this.initMap();
|
|
||||||
},
|
},
|
||||||
onShow() {},
|
onShow() {},
|
||||||
methods: {
|
methods: {
|
||||||
initMap() {
|
|
||||||
comonentList.forEach(item => {
|
|
||||||
this.listMap.set(item.id, item.name);
|
|
||||||
})
|
|
||||||
},
|
|
||||||
async initInformationDetails(id) {
|
async initInformationDetails(id) {
|
||||||
let res = await informationDetails(id);
|
let res = await informationDetails(id);
|
||||||
this.formData = res.data;
|
this.formData = res.data;
|
||||||
@ -153,6 +146,7 @@
|
|||||||
if (this.showDemandList.length == 0) return Toast('请先添加需求!');
|
if (this.showDemandList.length == 0) return Toast('请先添加需求!');
|
||||||
let refsDatas = await this.loadRefsDatas();
|
let refsDatas = await this.loadRefsDatas();
|
||||||
if (!this.updateFlag) return;
|
if (!this.updateFlag) return;
|
||||||
|
// return ;
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '正在更新...',
|
title: '正在更新...',
|
||||||
mask: true
|
mask: true
|
||||||
@ -201,10 +195,13 @@
|
|||||||
// 初始化商机分类
|
// 初始化商机分类
|
||||||
async initCategoryBusinessList() {
|
async initCategoryBusinessList() {
|
||||||
let res = await categoryBusinessList();
|
let res = await categoryBusinessList();
|
||||||
// this.demandList = res.data;
|
res.data = res.data.filter((item)=>{
|
||||||
this.demandList = res.data.filter(item => item.id == 6);
|
return item.status!=0;
|
||||||
this.demandList[0].children = this.demandList[0].children.filter(item => item.id == 7 || item.id == 8 || item
|
})
|
||||||
.id == 32);
|
this.demandList = res.data;
|
||||||
|
// this.demandList = res.data.filter(item => item.id == 6);
|
||||||
|
// this.demandList[0].children = this.demandList[0].children.filter(item => item.id == 7 || item.id == 8 || item
|
||||||
|
// .id == 32);
|
||||||
this.demandListChild = this.demandList[0].children;
|
this.demandListChild = this.demandList[0].children;
|
||||||
},
|
},
|
||||||
// 选择更多需求
|
// 选择更多需求
|
||||||
|
Loading…
x
Reference in New Issue
Block a user