diff --git a/pages/issueDetail/issueDetail.js b/pages/issueDetail/issueDetail.js index eb1de9a..154ae7f 100644 --- a/pages/issueDetail/issueDetail.js +++ b/pages/issueDetail/issueDetail.js @@ -43,7 +43,7 @@ Page({ // 获取事件详情 getEventDetail() { api.getEventDetail(this.data.issueId).then((res) => { - console.log(res.data) + console.log(res.data.userId) this.setData({ detailData: { id: res.data.id, @@ -56,7 +56,8 @@ Page({ mobile: res.data.mobile, address: res.data.address, advice: res.data.advice, - handleResidentImages: res.data.handleResidentImages + handleResidentImages: res.data.handleResidentImages, + userId: res.data.userId, } }) }) @@ -64,7 +65,7 @@ Page({ // 获取议题详情 getIssueDetail() { api.getIssueDetail(this.data.issueId).then((res) => { - console.log(res.data) + console.log(res.data.userId) this.setData({ detailData: { id: res.data.id, @@ -81,7 +82,8 @@ Page({ approveNum: res.data.approveNum, opposeNum: res.data.opposeNum, commentNum: res.data.commentNum, - browseNum: res.data.browseNum + browseNum: res.data.browseNum, + userId: res.data.userId, } }) }) @@ -167,17 +169,44 @@ Page({ categoryId: this.data.handleSubmitData.categoryId, eventState: this.data.handleSubmitData.eventState, advice: this.data.handleSubmitData.advice, - images: this.data.handleSubmitData.images + images: this.data.handleSubmitData.images, + userId: this.data.detailData.userId, } - api.postEventHandleSubmit(params).then((res) => { - console.log(res) - if (res.code === 0) { - // 显示提醒 - this.setData({ - visible: true - }) - } + wx.showLoading({ + title: '正在提交,请稍后', }) + if (this.data.handleSubmitData.eventState == 2) { //事件状态(2-驳回,4-审核通过) + api.reviewNopass(params).then((res) => { + console.log(res) + wx.hideLoading() + if (res.code === 0) { + // 显示提醒 + this.setData({ + visible: true + }) + } + }) + } else if (this.data.handleSubmitData.eventState == 4) { + api.reviewPass(params).then((res) => { + console.log(res) + wx.hideLoading() + if (res.code === 0) { + // 显示提醒 + this.setData({ + visible: true + }) + } + }) + } + // api.postEventHandleSubmit(params).then((res) => { + // console.log(res) + // if (res.code === 0) { + // // 显示提醒 + // this.setData({ + // visible: true + // }) + // } + // }) } else if (this.data.issueState == "1") { // 待处理 @@ -206,17 +235,55 @@ Page({ id: this.data.detailData.id, advice: this.data.handleSubmitData.advice, state: this.data.handleSubmitData.state, - images: this.data.handleSubmitData.images + images: this.data.handleSubmitData.images, + userId: this.data.detailData.userId, } - api.postIssueHandleSubmit(params).then((res) => { - console.log(res) - if (res.code === 0) { - // 显示提醒 - this.setData({ - visible: true - }) - } + wx.showLoading({ + title: '正在提交,请稍后', }) + if (this.data.handleSubmitData.state == 1) { //状态 1 回应,2 关闭,4 转项目 + api.response(params).then((res) => { + console.log(res) + wx.hideLoading() + if (res.code === 0) { + // 显示提醒 + this.setData({ + visible: true + }) + } + }) + } else if (this.data.handleSubmitData.state == 2) { + api.close(params).then((res) => { + console.log(res) + wx.hideLoading() + if (res.code === 0) { + // 显示提醒 + this.setData({ + visible: true + }) + } + }) + } else if (this.data.handleSubmitData.state == 4) { + api.toItem(params).then((res) => { + console.log(res) + wx.hideLoading() + if (res.code === 0) { + // 显示提醒 + this.setData({ + visible: true + }) + } + }) + } + // api.postIssueHandleSubmit(params).then((res) => { + // console.log(res) + // if (res.code === 0) { + // // 显示提醒 + // this.setData({ + // visible: true + // }) + // } + // }) } }, diff --git a/pages/itemDetail/itemDetail.js b/pages/itemDetail/itemDetail.js index a1df297..2d4ed49 100644 --- a/pages/itemDetail/itemDetail.js +++ b/pages/itemDetail/itemDetail.js @@ -46,7 +46,8 @@ Page({ approveNum: res.data.approveNum, opposeNum: res.data.opposeNum, commentNum: res.data.commentNum, - browseNum: res.data.browseNum + browseNum: res.data.browseNum, + userId: res.data.userId } }); // 获取项目处理进度 @@ -152,22 +153,71 @@ Page({ outHandleImages: this.data.handleSubmitData.outHandleImages !== undefined ? this.data.handleSubmitData.outHandleImages : [], handleImages: this.data.handleSubmitData.handleImages !== undefined ? this.data.handleSubmitData.handleImages : [], handleCategory: this.data.handleSubmitData.state !== undefined ? this.data.handleSubmitData.state : 0, + userId: this.data.detailData.userId !== undefined ? this.data.detailData.userId : 0, }; if (params.handleCategory === 1) { // 吹哨 params.deptResultDTOS = this.data.handleSubmitData.deptResultDTOS } else if (params.handleCategory === 10) { // 结案 params.evaluateDeptDTOS = this.data.handleSubmitData.evaluateDeptDTOS } + wx.showLoading({ + title: '正在提交,请稍后', + }) + if (params.handleCategory === 0) { //处理结果:0 回应,1 吹哨,5 关闭,10 结案 + api.response(params).then(res => { + console.log(res); + wx.hideLoading() + if (res.code === 0) { + // 显示提醒 + this.setData({ + visible: true + }); + } + }); + } else if (params.handleCategory === 1) { + api.whistle(params).then(res => { + console.log(res); + wx.hideLoading() + if (res.code === 0) { + // 显示提醒 + this.setData({ + visible: true + }); + } + }); + } else if (params.handleCategory === 5) { + api.close(params).then(res => { + console.log(res); + wx.hideLoading() + if (res.code === 0) { + // 显示提醒 + this.setData({ + visible: true + }); + } + }); + } else if (params.handleCategory === 10) { + api.closeCase(params).then(res => { + console.log(res); + wx.hideLoading() + if (res.code === 0) { + // 显示提醒 + this.setData({ + visible: true + }); + } + }); + } - api.postItemHandleSubmit(params).then(res => { - console.log(res); - if (res.code === 0) { - // 显示提醒 - this.setData({ - visible: true - }); - } - }); + // api.postItemHandleSubmit(params).then(res => { + // console.log(res); + // if (res.code === 0) { + // // 显示提醒 + // this.setData({ + // visible: true + // }); + // } + // }); }, // 关闭提醒 diff --git a/pages/user_moudle/checkpending/checkpending.js b/pages/user_moudle/checkpending/checkpending.js index 0f8587a..b41a04f 100644 --- a/pages/user_moudle/checkpending/checkpending.js +++ b/pages/user_moudle/checkpending/checkpending.js @@ -99,11 +99,21 @@ Page({ "userId": this.data.userId, "remark": this.data.remark } - - api.authenticateResident(params).then(function (res) { - that.togUserList() - console.log(res) - }) + if (this.data.authenticatedFlag == '0') { //未通过 + api.authenticateResidentNoPass(params).then(function(res) { + that.togUserList() + console.log(res) + }) + } else { + api.authenticateResidentPass(params).then(function(res) { + that.togUserList() + console.log(res) + }) + } + // api.authenticateResident(params).then(function (res) { + // that.togUserList() + // console.log(res) + // }) }, // 用户详情 handleResidentDetail: function () {