diff --git a/app.json b/app.json
index 821d04b..599cd01 100644
--- a/app.json
+++ b/app.json
@@ -32,7 +32,8 @@
"root": "subpages/addResi",
"name": "addResi",
"pages": [
- "pages/addResi/addResi"
+ "pages/addResi/addResi",
+ "pages/editResi/editResi"
]
},
{
@@ -96,7 +97,8 @@
"pages": [
"pages/index/index"
]
- },{
+ },
+ {
"root": "subpages/myTroubleshootDemand",
"name": "myTroubleshootDemand",
"pages": [
diff --git a/miniprogram_npm/@vant/weapp/steps/index.js b/miniprogram_npm/@vant/weapp/steps/index.js
index 1a9986a..b47be76 100644
--- a/miniprogram_npm/@vant/weapp/steps/index.js
+++ b/miniprogram_npm/@vant/weapp/steps/index.js
@@ -1,8 +1,6 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-var component_1 = require("../common/component");
-var color_1 = require("../common/color");
-(0, component_1.VantComponent)({
+import { VantComponent } from '../common/component';
+import { GREEN, GRAY_DARK } from '../common/color';
+VantComponent({
classes: ['desc-class'],
props: {
icon: String,
@@ -14,11 +12,11 @@ var color_1 = require("../common/color");
},
activeColor: {
type: String,
- value: color_1.GREEN,
+ value: GREEN,
},
inactiveColor: {
type: String,
- value: color_1.GRAY_DARK,
+ value: GRAY_DARK,
},
activeIcon: {
type: String,
@@ -27,8 +25,8 @@ var color_1 = require("../common/color");
inactiveIcon: String,
},
methods: {
- onClick: function (event) {
- var index = event.currentTarget.dataset.index;
+ onClick(event) {
+ const { index } = event.currentTarget.dataset;
this.$emit('click-step', index);
},
},
diff --git a/miniprogram_npm/@vant/weapp/steps/index.wxml b/miniprogram_npm/@vant/weapp/steps/index.wxml
index 06ed675..00c8e10 100644
--- a/miniprogram_npm/@vant/weapp/steps/index.wxml
+++ b/miniprogram_npm/@vant/weapp/steps/index.wxml
@@ -26,23 +26,15 @@
wx:else
class="van-step__circle"
style="{{ 'background-color: ' + (index < active ? activeColor : inactiveColor) }}"
- >{{index < active ? '√' : ''}}
+ />
-
-
-
-
-
+
+
-
diff --git a/miniprogram_npm/@vant/weapp/steps/index.wxss b/miniprogram_npm/@vant/weapp/steps/index.wxss
index 5067835..c653884 100644
--- a/miniprogram_npm/@vant/weapp/steps/index.wxss
+++ b/miniprogram_npm/@vant/weapp/steps/index.wxss
@@ -1 +1 @@
-@import '../common/index.wxss';.van-steps{background-color:var(--steps-background-color,#fff);overflow:hidden}.van-steps--horizontal{padding:10px;box-sizing: border-box;}.van-steps--horizontal .van-step__wrapper{display:flex;overflow:hidden;position:relative;padding: 10rpx;box-sizing: border-box;}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{color:var(--step-text-color,#969799);flex:1;font-size:var(--step-font-size,14px);position:relative}.van-step--finish{color:var(--step-finish-text-color,#323233)}.van-step__circle{text-align:center;background-color:var(--step-circle-color,#98a8c7);color:#fff;border-radius:50%;height:var(--step-circle-size,15px);font-size:24rpx;text-algin:center;width:var(--step-circle-size,15px);}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;transform:translate3d(0,50%,0);}.van-step__circle__center{position: absolute;left:50%;top:50%;transform: translate(-50%,-50%);width: 23px;height: 23px;background-color:#d0e2fb;border-radius: 50%;z-index: -1;}.van-step--horizontal:last-child{position:absolute;right:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;transform:none}.van-step--horizontal:last-child .van-step__circle-container{right:0;transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{background-color:#fff;bottom:6px;padding:0;position:absolute;transform:translate3d(-50%,50%,0);z-index:1}.van-step--horizontal .van-step__title{display:inline-block;font-size:var(--step-horizontal-title-font-size,12px);transform:translate3d(-50%,0,0)}.van-step--horizontal .van-step__line{background-color:var(--step-line-color,#ebedf0);bottom:6px;height:5px;left:0;position:absolute;right:0;transform:translate3d(0,50%,0)}.van-step--horizontal.van-step--process{color:var(--step-process-text-color,#323233)}.van-step--horizontal.van-step--process .van-step__icon{display:block;font-size:var(--step-icon-size,12px);line-height:1}.van-step--vertical{line-height:18px;padding:10px 10px 10px 0}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{background-color:#fff;content:"";height:20px;left:-15px;position:absolute;top:0;width:1px;z-index:1}.van-step--vertical .van-step__circle,.van-step--vertical .van-step__icon,.van-step--vertical .van-step__line{left:-14px;position:absolute;top:19px;transform:translate3d(-50%,-50%,0);z-index:2}.van-step--vertical .van-step__icon{background-color:var(--steps-background-color,#fff);font-size:var(--step-icon-size,12px);line-height:1}.van-step--vertical .van-step__line{background-color:var(--step-line-color,#ebedf0);height:100%;transform:translate3d(-50%,0,0);width:1px;z-index:1}
\ No newline at end of file
+@import '../common/index.wxss';.van-steps{background-color:var(--steps-background-color,#fff);overflow:hidden}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{display:flex;overflow:hidden;position:relative}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{color:var(--step-text-color,#969799);flex:1;font-size:var(--step-font-size,14px);position:relative}.van-step--finish{color:var(--step-finish-text-color,#323233)}.van-step__circle{background-color:var(--step-circle-color,#969799);border-radius:50%;height:var(--step-circle-size,5px);width:var(--step-circle-size,5px)}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{position:absolute;right:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;transform:none}.van-step--horizontal:last-child .van-step__circle-container{padding:0 0 0 8px;right:0;transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{background-color:#fff;bottom:6px;padding:0 var(--padding-xs,8px);position:absolute;transform:translate3d(-50%,50%,0);z-index:1}.van-step--horizontal .van-step__title{display:inline-block;font-size:var(--step-horizontal-title-font-size,12px);transform:translate3d(-50%,0,0)}.van-step--horizontal .van-step__line{background-color:var(--step-line-color,#ebedf0);bottom:6px;height:1px;left:0;position:absolute;right:0;transform:translate3d(0,50%,0)}.van-step--horizontal.van-step--process{color:var(--step-process-text-color,#323233)}.van-step--horizontal.van-step--process .van-step__icon{display:block;font-size:var(--step-icon-size,12px);line-height:1}.van-step--vertical{line-height:18px;padding:10px 10px 10px 0}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{background-color:#fff;content:"";height:20px;left:-15px;position:absolute;top:0;width:1px;z-index:1}.van-step--vertical .van-step__circle,.van-step--vertical .van-step__icon,.van-step--vertical .van-step__line{left:-14px;position:absolute;top:19px;transform:translate3d(-50%,-50%,0);z-index:2}.van-step--vertical .van-step__icon{background-color:var(--steps-background-color,#fff);font-size:var(--step-icon-size,12px);line-height:1}.van-step--vertical .van-step__line{background-color:var(--step-line-color,#ebedf0);height:100%;transform:translate3d(-50%,0,0);width:1px;z-index:1}
\ No newline at end of file
diff --git a/pages/index/index.js b/pages/index/index.js
index fda2331..b9eb93b 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -147,7 +147,7 @@ onScrollToLower(e){
this.clearOneMessage(e.currentTarget.dataset.item.id)
if(e.currentTarget.dataset.item.msgType == 'resident_base_info'){
wx.navigateTo({
- url: `/subpages/addResi/pages/addResi/addResi?type=edit&resiId=${e.currentTarget.dataset.item.targetId}`,
+ url: `/subpages/addResi/pages/editResi/editResi?type=edit&resiId=${e.currentTarget.dataset.item.targetId}`,
})
}else{
wx.navigateTo({
diff --git a/pages/login/login.js b/pages/login/login.js
index 6232cad..751bdbb 100644
--- a/pages/login/login.js
+++ b/pages/login/login.js
@@ -103,7 +103,6 @@ Page({
console.log(parm.wxCode);
userLoginlog(parm).then((res)=>{
console.log(res);
- wx.hideLoading()
if(res.code == 0){
wx.switchTab({
url: '/pages/index/index',
@@ -111,7 +110,6 @@ Page({
wx.setStorageSync('token', res.data.token)
}
}).catch(err=>{
- wx.hideLoading()
wx.showToast({
title: res.msg,
icon:'none',
@@ -119,6 +117,8 @@ Page({
})
console.log(err);
})
+ wx.hideLoading()
+
},
})
},
diff --git a/subpages/addResi/component/expandForm/index.js b/subpages/addResi/component/expandForm/index.js
new file mode 100644
index 0000000..dcc3772
--- /dev/null
+++ b/subpages/addResi/component/expandForm/index.js
@@ -0,0 +1,131 @@
+// subpages/addResi/com/expandForm.js
+
+Component({
+
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ "formList": {
+ "type": Array,
+ "value": []
+ },
+ "popupTitle":{
+ "type": String,
+ "value": ""
+ }
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ form:{
+ // 党员信息
+ parymemberInfoDto: {
+ joinTime: null,
+ positiveTime: null,
+ partyOrgId: null,
+ flowFlag: null,
+ flowActNum: null,
+ partyJob: null,
+ duty: null,
+ retiredFlag: null,
+ centerFlag: null,
+ studyNotNeed: null,
+ joinBranchName: null,
+ joinCommunityTime: null
+ },
+ // 残疾信息
+ healthDto: {
+ disabilityCategoryCode: null,
+ disabilityLevel: null,
+ disabilityNum: null,
+ disabilityDesc: null,
+ guardianFlag: null,
+ guardianName: null,
+ guardianMobile:null,
+ specialSkillFlag: null,
+ workCapacityFlag: null
+ },
+ // 大病信息
+ seriousIllnessDto: {
+ illnessCodes: []
+ },
+ // 慢病信息
+ chronicDiseaseDto: {
+ chronicDiseaseCodes: []
+ },
+ // 死亡信息
+ deathDto: {
+ deathTime: null
+ },
+ // 老年人
+ oldPeopleDto: {
+ oldPeopleCategories: [],
+ resideSituation: null,
+ oldSubsidy: null
+ },
+ // 低保人员
+ subsistenceAllowanceDto: {
+ reasons: [],
+ category:null ,
+ },
+ // 退役军人
+ veteranDto: {
+ joinArmyTime: null,
+ leaveArmyTime: null,
+ serviceUnit: null,
+ receiveUnit: null,
+ settlementAmount: null,
+ trainDesc: null,
+ employmentSituation: null,
+ pubWelfareJobFlag: null
+ },
+
+ // 保障房人员
+ ensureHouseDto: {
+ liveCommunity: null,
+ housingNature: null
+ },
+ // 统战人员
+ unitedFrontDto: {
+ unitedFrontType: null
+ },
+ //特扶人员
+ specialSupportDto: {
+ specialSupportType: null,//特扶类别
+ childName: null,//子女姓名
+ childGender: null,//子女性别
+ childDeathDate: null,//子女死亡日期
+ childDisabilityCategoryCode: null,//伤残类别
+ childDisabilityLevel: null,//伤残等级
+ },
+ // 志愿者
+ volunteerDto: {
+ volunteerCategory: []
+ },
+ },
+ },
+ // onReady(){
+ // },
+ ready: async function () {
+ console.log(this.data.formList);
+ },
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ updata(){
+
+ },
+ hideForm(){
+ this.triggerEvent('hideExpandForm')
+ },
+ confirm(){
+ this.triggerEvent('confirmExpandForm')
+ },
+
+
+ }
+})
\ No newline at end of file
diff --git a/subpages/addResi/component/expandForm/index.json b/subpages/addResi/component/expandForm/index.json
new file mode 100644
index 0000000..7e37c03
--- /dev/null
+++ b/subpages/addResi/component/expandForm/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/subpages/addResi/component/expandForm/index.wxml b/subpages/addResi/component/expandForm/index.wxml
new file mode 100644
index 0000000..70e4a18
--- /dev/null
+++ b/subpages/addResi/component/expandForm/index.wxml
@@ -0,0 +1,54 @@
+
+ {{popupTitle}}
+
+
+
+
+
+ {{itemP.label}}
+
+
+ 请选择
+
+
+
+
+
+ {{itemP.label}}
+
+
+
+
+
+ {{itemP.label}}
+
+
+
+
+
+ {{itemP.label}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/subpages/addResi/component/expandForm/index.wxss b/subpages/addResi/component/expandForm/index.wxss
new file mode 100644
index 0000000..f07634c
--- /dev/null
+++ b/subpages/addResi/component/expandForm/index.wxss
@@ -0,0 +1,112 @@
+/* subpages/addResi/com/expandForm.wxss */
+.title{
+ height: 90rpx;
+ line-height: 90rpx;
+ font-size: 34rpx;
+ font-family: PingFang SC;
+ font-weight: bold;
+ padding-left: 30rpx;
+ box-sizing: border-box;
+ color: #333333;
+ position: relative;
+}
+.gray{
+ color: #808080;
+}
+.form_card{
+ height: calc(100% - 235rpx);
+ overflow-y: scroll;
+ padding: 0 10px;
+ box-sizing: border-box;
+}
+.title .tag{
+ width: 10rpx;
+ height: 28rpx;
+ background: #3A80E7;
+ border-radius: 4rpx;
+ position: absolute;
+ left: 0rpx;
+ top: 50%;
+ transform: translateY(-14rpx);
+}
+.form_item{
+ display: flex;
+ align-items: center;
+ border-top: 1px solid #EAEAEA;
+ min-height: 100rpx;
+}
+.form_item .form_item_label{
+ min-width: 130rpx;
+ height: 100%;
+ line-height: 100rpx;
+ font-size: 32rpx;
+ font-family: PingFang SC;
+ font-weight: 500;
+ color: #666666;
+ position: relative;
+}
+.form_item .form_item_input{
+ flex: 1;
+ display: flex;
+ justify-content: space-around;
+ align-items: center;
+ margin-left: 51rpx;
+ overflow: hidden;
+
+}
+.form_card .form_item .form_item_input picker,
+.form_card .form_item .form_item_input input{
+ flex: 1;
+ height: 100rpx;
+ line-height: 100rpx;
+}
+.form_card .form_item .form_item_input image{
+ height: 22rpx;
+ width: 22rpx;
+}
+.form_item .form_item_input_radio{
+ display: flex;
+}
+.form_item .weui-cell{
+ display: flex;
+ margin-left: 20rpx;
+ align-items: center;
+}
+.bot_btn{
+ display: flex;
+ background-color: #fff;
+ z-index: 10;
+ width: 100%;
+ justify-content: space-between;
+ position: fixed;
+ bottom: 40rpx;
+ left: 50%;
+ box-sizing: border-box;
+ transform: translateX(-50%);
+ padding: 12rpx 90rpx;
+ box-sizing: border-box;
+ padding-bottom: constant(safe-area-inset-bottom);
+ padding-bottom: env(safe-area-inset-bottom);
+}
+.bot_btn .bottom_btn{
+ width: 240rpx;
+ height: 76rpx;
+ border-radius: 43rpx;
+ text-align: center;
+ line-height: 76rpx;
+ font-size: 32rpx;
+}
+.bot_btn .btn_bule{
+ background:#3974F6;
+ color: #fff;
+}
+.bottom_btn_close{
+ border-color:#999999 !important;
+}
+.weui-cell__bd{
+ font-size: 24rpx;
+}
+.form_item_input checkbox-group{
+ display: flex;
+ flex-wrap: wrap;
+}
\ No newline at end of file
diff --git a/subpages/addResi/pages/addResi/addResi.js b/subpages/addResi/pages/addResi/addResi.js
index 46b96bf..1476a83 100644
--- a/subpages/addResi/pages/addResi/addResi.js
+++ b/subpages/addResi/pages/addResi/addResi.js
@@ -1,6 +1,7 @@
// subpages/addResi/pages/addResi/addResi.js
import api from "../../../../utils/api"
var http = require('../../../../utils/request.js')
+var fly = require('../../../../utils/request')
import {
cardHide
@@ -28,21 +29,29 @@ Page({
stepsList: [{
text: '居住房屋',
desc: '',
+ inactiveIcon: 'checked',
+ activeIcon: 'arrow',
},
{
text: '基础信息',
desc: '',
+ inactiveIcon: 'checked',
+ activeIcon: 'arrow',
},
{
text: '拓展信息',
desc: '',
+ inactiveIcon: 'checked',
+ activeIcon: 'arrow',
},
{
text: '人员标签',
desc: '',
+ inactiveIcon: 'checked',
+ activeIcon: 'arrow',
},
], //步骤条数据
- activeForm: 2,
+ activeForm: 0,
/** 步骤条状态 */
form: {
baseInfoDto: {
@@ -141,28 +150,28 @@ Page({
employmentHardFlag: null, //是否就业困难对象;1是0不是
employmentWish: null, //劳动能力就业愿望
},
- healthyDto:{ //健康状况
- disabilityFlag:null, //残疾
- seriousIllnessFlag:null, //大病
- chronicDiseaseFlag:null, //慢病
- deathFlag:null, //死亡
+ healthyDto: { //健康状况
+ disabilityFlag: null, //残疾
+ seriousIllnessFlag: null, //大病
+ chronicDiseaseFlag: null, //慢病
+ deathFlag: null, //死亡
},
- attentionResiDto:{// 关注人群
- oldPeopleFlag:null, //老年人
- subsistenceAllowanceFlag:null, //低保
- veteranFlag:null, //退役军人
- ensureHouseFlag:null, //保障房人员
- fertileWomanFlag:null, //育龄妇女
- specialSupportFlag:null, //特扶人员
+ attentionResiDto: { // 关注人群
+ oldPeopleFlag: null, //老年人
+ subsistenceAllowanceFlag: null, //低保
+ veteranFlag: null, //退役军人
+ ensureHouseFlag: null, //保障房人员
+ fertileWomanFlag: null, //育龄妇女
+ specialSupportFlag: null, //特扶人员
},
- specialResiDto:{ //特殊人群
- specialResiFlag:null,
+ specialResiDto: { //特殊人群
+ specialResiFlag: null,
},
- identityDto:{ //身份信息
- volunteerFlag:null, //志愿者
- buildingChiefFlag:null, //楼长
- unitChiefFlag:null, //单元长
- publicWelfareFlag:null, //公益岗
+ identityDto: { //身份信息
+ volunteerFlag: null, //志愿者
+ buildingChiefFlag: null, //楼长
+ unitChiefFlag: null, //单元长
+ publicWelfareFlag: null, //公益岗
},
economyDto: {
monthIncome: null, //月收入
@@ -190,9 +199,14 @@ Page({
spouseSituationList: [], //配偶情况
unemploymentReasonList: [], //失业原因
employmentWishList: [], //就业意愿
- genderList: [{ label: '男', value: '1' }, { label: '女', value: '2' }],
- idTypeList : [
- {
+ genderList: [{
+ label: '男',
+ value: '1'
+ }, {
+ label: '女',
+ value: '2'
+ }],
+ idTypeList: [{
label: '其他',
value: 0
},
@@ -217,8 +231,7 @@ Page({
value: 5
}
],
- binaryOptionList : [
- {
+ binaryOptionList: [{
label: '是',
value: 1
},
@@ -228,7 +241,459 @@ Page({
}
]
},
-
+ showExpand: false,
+ expandFormList: [],
+ orgList: [{
+ id: 'healthDto',
+ children: [{
+ label: "残疾类别",
+ itemType: "select",
+ formName: "disabilityCategoryCode",
+ opctionUrl: 'sys/dict/data/dictlist',
+ opctionParams: {
+ dictType: 'disability_category_code'
+ },
+ opction: []
+ },
+ {
+ label: "残疾等级",
+ itemType: "select",
+ formName: "disabilityLevel",
+ opctionUrl: 'sys/dict/data/dictlist',
+ opctionParams: {
+ dictType: 'disability_level'
+ },
+ opction: []
+ },
+ {
+ label: "残疾证号",
+ itemType: "input",
+ formName: "disabilityNum",
+ },
+ {
+ label: "残疾说明",
+ itemType: "input",
+ formName: "disabilityDesc",
+ },
+ {
+ label: "监护人",
+ itemType: "radio",
+ formName: "guardianFlag",
+ opction: [{
+ label: '有',
+ formName: '',
+ value: 1
+ },
+ {
+ label: '无',
+ formName: '',
+ value: 0
+ }
+ ]
+ },
+ {
+ label: "监护人姓名",
+ itemType: "input",
+ formName: "guardianName",
+ },
+ {
+ label: "监护人联系电话",
+ itemType: "input",
+ formName: "guardianMobile",
+ },
+ {
+ label: "技能特长",
+ itemType: "radio",
+ formName: "specialSkillFlag",
+ opction: [{
+ label: '有',
+ formName: '',
+ value: 1
+ },
+ {
+ label: '无',
+ formName: '',
+ value: 0
+ }
+ ]
+ },
+ {
+ label: "劳动能力",
+ itemType: "radio",
+ formName: "workCapacityFlag",
+ opction: [{
+ label: '有',
+ formName: '',
+ value: 1
+ },
+ {
+ label: '无',
+ formName: '',
+ value: 0
+ }
+ ]
+ },
+ ]
+ },
+ {
+ id: 'seriousIllnessDto',
+ children: [{
+ label: "所患大病",
+ itemType: "checkbox",
+ formName: "illnessCodes",
+ opctionUrl: 'sys/dict/data/dictlist',
+ opctionParams: {
+ dictType: 'illness_code'
+ },
+ opction: []
+ }, ]
+ },
+ {
+ id: 'chronicDiseaseDto',
+ children: [{
+ label: "所患慢病",
+ itemType: "checkbox",
+ formName: "chronicDiseaseCodes",
+ opctionUrl: 'sys/dict/data/dictlist',
+ opctionParams: {
+ dictType: 'chronic_disease_code'
+ },
+ opction: []
+ }, ]
+ },
+ {
+ id: 'deathDto',
+ children: [{
+ label: "死亡时间",
+ itemType: "datepicker1",
+ formName: "deathTime",
+ }, ]
+ },
+ {
+ id: 'oldPeopleDto',
+ children: [{
+ label: "老年人分类",
+ itemType: "checkbox",
+ formName: "oldPeopleCategories",
+ opctionUrl: 'sys/dict/data/dictlist',
+ opctionParams: {
+ dictType: 'oldPeople_categories'
+ },
+ opction: []
+
+ },
+ {
+ label: "居住情况",
+ itemType: "select",
+ formName: "resideSituation",
+ opctionUrl: 'sys/dict/data/dictlist',
+ opctionParams: {
+ dictType: 'reside_situation'
+ },
+ },
+ {
+ label: "高龄补助",
+ itemType: "inputNum",
+ formName: "oldSubsidy",
+ },
+ ]
+ },
+ {
+ id: 'subsistenceAllowanceDto',
+ children: [{
+ label: "低保类别",
+ itemType: "select",
+ formName: "category",
+ opctionUrl: 'sys/dict/data/dictlist',
+ opctionParams: {
+ dictType: 'subsistence_allowance_category'
+ },
+ },
+ {
+ label: "低保享受原因",
+ itemType: "checkbox",
+ formName: "reasons",
+ opctionUrl: 'sys/dict/data/dictlist',
+ opctionParams: {
+ dictType: 'subsistence_allowance_reasons'
+ },
+ opction: []
+ },
+
+ ]
+ },
+ {
+ id: "parymemberInfoDto",
+ children: [{
+ label: "入党时间",
+ itemType: "datepicker1",
+ formName: "joinTime",
+ opction: []
+ },
+ {
+ label: "转正时间",
+ itemType: "datepicker1",
+ formName: "positiveTime",
+ opction: []
+ },
+ {
+ label: "所属党组织",
+ itemType: "cascader1",
+ formName: "partyOrgId",
+ opction: []
+ },
+ {
+ label: "流动党员",
+ itemType: "radio",
+ formName: "flowFlag",
+ opction: [{
+ label: '是',
+ value: 1
+ },
+ {
+ label: '否',
+ value: 0
+ },
+ ]
+ },
+ {
+ label: "流动党员活动证号",
+ itemType: "input",
+ formName: "flowActNum",
+ },
+ {
+ label: "职务",
+ itemType: "select",
+ formName: "partyJob",
+ opctionUrl: 'sys/dict/data/dictlist',
+ opctionParams: {
+ dictType: 'party_job'
+ },
+ opction: []
+ },
+ {
+ label: "工作职责",
+ itemType: "input",
+ formName: "duty",
+ },
+ {
+ label: "是否退休",
+ itemType: "radio",
+ formName: "retiredFlag",
+ opction: [{
+ label: '是',
+ value: 1
+ },
+ {
+ label: '否',
+ value: 0
+ },
+ ]
+ }, {
+ label: "党员中心户",
+ itemType: "radio",
+ formName: "centerFlag",
+ opction: [{
+ label: '是',
+ value: 1
+ },
+ {
+ label: '否',
+ value: 0
+ },
+ ]
+ }, {
+ label: "免学习",
+ itemType: "radio",
+ formName: "studyNotNeed",
+ opction: [{
+ label: '是',
+ value: 1
+ },
+ {
+ label: '否',
+ value: 0
+ },
+ ]
+ }, {
+ label: "入党时所在党支部",
+ itemType: "input",
+ formName: "joinBranchName",
+ }, {
+ label: "组织关系转入社区时间",
+ itemType: "datepicker1",
+ formName: "joinCommunityTime",
+ opction: []
+ },
+ ]
+ },
+ {
+ id: 'ensureHouseDto',
+ children: [{
+ label: "所在社区",
+ itemType: "input",
+ formName: "liveCommunity",
+ },
+ {
+ label: "住房性质",
+ itemType: "select",
+ formName: "housingNature",
+ opctionUrl: 'sys/dict/data/house',
+ opctionParams: {
+ formCode: "resi_base_info"
+ },
+ opction: []
+ }
+ ]
+ },
+ {
+ id: 'veteranDto',
+ children: [{
+ label: "入伍时间",
+ itemType: "datepicker1",
+ formName: "joinArmyTime",
+ opction: []
+ },
+ {
+ label: "退伍时间",
+ itemType: "datepicker1",
+ formName: "leaveArmyTime",
+ opction: []
+ },
+ {
+ label: "服役单位",
+ itemType: "input",
+ formName: "serviceUnit",
+ },
+ {
+ label: "接收单位",
+ itemType: "input",
+ formName: "receiveUnit",
+ },
+ {
+ label: "待安置补助金",
+ itemType: "inputNum",
+ formName: "settlementAmount",
+ opction: [
+
+ ]
+ },
+ {
+ label: "培训状况",
+ itemType: "input",
+ formName: "trainDesc",
+ },
+ {
+ label: "现就业情况",
+ itemType: "input",
+ formName: "employmentSituation",
+ },
+ {
+ label: "是否办理公益性岗位",
+ itemType: "radio",
+ formName: "pubWelfareJobFlag",
+ opction: [{
+ label: '是',
+ value: 1
+ },
+ {
+ label: '否',
+ value: 0
+ },
+ ]
+ }
+ ]
+ },
+ {
+ id: 'unitedFrontDto',
+ children: [{
+ label: "统战类型",
+ itemType: "input",
+ formName: "unitedFrontType",
+ }]
+ },
+ {
+ id: 'volunteerDto',
+ children: [{
+ label: "志愿者类别",
+ itemType: "checkbox",
+ formName: "volunteerCategory",
+ opctionUrl: 'sys/dict/data/dictlist',
+ opctionParams: {
+ dictType: "VOLUNTEER_CATEGORY"
+ },
+ opction: []
+ }]
+ },
+ {
+ id: 'specialSupportDto',
+ children: [
+
+ { //0
+ label: "特扶类别",
+ itemType: "select",
+ formName: "specialSupportType",
+ opction: [{
+ value: '1',
+ label: '失独'
+ },
+ {
+ value: '2',
+ label: '伤残'
+ }
+ ]
+ },
+ { //1
+ label: "子女姓名",
+ itemType: "input",
+ formName: "childName",
+ opction: []
+ },
+ { //2
+ label: "子女性别",
+ itemType: "select",
+ formName: "childGender",
+ opction: [{
+ value: '1',
+ label: '男'
+ },
+ {
+ value: '2',
+ label: '女'
+ }
+ ]
+ },
+ {
+ label: "子女死亡日期",
+ itemType: "datepicker1",
+ formName: "certificateDate",
+ opction: [],
+ },
+ {
+ label: "子女伤残类别",
+ itemType: "select",
+ formName: "childDisabilityCategoryCode",
+ opctionUrl: 'sys/dict/data/dictlist',
+ opctionParams: {
+ dictType: 'disability_category_code'
+ },
+ opction: []
+ },
+ {
+ label: "子女伤残等级",
+ itemType: "select",
+ formName: "childDisabilityLevel",
+ opctionUrl: 'sys/dict/data/dictlist',
+ opctionParams: {
+ dictType: 'disability_level'
+ },
+ opction: []
+ }
+
+ ]
+ },
+ ],
+ popupTitle: '新增'
},
/**
@@ -619,84 +1084,87 @@ Page({
['form.resideInfoDtos[' + e.currentTarget.dataset.indexp + '].currentResidence']: e.detail.value,
})
},
- bindPlaceOfDomicileInput(e){
+ bindPlaceOfDomicileInput(e) {
this.setData({
['form.resideInfoDtos[' + e.currentTarget.dataset.indexp + '].placeOfDomicile']: e.detail.value,
})
},
- bindOutOfTimeChange(e){
+ bindOutOfTimeChange(e) {
this.setData({
['form.resideInfoDtos[' + e.currentTarget.dataset.indexp + '].outOfTime']: e.detail.value,
})
},
- delHouse(e){
+ delHouse(e) {
this.data.form.resideInfoDtos = this.data.form.resideInfoDtos.filter((item, index) => index != e.currentTarget.dataset.indexp)
this.setData({
- 'form.resideInfoDtos':this.data.form.resideInfoDtos
- })
- },
- addHouse(){
- this.data.form.resideInfoDtos.push(
- {
- // agencyName: this.$store.state.user.agencyName,
- // agencyId: this.$store.state.user.agencyId,
- gridId: null,//所属网格id
- villageId: null,//小区id
- buildId: null,//楼栋id
- unitId: null,//单元id
- moveOutFlag: null,
- outOfTime: null,//迁出时间
- homeId: null, //房屋id
- placeOfDomicile: null,//户籍所在地
- currentResidence: null,//现居住地
- householdSituation: null,//人户状况
- houseHolderRel: null,//与户主关系
- resiHouseRel: null,//人房关系
- optionsV: [],
- optionsB: [],
- optionsH: [],
- optionsD: [],
- }
- )
- this.setData({
- 'form.resideInfoDtos':this.data.form.resideInfoDtos
- })
+ 'form.resideInfoDtos': this.data.form.resideInfoDtos
+ })
+ },
+ addHouse() {
+ this.data.form.resideInfoDtos.push({
+ // agencyName: this.$store.state.user.agencyName,
+ // agencyId: this.$store.state.user.agencyId,
+ gridId: null, //所属网格id
+ villageId: null, //小区id
+ buildId: null, //楼栋id
+ unitId: null, //单元id
+ moveOutFlag: null,
+ outOfTime: null, //迁出时间
+ homeId: null, //房屋id
+ placeOfDomicile: null, //户籍所在地
+ currentResidence: null, //现居住地
+ householdSituation: null, //人户状况
+ houseHolderRel: null, //与户主关系
+ resiHouseRel: null, //人房关系
+ optionsV: [],
+ optionsB: [],
+ optionsH: [],
+ optionsD: [],
+ })
+ this.setData({
+ 'form.resideInfoDtos': this.data.form.resideInfoDtos
+ })
+ },
+ close(){
+ wx.navigateBack({
+ delta:1
+ })
},
//**房屋逻辑end */
//**基础信息start */
- bindNameInput(e){
+ bindNameInput(e) {
this.setData({
['form.baseInfoDto.name']: e.detail.value,
})
},
- bindPickerChangeIdType(e){
+ bindPickerChangeIdType(e) {
const selectedIndex = e.detail.value;
const selectedVillage = this.data.dicts.idTypeList[selectedIndex]
this.setData({
- idTypeName:selectedVillage.label,
- 'form.baseInfoDto.idType':selectedVillage.value
+ idTypeName: selectedVillage.label,
+ 'form.baseInfoDto.idType': selectedVillage.value
})
},
- bindIdNumInput(e){
+ bindIdNumInput(e) {
this.setData({
'form.baseInfoDto.name': e.detail.value,
})
},
- bindPickerChangeNationality(e){
+ bindPickerChangeNationality(e) {
const selectedIndex = e.detail.value;
const selectedVillage = this.data.dicts.nationalityList[selectedIndex]
this.setData({
- nationalityName:selectedVillage.label,
- 'form.baseInfoDto.nationality':selectedVillage.value
+ nationalityName: selectedVillage.label,
+ 'form.baseInfoDto.nationality': selectedVillage.value
})
},
- bindMobileInput(e){
+ bindMobileInput(e) {
this.setData({
'form.baseInfoDto.mobile': e.detail.value,
})
},
- bindPickerChangeGender(){
+ bindPickerChangeGender() {
this.setData({
genderName: this.data.genderList[e.detail.value].label,
"form.gender": this.data.genderList[e.detail.value].value
@@ -707,13 +1175,13 @@ Page({
'form.baseInfoDto.birthday': e.detail.value
})
},
-
+
bindPickerChangeNation(e) {
this.setData({
"form.baseInfoDto.nation": this.data.dicts.nationList[e.detail.value].value
})
},
- bindPickerChangeEducation(e){
+ bindPickerChangeEducation(e) {
this.setData({
"form.eduInfoDto.cultureLevel": this.data.dicts.educationList[e.detail.value].value
})
@@ -724,7 +1192,7 @@ Page({
marriageName: this.data.dicts.marriageList[e.detail.value].label,
})
},
- bindPickerChangeSpouse(e){
+ bindPickerChangeSpouse(e) {
this.setData({
"form.familyInfoDto.spouseSituation": this.data.dicts.spouseSituationList[e.detail.value].value,
spouseSituationName: this.data.dicts.spouseSituationList[e.detail.value].label,
@@ -735,7 +1203,7 @@ Page({
'form.baseInfoDto.nativePlace': e.detail.value
})
},
- bindLocalResidenceFlag(e){
+ bindLocalResidenceFlag(e) {
this.setData({
'form.baseInfoDto.localResidenceFlag': e.detail.value
})
@@ -748,81 +1216,81 @@ Page({
"form.religionDto.religion": e.detail.value
})
},
- bindCareerStatus(e){
+ bindCareerStatus(e) {
this.setData({
- "form.workInfoDto.careerStatus":this.data.dicts.careerStatusList[e.detail.value].value,
- careerStatusName:this.data.dicts.careerStatusList[e.detail.value].label
+ "form.workInfoDto.careerStatus": this.data.dicts.careerStatusList[e.detail.value].value,
+ careerStatusName: this.data.dicts.careerStatusList[e.detail.value].label
})
},
- bindWorkUnit(e){
+ bindWorkUnit(e) {
this.setData({
"form.workInfoDto.workUnit": e.detail.value
})
},
- bindWorkOccupation(e){
+ bindWorkOccupation(e) {
this.setData({
"form.workInfoDto.occupation": e.detail.value
})
},
- bindMonthIncome(e){
+ bindMonthIncome(e) {
this.setData({
"form.economyDto.monthIncome": e.detail.value
})
},
- bindOriginWorkUnit(e){
+ bindOriginWorkUnit(e) {
this.setData({
"form.unemployedDto.originWorkUnit": e.detail.value
})
},
- bindUnemploymentTime(e){
+ bindUnemploymentTime(e) {
this.setData({
"form.unemployedDto.unemploymentTime": e.detail.value
})
},
- bindUnemploymentNum(e){
+ bindUnemploymentNum(e) {
this.setData({
"form.unemployedDto.unemploymentNum": e.detail.value
})
},
- bindUnemploymentReason(e){
+ bindUnemploymentReason(e) {
this.setData({
- "form.unemployedDto.unemploymentReason":this.data.dicts.unemploymentReasonList[e.detail.value].value,
- unemploymentReasonName:this.data.dicts.unemploymentReasonList[e.detail.value].label
+ "form.unemployedDto.unemploymentReason": this.data.dicts.unemploymentReasonList[e.detail.value].value,
+ unemploymentReasonName: this.data.dicts.unemploymentReasonList[e.detail.value].label
})
},
- bindEmploymentNum(e){
+ bindEmploymentNum(e) {
this.setData({
"form.unemployedDto.employmentNum": e.detail.value
})
},
- bindSpecialSkill(e){
+ bindSpecialSkill(e) {
this.setData({
"form.unemployedDto.specialSkill": e.detail.value
})
},
- bindUnempCompensationFlag(e){
+ bindUnempCompensationFlag(e) {
this.setData({
"form.unemployedDto.unempCompensationFlag": Number(e.detail.value)
})
},
- bindEmploymentHardFlag(e){
+ bindEmploymentHardFlag(e) {
this.setData({
"form.unemployedDto.employmentHardFlag": Number(e.detail.value)
})
},
- bindEmploymentWish(e){
+ bindEmploymentWish(e) {
this.setData({
- "form.unemployedDto.employmentWish":this.data.dicts.employmentWishList[e.detail.value].value,
- employmentWishName:this.data.dicts.employmentWishList[e.detail.value].label
+ "form.unemployedDto.employmentWish": this.data.dicts.employmentWishList[e.detail.value].value,
+ employmentWishName: this.data.dicts.employmentWishList[e.detail.value].label
})
},
- bindElderlyRelation(e){
+ bindElderlyRelation(e) {
this.setData({
- "form.familyInfoDto.elderlyRelation":this.data.dicts.houseHolderRelList[e.detail.value].value,
- elderlyRelationName:this.data.dicts.houseHolderRelList[e.detail.value].label
+ "form.familyInfoDto.elderlyRelation": this.data.dicts.houseHolderRelList[e.detail.value].value,
+ elderlyRelationName: this.data.dicts.houseHolderRelList[e.detail.value].label
})
},
- bindDependantMobile(e){
+ bindDependantMobile(e) {
this.setData({
"form.familyInfoDto.dependantMobile": e.detail.value
})
@@ -830,14 +1298,61 @@ Page({
//**拓展信息end */
//**人员标签start */
- bindResiLabelFlag(e){
+ onCloseExpandForm() {
+ this.setData({
+ showExpand: false
+ })
+ },
+ bindResiLabelFlag(e) {
let flagLabel = e.currentTarget.dataset.field.toString();
this.setData({
- [flagLabel]: Number(e.detail.value)
+ [flagLabel]: Number(e.detail.value)
})
},
- showDetailForm(e){
- console.log(e.currentTarget.dataset.field);
+ showDetailForm(e) {
+ let arr = this.data.orgList.filter(item => item.id === e.currentTarget.dataset.dto)
+ const promises = arr[0].children.map(async (item) => {
+ const acc = {};
+ if (item.opctionUrl) {
+ try {
+ const data = await this.getDictDataForm(item.opctionUrl, item.opctionParams);
+ item.opction = data;
+ } catch (error) {
+ console.error('Error fetching options:', error);
+ }
+ }
+ return acc;
+ });
+ Promise.all(promises).then((results) => {
+ this.setData({
+ popupTitle: e.currentTarget.dataset.title,
+ expandFormList: [...arr[0].children],
+ showExpand: true,
+ })
+ }).catch((error) => {
+ console.error('Error fetching options:', error);
+ });
+
+ },
+ async getDictDataForm(url, params) {
+ try {
+ const {
+ data
+ } = await fly.post(url, params);
+ return data;
+ } catch (error) {
+ console.log(error, `获取 ${opctionParams.dictType} 字典`);
+ }
+ },
+ hideExpandForm() {
+ this.setData({
+ showExpand: false
+ })
+ },
+ confirmExpandForm() {
+ this.setData({
+ showExpand: false
+ })
}
//**人员标签end */
})
\ No newline at end of file
diff --git a/subpages/addResi/pages/addResi/addResi.json b/subpages/addResi/pages/addResi/addResi.json
index ed39ddc..fb5bd8f 100644
--- a/subpages/addResi/pages/addResi/addResi.json
+++ b/subpages/addResi/pages/addResi/addResi.json
@@ -4,6 +4,8 @@
"wux-select": "../../../../components/dist/select",
"DynamicForms": "../../../../components/DynamicForms/DynamicForms",
"van-icon": "@vant/weapp/icon/index",
- "van-steps": "@vant/weapp/steps/index"
+ "van-steps": "@vant/weapp/steps/index",
+ "van-popup":"@vant/weapp/popup/index",
+ "expand-form":"../../component/expandForm"
}
}
\ No newline at end of file
diff --git a/subpages/addResi/pages/addResi/addResi.wxml b/subpages/addResi/pages/addResi/addResi.wxml
index c40c63f..37b52a6 100644
--- a/subpages/addResi/pages/addResi/addResi.wxml
+++ b/subpages/addResi/pages/addResi/addResi.wxml
@@ -1,6 +1,6 @@
-
-
+
+
@@ -543,8 +543,9 @@
-
- 残疾信息
+
+ 残疾信息
+
@@ -562,8 +563,9 @@
-
- 大病信息
+
+ 大病信息
+
@@ -581,8 +583,9 @@
-
- 慢病信息
+
+ 慢病信息
+
@@ -600,8 +603,9 @@
-
- 死亡信息
+
+ 死亡信息
+
@@ -616,15 +620,16 @@
老年人
-
+
是
否
-
- 老年人信息
+
+ 老年人信息
+
@@ -640,8 +645,9 @@
-
- 低保信息
+
+ 低保信息
+
@@ -657,8 +663,9 @@
-
- 退役军人信息
+
+ 退役军人信息
+
@@ -674,8 +681,9 @@
-
- 保障房人员信息
+
+ 保障房人员信息
+
@@ -703,8 +711,9 @@
-
- 特扶人员信息
+
+ 特扶人员信息
+
@@ -714,7 +723,6 @@
特殊人群
-
安置帮教
@@ -830,8 +838,9 @@
-
- 志愿者信息
+
+ 志愿者信息
+
@@ -874,9 +883,12 @@
-
+
+
+
+
@@ -885,5 +897,4 @@
-
\ No newline at end of file
diff --git a/subpages/addResi/pages/addResi/addResi.wxss b/subpages/addResi/pages/addResi/addResi.wxss
index fd46ee8..092b351 100644
--- a/subpages/addResi/pages/addResi/addResi.wxss
+++ b/subpages/addResi/pages/addResi/addResi.wxss
@@ -19,7 +19,7 @@ page {
width: 100%;
padding: 0 20rpx;
box-sizing: border-box;
- height:calc(100vh - 120rpx ) ;
+ height:calc(100vh - 160rpx ) ;
overflow-y: scroll;
@@ -28,7 +28,7 @@ page {
background-color: #fff;
border-radius: 10rpx;
padding: 0 30rpx;
- margin-bottom: 20rpx;
+ margin-top: 20rpx;
box-sizing: border-box;
}
@@ -37,9 +37,7 @@ page {
margin-top: 20rpx;
overflow-y: scroll;
} */
-.house_box{
- height:calc(100% - 120rpx ) ;
-}
+
.house_box .house_btn{
height: 80rpx;
width: 50%;
@@ -146,21 +144,31 @@ page {
font-family: PingFang SC;
font-weight: 500;
color: #666666;
- position: relative;
margin-left: 50rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+.form_card .detail image{
+ width:20rpx;
+ height: 20rpx;
}
-
.bot_btn{
display: flex;
background-color: #fff;
+ z-index: 10;
width: 100%;
justify-content: space-between;
position: fixed;
bottom: 0;
left: 50%;
+ box-sizing: border-box;
transform: translateX(-50%);
padding: 12rpx 90rpx;
box-sizing: border-box;
+ padding-bottom: constant(safe-area-inset-bottom);
+ padding-bottom: env(safe-area-inset-bottom);
+
}
.bot_btn .bottom_btn{
width: 240rpx;
diff --git a/subpages/addResi/pages/editResi/editResi.js b/subpages/addResi/pages/editResi/editResi.js
new file mode 100644
index 0000000..9e25893
--- /dev/null
+++ b/subpages/addResi/pages/editResi/editResi.js
@@ -0,0 +1,1426 @@
+// subpages/addResi/pages/addResi/addResi.js
+import api from "../../../../utils/api"
+import { cardHide } from "../../../../utils/util"
+
+
+import { $wuxSelect } from '../../../../components/dist/index'
+import {
+ dictlist,
+ getHouseType, getOldPeopleDetailById,
+ getVeteranDetailById, getVolunteerDetailById, publicWelfarePost,
+ residentEnsureHouse, residentSpecial, residentTenant,
+ residentUnemployed, residentUnitedFront, specialSupport
+} from "../../../../utils/statisticsApi";
+
+const app = getApp()
+Page({
+ data: {
+ hideData: {},
+ isShowIdNum: true,
+ isShowIdTel: true,
+ formController: [],
+ ensureHouseFlagOpen: false,
+ unemployedFlagOpen: false,
+ veteranFlagOpen: false,
+ unitedFrontFlagOpen: false,
+ volunteerFlagOpen: false,
+ specialSupportFlagOpen: false,
+ tenantFlagOpen: false,
+ specialCrowdFlagOpen: false,
+ oldPeopleFlagOpen: false,
+ publicWelfareFlagOpen: false,
+
+ residentTypeForm: {
+ ensureHouseFlag: [
+ {
+ type: 'select',
+ value: "",
+ valueIndex: -1,
+ label: '住房性质',
+ optionsKey: 'label',
+ valueKey: 'value',
+ options: [], // 字典获取
+ key: 'housingNature'
+ }, {
+ type: 'input',
+ value: '',
+ label: '保障类型',
+ key: 'securityType'
+ }, {
+ type: 'date',
+ value: "",
+ label: '发证日期',
+ key: 'certificateDate'
+ }, {
+ type: 'input',
+ value: '',
+ label: '补贴编号',
+ key: 'subsidyNum'
+ }, {
+ type: 'input',
+ value: '',
+ label: '补贴金额',
+ afterText: "元",
+ key: 'subsidyAmount'
+ }, {
+ type: 'input',
+ value: '',
+ label: '房东姓名',
+ key: 'landlordName'
+ }, {
+ type: 'input',
+ value: '',
+ label: '房东证件号',
+ key: 'landlordIdNum'
+ }, {
+ type: 'date',
+ value: "",
+ label: '通知书领取日期',
+ key: 'notificationRcvDate'
+ },
+ ],
+ unemployedFlag: [
+ {
+ type: 'input',
+ value: '',
+ label: '原工作单位',
+ key: 'originWorkUnit'
+ }, {
+ type: 'date',
+ value: '',
+ label: '失业时间',
+ key: 'unemploymentTime'
+ }, {
+ type: 'input',
+ value: '',
+ label: '失业证号',
+ key: 'unemploymentNum'
+ }, {
+ type: 'input',
+ value: '',
+ label: '再就业优惠证号',
+ key: 'employmentNum'
+ }, {
+ type: 'input',
+ value: '',
+ label: '技术特长',
+ key: 'specialSkill'
+ }, {
+ type: 'select',
+ value: "",
+ valueIndex: -1,
+ label: '失业原因',
+ optionsKey: 'label',
+ valueKey: 'value',
+ options: [], // 字典获取
+ key: 'unemploymentReason'
+ }, {
+ type: 'select',
+ value: "",
+ valueIndex: -1,
+ label: '是否就业困难对象',
+ optionsKey: 'label',
+ valueKey: 'value',
+ options: [{
+ value: 1,
+ label: '是'
+ }, {
+ value: 0,
+ label: '否'
+ }],
+ key: 'employmentHardFlag'
+ }, {
+ type: 'select',
+ value: "",
+ valueIndex: -1,
+ label: '劳动能力就业愿望',
+ optionsKey: 'label',
+ valueKey: 'value',
+ options: [], // 字典获取
+ key: 'employmentWish'
+ },
+ ],
+ veteranFlag: [
+ {
+ type: 'date',
+ value: '',
+ label: '入伍时间',
+ key: 'joinArmyTime'
+ }, {
+ type: 'date',
+ value: '',
+ label: '退伍时间',
+ key: 'leaveArmyTime'
+ }, {
+ type: 'input',
+ value: '',
+ label: '服役单位',
+ key: 'serviceUnit'
+ }, {
+ type: 'input',
+ value: '',
+ label: '接收单位',
+ key: 'receiveUnit'
+ }, {
+ type: 'input',
+ value: '',
+ label: '待安置补助金',
+ afterText: '元',
+ key: 'settlementAmount'
+ }, {
+ type: 'input',
+ value: '',
+ label: '培训状况',
+ key: 'trainDesc'
+ }, {
+ type: 'input',
+ value: '',
+ label: '现就业情况',
+ key: 'employmentSituation'
+ }, {
+ type: 'select',
+ value: "",
+ valueIndex: -1,
+ label: '是否办理公益性岗位',
+ optionsKey: 'label',
+ valueKey: 'value',
+ options: [{
+ value: 1,
+ label: '是'
+ }, {
+ value: 0,
+ label: '否'
+ }],
+ key: 'pubWelfareJobFlag'
+ },
+ ],
+ unitedFrontFlag: [
+ {
+ type: 'input',
+ value: '',
+ label: '职务',
+ key: 'duty'
+ }, {
+ type: 'input',
+ value: '',
+ label: '探亲情况',
+ key: 'visitation'
+ }
+ ],
+ volunteerFlag: [
+ {
+ type: 'checkbox',
+ value: '',
+ label: '志愿者类别',
+ key: 'volunteerCategory'
+ }, {
+ type: 'textarea',
+ value: '',
+ maxlength: 120,
+ label: '备注',
+ key: 'volunteerRemark'
+ },
+ ],
+ specialSupportFlag: [
+ {
+ type: 'select',
+ value: "",
+ valueIndex: -1,
+ label: '特扶类别',
+ optionsKey: 'label',
+ valueKey: 'value',
+ options: [
+ {
+ value: '1',
+ label: '失独'
+ },
+ {
+ value: '2',
+ label: '伤残'
+ }
+ ], // 字典
+ key: 'specialSupportType',
+ masterControl: true
+ }, {
+ type: 'input',
+ value: "",
+ label: '子女姓名',
+ key: 'childName',
+ showFlag: '2',
+ hide: true
+ }, {
+ type: 'select',
+ value: "",
+ valueIndex: -1,
+ label: '子女性别',
+ optionsKey: 'label',
+ valueKey: 'value',
+ options: [
+ {
+ value: '1',
+ label: '男'
+ },
+ {
+ value: '2',
+ label: '女'
+ }
+ ], // 字典
+ key: 'childGender'
+ }, {
+ type: 'date',
+ value: "",
+ label: '子女死亡日期',
+ key: 'childDeathDate',
+ showFlag: '1',
+ hide: true
+ }, {
+ type: 'select',
+ value: "",
+ valueIndex: -1,
+ label: '伤残类别',
+ optionsKey: 'label',
+ valueKey: 'value',
+ options: [], // 字典
+ key: 'childDisabilityCategoryCode',
+ showFlag: '2',
+ hide: true
+ }, {
+ type: 'select',
+ value: "",
+ valueIndex: -1,
+ label: '伤残等级',
+ optionsKey: 'label',
+ valueKey: 'value',
+ options: [], // 字典
+ key: 'childDisabilityLevel',
+ showFlag: '2',
+ hide: true
+ }, {
+ type: 'textarea',
+ value: '',
+ maxlength: 120,
+ label: '备注',
+ key: 'remark'
+ },
+ ],
+ tenantFlag: [
+ {
+ type: 'date',
+ value: "",
+ label: '合同开始时间',
+ key: 'contractStartDate'
+ }, {
+ type: 'date',
+ value: "",
+ label: '合同结束时间',
+ key: 'contractEndDate'
+ },],
+ specialCrowdFlag: [
+ {
+ type: 'select',
+ value: "",
+ valueIndex: -1,
+ label: '人群类别',
+ optionsKey: 'label',
+ valueKey: 'value',
+ options: [], // 字典
+ key: 'specialCategoryCode'
+ }],
+ oldPeopleFlag: [
+ {
+ type: 'input',
+ value: '',
+ label: '高龄补助',
+ afterText: '元',
+ key: 'oldSubsidy'
+ }],
+ publicWelfareFlag: [
+ {
+ type: 'date',
+ value: "",
+ label: '入职时间',
+ key: 'hireData'
+ }, {
+ type: 'checkbox',
+ value: "",
+ valueIndex: -1,
+ label: '岗位类型',
+ optionsKey: 'label',
+ valueKey: 'value',
+ options: [], // 字典
+ key: 'postTypes'
+ }, {
+ type: '',
+ value: "",
+ key: 'userId'
+ }],
+ },
+ residentTypeFormCell: [],
+ nation: [],
+ education: [],
+ marriageList: [],
+ marriageName: '',
+ form: {
+ agencyName: "",
+ agencyId: "",
+ resiId: "",
+ houseMergeId: "",
+ categoryId: "",
+ gridName: "",
+ gridId: "",
+ villageId: "",
+ buildId: "",
+ unitId: "",
+ homeId: "",
+ name: "",
+ nation: "",
+ remark: "",
+ localResidenceFlag: "",
+ birthday: "",
+ idNum: "",
+ gender: "",
+ mobile: "",
+ partyFlag: 0,
+ subsistenceAllowanceFlag: 0,
+ ensureHouseFlag: 0,
+ unemployedFlag: 0,
+ fertileWomanFlag: 0,
+ veteranFlag: 0,
+ unitedFrontFlag: 0,
+ petitionOfficerFlag: "",
+ volunteerFlag: 0,
+ specialSupportFlag: 0,
+ tenantFlag: 0,
+ floatingFlag: 0,
+ specialCrowdFlag: 0,
+ oldPeopleFlag: 0,
+ emptyNesterFlag: 0,
+ liveAloneFlag: 0,
+ disabledFlag: 0,
+ dementedFlag: 0,
+ disabilityFlag: 0,
+ seriousIllnessFlag: 0,
+ chronicDiseaseFlag: 0,
+ publicWelfareFlag: 0,
+ resideInfoDto: {
+ placeOfDomicile: "",
+ currentResidence: "",
+ nativePlace: ""
+ },
+ eduInfoDto: {
+ cultureLevel: ""
+ },
+ familyInfoDto: {
+ marriage: ""
+ },
+ religionDto: {
+ religion: ""
+ }
+ },
+ isFirstLoadGrid: true,
+ isFirstLoadVillage: true,
+ isFirstLoadBuilding: true,
+ isFirstLoadUnit: true,
+ isFirstLoadHouse: true,
+ agencyId: '',
+ gridList: [],
+ villageList: [],
+ villageName: '',
+ buildingList: [],
+ buildingName: '',
+ unitList: [],
+ unitName: '',
+ houseList: [],
+ houseName: '',
+ genderList: [{ label: '男', value: '1' }, { label: '女', value: '2' }],
+ genderName: '',
+ day: '',
+ value3: [],
+ residentCategory: [
+ { title: '党员', value: 'partyFlag' },
+ { title: '低保人员', value: 'subsistenceAllowanceFlag' },
+ { title: '保障房人员', value: 'ensureHouseFlag', isForm: true },
+ { title: '失业人员', value: 'unemployedFlag', isForm: true },
+ { title: '育龄妇女', value: 'fertileWomanFlag' },
+ { title: '退役军人', value: 'veteranFlag', isForm: true },
+ { title: '统战人员', value: 'unitedFrontFlag', isForm: true },
+ { title: '信访人员', value: 'petitionOfficerFlag' },
+ { title: '志愿者', value: 'volunteerFlag', isForm: true },
+ { title: '特扶人员', value: 'specialSupportFlag', isForm: true },
+ { title: '租户', value: 'tenantFlag', isForm: true },
+ { title: '流动人口', value: 'floatingFlag' },
+ { title: '特殊人群', value: 'specialCrowdFlag', isForm: true },
+ { title: '老年人', value: 'oldPeopleFlag', isForm: true },
+ { title: '空巢老人', value: 'emptyNesterFlag' },
+ { title: '独居老人', value: 'liveAloneFlag' },
+ { title: '失能老人', value: 'disabledFlag' },
+ { title: '失智老人', value: 'dementedFlag' },
+ { title: '残疾', value: 'disabilityFlag' },
+ { title: '大病', value: 'seriousIllnessFlag' },
+ { title: '慢病', value: 'chronicDiseaseFlag' },
+ { title: '公益岗人员', value: 'publicWelfareFlag', isForm: true }
+ ],
+ residentCategorySty: '',
+ categoryInfo: '',
+ isShowDynamicForms: false,
+ dynamicTitle: " ",
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: async function (options) {
+ var nowDate = new Date();
+ var year = nowDate.getFullYear();
+ var month = nowDate.getMonth() + 1;
+ var day = nowDate.getDate();
+ this.setData({
+ statusHeight: app.globalData.deviceInfo.statusHeight,
+ navigationHeight: app.globalData.deviceInfo.navigationHeight,
+ agencyId: app.globalData.user.agencyId,
+ 'form.agencyId': app.globalData.user.agencyId,
+ 'form.agencyName': app.globalData.user.agencyName,
+ day: `${year}-${month}-${day}`,
+ formType: options.type,
+ resiId: options.resiId
+ })
+ await this.getNationDictList()
+ await this.getGridoptionDict()
+ await this.getEducationDictList()
+ await this.getmarriageDict()
+ if (options.resiId) {
+ wx.setNavigationBarTitle({
+ title: '修改人口信息',
+ })
+ await this.getResiDetail()
+ await this.getResidentResideInfo()
+ await this.getResidentReligion()
+ await this.getResidentEduInfo()
+ setTimeout(() => {
+ this.getFamilyInfoDetailById()
+ }, 500)
+ } else {
+ if (options.idCard) {
+ this.setData({
+ 'form.name': options.name,
+ 'form.idNum': options.idCard,
+ 'form.gender': options.gender == '男' ? '1' : "2",
+ genderName: options.gender,
+ 'form.birthday': options.birth,
+ })
+ }
+ this.setData({
+ isFirstLoadGrid: false,
+ isFirstLoadVillage: false,
+ isFirstLoadBuilding: false,
+ isFirstLoadUnit: false,
+ isFirstLoadHouse: false,
+ })
+ }
+ },
+ getResiDetail: async function () {
+ try {
+ let res = await api.getResiDetail(this.data.resiId);
+ const {
+ birthday,
+ gender,
+ idNum,
+ mobile,
+ name,
+ nation,
+ houseInfo = {}, // 为houseInfo提供一个默认值
+ categoryInfo,
+ genderName
+ } = res.data;
+
+ let result = this.data.residentCategory.filter(item => categoryInfo[item.value] === 1);
+ let residentCategorySty = result.map(item => item.title);
+ let categoryInfoArr = result.map(item => item.value);
+ this.setDynamicForm(result)
+
+ wx.showLoading({
+ title: '加载中...',
+ });
+ let form = this.data.form
+ for (let i in categoryInfoArr) {
+ form[categoryInfoArr[i]] = 1
+ }
+ this.setData({
+ form
+ })
+ this.setDataAsync({
+ 'form.name': name,
+ 'form.birthday': birthday,
+ 'form.gender': gender,
+ 'form.idNum': cardHide(idNum),
+ 'form.mobile': mobile,
+ 'form.nation': nation,
+ 'form.gridId': houseInfo?.gridId || '', // 使用了可选链
+ 'form.gridName': houseInfo?.gridName || '', // 使用了可选链
+ 'form.villageId': houseInfo?.villageId || '', // 使用了可选链
+ 'form.buildId': houseInfo?.buildId || '', // 使用了可选链
+ 'form.unitId': houseInfo?.unitId || '', // 使用了可选链
+ 'form.homeId': houseInfo?.homeId || '', // 使用了可选链
+ 'form.houseMergeId': houseInfo?.mergeId || '', // 使用了可选链
+ genderName,
+ categoryInfo: categoryInfoArr,
+ residentCategorySty,
+ });
+ await this.delay(1000)
+ await this.bindPickerChangeGrid();
+ await this.delay(400)
+ await this.bindPickerChangevillageId();
+ await this.delay(400)
+ await this.bindPickerChangebuilding();
+ await this.delay(400)
+ await this.bindPickerChangeUnit();
+ await this.delay(400)
+ await this.bindPickerChangeHouse();
+ wx.hideLoading();
+ } catch (err) {
+ console.log(err);
+ }
+ },
+ setDataAsync: function (data) {
+ return new Promise((resolve) => {
+ this.setData(data, resolve);
+ });
+ },
+ delay(ms) {
+ return new Promise(resolve => setTimeout(resolve, ms));
+ },
+ // 居住信息详情
+ getResidentResideInfo() {
+ api.getResidentResideInfo(this.data.resiId).then(res => {
+ this.setData({
+ 'form.resideInfoDto': res.data,
+ })
+ }).catch(err => {
+ console.log(err);
+ })
+ },
+ // 宗教信仰详情
+ getResidentReligion() {
+ api.getResidentReligion(this.data.resiId).then(res => {
+ this.setData({
+ 'form.religionDto': res.data
+ })
+ }).catch(err => {
+ console.log(err);
+ })
+ },
+ // 获取教育信息详情
+ getResidentEduInfo() {
+ api.getResidentEduInfo(this.data.resiId).then(res => {
+ this.setData({
+ 'form.eduInfoDto': res.data
+ })
+ }).catch(err => {
+ console.log(err);
+ })
+ },
+ // 获取婚姻信息
+ getFamilyInfoDetailById() {
+ api.getFamilyInfoDetailById(this.data.resiId).then(res => {
+ this.setData({
+ 'form.familyInfoDto': res.data,
+ marriageName: this.data.marriageList.filter(item => item.value == res.data.marriage)[0].label
+ })
+ }).catch(err => {
+ console.log(err);
+ })
+ },
+
+ getNationDictList() {
+ api.getNationDictList().then(res => {
+ this.setData({
+ nation: res.data
+ })
+ }).catch(err => {
+ console.log(err);
+ })
+ },
+ getEducationDictList() {
+ api.getEducationDictList().then(res => {
+ this.setData({
+ education: res.data
+ })
+ }).catch(err => {
+ console.log(err);
+ })
+ },
+ getGridoptionDict() {
+ let parm = {
+ agencyId: this.data.agencyId,
+ purpose: 'addorupdate'
+ }
+ api.getGridoptionDict(parm).then(res => {
+ this.setData({
+ gridList: res.data,
+ })
+ }).catch(err => {
+ console.log(err);
+ })
+ },
+ getmarriageDict() {
+ api.getDictList('marriage').then(res => {
+ this.setData({
+ marriageList: res.data
+ })
+ }).catch(err => {
+ console.log(err);
+ })
+ },
+ // 获取小区列表
+ getQuartersOptions(gridId) {
+ let parm = {
+ gridId,
+ agencyId: this.data.agecyId
+ }
+ api.getQuartersOptions(parm).then(res => {
+ this.setData({
+ villageList: res.data
+ })
+ }).catch(err => {
+ console.log(err);
+ })
+ },
+ // 获取楼栋列表
+ getBuildingoption(villageId) {
+ api.getBuildingoption(villageId).then(res => {
+ this.setData({
+ buildingList: res.data
+ })
+ }).catch(err => {
+ console.log(err);
+ })
+ },
+ // 获取单元列表
+ getUnitoption(buildingId) {
+ api.getUnitoption(buildingId).then(res => {
+ this.setData({
+ unitList: res.data
+ })
+ }).catch(err => {
+ console.log(err);
+ })
+ },
+ // 获取房屋列表
+ getHouseoption(unitId) {
+ api.getHouseoption(unitId).then(res => {
+ this.setData({
+ houseList: res.data
+ })
+ }).catch(err => {
+ console.log(err);
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+ },
+ // 获取网格列表
+ async bindPickerChangeGrid() {
+ return new Promise(async (resolve, reject) => {
+ if (this.data.isFirstLoadGrid) {
+ // 编辑回填逻辑
+ const id = this.data.form.gridId;
+ const temp = this.data.gridList.filter(item => item.value == id);
+ let gridName = ''
+ if (temp.length != 0) {
+ gridName = temp[0].label
+ } else {
+ this.showToast('网格信息有误')
+ return
+ }
+ this.setData({
+ 'form.gridName': gridName,
+ "form.gridId": id
+ });
+ this.getQuartersOptions(id);
+ this.setData({
+ isFirstLoadGrid: false
+ });
+ } else {
+ // 正常修改逻辑
+ const selectedIndex = e.detail.value;
+ const selectedVillage = this.data.gridList[selectedIndex];
+ this.setData({
+ 'form.gridName': selectedVillage.label,
+ "form.gridId": selectedVillage.value,
+ 'form.villageId': '',
+ 'form.buildId': '',
+ 'form.unitId': '',
+ 'form.homeId': '',
+ villageName: '',
+ villageList: [],
+ buildingName: '',
+ buildingList: [],
+ unitName: '',
+ unitList: [],
+ houseName: '',
+ houseList: [],
+ });
+
+ this.getQuartersOptions(selectedVillage.value);
+ }
+ resolve();
+ });
+ },
+ bindPickerChangevillageId(e) {
+ return new Promise((resolve, reject) => {
+ if (this.data.isFirstLoadVillage) {
+ // 编辑回填逻辑
+ const id = this.data.form.villageId;
+ const temp = this.data.villageList.filter(item => item.value == id);
+ let villageName = ''
+ if (temp.length != 0) {
+ villageName = temp[0].label
+ } else {
+ this.showToast('小区信息有误')
+ return
+ }
+ this.setData({
+ villageName: villageName,
+ "form.villageId": id
+ });
+ this.getBuildingoption(id);
+ this.setData({
+ isFirstLoadVillage: false
+ });
+ console.log(this.data.villageList, '小区');
+ } else {
+ // 正常修改逻辑
+ const selectedIndex = e.detail.value;
+ const selectedVillage = this.data.villageList[selectedIndex];
+
+ this.setData({
+ villageName: selectedVillage.label,
+ "form.villageId": selectedVillage.value,
+ 'form.buildId': '',
+ 'form.unitId': '',
+ 'form.homeId': '',
+ buildingName: '',
+ buildingList: [],
+ unitName: '',
+ unitList: [],
+ houseName: '',
+ houseList: [],
+ });
+
+ this.getBuildingoption(selectedVillage.value);
+ }
+ resolve();
+ });
+ },
+
+ bindPickerChangebuilding(e) {
+ return new Promise((resolve, reject) => {
+ if (this.data.isFirstLoadBuilding) {
+ const id = this.data.form.buildId;
+ const temp = this.data.buildingList.filter(item => item.value == id);
+ let buildingName = ''
+ if (temp.length != 0) {
+ buildingName = temp[0].label
+ } else {
+ this.showToast('小区信息有误')
+ return
+ }
+ this.setData({
+ buildingName: buildingName,
+ "form.buildId": id
+ });
+ this.getUnitoption(id);
+ this.setData({
+ isFirstLoadBuilding: false
+ });
+ } else {
+ const selectedIndex = e.detail.value;
+ const selectedVillage = this.data.buildingList[selectedIndex];
+ this.setData({
+ buildingName: selectedVillage.label,
+ "form.buildId": selectedVillage.value,
+ 'form.unitId': '',
+ 'form.homeId': '',
+ unitName: '',
+ unitList: [],
+ houseName: '',
+ houseList: [],
+ });
+ this.getUnitoption(selectedVillage.value);
+ }
+ resolve();
+ });
+ },
+ bindPickerChangeUnit(e) {
+ return new Promise((resolve, reject) => {
+ if (this.data.isFirstLoadUnit) {
+ const id = this.data.form.unitId;
+ const temp = this.data.unitList.filter(item => item.value == id);
+ let unitName = ''
+ if (temp.length != 0) {
+ unitName = temp[0].label
+ } else {
+ this.showToast('楼栋信息有误')
+ return
+ }
+ this.setData({
+ unitName: unitName,
+ "form.unitId": id,
+ });
+ this.getHouseoption(id);
+ this.setData({
+ isFirstLoadunit: false
+ });
+ } else {
+ const selectedIndex = e.detail.value;
+ const selectedVillage = this.data.unitList[selectedIndex];
+ this.setData({
+ unitName: selectedVillage.label,
+ "form.unitId": selectedVillage.value,
+ 'form.homeId': '',
+ houseName: '',
+ houseList: [],
+ });
+ this.getHouseoption(selectedVillage.value);
+ }
+ resolve();
+ });
+ },
+ bindPickerChangeHouse(e) {
+ return new Promise((resolve, reject) => {
+ if (this.data.isFirstLoadHouse) {
+ const id = this.data.form.homeId;
+ const temp = this.data.houseList.filter(item => item.value == id);
+ let houseName = ''
+ if (temp.length != 0) {
+ houseName = temp[0].label
+ } else {
+ this.showToast('房屋信息有误')
+ return
+ }
+ this.setData({
+ houseName: houseName,
+ "form.homeId": id
+ });
+ this.setData({
+ isFirstLoadHouse: false
+ });
+ } else {
+ const selectedIndex = e.detail.value;
+ const selectedVillage = this.data.houseList[selectedIndex];
+ this.setData({
+ houseName: selectedVillage.label,
+ "form.homeId": selectedVillage.value
+ });
+ }
+ resolve();
+ });
+ },
+ bindNameInput(e) {
+ this.setData({
+ 'form.name': e.detail.value
+ })
+ console.log(this.data.form)
+ },
+ bindPickerChangeGender(e) {
+ this.setData({
+ genderName: this.data.genderList[e.detail.value].label,
+ "form.gender": this.data.genderList[e.detail.value].value
+ })
+ },
+ bindDateChange(e) {
+ this.setData({
+ 'form.birthday': e.detail.value
+ })
+ },
+ bindidNumInput(e) {
+ this.setData({
+ isShowIdNum: false,
+ 'form.idNum': e.detail.value
+ })
+ console.log(this.data.form)
+ },
+ bindMobileInput(e) {
+ this.setData({
+ isShowIdTel: false,
+ 'form.mobile': e.detail.value
+ })
+ console.log(this.data.form)
+ },
+ bindPlaceOfDomicileInput(e) {
+ this.setData({
+ 'form.resideInfoDto.placeOfDomicile': e.detail.value
+ })
+ console.log(this.data.form)
+ },
+ bindCurrentResidenceInput(e) {
+ this.setData({
+ 'form.resideInfoDto.currentResidence': e.detail.value
+ })
+ console.log(this.data.form)
+ },
+ bindPickerChangeNation(e) {
+ this.setData({
+ "form.nation": this.data.nation[e.detail.value].value
+ })
+ },
+ bindNativePlaceInput(e) {
+ this.setData({
+ 'form.resideInfoDto.nativePlace': e.detail.value
+ })
+ },
+ bindPickerChangeEducation(e) {
+ this.setData({
+ "form.eduInfoDto.cultureLevel": this.data.education[e.detail.value].value
+ })
+ },
+ bindPickerChangemarriage(e) {
+ this.setData({
+ "form.familyInfoDto.marriage": this.data.marriageList[e.detail.value].value,
+ marriageName: this.data.marriageList[e.detail.value].label,
+ })
+ },
+ bindReligionInput(e) {
+ this.setData({
+ "form.religionDto.religion": e.detail.value
+ })
+ },
+ onClick3() {
+ const than = this
+ $wuxSelect('#wux-select3').open({
+ value: this.data.categoryInfo,
+ multiple: true,
+ toolbar: {
+ title: '居民类别',
+ confirmText: '确定',
+ },
+ options: than.data.residentCategory,
+ onChange: (value, index, options) => {
+ console.log('onChange', value, index, options)
+
+ const matchingLabels = value.map(valueToFind => {
+ const matchedItem = than.data.residentCategory.find(item => item.value === valueToFind);
+ return matchedItem ? matchedItem.title : null;
+ }).filter(Boolean);
+ this.setData({
+ value3: value,
+ residentCategorySty: matchingLabels.join(','),
+ })
+ },
+ onConfirm: (value, index, options) => {
+ console.log('onConfirm', value, index, options)
+ let updatedForm = { ...this.data.form };
+ than.data.residentCategory.forEach(option => {
+ if (value.includes(option.value)) {
+ updatedForm[option.value] = 1;
+ } else if (updatedForm[option.value] === 1) {
+ updatedForm[option.value] = 0;
+ }
+ });
+ this.setData({
+ value3: value,
+ title3: index.map((n) => options[n].title),
+ form: updatedForm
+ })
+ let residentTypeFormCell = []
+ index.forEach(item => {
+ residentTypeFormCell.push(this.data.residentCategory[item])
+ })
+ this.setDynamicForm(residentTypeFormCell)
+ console.log(this.data.form);
+ },
+ })
+ },
+ showToast(title) {
+ wx.showToast({
+ title: title,
+ duration: 2000,
+ icon: 'none'
+ })
+ },
+ submit: async function () {
+ if (!this.data.form.gridId) {
+ this.showToast('请选择所在网格')
+ return
+ }
+ if (!this.data.form.villageId) {
+ this.showToast('请选择所在小区')
+ return
+ }
+ if (!this.data.form.buildId) {
+ this.showToast('请选择所在楼栋')
+ return
+ }
+ if (!this.data.form.unitId) {
+ this.showToast('请选择所在单元')
+ return
+ }
+ if (!this.data.form.homeId) {
+ this.showToast('请选择所在房屋')
+ return
+ }
+ if (!this.data.form.name) {
+ this.showToast('请填写姓名')
+ return
+ }
+ if (!this.data.form.gender) {
+ this.showToast('请选择性别')
+ return
+ }
+ if (!this.data.form.birthday) {
+ this.showToast('请选择出生日期')
+ return
+ }
+ if (!this.data.form.idNum) {
+ this.showToast('请填写证件号')
+ return
+ }
+ if (!this.data.form.mobile) {
+ this.showToast('请填写联系电话')
+ return
+ }
+ console.log(this.data.isShowIdNum,this.data.formType != 'edit')
+ const parm = {
+ ...this.data.form,
+ // idNum: this.data.isShowIdNum&&this.data.formType === 'edit'?undefined:this.data.form.idNum,
+ // mobile: this.data.isShowIdTel&&this.data.formType === 'edit'?undefined:this.data.form.mobile,
+ ensureHouseDto: this.data.ensureHouseFlagOpen ? this.getValue(this.data.residentTypeForm.ensureHouseFlag) : undefined,
+ unemployedDto: this.data.unemployedFlagOpen ? this.getValue(this.data.residentTypeForm.unemployedFlag) : undefined,
+ veteranDto: this.data.veteranFlagOpen ? this.getValue(this.data.residentTypeForm.veteranFlag) : undefined,
+ unitedFrontDto: this.data.unitedFrontFlagOpen ? this.getValue(this.data.residentTypeForm.unitedFrontFlag) : undefined,
+ volunteerDto: this.data.volunteerFlagOpen ? this.getValue(this.data.residentTypeForm.volunteerFlag) : undefined,
+ specialSupportDto: this.data.specialSupportFlagOpen ? this.getValue(this.data.residentTypeForm.specialSupportFlag) : undefined,
+ tenantDto: this.data.tenantFlagOpen ? this.getValue(this.data.residentTypeForm.tenantFlag) : undefined,
+ specialDto: this.data.specialCrowdFlagOpen ? this.getValue(this.data.residentTypeForm.specialCrowdFlag) : undefined,
+ oldPeopleDto: this.data.oldPeopleFlagOpen ? this.getValue(this.data.residentTypeForm.oldPeopleFlag) : undefined,
+ postDto: this.data.publicWelfareFlagOpen ? this.getValue(this.data.residentTypeForm.publicWelfareFlag) : undefined,
+ }
+ console.log(this.data.formType);
+ if (this.data.formType == 'edit') {
+ parm.resiId = this.data.resiId
+ try {
+ const res = await api.resiEdit(parm)
+ if (res.code === 0) {
+ wx.showToast({
+ title: '编辑成功',
+ duration: 3000,
+ success: function () {
+ setTimeout(() => {
+ wx.navigateBack({
+ delta: 1
+ })
+ }, 3000)
+ }
+ })
+ }
+ } catch (err) {
+ console.log(err);
+ }
+ } else {
+ try {
+ const res = await api.resiAdd(parm)
+ if (res.code === 0) {
+ wx.showToast({
+ title: '新增成功',
+ duration: 3000,
+ success: function () {
+ setTimeout(() => {
+ wx.navigateBack({
+ delta: 1
+ })
+ }, 3000)
+ }
+ })
+ }
+ } catch (err) {
+ console.log(err);
+ }
+ }
+ },
+ back() {
+ //返回上一级,关闭当前页面
+ wx.navigateBack({
+ delta: 1
+ })
+ },
+ handelJump() {
+ wx.navigateTo({
+ url: '/subpages/addhouse/pages/addhouse/addhouse',
+ })
+ },
+ closeDynamicForms() {
+ this.setData({
+ isShowDynamicForms: false
+ })
+ },
+ okDynamicForms(e) {
+ console.log(e)
+ let residentTypeForm = this.data.residentTypeForm
+ residentTypeForm[this.data.currentFormController] = e.detail
+ this.setData({
+ residentTypeForm
+ })
+ },
+ setDynamicForm(data) {
+ let residentTypeFormCell = data.filter(item => item.isForm)
+ let values = residentTypeFormCell.map(item => item.value)
+ // 保障房人员
+ if (values.includes('ensureHouseFlag')) {
+ this.getHouseTypes()
+ }
+ // 失业人员
+ if (values.includes('unemployedFlag')) {
+ // 失业原因
+ this.getDictData('unemployment_reason', 'unemploymentReason')
+ // 愿望
+ this.getDictData('career_goals', 'employmentWish')
+ }
+ // 志愿者
+ if (values.includes('volunteerFlag')) {
+ // 志愿者类别
+ this.getDictData('VOLUNTEER_CATEGORY', 'volunteerCategory')
+ }
+ // 特扶
+ if (values.includes('specialSupportFlag')) {
+ //获取伤残类别字典
+ this.getDictData('disability_category_code', 'childDisabilityCategoryCode')
+ // 获取伤残等级字典
+ this.getDictData('disability_level', 'childDisabilityLevel')
+ }
+
+ // 特殊人群
+ if (values.includes('specialCrowdFlag')) {
+ //人群类别
+ this.getDictData('special_resident_category', 'specialCategoryCode')
+ }
+ // 公益岗人员
+ if (values.includes('specialCrowdFlag')) {
+ //岗位类型
+ this.getDictData('public_welfare_post_type', 'postTypes')
+ }
+
+
+ this.setData({ residentTypeFormCell })
+ // residentTypeForm
+ },
+ async openDynamicForms(e) {
+ var data = {}
+ let formtype = e.currentTarget.dataset.formtype
+ let id = this.data.resiId
+ if (formtype === 'ensureHouseFlag') {
+ let res = await residentEnsureHouse(id)
+ data = res.data
+ }
+ if (formtype === 'unemployedFlag') {
+ let res = await residentUnemployed(id)
+ data = res.data
+ }
+ if (formtype === 'veteranFlag') {
+ let res = await getVeteranDetailById(id)
+ data = res.data
+ }
+ if (formtype === 'unitedFrontFlag') {
+ let res = await residentUnitedFront(id)
+ data = res.data
+ }
+ if (formtype === 'volunteerFlag') {
+ let res = await getVolunteerDetailById(id)
+ data = res.data
+ }
+ if (formtype === 'specialSupportFlag') {
+ let res = await specialSupport(id)
+ data = res.data
+ }
+ if (formtype === 'tenantFlag') {
+ let res = await residentTenant(id)
+ data = res.data
+ }
+ if (formtype === 'specialCrowdFlag') {
+ let res = await residentSpecial(id)
+ data = res.data
+ }
+ if (formtype === 'oldPeopleFlag') {
+ let res = await getOldPeopleDetailById(id)
+ data = res.data
+ }
+ if (formtype === 'publicWelfareFlag') {
+ let res = await publicWelfarePost(id)
+ data = res.data
+ }
+ let residentTypeForm = this.data.residentTypeForm
+ residentTypeForm[formtype].forEach(item => {
+ if (item.key === 'userId') {
+ item.value = id
+ }
+ for (let i in data) {
+ if (item.key === i) {
+ item.value = data[item.key]
+ if (data[item.key]) {
+ console.log(data[item.key], 'data[item.key]')
+ if (item.type === 'date') {
+ item.value = data[item.key].split(' ')[0]
+ }
+ if (item.type === 'checkbox') {
+ let arr = []
+ let value = data[item.key].split(',')
+ value.forEach(item2 => {
+ arr.push(...item.options.filter(item3 => item3.value === item2))
+ })
+ item.selected = arr.map(item => item.label).join(',')
+ }
+ if (item.type === 'select') {
+ let options = item.options.map(item2 => item2[item.valueKey])
+ item.valueIndex = options.indexOf(item.value)
+ if (item.masterControl) {
+ residentTypeForm[formtype].forEach(item3 => {
+ if (item3.showFlag) {
+ if (item3.showFlag === item.value) {
+ item3.hide = false
+ } else {
+ item3.hide = true
+ }
+ }
+ })
+ }
+ } else {
+ item.valueIndex = -1
+ }
+ }
+ }
+ }
+ })
+ this.setData({
+ residentTypeForm,
+ [formtype + 'Open']: true,
+ dynamicFormsTitle: '填写' + e.currentTarget.dataset.title,
+ currentFormController: formtype,
+ formController: this.data.residentTypeForm[e.currentTarget.dataset.formtype],
+ isShowDynamicForms: true
+ })
+ console.log(this.data)
+ },
+ // 获取住房性质
+ getHouseTypes() {
+ getHouseType({ formCode: "resi_base_info" }).then(res => {
+ console.log(res.data)
+ this.setPickerOptions('housingNature', res.data)
+ })
+ },
+
+ getDictData(dictType, formName) {
+ dictlist({ 'dictType': dictType }).then(res => {
+ this.setPickerOptions(formName, res.data)
+ });
+ },
+ setPickerOptions(key, options) {
+ let residentTypeForm = this.data.residentTypeForm
+ for (let item in residentTypeForm) {
+ residentTypeForm[item].forEach(item2 => {
+ if (item2.key === key) {
+ item2.options = options
+ }
+ })
+ }
+ this.setData({ residentTypeForm })
+ },
+ getValue(arry) {
+ let obj = {}
+ arry.forEach(item => {
+ if (item.type === 'date' && item.value != '') {
+ item.value = item.value + ' 00:00:00'
+ }
+ obj[item.key] = item.value
+ })
+ return obj
+ },
+ hideData(e) {
+ let key = e.currentTarget.dataset.key
+ let form = this.data.form
+ form[key] = this.data.hideData[key]
+ if(key === 'idNum') {
+ this.setData({
+ isShowIdNum: !this.data.isShowIdNum
+ })
+ }
+ if(key === 'mobile') {
+ this.setData({
+ isShowIdTel: !this.data.isShowIdTel
+ })
+ }
+ this.setData({
+ form
+ })
+ },
+ showData(e) {
+ let key = e.currentTarget.dataset.key
+ let form = this.data.form;
+ let hideData = this.data.hideData
+ hideData[key] = form[key]
+ this.setData({
+ hideData
+ })
+
+
+ api.getResiUserInfo(this.data.resiId).then(res => {
+ if(key === 'idNum') {
+ this.setData({
+ isShowIdNum: !this.data.isShowIdNum
+ })
+ }
+ if(key === 'mobile') {
+ this.setData({
+ isShowIdTel: !this.data.isShowIdTel
+ })
+ }
+ form[key] = res.data[key]
+ this.setData({
+ form
+ })
+ console.log(res.data[key], this.data.form[key])
+ })
+ }
+})
\ No newline at end of file
diff --git a/subpages/addResi/pages/editResi/editResi.json b/subpages/addResi/pages/editResi/editResi.json
new file mode 100644
index 0000000..ca1a298
--- /dev/null
+++ b/subpages/addResi/pages/editResi/editResi.json
@@ -0,0 +1,8 @@
+{
+ "usingComponents": {
+ "wux-select": "../../../../components/dist/select",
+ "DynamicForms": "../../../../components/DynamicForms/DynamicForms",
+ "van-icon": "@vant/weapp/icon/index"
+ },
+ "navigationStyle": "custom"
+}
\ No newline at end of file
diff --git a/subpages/addResi/pages/editResi/editResi.wxml b/subpages/addResi/pages/editResi/editResi.wxml
new file mode 100644
index 0000000..2e20d0b
--- /dev/null
+++ b/subpages/addResi/pages/editResi/editResi.wxml
@@ -0,0 +1,271 @@
+
+
+
+
+
+ 基本信息
+
+
+
+ *
+ 所在网格
+
+
+
+
+ {{form.gridName ? form.gridName : '请选择'}}
+
+
+
+
+
+
+
+ *
+ 所在小区
+
+
+
+
+ {{villageName ? villageName : '请选择'}}
+
+
+
+
+
+
+
+ *
+ 所在楼栋
+
+
+
+
+ {{buildingName ? buildingName : '请选择'}}
+
+
+
+
+
+
+
+ *
+ 所在单元
+
+
+
+
+ {{unitName ? unitName : '请选择'}}
+
+
+
+
+
+
+
+
+ *
+ 所在房屋
+
+
+
+
+ {{houseName ? houseName : '请选择'}}
+
+
+
+
+
+ 选项中如无该房屋,请先
+ 新增房屋
+
+
+
+
+ *
+ 姓名
+
+
+
+
+
+
+
+ *
+ 性别
+
+
+
+
+ {{genderName ? genderName : '请选择'}}
+
+
+
+
+
+
+
+ *
+ 出生日期
+
+
+
+
+ {{form.birthday ? form.birthday : '请选择'}}
+
+
+
+
+
+
+
+ *
+ 证件号
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ *
+ 联系电话
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 详细信息
+
+
+
+ 户籍地
+
+
+
+
+
+
+
+ 现居地
+
+
+
+
+
+
+
+ 民族
+
+
+
+
+ {{form.nation ? nation[form.nation].label : '请选择'}}
+
+
+
+
+
+
+
+ 籍贯
+
+
+
+
+
+
+
+ 文化程度
+
+
+
+
+ {{form.eduInfoDto.cultureLevel ? education[form.eduInfoDto.cultureLevel].label : '请选择'}}
+
+
+
+
+
+
+
+ 婚姻状况
+
+
+
+
+ {{marriageName ? marriageName : '请选择'}}
+
+
+
+
+
+
+
+ 宗教信仰
+
+
+
+
+
+
+
+
+ 居民类别
+
+
+
+ 居民类别
+
+
+
+ {{residentCategorySty ? residentCategorySty : '请选择'}}
+
+
+
+
+
+
+ {{item.title}}
+
+
+
+
+
+
+ 提交
+
+
+
+
\ No newline at end of file
diff --git a/subpages/addResi/pages/editResi/editResi.wxss b/subpages/addResi/pages/editResi/editResi.wxss
new file mode 100644
index 0000000..efe9db5
--- /dev/null
+++ b/subpages/addResi/pages/editResi/editResi.wxss
@@ -0,0 +1,190 @@
+/* subpages/addResi/pages/addResi/addResi.wxss */
+page {
+ width: 100%;
+ min-height: 100vh;
+ overflow-y: auto;
+ background-color: #f7f7f7;
+ }
+.gray{
+ color: #C1C1C1;
+}
+.m-top20{
+ margin-top: 20rpx;
+}
+.header {
+ width: 100%;
+ height: 444rpx;
+ overflow: hidden;
+ /* position: fixed;
+ top: 0;
+ left: 0;
+ z-index: 1000; */
+}
+.header .header-bg {
+ width: 100%;
+ height: 444rpx;
+ position: absolute;
+ height: 100%;
+ z-index: -999;
+}
+.back {
+ width: 30rpx;
+ height: 30rpx;
+ margin-left: 20rpx;
+ position: absolute;
+ margin-top: 20rpx;
+ border-radius: 0rpx;
+ z-index: 101;
+}
+.header .navigation {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: #333333;
+ font-size: 32rpx;
+ position: relative;
+ z-index: 100;
+}
+.header .content{
+ margin: 160rpx 0 0 50rpx;
+}
+.header .content .h2{
+ font-size: 44rpx;
+ font-family: PingFang SC;
+ font-weight: 800;
+ color: #333333;
+ margin-bottom: 28rpx;
+}
+.header .content .tag{
+ width: 200rpx;
+ height: 50rpx;
+ position: relative;
+ line-height: 48rpx;
+ font-size: 28rpx;
+ font-family: PingFang SC;
+ font-weight: 500;
+ color: #94A6C2;
+ padding-left: 15rpx;
+}
+.header .content .tag b {
+ color: #FF2A00;
+}
+.header .content .tag image {
+ width: 170rpx;
+ height: 50rpx;
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: -888;
+}
+.content{
+ width: 100%;
+ height: auto;
+ padding: 0 20rpx;
+ box-sizing: border-box;
+ position: relative;
+ top: -30rpx;
+}
+.form_card {
+ background-color: #fff;
+ border-radius: 10rpx;
+ padding: 0 30rpx;
+ box-sizing: border-box;
+ height: auto;
+}
+.form_card > .title{
+ height: 90rpx;
+ line-height: 90rpx;
+ font-size: 34rpx;
+ font-family: PingFang SC;
+ font-weight: bold;
+ color: #333333;
+ position: relative;
+}
+.form_card .title .tag{
+ width: 10rpx;
+ height: 28rpx;
+ background: #3A80E7;
+ border-radius: 4rpx;
+ position: absolute;
+ left: -30rpx;
+ top: 50%;
+ transform: translateY(-14rpx);
+}
+.form_card .form_item{
+ display: flex;
+ align-items: center;
+ border-top: 1px solid #EAEAEA;
+ height: 100rpx;
+}
+.form_card .form_house{
+ height: 139rpx;
+ display: flex;
+ flex-direction: column;
+}
+.form_card .form_house .form_bottom{
+ font-size: 24rpx;
+ color:#C1C1C1;
+ position: relative;
+ top: -10rpx;
+}
+.form_card .form_house .form_bottom text{
+ color:#3A80E7 ;
+}
+.form_card .form_item .label{
+ min-width: 130rpx;
+ height: 100%;
+ line-height: 100rpx;
+ font-size: 32rpx;
+ font-family: PingFang SC;
+ font-weight: 500;
+ color: #666666;
+ position: relative;
+}
+.form_card .form_item .label .must{
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #FF2A00;
+ position: absolute;
+ left: -18rpx;
+ top: 50%;
+ transform: translateY(-50rpx);
+}
+.form_card .form_item .input{
+ flex: 1;
+ display: flex;
+ justify-content: space-around;
+ align-items: center;
+ margin-left: 51rpx;
+ overflow: hidden;
+
+}
+.form_card .form_item .input .residentCategorySty{
+ flex: 1;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+.form_card .form_item .input picker,
+.form_card .form_item .input input{
+ flex: 1;
+}
+.form_card .form_item .input image{
+ height: 22rpx;
+ width: 22rpx;
+}
+.bottom_btn{
+ width: 600rpx;
+ height: 86rpx;
+ background: linear-gradient(87deg, #81B5FB 0%, #3E92FF 100%);
+ border-radius: 43rpx;
+ text-align: center;
+ color: #fff;
+ margin: 30rpx auto 0;
+ line-height: 86rpx;
+}
+.text-right {
+ text-align: right!important;
+ justify-content: flex-end!important;
+}
\ No newline at end of file
diff --git a/subpages/searchResult/pages/punchCard/punchCard.js b/subpages/searchResult/pages/punchCard/punchCard.js
index 7abda50..e0da06d 100644
--- a/subpages/searchResult/pages/punchCard/punchCard.js
+++ b/subpages/searchResult/pages/punchCard/punchCard.js
@@ -65,12 +65,12 @@ Page({
let res = await api.getResiDetail(this.data.resiId);
const {birthday,mobile,name,houseInfo,genderName} = res.data;
this.setData({
- 'form.name':name,
- 'form.birthday':birthday,
- 'form.mobile':mobile,
- 'form.gridName' :houseInfo.gridName,
- 'form.homeName' :houseInfo.homeName,
- 'form.genderName' :genderName,
+ 'form.name':name|| '--',
+ 'form.birthday':birthday|| '--',
+ 'form.mobile':mobile|| '--',
+ 'form.gridName' :'--',
+ 'form.homeName' : '--',
+ 'form.genderName' :genderName|| '--',
});
console.log(this.data.form);
} catch(err) {
@@ -109,7 +109,7 @@ Page({
},
toAddResi(){
wx.navigateTo({
- url: `/subpages/addResi/pages/addResi/addResi?type=edit&resiId=${this.data.resiId}`,
+ url: `/subpages/addResi/pages/editResi/editResi?type=edit&resiId=${this.data.resiId}`,
})
},
toWebView(){
diff --git a/utils/request.js b/utils/request.js
index be53ada..026d5f5 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -14,7 +14,7 @@ const request = function (url, options) {
'Authorization': token
},
success (response) {
- console.log(response);
+ // console.log(response);
if (response.statusCode === 200) {
if(response.data.code===0){
resolve(response.data)