新增档案详情页
This commit is contained in:
parent
55b543f63c
commit
a808e309b4
@ -5,3 +5,12 @@ import oahttp from "@/utils/oahttp.js";
|
||||
*/
|
||||
export const informationAdd = (data) => oahttp.post('/information/add', data)
|
||||
|
||||
/**
|
||||
* 新增列表
|
||||
*/
|
||||
export const informationList = (data) => oahttp.get('/information/list', data)
|
||||
|
||||
/**
|
||||
* 档案详情
|
||||
*/
|
||||
export const informationDetails = (data) => oahttp.get('/information/details', data)
|
@ -346,6 +346,15 @@
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "archivesDetail/archivesDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "档案详情",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#3175f9",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
|
||||
}]
|
||||
}],
|
||||
"globalStyle": {
|
||||
|
221
subpkg/archivesDetail/archivesDetail.vue
Normal file
221
subpkg/archivesDetail/archivesDetail.vue
Normal file
@ -0,0 +1,221 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="card">
|
||||
<u--form labelPosition="left" :model="formData" ref="archives">
|
||||
<view class="item">
|
||||
<view class="title">基本信息</view>
|
||||
<u-form-item labelWidth="auto" label="户主姓名" required prop="name" borderBottom>
|
||||
<u--input v-model="formData.name" :readonly="readonly" placeholder="请输入姓名"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="性别" required prop="sex" borderBottom>
|
||||
<u-radio-group v-model="formData.sex" :disabled="readonly" style="margin: 16rpx;">
|
||||
<u-radio :customStyle="{marginRight: '16px'}"
|
||||
v-for="(item, index) in [{value:1,label:'男'},{value:0,label:'女'}]" :key="index" :label="item.label"
|
||||
:name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item label="年龄" required prop="age" borderBottom>
|
||||
<u--input v-model="formData.age" :readonly="readonly" placeholder="请输入年龄"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="身份证号" required prop="id_card" borderBottom>
|
||||
<u--input v-model="formData.id_card" :readonly="readonly" placeholder="请输入身份证号" type="idcard"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="联系方式" required prop="phone" borderBottom>
|
||||
<u--input v-model="formData.phone" :readonly="readonly" placeholder="请输入手机号" type="number"></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="item">
|
||||
<districtSelector ref="districtSelectorRef"></districtSelector>
|
||||
<u-form-item labelWidth="auto" label="详细地址" required prop="address" borderBottom>
|
||||
<u--input v-model="formData.address" :readonly="readonly" placeholder="请输入详细地址"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="汽车是否能到家" required prop="highway" borderBottom>
|
||||
<u-radio-group v-model="formData.highway" :disabled="readonly" style="margin: 16rpx;">
|
||||
<u-radio :customStyle="{marginRight: '16px'}"
|
||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
|
||||
:name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<block value="智能手机">
|
||||
<u-form-item labelWidth="auto" label="是否使用智能手机" required prop="smart_phone" borderBottom>
|
||||
<u-radio-group v-model="formData.smart_phone" :disabled="readonly" style="margin: 16rpx;">
|
||||
<u-radio :customStyle="{marginRight: '16px'}"
|
||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
|
||||
:name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<block v-if="formData.smart_phone>0">
|
||||
<u-form-item labelWidth="auto" label="微信号" required borderBottom>
|
||||
<u--input v-model="formData.wechat" :readonly="readonly" placeholder="请输入微信号"></u--input>
|
||||
</u-form-item>
|
||||
</block>
|
||||
</block>
|
||||
</view>
|
||||
<residents ref="residentsRef" :readonly="true" :datas="formData"></residents>
|
||||
<!-- <breeding ref="breedingRef"></breeding> -->
|
||||
|
||||
|
||||
<block v-for="(item, index) in showDemandList" :key="'demand'+index">
|
||||
<block v-if="item.category_id==0">
|
||||
<breeding v-if="item.category_child==0" ref="demandRef00"></breeding>
|
||||
<store v-if="item.category_child==1" ref="demandRef01"></store>
|
||||
<deepProcessing v-if="item.category_child==2" ref="demandRef02"></deepProcessing>
|
||||
<thickProcessing v-if="item.category_child==3" ref="demandRef03"></thickProcessing>
|
||||
</block>
|
||||
<block v-if="item.category_id==1">
|
||||
<houseRepair v-if="item.category_child==0" ref="demandRef10"></houseRepair>
|
||||
<houseDecoration v-if="item.category_child==1" ref="demandRef11"></houseDecoration>
|
||||
<houseRenovate v-if="item.category_child==2" ref="demandRef12"></houseRenovate>
|
||||
<houseTransaction v-if="item.category_child==3" ref="demandRef13"></houseTransaction>
|
||||
</block>
|
||||
<block v-if="item.category_id==2">
|
||||
<banquetMarry v-if="item.category_child==0" ref="demandRef20"></banquetMarry>
|
||||
<banquetBirthday v-if="item.category_child==1" ref="demandRef21"></banquetBirthday>
|
||||
<banquetFullMoon v-if="item.category_child==2" ref="demandRef22"></banquetFullMoon>
|
||||
<banquetOther v-if="item.category_child==3" ref="demandRef23"></banquetOther>
|
||||
<banquetFuneral v-if="item.category_child==4" ref="demandRef24"></banquetFuneral>
|
||||
</block>
|
||||
</block>
|
||||
|
||||
</u--form>
|
||||
<!-- <button @click="addArchives" type="primary" class="btn">完成登记</button> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Toast } from "../../libs/uniApi"
|
||||
import { informationAdd, informationDetails } from "@/api/information.js"
|
||||
import districtSelector from "@/components/districtSelector/districtSelector.vue" //地区选择器
|
||||
import residents from "@/components/newArchives/residents.vue" // 常住人口
|
||||
import breeding from "@/components/newArchives/breeding.vue" // 种养殖
|
||||
import store from "@/components/newArchives/store.vue" // 开设店铺
|
||||
import deepProcessing from "@/components/newArchives/deepProcessing.vue" // 深加工
|
||||
import thickProcessing from "@/components/newArchives/thickProcessing.vue" // 粗加工
|
||||
import houseRepair from "@/components/newArchives/houseRepair.vue" // 修房
|
||||
import houseDecoration from "@/components/newArchives/houseDecoration.vue" // 装房
|
||||
import houseRenovate from "@/components/newArchives/houseRenovate.vue" // 翻新
|
||||
import houseTransaction from "@/components/newArchives/houseTransaction.vue" // 买卖房子
|
||||
import banquetMarry from "@/components/newArchives/banquetMarry.vue" // 婚宴
|
||||
import banquetBirthday from "@/components/newArchives/banquetBirthday.vue" // 寿宴
|
||||
import banquetFullMoon from "@/components/newArchives/banquetFullMoon.vue" // 满月酒
|
||||
import banquetOther from "@/components/newArchives/banquetOther.vue" // 其他庆祝宴
|
||||
import banquetFuneral from "@/components/newArchives/banquetFuneral.vue" // 白事
|
||||
export default {
|
||||
components: { districtSelector, residents, breeding, store, deepProcessing, thickProcessing, houseRepair, houseDecoration, houseRenovate,houseTransaction, banquetMarry, banquetBirthday,banquetFullMoon, banquetOther, banquetFuneral },
|
||||
data() {
|
||||
return {
|
||||
readonly: true,
|
||||
showDemandList: [],
|
||||
formData: {
|
||||
id_card: '',
|
||||
sex: '',
|
||||
name: '',
|
||||
phone: '', //电话
|
||||
highway: '', //汽车是否能到家
|
||||
smart_phone: '', //是否使用智能手机
|
||||
wechat: '', //微信号
|
||||
address: '', //家庭地址
|
||||
age: '', //年龄
|
||||
category_id: '1',
|
||||
category_child: '2',
|
||||
data_type: '1',
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.initInformationDetails({id:options.id})
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
async initInformationDetails(id){
|
||||
let res = await informationDetails(id);
|
||||
this.formData = res.data;
|
||||
},
|
||||
toastShow(){
|
||||
Toast('不可修改')
|
||||
},
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card {
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
|
||||
.item {
|
||||
margin-top: 30rpx;
|
||||
|
||||
&:nth-child(1) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: 500;
|
||||
font-size: 34rpx;
|
||||
|
||||
&::before {
|
||||
width: 8rpx;
|
||||
height: 26rpx;
|
||||
border-radius: 4rpx;
|
||||
background-color: #3175f9;
|
||||
content: "";
|
||||
display: inline-block;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-top: 32rpx;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 84rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 42rpx 42rpx 42rpx 42rpx;
|
||||
color: #fff;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.delete {
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
background: #f56c6c;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.plus {
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 14rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.demand {
|
||||
margin-top: 40rpx;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
</style>
|
Loading…
x
Reference in New Issue
Block a user