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