Browse Source

调查记录联调

jw-featrue-zhanlibiao
mk 2 years ago
parent
commit
51b98525a4
  1. 1
      pages/mine/mine.js
  2. 3
      subpages/communitySelfInsp/pages/dissatisfactionDetails/dissatisfactionDetails.js
  3. 4
      subpages/communitySelfInsp/pages/dissatisfactionDetails/dissatisfactionDetails.wxss
  4. 91
      subpages/communitySelfInsp/pages/followUpDetail/followUpDetail.js
  5. 21
      subpages/communitySelfInsp/pages/followUpDetail/followUpDetail.wxml
  6. 44
      subpages/communitySelfInsp/pages/followUpDetail/followUpDetail.wxss
  7. 25
      subpages/communitySelfInsp/pages/followUpList/followUpList.js
  8. 2
      subpages/communitySelfInsp/pages/followUpList/followUpList.wxml
  9. 4
      subpages/communitySelfInsp/pages/followUpList/followUpList.wxss
  10. 1
      subpages/communitySelfInsp/pages/historyQuery/historyQuery.js
  11. 1
      subpages/communitySelfInsp/pages/synthesis/synthesis.js
  12. 12
      utils/api.js

1
pages/mine/mine.js

@ -83,7 +83,6 @@ Page({
}) })
}, },
toFollowUpList(){ toFollowUpList(){
console.log(1);
wx.navigateTo({ wx.navigateTo({
url: '/subpages/communitySelfInsp/pages/followUpList/followUpList', url: '/subpages/communitySelfInsp/pages/followUpList/followUpList',
}) })

3
subpages/communitySelfInsp/pages/dissatisfactionDetails/dissatisfactionDetails.js

@ -116,9 +116,8 @@ Page({
}) })
}, },
toFollowUpDetails(e){ toFollowUpDetails(e){
console.log(JSON.stringify(e.currentTarget.dataset.item));
wx.navigateTo({ wx.navigateTo({
url: `/subpages/communitySelfInsp/pages/followUpDetail/followUpDetail?resiInfo=${JSON.stringify(e.currentTarget.dataset.item)}`, url: `/subpages/communitySelfInsp/pages/followUpDetail/followUpDetail?resiInfo=${JSON.stringify(e.currentTarget.dataset.item)}&type=add`,
}) })
}, },
/** /**

4
subpages/communitySelfInsp/pages/dissatisfactionDetails/dissatisfactionDetails.wxss

@ -44,9 +44,10 @@ page {
width: 100%; width: 100%;
padding:0 20rpx ; padding:0 20rpx ;
box-sizing: border-box; box-sizing: border-box;
margin-top: 20rpx;
} }
.content .scroll { .content .scroll {
height: calc(100vh - 100rpx); height: calc(100vh - 50rpx);
overflow-y: scroll; overflow-y: scroll;
} }
.content .card{ .content .card{
@ -58,7 +59,6 @@ page {
border-radius: 20rpx; border-radius: 20rpx;
padding: 30rpx 30rpx; padding: 30rpx 30rpx;
box-sizing: border-box; box-sizing: border-box;
margin-top: 20rpx;
overflow: hidden; overflow: hidden;
color: #333; color: #333;

91
subpages/communitySelfInsp/pages/followUpDetail/followUpDetail.js

@ -1,4 +1,5 @@
const app = getApp() const app = getApp()
import api from "../../../../utils/api";
Page({ Page({
/** /**
@ -6,6 +7,7 @@ Page({
*/ */
data: { data: {
resiInfo:{}, resiInfo:{},
followUpWayName:"",
title:'回访记录', title:'回访记录',
formType:'add', formType:'add',
followUpWayList:[ followUpWayList:[
@ -18,16 +20,21 @@ Page({
value:'2' value:'2'
} }
], ],
inspResultId:'',
form:{ form:{
riskFlag:null,//风险标识 0无风险 1有风险
} description:'',//回访记录详情
followUpWay:'',//1电话回访 2上门回访
},
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
console.log(JSON.parse(options.resiInfo)); console.log(options);
let temp = JSON.parse(options.resiInfo);
console.log(temp);
this.setData({ this.setData({
statusHeight: app.globalData.deviceInfo.statusHeight, statusHeight: app.globalData.deviceInfo.statusHeight,
navigationHeight: app.globalData.deviceInfo.navigationHeight, navigationHeight: app.globalData.deviceInfo.navigationHeight,
@ -35,8 +42,20 @@ Page({
}) })
if(options.type == 'add'){ if(options.type == 'add'){
this.setData({ this.setData({
resiInfo:JSON.parse(options.resiInfo), resiInfo:temp,
inspResultId:temp.id,
}) })
}else{
this.setData({
resiInfo:temp,
'resiInfo.reason':temp.reason,
inspResultId:temp.inspResultId,
"form.followUpWay":temp.followUpWay,
"form.description":temp.description,
"form.riskFlag":temp.riskFlag,
followUpWayName:temp.followUpWayName
})
} }
}, },
@ -92,11 +111,71 @@ Page({
const selectedIndex = e.detail.value; const selectedIndex = e.detail.value;
const selectedVillage = this.data.followUpWayList[selectedIndex]; const selectedVillage = this.data.followUpWayList[selectedIndex];
this.setData({ this.setData({
'form.followUpWay': selectedVillage.label, 'form.followUpWay': selectedVillage.value,
followUpWayName:selectedVillage.label
}); });
}, },
handleChangeRadio(e){ handleBlurDescription(e){
this.setData({
'form.description': e.detail.value
})
},
handleChangeRisk(e){
console.log(e); console.log(e);
this.setData({
'form.riskFlag': Number(e.detail.value)
})
},
submit(){
let parm ={
...this.data.form,
inspResultId:this.data.inspResultId,
id:this.data.formType == 'add'?'':this.data.resiInfo.id
}
console.log(parm);
wx.showLoading({
title: '加载中',
})
api.followUpSave(parm).then(res=>{
console.log(res);
if(res.code == 0){
wx.hideLoading()
wx.showToast({
title: this.data.formType == 'add'?'新增成功':'修改成功',
duration:3000,
success:function(){
setTimeout(()=>{
wx.navigateBack({
delta: 1
})
},3000)
}
})
}
}).catch(err=>{
console.log(err);
})
},
del(){
api.followUpDelete(this.data.resiInfo.id).then(res=>{
if(res.code == 0){
wx.hideLoading()
wx.showToast({
title: '删除成功',
duration:3000,
success:function(){
setTimeout(()=>{
wx.navigateBack({
delta: 1
})
},3000)
}
})
}
}).catch(err=>{
console.log(err);
})
}, },
back(){ back(){
wx.navigateBack({ wx.navigateBack({

21
subpages/communitySelfInsp/pages/followUpDetail/followUpDetail.wxml

@ -6,12 +6,12 @@
</view> </view>
<view class="content"> <view class="content">
<view class="content_header"> <view class="content_header">
<view class="bto_bor"> <view class="{{formType == 'add'?'bto_bor':''}}">
<view> 马魁 177777777777</view> <view> {{resiInfo.reporterName}} {{resiInfo.reporterMobile}}</view>
<view class="gray font28" style="margin: 20rpx 0;">河南省鹤壁市</view> <view class="gray font28" style="margin: 20rpx 0;">{{resiInfo.addressDetail?resiInfo.addressDetail:'--'}}</view>
</view> </view>
<view style="margin-top: 20rpx;"> <view style="margin-top: 20rpx;" wx:if="{{formType == 'add'}}">
不满意原因:aacece 不满意原因:{{resiInfo.reason}}
</view> </view>
</view> </view>
<view class="content_form"> <view class="content_form">
@ -32,19 +32,20 @@
<view > <view >
<view style="margin-top: 20rpx; color: #333333">回访情况记录</view> <view style="margin-top: 20rpx; color: #333333">回访情况记录</view>
<view> <view>
<textarea style="background-color: #f7f7f7; border-radius: 10rpx; padding: 30rpx;margin-top: 20rpx;" value="{{form.description}}" placeholder="请详细填写回访情况(不超过500字)"/> <textarea style="background-color: #f7f7f7; border-radius: 10rpx; padding: 30rpx;margin-top: 20rpx;" value="{{form.description}}" bindinput="handleBlurDescription" bindblur="handleBlurDescription" placeholder="请详细填写回访情况(不超过500字)"/>
</view> </view>
</view> </view>
<view style="margin-bottom: 80rpx;"> <view style="margin-bottom: 80rpx;">
<view style="margin-top: 20rpx; color: #333333">是否还为不满意风险人员</view> <view style="margin-top: 20rpx; color: #333333">是否还为不满意风险人员</view>
<view> <view>
<radio-group bindchange="handleChangeRadio" style="margin-top: 20rpx;"> <radio-group bindchange="handleChangeRisk" value="{{form.riskFlag}}" style="margin-top: 20rpx;">
<radio color="#70acfc" value="{{0}}"/>否 <radio color="#70acfc" checked="{{form.riskFlag === 0}}" value="0"/>否
<radio color="#70acfc" style="margin-left: 20rpx;" value="{{1}}"/>是 <radio color="#70acfc" checked="{{form.riskFlag === 1}}" style="margin-left: 20rpx;" value="1"/>是
</radio-group> </radio-group>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<button class="fixed_btn" bind:tap="jumpAdd">提交</button> <view class="fixed_btn" wx:if="{{formType == 'add'}}"><button bind:tap="submit" >提交</button></view>
<view class="flex" wx:else> <button class="edit_button" bind:tap="submit" >修改</button> <button class="del_button" bind:tap="del">删除</button> </view>

44
subpages/communitySelfInsp/pages/followUpDetail/followUpDetail.wxss

@ -127,7 +127,16 @@ page {
height: 22rpx; height: 22rpx;
width: 22rpx; width: 22rpx;
} }
button{
.fixed_btn{
display: flex;
justify-content: center;
position: fixed;
bottom: 30rpx;
left: 50%;
transform: translateX(-184rpx);
}
.fixed_btn button{
width: 360rpx; width: 360rpx;
height: 76rpx; height: 76rpx;
background: linear-gradient(87deg, #81B5FB 0%, #3E92FF 100%); background: linear-gradient(87deg, #81B5FB 0%, #3E92FF 100%);
@ -136,14 +145,35 @@ button{
font-weight: 400 !important; font-weight: 400 !important;
font-family: PingFang SC; font-family: PingFang SC;
color: #FFFFFF; color: #FFFFFF;
position: fixed;
bottom: 63rpx;
left: 50%;
transform: translateX(-180rpx);
} }
.fixed_btn{ .flex{
display: flex;
justify-content: space-between;
width: 100%;
position: fixed; position: fixed;
bottom: 30rpx; bottom: 30rpx;
left: 50%; left: 50%;
transform: translateX(-184rpx); transform: translateX(-360rpx);
} }
.flex .edit_button{
width: 280rpx;
height: 76rpx;
background: linear-gradient(87deg, #81B5FB 0%, #3E92FF 100%);
border-radius: 76rpx !important;
font-size: 32rpx;
font-weight: 400 !important;
font-family: PingFang SC;
color: #FFFFFF;
}
.flex .del_button{
width: 280rpx;
height: 76rpx;
background: linear-gradient(87deg, #fb9c5a 0%, #ff7a3d 100%);
border-radius: 76rpx !important;
font-size: 32rpx;
font-weight: 400 !important;
font-family: PingFang SC;
color: #FFFFFF;
}

25
subpages/communitySelfInsp/pages/followUpList/followUpList.js

@ -1,4 +1,5 @@
import {getFollowUpList} from "../../../../utils/api" import {getFollowUpList} from "../../../../utils/api"
const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
@ -6,7 +7,7 @@ Page({
data: { data: {
tableData:[], tableData:[],
pageNo:1, pageNo:1,
pageSize:20, pageSize:7,
lowerThreshold:'10', lowerThreshold:'10',
loadMoreVisible:false, loadMoreVisible:false,
loadMoreType: "none", loadMoreType: "none",
@ -17,12 +18,11 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
console.log(options);
this.setData({ this.setData({
satisfactionCategory:options.category, satisfactionCategory:options.category,
inspRecordId:options.inspRecordId inspRecordId:options.inspRecordId,
createdBy:app.globalData.user.id
}) })
this.getFollowUpList()
}, },
/** /**
@ -36,7 +36,11 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
this.setData({
pageNo:1,
tableData:[]
})
this.getFollowUpList()
}, },
/** /**
@ -83,6 +87,7 @@ Page({
}) })
let parm = { let parm = {
inspRecordId:'', inspRecordId:'',
createdBy:this.data.createdBy,
pageNo:this.data.pageNo, pageNo:this.data.pageNo,
pageSize:this.data.pageSize pageSize:this.data.pageSize
} }
@ -106,11 +111,17 @@ Page({
}) })
}) })
}, },
handleClickPhone(e){ handleClickPhone(e){
wx.makePhoneCall({ wx.makePhoneCall({
phoneNumber: e.currentTarget.dataset.mobile, phoneNumber: e.currentTarget.dataset.mobile,
}) })
}, },
toFollowUpDetail(e){
wx.navigateTo({
url: `/subpages/communitySelfInsp/pages/followUpDetail/followUpDetail?resiInfo=${JSON.stringify(e.currentTarget.dataset.item)}&type=edit`,
})
},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */

2
subpages/communitySelfInsp/pages/followUpList/followUpList.wxml

@ -1,7 +1,7 @@
<!--subpages/communitySelfInsp/pages/dissatisfactionDetails/dissatisfactionDetails.wxml--> <!--subpages/communitySelfInsp/pages/dissatisfactionDetails/dissatisfactionDetails.wxml-->
<view class="content"> <view class="content">
<scroll-view class="scroll" scroll-y="{{true}}" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollToLower"> <scroll-view class="scroll" scroll-y="{{true}}" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollToLower">
<view class="card" wx:for="{{tableData}}" wx:key="index" > <view class="card" wx:for="{{tableData}}" wx:key="index" data-item="{{item}}" bind:tap="toFollowUpDetail">
<view class="title" > <view class="title" >
<view> <view>
<text class="{{item.followUpWay == '1'?'blue_small':'red_small'}}">{{item.followUpWayName}}</text> <text class="{{item.followUpWay == '1'?'blue_small':'red_small'}}">{{item.followUpWayName}}</text>

4
subpages/communitySelfInsp/pages/followUpList/followUpList.wxss

@ -42,10 +42,11 @@ page {
.content{ .content{
width: 100%; width: 100%;
padding:0 20rpx ; padding:0 20rpx ;
margin-top: 20rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.content .scroll { .content .scroll {
height: calc(100vh - 100rpx); height: calc(100vh - 50rpx);
overflow-y: scroll; overflow-y: scroll;
} }
.content .card{ .content .card{
@ -57,7 +58,6 @@ page {
border-radius: 20rpx; border-radius: 20rpx;
padding: 30rpx 30rpx; padding: 30rpx 30rpx;
box-sizing: border-box; box-sizing: border-box;
margin-top: 20rpx;
overflow: hidden; overflow: hidden;
color: #333; color: #333;
} }

1
subpages/communitySelfInsp/pages/historyQuery/historyQuery.js

@ -102,7 +102,6 @@ Page({
nodata: true nodata: true
}) })
} }
console.log(this.data.tableData);
}).catch(err=>{ }).catch(err=>{
console.log(err); console.log(err);
}) })

1
subpages/communitySelfInsp/pages/synthesis/synthesis.js

@ -32,7 +32,6 @@ Page({
inspRecordId:'' inspRecordId:''
} }
getSynthesis(parm).then(res=>{ getSynthesis(parm).then(res=>{
console.log(res);
this.setData({ this.setData({
tableData:res.data.categoryDatas, tableData:res.data.categoryDatas,
monthName:res.data.monthName, monthName:res.data.monthName,

12
utils/api.js

@ -31,7 +31,9 @@ module.exports = {
getInspRecord, getInspRecord,
getSynthesis, getSynthesis,
getInspResult, getInspResult,
getFollowUpList getFollowUpList,
followUpSave,
followUpDelete
} }
// 消息列表 // 消息列表
function getIntelligentMessage(param){ function getIntelligentMessage(param){
@ -161,3 +163,11 @@ function getInspResult(parm){
function getFollowUpList(parm){ function getFollowUpList(parm){
return fly.get(`governance/satisfaction/communitySelfInsp/followUp/list`,parm) return fly.get(`governance/satisfaction/communitySelfInsp/followUp/list`,parm)
} }
// 回访记录新增/修改
function followUpSave (parm) {
return fly.post(`governance/satisfaction/communitySelfInsp/followUp/save`,parm)
}
// 回访记录删除
function followUpDelete (parm) {
return fly.post(`governance/satisfaction/communitySelfInsp/followUp/delete/${parm}`,)
}

Loading…
Cancel
Save