This commit is contained in:
THK3121 2023-09-08 08:56:03 +08:00
commit a800fea2b5
34 changed files with 3083 additions and 2254 deletions

View File

@ -2,7 +2,7 @@
//#ifdef APP-PLUS //#ifdef APP-PLUS
const jpushModule = uni.requireNativePlugin("JG-JPush"); const jpushModule = uni.requireNativePlugin("JG-JPush");
// #endif // #endif
import { loginShopAccount } from "@/api/oaUser.js" import { loginShopAccount, userInfo } from "@/api/oaUser.js"
export default { export default {
onLaunch: async function(info) { onLaunch: async function(info) {
// let noticeArr = [] // let noticeArr = []
@ -33,10 +33,13 @@
user: data, user: data,
token: res.data.token token: res.data.token
}) })
this.$store.dispatch('initConfig');
let { let {
data data
} = await userInfo(); } = await userInfo();
this.$store.commit('setUserInfo', data); this.$store.commit('setUserInfo', data);
// uni.$emit('home_initUserInfo', data);
return ;
}catch(e){ }catch(e){
console.log(e); console.log(e);
} }

View File

@ -25,6 +25,11 @@ export const userInfo = (data) => oahttp.get('/user/info', data)
*/ */
export const changePassword = (data) => oahttp.post('/user/changePassword', data) export const changePassword = (data) => oahttp.post('/user/changePassword', data)
/**
* 获取当前公司已创建的小队
*/
export const userCompanyBrigade = (data) => oahttp.get('/user/company_brigade', data)
/** /**
* 新增人员 * 新增人员
*/ */
@ -35,7 +40,6 @@ export const loginAdd = (data) => oahttp.post('/login/add', data)
*/ */
export const userSetInfo = (data) => oahttp.post('/user/setInfo', data) export const userSetInfo = (data) => oahttp.post('/user/setInfo', data)
/** /**
* 设置是否为队长 * 设置是否为队长
*/ */
@ -64,4 +68,4 @@ export const destroyAccount = (data) => oahttp.post('/user/destroy_account', dat
/** /**
* 商城登录 * 商城登录
*/ */
export const loginShopAccount = (data) => oahttp.post('/login/shop_account', data) export const loginShopAccount = (data) => oahttp.post('/login/shop_account', data, { noAuth: true })

View File

@ -2,7 +2,7 @@
<view class="c_card"> <view class="c_card">
<view class="f_card"> <view class="f_card">
<view class="item" @click="navTo('/subpkg/topUp/topUp')"> <view class="item" @click="navTo('/subpkg/topUp/topUp')">
<view>履约保证总金额()</view> <view>押金()</view>
<view class="price" v-if="company.deposit">{{cCount(+company.deposit)}}</view> <view class="price" v-if="company.deposit">{{cCount(+company.deposit)}}</view>
<view class="price" v-else>0.00</view> <view class="price" v-else>0.00</view>
</view> </view>
@ -115,8 +115,9 @@
}); });
uni.navigateTo({ uni.navigateTo({
url: url, url: url,
success() { success:(res)=> {
uni.hideLoading() uni.hideLoading();
res.eventChannel.emit('company_money', { company_money: this.company.company_money })
} }
}) })
}else Toast('暂未开放') }else Toast('暂未开放')
@ -125,9 +126,9 @@
this.loadConfig.page = 1; this.loadConfig.page = 1;
this.loadConfig.status = "loadmore"; this.loadConfig.status = "loadmore";
this.list = []; this.list = [];
this.initList(); this.loadList();
}, },
async initList() { async loadList() {
if (this.loadConfig.status == "nomore") return; if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"; this.loadConfig.status = "loading";
let res; let res;

View File

@ -18,7 +18,7 @@
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
<u-form-item label="小队" :required="!readonly" prop="brigade" @click="changeCity('brigade')" borderBottom> <u-form-item label="小队" :required="!readonly" prop="brigade" @click="changeCity('brigade')" borderBottom>
<u--input :value="formDataText.brigade" disabled disabledColor="#fff" placeholder="请选择小队"></u--input> <u--input :value="formDataText.brigade" style="pointer-events: none;" disabled disabledColor="#fff" placeholder="请选择小队"></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>
</u--form> </u--form>
@ -36,6 +36,9 @@
commonVillage, commonVillage,
commonBrigade commonBrigade
} from "@/api/oaPbulic.js" } from "@/api/oaPbulic.js"
import {
userCompanyBrigade
} from "@/api/oaUser.js"
import { import {
Toast Toast
} from "../../libs/uniApi" } from "../../libs/uniApi"
@ -163,7 +166,10 @@
changeCity(type, toast=false) { changeCity(type, toast=false) {
if(toast) return Toast('不可修改该区域') if(toast) return Toast('不可修改该区域')
if (this.$props.readonly) return ; if (this.$props.readonly) return ;
if (this[type + 'List'].length == 0) return Toast('请先选择上一级地区'); if (this[type + 'List'].length == 0) {
if(type=='brigade') return Toast('小队已经建立完毕');
return Toast('请先选择上一级地区');
}
this.changeType = type; this.changeType = type;
this.showProvince = true; this.showProvince = true;
}, },
@ -229,10 +235,20 @@
commonBrigade({ commonBrigade({
brigade: code brigade: code
}).then(res => { }).then(res => {
// ,
let f_arr = this.$store.state.app.userInfo.company?.responsible_area?.split(',')||[]; let f_arr = this.$store.state.app.userInfo.company?.responsible_area?.split(',')||[];
this.brigadeList = res.data.filter(item=>{ this.brigadeList = res.data.filter(item=>{
return f_arr.find(t=>item.id==t); return f_arr.find(t=>item.id==t);
}); });
//
userCompanyBrigade().then((e)=>{
this.brigadeList = this.brigadeList.filter(item=>{
return !e.data.find(t=>t==item.id);
})
this.formData.brigade = '';
this.formDataRead.brigade = '';
this.formDataText.brigade = '';
})
}) })
}, },
} }

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() {
@ -114,12 +165,44 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.card{ .card {
background-color: #fff; background-color: #fff;
margin: 28rpx; margin: 28rpx;
padding: 28rpx; padding: 28rpx;
border-radius: 14rpx;
margin-top: 0;
padding-top: 0;
border-radius: 0 0 14rpx 14rpx;
} }
.tit {
margin: 28rpx 28rpx 0 28rpx;
padding: 28rpx 28rpx 0 28rpx;
border-radius: 14rpx 14rpx 0 0;
background-color: $theme-oa-color;
color: white;
height: 100rpx;
display: flex;
justify-content: space-between;
}
.title { .title {
font-weight: 500; font-weight: 500;
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() {
@ -114,12 +165,44 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.card{ .card {
background-color: #fff; background-color: #fff;
margin: 28rpx; margin: 28rpx;
padding: 28rpx; padding: 28rpx;
border-radius: 14rpx;
margin-top: 0;
padding-top: 0;
border-radius: 0 0 14rpx 14rpx;
} }
.tit {
margin: 28rpx 28rpx 0 28rpx;
padding: 28rpx 28rpx 0 28rpx;
border-radius: 14rpx 14rpx 0 0;
background-color: $theme-oa-color;
color: white;
height: 100rpx;
display: flex;
justify-content: space-between;
}
.title { .title {
font-weight: 500; font-weight: 500;
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="graveyard" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group v-model="formData.graveyard" 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() {
@ -127,12 +175,44 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.card{ .card {
background-color: #fff; background-color: #fff;
margin: 28rpx; margin: 28rpx;
padding: 28rpx; padding: 28rpx;
border-radius: 14rpx;
margin-top: 0;
padding-top: 0;
border-radius: 0 0 14rpx 14rpx;
} }
.tit {
margin: 28rpx 28rpx 0 28rpx;
padding: 28rpx 28rpx 0 28rpx;
border-radius: 14rpx 14rpx 0 0;
background-color: $theme-oa-color;
color: white;
height: 100rpx;
display: flex;
justify-content: space-between;
}
.title { .title {
font-weight: 500; font-weight: 500;
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() {
@ -122,12 +173,44 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.card{ .card {
background-color: #fff; background-color: #fff;
margin: 28rpx; margin: 28rpx;
padding: 28rpx; padding: 28rpx;
border-radius: 14rpx;
margin-top: 0;
padding-top: 0;
border-radius: 0 0 14rpx 14rpx;
} }
.tit {
margin: 28rpx 28rpx 0 28rpx;
padding: 28rpx 28rpx 0 28rpx;
border-radius: 14rpx 14rpx 0 0;
background-color: $theme-oa-color;
color: white;
height: 100rpx;
display: flex;
justify-content: space-between;
}
.title { .title {
font-weight: 500; font-weight: 500;
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() {
@ -117,12 +170,44 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.card{ .card {
background-color: #fff; background-color: #fff;
margin: 28rpx; margin: 28rpx;
padding: 28rpx; padding: 28rpx;
border-radius: 14rpx;
margin-top: 0;
padding-top: 0;
border-radius: 0 0 14rpx 14rpx;
} }
.tit {
margin: 28rpx 28rpx 0 28rpx;
padding: 28rpx 28rpx 0 28rpx;
border-radius: 14rpx 14rpx 0 0;
background-color: $theme-oa-color;
color: white;
height: 100rpx;
display: flex;
justify-content: space-between;
}
.title { .title {
font-weight: 500; font-weight: 500;
font-size: 34rpx; font-size: 34rpx;

View File

@ -14,37 +14,35 @@
<u-form-item labelWidth="auto" label="有无养殖培训" required prop="breeding_training" borderBottom> <u-form-item labelWidth="auto" label="有无养殖培训" required prop="breeding_training" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData.breeding_training" style="margin: 16rpx;"> <u-radio-group :disabled="readonly" v-model="formData.breeding_training" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
:label="item.label" :name="item.value"> :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="有无注册成立养殖公司" required prop="breeding_company" borderBottom> <u-form-item labelWidth="auto" label="有无注册成立养殖公司" required prop="breeding_company" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData.breeding_company" style="margin: 16rpx;"> <u-radio-group :disabled="readonly" v-model="formData.breeding_company" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
:label="item.label" :name="item.value"> :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" labelPosition="top" label="备注" required prop="notes" borderBottom> <u-form-item labelWidth="auto" labelPosition="top" label="备注" required prop="notes" borderBottom>
<u--textarea :disabled="readonly" v-model="formData.notes" autoHeight placeholder="请输入备注" <u--textarea :disabled="readonly" v-model="formData.notes" autoHeight placeholder="请输入备注" border="surround"
border="surround" count></u--textarea> count></u--textarea>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="养殖类型" required prop="breeding_type" borderBottom> <u-form-item labelWidth="auto" label="养殖类型" required prop="breeding_type" borderBottom>
<u--input :readonly="readonly" v-model="formData.breeding_type" placeholder="请输入养殖类型"></u--input> <u--input :readonly="readonly" v-model="formData.breeding_type" placeholder="请输入养殖类型"></u--input>
</u-form-item> </u-form-item>
<picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'breeding_time'"> <picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'breeding_time'">
<u-form-item labelWidth="auto" label="养殖开始时间" required prop="breeding_time" borderBottom> <u-form-item labelWidth="auto" label="养殖开始时间" required prop="breeding_time" borderBottom>
<u--input :value="formData.breeding_time" placeholder="请选择养殖开始时间" disabled <u--input :value="formData.breeding_time" style="pointer-events: none;" placeholder="请选择养殖开始时间" disabled disabledColor="#fff"></u--input>
disabledColor="#fff"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
</picker> </picker>
<picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'mature_time'"> <picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'mature_time'">
<u-form-item labelWidth="auto" label="上市时间" required prop="mature_time" borderBottom> <u-form-item labelWidth="auto" label="上市时间" required prop="mature_time" borderBottom>
<u--input :value="formData.mature_time" placeholder="请选择上市时间" disabled <u--input :value="formData.mature_time" style="pointer-events: none;" placeholder="请选择上市时间" disabled disabledColor="#fff"></u--input>
disabledColor="#fff"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
</picker> </picker>
@ -52,23 +50,24 @@
<u--input :readonly="readonly" v-model="formData.yield" placeholder="请输入产量(斤)" type="number"></u--input> <u--input :readonly="readonly" v-model="formData.yield" placeholder="请输入产量(斤)" type="number"></u--input>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="预计收益(元)" required prop="estimated_income" borderBottom> <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>
<u-form-item labelWidth="auto" labelPosition="top" label="农资农具收益情况" required prop="farm_tools" <u-form-item labelWidth="auto" labelPosition="top" label="农资农具使用情况" required prop="farm_tools" borderBottom>
borderBottom> <u--textarea :disabled="readonly" v-model="formData.farm_tools" autoHeight placeholder="请输入农资农具使用情况"
<u--textarea :disabled="readonly" v-model="formData.farm_tools" autoHeight placeholder="请输入农资农具收益情况"
border="surround" count></u--textarea> border="surround" count></u--textarea>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="是否生态养殖" required prop="ecological_farming" borderBottom> <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-group :disabled="readonly" v-model="formData.ecological_farming" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
:label="item.label" :name="item.value"> :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="现代化程度(%)" required prop="modernization" borderBottom> <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>
<u-form-item labelWidth="auto" label="预售卖价格(元/500g)" required prop="pre_price" borderBottom> <u-form-item labelWidth="auto" label="预售卖价格(元/500g)" required prop="pre_price" borderBottom>
<u--input :readonly="readonly" v-model="formData.pre_price" placeholder="请输入预售卖价格"></u--input> <u--input :readonly="readonly" v-model="formData.pre_price" placeholder="请输入预售卖价格"></u--input>
@ -76,50 +75,50 @@
<u-form-item labelWidth="auto" label="销售方式" required prop="method_sales" borderBottom> <u-form-item labelWidth="auto" label="销售方式" required prop="method_sales" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData.method_sales" style="margin: 16rpx;"> <u-radio-group :disabled="readonly" v-model="formData.method_sales" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'自销'},{value:0,label:'定点销售'}]" :key="index" v-for="(item, index) in [{value:1,label:'自销'},{value:0,label:'定点销售'}]" :key="index" :label="item.label"
:label="item.label" :name="item.value"> :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="有无加工仓储" required prop="processing_storage" borderBottom> <u-form-item labelWidth="auto" label="有无加工仓储" required prop="processing_storage" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData.processing_storage" style="margin: 16rpx;"> <u-radio-group :disabled="readonly" v-model="formData.processing_storage" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
:label="item.label" :name="item.value"> :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="有无宣传推广" required prop="promote" borderBottom> <u-form-item labelWidth="auto" label="有无宣传推广" required prop="promote" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData.promote" style="margin: 16rpx;"> <u-radio-group :disabled="readonly" v-model="formData.promote" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
:label="item.label" :name="item.value"> :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="有无运输" required prop="transportation" borderBottom> <u-form-item labelWidth="auto" label="有无运输" required prop="transportation" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData.transportation" style="margin: 16rpx;"> <u-radio-group :disabled="readonly" v-model="formData.transportation" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
:label="item.label" :name="item.value"> :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="是否有扩大经营需求" required prop="expand_business_needs" borderBottom> <u-form-item labelWidth="auto" label="是否有扩大经营需求" required prop="expand_business_needs" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData.expand_business_needs" style="margin: 16rpx;"> <u-radio-group :disabled="readonly" v-model="formData.expand_business_needs" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}" <u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
:label="item.label" :name="item.value"> :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" labelPosition="top" label="需求描述" prop="demand" borderBottom> <u-form-item labelWidth="auto" labelPosition="top" label="需求描述" prop="demand" borderBottom>
<u--textarea :disabled="readonly" v-model="formData.demand" autoHeight placeholder="请输入需求描述" <u--textarea :disabled="readonly" v-model="formData.demand" autoHeight placeholder="请输入需求描述" border="surround"
border="surround" count></u--textarea> count></u--textarea>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" labelPosition="top" label="政策补助" prop="policy_subsidies" borderBottom> <u-form-item labelWidth="auto" labelPosition="top" label="政策补助" prop="policy_subsidies" borderBottom>
<u--textarea :disabled="readonly" v-model="formData.policy_subsidies" autoHeight <u--textarea :disabled="readonly" v-model="formData.policy_subsidies" autoHeight placeholder="请输入政策补助"
placeholder="请输入政策补助" border="surround" count></u--textarea> border="surround" count></u--textarea>
</u-form-item> </u-form-item>
</u--form> </u--form>
@ -202,8 +201,9 @@
this.formData = this.$props.datas; this.formData = this.$props.datas;
let keys = Object.keys(this.formData); let keys = Object.keys(this.formData);
keys.forEach(item => { keys.forEach(item => {
if (!isNaN(this.formData[item])&&this.formData[item]!=''&&this.formData[item]!=null&&this.formData[item]!=undefined){ if (!isNaN(this.formData[item]) && this.formData[item] != '' && this.formData[item] != null && this
parseFloat(this.formData[item])!='NaN'?this.formData[item] = parseFloat(this.formData[item]):null; .formData[item] != undefined) {
parseFloat(this.formData[item]) != 'NaN' ? this.formData[item] = parseFloat(this.formData[item]) : null;
} }
}) })
} }
@ -214,8 +214,10 @@
this.formData = this.$props.datas; this.formData = this.$props.datas;
let keys = Object.keys(this.formData); let keys = Object.keys(this.formData);
keys.forEach(item => { keys.forEach(item => {
if (!isNaN(this.formData[item])&&this.formData[item]!=''&&this.formData[item]!=null&&this.formData[item]!=undefined){ if (!isNaN(this.formData[item]) && this.formData[item] != '' && this.formData[item] != null && this
parseFloat(this.formData[item])!='NaN'?this.formData[item] = parseFloat(this.formData[item]):null; .formData[item] != undefined) {
parseFloat(this.formData[item]) != 'NaN' ? this.formData[item] = parseFloat(this.formData[item]) :
null;
} }
}) })
} }
@ -276,7 +278,6 @@
height: 100rpx; height: 100rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.title { .title {
@ -308,26 +309,15 @@
} }
.plus { .plus {
margin: 22rpx 0; margin: 22rpx 0;
// margin-bottom: 40rpx; // margin-bottom: 40rpx;
width: 100%; width: 100%;
height: 64rpx; height: 64rpx;
line-height: 64rpx; line-height: 64rpx;
background: $theme-oa-color; background: $theme-oa-color;
border-radius: 14rpx; border-radius: 14rpx;
font-size: 28rpx; font-size: 28rpx;
color: #fff; color: #fff;
text-align: center; text-align: center;
} }
</style> </style>

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="经营诉求" 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="经营诉求" 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,12 +204,37 @@
} }
}, },
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: {
// //
initRules() { initRules() {
let arr = Object.keys(this.formData); let arr = Object.keys(this.formData);
arr = arr.filter(item=>{
return item!="business_appeal"
})
arr.forEach(key => { arr.forEach(key => {
this.rules[key] = { this.rules[key] = {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
@ -205,43 +249,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;
border-radius: 14rpx;
margin-top: 0;
padding-top: 0;
border-radius: 0 0 14rpx 14rpx;
} }
.tit {
margin: 28rpx 28rpx 0 28rpx;
padding: 28rpx 28rpx 0 28rpx;
border-radius: 14rpx 14rpx 0 0;
background-color: $theme-oa-color;
color: white;
height: 100rpx;
display: flex;
justify-content: space-between;
}
.title { .title {
font-weight: 500; font-weight: 500;
font-size: 34rpx; font-size: 34rpx;

View File

@ -1,21 +1,25 @@
<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="房屋面积(m²)" required prop="house_area" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入门面面积"></u--input> <u--input :readonly="readonly" type="number" v-model="formData.house_area" 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="decoration_style" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input> <u--input :readonly="readonly" v-model="formData.decoration_style" 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="decoration_site" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input> <u--input :readonly="readonly" v-model="formData.decoration_site" 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="budget" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入服务对象"></u--input> <u--input :readonly="readonly" v-model="formData.budget" 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="decoration_type" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group :disabled="readonly" v-model="formData.decoration_type" 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">
@ -27,15 +31,33 @@
</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: '', // house_area: '',
decoration_style: '',
decoration_site: '',
budget: '',
decoration_type: ''
}, },
rules: { rules: {
@ -43,7 +65,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: {
// //
@ -63,42 +110,29 @@
async validate() { async validate() {
return await this.$refs.breedingForm.validate();; return await this.$refs.breedingForm.validate();;
}, },
//
changeLanPlan(e) {
let index = e.currentTarget.dataset.index;
this.formData.planning = e.detail.value;
},
//
changeDate(e) {
let data = e.currentTarget.dataset;
this.formData[data.value] = e.detail.value;
},
//
pushBreedingList() {
this.formData.push({})
},
//
removeBreedingList(index) {
uni.showModal({
confirmColor: '#f56c6c',
content: '确定删除吗?',
success: (res) => {
if (res.confirm) {
this.formData.splice(index, 1);
}
}
})
},
}, },
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.card{ .card {
background-color: #fff; background-color: #fff;
margin: 28rpx; margin: 28rpx;
padding: 28rpx; padding: 28rpx;
border-radius: 14rpx; margin-top: 0;
padding-top: 0;
border-radius: 0 0 14rpx 14rpx;
}
.tit {
margin: 28rpx 28rpx 0 28rpx;
padding: 28rpx 28rpx 0 28rpx;
border-radius: 14rpx 14rpx 0 0;
background-color: $theme-oa-color;
color: white;
height: 100rpx;
display: flex;
justify-content: space-between;
} }
.title { .title {
font-weight: 500; font-weight: 500;

View File

@ -1,13 +1,17 @@
<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" labelPosition="top" label="维护内容" required prop="policy_subsidies" borderBottom> <u-form-item labelWidth="auto" labelPosition="top" label="维护内容" required prop="maintenance_contents" borderBottom>
<u--textarea v-model="formData.policy_subsidies" autoHeight placeholder="请输入维护内容" border="surround" <u--textarea :readonly="readonly" v-model="formData.maintenance_contents" autoHeight placeholder="请输入维护内容" border="surround"
count></u--textarea> count></u--textarea>
</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="maintenance_type" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group :disabled="readonly" v-model="formData.maintenance_type" 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">
@ -17,15 +21,30 @@
</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: '', // maintenance_contents: '',
maintenance_type: ''
}, },
rules: { rules: {
@ -33,7 +52,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: {
// //
@ -53,42 +97,29 @@
async validate() { async validate() {
return await this.$refs.breedingForm.validate();; return await this.$refs.breedingForm.validate();;
}, },
//
changeLanPlan(e) {
let index = e.currentTarget.dataset.index;
this.formData.planning = e.detail.value;
},
//
changeDate(e) {
let data = e.currentTarget.dataset;
this.formData[data.value] = e.detail.value;
},
//
pushBreedingList() {
this.formData.push({})
},
//
removeBreedingList(index) {
uni.showModal({
confirmColor: '#f56c6c',
content: '确定删除吗?',
success: (res) => {
if (res.confirm) {
this.formData.splice(index, 1);
}
}
})
},
}, },
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.card{ .card {
background-color: #fff; background-color: #fff;
margin: 28rpx; margin: 28rpx;
padding: 28rpx; padding: 28rpx;
border-radius: 14rpx; margin-top: 0;
padding-top: 0;
border-radius: 0 0 14rpx 14rpx;
}
.tit {
margin: 28rpx 28rpx 0 28rpx;
padding: 28rpx 28rpx 0 28rpx;
border-radius: 14rpx 14rpx 0 0;
background-color: $theme-oa-color;
color: white;
height: 100rpx;
display: flex;
justify-content: space-between;
} }
.title { .title {
font-weight: 500; font-weight: 500;

View File

@ -1,66 +1,103 @@
<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="construction_type" borderBottom>
<u-radio-group v-model="formData.shop_front" style="margin: 16rpx;"> <u-radio-group :disabled="readonly" v-model="formData.construction_type" 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="construction_area" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入门面面积"></u--input> <u--input :readonly="readonly" type="number" v-model="formData.construction_area" 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="house_style" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input> <u--input :readonly="readonly" v-model="formData.house_style" 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="construction_site" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input> <u--input :readonly="readonly" v-model="formData.construction_site" 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="budget" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入服务对象"></u--input> <u--input :readonly="readonly" v-model="formData.budget" 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="afforest" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group :disabled="readonly" v-model="formData.afforest" 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="fitment" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group :disabled="readonly" v-model="formData.fitment" 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="house_type" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group :disabled="readonly" v-model="formData.house_type" 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="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-item>
</u--form> </u--form>
</view> </view>
</view>
</template> </template>
<script> <script>
import {
upLoadImage
} from "@/api/file.js"
export default { export default {
props: {
readonly: {
type: Boolean,
default: false
},
datas: {
type: Object,
default: null
},
update_time: {
type: String,
default: null
}
},
data() { data() {
return { return {
storeTypeList: ['超市', '生鲜', '饭店', '五金', '杂货', '服装', '文具', '其他'],
formData: { formData: {
shop_front: '', // construction_type: '',
construction_area: '',
house_style: '',
construction_site: '',
budget: '',
afforest: '',
fitment: '',
house_type: '',
construction_site_img: ''
}, },
rules: { rules: {
@ -68,7 +105,32 @@
} }
}, },
created() { created() {
this.initRules() this.initRules();
if (this.$props.readonly && this.$props.datas) {
this.formData = this.$props.datas;
let keys = Object.keys(this.formData);
keys.forEach(item => {
if (!isNaN(this.formData[item]) && this.formData[item] != '' && this.formData[item] != null && this
.formData[item] != undefined) {
parseFloat(this.formData[item]) != 'NaN' ? this.formData[item] = parseFloat(this.formData[item]) : null;
}
})
}
},
watch: {
datas(newValue, oldValue) {
if (this.$props.readonly && newValue) {
this.formData = this.$props.datas;
let keys = Object.keys(this.formData);
keys.forEach(item => {
if (!isNaN(this.formData[item]) && this.formData[item] != '' && this.formData[item] != null && this
.formData[item] != undefined) {
parseFloat(this.formData[item]) != 'NaN' ? this.formData[item] = parseFloat(this.formData[item]) :
null;
}
})
}
}
}, },
methods: { methods: {
// //
@ -88,30 +150,13 @@
async validate() { async validate() {
return await this.$refs.breedingForm.validate();; return await this.$refs.breedingForm.validate();;
}, },
// //
changeLanPlan(e) { afterReadAvatar(event) {
let index = e.currentTarget.dataset.index; upLoadImage({
this.formData.planning = e.detail.value; filePath: event.file.url,
}, name: 'file'
// }).then(res => {
changeDate(e) { this.formData.construction_site_img = res.data.uri
let data = e.currentTarget.dataset;
this.formData[data.value] = e.detail.value;
},
//
pushBreedingList() {
this.formData.push({})
},
//
removeBreedingList(index) {
uni.showModal({
confirmColor: '#f56c6c',
content: '确定删除吗?',
success: (res) => {
if (res.confirm) {
this.formData.splice(index, 1);
}
}
}) })
}, },
}, },
@ -119,11 +164,24 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.card{ .card {
background-color: #fff; background-color: #fff;
margin: 28rpx; margin: 28rpx;
padding: 28rpx; padding: 28rpx;
border-radius: 14rpx; margin-top: 0;
padding-top: 0;
border-radius: 0 0 14rpx 14rpx;
}
.tit {
margin: 28rpx 28rpx 0 28rpx;
padding: 28rpx 28rpx 0 28rpx;
border-radius: 14rpx 14rpx 0 0;
background-color: $theme-oa-color;
color: white;
height: 100rpx;
display: flex;
justify-content: space-between;
} }
.title { .title {
font-weight: 500; font-weight: 500;
@ -165,4 +223,24 @@
color: #fff; color: #fff;
text-align: center; text-align: center;
} }
.uplode {
width: 250rpx;
height: 180rpx;
box-sizing: border-box;
padding-top: 30rpx;
border-radius: 15rpx;
border: 1px solid $theme-oa-color;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
color: $theme-oa-color;
position: relative;
.up {
position: absolute;
color: transparent;
}
}
</style> </style>

View File

@ -1,38 +1,44 @@
<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>
<!-- <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="place" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入门面面积"></u--input> <u--input :readonly="readonly" v-model="formData.place" placeholder="请输入房屋地点"></u--input>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="房型" required prop="cultivated_area" borderBottom> <u-form-item labelWidth="auto" label="房型" required prop="house_type" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入经营地点"></u--input> <u--input :readonly="readonly" v-model="formData.house_type" placeholder="请输入房型"></u--input>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="几房" required prop="notes" borderBottom> <u-form-item labelWidth="auto" label="几房" required prop="rooms" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入门面环境"></u--input> <u--input :readonly="readonly" v-model="formData.rooms" placeholder="请输入几房"></u--input>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="面积" required prop="notes" borderBottom> <u-form-item labelWidth="auto" label="面积(m²)" required prop="house_area" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入服务对象"></u--input> <u--input :readonly="readonly" v-model="formData.house_area" type="number" placeholder="请输入房屋面积(m²)"></u--input>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="朝向" required prop="notes" borderBottom> <u-form-item labelWidth="auto" label="朝向" required prop="orientation" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入服务对象"></u--input> <u--input :readonly="readonly" v-model="formData.orientation" 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="floor" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入服务对象"></u--input> <u--input :readonly="readonly" v-model="formData.floor" type="number" placeholder="请输入楼层"></u--input>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="装修类型" required prop="planting_company" borderBottom> <u-form-item labelWidth="auto" label="装修类型" required prop="fitment" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group :disabled="readonly" v-model="formData.fitment" 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="budget" borderBottom>
<u--input v-model="formData.cultivated_area" placeholder="请输入服务对象"></u--input> <u--input :readonly="readonly" v-model="formData.budget" 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="payment_type" borderBottom>
<u-radio-group v-model="formData.planting_company" style="margin: 16rpx;"> <u-radio-group :disabled="readonly" v-model="formData.payment_type" 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">
@ -41,17 +47,38 @@
</u-form-item> </u-form-item>
</u-form-item> </u-form-item>
</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: '', // place: "",
house_type: "",
rooms: "",
house_area: "",
orientation:"",
floor: "",
fitment: "",
budget: "",
payment_type: ""
}, },
rules: { rules: {
@ -59,7 +86,32 @@
} }
}, },
created() { created() {
this.initRules() this.initRules();
if (this.$props.readonly && this.$props.datas) {
this.formData = this.$props.datas;
let keys = Object.keys(this.formData);
keys.forEach(item => {
if (!isNaN(this.formData[item]) && this.formData[item] != '' && this.formData[item] != null && this
.formData[item] != undefined) {
parseFloat(this.formData[item]) != 'NaN' ? this.formData[item] = parseFloat(this.formData[item]) : null;
}
})
}
},
watch: {
datas(newValue, oldValue) {
if (this.$props.readonly && newValue) {
this.formData = this.$props.datas;
let keys = Object.keys(this.formData);
keys.forEach(item => {
if (!isNaN(this.formData[item]) && this.formData[item] != '' && this.formData[item] != null && this
.formData[item] != undefined) {
parseFloat(this.formData[item]) != 'NaN' ? this.formData[item] = parseFloat(this.formData[item]) :
null;
}
})
}
}
}, },
methods: { methods: {
// //
@ -79,42 +131,29 @@
async validate() { async validate() {
return await this.$refs.breedingForm.validate();; return await this.$refs.breedingForm.validate();;
}, },
//
changeLanPlan(e) {
let index = e.currentTarget.dataset.index;
this.formData.planning = e.detail.value;
},
//
changeDate(e) {
let data = e.currentTarget.dataset;
this.formData[data.value] = e.detail.value;
},
//
pushBreedingList() {
this.formData.push({})
},
//
removeBreedingList(index) {
uni.showModal({
confirmColor: '#f56c6c',
content: '确定删除吗?',
success: (res) => {
if (res.confirm) {
this.formData.splice(index, 1);
}
}
})
},
}, },
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.card{ .card {
background-color: #fff; background-color: #fff;
margin: 28rpx; margin: 28rpx;
padding: 28rpx; padding: 28rpx;
border-radius: 14rpx; margin-top: 0;
padding-top: 0;
border-radius: 0 0 14rpx 14rpx;
}
.tit {
margin: 28rpx 28rpx 0 28rpx;
padding: 28rpx 28rpx 0 28rpx;
border-radius: 14rpx 14rpx 0 0;
background-color: $theme-oa-color;
color: white;
height: 100rpx;
display: flex;
justify-content: space-between;
} }
.title { .title {
font-weight: 500; font-weight: 500;

View File

@ -17,7 +17,7 @@
</u-form-item> </u-form-item>
<picker :range="landPlanList" :disabled="readonly" mode="selector" @change="changeLanPlan"> <picker :range="landPlanList" :disabled="readonly" mode="selector" @change="changeLanPlan">
<u-form-item labelWidth="auto" label="土地规划" required prop="planning" borderBottom> <u-form-item labelWidth="auto" label="土地规划" required prop="planning" borderBottom>
<u--input :value="landPlanList[formData.planning]" placeholder="请选择规划" disabled <u--input :value="landPlanList[formData.planning]" style="pointer-events: none;" placeholder="请选择规划" disabled
disabledColor="#fff"></u--input> disabledColor="#fff"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
@ -50,14 +50,14 @@
</u-form-item> </u-form-item>
<picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'breeding_time'"> <picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'breeding_time'">
<u-form-item labelWidth="auto" label="种植开始时间" required prop="breeding_time" borderBottom> <u-form-item labelWidth="auto" label="种植开始时间" required prop="breeding_time" borderBottom>
<u--input :value="formData.breeding_time" placeholder="请选择种植开始时间" disabled <u--input :value="formData.breeding_time" style="pointer-events: none;" placeholder="请选择种植开始时间" disabled
disabledColor="#fff"></u--input> disabledColor="#fff"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
</picker> </picker>
<picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'mature_time'"> <picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'mature_time'">
<u-form-item labelWidth="auto" label="上市时间" required prop="mature_time" borderBottom> <u-form-item labelWidth="auto" label="上市时间" required prop="mature_time" borderBottom>
<u--input :value="formData.mature_time" placeholder="请选择上市时间" disabled <u--input :value="formData.mature_time" style="pointer-events: none;" placeholder="请选择上市时间" disabled
disabledColor="#fff"></u--input> disabledColor="#fff"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
@ -68,9 +68,9 @@
<u-form-item labelWidth="auto" label="预计收益(元)" required prop="estimated_income" borderBottom> <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>
<u-form-item labelWidth="auto" labelPosition="top" label="农资农具收益情况" required prop="farm_tools" <u-form-item labelWidth="auto" labelPosition="top" label="农资农具使用情况" required prop="farm_tools"
borderBottom> borderBottom>
<u--textarea :disabled="readonly" v-model="formData.farm_tools" autoHeight placeholder="请输入农资农具收益情况" <u--textarea :disabled="readonly" v-model="formData.farm_tools" autoHeight placeholder="请输入农资农具使用情况"
border="surround" count></u--textarea> border="surround" count></u--textarea>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="是否生态种植" required prop="ecological_farming" borderBottom> <u-form-item labelWidth="auto" label="是否生态种植" required prop="ecological_farming" borderBottom>

View File

@ -8,15 +8,15 @@
<u-form-item label="姓名" required prop="family.name" borderBottom> <u-form-item label="姓名" required prop="family.name" borderBottom>
<u--input v-model="item.name" :readonly="readonly" placeholder="请输入姓名"></u--input> <u--input v-model="item.name" :readonly="readonly" placeholder="请输入姓名"></u--input>
</u-form-item> </u-form-item>
<picker mode="date" value="1990-01-01" @change="changebirth_time" :disabled="readonly" :data-index="index"> <picker mode="date" value="1990-01-01" @change="changebirth_time" :disabled="readonly" :data-index="family_index">
<u-form-item labelWidth="auto" label="出生日期" required prop="family.birth_time" borderBottom> <u-form-item labelWidth="auto" label="出生日期" required prop="family.birth_time" borderBottom>
<u--input :value="item.birth_time" placeholder="请选择出生日期" readonly></u--input> <u--input :value="item.birth_time" style="pointer-events: none;" placeholder="请选择出生日期" readonly></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
</picker> </picker>
<picker mode="selector" :range="situationList" @change="changesituation" :disabled="readonly" :data-index="index"> <picker mode="selector" :range="situationList" @change="changesituation" :disabled="readonly" :data-index="family_index">
<u-form-item labelWidth="auto" label="就业情况" required prop="family.situation" borderBottom> <u-form-item labelWidth="auto" label="就业情况" required prop="family.situation" borderBottom>
<u--input :value="situationList[item.situation]" placeholder="请选择就业情况" readonly></u--input> <u--input :value="situationList[item.situation]" style="pointer-events: none;" placeholder="请选择就业情况" readonly></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
</picker> </picker>
@ -24,7 +24,7 @@
<u--input v-model="item.skills" :readonly="readonly" placeholder="请输入技能特长"></u--input> <u--input v-model="item.skills" :readonly="readonly" placeholder="请输入技能特长"></u--input>
</u-form-item> </u-form-item>
<button v-if="!readonly" class="delete" <button v-if="!readonly" class="delete"
@click="removeFamily(index)">删除以上信息</button> @click="removeFamily(family_index)">删除以上信息</button>
</block> </block>
<button v-if="!readonly" class="plus" @click="pushFamily">添加常住人口</button> <button v-if="!readonly" class="plus" @click="pushFamily">添加常住人口</button>
</block> </block>
@ -72,7 +72,7 @@
<u--textarea v-model="item.notes" autoHeight :disabled="readonly"placeholder="请输入备注" border="surround" count></u--textarea> <u--textarea v-model="item.notes" autoHeight :disabled="readonly"placeholder="请输入备注" border="surround" count></u--textarea>
</u-form-item> </u-form-item>
<button v-if="residents.child_arr.length>1&&!readonly" class="delete" <button v-if="residents.child_arr.length>1&&!readonly" class="delete"
@click="removeChildArr(index)">删除以上信息</button> @click="removeChildArr(child_arr_index)">删除以上信息</button>
</block> </block>
<button v-if="residents.child>0&&!readonly" class="plus" @click="pushChildArr">添加学生婴幼儿</button> <button v-if="residents.child>0&&!readonly" class="plus" @click="pushChildArr">添加学生婴幼儿</button>
</block> </block>
@ -270,11 +270,24 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.card{ .card {
background-color: #fff; background-color: #fff;
margin: 28rpx; margin: 28rpx;
padding: 28rpx; padding: 28rpx;
border-radius: 14rpx; margin-top: 0;
padding-top: 0;
border-radius: 0 0 14rpx 14rpx;
}
.tit {
margin: 28rpx 28rpx 0 28rpx;
padding: 28rpx 28rpx 0 28rpx;
border-radius: 14rpx 14rpx 0 0;
background-color: $theme-oa-color;
color: white;
height: 100rpx;
display: flex;
justify-content: space-between;
} }
.title { .title {
font-weight: 500; font-weight: 500;

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">
@ -29,7 +23,7 @@
</u-form-item> </u-form-item>
<picker :range="storeTypeList" :disabled="readonly" mode="selector" @change="changeType"> <picker :range="storeTypeList" :disabled="readonly" mode="selector" @change="changeType">
<u-form-item labelWidth="auto" label="经营类型" required prop="type" borderBottom> <u-form-item labelWidth="auto" label="经营类型" required prop="type" borderBottom>
<u--input :value="storeTypeList[formData.type]" placeholder="请选择经营类型" disabled <u--input :value="storeTypeList[formData.type]" style="pointer-events: none;" placeholder="请选择经营类型" disabled
disabledColor="#fff"></u--input> disabledColor="#fff"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>

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="经营诉求" 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" type="number" placeholder="请输入人数"></u--input>
</u-form-item> </u-form-item>
<u-form-item labelWidth="auto" label="有无食堂" required prop="planting_company" borderBottom> <u-form-item labelWidth="auto" label="有无食堂" required prop="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="经营诉求" 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,12 +204,37 @@
} }
}, },
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: {
// //
initRules() { initRules() {
let arr = Object.keys(this.formData); let arr = Object.keys(this.formData);
arr = arr.filter(item=>{
return item!="business_appeal"
})
arr.forEach(key => { arr.forEach(key => {
this.rules[key] = { this.rules[key] = {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
@ -189,43 +249,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;
border-radius: 14rpx;
margin-top: 0;
padding-top: 0;
border-radius: 0 0 14rpx 14rpx;
} }
.tit {
margin: 28rpx 28rpx 0 28rpx;
padding: 28rpx 28rpx 0 28rpx;
border-radius: 14rpx 14rpx 0 0;
background-color: $theme-oa-color;
color: white;
height: 100rpx;
display: flex;
justify-content: space-between;
}
.title { .title {
font-weight: 500; font-weight: 500;
font-size: 34rpx; font-size: 34rpx;

View File

@ -1,15 +1,20 @@
let httpApiThree; let httpApiThree;
let httpApi; let httpApi;
let httpApiTwo;
// 正式使用的域名 // 正式使用的域名
httpApi = 'https://ceshi-worker-task.lihaink.cn' //测试 // httpApi = 'https://ceshi-worker-task.lihaink.cn' //测试
// httpApi = 'https://preview-worker-task.lihaink.cn' //预上线 // httpApi = 'https://preview-worker-task.lihaink.cn' //预上线
// httpApi = 'https://worker-task.lihaink.cn' //正式 httpApi = 'https://worker-task.lihaink.cn' //正式
// 物流
httpApiTwo = 'https://logistics.lihaink.cn' //正式环境
// httpApiTwo = 'https://ceshi-logistics.lihaink.cn' //测试环境
httpApiThree = 'https://ceshi-worker-task.lihaink.cn' //测试 // httpApiThree = 'https://ceshi-worker-task.lihaink.cn' //测试
// httpApiThree = 'https://preview-worker-task.lihaink.cn' //预上线 // httpApiThree = 'https://preview-worker-task.lihaink.cn' //预上线
// httpApiThree = 'https://worker-task.lihaink.cn' //正式 httpApiThree = 'https://worker-task.lihaink.cn' //正式
// #ifdef H5 // #ifdef H5
// httpApiThree = 'baseUrlTest' //生产 // httpApiThree = 'baseUrlTest' //生产
// #endif // #endif
@ -33,6 +38,7 @@ module.exports = {
// 请求域名 格式: https://您的域名 // 请求域名 格式: https://您的域名
HTTP_REQUEST_URL: httpApi, HTTP_REQUEST_URL: httpApi,
HTTP_REQUEST_URL_THREE: httpApiThree, HTTP_REQUEST_URL_THREE: httpApiThree,
HTTP_REQUEST_URL_TWO: httpApiTwo,
// #ifdef H5 // #ifdef H5
//H5接口是浏览器地址 //H5接口是浏览器地址

View File

@ -60,7 +60,8 @@
"payment" : { "payment" : {
"weixin" : { "weixin" : {
"__platform__" : [ "ios", "android" ], "__platform__" : [ "ios", "android" ],
"appid" : "wx4789d9f1b50390ba", // "appid" : "wx4789d9f1b50390ba",
"appid" : "wx9d68c92b550ddd1e", //
"UniversalLinks" : "https://worker-task.lihaink.cn/" "UniversalLinks" : "https://worker-task.lihaink.cn/"
} }
}, },

View File

@ -184,6 +184,7 @@
mapState mapState
} from 'vuex'; } from 'vuex';
import bj from "@/static/animation/home.json" import bj from "@/static/animation/home.json"
import { userInfo } from "@/api/oaUser.js"
//#ifdef APP-PLUS //#ifdef APP-PLUS
var jpushModule = uni.requireNativePlugin("JG-JPush"); var jpushModule = uni.requireNativePlugin("JG-JPush");
// #endif // #endif
@ -202,7 +203,7 @@
is_captain: 0, is_captain: 0,
notArr: [], notArr: [],
orderList: [], orderList: [],
// oaHomeData: [], oaHomeData: [],
src: "https://cdn.uviewui.com/uview/album/1.jpg", src: "https://cdn.uviewui.com/uview/album/1.jpg",
assessData: [{ assessData: [{
num: "0", num: "0",
@ -241,6 +242,9 @@
onLoad() { onLoad() {
this.is_captain = JSON.parse(uni.getStorageSync("USER_INFO")).is_captain this.is_captain = JSON.parse(uni.getStorageSync("USER_INFO")).is_captain
this.options.data = bj; this.options.data = bj;
// uni.$on('home_initUserInfo', (data=null)=>{
// this.initUserInfo(data);
// });
//#ifdef APP-PLUS //#ifdef APP-PLUS
let that = this; let that = this;
jpushModule.addNotificationListener(function(result) { jpushModule.addNotificationListener(function(result) {
@ -257,6 +261,12 @@
// this.getUserIndex() // this.getUserIndex()
// this.getIndexList() // this.getIndexList()
if(uni.getStorageSync('uniMP'))this.uniMP = true; if(uni.getStorageSync('uniMP'))this.uniMP = true;
userInfo().then(({data})=>{
this.$store.commit('setUserInfo', data);
this.initUserInfo(data);
this.$store.dispatch('initConfig');
// console.log('', data);
});
this.getApproveList(); this.getApproveList();
this.initUserInfo(); this.initUserInfo();
this.showToask(); this.showToask();
@ -273,21 +283,53 @@
} }
}, },
computed: { computed: {
oaHomeData() { // oaHomeData() {
// const route = '/pages/oaHome/oaHome';
// let arr = [];
// this.$store.state.config?.config?.menu?.forEach((item) => {
// if (item.paths.includes(route)) {
// arr = item.children;
// }
// })
// if (arr.length >= 8) {
// arr = arr.slice(0, 7);
// let obj = this.$store.state.config?.config?.menu?.find(item => item.paths.includes(
// '/pages/moreFun/moreFun'));
// arr.push(obj);
// }
// return arr;
// },
},
watch: {
'$store.state.app.token':{
handler: function(n, o){
userInfo().then(({data})=>{
// console.log(data);
this.$store.commit('setUserInfo', data);
this.initUserInfo(data);
this.$store.dispatch('initConfig');
});
}
},
'$store.state.config.config.menu': {
immediate: true,
deep: true,
handler: function(n, o){
const route = '/pages/oaHome/oaHome'; const route = '/pages/oaHome/oaHome';
let arr = []; let arr = [];
this.$store.state.config?.config?.menu?.forEach((item) => { n.forEach((item) => {
if (item.paths.includes(route)) { if (item.paths.includes(route)) {
arr = item.children; arr = item.children;
} }
}) })
if (arr.length >= 8) { if (arr.length >= 8) {
arr = arr.slice(0, 7); arr = arr.slice(0, 7);
let obj = this.$store.state.config?.config?.menu?.find(item => item.paths.includes( let obj = n.find(item => item.paths.includes(
'/pages/moreFun/moreFun')); '/pages/moreFun/moreFun'));
arr.push(obj); arr.push(obj);
} }
return arr; this.oaHomeData = arr;
}
} }
}, },
methods: { methods: {
@ -324,7 +366,8 @@
url: "/pages/logistics/index", url: "/pages/logistics/index",
}); });
}, },
initUserInfo() { initUserInfo(data=null) {
if(data) return this.myOaInfo = data;
this.$store.state.app.userInfo ? this.$store.state.app.userInfo ?
(this.myOaInfo = this.$store.state.app.userInfo) : (this.myOaInfo = this.$store.state.app.userInfo) :
(this.myOaInfo.avatar = ""); (this.myOaInfo.avatar = "");

View File

@ -117,18 +117,17 @@
<text>汽车是否到家 :</text> <text>汽车是否到家 :</text>
<u-radio-group v-model="formData.highway" :disabled="readonly" class="radio"> <u-radio-group v-model="formData.highway" :disabled="readonly" class="radio">
<u-radio :customStyle="{marginRight: '20px'}" <u-radio :customStyle="{marginRight: '20px'}"
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index"
:key="index" :label="item.label" :name="item.value"> :label="item.label" :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</view> </view>
<view class="check_view_group"> <view class="check_view_group">
<text>是否使用智能手机 :</text> <text>是否使用智能手机 :</text>
<u-radio-group v-model="formData.smart_phone" :disabled="readonly" <u-radio-group v-model="formData.smart_phone" :disabled="readonly" class="radio">
class="radio">
<u-radio :customStyle="{marginRight: '20px'}" <u-radio :customStyle="{marginRight: '20px'}"
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index"
:key="index" :label="item.label" :name="item.value"> :label="item.label" :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</view> </view>
@ -171,8 +170,8 @@
<text>是否存在学生婴幼儿 :</text> <text>是否存在学生婴幼儿 :</text>
<u-radio-group v-model="formData.child" :disabled="readonly" class="radio"> <u-radio-group v-model="formData.child" :disabled="readonly" class="radio">
<u-radio :customStyle="{marginRight: '20px'}" <u-radio :customStyle="{marginRight: '20px'}"
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index"
:key="index" :label="item.label" :name="item.value"> :label="item.label" :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</view> </view>
@ -203,8 +202,8 @@
<text>是否补课 :</text> <text>是否补课 :</text>
<u-radio-group v-model="item.is_lesson" class="radio" :disabled="readonly"> <u-radio-group v-model="item.is_lesson" class="radio" :disabled="readonly">
<u-radio :customStyle="{marginRight: '20px'}" <u-radio :customStyle="{marginRight: '20px'}"
v-for="(item, index) in [{value:'1',label:'是'},{value:'0',label:'否'}]" v-for="(item, index) in [{value:'1',label:'是'},{value:'0',label:'否'}]" :key="index"
:key="index" :label="item.label" :name="item.value"> :label="item.label" :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</view> </view>
@ -229,8 +228,8 @@
<text>喂养方式 :</text> <text>喂养方式 :</text>
<u-radio-group v-model="item.feeding" :disabled="readonly" class="radio"> <u-radio-group v-model="item.feeding" :disabled="readonly" class="radio">
<u-radio :customStyle="{marginRight: '20px'}" <u-radio :customStyle="{marginRight: '20px'}"
v-for="(item, index) in [{value:'1',label:'母乳'},{value:'0',label:'奶粉'}]" v-for="(item, index) in [{value:'1',label:'母乳'},{value:'0',label:'奶粉'}]" :key="index"
:key="index" :label="item.label" :name="item.value"> :label="item.label" :name="item.value">
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</view> </view>
@ -253,37 +252,48 @@
<view class="right">{{updateTo(item.update_time)}}</view> <view class="right">{{updateTo(item.update_time)}}</view>
</view> --> </view> -->
<block> <block>
<breeding v-if="item.id==32" ref="demandRef32" :update_time="item.update_time" <breeding v-if="item.id==32" ref="demandRef32" :update_time="item.update_time" :datas="item.datas"
:datas="item.datas" :readonly="true"></breeding> :readonly="true"></breeding>
<plant v-if="item.id==7" ref="demandRef7" :update_time="item.update_time" :datas="item.datas" <plant v-if="item.id==7" ref="demandRef7" :update_time="item.update_time" :datas="item.datas"
:readonly="true"></plant> :readonly="true"></plant>
<store v-if="item.id==8" ref="demandRef8" :update_time="item.update_time" :datas="item.datas" <store v-if="item.id==8" ref="demandRef8" :update_time="item.update_time" :datas="item.datas"
:readonly="true"></store> :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> </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> </thickProcessing>
</block> </block>
<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> </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> </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> </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> </houseTransaction>
</block> </block>
<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> </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> </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> </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> </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> </banquetFuneral>
</block> </block>
</block> </block>
@ -345,7 +355,7 @@
data() { data() {
return { return {
listMap: new Map(), listMap: new Map(),
situationList: [ "做工地的","厂里打工","公司职员","政府上班","种地","在家赋闲","其他"], situationList: ["做工地的", "厂里打工", "公司职员", "政府上班", "种地", "在家赋闲", "其他"],
tabLists: [{ tabLists: [{
name: '基本信息', name: '基本信息',
}, { }, {
@ -402,7 +412,7 @@
async initInformationDetails(id) { async initInformationDetails(id) {
let res = await informationDetails(id); let res = await informationDetails(id);
Object.keys(res.data).forEach(key => { 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.skeleton = false;
this.datasList = [...res.data['datas']]; this.datasList = [...res.data['datas']];
@ -412,12 +422,12 @@
}, },
changeCurrent(e) { changeCurrent(e) {
this.current = e.index; this.current = e.index;
if(e.index==1&&this.listloging){ if (e.index == 1 && this.listloging) {
uni.showLoading({ uni.showLoading({
title: '加载中' title: '加载中'
}) })
this.formData.datas = [...this.datasList]; this.formData.datas = [...this.datasList];
this.$nextTick(()=>{ this.$nextTick(() => {
uni.hideLoading(); uni.hideLoading();
this.listloging = false; this.listloging = false;
}) })
@ -486,6 +496,7 @@
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
flex: 1; flex: 1;
view { view {
margin-bottom: 10rpx; margin-bottom: 10rpx;
@ -498,13 +509,18 @@
display: flex; display: flex;
margin-top: 4rpx; margin-top: 4rpx;
&:last-child{
&:last-child {
margin-top: 0; margin-top: 0;
} }
// line-height: 70rpx; // line-height: 70rpx;
.radio{ .radio {
margin-left: 16rpx; 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; margin-bottom: 0 !important;
} }
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<view style="padding-top: 28rpx;"> <view style="padding-top: 28rpx;padding-bottom: 160rpx;">
<view class="card"> <view class="card">
<view class="title">任务名称: {{task.title}}</view> <view class="title">任务名称: {{task.title}}</view>
<u-line style="margin: 14rpx 0;"></u-line> <u-line style="margin: 14rpx 0;"></u-line>
@ -9,7 +9,7 @@
<view class="card"> <view class="card">
<view class="title">任务描述</view> <view class="title">任务描述</view>
<u-line style="margin: 14rpx 0;"></u-line> <u-line style="margin: 14rpx 0;"></u-line>
<view class="text">{{task.content}}</view> <view class="text">{{task.content||'暂无任务描述'}}</view>
</view> </view>
<view class="card"> <view class="card">
<view class="title">事件记录</view> <view class="title">事件记录</view>

View File

@ -93,7 +93,7 @@
<!-- <u-button class="btns" type="primary" icon="plus" text="新建签约"></u-button> --> <!-- <u-button class="btns" type="primary" icon="plus" text="新建签约"></u-button> -->
</view> </view>
<view class="company_info" v-show="current==2"> <view class="company_info" v-show="current==2">
<companyFinance></companyFinance> <companyFinance ref="financeRef"></companyFinance>
</view> </view>
<view v-show="current==3"> <view v-show="current==3">
<task ref="taskRef" style="width: 100vw;"></task> <task ref="taskRef" style="width: 100vw;"></task>
@ -128,9 +128,11 @@
name: '签约公司' name: '签约公司'
}, { }, {
name: '公司财务' name: '公司财务'
}, { },
name: '任务情况' // {
}], // name: ''
// },
],
loadConfig: { loadConfig: {
page: 1, page: 1,
limit: 15, limit: 15,
@ -153,6 +155,7 @@
}, },
onReachBottom() { onReachBottom() {
if (this.current == 1) this.loadCompanyList(); if (this.current == 1) this.loadCompanyList();
else if (this.current == 2) this.$refs.financeRef.loadList();
else if (this.current == 3) this.$refs.taskRef.loadList(); else if (this.current == 3) this.$refs.taskRef.loadList();
}, },
methods: { methods: {
@ -212,6 +215,7 @@
}, },
onPullDownRefresh() { onPullDownRefresh() {
if (this.current == 1) this.initLoad(); if (this.current == 1) this.initLoad();
else if (this.current == 2) this.$refs.financeRef.initLoad();
else if (this.current == 3) this.$refs.taskRef.initLoadConfig(); else if (this.current == 3) this.$refs.taskRef.initLoadConfig();
this.$u.sleep(500).then(() => { this.$u.sleep(500).then(() => {
uni.stopPullDownRefresh() uni.stopPullDownRefresh()

View File

@ -54,7 +54,7 @@
</view> </view>
<view class="bottom" @click="navTo('/subpkg/orderDetail/orderDetail')"> <view class="bottom" @click="navTo('/subpkg/orderDetail/orderDetail')">
<view class="item"> <view class="item">
<view>履约保证金额()</view> <view>押金()</view>
<view class="num" v-show="eyeType">{{ <view class="num" v-show="eyeType">{{
userInfo.deposit || 0.0 userInfo.deposit || 0.0
}}</view> }}</view>
@ -444,6 +444,7 @@ page {
align-items: center; align-items: center;
.item { .item {
flex: 1;
text-align: center; text-align: center;
font-size: 25rpx; font-size: 25rpx;
font-weight: 400; font-weight: 400;

View File

@ -298,7 +298,7 @@
upLoadImage upLoadImage
} from "@/api/file.js" } from "@/api/file.js"
import { import {
loginAdd loginAdd,
} from "@/api/oaUser.js" } from "@/api/oaUser.js"
import districtSelector from "@/components/districtSelector/districtSelector.vue" // import districtSelector from "@/components/districtSelector/districtSelector.vue" //
import districtSelectorTow from "@/components/districtSelector/districtSelectorTow.vue" // import districtSelectorTow from "@/components/districtSelector/districtSelectorTow.vue" //

View File

@ -75,7 +75,7 @@
}, },
loadConfig:{ loadConfig:{
page: 1, page: 1,
limit: 25, limit: 15,
loadingText: '努力加载中', loadingText: '努力加载中',
loadmoreText: '轻轻上拉', loadmoreText: '轻轻上拉',
nomoreText: '没有更多账单了~~', nomoreText: '没有更多账单了~~',

View File

@ -203,6 +203,7 @@
<style lang="scss"> <style lang="scss">
.personnel { .personnel {
padding: 28rpx 0; padding: 28rpx 0;
padding-bottom: 160rpx;
.new_btn { .new_btn {
position: fixed; position: fixed;
bottom: 30rpx; bottom: 30rpx;

View File

@ -62,7 +62,6 @@
this.loadTask(); this.loadTask();
} }
}, },
onShow() {},
methods: { methods: {
changePrice(index){ changePrice(index){
if(this.changeMoney == index)this.changeMoney = -1; if(this.changeMoney == index)this.changeMoney = -1;
@ -87,7 +86,7 @@
pay(){ pay(){
if(!this.payMoney.money)return Toast('请先填写充值金额!') if(!this.payMoney.money)return Toast('请先填写充值金额!')
if(this.payMoney.money<=0)return Toast('充值金额不能小于0!') if(this.payMoney.money<=0)return Toast('充值金额不能小于0!')
if(!this.payTimer){ if(this.payTimer==null){
this.goRecharge(); this.goRecharge();
this.payTimer = setInterval(()=>{ this.payTimer = setInterval(()=>{
this.timeCount--; this.timeCount--;
@ -175,7 +174,7 @@
}) })
}, },
complete: () => { complete: () => {
this.payMoney.money = ''; if(this.task_id<=0)this.payMoney.money = '';
}, },
}); });
} }

View File

@ -55,9 +55,11 @@
keyName="name" @change="changeHandler" @cancel="demandShow = false" @confirm="changeDemand"></u-picker> keyName="name" @change="changeHandler" @cancel="demandShow = false" @confirm="changeDemand"></u-picker>
</u--form> </u--form>
<!-- <button @click="addArchives" class="btn">完成更新</button> --> <!-- <button @click="addArchives" class="btn">完成更新</button> -->
<mybtn text="完成更新" @click="$u.throttle(addArchives, 2000)"></mybtn> <mybtn text="完成更新" @click="updateShow=true"></mybtn>
<u-modal :show="modelShow" title="警告" content='确定要删除该信息吗' closeOnClickOverlay showCancelButton <u-modal :show="modelShow" title="警告" content='确定要删除该信息吗' closeOnClickOverlay showCancelButton
@close="modelShow=false" @cancel="modelShow=false" @confirm="deleteDemand(deleteIndex)"></u-modal> @close="modelShow=false" @cancel="modelShow=false" @confirm="deleteDemand(deleteIndex)"></u-modal>
<u-modal :show="updateShow" title="提示" content='确认信息无误后再更新' closeOnClickOverlay showCancelButton
@close="updateShow=false" @cancel="updateShow=false" @confirm="$u.throttle(addArchives, 1500)"></u-modal>
</view> </view>
</view> </view>
</template> </template>
@ -105,7 +107,6 @@
}, },
data() { data() {
return { return {
listMap: new Map(),
demandShow: false, demandShow: false,
demandLoading: false, demandLoading: false,
demandList: [], // demandList: [], //
@ -114,6 +115,7 @@
updateFlag: true, updateFlag: true,
task_id: 0, task_id: 0,
modelShow: false, // modelShow: false, //
updateShow: false, //
deleteIndex: -1, // deleteIndex: -1, //
formData: { formData: {
id_card: '', id_card: '',
@ -135,24 +137,21 @@
this.task_id = +options.task_id || 0; this.task_id = +options.task_id || 0;
this.initInformationDetails({ id: options.id }); this.initInformationDetails({ id: options.id });
this.initCategoryBusinessList(); this.initCategoryBusinessList();
this.initMap();
}, },
onShow() {}, onShow() {},
methods: { methods: {
initMap() {
comonentList.forEach(item => {
this.listMap.set(item.id, item.name);
})
},
async initInformationDetails(id) { async initInformationDetails(id) {
let res = await informationDetails(id); let res = await informationDetails(id);
this.formData = res.data; this.formData = res.data;
}, },
// //
async addArchives() { async addArchives() {
this.updateShow = false;
await this.$nextTick();
if (this.showDemandList.length == 0) return Toast('请先添加需求!'); if (this.showDemandList.length == 0) return Toast('请先添加需求!');
let refsDatas = await this.loadRefsDatas(); let refsDatas = await this.loadRefsDatas();
if (!this.updateFlag) return; if (!this.updateFlag) return;
// return ;
uni.showLoading({ uni.showLoading({
title: '正在更新...', title: '正在更新...',
mask: true mask: true
@ -201,10 +200,13 @@
// //
async initCategoryBusinessList() { async initCategoryBusinessList() {
let res = await categoryBusinessList(); let res = await categoryBusinessList();
// this.demandList = res.data; res.data = res.data.filter((item)=>{
this.demandList = res.data.filter(item => item.id == 6); return item.status!=0;
this.demandList[0].children = this.demandList[0].children.filter(item => item.id == 7 || item.id == 8 || item })
.id == 32); this.demandList = res.data;
// this.demandList = res.data.filter(item => item.id == 6);
// this.demandList[0].children = this.demandList[0].children.filter(item => item.id == 7 || item.id == 8 || item
// .id == 32);
this.demandListChild = this.demandList[0].children; this.demandListChild = this.demandList[0].children;
}, },
// //

View File

@ -11,7 +11,8 @@
</view> </view>
<view class="item"> <view class="item">
<text>可用余额</text> <text>可用余额</text>
<text>{{$store.state.app.userInfo.user_money||'0.00'}}</text> <text>{{company_money||'0.00'}}</text>
<!-- <text>{{$store.state.app.userInfo.user_money||'0.00'}}</text> -->
</view> </view>
</view> </view>
</view> </view>
@ -43,6 +44,7 @@
return { return {
priceList: ['10元','50元','100元','500元','1000元','5000元','全部', '自定义'], priceList: ['10元','50元','100元','500元','1000元','5000元','全部', '自定义'],
changeMoney: -1, changeMoney: -1,
company_money: "0.00",
payMoney: { payMoney: {
money: '' money: ''
}, },
@ -58,8 +60,12 @@
}) })
} }
}, },
onLoad() {}, onLoad() {
onShow() {}, const eventChannel = this.getOpenerEventChannel();
eventChannel.on('company_money', (e)=>{
this.company_money = e.company_money;
})
},
methods: { methods: {
copyPhone(str = "") { copyPhone(str = "") {
uni.setClipboardData({ uni.setClipboardData({

View File

@ -1,5 +1,5 @@
import { import {
HTTP_REQUEST_URL_THREE, HTTP_REQUEST_URL_TWO,
HEADER, HEADER,
TOKENNAME, TOKENNAME,
} from '@/config/app'; } from '@/config/app';
@ -21,8 +21,7 @@ function baseRequestTwo(url, method, data, {
noAuth = false, noAuth = false,
noVerify = false noVerify = false
}) { }) {
// let Url = "https://logistics.lihaink.cn", //正式环境 let Url = HTTP_REQUEST_URL_TWO,
let Url = "https://ceshi-logistics.lihaink.cn", //测试环境
header = HEADER; header = HEADER;
if (!noAuth) { if (!noAuth) {
// 已经未登录了,禁止请求 // 已经未登录了,禁止请求
@ -41,6 +40,7 @@ function baseRequestTwo(url, method, data, {
// if (store.state.app.token) header[TOKENNAME] = 'Bearer ' + store.state.app.token; // if (store.state.app.token) header[TOKENNAME] = 'Bearer ' + store.state.app.token;
if (store.state.app.token) header[TOKENNAME] = store.state.app.token; if (store.state.app.token) header[TOKENNAME] = store.state.app.token;
// header[TOKENNAME] = 'Bearer sdjflidshjgfkbdasgjmasbgvhauuiavhkesvndkaesbvkjsdbv'; // header[TOKENNAME] = 'Bearer sdjflidshjgfkbdasgjmasbgvhauuiavhkesvndkaesbvkjsdbv';
return new Promise((reslove, reject) => { return new Promise((reslove, reject) => {
// uni.showLoading({ // uni.showLoading({
@ -52,6 +52,7 @@ function baseRequestTwo(url, method, data, {
method: method || 'GET', method: method || 'GET',
header: { header: {
...header ...header
}, },
data: method != 'GET' ? data || {} : {}, data: method != 'GET' ? data || {} : {},
params: method == 'GET' ? data : {}, params: method == 'GET' ? data : {},
@ -66,10 +67,12 @@ function baseRequestTwo(url, method, data, {
reject(res.data); reject(res.data);
} else if (res.data.code == 0) { } else if (res.data.code == 0) {
// uni.hideLoading(); // uni.hideLoading();
if (res.data.show != 1 && res.data.msg != '无登录信息') {
uni.showToast({ uni.showToast({
title: res.data.msg || '请检查网络', title: res.data.msg || '请检查网络',
icon: 'none' icon: 'none',
}) })
}
reject(res.data); reject(res.data);
} else if (res.data.code == 1) { } else if (res.data.code == 1) {
store.commit("SET_REQUEST"); store.commit("SET_REQUEST");

View File

@ -67,10 +67,12 @@ function baseRequestTwo(url, method, data, {
reject(res.data); reject(res.data);
} else if (res.data.code == 0) { } else if (res.data.code == 0) {
// uni.hideLoading(); // uni.hideLoading();
if(res.data.show!=1&&res.data.msg!='无登录信息'){
uni.showToast({ uni.showToast({
title: res.data.msg || '请检查网络', title: res.data.msg || '请检查网络',
icon: 'none', icon: 'none',
}) })
}
reject(res.data); reject(res.data);
} else if (res.data.code == 1) { } else if (res.data.code == 1) {
store.commit("SET_REQUEST"); store.commit("SET_REQUEST");