更新了信息更新
This commit is contained in:
parent
cf73e016e3
commit
229fa86c07
@ -114,11 +114,24 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card{
|
||||
.card {
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
border-radius: 0 0 14rpx 14rpx;
|
||||
}
|
||||
|
||||
.tit {
|
||||
margin: 28rpx 28rpx 0 28rpx;
|
||||
padding: 28rpx 28rpx 0 28rpx;
|
||||
border-radius: 14rpx 14rpx 0 0;
|
||||
background-color: $theme-oa-color;
|
||||
color: white;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.title {
|
||||
font-weight: 500;
|
||||
|
@ -114,11 +114,24 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card{
|
||||
.card {
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
border-radius: 0 0 14rpx 14rpx;
|
||||
}
|
||||
|
||||
.tit {
|
||||
margin: 28rpx 28rpx 0 28rpx;
|
||||
padding: 28rpx 28rpx 0 28rpx;
|
||||
border-radius: 14rpx 14rpx 0 0;
|
||||
background-color: $theme-oa-color;
|
||||
color: white;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.title {
|
||||
font-weight: 500;
|
||||
|
@ -127,11 +127,24 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card{
|
||||
.card {
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
border-radius: 0 0 14rpx 14rpx;
|
||||
}
|
||||
|
||||
.tit {
|
||||
margin: 28rpx 28rpx 0 28rpx;
|
||||
padding: 28rpx 28rpx 0 28rpx;
|
||||
border-radius: 14rpx 14rpx 0 0;
|
||||
background-color: $theme-oa-color;
|
||||
color: white;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.title {
|
||||
font-weight: 500;
|
||||
|
@ -122,11 +122,24 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card{
|
||||
.card {
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
border-radius: 0 0 14rpx 14rpx;
|
||||
}
|
||||
|
||||
.tit {
|
||||
margin: 28rpx 28rpx 0 28rpx;
|
||||
padding: 28rpx 28rpx 0 28rpx;
|
||||
border-radius: 14rpx 14rpx 0 0;
|
||||
background-color: $theme-oa-color;
|
||||
color: white;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.title {
|
||||
font-weight: 500;
|
||||
|
@ -117,11 +117,24 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card{
|
||||
.card {
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
border-radius: 0 0 14rpx 14rpx;
|
||||
}
|
||||
|
||||
.tit {
|
||||
margin: 28rpx 28rpx 0 28rpx;
|
||||
padding: 28rpx 28rpx 0 28rpx;
|
||||
border-radius: 14rpx 14rpx 0 0;
|
||||
background-color: $theme-oa-color;
|
||||
color: white;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.title {
|
||||
font-weight: 500;
|
||||
|
@ -14,37 +14,35 @@
|
||||
<u-form-item labelWidth="auto" label="有无养殖培训" required prop="breeding_training" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.breeding_training" style="margin: 16rpx;">
|
||||
<u-radio :customStyle="{marginRight: '16px'}"
|
||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index"
|
||||
:label="item.label" :name="item.value">
|
||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||
:name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="有无注册成立养殖公司" required prop="breeding_company" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.breeding_company" 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">
|
||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||
:name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" labelPosition="top" label="备注" required prop="notes" borderBottom>
|
||||
<u--textarea :disabled="readonly" v-model="formData.notes" autoHeight placeholder="请输入备注"
|
||||
border="surround" count></u--textarea>
|
||||
<u--textarea :disabled="readonly" v-model="formData.notes" autoHeight placeholder="请输入备注" border="surround"
|
||||
count></u--textarea>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="养殖类型" required prop="breeding_type" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.breeding_type" placeholder="请输入养殖类型"></u--input>
|
||||
</u-form-item>
|
||||
<picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'breeding_time'">
|
||||
<u-form-item labelWidth="auto" label="养殖开始时间" required prop="breeding_time" borderBottom>
|
||||
<u--input :value="formData.breeding_time" placeholder="请选择养殖开始时间" disabled
|
||||
disabledColor="#fff"></u--input>
|
||||
<u--input :value="formData.breeding_time" placeholder="请选择养殖开始时间" disabled disabledColor="#fff"></u--input>
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
</picker>
|
||||
<picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'mature_time'">
|
||||
<u-form-item labelWidth="auto" label="上市时间" required prop="mature_time" borderBottom>
|
||||
<u--input :value="formData.mature_time" placeholder="请选择上市时间" disabled
|
||||
disabledColor="#fff"></u--input>
|
||||
<u--input :value="formData.mature_time" placeholder="请选择上市时间" disabled disabledColor="#fff"></u--input>
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
</picker>
|
||||
@ -52,23 +50,24 @@
|
||||
<u--input :readonly="readonly" v-model="formData.yield" placeholder="请输入产量(斤)" type="number"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="预计收益(元)" required prop="estimated_income" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.estimated_income" placeholder="请输入预计收益(元)" type="number"></u--input>
|
||||
<u--input :readonly="readonly" v-model="formData.estimated_income" placeholder="请输入预计收益(元)"
|
||||
type="number"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" labelPosition="top" label="农资农具使用情况" required prop="farm_tools"
|
||||
borderBottom>
|
||||
<u-form-item labelWidth="auto" labelPosition="top" label="农资农具使用情况" required prop="farm_tools" borderBottom>
|
||||
<u--textarea :disabled="readonly" v-model="formData.farm_tools" autoHeight placeholder="请输入农资农具使用情况"
|
||||
border="surround" count></u--textarea>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="是否生态养殖" required prop="ecological_farming" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.ecological_farming" 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">
|
||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
|
||||
:name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="现代化程度(%)" required prop="modernization" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.modernization" placeholder="请输入现代化程度(%)" type="number" maxlength="3"></u--input>
|
||||
<u--input :readonly="readonly" v-model="formData.modernization" placeholder="请输入现代化程度(%)" type="number"
|
||||
maxlength="3"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="预售卖价格(元/500g)" required prop="pre_price" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.pre_price" placeholder="请输入预售卖价格"></u--input>
|
||||
@ -76,50 +75,50 @@
|
||||
<u-form-item labelWidth="auto" label="销售方式" required prop="method_sales" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.method_sales" style="margin: 16rpx;">
|
||||
<u-radio :customStyle="{marginRight: '16px'}"
|
||||
v-for="(item, index) in [{value:1,label:'自销'},{value:0,label:'定点销售'}]" :key="index"
|
||||
:label="item.label" :name="item.value">
|
||||
v-for="(item, index) in [{value:1,label:'自销'},{value:0,label:'定点销售'}]" :key="index" :label="item.label"
|
||||
:name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="有无加工仓储" required prop="processing_storage" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.processing_storage" 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">
|
||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||
:name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="有无宣传推广" required prop="promote" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.promote" 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">
|
||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||
:name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="有无运输" required prop="transportation" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.transportation" 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">
|
||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||
:name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="是否有扩大经营需求" required prop="expand_business_needs" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.expand_business_needs" style="margin: 16rpx;">
|
||||
<u-radio :customStyle="{marginRight: '16px'}"
|
||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index"
|
||||
:label="item.label" :name="item.value">
|
||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
|
||||
:name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" labelPosition="top" label="需求描述" prop="demand" borderBottom>
|
||||
<u--textarea :disabled="readonly" v-model="formData.demand" autoHeight placeholder="请输入需求描述"
|
||||
border="surround" count></u--textarea>
|
||||
<u--textarea :disabled="readonly" v-model="formData.demand" autoHeight placeholder="请输入需求描述" border="surround"
|
||||
count></u--textarea>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" labelPosition="top" label="政策补助" prop="policy_subsidies" borderBottom>
|
||||
<u--textarea :disabled="readonly" v-model="formData.policy_subsidies" autoHeight
|
||||
placeholder="请输入政策补助" border="surround" count></u--textarea>
|
||||
<u--textarea :disabled="readonly" v-model="formData.policy_subsidies" autoHeight placeholder="请输入政策补助"
|
||||
border="surround" count></u--textarea>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
|
||||
@ -202,8 +201,9 @@
|
||||
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;
|
||||
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;
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -214,8 +214,10 @@
|
||||
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;
|
||||
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;
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -276,7 +278,6 @@
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
}
|
||||
|
||||
.title {
|
||||
@ -308,26 +309,15 @@
|
||||
}
|
||||
|
||||
.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>
|
@ -236,11 +236,24 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card{
|
||||
.card {
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
border-radius: 0 0 14rpx 14rpx;
|
||||
}
|
||||
|
||||
.tit {
|
||||
margin: 28rpx 28rpx 0 28rpx;
|
||||
padding: 28rpx 28rpx 0 28rpx;
|
||||
border-radius: 14rpx 14rpx 0 0;
|
||||
background-color: $theme-oa-color;
|
||||
color: white;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.title {
|
||||
font-weight: 500;
|
||||
|
@ -1,21 +1,25 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="tit">
|
||||
<text v-if="readonly">更新时间: {{update_time}}</text>
|
||||
<text>装房</text>
|
||||
</view>
|
||||
<view class="card">
|
||||
<view class="title">装房</view>
|
||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||
<u-form-item labelWidth="auto" label="房屋面积" required prop="cultivated_area" borderBottom>
|
||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面面积"></u--input>
|
||||
<u-form-item labelWidth="auto" label="房屋面积(m²)" required prop="house_area" borderBottom>
|
||||
<u--input :readonly="readonly" type="number" v-model="formData.house_area" placeholder="请输入房屋面积(m²)"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="装修风格" required prop="cultivated_area" borderBottom>
|
||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
||||
<u-form-item labelWidth="auto" label="装修风格" required prop="decoration_style" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.decoration_style" placeholder="请输入装修风格"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="装修地点" required prop="notes" borderBottom>
|
||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
||||
<u-form-item labelWidth="auto" label="装修地点" required prop="decoration_site" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.decoration_site" placeholder="请输入装修地点"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="装修预算" required prop="notes" borderBottom>
|
||||
<u--input v-model="formData.cultivated_area" placeholder="请输入服务对象"></u--input>
|
||||
<u-form-item labelWidth="auto" label="装修预算" required prop="budget" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.budget" placeholder="请输入装修预算"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="装修类型" required prop="planting_company" borderBottom>
|
||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||
<u-form-item labelWidth="auto" label="装修类型" required prop="decoration_type" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.decoration_type" 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">
|
||||
@ -27,15 +31,33 @@
|
||||
</u--form>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
datas: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
update_time: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
||||
formData: {
|
||||
shop_front: '', //有无门面
|
||||
house_area: '',
|
||||
decoration_style: '',
|
||||
decoration_site: '',
|
||||
budget: '',
|
||||
decoration_type: ''
|
||||
},
|
||||
rules: {
|
||||
|
||||
@ -43,7 +65,32 @@
|
||||
}
|
||||
},
|
||||
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: {
|
||||
// 初始化校验
|
||||
@ -63,42 +110,29 @@
|
||||
async validate() {
|
||||
return await this.$refs.breedingForm.validate();;
|
||||
},
|
||||
// 选择土地规划
|
||||
changeLanPlan(e) {
|
||||
let index = e.currentTarget.dataset.index;
|
||||
this.formData.planning = e.detail.value;
|
||||
},
|
||||
// 选择时间
|
||||
changeDate(e) {
|
||||
let data = e.currentTarget.dataset;
|
||||
this.formData[data.value] = e.detail.value;
|
||||
},
|
||||
// 新增开设店铺
|
||||
pushBreedingList() {
|
||||
this.formData.push({})
|
||||
},
|
||||
// 删除开设店铺
|
||||
removeBreedingList(index) {
|
||||
uni.showModal({
|
||||
confirmColor: '#f56c6c',
|
||||
content: '确定删除吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.formData.splice(index, 1);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card{
|
||||
.card {
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
border-radius: 0 0 14rpx 14rpx;
|
||||
}
|
||||
|
||||
.tit {
|
||||
margin: 28rpx 28rpx 0 28rpx;
|
||||
padding: 28rpx 28rpx 0 28rpx;
|
||||
border-radius: 14rpx 14rpx 0 0;
|
||||
background-color: $theme-oa-color;
|
||||
color: white;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.title {
|
||||
font-weight: 500;
|
||||
|
@ -1,13 +1,17 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="tit">
|
||||
<text v-if="readonly">更新时间: {{update_time}}</text>
|
||||
<text>翻新房屋</text>
|
||||
</view>
|
||||
<view class="card">
|
||||
<view class="title">翻新</view>
|
||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||
<u-form-item labelWidth="auto" labelPosition="top" label="维护内容" required prop="policy_subsidies" borderBottom>
|
||||
<u--textarea v-model="formData.policy_subsidies" autoHeight placeholder="请输入维护内容" border="surround"
|
||||
<u-form-item labelWidth="auto" labelPosition="top" label="维护内容" required prop="maintenance_contents" borderBottom>
|
||||
<u--textarea :readonly="readonly" v-model="formData.maintenance_contents" autoHeight placeholder="请输入维护内容" border="surround"
|
||||
count></u--textarea>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="维护类型" required prop="planting_company" borderBottom>
|
||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||
<u-form-item labelWidth="auto" label="维护类型" required prop="maintenance_type" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.maintenance_type" 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">
|
||||
@ -17,15 +21,30 @@
|
||||
</u--form>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
datas: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
update_time: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
||||
formData: {
|
||||
shop_front: '', //有无门面
|
||||
maintenance_contents: '',
|
||||
maintenance_type: ''
|
||||
},
|
||||
rules: {
|
||||
|
||||
@ -33,7 +52,32 @@
|
||||
}
|
||||
},
|
||||
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: {
|
||||
// 初始化校验
|
||||
@ -53,42 +97,29 @@
|
||||
async validate() {
|
||||
return await this.$refs.breedingForm.validate();;
|
||||
},
|
||||
// 选择土地规划
|
||||
changeLanPlan(e) {
|
||||
let index = e.currentTarget.dataset.index;
|
||||
this.formData.planning = e.detail.value;
|
||||
},
|
||||
// 选择时间
|
||||
changeDate(e) {
|
||||
let data = e.currentTarget.dataset;
|
||||
this.formData[data.value] = e.detail.value;
|
||||
},
|
||||
// 新增开设店铺
|
||||
pushBreedingList() {
|
||||
this.formData.push({})
|
||||
},
|
||||
// 删除开设店铺
|
||||
removeBreedingList(index) {
|
||||
uni.showModal({
|
||||
confirmColor: '#f56c6c',
|
||||
content: '确定删除吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.formData.splice(index, 1);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card{
|
||||
.card {
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
border-radius: 0 0 14rpx 14rpx;
|
||||
}
|
||||
|
||||
.tit {
|
||||
margin: 28rpx 28rpx 0 28rpx;
|
||||
padding: 28rpx 28rpx 0 28rpx;
|
||||
border-radius: 14rpx 14rpx 0 0;
|
||||
background-color: $theme-oa-color;
|
||||
color: white;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.title {
|
||||
font-weight: 500;
|
||||
|
@ -1,66 +1,103 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="tit">
|
||||
<text v-if="readonly">更新时间: {{update_time}}</text>
|
||||
<text>修房</text>
|
||||
</view>
|
||||
<view class="card">
|
||||
<view class="title">修房</view>
|
||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||
<u-form-item labelWidth="auto" label="修房类型" required prop="shop_front" borderBottom>
|
||||
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;">
|
||||
<u-form-item labelWidth="auto" label="修房类型" required prop="construction_type" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.construction_type" 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-item labelWidth="auto" label="建设面积" required prop="cultivated_area" borderBottom>
|
||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面面积"></u--input>
|
||||
<u-form-item labelWidth="auto" label="建设面积(m²)" required prop="construction_area" borderBottom>
|
||||
<u--input :readonly="readonly" type="number" v-model="formData.construction_area" placeholder="请输入建设面积(m²)"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="房屋风格" required prop="cultivated_area" borderBottom>
|
||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
||||
<u-form-item labelWidth="auto" label="房屋风格" required prop="house_style" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.house_style" placeholder="请输入房屋风格"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="修建地址" required prop="notes" borderBottom>
|
||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
||||
<u-form-item labelWidth="auto" label="修建地址" required prop="construction_site" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.construction_site" placeholder="请输入修建地址"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="预算" required prop="notes" borderBottom>
|
||||
<u--input v-model="formData.cultivated_area" placeholder="请输入服务对象"></u--input>
|
||||
<u-form-item labelWidth="auto" label="预算" required prop="budget" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.budget" placeholder="请输入预算"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="有无绿化" required prop="planting_company" borderBottom>
|
||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||
<u-form-item labelWidth="auto" label="有无绿化" required prop="afforest" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.afforest" 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-item labelWidth="auto" label="有无装修" required prop="planting_company" borderBottom>
|
||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||
<u-form-item labelWidth="auto" label="有无装修" required prop="fitment" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.fitment" 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-item labelWidth="auto" label="房屋类型" required prop="planting_company" borderBottom>
|
||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||
<u-form-item labelWidth="auto" label="房屋类型" required prop="house_type" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.house_type" 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-item labelWidth="auto" label="修建地照片" required prop="planting_company" borderBottom>
|
||||
|
||||
<u-form-item labelWidth="auto" label="修建地照片" required prop="construction_site_img" borderBottom>
|
||||
<u-upload :fileList="formData.construction_site_img?[{url:formData.construction_site_img}]:[]"
|
||||
@afterRead="afterReadAvatar" @delete="formData.construction_site_img=''" :deletable="!readonly" :maxCount="1" width="250rpx" height="180rpx">
|
||||
<view class="uplode">
|
||||
<u-icon name="plus-circle-fill" color="#0022C7" size="28"></u-icon>
|
||||
上传照片
|
||||
<view class="up" style="opacity: 0;">
|
||||
</view>
|
||||
</view>
|
||||
</u-upload>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
upLoadImage
|
||||
} from "@/api/file.js"
|
||||
export default {
|
||||
props: {
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
datas: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
update_time: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
||||
formData: {
|
||||
shop_front: '', //有无门面
|
||||
construction_type: '',
|
||||
construction_area: '',
|
||||
house_style: '',
|
||||
construction_site: '',
|
||||
budget: '',
|
||||
afforest: '',
|
||||
fitment: '',
|
||||
house_type: '',
|
||||
construction_site_img: ''
|
||||
},
|
||||
rules: {
|
||||
|
||||
@ -68,7 +105,32 @@
|
||||
}
|
||||
},
|
||||
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: {
|
||||
// 初始化校验
|
||||
@ -88,30 +150,13 @@
|
||||
async validate() {
|
||||
return await this.$refs.breedingForm.validate();;
|
||||
},
|
||||
// 选择土地规划
|
||||
changeLanPlan(e) {
|
||||
let index = e.currentTarget.dataset.index;
|
||||
this.formData.planning = e.detail.value;
|
||||
},
|
||||
// 选择时间
|
||||
changeDate(e) {
|
||||
let data = e.currentTarget.dataset;
|
||||
this.formData[data.value] = e.detail.value;
|
||||
},
|
||||
// 新增开设店铺
|
||||
pushBreedingList() {
|
||||
this.formData.push({})
|
||||
},
|
||||
// 删除开设店铺
|
||||
removeBreedingList(index) {
|
||||
uni.showModal({
|
||||
confirmColor: '#f56c6c',
|
||||
content: '确定删除吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.formData.splice(index, 1);
|
||||
}
|
||||
}
|
||||
// 上传图片
|
||||
afterReadAvatar(event) {
|
||||
upLoadImage({
|
||||
filePath: event.file.url,
|
||||
name: 'file'
|
||||
}).then(res => {
|
||||
this.formData.construction_site_img = res.data.uri
|
||||
})
|
||||
},
|
||||
},
|
||||
@ -119,11 +164,24 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card{
|
||||
.card {
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
border-radius: 0 0 14rpx 14rpx;
|
||||
}
|
||||
|
||||
.tit {
|
||||
margin: 28rpx 28rpx 0 28rpx;
|
||||
padding: 28rpx 28rpx 0 28rpx;
|
||||
border-radius: 14rpx 14rpx 0 0;
|
||||
background-color: $theme-oa-color;
|
||||
color: white;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.title {
|
||||
font-weight: 500;
|
||||
@ -165,4 +223,24 @@
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.uplode {
|
||||
width: 250rpx;
|
||||
height: 180rpx;
|
||||
box-sizing: border-box;
|
||||
padding-top: 30rpx;
|
||||
border-radius: 15rpx;
|
||||
border: 1px solid $theme-oa-color;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
color: $theme-oa-color;
|
||||
position: relative;
|
||||
|
||||
.up {
|
||||
position: absolute;
|
||||
color: transparent;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,38 +1,44 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="tit">
|
||||
<text v-if="readonly">更新时间: {{update_time}}</text>
|
||||
<text>买卖房</text>
|
||||
</view>
|
||||
<view class="card">
|
||||
<view class="title">买卖房</view>
|
||||
|
||||
<!-- <view class="title">买卖房</view> -->
|
||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||
<u-form-item labelWidth="auto" label="地点" required prop="cultivated_area" borderBottom>
|
||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面面积"></u--input>
|
||||
<u-form-item labelWidth="auto" label="地点" required prop="place" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.place" placeholder="请输入房屋地点"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="房型" required prop="cultivated_area" borderBottom>
|
||||
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input>
|
||||
<u-form-item labelWidth="auto" label="房型" required prop="house_type" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.house_type" placeholder="请输入房型"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="几房" required prop="notes" borderBottom>
|
||||
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input>
|
||||
<u-form-item labelWidth="auto" label="几房" required prop="rooms" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.rooms" placeholder="请输入几房"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="面积" required prop="notes" borderBottom>
|
||||
<u--input v-model="formData.cultivated_area" placeholder="请输入服务对象"></u--input>
|
||||
<u-form-item labelWidth="auto" label="面积(m²)" required prop="house_area" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.house_area" type="number" placeholder="请输入房屋面积(m²)"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="朝向" required prop="notes" borderBottom>
|
||||
<u--input v-model="formData.cultivated_area" placeholder="请输入服务对象"></u--input>
|
||||
<u-form-item labelWidth="auto" label="朝向" required prop="orientation" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.orientation" placeholder="请输入房屋朝向"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="楼层" required prop="notes" borderBottom>
|
||||
<u--input v-model="formData.cultivated_area" placeholder="请输入服务对象"></u--input>
|
||||
<u-form-item labelWidth="auto" label="楼层" required prop="floor" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.floor" type="number" placeholder="请输入楼层"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="装修类型" required prop="planting_company" borderBottom>
|
||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||
<u-form-item labelWidth="auto" label="装修类型" required prop="fitment" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.fitment" 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-item labelWidth="auto" label="预算" required prop="notes" borderBottom>
|
||||
<u--input v-model="formData.cultivated_area" placeholder="请输入服务对象"></u--input>
|
||||
<u-form-item labelWidth="auto" label="预算" required prop="budget" borderBottom>
|
||||
<u--input :readonly="readonly" v-model="formData.budget" placeholder="请输入预算"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="付款类型" required prop="planting_company" borderBottom>
|
||||
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;">
|
||||
<u-form-item labelWidth="auto" label="付款类型" required prop="payment_type" borderBottom>
|
||||
<u-radio-group :disabled="readonly" v-model="formData.payment_type" 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">
|
||||
@ -41,17 +47,38 @@
|
||||
</u-form-item>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
datas: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
update_time: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
|
||||
formData: {
|
||||
shop_front: '', //有无门面
|
||||
place: "",
|
||||
house_type: "",
|
||||
rooms: "",
|
||||
house_area: "",
|
||||
orientation:"",
|
||||
floor: "",
|
||||
fitment: "",
|
||||
budget: "",
|
||||
payment_type: ""
|
||||
},
|
||||
rules: {
|
||||
|
||||
@ -59,7 +86,32 @@
|
||||
}
|
||||
},
|
||||
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: {
|
||||
// 初始化校验
|
||||
@ -79,42 +131,29 @@
|
||||
async validate() {
|
||||
return await this.$refs.breedingForm.validate();;
|
||||
},
|
||||
// 选择土地规划
|
||||
changeLanPlan(e) {
|
||||
let index = e.currentTarget.dataset.index;
|
||||
this.formData.planning = e.detail.value;
|
||||
},
|
||||
// 选择时间
|
||||
changeDate(e) {
|
||||
let data = e.currentTarget.dataset;
|
||||
this.formData[data.value] = e.detail.value;
|
||||
},
|
||||
// 新增开设店铺
|
||||
pushBreedingList() {
|
||||
this.formData.push({})
|
||||
},
|
||||
// 删除开设店铺
|
||||
removeBreedingList(index) {
|
||||
uni.showModal({
|
||||
confirmColor: '#f56c6c',
|
||||
content: '确定删除吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.formData.splice(index, 1);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card{
|
||||
.card {
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
border-radius: 0 0 14rpx 14rpx;
|
||||
}
|
||||
|
||||
.tit {
|
||||
margin: 28rpx 28rpx 0 28rpx;
|
||||
padding: 28rpx 28rpx 0 28rpx;
|
||||
border-radius: 14rpx 14rpx 0 0;
|
||||
background-color: $theme-oa-color;
|
||||
color: white;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.title {
|
||||
font-weight: 500;
|
||||
|
@ -270,11 +270,24 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card{
|
||||
.card {
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
border-radius: 0 0 14rpx 14rpx;
|
||||
}
|
||||
|
||||
.tit {
|
||||
margin: 28rpx 28rpx 0 28rpx;
|
||||
padding: 28rpx 28rpx 0 28rpx;
|
||||
border-radius: 14rpx 14rpx 0 0;
|
||||
background-color: $theme-oa-color;
|
||||
color: white;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.title {
|
||||
font-weight: 500;
|
||||
|
@ -220,11 +220,24 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card{
|
||||
.card {
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
border-radius: 0 0 14rpx 14rpx;
|
||||
}
|
||||
|
||||
.tit {
|
||||
margin: 28rpx 28rpx 0 28rpx;
|
||||
padding: 28rpx 28rpx 0 28rpx;
|
||||
border-radius: 14rpx 14rpx 0 0;
|
||||
background-color: $theme-oa-color;
|
||||
color: white;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.title {
|
||||
font-weight: 500;
|
||||
|
@ -117,18 +117,17 @@
|
||||
<text>汽车是否到家 :</text>
|
||||
<u-radio-group v-model="formData.highway" :disabled="readonly" class="radio">
|
||||
<u-radio :customStyle="{marginRight: '20px'}"
|
||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]"
|
||||
:key="index" :label="item.label" :name="item.value">
|
||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index"
|
||||
:label="item.label" :name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
<view class="check_view_group">
|
||||
<text>是否使用智能手机 :</text>
|
||||
<u-radio-group v-model="formData.smart_phone" :disabled="readonly"
|
||||
class="radio">
|
||||
<u-radio-group v-model="formData.smart_phone" :disabled="readonly" class="radio">
|
||||
<u-radio :customStyle="{marginRight: '20px'}"
|
||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]"
|
||||
:key="index" :label="item.label" :name="item.value">
|
||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index"
|
||||
:label="item.label" :name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
@ -171,8 +170,8 @@
|
||||
<text>是否存在学生、婴幼儿 :</text>
|
||||
<u-radio-group v-model="formData.child" :disabled="readonly" class="radio">
|
||||
<u-radio :customStyle="{marginRight: '20px'}"
|
||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]"
|
||||
:key="index" :label="item.label" :name="item.value">
|
||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index"
|
||||
:label="item.label" :name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
@ -203,8 +202,8 @@
|
||||
<text>是否补课 :</text>
|
||||
<u-radio-group v-model="item.is_lesson" class="radio" :disabled="readonly">
|
||||
<u-radio :customStyle="{marginRight: '20px'}"
|
||||
v-for="(item, index) in [{value:'1',label:'是'},{value:'0',label:'否'}]"
|
||||
:key="index" :label="item.label" :name="item.value">
|
||||
v-for="(item, index) in [{value:'1',label:'是'},{value:'0',label:'否'}]" :key="index"
|
||||
:label="item.label" :name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
@ -229,8 +228,8 @@
|
||||
<text>喂养方式 :</text>
|
||||
<u-radio-group v-model="item.feeding" :disabled="readonly" class="radio">
|
||||
<u-radio :customStyle="{marginRight: '20px'}"
|
||||
v-for="(item, index) in [{value:'1',label:'母乳'},{value:'0',label:'奶粉'}]"
|
||||
:key="index" :label="item.label" :name="item.value">
|
||||
v-for="(item, index) in [{value:'1',label:'母乳'},{value:'0',label:'奶粉'}]" :key="index"
|
||||
:label="item.label" :name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
@ -253,37 +252,48 @@
|
||||
<view class="right">{{updateTo(item.update_time)}}</view>
|
||||
</view> -->
|
||||
<block>
|
||||
<breeding v-if="item.id==32" ref="demandRef32" :update_time="item.update_time"
|
||||
:datas="item.datas" :readonly="true"></breeding>
|
||||
<breeding v-if="item.id==32" ref="demandRef32" :update_time="item.update_time" :datas="item.datas"
|
||||
:readonly="true"></breeding>
|
||||
<plant v-if="item.id==7" ref="demandRef7" :update_time="item.update_time" :datas="item.datas"
|
||||
:readonly="true"></plant>
|
||||
<store v-if="item.id==8" ref="demandRef8" :update_time="item.update_time" :datas="item.datas"
|
||||
:readonly="true"></store>
|
||||
<deepProcessing v-if="item.id==9" ref="demandRef9" :datas="item.datas" :readonly="true">
|
||||
<deepProcessing v-if="item.id==9" ref="demandRef9" :update_time="item.update_time" :datas="item.datas"
|
||||
:readonly="true">
|
||||
</deepProcessing>
|
||||
<thickProcessing v-if="item.id==10" ref="demandRef10" :datas="item.datas" :readonly="true">
|
||||
<thickProcessing v-if="item.id==10" ref="demandRef10" :update_time="item.update_time" :datas="item.datas"
|
||||
:readonly="true">
|
||||
</thickProcessing>
|
||||
</block>
|
||||
<block>
|
||||
<houseRepair v-if="item.id==12" ref="demandRef12" :datas="item.datas" :readonly="true">
|
||||
<houseRepair v-if="item.id==12" ref="demandRef12" :update_time="item.update_time" :datas="item.datas"
|
||||
:readonly="true">
|
||||
</houseRepair>
|
||||
<houseDecoration v-if="item.id==13" ref="demandRef13" :datas="item.datas" :readonly="true">
|
||||
<houseDecoration v-if="item.id==13" ref="demandRef13" :update_time="item.update_time" :datas="item.datas"
|
||||
:readonly="true">
|
||||
</houseDecoration>
|
||||
<houseRenovate v-if="item.id==14" ref="demandRef14" :datas="item.datas" :readonly="true">
|
||||
<houseRenovate v-if="item.id==14" ref="demandRef14" :update_time="item.update_time" :datas="item.datas"
|
||||
:readonly="true">
|
||||
</houseRenovate>
|
||||
<houseTransaction v-if="item.id==15" ref="demandRef15" :datas="item.datas" :readonly="true">
|
||||
<houseTransaction v-if="item.id==15" ref="demandRef15" :update_time="item.update_time" :datas="item.datas"
|
||||
:readonly="true">
|
||||
</houseTransaction>
|
||||
</block>
|
||||
<block>
|
||||
<banquetMarry v-if="item.id==17" ref="demandRef17" :datas="item.datas" :readonly="true">
|
||||
<banquetMarry v-if="item.id==17" ref="demandRef17" :update_time="item.update_time" :datas="item.datas"
|
||||
:readonly="true">
|
||||
</banquetMarry>
|
||||
<banquetBirthday v-if="item.id==18" ref="demandRef18" :datas="item.datas" :readonly="true">
|
||||
<banquetBirthday v-if="item.id==18" ref="demandRef18" :update_time="item.update_time" :datas="item.datas"
|
||||
:readonly="true">
|
||||
</banquetBirthday>
|
||||
<banquetFullMoon v-if="item.id==19" ref="demandRef19" :datas="item.datas" :readonly="true">
|
||||
<banquetFullMoon v-if="item.id==19" ref="demandRef19" :update_time="item.update_time" :datas="item.datas"
|
||||
:readonly="true">
|
||||
</banquetFullMoon>
|
||||
<banquetOther v-if="item.id==20" ref="demandRef20" :datas="item.datas" :readonly="true">
|
||||
<banquetOther v-if="item.id==20" ref="demandRef20" :update_time="item.update_time" :datas="item.datas"
|
||||
:readonly="true">
|
||||
</banquetOther>
|
||||
<banquetFuneral v-if="item.id==21" ref="demandRef21" :datas="item.datas" :readonly="true">
|
||||
<banquetFuneral v-if="item.id==21" ref="demandRef21" :update_time="item.update_time" :datas="item.datas"
|
||||
:readonly="true">
|
||||
</banquetFuneral>
|
||||
</block>
|
||||
</block>
|
||||
@ -345,7 +355,7 @@
|
||||
data() {
|
||||
return {
|
||||
listMap: new Map(),
|
||||
situationList: [ "做工地的","厂里打工","公司职员","政府上班","种地","在家赋闲","其他"],
|
||||
situationList: ["做工地的", "厂里打工", "公司职员", "政府上班", "种地", "在家赋闲", "其他"],
|
||||
tabLists: [{
|
||||
name: '基本信息',
|
||||
}, {
|
||||
@ -402,7 +412,7 @@
|
||||
async initInformationDetails(id) {
|
||||
let res = await informationDetails(id);
|
||||
Object.keys(res.data).forEach(key => {
|
||||
if(key!='datas')this.formData[key] = res.data[key];
|
||||
if (key != 'datas') this.formData[key] = res.data[key];
|
||||
})
|
||||
this.skeleton = false;
|
||||
this.datasList = [...res.data['datas']];
|
||||
@ -412,12 +422,12 @@
|
||||
},
|
||||
changeCurrent(e) {
|
||||
this.current = e.index;
|
||||
if(e.index==1&&this.listloging){
|
||||
if (e.index == 1 && this.listloging) {
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
this.formData.datas = [...this.datasList];
|
||||
this.$nextTick(()=>{
|
||||
this.$nextTick(() => {
|
||||
uni.hideLoading();
|
||||
this.listloging = false;
|
||||
})
|
||||
@ -486,6 +496,7 @@
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
flex: 1;
|
||||
|
||||
view {
|
||||
margin-bottom: 10rpx;
|
||||
|
||||
@ -498,13 +509,18 @@
|
||||
|
||||
display: flex;
|
||||
margin-top: 4rpx;
|
||||
&:last-child{
|
||||
|
||||
&:last-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
// line-height: 70rpx;
|
||||
.radio{
|
||||
.radio {
|
||||
margin-left: 16rpx;
|
||||
uni-view[data-v-5dfbf8b1], uni-scroll-view[data-v-5dfbf8b1], uni-swiper-item[data-v-5dfbf8b1]{
|
||||
|
||||
uni-view[data-v-5dfbf8b1],
|
||||
uni-scroll-view[data-v-5dfbf8b1],
|
||||
uni-swiper-item[data-v-5dfbf8b1] {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
}
|
||||
|
@ -42,8 +42,6 @@
|
||||
payMoney: {
|
||||
money: ''
|
||||
},
|
||||
// 微信支付信息
|
||||
payData: null,
|
||||
payTimer: null,
|
||||
timeCount: 5,
|
||||
task_id: -1, //任务id,当为任务时,不可自选充值金额
|
||||
@ -64,28 +62,6 @@
|
||||
this.loadTask();
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.payData){
|
||||
payStatus({
|
||||
order_id: payData.order_id,
|
||||
from: payData.from,
|
||||
}).then((status)=>{
|
||||
uni.showToast({
|
||||
icon: status.data.pay_status?'success':'none',
|
||||
title: status.data.pay_status?'支付成功':'支付失败'
|
||||
})
|
||||
if(this.task_id>0){
|
||||
uni.$emit('upBuyShare');
|
||||
uni.navigateBack();
|
||||
}
|
||||
else{
|
||||
userInfo().then(user=>{
|
||||
this.$store.commit('setUserInfo', user.data);
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changePrice(index){
|
||||
if(this.changeMoney == index)this.changeMoney = -1;
|
||||
@ -110,7 +86,7 @@
|
||||
pay(){
|
||||
if(!this.payMoney.money)return Toast('请先填写充值金额!')
|
||||
if(this.payMoney.money<=0)return Toast('充值金额不能小于0!')
|
||||
if(!this.payTimer){
|
||||
if(this.payTimer==null){
|
||||
this.goRecharge();
|
||||
this.payTimer = setInterval(()=>{
|
||||
this.timeCount--;
|
||||
@ -135,7 +111,6 @@
|
||||
queryData.task_id = this.task_id;
|
||||
}
|
||||
let { data } = await recharge(queryData);
|
||||
this.payData = data;
|
||||
let res = await payWay({
|
||||
order_id: data.order_id,
|
||||
from: data.from,
|
||||
@ -171,6 +146,24 @@
|
||||
success: (e) => {
|
||||
// console.log('成功', e);
|
||||
uni.hideLoading();
|
||||
payStatus({
|
||||
order_id: data.order_id,
|
||||
from: data.from,
|
||||
}).then((status)=>{
|
||||
uni.showToast({
|
||||
icon: status.data.pay_status?'success':'none',
|
||||
title: status.data.pay_status?'支付成功':'支付失败'
|
||||
})
|
||||
if(this.task_id>0){
|
||||
uni.$emit('upBuyShare');
|
||||
uni.navigateBack();
|
||||
}
|
||||
else{
|
||||
userInfo().then(user=>{
|
||||
this.$store.commit('setUserInfo', user.data);
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: (e) => {
|
||||
console.log(e);
|
||||
|
@ -55,7 +55,7 @@
|
||||
keyName="name" @change="changeHandler" @cancel="demandShow = false" @confirm="changeDemand"></u-picker>
|
||||
</u--form>
|
||||
<!-- <button @click="addArchives" class="btn">完成更新</button> -->
|
||||
<mybtn text="完成更新" @click="$u.throttle(addArchives, 2000)"></mybtn>
|
||||
<mybtn text="完成更新" @click="$u.throttle(addArchives, 1500)"></mybtn>
|
||||
<u-modal :show="modelShow" title="警告" content='确定要删除该信息吗' closeOnClickOverlay showCancelButton
|
||||
@close="modelShow=false" @cancel="modelShow=false" @confirm="deleteDemand(deleteIndex)"></u-modal>
|
||||
</view>
|
||||
@ -105,7 +105,6 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
listMap: new Map(),
|
||||
demandShow: false,
|
||||
demandLoading: false,
|
||||
demandList: [], //更多需求
|
||||
@ -135,15 +134,9 @@
|
||||
this.task_id = +options.task_id || 0;
|
||||
this.initInformationDetails({ id: options.id });
|
||||
this.initCategoryBusinessList();
|
||||
this.initMap();
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
initMap() {
|
||||
comonentList.forEach(item => {
|
||||
this.listMap.set(item.id, item.name);
|
||||
})
|
||||
},
|
||||
async initInformationDetails(id) {
|
||||
let res = await informationDetails(id);
|
||||
this.formData = res.data;
|
||||
@ -153,6 +146,7 @@
|
||||
if (this.showDemandList.length == 0) return Toast('请先添加需求!');
|
||||
let refsDatas = await this.loadRefsDatas();
|
||||
if (!this.updateFlag) return;
|
||||
// return ;
|
||||
uni.showLoading({
|
||||
title: '正在更新...',
|
||||
mask: true
|
||||
@ -201,10 +195,13 @@
|
||||
// 初始化商机分类
|
||||
async initCategoryBusinessList() {
|
||||
let res = await categoryBusinessList();
|
||||
// this.demandList = res.data;
|
||||
this.demandList = res.data.filter(item => item.id == 6);
|
||||
this.demandList[0].children = this.demandList[0].children.filter(item => item.id == 7 || item.id == 8 || item
|
||||
.id == 32);
|
||||
res.data = res.data.filter((item)=>{
|
||||
return item.status!=0;
|
||||
})
|
||||
this.demandList = res.data;
|
||||
// this.demandList = res.data.filter(item => item.id == 6);
|
||||
// this.demandList[0].children = this.demandList[0].children.filter(item => item.id == 7 || item.id == 8 || item
|
||||
// .id == 32);
|
||||
this.demandListChild = this.demandList[0].children;
|
||||
},
|
||||
// 选择更多需求
|
||||
|
Loading…
x
Reference in New Issue
Block a user