diff --git a/miniprogram/api/flowLabour.js b/miniprogram/api/flowLabour.js new file mode 100644 index 0000000..3296b54 --- /dev/null +++ b/miniprogram/api/flowLabour.js @@ -0,0 +1,44 @@ +import {request} from '../utils/request' + +// 查询劳资投诉列表 +export function list(data) { + return request({ + url: '/wechat/flow/flowLabour/list', + method: 'get', + data: data + }) +} + +// 统计劳资投诉信息 +export function findGroupCountByApprove(data) { + return request({ + url: '/wechat/flow/flowLabour/findGroupCountByApprove', + method: 'get', + data: data + }) +} + +// 查询劳资投诉进度 +export function findMyFlowLabourNodes(flowId) { + return request({ + url: '/wechat/flow/flowLabour/findMyFlowLabourNodes/'+flowId, + method: 'get' + }) +} + +//劳资投诉审批 +export function submitFlowLabour(data) { + return request({ + url: '/wechat/flow/flowLabour/submitFlowLabour', + method: 'post', + data: data + }) +} + +// 获取劳资投诉详细信息 +export function getInfo(flowId) { + return request({ + url: '/wechat/flow/flowLabour/info/'+flowId, + method: 'get' + }) +} \ No newline at end of file diff --git a/miniprogram/app.json b/miniprogram/app.json index 695fb65..a66a2d1 100644 --- a/miniprogram/app.json +++ b/miniprogram/app.json @@ -109,7 +109,10 @@ "project_standard/list/index", "project_standard/add/index", "project_standard/info/index", - "project_files/index" + "project_files/index", + "flow_labour/list/index", + "flow_labour/check/index", + "flow_labour/info/index" ], "independent": false } diff --git a/miniprogram/app.wxss b/miniprogram/app.wxss index d4804b2..01559e0 100644 --- a/miniprogram/app.wxss +++ b/miniprogram/app.wxss @@ -1220,7 +1220,7 @@ swiper-item video { } .inspect_for { - padding: 20rpx 0; + padding: 15rpx 0; font-size: 30rpx; } @@ -1231,7 +1231,7 @@ swiper-item video { .inspect_for_bgd { background: #1e2336; - padding: 0 30rpx; + padding: 0 15rpx; border-radius: 10rpx 10rpx 0 0; } @@ -1307,8 +1307,15 @@ swiper-item video { overflow: hidden; } +.inspect_list_title_text_3 { + width: calc(100% - 280rpx); + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} + .inspect_list_info { - padding: 30rpx 5rpx; + padding: 20rpx 5rpx; color: #d5dbeb; } @@ -1751,13 +1758,23 @@ swiper-item video { border-radius: 0.5rem 0 0.5rem 0; } +.code_label_4 { + font-size: 0.8rem; + width: 200rpx; + height: 50rpx; + line-height: 50rpx; + text-align: center; + padding: 0.1rem; + border-radius: 0.8rem 0 0.8rem 0; +} + .code_label_green { background: green; color: #FFFFFF; } .code_label_red { - background: red; + background: #fd6060; color: #FFFFFF; } diff --git a/miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.wxss b/miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.wxss index 6ca214e..9292dca 100644 --- a/miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.wxss +++ b/miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-collapse-item__title .van-cell__right-icon{-webkit-transform:rotate(90deg);transform:rotate(90deg);transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;transition:-webkit-transform var(--collapse-item-transition-duration,.3s);transition:transform var(--collapse-item-transition-duration,.3s);transition:transform var(--collapse-item-transition-duration,.3s),-webkit-transform var(--collapse-item-transition-duration,.3s)}.van-collapse-item__title--expanded .van-cell__right-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.van-collapse-item__title--disabled .van-cell,.van-collapse-item__title--disabled .van-cell__right-icon{color:#c8c9cc!important;color:var(--collapse-item-title-disabled-color,#c8c9cc)!important}.van-collapse-item__title--disabled .van-cell--hover{background-color:#fff!important;background-color:var(--white,#fff)!important}.van-collapse-item__wrapper{overflow:hidden}.van-collapse-item__wrapper--transition{transition:height .3s ease-in-out}.van-collapse-item__content{padding:15px;padding:var(--collapse-item-content-padding,15px);color:#969799;color:var(--collapse-item-content-text-color,#969799);font-size:13px;font-size:var(--collapse-item-content-font-size,13px);line-height:1.5;line-height:var(--collapse-item-content-line-height,1.5);background-color:#fff;background-color:var(--collapse-item-content-background-color,#fff)} \ No newline at end of file +@import '../common/index.wxss';.van-collapse-item__title .van-cell__right-icon{-webkit-transform:rotate(90deg);transform:rotate(90deg);transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;transition:-webkit-transform var(--collapse-item-transition-duration,.3s);transition:transform var(--collapse-item-transition-duration,.3s);transition:transform var(--collapse-item-transition-duration,.3s),-webkit-transform var(--collapse-item-transition-duration,.3s)}.van-collapse-item__title--expanded .van-cell__right-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.van-collapse-item__title--disabled .van-cell,.van-collapse-item__title--disabled .van-cell__right-icon{color:#c8c9cc!important;color:var(--collapse-item-title-disabled-color,#c8c9cc)!important}.van-collapse-item__title--disabled .van-cell--hover{background-color:#fff!important;background-color:var(--white,#fff)!important}.van-collapse-item__wrapper{overflow:hidden}.van-collapse-item__wrapper--transition{transition:height .3s ease-in-out}.van-collapse-item__content{padding:15px;padding:var(--collapse-item-content-padding,10px);color:#969799;color:var(--collapse-item-content-text-color,#969799);font-size:13px;font-size:var(--collapse-item-content-font-size,13px);line-height:1.5;line-height:var(--collapse-item-content-line-height,1.5);background-color:#fff;background-color:var(--collapse-item-content-background-color,#fff)} \ No newline at end of file diff --git a/miniprogram/pageage/flow_labour/check/index.js b/miniprogram/pageage/flow_labour/check/index.js new file mode 100644 index 0000000..e50f1ac --- /dev/null +++ b/miniprogram/pageage/flow_labour/check/index.js @@ -0,0 +1,336 @@ +import config from '../../../config' +import { + syncFileUpload +} from '../../../utils/request' + +import { + getInfo, + submitFlowLabour, + findMyFlowLabourNodes +} from "../../../api/flowLabour" +const app = getApp() +Page({ + /** + * 页面的初始数据 + */ + data: { + id: "", + infoData: { + files: "" + }, + activeName: "", + flowRecordList: [], + request: app.globalData.reqUrl, + flowNodes: [{ + text: '提交投诉' + }, { + text: '项目经理' + }, { + text: '甲方代表' + }, { + text: '集团公司' + }], + active: 100, + rejectNode: 0, + flowComment: "", + imageInfoData: [], + minRole: 99, + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + let { + id + } = options + this.setData({ + id + }) + //获取缓存数据 + wx.getStorage({ + key: 'userinfo', + success: res => { + this.setData({ + minRoleId: res.data.minRoleId + }) + } + }) + this.getInfo(); + this.getAuditinfo(); + }, + + /** + * 获取劳资投诉详情信息 + * + */ + getInfo() { + getInfo(this.data.id).then(res => { + if (res.code == 200) { + let active = this.data.active; + let rejectNode = this.data.rejectNode; + if (res.data.approveStatus == "10" || res.data.approveStatus == "21") { + active = 1; + if (res.data.approveStatus == "21") { + rejectNode = active + 1; + } + } else if (res.data.approveStatus == "20" || res.data.approveStatus == "31") { + active = 2; + if (res.data.approveStatus == "31") { + rejectNode = active + 1; + } + } else if (res.data.approveStatus == "30") { + active = 3; + } + this.setData({ + active, + rejectNode, + infoData: res.data + }) + } + }); + }, + + /** + * 查询流程日志 + */ + getAuditinfo() { + findMyFlowLabourNodes(this.data.id).then(res => { + if (res.code == 200) { + this.setData({ + flowRecordList: res.data + }) + } + }); + }, + + // 手风琴 + onChange(event) { + this.setData({ + activeName: event.detail, + }); + }, + + //展示图片 + showImg: function (e) { + let paths = e.target.dataset.set; + let path = []; + paths.split(',').forEach(url => { + path.push(config.baseUrl + url); + }); + wx.previewImage({ + urls: path, + current: path[e.currentTarget.dataset.index] + }) + }, + + //整改要求 + onInputFlowComment(e) { + let flowComment = e.detail.value + this.setData({ + flowComment + }) + }, + + // list 上传图片 + onImagesArr(e) { + var data = this.data.imageInfoData + data = e.detail + this.setData({ + imageInfoData: data + }) + }, + + //审批劳资投诉 + onSubmitPass() { + let { + flowComment + } = this.data; + //数据效验 + if (flowComment == "") { + app.toast("请填写处理意见!") + return; + } + let that = this; + let msg = ""; + if ((this.data.infoData.approveStatus == '20' || this.data.infoData.approveStatus == '31') && (this.data.minRoleId == '2' || this.data.minRoleId == '3')) { + msg = "当前数据甲方代表正在审批,您"; + } + //弹出确认 + wx.showModal({ + title: '提示', + content: msg + '是否确认审批通过当前劳资投诉?', + success: function (sm) { + if (sm.confirm) { + that.submitForm(100); + } + } + }) + }, + + /** + * 驳回劳资投诉 + */ + onSubmitReject() { + let { + flowComment + } = this.data; + //数据效验 + if (flowComment == "") { + app.toast("请填写处理意见!") + return; + } + let that = this; + let msg = ""; + if ((this.data.infoData.approveStatus == '20' || this.data.infoData.approveStatus == '31') && (this.data.minRoleId == '2' || this.data.minRoleId == '3')) { + msg = "当前数据甲方代表正在审批,您"; + } + //弹出确认 + wx.showModal({ + title: '提示', + content: msg + '是否确认审批驳回当前劳资投诉?', + success: function (sm) { + if (sm.confirm) { + that.submitForm(1); + } + } + }) + }, + + //提交处理结果 + onSubmitSave() { + let { + flowComment + } = this.data; + //数据效验 + if (flowComment == "") { + app.toast("请填写处理意见!") + return; + } + let that = this; + let msg = ""; + if (this.data.minRoleId == '2' || this.data.minRoleId == '3' || this.data.minRoleId == '4') { + msg = "当前数据总包单位正在处理,您"; + } + //弹出确认 + wx.showModal({ + title: '提示', + content: msg + '是否确提交劳资投诉处理结果?', + success: function (sm) { + if (sm.confirm) { + that.submitForm(100); + } + } + }) + }, + + /** + * 提交审核结果 + */ + submitForm(result) { + let { + id, + flowComment, + imageInfoData + } = this.data; + if (imageInfoData.length > 0) { + let images = []; + imageInfoData.forEach(item => { + syncFileUpload(item).then(res => { + images.push(res.fileName); + //验证图片上传完毕 + if (images.length == imageInfoData.length) { + let params = { + flowId: id, + flowResult: result, + flowComment: flowComment, + files: images.toString() + } + submitFlowLabour(params).then(res => { + if (res.code == 200) { + app.toast("处理劳资投诉成功!") + setTimeout(() => { + wx.redirectTo({ + url: '../list/index', + }) + }, 300) + } + }); + } + }); + }) + } else { + let params = { + flowId: id, + flowResult: result, + flowComment: flowComment + } + submitFlowLabour(params).then(res => { + if (res.code == 200) { + app.toast("处理劳资投诉成功!") + setTimeout(() => { + wx.redirectTo({ + url: '../list/index', + }) + }, 300) + } + }); + } + }, + + returnToPage: function () { + /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/ + wx.redirectTo({ + url: '../list/index', + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/miniprogram/pageage/flow_labour/check/index.json b/miniprogram/pageage/flow_labour/check/index.json new file mode 100644 index 0000000..101553f --- /dev/null +++ b/miniprogram/pageage/flow_labour/check/index.json @@ -0,0 +1,8 @@ +{ + "usingComponents": { + "van-steps": "@vant/weapp/steps/index", + "van-collapse": "@vant/weapp/collapse", + "van-collapse-item": "@vant/weapp/collapse-item" + }, + "navigationStyle":"custom" +} \ No newline at end of file diff --git a/miniprogram/pageage/flow_labour/check/index.wxml b/miniprogram/pageage/flow_labour/check/index.wxml new file mode 100644 index 0000000..eab6e8a --- /dev/null +++ b/miniprogram/pageage/flow_labour/check/index.wxml @@ -0,0 +1,174 @@ + + + + + + + + + + + 劳资投诉审批 + + + + + + + + + + + + + + + + + {{(flowRecordList.length-index) < 10 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}} + + {{item.createBy+'提交投诉'}} + {{item.flowNodeName}} + 通过 + 驳回 + + + + + + 办理用户:{{item.createBy}} + + + 办理时间:{{item.createTime}} + + + 处理意见:{{item.flowComment}} + + + 凭证附件: + + + + + + + + + + + + + + + {{infoData.projectName}} + + + + + 总包单位 + {{infoData.deptName}} + + + + + 分包单位 + {{infoData.subDeptName}} + + + + + 投诉劳工 + {{infoData.laborName}} + + + + + 联系电话 + {{infoData.laborPhone}} + + + + + 身份证号 + {{infoData.laborCardId}} + + + + + + 欠薪人数 + {{infoData.laborNumber}} + + + + + 欠薪金额 + {{infoData.laborAmount}} + + + + + 原因说明 + {{infoData.laborReason}} + + + + + 凭证附件 + + + + + + + + + + 投诉时间 + {{infoData.createTime}} + + + + + 投诉进度 + + 审批完成 + 待项目经理审批 + 待甲方代表审批 + 待集团公司审批 + 项目经理审批驳回 + 甲方代表审批驳回 + 集团公司审批驳回 + + + + + + + + + 劳资投诉处理结果 + + + + 处理意见 [必填项] + +