优化组件功能
This commit is contained in:
parent
abfd777256
commit
cad8ac898e
@ -14,3 +14,9 @@ export const informationList = (data) => oahttp.get('/information/list', data)
|
||||
* 档案详情
|
||||
*/
|
||||
export const informationDetails = (data) => oahttp.get('/information/details', data)
|
||||
|
||||
/**
|
||||
* 更新商机
|
||||
*/
|
||||
export const informationOpportunityUpdate = (data) => oahttp.post('/information/opportunity_update', data)
|
||||
|
||||
|
@ -25,3 +25,23 @@ export const userInfo = (data) => oahttp.get('/user/info', data)
|
||||
*/
|
||||
export const loginAdd = (data) => oahttp.post('/login/add', data)
|
||||
|
||||
/**
|
||||
* 修改人员
|
||||
*/
|
||||
export const userSetInfo = (data) => oahttp.post('/user/setInfo', data)
|
||||
|
||||
|
||||
/**
|
||||
* 设置是否为队长
|
||||
*/
|
||||
export const loginSetInfo = (data) => oahttp.post('/login/setInfo', data)
|
||||
|
||||
/**
|
||||
* 生成合同
|
||||
*/
|
||||
export const userDraftingcontracts = (data) => oahttp.post('/user/Draftingcontracts', data)
|
||||
|
||||
/**
|
||||
* 发起合同
|
||||
*/
|
||||
export const userInitiateContract = (data) => oahttp.post('/user/initiate_contract', data)
|
@ -134,8 +134,8 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: #f56c6c;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
@ -147,10 +147,11 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -134,8 +134,8 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: #f56c6c;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
@ -147,10 +147,11 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -147,8 +147,8 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: #f56c6c;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
@ -160,10 +160,11 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -142,8 +142,8 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: #f56c6c;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
@ -155,10 +155,11 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -137,8 +137,8 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: #f56c6c;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
@ -150,10 +150,11 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="card">
|
||||
<view class="title">种养殖</view>
|
||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||
<u-form-item labelWidth="auto" label="耕地总面积" required prop="cultivated_area" borderBottom>
|
||||
@ -222,8 +222,13 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card{
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
.title {
|
||||
margin-top: 30rpx;
|
||||
font-weight: 500;
|
||||
font-size: 34rpx;
|
||||
|
||||
@ -241,8 +246,8 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: #f56c6c;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
@ -254,10 +259,11 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -257,8 +257,8 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: #f56c6c;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
@ -270,10 +270,11 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -114,8 +114,8 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: #f56c6c;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
@ -127,10 +127,11 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -104,8 +104,8 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: #f56c6c;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
@ -117,10 +117,11 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -139,8 +139,8 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: #f56c6c;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
@ -152,10 +152,11 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -130,8 +130,8 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: #f56c6c;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
@ -143,10 +143,11 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!-- 常住人口 -->
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="card">
|
||||
<view class="title">常住人口</view>
|
||||
<u--form labelPosition="left" :model="residents" :rules="rules" ref="residentsForm">
|
||||
<block value="人口">
|
||||
@ -26,7 +26,7 @@
|
||||
<button v-if="residents.family.length>1&&!readonly" class="delete"
|
||||
@click="removeFamily(index)">删除以上信息</button>
|
||||
</block>
|
||||
<button v-if="!readonly" class="plus" @click="pushFamily">+</button>
|
||||
<button v-if="!readonly" class="plus" @click="pushFamily">添加常住人口</button>
|
||||
</block>
|
||||
<block value="婴幼儿信息">
|
||||
<u-form-item labelWidth="auto" label="是否存在学生、婴幼儿" required prop="child" borderBottom>
|
||||
@ -74,7 +74,7 @@
|
||||
<button v-if="residents.child_arr.length>1&&!readonly" class="delete"
|
||||
@click="removeChildArr(index)">删除以上信息</button>
|
||||
</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>
|
||||
|
||||
</u--form>
|
||||
@ -95,7 +95,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
situationList: ['公务员', '国企事业单位', '民营企业', '自由职业', '其他'],
|
||||
situationList: [ "做工地的","厂里打工","公司职员","政府上班","种地","在家赋闲","其他"],
|
||||
// 常住人口
|
||||
residents: {
|
||||
// family: [{
|
||||
@ -244,8 +244,13 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card{
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
.title {
|
||||
margin-top: 30rpx;
|
||||
font-weight: 500;
|
||||
font-size: 34rpx;
|
||||
|
||||
@ -263,8 +268,8 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: #f56c6c;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
@ -276,10 +281,11 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="card">
|
||||
<view class="title">开设店铺</view>
|
||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
|
||||
<u-form-item labelWidth="auto" label="有无门面" required prop="shop_front" borderBottom>
|
||||
@ -158,7 +158,7 @@
|
||||
},
|
||||
// 校验
|
||||
async validate() {
|
||||
return await this.$refs.breedingForm.validate();;
|
||||
return await this.$refs.breedingForm.validate();
|
||||
},
|
||||
// 选择经营类型
|
||||
changeType(e) {
|
||||
@ -175,8 +175,13 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.card{
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
}
|
||||
.title {
|
||||
margin-top: 30rpx;
|
||||
font-weight: 500;
|
||||
font-size: 34rpx;
|
||||
|
||||
@ -195,8 +200,8 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: #f56c6c;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
@ -208,10 +213,11 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -240,8 +240,8 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: #f56c6c;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
@ -253,10 +253,11 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -212,9 +212,15 @@
|
||||
let arr = oaHomeData.filter(item => !item.admin); //过滤掉管理员专属页面
|
||||
this.oaHomeData = arr;
|
||||
} else {
|
||||
this.oaHomeData = oaHomeData;
|
||||
// let arr = oaHomeData.filter(item=>!item.personnel);//过滤掉普通用户专属页面
|
||||
// this.oaHomeData = arr;
|
||||
// this.oaHomeData = oaHomeData;
|
||||
let arr = oaHomeData.filter(item=>!item.captain);//过滤掉普通用户专属页面
|
||||
this.oaHomeData = arr;
|
||||
}
|
||||
// 判断是否需要显示更多按钮
|
||||
if(this.oaHomeData>=8){
|
||||
this.oaHomeData[7] = this.oaHomeData[this.oaHomeData.length-1];
|
||||
}else {
|
||||
this.oaHomeData.splice(this.oaHomeData.length-1,1)
|
||||
}
|
||||
},
|
||||
async getApproveList() {
|
||||
|
@ -207,7 +207,8 @@ export const oaHomeData = [
|
||||
{
|
||||
text: '固定资产',
|
||||
icon: prefix + 'oa/wcsq@2x.png',
|
||||
// url: '/subpkg/fixedAssets/fixedAssets'
|
||||
// url: '/subpkg/fixedAssets/fixedAssets',
|
||||
admin: true
|
||||
},
|
||||
{
|
||||
text: '合同管理',
|
||||
@ -229,7 +230,7 @@ export const oaHomeData = [
|
||||
text: '档案管理',
|
||||
icon: prefix + 'oa/bxsq@2x.png',
|
||||
url: '/subpkg/archives/archives',
|
||||
personnel: true
|
||||
captain: true
|
||||
},
|
||||
// {
|
||||
// text: '片区经理',
|
||||
|
@ -10,18 +10,17 @@
|
||||
<view class="text">
|
||||
<view class="name">{{item.name}}</view>
|
||||
<view class="mobile">
|
||||
<uni-icons type="phone" color="#999999FF"></uni-icons><text
|
||||
@click="copyPhone(item.phone)">{{item.phone}}</text>
|
||||
<uni-icons type="phone" color="#999999FF"></uni-icons><text>{{item.phone}}</text>
|
||||
</view>
|
||||
<view class="mobile">
|
||||
<uni-icons type="calendar" color="#999999FF"></uni-icons><text>{{item.create_time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="top">
|
||||
<view class="right" v-if="showView">
|
||||
<view class="top" @click="navTo('/subpkg/archivesDetail/archivesDetail?id='+item.id)">
|
||||
查看
|
||||
</view>
|
||||
<view class="bottom" @click="callUp(item.account)">
|
||||
<view class="bottom" @click="navTo('/subpkg/updateArchives/updateArchives?id='+item.id)">
|
||||
更新
|
||||
</view>
|
||||
</view>
|
||||
@ -29,13 +28,13 @@
|
||||
<view class="bottom">
|
||||
<view class="circle"></view>
|
||||
<view class="green">所属片区</view>
|
||||
<view>{{item.area_name+item.street_name}}</view>
|
||||
<view>{{item.address}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText"
|
||||
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
|
||||
</view>
|
||||
<button class="new_btn" v-if="$store.state.app.userInfo.admin_id==0"
|
||||
<button class="new_btn" v-if="showView"
|
||||
@click="navTo('/subpkg/newArchives/newArchives')">信息登记</button>
|
||||
<!-- <button class="new_btn" @click="navTo('/subpkg/updateArchives/updateArchives')">信息更新(测试中)</button> -->
|
||||
</view>
|
||||
@ -47,7 +46,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
user_id: 0,
|
||||
user_id: -1,
|
||||
list: [],
|
||||
loadConfig: {
|
||||
page: 1,
|
||||
@ -60,8 +59,10 @@
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.user_id = options.id
|
||||
console.log(options);
|
||||
if(options.id)this.user_id = options.id;
|
||||
else if(this.$store.state.app.userInfo.admin_id==0){ //如果用户是小队长,将带上自己的id
|
||||
this.user_id = this.$store.state.app.userInfo.id;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.initLoadconfig();
|
||||
@ -70,7 +71,7 @@
|
||||
computed: {
|
||||
// 是否显示查看和更新按钮
|
||||
showView() {
|
||||
return this.$store.state.app.userInfo.admin_id ? false : true;
|
||||
return !this.$store.state.app.userInfo.admin_id&&this.$store.state.app.userInfo.is_captain;
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
@ -131,7 +132,7 @@
|
||||
|
||||
.personnel_list {
|
||||
padding: 28rpx 0;
|
||||
margin-bottom: 100rpx;
|
||||
margin-bottom: 130rpx;
|
||||
|
||||
.item {
|
||||
margin: 0 auto;
|
||||
|
@ -219,8 +219,8 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: #f56c6c;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
@ -232,10 +232,11 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -57,8 +57,8 @@
|
||||
<residents ref="residentsRef"></residents>
|
||||
<breeding ref="breedingRef"></breeding>
|
||||
|
||||
|
||||
<block v-for="(item, index) in showDemandList" :key="'demand'+index">
|
||||
<!-- 更多内容 -->
|
||||
<!-- <block v-for="(item, index) in showDemandList" :key="'demand'+index">
|
||||
<block>
|
||||
<breeding v-if="item.id==7" ref="demandRef7"></breeding>
|
||||
<store v-if="item.id==8" ref="demandRef8"></store>
|
||||
@ -82,7 +82,7 @@
|
||||
</block>
|
||||
<button class="plus demand" @click="demandShow=true">点击添加更多需求</button>
|
||||
<u-picker :show="demandShow" ref="demandRef" :loading="demandLoading" :columns="[demandList, demandListChild]" keyName="name"
|
||||
@change="changeHandler" @cancel="demandShow = false" @confirm="changeDemand"></u-picker>
|
||||
@change="changeHandler" @cancel="demandShow = false" @confirm="changeDemand"></u-picker> -->
|
||||
|
||||
</u--form>
|
||||
<button @click="addArchives" class="btn">完成登记</button>
|
||||
@ -135,13 +135,13 @@
|
||||
// category_child: '2',
|
||||
// data_type: '1',
|
||||
id_card: '324234234353454343',
|
||||
sex: 1,
|
||||
sex: 2,
|
||||
name: '测试的',
|
||||
phone: 14332323444, //电话
|
||||
highway: 1, //汽车是否能到家
|
||||
smart_phone: 1, //是否使用智能手机
|
||||
wechat: 21313132, //微信号
|
||||
address: '大师傅大师傅但是', //家庭地址
|
||||
address: '张家村', //家庭地址
|
||||
age: 33, //年龄
|
||||
category_id: '1',
|
||||
category_child: '2',
|
||||
@ -161,11 +161,10 @@
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
sex: {
|
||||
type: 'number',
|
||||
max: 1,
|
||||
required: true,
|
||||
message: '请选择男或女',
|
||||
trigger: ['blur', 'change']
|
||||
validator: (rule, value, callback) => {
|
||||
typeof value === 'number' ? callback() : callback('请选择男或女')
|
||||
},
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
age: {
|
||||
type: 'number',
|
||||
@ -207,7 +206,7 @@
|
||||
methods: {
|
||||
// 新增档案
|
||||
async addArchives() {
|
||||
Toast('开发中')
|
||||
// Toast('开发中')
|
||||
let refsDatas = this.loadRefsDatas();
|
||||
let flag1 = await this.$refs.districtSelectorRef.validate();
|
||||
let flag2 = await this.$refs.residentsRef.validate();
|
||||
@ -215,7 +214,6 @@
|
||||
// return console.log(flag1);
|
||||
this.$refs.archives.validate().then(async (e) => {
|
||||
if (e==true && flag1==true && flag2==true && flag3==true) {
|
||||
console.log('提交');
|
||||
uni.showLoading()
|
||||
let districtForm = {
|
||||
area_id: this.$refs.districtSelectorRef.formData.area,
|
||||
@ -241,9 +239,9 @@
|
||||
icon: "none",
|
||||
title: "添加成功",
|
||||
success: () => {
|
||||
// setTimeout(() => {
|
||||
// uni.navigateBack()
|
||||
// }, 1000)
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -302,13 +300,13 @@
|
||||
|
||||
<style lang="scss">
|
||||
.card {
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
padding-top: 30rpx;
|
||||
|
||||
.item {
|
||||
margin-top: 30rpx;
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
|
||||
&:nth-child(1) {
|
||||
margin-top: 0;
|
||||
@ -331,9 +329,9 @@
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-top: 32rpx;
|
||||
margin: 32rpx auto;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
width: 694rpx;
|
||||
height: 84rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 42rpx 42rpx 42rpx 42rpx;
|
||||
@ -347,8 +345,8 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: #f56c6c;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
@ -360,8 +358,8 @@
|
||||
margin: 22rpx 0;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 14rpx;
|
||||
color: #fff;
|
||||
|
@ -12,7 +12,7 @@
|
||||
<u-form-item label="性别" required prop="sex" borderBottom>
|
||||
<u-radio-group v-model="formData.sex" style="margin: 16rpx;">
|
||||
<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:2,label:'女'}]" :key="index" :label="item.label"
|
||||
:name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
@ -26,6 +26,15 @@
|
||||
<u-form-item labelWidth="auto" label="身份证号" required prop="id_card" borderBottom>
|
||||
<u--input v-model="formData.id_card" placeholder="请输入身份证号" type="idcard"></u--input>
|
||||
</u-form-item>
|
||||
<view class="title">身份信息</view>
|
||||
<u-form-item labelWidth="auto" label="是否为小队长" required prop="is_captain" borderBottom>
|
||||
<u-radio-group v-model="formData.is_captain" style="margin: 16rpx;">
|
||||
<u-radio :customStyle="{marginRight: '16px'}"
|
||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
|
||||
:name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<!-- <u-form-item labelWidth="auto" label="登录密码" prop="formData.name" borderBottom>
|
||||
<u--input v-model="formData.password" placeholder="不输入密码则默认为手机号" password></u--input>
|
||||
</u-form-item>
|
||||
@ -125,11 +134,10 @@
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
sex: {
|
||||
type: 'number',
|
||||
max: 1,
|
||||
required: true,
|
||||
message: '请选择男或女',
|
||||
trigger: ['blur', 'change']
|
||||
validator: (rule, value, callback) => {
|
||||
typeof value === 'number' ? callback() : callback('请选择男或女')
|
||||
},
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
avatar: {
|
||||
type: 'string',
|
||||
@ -143,6 +151,12 @@
|
||||
message: '姓名不能为空',
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
is_captain:{
|
||||
validator: (rule, value, callback) => {
|
||||
typeof value === 'number' ? callback() : callback('不能为空')
|
||||
},
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
'qualification.id_card': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
@ -211,9 +225,9 @@
|
||||
icon: "none",
|
||||
title: "添加成功",
|
||||
success: () => {
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
// setTimeout(() => {
|
||||
// uni.navigateBack()
|
||||
// }, 1000)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -42,7 +42,7 @@
|
||||
</view>
|
||||
<u-line color="#999999FF"></u-line>
|
||||
<view class="bottom" style="margin-top: 28rpx;">
|
||||
<button class="look" @click="navTo('/subpkg/archives/archives?id='+item.id)">片区档案</button>
|
||||
<button v-if="item.is_captain" class="look" @click="navTo('/subpkg/archives/archives?id='+item.id)">片区档案</button>
|
||||
<button class="look" @click="navTo('/subpkg/personnelDetails/personnelDetails?id='+item.id)">查看</button>
|
||||
</view>
|
||||
</view>
|
||||
@ -129,6 +129,7 @@ export default {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding-top: 32rpx;
|
||||
padding-bottom: 130rpx;
|
||||
.personnel_item{
|
||||
width: 694rpx;
|
||||
// height: 407rpx;
|
||||
|
@ -10,7 +10,8 @@
|
||||
<view class="text">
|
||||
<view class="basic_name">
|
||||
<view class="name">{{userInfo.name}}</view>
|
||||
<image class="icon" :src="userInfo.sex==1?'../../static/icons/man.png':'../../static/icons/woman.png'"></image>
|
||||
<image class="icon" :src="userInfo.sex==1?'../../static/icons/man.png':'../../static/icons/woman.png'">
|
||||
</image>
|
||||
<!-- <view class="role" v-if="userInfo.roles">{{userInfo.roles[0]}}</view> -->
|
||||
</view>
|
||||
<view class="id_card">
|
||||
@ -21,9 +22,39 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
负责区域: {{userInfo.city_name+userInfo.area_name+userInfo.street_name}}{{userInfo.city_name+userInfo.area_name+userInfo.street_name}}
|
||||
<view class="bottom" style="margin-bottom: 10rpx;display: flex;align-items: center;">
|
||||
是否为小队长:
|
||||
<u-radio-group v-model="userInfo.is_captain" style="margin-left: 16rpx;" disabled>
|
||||
<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>
|
||||
<view class="update" @click="updateShow(userInfo.is_captain)"><uni-icons type="compose"
|
||||
color="#F9AA32"></uni-icons></view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
负责区域:
|
||||
{{userInfo.city_name+userInfo.area_name+userInfo.street_name}}{{userInfo.city_name+userInfo.area_name+userInfo.street_name}}
|
||||
</view>
|
||||
<u-popup :show="show" :round="10" mode="center">
|
||||
<view class="popup">
|
||||
<view class="p_title">修改信息</view>
|
||||
<view class="p_body">
|
||||
是否为小队长:
|
||||
<u-radio-group v-model="updateForm.is_captain" 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>
|
||||
</view>
|
||||
<view class="p_button">
|
||||
<view @click="show=false">取消</view>
|
||||
<view @click="updateInfo">确认</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
@ -32,31 +63,39 @@
|
||||
<block v-if="!skeleton">
|
||||
<view class="title">资质信息</view>
|
||||
<view class="c_item">
|
||||
<uni-section style="background-color: transparent;" title="身份证" titleFontSize="32rpx" type="line"></uni-section>
|
||||
<uni-section style="background-color: transparent;" title="身份证" titleFontSize="32rpx"
|
||||
type="line"></uni-section>
|
||||
<view class="card_box">
|
||||
<image :src="userInfo.qualification&&userInfo.qualification.id_card"
|
||||
@click="previewImg([userInfo.qualification&&userInfo.qualification.id_card,userInfo.qualification&&userInfo.qualification.id_card_b], 0)">
|
||||
</image>
|
||||
<image :src="userInfo.qualification&&userInfo.qualification.id_card_b"
|
||||
@click="previewImg([userInfo.qualification&&userInfo.qualification.id_card,userInfo.qualification&&userInfo.qualification.id_card_b], 1)"></image>
|
||||
@click="previewImg([userInfo.qualification&&userInfo.qualification.id_card,userInfo.qualification&&userInfo.qualification.id_card_b], 1)">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="c_item">
|
||||
<uni-section style="background-color: transparent;" title="驾驶证" titleFontSize="32rpx" type="line"></uni-section>
|
||||
<uni-section style="background-color: transparent;" title="驾驶证" titleFontSize="32rpx"
|
||||
type="line"></uni-section>
|
||||
<view class="card_box">
|
||||
<image :src="userInfo.qualification&&userInfo.qualification.car_card"
|
||||
@click="previewImg([userInfo.qualification&&userInfo.qualification.car_card,userInfo.qualification&&userInfo.qualification.car_card_b], 0)"></image>
|
||||
@click="previewImg([userInfo.qualification&&userInfo.qualification.car_card,userInfo.qualification&&userInfo.qualification.car_card_b], 0)">
|
||||
</image>
|
||||
<image :src="userInfo.qualification&&userInfo.qualification.car_card_b"
|
||||
@click="previewImg([userInfo.qualification&&userInfo.qualification.car_card,userInfo.qualification&&userInfo.qualification.car_card_b], 1)"></image>
|
||||
@click="previewImg([userInfo.qualification&&userInfo.qualification.car_card,userInfo.qualification&&userInfo.qualification.car_card_b], 1)">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="c_item">
|
||||
<uni-section style="background-color: transparent;" title="银行卡照片" titleFontSize="32rpx" type="line"></uni-section>
|
||||
<uni-section style="background-color: transparent;" title="银行卡照片" titleFontSize="32rpx"
|
||||
type="line"></uni-section>
|
||||
<view class="card_box">
|
||||
<image :src="userInfo.qualification&&userInfo.qualification.bank_account"
|
||||
@click="previewImg([userInfo.qualification&&userInfo.qualification.bank_account,userInfo.qualification&&userInfo.qualification.bank_account_b], 0)"></image>
|
||||
@click="previewImg([userInfo.qualification&&userInfo.qualification.bank_account,userInfo.qualification&&userInfo.qualification.bank_account_b], 0)">
|
||||
</image>
|
||||
<image :src="userInfo.qualification&&userInfo.qualification.bank_account_b"
|
||||
@click="previewImg([userInfo.qualification&&userInfo.qualification.bank_account,userInfo.qualification&&userInfo.qualification.bank_account_b], 1)"></image>
|
||||
@click="previewImg([userInfo.qualification&&userInfo.qualification.bank_account,userInfo.qualification&&userInfo.qualification.bank_account_b], 1)">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
@ -65,8 +104,9 @@
|
||||
<u-skeleton :loading="skeleton" :animate="true" title rows="2" rows-width="100%" rowsHeight="56"></u-skeleton>
|
||||
<block v-if="!skeleton">
|
||||
<view class="title">电子合同</view>
|
||||
<view class="card">
|
||||
<uni-section style="background-color: transparent;" :title="userInfo.name" titleFontSize="32rpx" type="line"></uni-section>
|
||||
<view v-if="userInfo.contract&&userInfo.contract.check_status==2" class="card">
|
||||
<uni-section style="background-color: transparent;" :title="userInfo.name" titleFontSize="32rpx"
|
||||
type="line"></uni-section>
|
||||
<view class="c_text">性别:{{userInfo.sex==1?'男':'女'}}</view>
|
||||
<view class="c_text">身份证号码:{{userInfo.id_card}}</view>
|
||||
<view class="c_text">联系电话:{{userInfo.phone}}</view>
|
||||
@ -85,167 +125,267 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<button v-if="!userInfo.is_contract&&!userInfo.contract" class="btn" @click="createContract">发起合同</button>
|
||||
<view v-if="userInfo.contract&&userInfo.contract.check_status==1" class="card">
|
||||
<view class="contract_box">
|
||||
<view class="left">
|
||||
<image class="contract_img" src="../../static/img/contract/pdf.png"></image>
|
||||
<view class="text">
|
||||
<view class="name">合同</view>
|
||||
<view>
|
||||
<text>{{userInfo.contract&&userInfo.contract.create_time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-line color="#999999FF" style="margin: 31rpx 0;"></u-line>
|
||||
<button>发送合同</button>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Toast } from '@/libs/uniApi.js'
|
||||
import {companyUserDetail} from "@/api/company.js"
|
||||
export default {
|
||||
onReady() {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: '#ffffff',
|
||||
backgroundColor: '#3175f9'
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
id:'',
|
||||
skeleton: true,
|
||||
userInfo: {
|
||||
qualification:{},
|
||||
contract:{},
|
||||
roles:{}
|
||||
import { Toast } from '@/libs/uniApi.js'
|
||||
import { companyUserDetail } from "@/api/company.js"
|
||||
import { loginSetInfo, userDraftingcontracts, userInitiateContract } from "@/api/oaUser.js"
|
||||
export default {
|
||||
onReady() {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: '#ffffff',
|
||||
backgroundColor: '#3175f9'
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
skeleton: true,
|
||||
show: false,
|
||||
updateForm:{
|
||||
is_captain: 0,
|
||||
},
|
||||
userInfo: {
|
||||
qualification: {},
|
||||
contract: {},
|
||||
roles: {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if(options.id)this.id=options.id;
|
||||
},
|
||||
onShow() {
|
||||
this.loadUserDetail();
|
||||
},
|
||||
methods: {
|
||||
naviTo(url) {
|
||||
url ?
|
||||
uni.navigateTo({
|
||||
url: url,
|
||||
}) : Toast('暂未开放')
|
||||
},
|
||||
loadUserDetail(){
|
||||
if(!this.id) return;
|
||||
companyUserDetail({
|
||||
id: this.id
|
||||
}).then(res=>{
|
||||
this.userInfo = res.data;
|
||||
this.skeleton = false;
|
||||
})
|
||||
onLoad(options) {
|
||||
if (options.id) this.id = options.id;
|
||||
},
|
||||
previewImg(urls, index=0){
|
||||
uni.previewImage({
|
||||
urls:urls,
|
||||
current:index
|
||||
})
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
onShow() {
|
||||
this.loadUserDetail();
|
||||
},
|
||||
methods: {
|
||||
naviTo(url) {
|
||||
url ?
|
||||
uni.navigateTo({
|
||||
url: url,
|
||||
}) : Toast('暂未开放')
|
||||
},
|
||||
updateShow(value) {
|
||||
this.updateForm.is_captain = value;
|
||||
this.show = true;
|
||||
},
|
||||
// 更新信息
|
||||
async updateInfo(){
|
||||
let res = await loginSetInfo({
|
||||
user_id: this.userInfo.id,
|
||||
is_captain: this.updateForm.is_captain
|
||||
});
|
||||
this.userInfo.is_captain = this.updateForm.is_captain;
|
||||
Toast('更新成功');
|
||||
this.show = false;
|
||||
},
|
||||
// 生成合同
|
||||
async createContract(){
|
||||
let res = await userInitiateContract({
|
||||
party_b:'',
|
||||
contract_type:'',
|
||||
type:''
|
||||
})
|
||||
Toast('合同已生成')
|
||||
},
|
||||
loadUserDetail() {
|
||||
if (!this.id) return;
|
||||
companyUserDetail({
|
||||
id: this.id
|
||||
}).then(res => {
|
||||
this.userInfo = res.data;
|
||||
this.skeleton = false;
|
||||
})
|
||||
},
|
||||
previewImg(urls, index = 0) {
|
||||
uni.previewImage({
|
||||
urls: urls,
|
||||
current: index
|
||||
})
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.title{
|
||||
font-size: 35rpx;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-bottom: 21rpx;
|
||||
}
|
||||
.card{
|
||||
width: 694rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||
padding: 28rpx;
|
||||
}
|
||||
.basic{
|
||||
margin: 28rpx 0;
|
||||
.card{
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
.basic_top{
|
||||
display: flex;
|
||||
margin-bottom: 28rpx;
|
||||
.avatar{
|
||||
width: 154rpx;
|
||||
height: 154rpx;
|
||||
background: #CCCCCC;
|
||||
border-radius: 7rpx 7rpx 7rpx 7rpx;
|
||||
margin-right: 28rpx;
|
||||
.page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 35rpx;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-bottom: 21rpx;
|
||||
}
|
||||
|
||||
.card {
|
||||
width: 694rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||
padding: 28rpx;
|
||||
}
|
||||
|
||||
.basic {
|
||||
margin: 28rpx 0;
|
||||
|
||||
.card {
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
|
||||
.basic_top {
|
||||
display: flex;
|
||||
margin-bottom: 28rpx;
|
||||
|
||||
.avatar {
|
||||
width: 154rpx;
|
||||
height: 154rpx;
|
||||
background: #CCCCCC;
|
||||
border-radius: 7rpx 7rpx 7rpx 7rpx;
|
||||
margin-right: 28rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.basic_name {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.icon {
|
||||
width: 21rpx;
|
||||
height: 21rpx;
|
||||
margin-left: 18rpx;
|
||||
margin-right: 36rpx;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #000000CC;
|
||||
}
|
||||
|
||||
.role {
|
||||
width: 284rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #3274F9;
|
||||
// white-space: nowrap; /* 不换行 */
|
||||
// overflow: hidden; /* 将超出文本隐藏 */
|
||||
// text-overflow: ellipsis; /* 使用省略号表示被隐藏的文本 */
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.text{
|
||||
|
||||
.bottom {
|
||||
.update {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #F9AA32;
|
||||
}
|
||||
}
|
||||
.popup{
|
||||
width: 500rpx;
|
||||
height: 300rpx;
|
||||
// padding: 28rpx;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
.basic_name{
|
||||
.p_title{
|
||||
margin-top: 20rpx;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 33rpx;
|
||||
}
|
||||
.p_body{
|
||||
margin: 28rpx;
|
||||
}
|
||||
.p_button{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.icon{
|
||||
width: 21rpx;
|
||||
height: 21rpx;
|
||||
margin-left: 18rpx;
|
||||
margin-right: 36rpx;
|
||||
}
|
||||
.name{
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #000000CC;
|
||||
}
|
||||
.role{
|
||||
width: 284rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
border-top: 1rpx solid #ccc;
|
||||
view{
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
border-left: 1rpx solid #ccc;
|
||||
color: #3274F9;
|
||||
// white-space: nowrap; /* 不换行 */
|
||||
// overflow: hidden; /* 将超出文本隐藏 */
|
||||
// text-overflow: ellipsis; /* 使用省略号表示被隐藏的文本 */
|
||||
&:nth-child(1){
|
||||
border-left: none;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.certification {
|
||||
margin-bottom: 28rpx;
|
||||
|
||||
.title {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.bottom{
|
||||
// width: 640rpx;
|
||||
// white-space: nowrap; /* 不换行 */
|
||||
// overflow: hidden; /* 将超出文本隐藏 */
|
||||
// text-overflow: ellipsis; /* 使用省略号表示被隐藏的文本 */
|
||||
}
|
||||
}
|
||||
}
|
||||
.certification{
|
||||
margin-bottom: 28rpx;
|
||||
.title{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.c_item{
|
||||
width: 694rpx;
|
||||
.card_box{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
image{
|
||||
width: 336rpx;
|
||||
height: 238rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||
border: 2rpx solid #CCCCCC;
|
||||
|
||||
.c_item {
|
||||
width: 694rpx;
|
||||
|
||||
.card_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
image {
|
||||
width: 336rpx;
|
||||
height: 238rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||
border: 2rpx solid #CCCCCC;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.contract{
|
||||
margin-bottom: 28rpx;
|
||||
.card{
|
||||
padding-top: 0;
|
||||
.contract_box{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.left {
|
||||
|
||||
.contract {
|
||||
margin-bottom: 28rpx;
|
||||
|
||||
.card {
|
||||
padding-top: 0;
|
||||
|
||||
.contract_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
|
||||
.contract_img {
|
||||
@ -301,7 +441,19 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-top: 32rpx;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 694rpx;
|
||||
height: 84rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 42rpx 42rpx 42rpx 42rpx;
|
||||
color: #fff;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,185 +1,207 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="card">
|
||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="archives">
|
||||
<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" placeholder="请输入姓名"></u--input>
|
||||
<u--input readonly v-model="formData.name" placeholder="请输入姓名"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="性别" required prop="sex" borderBottom>
|
||||
<u-radio-group v-model="formData.sex" style="margin: 16rpx;">
|
||||
<u-radio-group v-model="formData.sex" disabled style="margin: 16rpx;">
|
||||
<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:2,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" placeholder="请输入年龄"></u--input>
|
||||
<u--input readonly v-model="formData.age" placeholder="请输入年龄"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="身份证号" required prop="id_card" borderBottom>
|
||||
<u--input v-model="formData.id_card" placeholder="请输入身份证号" type="idcard"></u--input>
|
||||
<u--input readonly v-model="formData.id_card" placeholder="请输入身份证号" type="idcard"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="联系方式" required prop="phone" borderBottom>
|
||||
<u--input v-model="formData.phone" placeholder="请输入手机号" type="number"></u--input>
|
||||
<u--input readonly v-model="formData.phone" 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" placeholder="请输入详细地址"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="汽车是否能到家" required prop="highway" borderBottom>
|
||||
<u-radio-group v-model="formData.highway" 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" 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" placeholder="请输入微信号"></u--input>
|
||||
</u-form-item>
|
||||
</block>
|
||||
|
||||
<block v-for="(item, index) in showDemandList" :key="'demand'+index">
|
||||
<block>
|
||||
<breeding v-if="item.id==7" ref="demandRef7"></breeding>
|
||||
<store v-if="item.id==8" ref="demandRef8"></store>
|
||||
<deepProcessing v-if="item.id==9" ref="demandRef9"></deepProcessing>
|
||||
<thickProcessing v-if="item.id==10" ref="demandRef10"></thickProcessing>
|
||||
</block>
|
||||
</view>
|
||||
<residents ref="residentsRef"></residents>
|
||||
<!-- <breeding ref="breedingRef"></breeding> -->
|
||||
<store></store>
|
||||
<block>
|
||||
<houseRepair v-if="item.id==12" ref="demandRef12"></houseRepair>
|
||||
<houseDecoration v-if="item.id==13" ref="demandRef13"></houseDecoration>
|
||||
<houseRenovate v-if="item.id==14" ref="demandRef14"></houseRenovate>
|
||||
<houseTransaction v-if="item.id==15" ref="demandRef15"></houseTransaction>
|
||||
</block>
|
||||
<block>
|
||||
<banquetMarry v-if="item.id==17" ref="demandRef17"></banquetMarry>
|
||||
<banquetBirthday v-if="item.id==18" ref="demandRef18"></banquetBirthday>
|
||||
<banquetFullMoon v-if="item.id==19" ref="demandRef19"></banquetFullMoon>
|
||||
<banquetOther v-if="item.id==20" ref="demandRef20"></banquetOther>
|
||||
<banquetFuneral v-if="item.id==21" ref="demandRef21"></banquetFuneral>
|
||||
</block>
|
||||
<button class="delete" @click="removeShowDemand(index)">删除以上信息</button>
|
||||
</block>
|
||||
<button class="plus demand" @click="demandShow=true">点击添加更多需求</button>
|
||||
<u-picker :show="demandShow" ref="demandRef" :loading="demandLoading" :columns="[demandList, demandListChild]"
|
||||
keyName="name" @change="changeHandler" @cancel="demandShow = false" @confirm="changeDemand"></u-picker>
|
||||
</u--form>
|
||||
<button @click="addArchives" type="primary" class="btn">完成更新</button>
|
||||
<button @click="addArchives" class="btn">完成更新</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Toast } from "../../libs/uniApi"
|
||||
import { informationAdd } from "@/api/information.js"
|
||||
import { informationDetails, informationOpportunityUpdate } from "@/api/information.js"
|
||||
import { debounce, throttle } from "lodash"
|
||||
import { categoryBusinessList } from "@/api/oaPbulic.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},
|
||||
components: {
|
||||
districtSelector,
|
||||
residents,
|
||||
breeding,
|
||||
store,
|
||||
deepProcessing,
|
||||
thickProcessing,
|
||||
houseRepair,
|
||||
houseDecoration,
|
||||
houseRenovate,
|
||||
houseTransaction,
|
||||
banquetMarry,
|
||||
banquetBirthday,
|
||||
banquetFullMoon,
|
||||
banquetOther,
|
||||
banquetFuneral
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
demandShow: false,
|
||||
demandLoading: false,
|
||||
demandList: [], //更多需求
|
||||
demandListChild: [], //更多二级需求
|
||||
showDemandList: [], //更多需求展示列表
|
||||
updateFlag: true,
|
||||
formData: {
|
||||
id_card: '254566198003032255',
|
||||
sex: 0,
|
||||
name: '方法',
|
||||
phone: '18555555555', //电话
|
||||
highway: 1,//汽车是否能到家
|
||||
smart_phone: 1,//是否使用智能手机
|
||||
wechat: '15434535', //微信号
|
||||
address: '十分士大夫但是',//家庭地址
|
||||
age: '23',//年龄
|
||||
id_card: '',
|
||||
sex: '',
|
||||
name: '',
|
||||
phone: '', //电话
|
||||
highway: '', //汽车是否能到家
|
||||
smart_phone: '', //是否使用智能手机
|
||||
wechat: '', //微信号
|
||||
address: '', //家庭地址
|
||||
age: '', //年龄
|
||||
category_id: '1',
|
||||
category_child: '2',
|
||||
},
|
||||
rules: {
|
||||
phone: {
|
||||
required: true,
|
||||
pattern: /^(1[3456789]\d{9})$/,
|
||||
message: '请输入正确的手机号码',
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
id_card: {
|
||||
required: true,
|
||||
pattern: /^\d{17}[\dX]$|^\d{15}[\dX]$/,
|
||||
message: '请输入正确的身份证号',
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
sex: {
|
||||
type: 'number',
|
||||
max: 1,
|
||||
required: true,
|
||||
message: '请选择男或女',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
age: {
|
||||
type: 'number',
|
||||
required: true,
|
||||
message: '请输入年龄',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
name: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '姓名不能为空',
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
address: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '地址不能为空',
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
highway: {
|
||||
validator: (rule, value, callback )=>{
|
||||
typeof value==='number'?callback():callback('不能为空')
|
||||
},
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
smart_phone: {
|
||||
validator: (rule, value, callback )=>{
|
||||
typeof value==='number'?callback():callback('不能为空')
|
||||
},
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
data_type: '1',
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
onLoad(options) {
|
||||
this.initInformationDetails({ id: options.id })
|
||||
this.initCategoryBusinessList();
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
// 新增档案
|
||||
async addArchives() {
|
||||
return Toast('开发中')
|
||||
let flag1 = this.$refs.districtSelectorRef.validate();
|
||||
let flag2 = this.$refs.residentsRef.validate();
|
||||
let flag3 = this.$refs.breedingRef.validate();
|
||||
this.$refs.archives.validate().then(async (e) => {
|
||||
if (e&&flag1&&flag2&&flag3) {
|
||||
uni.showLoading()
|
||||
let districtForm = {
|
||||
area_id:this.$refs.districtSelectorRef.formData.area,
|
||||
street_id:this.$refs.districtSelectorRef.formData.street,
|
||||
village_id:this.$refs.districtSelectorRef.formData.village,
|
||||
brigade_id:this.$refs.districtSelectorRef.formData.brigade,
|
||||
}
|
||||
let res = await informationAdd({
|
||||
...this.formData,
|
||||
...districtForm,
|
||||
...this.$refs.residentsRef.residents,
|
||||
datas:{
|
||||
...this.$refs.breedingRef.formData
|
||||
}
|
||||
});
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "添加成功",
|
||||
success: () => {
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
async initInformationDetails(id) {
|
||||
let res = await informationDetails(id);
|
||||
this.formData = res.data;
|
||||
},
|
||||
// 更新档案
|
||||
addArchives: throttle(async function() {
|
||||
let refsDatas = await this.loadRefsDatas();
|
||||
if (!this.updateFlag) return;
|
||||
uni.showLoading({
|
||||
title: '正在更新...'
|
||||
});
|
||||
let res = await informationOpportunityUpdate({
|
||||
id: this.formData.id,
|
||||
datas: [...refsDatas]
|
||||
});
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '更新成功',
|
||||
success() {
|
||||
setTimeout(()=>{
|
||||
uni.navigateBack()
|
||||
},1000)
|
||||
}
|
||||
})
|
||||
|
||||
}, 1000),
|
||||
// 获取组件数据
|
||||
async loadRefsDatas() {
|
||||
this.updateFlag = true;
|
||||
let datas = [];
|
||||
let map = new Map(); // 使用map存储当前ref是第几位
|
||||
for (let demand of this.showDemandList) {
|
||||
if(map.get(demand.id)>=0) map.set(demand.id, map.get(demand.id)+1);
|
||||
else map.set(demand.id, 0);
|
||||
let now = map.get(demand.id);
|
||||
try {
|
||||
let res = await this.$refs['demandRef' + demand.id][now].validate();
|
||||
if (!!res) datas.push({
|
||||
card_id: demand.id,
|
||||
datas: { ...this.$refs['demandRef' + demand.id][now]['formData'] }
|
||||
})
|
||||
} catch (e) {
|
||||
console.log('err', e);
|
||||
this.updateFlag = false;
|
||||
}
|
||||
}
|
||||
return datas;
|
||||
},
|
||||
// 初始化商机分类
|
||||
async initCategoryBusinessList() {
|
||||
let res = await categoryBusinessList();
|
||||
this.demandList = res.data;
|
||||
},
|
||||
// 选择更多需求
|
||||
changeHandler(e) {
|
||||
if (e.columnIndex == 0) { //滑动左侧时才加载,右侧不加载
|
||||
this.demandListChild = this.demandList[e.indexs[0]].children || [];
|
||||
}
|
||||
},
|
||||
// 确认添加需求
|
||||
changeDemand: throttle(function(e) {
|
||||
this.demandShow = false;
|
||||
if (e.value[1]) {
|
||||
this.showDemandList.push(e.value[1]);
|
||||
} else {
|
||||
this.showDemandList.push(e.value[0]);
|
||||
}
|
||||
}, 3000),
|
||||
// 删除需求
|
||||
removeShowDemand(index) {
|
||||
uni.showModal({
|
||||
title: '确定删除这一部分内容吗',
|
||||
success: (res) => {
|
||||
if (res.confirm) this.showDemandList.splice(index, 1);
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
@ -189,13 +211,13 @@
|
||||
|
||||
<style lang="scss">
|
||||
.card {
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
padding-top: 30rpx;
|
||||
|
||||
.item {
|
||||
margin-top: 30rpx;
|
||||
background-color: #fff;
|
||||
margin: 28rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: 14rpx;
|
||||
|
||||
&:nth-child(1) {
|
||||
margin-top: 0;
|
||||
@ -218,9 +240,9 @@
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-top: 32rpx;
|
||||
margin: 32rpx auto;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 100%;
|
||||
width: 694rpx;
|
||||
height: 84rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 42rpx 42rpx 42rpx 42rpx;
|
||||
@ -229,4 +251,35 @@
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.delete {
|
||||
margin: 22rpx auto;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 694rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: #f56c6c;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.plus {
|
||||
margin: 22rpx auto;
|
||||
// margin-bottom: 40rpx;
|
||||
width: 694rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: $theme-oa-color;
|
||||
border-radius: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.demand {
|
||||
margin-top: 40rpx;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
</style>
|
Loading…
x
Reference in New Issue
Block a user