新增了档案更新其他板块功能
This commit is contained in:
parent
2308cb0b4b
commit
076c2b8dfe
@ -1,176 +1,246 @@
|
|||||||
|
<template>
|
||||||
<template>
|
<view>
|
||||||
<view class="card">
|
<view class="tit">
|
||||||
<view class="title">寿宴</view>
|
<text v-if="readonly">更新时间: {{update_time}}</text>
|
||||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
<text>寿宴</text>
|
||||||
<u-form-item labelWidth="auto" label="时间" required prop="cultivated_area" borderBottom>
|
</view>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面面积"></u--input>
|
<view class="card">
|
||||||
</u-form-item>
|
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||||
<u-form-item labelWidth="auto" label="地点" required prop="cultivated_area" borderBottom>
|
<picker mode="date" @change="changeDate" :disabled="readonly">
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<u-form-item labelWidth="auto" label="时间" required prop="start_date" borderBottom>
|
||||||
</u-form-item>
|
<u--input :value="formData.start_date" style="pointer-events: none;" placeholder="请选择时间" disabled
|
||||||
<u-form-item labelWidth="auto" label="人数" required prop="notes" borderBottom>
|
disabledColor="#fff"></u--input>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="请包办" required prop="notes" borderBottom>
|
</picker>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-form-item labelWidth="auto" label="地点" required prop="address" borderBottom>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u--input v-model="formData.address" placeholder="请输入地点"></u--input>
|
||||||
v-for="(item, index) in [{value:2,label:'酒店'},{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="people_count" borderBottom>
|
||||||
</u-radio>
|
<u--input v-model="formData.people_count" type="number" placeholder="请输入人数"></u--input>
|
||||||
</u-radio-group>
|
</u-form-item>
|
||||||
</u-form-item>
|
<u-form-item labelWidth="auto" label="请包办" required prop="serve" borderBottom>
|
||||||
<u-form-item labelWidth="auto" label="有无歌舞表演" required prop="planting_company" borderBottom>
|
<u-radio-group v-model="formData.serve" 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"
|
||||||
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="perform" borderBottom>
|
||||||
<u-form-item labelWidth="auto" label="有无交通工具" required prop="planting_company" borderBottom>
|
<u-radio-group v-model="formData.perform" 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="vehicle" borderBottom>
|
||||||
<u-form-item labelWidth="auto" label="有无住宿" required prop="planting_company" borderBottom>
|
<u-radio-group v-model="formData.vehicle" 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="in_hotel" borderBottom>
|
||||||
</u--form>
|
<u-radio-group v-model="formData.in_hotel" style="margin: 16rpx;">
|
||||||
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
</view>
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
</template>
|
:name="item.value">
|
||||||
|
</u-radio>
|
||||||
<script>
|
</u-radio-group>
|
||||||
export default {
|
</u-form-item>
|
||||||
data() {
|
</u--form>
|
||||||
return {
|
|
||||||
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
</view>
|
||||||
formData: {
|
</view>
|
||||||
shop_front: '', //有无门面
|
</template>
|
||||||
},
|
|
||||||
rules: {
|
<script>
|
||||||
|
export default {
|
||||||
}
|
props: {
|
||||||
}
|
readonly: {
|
||||||
},
|
type: Boolean,
|
||||||
created() {
|
default: false
|
||||||
this.initRules()
|
},
|
||||||
},
|
datas: {
|
||||||
methods: {
|
type: Object,
|
||||||
// 初始化校验
|
default: null
|
||||||
initRules() {
|
},
|
||||||
let arr = Object.keys(this.formData);
|
update_time: {
|
||||||
arr.forEach(key => {
|
type: String,
|
||||||
this.rules[key] = {
|
default: null
|
||||||
validator: (rule, value, callback) => {
|
},
|
||||||
this.$refs.breedingForm.clearValidate(rule.field);
|
},
|
||||||
value.trim() !== '' ? callback() : callback('不能为空');
|
data() {
|
||||||
},
|
return {
|
||||||
trigger: ['change', 'blur']
|
formData: {
|
||||||
}
|
start_date: "", //时间\日期
|
||||||
})
|
address: "", //地点
|
||||||
},
|
people_count: "", //人数
|
||||||
// 校验
|
serve: "", // 包办服务
|
||||||
async validate() {
|
perform: "", //演出
|
||||||
return await this.$refs.breedingForm.validate();;
|
vehicle: "", //交通工具
|
||||||
},
|
in_hotel: "", //住宿
|
||||||
// 选择土地规划
|
},
|
||||||
changeLanPlan(e) {
|
rules: {
|
||||||
let index = e.currentTarget.dataset.index;
|
|
||||||
this.formData.planning = e.detail.value;
|
}
|
||||||
},
|
}
|
||||||
// 选择时间
|
},
|
||||||
changeDate(e) {
|
created() {
|
||||||
let data = e.currentTarget.dataset;
|
this.initRules();
|
||||||
this.formData[data.value] = e.detail.value;
|
if (this.$props.readonly && this.$props.datas) {
|
||||||
},
|
this.formData = this.$props.datas;
|
||||||
// 新增开设店铺
|
let keys = Object.keys(this.formData);
|
||||||
pushBreedingList() {
|
keys.forEach(item => {
|
||||||
this.formData.push({})
|
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;
|
||||||
removeBreedingList(index) {
|
}
|
||||||
uni.showModal({
|
})
|
||||||
confirmColor: '#f56c6c',
|
}
|
||||||
content: '确定删除吗?',
|
},
|
||||||
success: (res) => {
|
watch: {
|
||||||
if (res.confirm) {
|
datas(newValue, oldValue) {
|
||||||
this.formData.splice(index, 1);
|
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]) :
|
||||||
</script>
|
null;
|
||||||
|
}
|
||||||
<style lang="scss">
|
})
|
||||||
.card {
|
}
|
||||||
background-color: #fff;
|
}
|
||||||
margin: 28rpx;
|
},
|
||||||
padding: 28rpx;
|
methods: {
|
||||||
margin-top: 0;
|
// 初始化校验
|
||||||
padding-top: 0;
|
initRules() {
|
||||||
border-radius: 0 0 14rpx 14rpx;
|
let arr = Object.keys(this.formData);
|
||||||
}
|
arr.forEach(key => {
|
||||||
|
this.rules[key] = {
|
||||||
.tit {
|
validator: (rule, value, callback) => {
|
||||||
margin: 28rpx 28rpx 0 28rpx;
|
this.$refs.breedingForm.clearValidate(rule.field);
|
||||||
padding: 28rpx 28rpx 0 28rpx;
|
value.trim() !== '' ? callback() : callback('不能为空');
|
||||||
border-radius: 14rpx 14rpx 0 0;
|
},
|
||||||
background-color: $theme-oa-color;
|
trigger: ['change', 'blur']
|
||||||
color: white;
|
}
|
||||||
height: 100rpx;
|
})
|
||||||
display: flex;
|
},
|
||||||
justify-content: space-between;
|
// 校验
|
||||||
}
|
async validate() {
|
||||||
.title {
|
return await this.$refs.breedingForm.validate();;
|
||||||
font-weight: 500;
|
},
|
||||||
font-size: 34rpx;
|
// 选择土地规划
|
||||||
|
changeLanPlan(e) {
|
||||||
&::before {
|
let index = e.currentTarget.dataset.index;
|
||||||
width: 8rpx;
|
this.formData.planning = e.detail.value;
|
||||||
height: 26rpx;
|
},
|
||||||
border-radius: 4rpx;
|
// 选择时间
|
||||||
background-color: #0122c7;
|
changeDate(e) {
|
||||||
content: "";
|
this.formData.start_date = e.detail.value;
|
||||||
display: inline-block;
|
},
|
||||||
margin-right: 8rpx;
|
// 新增开设店铺
|
||||||
}
|
pushBreedingList() {
|
||||||
}
|
this.formData.push({})
|
||||||
|
},
|
||||||
.delete {
|
// 删除开设店铺
|
||||||
margin: 22rpx 0;
|
removeBreedingList(index) {
|
||||||
// margin-bottom: 40rpx;
|
uni.showModal({
|
||||||
width: 100%;
|
confirmColor: '#f56c6c',
|
||||||
height: 64rpx;
|
content: '确定删除吗?',
|
||||||
line-height: 64rpx;
|
success: (res) => {
|
||||||
background: #f56c6c;
|
if (res.confirm) {
|
||||||
border-radius: 14rpx;
|
this.formData.splice(index, 1);
|
||||||
font-size: 28rpx;
|
}
|
||||||
color: #fff;
|
}
|
||||||
text-align: center;
|
})
|
||||||
}
|
},
|
||||||
|
},
|
||||||
.plus {
|
}
|
||||||
margin: 22rpx 0;
|
</script>
|
||||||
// margin-bottom: 40rpx;
|
|
||||||
width: 100%;
|
<style lang="scss">
|
||||||
height: 64rpx;
|
.card {
|
||||||
line-height: 64rpx;
|
|
||||||
background: $theme-oa-color;
|
background-color: #fff;
|
||||||
border-radius: 14rpx;
|
|
||||||
font-size: 28rpx;
|
margin: 28rpx;
|
||||||
color: #fff;
|
|
||||||
text-align: center;
|
padding: 28rpx;
|
||||||
}
|
|
||||||
|
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 {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 34rpx;
|
||||||
|
|
||||||
|
&::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,176 +1,246 @@
|
|||||||
|
<template>
|
||||||
<template>
|
<view>
|
||||||
<view class="card">
|
<view class="tit">
|
||||||
<view class="title">满月酒</view>
|
<text v-if="readonly">更新时间: {{update_time}}</text>
|
||||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
<text>满月酒</text>
|
||||||
<u-form-item labelWidth="auto" label="时间" required prop="cultivated_area" borderBottom>
|
</view>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面面积"></u--input>
|
<view class="card">
|
||||||
</u-form-item>
|
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||||
<u-form-item labelWidth="auto" label="地点" required prop="cultivated_area" borderBottom>
|
<picker mode="date" @change="changeDate" :disabled="readonly">
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<u-form-item labelWidth="auto" label="时间" required prop="start_date" borderBottom>
|
||||||
</u-form-item>
|
<u--input :value="formData.start_date" style="pointer-events: none;" placeholder="请选择时间" disabled
|
||||||
<u-form-item labelWidth="auto" label="人数" required prop="notes" borderBottom>
|
disabledColor="#fff"></u--input>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="请包办" required prop="notes" borderBottom>
|
</picker>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-form-item labelWidth="auto" label="地点" required prop="address" borderBottom>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u--input v-model="formData.address" placeholder="请输入地点"></u--input>
|
||||||
v-for="(item, index) in [{value:2,label:'酒店'},{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="people_count" borderBottom>
|
||||||
</u-radio>
|
<u--input v-model="formData.people_count" type="number" placeholder="请输入人数"></u--input>
|
||||||
</u-radio-group>
|
</u-form-item>
|
||||||
</u-form-item>
|
<u-form-item labelWidth="auto" label="请包办" required prop="serve" borderBottom>
|
||||||
<u-form-item labelWidth="auto" label="有无歌舞表演" required prop="planting_company" borderBottom>
|
<u-radio-group v-model="formData.serve" 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"
|
||||||
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="perform" borderBottom>
|
||||||
<u-form-item labelWidth="auto" label="有无交通工具" required prop="planting_company" borderBottom>
|
<u-radio-group v-model="formData.perform" 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="vehicle" borderBottom>
|
||||||
<u-form-item labelWidth="auto" label="有无住宿" required prop="planting_company" borderBottom>
|
<u-radio-group v-model="formData.vehicle" 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="in_hotel" borderBottom>
|
||||||
</u--form>
|
<u-radio-group v-model="formData.in_hotel" style="margin: 16rpx;">
|
||||||
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
</view>
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
</template>
|
:name="item.value">
|
||||||
|
</u-radio>
|
||||||
<script>
|
</u-radio-group>
|
||||||
export default {
|
</u-form-item>
|
||||||
data() {
|
</u--form>
|
||||||
return {
|
|
||||||
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
</view>
|
||||||
formData: {
|
</view>
|
||||||
shop_front: '', //有无门面
|
</template>
|
||||||
},
|
|
||||||
rules: {
|
<script>
|
||||||
|
export default {
|
||||||
}
|
props: {
|
||||||
}
|
readonly: {
|
||||||
},
|
type: Boolean,
|
||||||
created() {
|
default: false
|
||||||
this.initRules()
|
},
|
||||||
},
|
datas: {
|
||||||
methods: {
|
type: Object,
|
||||||
// 初始化校验
|
default: null
|
||||||
initRules() {
|
},
|
||||||
let arr = Object.keys(this.formData);
|
update_time: {
|
||||||
arr.forEach(key => {
|
type: String,
|
||||||
this.rules[key] = {
|
default: null
|
||||||
validator: (rule, value, callback) => {
|
},
|
||||||
this.$refs.breedingForm.clearValidate(rule.field);
|
},
|
||||||
value.trim() !== '' ? callback() : callback('不能为空');
|
data() {
|
||||||
},
|
return {
|
||||||
trigger: ['change', 'blur']
|
formData: {
|
||||||
}
|
start_date: "", //时间\日期
|
||||||
})
|
address: "", //地点
|
||||||
},
|
people_count: "", //人数
|
||||||
// 校验
|
serve: "", // 包办服务
|
||||||
async validate() {
|
perform: "", //演出
|
||||||
return await this.$refs.breedingForm.validate();;
|
vehicle: "", //交通工具
|
||||||
},
|
in_hotel: "", //住宿
|
||||||
// 选择土地规划
|
},
|
||||||
changeLanPlan(e) {
|
rules: {
|
||||||
let index = e.currentTarget.dataset.index;
|
|
||||||
this.formData.planning = e.detail.value;
|
}
|
||||||
},
|
}
|
||||||
// 选择时间
|
},
|
||||||
changeDate(e) {
|
created() {
|
||||||
let data = e.currentTarget.dataset;
|
this.initRules();
|
||||||
this.formData[data.value] = e.detail.value;
|
if (this.$props.readonly && this.$props.datas) {
|
||||||
},
|
this.formData = this.$props.datas;
|
||||||
// 新增开设店铺
|
let keys = Object.keys(this.formData);
|
||||||
pushBreedingList() {
|
keys.forEach(item => {
|
||||||
this.formData.push({})
|
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;
|
||||||
removeBreedingList(index) {
|
}
|
||||||
uni.showModal({
|
})
|
||||||
confirmColor: '#f56c6c',
|
}
|
||||||
content: '确定删除吗?',
|
},
|
||||||
success: (res) => {
|
watch: {
|
||||||
if (res.confirm) {
|
datas(newValue, oldValue) {
|
||||||
this.formData.splice(index, 1);
|
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]) :
|
||||||
</script>
|
null;
|
||||||
|
}
|
||||||
<style lang="scss">
|
})
|
||||||
.card {
|
}
|
||||||
background-color: #fff;
|
}
|
||||||
margin: 28rpx;
|
},
|
||||||
padding: 28rpx;
|
methods: {
|
||||||
margin-top: 0;
|
// 初始化校验
|
||||||
padding-top: 0;
|
initRules() {
|
||||||
border-radius: 0 0 14rpx 14rpx;
|
let arr = Object.keys(this.formData);
|
||||||
}
|
arr.forEach(key => {
|
||||||
|
this.rules[key] = {
|
||||||
.tit {
|
validator: (rule, value, callback) => {
|
||||||
margin: 28rpx 28rpx 0 28rpx;
|
this.$refs.breedingForm.clearValidate(rule.field);
|
||||||
padding: 28rpx 28rpx 0 28rpx;
|
value.trim() !== '' ? callback() : callback('不能为空');
|
||||||
border-radius: 14rpx 14rpx 0 0;
|
},
|
||||||
background-color: $theme-oa-color;
|
trigger: ['change', 'blur']
|
||||||
color: white;
|
}
|
||||||
height: 100rpx;
|
})
|
||||||
display: flex;
|
},
|
||||||
justify-content: space-between;
|
// 校验
|
||||||
}
|
async validate() {
|
||||||
.title {
|
return await this.$refs.breedingForm.validate();;
|
||||||
font-weight: 500;
|
},
|
||||||
font-size: 34rpx;
|
// 选择土地规划
|
||||||
|
changeLanPlan(e) {
|
||||||
&::before {
|
let index = e.currentTarget.dataset.index;
|
||||||
width: 8rpx;
|
this.formData.planning = e.detail.value;
|
||||||
height: 26rpx;
|
},
|
||||||
border-radius: 4rpx;
|
// 选择时间
|
||||||
background-color: #0122c7;
|
changeDate(e) {
|
||||||
content: "";
|
this.formData.start_date = e.detail.value;
|
||||||
display: inline-block;
|
},
|
||||||
margin-right: 8rpx;
|
// 新增开设店铺
|
||||||
}
|
pushBreedingList() {
|
||||||
}
|
this.formData.push({})
|
||||||
|
},
|
||||||
.delete {
|
// 删除开设店铺
|
||||||
margin: 22rpx 0;
|
removeBreedingList(index) {
|
||||||
// margin-bottom: 40rpx;
|
uni.showModal({
|
||||||
width: 100%;
|
confirmColor: '#f56c6c',
|
||||||
height: 64rpx;
|
content: '确定删除吗?',
|
||||||
line-height: 64rpx;
|
success: (res) => {
|
||||||
background: #f56c6c;
|
if (res.confirm) {
|
||||||
border-radius: 14rpx;
|
this.formData.splice(index, 1);
|
||||||
font-size: 28rpx;
|
}
|
||||||
color: #fff;
|
}
|
||||||
text-align: center;
|
})
|
||||||
}
|
},
|
||||||
|
},
|
||||||
.plus {
|
}
|
||||||
margin: 22rpx 0;
|
</script>
|
||||||
// margin-bottom: 40rpx;
|
|
||||||
width: 100%;
|
<style lang="scss">
|
||||||
height: 64rpx;
|
.card {
|
||||||
line-height: 64rpx;
|
|
||||||
background: $theme-oa-color;
|
background-color: #fff;
|
||||||
border-radius: 14rpx;
|
|
||||||
font-size: 28rpx;
|
margin: 28rpx;
|
||||||
color: #fff;
|
|
||||||
text-align: center;
|
padding: 28rpx;
|
||||||
}
|
|
||||||
|
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 {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 34rpx;
|
||||||
|
|
||||||
|
&::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,189 +1,256 @@
|
|||||||
|
<template>
|
||||||
<template>
|
<view>
|
||||||
<view class="card">
|
<view class="tit">
|
||||||
<view class="title">白事</view>
|
<text v-if="readonly">更新时间: {{update_time}}</text>
|
||||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
<text>白事</text>
|
||||||
<u-form-item labelWidth="auto" label="地点" required prop="cultivated_area" borderBottom>
|
</view>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<view class="card">
|
||||||
</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="address" borderBottom>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
<u--input v-model="formData.address" 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="people_count" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u--input v-model="formData.people_count" type="number" placeholder="请输入人数"></u--input>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
</u-form-item>
|
||||||
v-for="(item, index) in [{value:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index" :label="item.label"
|
<u-form-item labelWidth="auto" label="请包办" required prop="serve" borderBottom>
|
||||||
:name="item.value">
|
<u-radio-group v-model="formData.serve" style="margin: 16rpx;">
|
||||||
</u-radio>
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
</u-radio-group>
|
v-for="(item, index) in [{value:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index"
|
||||||
</u-form-item>
|
:label="item.label" :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="perform" borderBottom>
|
||||||
:name="item.value">
|
<u-radio-group v-model="formData.perform" 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="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="host" borderBottom>
|
||||||
:name="item.value">
|
<u-radio-group v-model="formData.host" 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="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="vehicle" borderBottom>
|
||||||
:name="item.value">
|
<u-radio-group v-model="formData.vehicle" 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="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="in_hotel" borderBottom>
|
||||||
:name="item.value">
|
<u-radio-group v-model="formData.in_hotel" 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="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="in_hotel" borderBottom>
|
||||||
:name="item.value">
|
<u-radio-group v-model="formData.in_hotel" 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>
|
</u-radio>
|
||||||
|
</u-radio-group>
|
||||||
</view>
|
</u-form-item>
|
||||||
</template>
|
</u--form>
|
||||||
|
|
||||||
<script>
|
</view>
|
||||||
export default {
|
</view>
|
||||||
data() {
|
</template>
|
||||||
return {
|
|
||||||
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
<script>
|
||||||
formData: {
|
export default {
|
||||||
shop_front: '', //有无门面
|
props: {
|
||||||
},
|
readonly: {
|
||||||
rules: {
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
},
|
||||||
}
|
datas: {
|
||||||
},
|
type: Object,
|
||||||
created() {
|
default: null
|
||||||
this.initRules()
|
},
|
||||||
},
|
update_time: {
|
||||||
methods: {
|
type: String,
|
||||||
// 初始化校验
|
default: null
|
||||||
initRules() {
|
},
|
||||||
let arr = Object.keys(this.formData);
|
},
|
||||||
arr.forEach(key => {
|
data() {
|
||||||
this.rules[key] = {
|
return {
|
||||||
validator: (rule, value, callback) => {
|
formData: {
|
||||||
this.$refs.breedingForm.clearValidate(rule.field);
|
address: "", //地点
|
||||||
value.trim() !== '' ? callback() : callback('不能为空');
|
people_count: "", //人数
|
||||||
},
|
serve: "", // 包办服务
|
||||||
trigger: ['change', 'blur']
|
perform: "", //演出
|
||||||
}
|
host: "", //主持
|
||||||
})
|
vehicle: "", //交通工具
|
||||||
},
|
in_hotel: "", //住宿
|
||||||
// 校验
|
graveyard: "", //墓地
|
||||||
async validate() {
|
},
|
||||||
return await this.$refs.breedingForm.validate();;
|
rules: {
|
||||||
},
|
|
||||||
// 选择土地规划
|
}
|
||||||
changeLanPlan(e) {
|
}
|
||||||
let index = e.currentTarget.dataset.index;
|
},
|
||||||
this.formData.planning = e.detail.value;
|
created() {
|
||||||
},
|
this.initRules();
|
||||||
// 选择时间
|
if (this.$props.readonly && this.$props.datas) {
|
||||||
changeDate(e) {
|
this.formData = this.$props.datas;
|
||||||
let data = e.currentTarget.dataset;
|
let keys = Object.keys(this.formData);
|
||||||
this.formData[data.value] = e.detail.value;
|
keys.forEach(item => {
|
||||||
},
|
if (!isNaN(this.formData[item]) && this.formData[item] != '' && this.formData[item] != null && this
|
||||||
// 新增开设店铺
|
.formData[item] != undefined) {
|
||||||
pushBreedingList() {
|
parseFloat(this.formData[item]) != 'NaN' ? this.formData[item] = parseFloat(this.formData[item]) : null;
|
||||||
this.formData.push({})
|
}
|
||||||
},
|
})
|
||||||
// 删除开设店铺
|
}
|
||||||
removeBreedingList(index) {
|
},
|
||||||
uni.showModal({
|
watch: {
|
||||||
confirmColor: '#f56c6c',
|
datas(newValue, oldValue) {
|
||||||
content: '确定删除吗?',
|
if (this.$props.readonly && newValue) {
|
||||||
success: (res) => {
|
this.formData = this.$props.datas;
|
||||||
if (res.confirm) {
|
let keys = Object.keys(this.formData);
|
||||||
this.formData.splice(index, 1);
|
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;
|
||||||
},
|
}
|
||||||
}
|
})
|
||||||
</script>
|
}
|
||||||
|
}
|
||||||
<style lang="scss">
|
},
|
||||||
.card {
|
methods: {
|
||||||
background-color: #fff;
|
// 初始化校验
|
||||||
margin: 28rpx;
|
initRules() {
|
||||||
padding: 28rpx;
|
let arr = Object.keys(this.formData);
|
||||||
margin-top: 0;
|
arr.forEach(key => {
|
||||||
padding-top: 0;
|
this.rules[key] = {
|
||||||
border-radius: 0 0 14rpx 14rpx;
|
validator: (rule, value, callback) => {
|
||||||
}
|
this.$refs.breedingForm.clearValidate(rule.field);
|
||||||
|
value.trim() !== '' ? callback() : callback('不能为空');
|
||||||
.tit {
|
},
|
||||||
margin: 28rpx 28rpx 0 28rpx;
|
trigger: ['change', 'blur']
|
||||||
padding: 28rpx 28rpx 0 28rpx;
|
}
|
||||||
border-radius: 14rpx 14rpx 0 0;
|
})
|
||||||
background-color: $theme-oa-color;
|
},
|
||||||
color: white;
|
// 校验
|
||||||
height: 100rpx;
|
async validate() {
|
||||||
display: flex;
|
return await this.$refs.breedingForm.validate();;
|
||||||
justify-content: space-between;
|
},
|
||||||
}
|
// 选择土地规划
|
||||||
.title {
|
changeLanPlan(e) {
|
||||||
font-weight: 500;
|
let index = e.currentTarget.dataset.index;
|
||||||
font-size: 34rpx;
|
this.formData.planning = e.detail.value;
|
||||||
|
},
|
||||||
&::before {
|
// 选择时间
|
||||||
width: 8rpx;
|
changeDate(e) {
|
||||||
height: 26rpx;
|
this.formData.start_date = e.detail.value;
|
||||||
border-radius: 4rpx;
|
},
|
||||||
background-color: #0122c7;
|
// 新增开设店铺
|
||||||
content: "";
|
pushBreedingList() {
|
||||||
display: inline-block;
|
this.formData.push({})
|
||||||
margin-right: 8rpx;
|
},
|
||||||
}
|
// 删除开设店铺
|
||||||
}
|
removeBreedingList(index) {
|
||||||
|
uni.showModal({
|
||||||
.delete {
|
confirmColor: '#f56c6c',
|
||||||
margin: 22rpx 0;
|
content: '确定删除吗?',
|
||||||
// margin-bottom: 40rpx;
|
success: (res) => {
|
||||||
width: 100%;
|
if (res.confirm) {
|
||||||
height: 64rpx;
|
this.formData.splice(index, 1);
|
||||||
line-height: 64rpx;
|
}
|
||||||
background: #f56c6c;
|
}
|
||||||
border-radius: 14rpx;
|
})
|
||||||
font-size: 28rpx;
|
},
|
||||||
color: #fff;
|
},
|
||||||
text-align: center;
|
}
|
||||||
}
|
</script>
|
||||||
|
|
||||||
.plus {
|
<style lang="scss">
|
||||||
margin: 22rpx 0;
|
.card {
|
||||||
// margin-bottom: 40rpx;
|
|
||||||
width: 100%;
|
background-color: #fff;
|
||||||
height: 64rpx;
|
|
||||||
line-height: 64rpx;
|
margin: 28rpx;
|
||||||
background: $theme-oa-color;
|
|
||||||
border-radius: 14rpx;
|
padding: 28rpx;
|
||||||
font-size: 28rpx;
|
|
||||||
color: #fff;
|
margin-top: 0;
|
||||||
text-align: center;
|
|
||||||
}
|
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 {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 34rpx;
|
||||||
|
|
||||||
|
&::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,184 +1,254 @@
|
|||||||
|
<template>
|
||||||
<template>
|
<view>
|
||||||
<view class="card">
|
<view class="tit">
|
||||||
<view class="title">婚宴</view>
|
<text v-if="readonly">更新时间: {{update_time}}</text>
|
||||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
<text>婚宴</text>
|
||||||
<u-form-item labelWidth="auto" label="时间" required prop="cultivated_area" borderBottom>
|
</view>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面面积"></u--input>
|
<view class="card">
|
||||||
</u-form-item>
|
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||||
<u-form-item labelWidth="auto" label="地点" required prop="cultivated_area" borderBottom>
|
<picker mode="date" @change="changeDate" :disabled="readonly">
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<u-form-item labelWidth="auto" label="时间" required prop="start_date" borderBottom>
|
||||||
</u-form-item>
|
<u--input :value="formData.start_date" style="pointer-events: none;" placeholder="请选择时间" disabled disabledColor="#fff"></u--input>
|
||||||
<u-form-item labelWidth="auto" label="人数" required prop="notes" borderBottom>
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
</u-form-item>
|
||||||
</u-form-item>
|
</picker>
|
||||||
<u-form-item labelWidth="auto" label="请包办" required prop="notes" borderBottom>
|
<u-form-item labelWidth="auto" label="地点" required prop="address" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u--input v-model="formData.address" placeholder="请输入地点"></u--input>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
</u-form-item>
|
||||||
v-for="(item, index) in [{value:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index" :label="item.label"
|
<u-form-item labelWidth="auto" label="人数" required prop="people_count" borderBottom>
|
||||||
:name="item.value">
|
<u--input v-model="formData.people_count" type="number" placeholder="请输入人数"></u--input>
|
||||||
</u-radio>
|
</u-form-item>
|
||||||
</u-radio-group>
|
<u-form-item labelWidth="auto" label="请包办" required prop="serve" borderBottom>
|
||||||
</u-form-item>
|
<u-radio-group v-model="formData.serve" style="margin: 16rpx;">
|
||||||
<u-form-item labelWidth="auto" label="有无歌舞表演" required prop="planting_company" borderBottom>
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
v-for="(item, index) in [{value:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index"
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
:label="item.label" :name="item.value">
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
</u-radio>
|
||||||
:name="item.value">
|
</u-radio-group>
|
||||||
</u-radio>
|
</u-form-item>
|
||||||
</u-radio-group>
|
<u-form-item labelWidth="auto" label="有无歌舞表演" required prop="perform" borderBottom>
|
||||||
</u-form-item>
|
<u-radio-group v-model="formData.perform" style="margin: 16rpx;">
|
||||||
<u-form-item labelWidth="auto" label="有无主持仪式" required prop="planting_company" borderBottom>
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
<u-radio-group v-model="formData.planting_company" 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" :label="item.label"
|
</u-radio>
|
||||||
:name="item.value">
|
</u-radio-group>
|
||||||
</u-radio>
|
</u-form-item>
|
||||||
</u-radio-group>
|
<u-form-item labelWidth="auto" label="有无主持仪式" required prop="host" borderBottom>
|
||||||
</u-form-item>
|
<u-radio-group v-model="formData.host" style="margin: 16rpx;">
|
||||||
<u-form-item labelWidth="auto" label="有无交通工具" required prop="planting_company" borderBottom>
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
<u-radio-group v-model="formData.planting_company" 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" :label="item.label"
|
</u-radio>
|
||||||
:name="item.value">
|
</u-radio-group>
|
||||||
</u-radio>
|
</u-form-item>
|
||||||
</u-radio-group>
|
<u-form-item labelWidth="auto" label="有无交通工具" required prop="vehicle" borderBottom>
|
||||||
</u-form-item>
|
<u-radio-group v-model="formData.vehicle" style="margin: 16rpx;">
|
||||||
<u-form-item labelWidth="auto" label="有无住宿" required prop="planting_company" borderBottom>
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
<u-radio-group v-model="formData.planting_company" 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" :label="item.label"
|
</u-radio>
|
||||||
:name="item.value">
|
</u-radio-group>
|
||||||
</u-radio>
|
</u-form-item>
|
||||||
</u-radio-group>
|
<u-form-item labelWidth="auto" label="有无住宿" required prop="in_hotel" borderBottom>
|
||||||
</u-form-item>
|
<u-radio-group v-model="formData.in_hotel" style="margin: 16rpx;">
|
||||||
</u--form>
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
|
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||||
</view>
|
:name="item.value">
|
||||||
</template>
|
</u-radio>
|
||||||
|
</u-radio-group>
|
||||||
<script>
|
</u-form-item>
|
||||||
export default {
|
</u--form>
|
||||||
data() {
|
|
||||||
return {
|
</view>
|
||||||
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
</view>
|
||||||
formData: {
|
</template>
|
||||||
shop_front: '', //有无门面
|
|
||||||
},
|
<script>
|
||||||
rules: {
|
export default {
|
||||||
|
props: {
|
||||||
}
|
readonly: {
|
||||||
}
|
type: Boolean,
|
||||||
},
|
default: false
|
||||||
created() {
|
},
|
||||||
this.initRules()
|
datas: {
|
||||||
},
|
type: Object,
|
||||||
methods: {
|
default: null
|
||||||
// 初始化校验
|
},
|
||||||
initRules() {
|
update_time: {
|
||||||
let arr = Object.keys(this.formData);
|
type: String,
|
||||||
arr.forEach(key => {
|
default: null
|
||||||
this.rules[key] = {
|
},
|
||||||
validator: (rule, value, callback) => {
|
},
|
||||||
this.$refs.breedingForm.clearValidate(rule.field);
|
data() {
|
||||||
value.trim() !== '' ? callback() : callback('不能为空');
|
return {
|
||||||
},
|
formData: {
|
||||||
trigger: ['change', 'blur']
|
start_date: "", //时间\日期
|
||||||
}
|
address: "", //地点
|
||||||
})
|
people_count: "", //人数
|
||||||
},
|
serve: "", // 包办服务
|
||||||
// 校验
|
perform: "", //演出
|
||||||
async validate() {
|
host: "", //主持
|
||||||
return await this.$refs.breedingForm.validate();;
|
vehicle: "", //交通工具
|
||||||
},
|
in_hotel: "", //住宿
|
||||||
// 选择土地规划
|
},
|
||||||
changeLanPlan(e) {
|
rules: {
|
||||||
let index = e.currentTarget.dataset.index;
|
|
||||||
this.formData.planning = e.detail.value;
|
}
|
||||||
},
|
}
|
||||||
// 选择时间
|
},
|
||||||
changeDate(e) {
|
created() {
|
||||||
let data = e.currentTarget.dataset;
|
this.initRules();
|
||||||
this.formData[data.value] = e.detail.value;
|
if (this.$props.readonly && this.$props.datas) {
|
||||||
},
|
this.formData = this.$props.datas;
|
||||||
// 新增开设店铺
|
let keys = Object.keys(this.formData);
|
||||||
pushBreedingList() {
|
keys.forEach(item => {
|
||||||
this.formData.push({})
|
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;
|
||||||
removeBreedingList(index) {
|
}
|
||||||
uni.showModal({
|
})
|
||||||
confirmColor: '#f56c6c',
|
}
|
||||||
content: '确定删除吗?',
|
},
|
||||||
success: (res) => {
|
watch: {
|
||||||
if (res.confirm) {
|
datas(newValue, oldValue) {
|
||||||
this.formData.splice(index, 1);
|
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]) :
|
||||||
</script>
|
null;
|
||||||
|
}
|
||||||
<style lang="scss">
|
})
|
||||||
.card {
|
}
|
||||||
background-color: #fff;
|
}
|
||||||
margin: 28rpx;
|
},
|
||||||
padding: 28rpx;
|
methods: {
|
||||||
margin-top: 0;
|
// 初始化校验
|
||||||
padding-top: 0;
|
initRules() {
|
||||||
border-radius: 0 0 14rpx 14rpx;
|
let arr = Object.keys(this.formData);
|
||||||
}
|
arr.forEach(key => {
|
||||||
|
this.rules[key] = {
|
||||||
.tit {
|
validator: (rule, value, callback) => {
|
||||||
margin: 28rpx 28rpx 0 28rpx;
|
this.$refs.breedingForm.clearValidate(rule.field);
|
||||||
padding: 28rpx 28rpx 0 28rpx;
|
value.trim() !== '' ? callback() : callback('不能为空');
|
||||||
border-radius: 14rpx 14rpx 0 0;
|
},
|
||||||
background-color: $theme-oa-color;
|
trigger: ['change', 'blur']
|
||||||
color: white;
|
}
|
||||||
height: 100rpx;
|
})
|
||||||
display: flex;
|
},
|
||||||
justify-content: space-between;
|
// 校验
|
||||||
}
|
async validate() {
|
||||||
.title {
|
return await this.$refs.breedingForm.validate();;
|
||||||
font-weight: 500;
|
},
|
||||||
font-size: 34rpx;
|
// 选择土地规划
|
||||||
|
changeLanPlan(e) {
|
||||||
&::before {
|
let index = e.currentTarget.dataset.index;
|
||||||
width: 8rpx;
|
this.formData.planning = e.detail.value;
|
||||||
height: 26rpx;
|
},
|
||||||
border-radius: 4rpx;
|
// 选择时间
|
||||||
background-color: #0122c7;
|
changeDate(e) {
|
||||||
content: "";
|
this.formData.start_date = e.detail.value;
|
||||||
display: inline-block;
|
},
|
||||||
margin-right: 8rpx;
|
// 新增开设店铺
|
||||||
}
|
pushBreedingList() {
|
||||||
}
|
this.formData.push({})
|
||||||
|
},
|
||||||
.delete {
|
// 删除开设店铺
|
||||||
margin: 22rpx 0;
|
removeBreedingList(index) {
|
||||||
// margin-bottom: 40rpx;
|
uni.showModal({
|
||||||
width: 100%;
|
confirmColor: '#f56c6c',
|
||||||
height: 64rpx;
|
content: '确定删除吗?',
|
||||||
line-height: 64rpx;
|
success: (res) => {
|
||||||
background: #f56c6c;
|
if (res.confirm) {
|
||||||
border-radius: 14rpx;
|
this.formData.splice(index, 1);
|
||||||
font-size: 28rpx;
|
}
|
||||||
color: #fff;
|
}
|
||||||
text-align: center;
|
})
|
||||||
}
|
},
|
||||||
|
},
|
||||||
.plus {
|
}
|
||||||
margin: 22rpx 0;
|
</script>
|
||||||
// margin-bottom: 40rpx;
|
|
||||||
width: 100%;
|
<style lang="scss">
|
||||||
height: 64rpx;
|
.card {
|
||||||
line-height: 64rpx;
|
|
||||||
background: $theme-oa-color;
|
background-color: #fff;
|
||||||
border-radius: 14rpx;
|
|
||||||
font-size: 28rpx;
|
margin: 28rpx;
|
||||||
color: #fff;
|
|
||||||
text-align: center;
|
padding: 28rpx;
|
||||||
}
|
|
||||||
|
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 {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 34rpx;
|
||||||
|
|
||||||
|
&::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,64 +1,93 @@
|
|||||||
|
|
||||||
<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="宴席类型" required prop="types" borderBottom>
|
||||||
</u-form-item>
|
<u--input v-model="formData.types" placeholder="请输入宴席类型"></u--input>
|
||||||
<u-form-item labelWidth="auto" label="地点" required prop="cultivated_area" borderBottom>
|
</u-form-item>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<picker mode="date" @change="changeDate" :disabled="readonly">
|
||||||
</u-form-item>
|
<u-form-item labelWidth="auto" label="时间" required prop="start_date" borderBottom>
|
||||||
<u-form-item labelWidth="auto" label="人数" required prop="notes" borderBottom>
|
<u--input :value="formData.start_date" style="pointer-events: none;" placeholder="请选择时间" disabled
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
disabledColor="#fff"></u--input>
|
||||||
</u-form-item>
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
<u-form-item labelWidth="auto" label="请包办" required prop="notes" borderBottom>
|
</u-form-item>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
</picker>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-form-item labelWidth="auto" label="地点" required prop="address" borderBottom>
|
||||||
v-for="(item, index) in [{value:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index" :label="item.label"
|
<u--input v-model="formData.address" placeholder="请输入地点"></u--input>
|
||||||
:name="item.value">
|
</u-form-item>
|
||||||
</u-radio>
|
<u-form-item labelWidth="auto" label="人数" required prop="people_count" borderBottom>
|
||||||
</u-radio-group>
|
<u--input v-model="formData.people_count" type="number" 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="serve" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.serve" 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:2,label:'酒店'},{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="planting_company" borderBottom>
|
<u-form-item labelWidth="auto" label="有无歌舞表演" required prop="perform" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.perform" 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="vehicle" borderBottom>
|
||||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
<u-radio-group v-model="formData.vehicle" 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-item labelWidth="auto" label="有无住宿" required prop="in_hotel" borderBottom>
|
||||||
|
<u-radio-group v-model="formData.in_hotel" style="margin: 16rpx;">
|
||||||
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
|
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>
|
||||||
|
|
||||||
|
</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: '', //有无门面
|
types: "", //宴席类型
|
||||||
|
start_date: "", //时间\日期
|
||||||
|
address: "", //地点
|
||||||
|
people_count: "", //人数
|
||||||
|
serve: "", // 包办服务
|
||||||
|
perform: "", //演出
|
||||||
|
host: "", //主持
|
||||||
|
vehicle: "", //交通工具
|
||||||
|
in_hotel: "", //住宿
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
|
||||||
@ -66,7 +95,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: {
|
||||||
// 初始化校验
|
// 初始化校验
|
||||||
@ -93,8 +147,7 @@
|
|||||||
},
|
},
|
||||||
// 选择时间
|
// 选择时间
|
||||||
changeDate(e) {
|
changeDate(e) {
|
||||||
let data = e.currentTarget.dataset;
|
this.formData.start_date = e.detail.value;
|
||||||
this.formData[data.value] = e.detail.value;
|
|
||||||
},
|
},
|
||||||
// 新增开设店铺
|
// 新增开设店铺
|
||||||
pushBreedingList() {
|
pushBreedingList() {
|
||||||
@ -118,24 +171,43 @@
|
|||||||
|
|
||||||
<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 {
|
.title {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
|
@ -1,298 +1,338 @@
|
|||||||
<!-- 深加工 -->
|
<!-- 深加工 -->
|
||||||
<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="is_manage" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.is_manage" 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"
|
||||||
<block v-if="formData.shop_front">
|
:name="item.value">
|
||||||
<u-form-item labelWidth="auto" label="有无建设用地" required prop="shop_front" borderBottom>
|
</u-radio>
|
||||||
<u-radio-group v-model="formData.shop_front" 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"
|
<block v-if="formData.is_manage">
|
||||||
:name="item.value">
|
<u-form-item labelWidth="auto" label="有无建设用地" required prop="construction_land" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.construction_land" 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="land_area" borderBottom>
|
||||||
</u-form-item>
|
<u--input v-model="formData.land_area" type="number" 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="manage_place" borderBottom>
|
||||||
</u-form-item>
|
<u--input v-model="formData.manage_place" 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="source_materials" borderBottom>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u--input v-model="formData.source_materials" 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="marketing_channel" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.marketing_channel" 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="technical_guidance" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.technical_guidance" 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="brand" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.brand" 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="advertising" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.advertising" 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="transport" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.transport" 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" labelPosition="top" label="经营诉求" required prop="farm_tools" borderBottom>
|
:name="item.value">
|
||||||
<u--textarea v-model="formData.farm_tools" autoHeight placeholder="请输入经营诉求" border="surround"
|
</u-radio>
|
||||||
count></u--textarea>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</block>
|
<u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="business_appeal" borderBottom>
|
||||||
<block v-else>
|
<u--textarea v-model="formData.business_appeal" autoHeight placeholder="请输入经营诉求" border="surround"
|
||||||
<u-form-item labelWidth="auto" label="有无建设用地" required prop="shop_front" borderBottom>
|
count></u--textarea>
|
||||||
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;">
|
</u-form-item>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
</block>
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
<block v-else>
|
||||||
:name="item.value">
|
<u-form-item labelWidth="auto" label="有无建设用地" required prop="construction_land" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.construction_land" 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"
|
||||||
<picker :range="storeTypeList" mode="selector" @change="changeLanPlan">
|
:name="item.value">
|
||||||
<u-form-item labelWidth="auto" label="经营类型" required prop="planning" borderBottom>
|
</u-radio>
|
||||||
<u--input :value="storeTypeList[formData.planning]" placeholder="请选择经营类型" disabled
|
</u-radio-group>
|
||||||
disabledColor="#fff"></u--input>
|
</u-form-item>
|
||||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
<picker :range="storeTypeList" mode="selector" @change="changeLanPlan">
|
||||||
</u-form-item>
|
<u-form-item labelWidth="auto" label="经营类型" required prop="manage_type" borderBottom>
|
||||||
</picker>
|
<u--input :value="storeTypeList[formData.manage_type]" style="pointer-events: none;" placeholder="请选择经营类型"
|
||||||
<u-form-item labelWidth="auto" label="经营地点" required prop="cultivated_area" borderBottom>
|
disabled disabledColor="#fff"></u--input>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="人数" required prop="cultivated_area" borderBottom>
|
</picker>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<u-form-item labelWidth="auto" label="经营地点" required prop="manage_place" borderBottom>
|
||||||
</u-form-item>
|
<u--input v-model="formData.manage_place" 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="people_count" borderBottom>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u--input v-model="formData.people_count" 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="canteen" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.canteen" 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="notes" 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="notes" borderBottom>
|
</u-form-item>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
<u-form-item labelWidth="auto" label="材料来源" required prop="source_materials" borderBottom>
|
||||||
</u-form-item>
|
<u--input v-model="formData.source_materials" 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="automation" borderBottom>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u--input v-model="formData.automation" 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="employment" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.employment" 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="brand" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.brand" 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="advertising" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.advertising" 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="notes" 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="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="repertory" borderBottom>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u--input v-model="formData.repertory" 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="transport" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.transport" 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" labelPosition="top" label="经营诉求" required prop="farm_tools" borderBottom>
|
:name="item.value">
|
||||||
<u--textarea v-model="formData.farm_tools" autoHeight placeholder="请输入经营诉求" border="surround"
|
</u-radio>
|
||||||
count></u--textarea>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</block>
|
<u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="business_appeal" borderBottom>
|
||||||
</u--form>
|
<u--textarea v-model="formData.business_appeal" autoHeight placeholder="请输入经营诉求" border="surround"
|
||||||
</view>
|
count></u--textarea>
|
||||||
</template>
|
</u-form-item>
|
||||||
|
</block>
|
||||||
<script>
|
</u--form>
|
||||||
export default {
|
|
||||||
props:{
|
</view>
|
||||||
readonly: {
|
</view>
|
||||||
type: Boolean,
|
</template>
|
||||||
default: false
|
|
||||||
},
|
<script>
|
||||||
datas:{
|
export default {
|
||||||
type: Object,
|
props: {
|
||||||
default: null
|
readonly: {
|
||||||
}
|
type: Boolean,
|
||||||
},
|
default: false
|
||||||
data() {
|
},
|
||||||
return {
|
datas: {
|
||||||
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
type: Object,
|
||||||
formData: {
|
default: null
|
||||||
shop_front: '', //有无门面
|
},
|
||||||
manage: '',
|
update_time: {
|
||||||
// construction_land
|
type: String,
|
||||||
// type
|
default: null
|
||||||
// area
|
},
|
||||||
// count
|
},
|
||||||
// canteen
|
data() {
|
||||||
|
return {
|
||||||
},
|
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
||||||
rules: {
|
formData: {
|
||||||
|
is_manage: "", //是否拥有门面
|
||||||
}
|
construction_land: "", //有无建设用地
|
||||||
}
|
land_area: "", //面积
|
||||||
},
|
manage_place: "", //经营地点
|
||||||
created() {
|
source_materials: "", //材料来源
|
||||||
this.initRules()
|
marketing_channel: "", //有无销售渠道
|
||||||
},
|
technical_guidance: "", //有无技术指导
|
||||||
methods: {
|
brand: "", //有无品牌
|
||||||
// 初始化校验
|
advertising: "", //有无宣传推广
|
||||||
initRules() {
|
transport: "", //有无运输
|
||||||
let arr = Object.keys(this.formData);
|
business_appeal: "", //经营诉求
|
||||||
arr.forEach(key => {
|
manage_type: "", //经营类型
|
||||||
this.rules[key] = {
|
people_count: "", //人数
|
||||||
validator: (rule, value, callback) => {
|
canteen: "", //食堂
|
||||||
this.$refs.breedingForm.clearValidate(rule.field);
|
automation: "", //自动化办公程度
|
||||||
value.trim() !== '' ? callback() : callback('不能为空');
|
employment: "", //用工需求
|
||||||
},
|
repertory: "", //库存
|
||||||
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){
|
||||||
// 选择时间
|
parseFloat(this.formData[item])!='NaN'?this.formData[item] = parseFloat(this.formData[item]):null;
|
||||||
changeDate(e) {
|
}
|
||||||
let data = e.currentTarget.dataset;
|
})
|
||||||
this.formData[data.value] = e.detail.value;
|
}
|
||||||
},
|
},
|
||||||
// 新增开设店铺
|
watch: {
|
||||||
pushBreedingList() {
|
datas(newValue, oldValue) {
|
||||||
this.formData.push({})
|
if (this.$props.readonly && newValue) {
|
||||||
},
|
this.formData = this.$props.datas;
|
||||||
// 删除开设店铺
|
let keys = Object.keys(this.formData);
|
||||||
removeBreedingList(index) {
|
keys.forEach(item => {
|
||||||
uni.showModal({
|
if (!isNaN(this.formData[item])&&this.formData[item]!=''&&this.formData[item]!=null&&this.formData[item]!=undefined){
|
||||||
confirmColor: '#f56c6c',
|
parseFloat(this.formData[item])!='NaN'?this.formData[item] = parseFloat(this.formData[item]):null;
|
||||||
content: '确定删除吗?',
|
}
|
||||||
success: (res) => {
|
})
|
||||||
if (res.confirm) {
|
}
|
||||||
this.formData.splice(index, 1);
|
}
|
||||||
}
|
},
|
||||||
}
|
methods: {
|
||||||
})
|
// 初始化校验
|
||||||
},
|
initRules() {
|
||||||
},
|
let arr = Object.keys(this.formData);
|
||||||
}
|
arr.forEach(key => {
|
||||||
</script>
|
this.rules[key] = {
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
<style lang="scss">
|
this.$refs.breedingForm.clearValidate(rule.field);
|
||||||
.card {
|
value.trim() !== '' ? callback() : callback('不能为空');
|
||||||
background-color: #fff;
|
},
|
||||||
margin: 28rpx;
|
trigger: ['change', 'blur']
|
||||||
padding: 28rpx;
|
}
|
||||||
margin-top: 0;
|
})
|
||||||
padding-top: 0;
|
},
|
||||||
border-radius: 0 0 14rpx 14rpx;
|
// 校验
|
||||||
}
|
async validate() {
|
||||||
|
return await this.$refs.breedingForm.validate();;
|
||||||
.tit {
|
},
|
||||||
margin: 28rpx 28rpx 0 28rpx;
|
// 选择经营类型
|
||||||
padding: 28rpx 28rpx 0 28rpx;
|
changeLanPlan(e) {
|
||||||
border-radius: 14rpx 14rpx 0 0;
|
let index = e.currentTarget.dataset.index;
|
||||||
background-color: $theme-oa-color;
|
this.formData.manage_type = e.detail.value;
|
||||||
color: white;
|
},
|
||||||
height: 100rpx;
|
|
||||||
display: flex;
|
},
|
||||||
justify-content: space-between;
|
}
|
||||||
}
|
</script>
|
||||||
.title {
|
|
||||||
font-weight: 500;
|
<style lang="scss">
|
||||||
font-size: 34rpx;
|
.card {
|
||||||
|
|
||||||
&::before {
|
background-color: #fff;
|
||||||
width: 8rpx;
|
|
||||||
height: 26rpx;
|
margin: 28rpx;
|
||||||
border-radius: 4rpx;
|
|
||||||
background-color: #0122c7;
|
padding: 28rpx;
|
||||||
content: "";
|
|
||||||
display: inline-block;
|
margin-top: 0;
|
||||||
margin-right: 8rpx;
|
|
||||||
}
|
padding-top: 0;
|
||||||
}
|
|
||||||
|
border-radius: 0 0 14rpx 14rpx;
|
||||||
.delete {
|
|
||||||
margin: 22rpx 0;
|
}
|
||||||
// margin-bottom: 40rpx;
|
|
||||||
width: 100%;
|
|
||||||
height: 64rpx;
|
|
||||||
line-height: 64rpx;
|
.tit {
|
||||||
background: #f56c6c;
|
|
||||||
border-radius: 14rpx;
|
margin: 28rpx 28rpx 0 28rpx;
|
||||||
font-size: 28rpx;
|
|
||||||
color: #fff;
|
padding: 28rpx 28rpx 0 28rpx;
|
||||||
text-align: center;
|
|
||||||
}
|
border-radius: 14rpx 14rpx 0 0;
|
||||||
|
|
||||||
.plus {
|
background-color: $theme-oa-color;
|
||||||
margin: 22rpx 0;
|
|
||||||
// margin-bottom: 40rpx;
|
color: white;
|
||||||
width: 100%;
|
|
||||||
height: 64rpx;
|
height: 100rpx;
|
||||||
line-height: 64rpx;
|
|
||||||
background: $theme-oa-color;
|
display: flex;
|
||||||
border-radius: 14rpx;
|
|
||||||
font-size: 28rpx;
|
justify-content: space-between;
|
||||||
color: #fff;
|
|
||||||
text-align: center;
|
}
|
||||||
}
|
|
||||||
|
.title {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 34rpx;
|
||||||
|
|
||||||
|
&::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,15 +1,9 @@
|
|||||||
<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">
|
||||||
|
@ -1,282 +1,338 @@
|
|||||||
<!-- 深加工 -->
|
<!-- 粗加工 -->
|
||||||
<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="is_manage" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.is_manage" 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"
|
||||||
<block v-if="formData.shop_front">
|
:name="item.value">
|
||||||
<u-form-item labelWidth="auto" label="有无建设用地" required prop="shop_front" borderBottom>
|
</u-radio>
|
||||||
<u-radio-group v-model="formData.shop_front" 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"
|
<block v-if="formData.is_manage">
|
||||||
:name="item.value">
|
<u-form-item labelWidth="auto" label="有无建设用地" required prop="construction_land" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.construction_land" 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="land_area" borderBottom>
|
||||||
</u-form-item>
|
<u--input v-model="formData.land_area" type="number" 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="manage_place" borderBottom>
|
||||||
</u-form-item>
|
<u--input v-model="formData.manage_place" 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="source_materials" borderBottom>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u--input v-model="formData.source_materials" 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="marketing_channel" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.marketing_channel" 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="technical_guidance" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.technical_guidance" 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="brand" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.brand" 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="advertising" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.advertising" 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="transport" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.transport" 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" labelPosition="top" label="经营诉求" required prop="farm_tools" borderBottom>
|
:name="item.value">
|
||||||
<u--textarea v-model="formData.farm_tools" autoHeight placeholder="请输入经营诉求" border="surround"
|
</u-radio>
|
||||||
count></u--textarea>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</block>
|
<u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="business_appeal" borderBottom>
|
||||||
<block v-else>
|
<u--textarea v-model="formData.business_appeal" autoHeight placeholder="请输入经营诉求" border="surround"
|
||||||
<u-form-item labelWidth="auto" label="有无建设用地" required prop="shop_front" borderBottom>
|
count></u--textarea>
|
||||||
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;">
|
</u-form-item>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
</block>
|
||||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
<block v-else>
|
||||||
:name="item.value">
|
<u-form-item labelWidth="auto" label="有无建设用地" required prop="construction_land" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.construction_land" 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"
|
||||||
<picker :range="storeTypeList" mode="selector" @change="changeLanPlan">
|
:name="item.value">
|
||||||
<u-form-item labelWidth="auto" label="经营类型" required prop="planning" borderBottom>
|
</u-radio>
|
||||||
<u--input :value="storeTypeList[formData.planning]" placeholder="请选择经营类型" disabled
|
</u-radio-group>
|
||||||
disabledColor="#fff"></u--input>
|
</u-form-item>
|
||||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
<picker :range="storeTypeList" mode="selector" @change="changeLanPlan">
|
||||||
</u-form-item>
|
<u-form-item labelWidth="auto" label="经营类型" required prop="manage_type" borderBottom>
|
||||||
</picker>
|
<u--input :value="storeTypeList[formData.manage_type]" style="pointer-events: none;" placeholder="请选择经营类型"
|
||||||
<u-form-item labelWidth="auto" label="经营地点" required prop="cultivated_area" borderBottom>
|
disabled disabledColor="#fff"></u--input>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="人数" required prop="cultivated_area" borderBottom>
|
</picker>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
<u-form-item labelWidth="auto" label="经营地点" required prop="manage_place" borderBottom>
|
||||||
</u-form-item>
|
<u--input v-model="formData.manage_place" 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="people_count" borderBottom>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u--input v-model="formData.people_count" 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="canteen" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.canteen" 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="notes" 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="notes" borderBottom>
|
</u-form-item>
|
||||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
<u-form-item labelWidth="auto" label="材料来源" required prop="source_materials" borderBottom>
|
||||||
</u-form-item>
|
<u--input v-model="formData.source_materials" 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="automation" borderBottom>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u--input v-model="formData.automation" 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="employment" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.employment" 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="brand" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.brand" 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="advertising" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.advertising" 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="notes" 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="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="repertory" borderBottom>
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u--input v-model="formData.repertory" 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="transport" borderBottom>
|
||||||
</u-radio>
|
<u-radio-group v-model="formData.transport" 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" labelPosition="top" label="经营诉求" required prop="farm_tools" borderBottom>
|
:name="item.value">
|
||||||
<u--textarea v-model="formData.farm_tools" autoHeight placeholder="请输入经营诉求" border="surround"
|
</u-radio>
|
||||||
count></u--textarea>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</block>
|
<u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="business_appeal" borderBottom>
|
||||||
</u--form>
|
<u--textarea v-model="formData.business_appeal" autoHeight placeholder="请输入经营诉求" border="surround"
|
||||||
|
count></u--textarea>
|
||||||
</view>
|
</u-form-item>
|
||||||
</template>
|
</block>
|
||||||
|
</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);
|
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
||||||
value.trim() !== '' ? callback() : callback('不能为空');
|
formData: {
|
||||||
},
|
is_manage: "", //是否拥有门面
|
||||||
trigger: ['change', 'blur']
|
construction_land: "", //有无建设用地
|
||||||
}
|
land_area: "", //面积
|
||||||
})
|
manage_place: "", //经营地点
|
||||||
},
|
source_materials: "", //材料来源
|
||||||
// 校验
|
marketing_channel: "", //有无销售渠道
|
||||||
async validate() {
|
technical_guidance: "", //有无技术指导
|
||||||
return await this.$refs.breedingForm.validate();;
|
brand: "", //有无品牌
|
||||||
},
|
advertising: "", //有无宣传推广
|
||||||
// 选择土地规划
|
transport: "", //有无运输
|
||||||
changeLanPlan(e) {
|
business_appeal: "", //经营诉求
|
||||||
let index = e.currentTarget.dataset.index;
|
manage_type: "", //经营类型
|
||||||
this.formData.planning = e.detail.value;
|
people_count: "", //人数
|
||||||
},
|
canteen: "", //食堂
|
||||||
// 选择时间
|
automation: "", //自动化办公程度
|
||||||
changeDate(e) {
|
employment: "", //用工需求
|
||||||
let data = e.currentTarget.dataset;
|
repertory: "", //库存
|
||||||
this.formData[data.value] = e.detail.value;
|
},
|
||||||
},
|
rules: {
|
||||||
// 新增开设店铺
|
|
||||||
pushBreedingList() {
|
}
|
||||||
this.formData.push({})
|
}
|
||||||
},
|
},
|
||||||
// 删除开设店铺
|
created() {
|
||||||
removeBreedingList(index) {
|
this.initRules();
|
||||||
uni.showModal({
|
if (this.$props.readonly && this.$props.datas) {
|
||||||
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.formData[item]!=undefined){
|
||||||
this.formData.splice(index, 1);
|
parseFloat(this.formData[item])!='NaN'?this.formData[item] = parseFloat(this.formData[item]):null;
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
},
|
},
|
||||||
},
|
watch: {
|
||||||
}
|
datas(newValue, oldValue) {
|
||||||
</script>
|
if (this.$props.readonly && newValue) {
|
||||||
|
this.formData = this.$props.datas;
|
||||||
<style lang="scss">
|
let keys = Object.keys(this.formData);
|
||||||
.card {
|
keys.forEach(item => {
|
||||||
background-color: #fff;
|
if (!isNaN(this.formData[item])&&this.formData[item]!=''&&this.formData[item]!=null&&this.formData[item]!=undefined){
|
||||||
margin: 28rpx;
|
parseFloat(this.formData[item])!='NaN'?this.formData[item] = parseFloat(this.formData[item]):null;
|
||||||
padding: 28rpx;
|
}
|
||||||
margin-top: 0;
|
})
|
||||||
padding-top: 0;
|
}
|
||||||
border-radius: 0 0 14rpx 14rpx;
|
}
|
||||||
}
|
},
|
||||||
|
methods: {
|
||||||
.tit {
|
// 初始化校验
|
||||||
margin: 28rpx 28rpx 0 28rpx;
|
initRules() {
|
||||||
padding: 28rpx 28rpx 0 28rpx;
|
let arr = Object.keys(this.formData);
|
||||||
border-radius: 14rpx 14rpx 0 0;
|
arr.forEach(key => {
|
||||||
background-color: $theme-oa-color;
|
this.rules[key] = {
|
||||||
color: white;
|
validator: (rule, value, callback) => {
|
||||||
height: 100rpx;
|
this.$refs.breedingForm.clearValidate(rule.field);
|
||||||
display: flex;
|
value.trim() !== '' ? callback() : callback('不能为空');
|
||||||
justify-content: space-between;
|
},
|
||||||
}
|
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;
|
changeLanPlan(e) {
|
||||||
content: "";
|
let index = e.currentTarget.dataset.index;
|
||||||
display: inline-block;
|
this.formData.manage_type = e.detail.value;
|
||||||
margin-right: 8rpx;
|
},
|
||||||
}
|
|
||||||
}
|
},
|
||||||
|
}
|
||||||
.delete {
|
</script>
|
||||||
margin: 22rpx 0;
|
|
||||||
// margin-bottom: 40rpx;
|
<style lang="scss">
|
||||||
width: 100%;
|
.card {
|
||||||
height: 64rpx;
|
|
||||||
line-height: 64rpx;
|
background-color: #fff;
|
||||||
background: #f56c6c;
|
|
||||||
border-radius: 14rpx;
|
margin: 28rpx;
|
||||||
font-size: 28rpx;
|
|
||||||
color: #fff;
|
padding: 28rpx;
|
||||||
text-align: center;
|
|
||||||
}
|
margin-top: 0;
|
||||||
|
|
||||||
.plus {
|
padding-top: 0;
|
||||||
margin: 22rpx 0;
|
|
||||||
// margin-bottom: 40rpx;
|
border-radius: 0 0 14rpx 14rpx;
|
||||||
width: 100%;
|
|
||||||
height: 64rpx;
|
}
|
||||||
line-height: 64rpx;
|
|
||||||
background: $theme-oa-color;
|
|
||||||
border-radius: 14rpx;
|
|
||||||
font-size: 28rpx;
|
.tit {
|
||||||
color: #fff;
|
|
||||||
text-align: center;
|
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 {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 34rpx;
|
||||||
|
|
||||||
|
&::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>
|
@ -151,7 +151,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 ;
|
return ;
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '正在更新...',
|
title: '正在更新...',
|
||||||
mask: true
|
mask: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user