新增了档案更新其他板块功能

This commit is contained in:
weipengfei 2023-09-07 17:34:28 +08:00
parent 2308cb0b4b
commit 076c2b8dfe
9 changed files with 1799 additions and 1360 deletions

View File

@ -1,43 +1,50 @@
<template> <template>
<view>
<view class="tit">
<text v-if="readonly">更新时间: {{update_time}}</text>
<text>寿宴</text>
</view>
<view class="card"> <view class="card">
<view class="title">寿宴</view>
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm"> <u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
<u-form-item labelWidth="auto" label="时间" required prop="cultivated_area" borderBottom> <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--input :value="formData.start_date" style="pointer-events: none;" placeholder="请选择时间" disabled
disabledColor="#fff"></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="address" borderBottom>
<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--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input> <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="notes" 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:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index" :label="item.label" v-for="(item, index) in [{value:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index"
: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-item labelWidth="auto" label="有无住宿" required prop="planting_company" borderBottom> <u-form-item labelWidth="auto" label="有无住宿" required prop="in_hotel" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.in_hotel" 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">
@ -47,15 +54,35 @@
</u--form> </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: '', // start_date: "", //\
address: "", //
people_count: "", //
serve: "", //
perform: "", //
vehicle: "", //
in_hotel: "", //宿
}, },
rules: { rules: {
@ -63,7 +90,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: {
// //
@ -90,8 +142,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() {
@ -115,24 +166,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;

View File

@ -1,43 +1,50 @@
<template> <template>
<view>
<view class="tit">
<text v-if="readonly">更新时间: {{update_time}}</text>
<text>满月酒</text>
</view>
<view class="card"> <view class="card">
<view class="title">满月酒</view>
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm"> <u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
<u-form-item labelWidth="auto" label="时间" required prop="cultivated_area" borderBottom> <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--input :value="formData.start_date" style="pointer-events: none;" placeholder="请选择时间" disabled
disabledColor="#fff"></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="address" borderBottom>
<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--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input> <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="notes" 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:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index" :label="item.label" v-for="(item, index) in [{value:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index"
: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-item labelWidth="auto" label="有无住宿" required prop="planting_company" borderBottom> <u-form-item labelWidth="auto" label="有无住宿" required prop="in_hotel" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.in_hotel" 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">
@ -47,15 +54,35 @@
</u--form> </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: '', // start_date: "", //\
address: "", //
people_count: "", //
serve: "", //
perform: "", //
vehicle: "", //
in_hotel: "", //宿
}, },
rules: { rules: {
@ -63,7 +90,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: {
// //
@ -90,8 +142,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() {
@ -115,24 +166,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;

View File

@ -1,56 +1,59 @@
<template> <template>
<view>
<view class="tit">
<text v-if="readonly">更新时间: {{update_time}}</text>
<text>白事</text>
</view>
<view class="card"> <view class="card">
<view class="title">白事</view>
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm"> <u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
<u-form-item labelWidth="auto" label="地点" required prop="cultivated_area" borderBottom> <u-form-item labelWidth="auto" label="地点" required prop="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--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input> <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="notes" 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:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index" :label="item.label" v-for="(item, index) in [{value:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index"
: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="host" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.host" 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-item labelWidth="auto" label="有无住宿" required prop="planting_company" borderBottom> <u-form-item labelWidth="auto" label="有无住宿" required prop="in_hotel" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.in_hotel" 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="in_hotel" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.in_hotel" 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">
@ -60,15 +63,36 @@
</u--form> </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: '', // address: "", //
people_count: "", //
serve: "", //
perform: "", //
host: "", //
vehicle: "", //
in_hotel: "", //宿
graveyard: "", //
}, },
rules: { rules: {
@ -76,7 +100,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: {
// //
@ -103,8 +152,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() {
@ -128,24 +176,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;

View File

@ -1,51 +1,57 @@
<template> <template>
<view>
<view class="tit">
<text v-if="readonly">更新时间: {{update_time}}</text>
<text>婚宴</text>
</view>
<view class="card"> <view class="card">
<view class="title">婚宴</view>
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm"> <u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
<u-form-item labelWidth="auto" label="时间" required prop="cultivated_area" borderBottom> <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--input :value="formData.start_date" style="pointer-events: none;" placeholder="请选择时间" disabled disabledColor="#fff"></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="address" borderBottom>
<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--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input> <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="notes" 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:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index" :label="item.label" v-for="(item, index) in [{value:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index"
: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="host" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.host" 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-item labelWidth="auto" label="有无住宿" required prop="planting_company" borderBottom> <u-form-item labelWidth="auto" label="有无住宿" required prop="in_hotel" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.in_hotel" 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">
@ -55,15 +61,36 @@
</u--form> </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: '', // start_date: "", //\
address: "", //
people_count: "", //
serve: "", //
perform: "", //
host: "", //
vehicle: "", //
in_hotel: "", //宿
}, },
rules: { rules: {
@ -71,7 +98,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: {
// //
@ -98,8 +150,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() {
@ -123,24 +174,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;

View File

@ -1,46 +1,53 @@
<template> <template>
<view>
<view class="tit">
<text v-if="readonly">更新时间: {{update_time}}</text>
<text>其他庆祝宴</text>
</view>
<view class="card"> <view class="card">
<view class="title">其他庆祝宴</view>
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm"> <u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
<u-form-item labelWidth="auto" label="宴席类型" required prop="cultivated_area" borderBottom> <u-form-item labelWidth="auto" label="宴席类型" required prop="types" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入门面面积"></u--input> <u--input v-model="formData.types" placeholder="请输入宴席类型"></u--input>
</u-form-item> </u-form-item>
<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--input :value="formData.start_date" style="pointer-events: none;" placeholder="请选择时间" disabled
disabledColor="#fff"></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="address" borderBottom>
<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--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input> <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="notes" 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:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index" :label="item.label" v-for="(item, index) in [{value:2,label:'酒店'},{value:1,label:'一条龙'},{value:0,label:'只请厨师'}]" :key="index"
: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-item labelWidth="auto" label="有无住宿" required prop="planting_company" borderBottom> <u-form-item labelWidth="auto" label="有无住宿" required prop="in_hotel" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.in_hotel" 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">
@ -50,15 +57,37 @@
</u--form> </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;

View File

@ -1,82 +1,86 @@
<!-- 深加工 --> <!-- 深加工 -->
<template> <template>
<view>
<view class="tit">
<text v-if="readonly">更新时间: {{update_time}}</text>
<text>深加工</text>
</view>
<view class="card"> <view class="card">
<view class="title">深加工</view>
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm"> <u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
<u-form-item labelWidth="auto" label="是否在经营" required prop="shop_front" borderBottom> <u-form-item labelWidth="auto" label="是否在经营" required prop="is_manage" borderBottom>
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;"> <u-radio-group v-model="formData.is_manage" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label" v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
:name="item.value"> :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<block v-if="formData.shop_front"> <block v-if="formData.is_manage">
<u-form-item labelWidth="auto" label="有无建设用地" required prop="shop_front" borderBottom> <u-form-item labelWidth="auto" label="有无建设用地" required prop="construction_land" borderBottom>
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;"> <u-radio-group v-model="formData.construction_land" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label" v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
:name="item.value"> :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="面积" required prop="cultivated_area" borderBottom> <u-form-item labelWidth="auto" label="面积(m²)" required prop="land_area" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入面积"></u--input> <u--input v-model="formData.land_area" type="number" placeholder="请输入面积(m²)"></u--input>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="经营地点" required prop="cultivated_area" borderBottom> <u-form-item labelWidth="auto" label="经营地点" required prop="manage_place" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input> <u--input v-model="formData.manage_place" placeholder="请输入经营地点"></u--input>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="材料来源" required prop="notes" borderBottom> <u-form-item labelWidth="auto" label="材料来源" required prop="source_materials" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input> <u--input v-model="formData.source_materials" 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="marketing_channel" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.marketing_channel" 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="technical_guidance" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.technical_guidance" 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="brand" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.brand" 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="advertising" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.advertising" 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="transport" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.transport" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label" v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
:name="item.value"> :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="farm_tools" borderBottom> <u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="business_appeal" borderBottom>
<u--textarea v-model="formData.farm_tools" autoHeight placeholder="请输入经营诉求" border="surround" <u--textarea v-model="formData.business_appeal" autoHeight placeholder="请输入经营诉求" border="surround"
count></u--textarea> count></u--textarea>
</u-form-item> </u-form-item>
</block> </block>
<block v-else> <block v-else>
<u-form-item labelWidth="auto" label="有无建设用地" required prop="shop_front" borderBottom> <u-form-item labelWidth="auto" label="有无建设用地" required prop="construction_land" borderBottom>
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;"> <u-radio-group v-model="formData.construction_land" 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">
@ -84,100 +88,115 @@
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<picker :range="storeTypeList" mode="selector" @change="changeLanPlan"> <picker :range="storeTypeList" mode="selector" @change="changeLanPlan">
<u-form-item labelWidth="auto" label="经营类型" required prop="planning" borderBottom> <u-form-item labelWidth="auto" label="经营类型" required prop="manage_type" borderBottom>
<u--input :value="storeTypeList[formData.planning]" placeholder="请选择经营类型" disabled <u--input :value="storeTypeList[formData.manage_type]" style="pointer-events: none;" placeholder="请选择经营类型"
disabledColor="#fff"></u--input> disabled disabledColor="#fff"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
</picker> </picker>
<u-form-item labelWidth="auto" label="经营地点" required prop="cultivated_area" borderBottom> <u-form-item labelWidth="auto" label="经营地点" required prop="manage_place" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input> <u--input v-model="formData.manage_place" placeholder="请输入经营地点"></u--input>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="人数" required prop="cultivated_area" borderBottom> <u-form-item labelWidth="auto" label="人数" required prop="people_count" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input> <u--input v-model="formData.people_count" 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="canteen" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.canteen" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label" v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
:name="item.value"> :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="材料来源" required prop="notes" borderBottom> <u-form-item labelWidth="auto" label="材料来源" required prop="source_materials" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input> <u--input v-model="formData.source_materials" 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="automation" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input> <u--input v-model="formData.automation" 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="employment" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.employment" 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="brand" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.brand" 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="advertising" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.advertising" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label" v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
:name="item.value"> :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="库存情况" required prop="notes" borderBottom> <u-form-item labelWidth="auto" label="库存情况" required prop="repertory" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input> <u--input v-model="formData.repertory" 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="transport" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.transport" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label" v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
:name="item.value"> :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="farm_tools" borderBottom> <u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="business_appeal" borderBottom>
<u--textarea v-model="formData.farm_tools" autoHeight placeholder="请输入经营诉求" border="surround" <u--textarea v-model="formData.business_appeal" autoHeight placeholder="请输入经营诉求" border="surround"
count></u--textarea> count></u--textarea>
</u-form-item> </u-form-item>
</block> </block>
</u--form> </u--form>
</view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
props:{ props: {
readonly: { readonly: {
type: Boolean, type: Boolean,
default: false default: false
}, },
datas:{ datas: {
type: Object, type: Object,
default: null default: null
} },
update_time: {
type: String,
default: null
},
}, },
data() { data() {
return { return {
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'], storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
formData: { formData: {
shop_front: '', // is_manage: "", //
manage: '', construction_land: "", //
// construction_land land_area: "", //
// type manage_place: "", //
// area source_materials: "", //
// count marketing_channel: "", //
// canteen technical_guidance: "", //
brand: "", //
advertising: "", //广
transport: "", //
business_appeal: "", //
manage_type: "", //
people_count: "", //
canteen: "", //
automation: "", //
employment: "", //
repertory: "", //
}, },
rules: { rules: {
@ -185,7 +204,29 @@
} }
}, },
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: {
// //
@ -205,56 +246,55 @@
async validate() { async validate() {
return await this.$refs.breedingForm.validate();; return await this.$refs.breedingForm.validate();;
}, },
// //
changeLanPlan(e) { changeLanPlan(e) {
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
this.formData.planning = e.detail.value; this.formData.manage_type = e.detail.value;
},
//
changeDate(e) {
let data = e.currentTarget.dataset;
this.formData[data.value] = e.detail.value;
},
//
pushBreedingList() {
this.formData.push({})
},
//
removeBreedingList(index) {
uni.showModal({
confirmColor: '#f56c6c',
content: '确定删除吗?',
success: (res) => {
if (res.confirm) {
this.formData.splice(index, 1);
}
}
})
}, },
}, },
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.card { .card {
background-color: #fff; background-color: #fff;
margin: 28rpx; margin: 28rpx;
padding: 28rpx; padding: 28rpx;
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;

View File

@ -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">

View File

@ -1,82 +1,86 @@
<!-- 加工 --> <!-- 加工 -->
<template> <template>
<view>
<view class="tit">
<text v-if="readonly">更新时间: {{update_time}}</text>
<text>粗加工</text>
</view>
<view class="card"> <view class="card">
<view class="title">粗加工</view>
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm"> <u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
<u-form-item labelWidth="auto" label="是否在经营" required prop="shop_front" borderBottom> <u-form-item labelWidth="auto" label="是否在经营" required prop="is_manage" borderBottom>
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;"> <u-radio-group v-model="formData.is_manage" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label" v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
:name="item.value"> :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<block v-if="formData.shop_front"> <block v-if="formData.is_manage">
<u-form-item labelWidth="auto" label="有无建设用地" required prop="shop_front" borderBottom> <u-form-item labelWidth="auto" label="有无建设用地" required prop="construction_land" borderBottom>
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;"> <u-radio-group v-model="formData.construction_land" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label" v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
:name="item.value"> :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="面积" required prop="cultivated_area" borderBottom> <u-form-item labelWidth="auto" label="面积(m²)" required prop="land_area" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入面积"></u--input> <u--input v-model="formData.land_area" type="number" placeholder="请输入面积(m²)"></u--input>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="经营地点" required prop="cultivated_area" borderBottom> <u-form-item labelWidth="auto" label="经营地点" required prop="manage_place" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input> <u--input v-model="formData.manage_place" placeholder="请输入经营地点"></u--input>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="材料来源" required prop="notes" borderBottom> <u-form-item labelWidth="auto" label="材料来源" required prop="source_materials" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input> <u--input v-model="formData.source_materials" 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="marketing_channel" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.marketing_channel" 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="technical_guidance" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.technical_guidance" 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="brand" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.brand" 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="advertising" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.advertising" 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="transport" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.transport" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label" v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
:name="item.value"> :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="farm_tools" borderBottom> <u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="business_appeal" borderBottom>
<u--textarea v-model="formData.farm_tools" autoHeight placeholder="请输入经营诉求" border="surround" <u--textarea v-model="formData.business_appeal" autoHeight placeholder="请输入经营诉求" border="surround"
count></u--textarea> count></u--textarea>
</u-form-item> </u-form-item>
</block> </block>
<block v-else> <block v-else>
<u-form-item labelWidth="auto" label="有无建设用地" required prop="shop_front" borderBottom> <u-form-item labelWidth="auto" label="有无建设用地" required prop="construction_land" borderBottom>
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;"> <u-radio-group v-model="formData.construction_land" 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">
@ -84,84 +88,115 @@
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<picker :range="storeTypeList" mode="selector" @change="changeLanPlan"> <picker :range="storeTypeList" mode="selector" @change="changeLanPlan">
<u-form-item labelWidth="auto" label="经营类型" required prop="planning" borderBottom> <u-form-item labelWidth="auto" label="经营类型" required prop="manage_type" borderBottom>
<u--input :value="storeTypeList[formData.planning]" placeholder="请选择经营类型" disabled <u--input :value="storeTypeList[formData.manage_type]" style="pointer-events: none;" placeholder="请选择经营类型"
disabledColor="#fff"></u--input> disabled disabledColor="#fff"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
</picker> </picker>
<u-form-item labelWidth="auto" label="经营地点" required prop="cultivated_area" borderBottom> <u-form-item labelWidth="auto" label="经营地点" required prop="manage_place" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input> <u--input v-model="formData.manage_place" placeholder="请输入经营地点"></u--input>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="人数" required prop="cultivated_area" borderBottom> <u-form-item labelWidth="auto" label="人数" required prop="people_count" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input> <u--input v-model="formData.people_count" 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="canteen" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.canteen" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label" v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
:name="item.value"> :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="材料来源" required prop="notes" borderBottom> <u-form-item labelWidth="auto" label="材料来源" required prop="source_materials" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input> <u--input v-model="formData.source_materials" 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="automation" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input> <u--input v-model="formData.automation" 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="employment" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.employment" 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="brand" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.brand" 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="advertising" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.advertising" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label" v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
:name="item.value"> :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="库存情况" required prop="notes" borderBottom> <u-form-item labelWidth="auto" label="库存情况" required prop="repertory" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input> <u--input v-model="formData.repertory" 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="transport" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.transport" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label" v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
:name="item.value"> :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="farm_tools" borderBottom> <u-form-item labelWidth="auto" labelPosition="top" label="经营诉求" required prop="business_appeal" borderBottom>
<u--textarea v-model="formData.farm_tools" autoHeight placeholder="请输入经营诉求" border="surround" <u--textarea v-model="formData.business_appeal" autoHeight placeholder="请输入经营诉求" border="surround"
count></u--textarea> count></u--textarea>
</u-form-item> </u-form-item>
</block> </block>
</u--form> </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: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'], storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
formData: { formData: {
shop_front: '', // is_manage: "", //
construction_land: "", //
land_area: "", //
manage_place: "", //
source_materials: "", //
marketing_channel: "", //
technical_guidance: "", //
brand: "", //
advertising: "", //广
transport: "", //
business_appeal: "", //
manage_type: "", //
people_count: "", //
canteen: "", //
automation: "", //
employment: "", //
repertory: "", //
}, },
rules: { rules: {
@ -169,7 +204,29 @@
} }
}, },
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: {
// //
@ -189,56 +246,55 @@
async validate() { async validate() {
return await this.$refs.breedingForm.validate();; return await this.$refs.breedingForm.validate();;
}, },
// //
changeLanPlan(e) { changeLanPlan(e) {
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
this.formData.planning = e.detail.value; this.formData.manage_type = e.detail.value;
},
//
changeDate(e) {
let data = e.currentTarget.dataset;
this.formData[data.value] = e.detail.value;
},
//
pushBreedingList() {
this.formData.push({})
},
//
removeBreedingList(index) {
uni.showModal({
confirmColor: '#f56c6c',
content: '确定删除吗?',
success: (res) => {
if (res.confirm) {
this.formData.splice(index, 1);
}
}
})
}, },
}, },
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.card { .card {
background-color: #fff; background-color: #fff;
margin: 28rpx; margin: 28rpx;
padding: 28rpx; padding: 28rpx;
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;

View File

@ -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