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}}
+
+
+
+
+ 投诉进度
+
+ 审批完成
+ 待项目经理审批
+ 待甲方代表审批
+ 待集团公司审批
+ 项目经理审批驳回
+ 甲方代表审批驳回
+ 集团公司审批驳回
+
+
+
+
+
+
+
+
+ 劳资投诉处理结果
+
+
+
+ 处理意见 [必填项]
+
+
+
+
+
+ 凭证附件 [非必填]
+
+
+
+
+
+
+ 取消
+ 审批驳回
+ 审批通过
+ 提交处理结果
+
+
+
\ No newline at end of file
diff --git a/miniprogram/pageage/flow_labour/check/index.wxss b/miniprogram/pageage/flow_labour/check/index.wxss
new file mode 100644
index 0000000..f7d4af0
--- /dev/null
+++ b/miniprogram/pageage/flow_labour/check/index.wxss
@@ -0,0 +1,81 @@
+/* pageage/project_checking/info/index.wxss */
+.in-img-max:after{
+ display:block;
+ clear:both;
+ content:"";
+ visibility:hidden;
+ height:0
+ }
+ .in-img-max{
+ width: auto;
+ zoom:1
+ }
+ .in-img-div{
+ position: relative;
+ margin: 0 8px 0 0;
+ float: left;
+ }
+ .in-img-div image{
+ width: 180rpx;
+ height: 180rpx;
+ border-radius: 15rpx;
+ position: relative;
+ }
+ .van-collapse.van-hairline--top-bottom:after{
+ border-width: 0px 0;
+ }
+ .van-cell.van-cell--borderless{
+ background-color: #2b345b;
+ color: #fff;
+ margin-top: 30rpx;
+ border-radius: 5rpx;
+ }
+ .van-cell.van-cell--borderless:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__title.van-collapse-item__title--expanded:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item .van-cell:after{
+ border-bottom: 0;
+ }
+ .van-collapse-item.van-hairline--top:after{
+ border-top-width:0
+ }
+ .van-cell.van-cell--clickable{
+ background-color: #2b345b;
+ margin-top: 5rpx;
+ margin-bottom: 5rpx;
+ color: #fff;
+ border-radius: 15rpx;
+
+ }
+ .van-cell.van-cell--clickable:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__wrapper .van-collapse-item__content{
+ background-color: #1e2336;
+ color:#8ca4ec ;
+ border-width: 0px 0;
+ }
+ .gk_open_con view{
+ padding: 10rpx 0;
+ width: 100%;
+ }
+ .gk_open_con image{
+ width: 30rpx;
+ height: 30rpx;
+ margin-right: 5rpx;
+ position: relative;
+ top: 5rpx;
+ }
+ .gk_open_con .in-img-div image{
+ width: 120rpx !important;
+ height: 120rpx !important;
+ margin-right: 15rpx;
+ position: relative;
+ top: 5rpx;
+ }
+ .problem_submit_to view {
+ margin-right: 20rpx;
+}
\ No newline at end of file
diff --git a/miniprogram/pageage/flow_labour/info/index.js b/miniprogram/pageage/flow_labour/info/index.js
new file mode 100644
index 0000000..1d4393e
--- /dev/null
+++ b/miniprogram/pageage/flow_labour/info/index.js
@@ -0,0 +1,168 @@
+import config from '../../../config'
+
+import {
+ getInfo,
+ 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,
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let {
+ id
+ } = options
+ this.setData({
+ id
+ })
+ 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);
+ });
+ console.log(paths,"xx1");
+ console.log(path);
+ wx.previewImage({
+ urls: path,
+ current: path[e.currentTarget.dataset.index]
+ })
+ },
+
+ 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/info/index.json b/miniprogram/pageage/flow_labour/info/index.json
new file mode 100644
index 0000000..101553f
--- /dev/null
+++ b/miniprogram/pageage/flow_labour/info/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/info/index.wxml b/miniprogram/pageage/flow_labour/info/index.wxml
new file mode 100644
index 0000000..ad25b55
--- /dev/null
+++ b/miniprogram/pageage/flow_labour/info/index.wxml
@@ -0,0 +1,148 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{(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}}
+
+
+
+
+ 投诉进度
+
+ 审批完成
+ 待项目经理审批
+ 待甲方代表审批
+ 待集团公司审批
+ 项目经理审批驳回
+ 甲方代表审批驳回
+ 集团公司审批驳回
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/miniprogram/pageage/flow_labour/info/index.wxss b/miniprogram/pageage/flow_labour/info/index.wxss
new file mode 100644
index 0000000..48eb59a
--- /dev/null
+++ b/miniprogram/pageage/flow_labour/info/index.wxss
@@ -0,0 +1,78 @@
+/* pageage/project_checking/info/index.wxss */
+.in-img-max:after{
+ display:block;
+ clear:both;
+ content:"";
+ visibility:hidden;
+ height:0
+ }
+ .in-img-max{
+ width: auto;
+ zoom:1
+ }
+ .in-img-div{
+ position: relative;
+ margin: 0 8px 0 0;
+ float: left;
+ }
+ .in-img-div image{
+ width: 180rpx;
+ height: 180rpx;
+ border-radius: 15rpx;
+ position: relative;
+ }
+ .van-collapse.van-hairline--top-bottom:after{
+ border-width: 0px 0;
+ }
+ .van-cell.van-cell--borderless{
+ background-color: #2b345b;
+ color: #fff;
+ margin-top: 30rpx;
+ border-radius: 5rpx;
+ }
+ .van-cell.van-cell--borderless:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__title.van-collapse-item__title--expanded:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item .van-cell:after{
+ border-bottom: 0;
+ }
+ .van-collapse-item.van-hairline--top:after{
+ border-top-width:0
+ }
+ .van-cell.van-cell--clickable{
+ background-color: #2b345b;
+ margin-top: 5rpx;
+ margin-bottom: 5rpx;
+ color: #fff;
+ border-radius: 15rpx;
+
+ }
+ .van-cell.van-cell--clickable:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__wrapper .van-collapse-item__content{
+ background-color: #1e2336;
+ color:#8ca4ec ;
+ border-width: 0px 0;
+ }
+ .gk_open_con view{
+ padding: 10rpx 0;
+ width: 100%;
+ }
+ .gk_open_con image{
+ width: 30rpx;
+ height: 30rpx;
+ margin-right: 5rpx;
+ position: relative;
+ top: 5rpx;
+ }
+ .gk_open_con .in-img-div image{
+ width: 120rpx !important;
+ height: 120rpx !important;
+ margin-right: 15rpx;
+ position: relative;
+ top: 5rpx;
+ }
\ No newline at end of file
diff --git a/miniprogram/pageage/flow_labour/list/index.js b/miniprogram/pageage/flow_labour/list/index.js
new file mode 100644
index 0000000..8a8c2e6
--- /dev/null
+++ b/miniprogram/pageage/flow_labour/list/index.js
@@ -0,0 +1,318 @@
+import {list,findGroupCountByApprove} from "../../../api/flowLabour"
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ userId:"",
+ deptId: "",
+ loginName: "",
+ projectId: "",
+ minRoleId: "",
+ initData: {},
+ show: false,
+ listData: [],
+ activeState: "jxz",
+ jxzCount: 0,
+ ywcCount: 0,
+ pageNum: 1,
+ pageSize: 10,
+ lastDataSize: 10,
+ list: []
+ },
+
+ getInfo(e) {
+ let {
+ id,
+ approveStatus
+ } = e.currentTarget.dataset.set
+ if (approveStatus == "100") {
+ wx.redirectTo({
+ url: `../info/index?id=${id}`,
+ })
+ } else {
+ if(this.data.minRoleId=='2' || this.data.minRoleId=='3'){
+ //超管可直接进入审批页面
+ wx.redirectTo({
+ url: `../check/index?id=${id}`,
+ })
+ }else if(this.data.minRoleId=='4' (approveStatus == '20' || approveStatus == '31')){
+ wx.redirectTo({
+ url: `../check/index?id=${id}`,
+ })
+ }else if(this.data.minRoleId=='4' (approveStatus == '10' || approveStatus == '21')){
+ wx.redirectTo({
+ url: `../info/index?id=${id}`,
+ })
+ }else if(this.data.minRoleId!='4' (approveStatus == '10' || approveStatus == '21')){
+ wx.redirectTo({
+ url: `../check/index?id=${id}`,
+ })
+ }else if(this.data.minRoleId!='4' (approveStatus == '20' || approveStatus == '31')){
+ wx.redirectTo({
+ url: `../info/index?id=${id}`,
+ })
+ }else{
+ wx.redirectTo({
+ url: `../info/index?id=${id}`,
+ })
+ }
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (options && options.barProId) {
+ //数据未加载完毕,从文件读取数据
+ if (app.globalData.projectInfoList.length == 0) {
+ wx.getStorage({
+ key: 'projectInfoList',
+ success: res => {
+ app.globalData.projectInfoList = res.data;
+ app.globalData.projectInfoList.forEach(item => {
+ if (item.projectId == options.barProId) {
+ app.globalData.projectId = item.projectId;
+ app.globalData.projectName = item.projectName;
+ }
+ });
+ //未查询到项目信息
+ if (!app.globalData.projectId) {
+ app.globalData.projectInfoList.push({
+ projectId: options.barProId,
+ projectId: options.barProName
+ });
+ app.globalData.projectId = options.barProId;
+ app.globalData.projectName = options.barProName;
+ }
+ //从缓存读取项目信息
+ this.setData({
+ initData: {
+ text: app.globalData.projectName,
+ id: app.globalData.projectId
+ }
+ })
+ },
+ fail: err => {
+ //未获取用户信息时,重新登录
+ wx.redirectTo({
+ url: '../pages/login/index',
+ })
+ }
+ })
+ } else {
+ app.globalData.projectInfoList.forEach(item => {
+ if (item.projectId == options.barProId) {
+ app.globalData.projectId = item.projectId;
+ app.globalData.projectName = item.projectName;
+ }
+ });
+ //未查询到项目信息
+ if (!app.globalData.projectId) {
+ app.globalData.projectInfoList.push({
+ projectId: options.barProId,
+ projectId: options.barProName
+ });
+ app.globalData.projectId = options.barProId;
+ app.globalData.projectName = options.barProName;
+ }
+ //从缓存读取项目信息
+ this.setData({
+ initData: {
+ text: app.globalData.projectName,
+ id: app.globalData.projectId
+ }
+ })
+ }
+ } else {
+ //从缓存读取项目信息
+ this.setData({
+ initData: {
+ text: app.globalData.projectName,
+ id: app.globalData.projectId
+ }
+ })
+ }
+ //获取缓存数据
+ wx.getStorage({
+ key: 'userinfo',
+ success: res => {
+ this.setData({
+ deptId: res.data.deptId,
+ userId: res.data.userId,
+ loginName: res.data.loginName,
+ projectId: app.globalData.projectId,
+ minRoleId: res.data.minRoleId,
+ pageNum: 1,
+ pageSize: 10,
+ lastDataSize: 10,
+ listData: []
+ })
+ this.getListData();
+ },
+ fail: err => {
+ //未获取用户信息时,重新登录
+ wx.redirectTo({
+ url: '../pages/login/index',
+ })
+ }
+ })
+ },
+
+ /**
+ * 查询项目材料进场验收数据
+ */
+ getListData() {
+ //进入这里说明数据加载完毕
+ if (this.data.lastDataSize < this.data.pageSize) {
+ //app.toast("已经到底了,暂无可继续加载数据!")
+ return;
+ }
+ var that = this;
+ //判断角色,
+ let mr = this.data.minRoleId;
+ let deptId = this.data.deptId;
+ if (mr == 2 || mr == 3 || mr == 4) {
+ deptId = 0;
+ }
+ let param = {
+ "projectId": this.data.projectId,
+ "deptId": deptId,
+ "nowDept": deptId,
+ "nowRole": mr,
+ "nowUser": this.data.loginName,
+ "activeName": that.data.activeState
+ }
+ this.queryCount(param);
+ param.pageNum = that.data.pageNum;
+ param.pageSize = that.data.pageSize;
+ list(param).then(res =>{
+ if (res.code == "200") {
+ //这里处理this.data.lastDataSize=this.data.pageSize
+ if (that.data.list.length > 0 && res.rows.length > 0 && that.data.list[0].id == res.rows[0].id) {
+ that.setData({
+ lastDataSize: 0,
+ })
+ } else {
+ that.setData({
+ pageNum: that.data.pageNum + 1,
+ lastDataSize: res.rows.length,
+ list: res.rows,
+ listData: that.data.listData.concat(res.rows)
+ })
+ }
+ }
+ });
+ },
+
+ /**
+ * 加载更多数据
+ */
+ onScrollToLower() {
+ console.log("滚动条到底了,开始加载新数据");
+ this.getListData();
+ },
+
+ //查询统计
+ queryCount(param) {
+ //查询统计数量
+ findGroupCountByApprove(param).then(res =>{
+ if(res.code==200){
+ this.setData({
+ jxzCount: res.data.db,
+ ywcCount: res.data.yb
+ });
+ }
+ });
+ },
+
+ /**
+ * 标签切换
+ */
+ typeJump(e) {
+ let index = e.currentTarget.dataset.index;
+ let nav = "";
+ if (index == 1) {
+ nav = 'jxz';
+ } else if (index == 2) {
+ nav = 'ywc';
+ }
+ this.setData({
+ activeState: nav,
+ pageNum: 1,
+ pageSize: 10,
+ lastDataSize: 10,
+ listData: [],
+ list: []
+ });
+ this.getListData();
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../../../pages/gengduogongneng/index',
+ })
+ },
+
+ //项目切换 返回值
+ onProjectSelect(e) {
+ let projectId = e.detail.id;
+ let projectName = e.detail.text;
+ app.globalData.projectId = projectId;
+ app.globalData.projectName = projectName;
+ this.onLoad();
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/miniprogram/pageage/flow_labour/list/index.json b/miniprogram/pageage/flow_labour/list/index.json
new file mode 100644
index 0000000..064f5e2
--- /dev/null
+++ b/miniprogram/pageage/flow_labour/list/index.json
@@ -0,0 +1,8 @@
+{
+ "usingComponents": {
+ "van-overlay": "@vant/weapp/overlay/index" ,
+ "van-popup": "@vant/weapp/popup/index"
+ },
+ "navigationStyle":"custom",
+ "navigationBarTitleText": "劳资预警审批"
+ }
\ No newline at end of file
diff --git a/miniprogram/pageage/flow_labour/list/index.wxml b/miniprogram/pageage/flow_labour/list/index.wxml
new file mode 100644
index 0000000..18a9743
--- /dev/null
+++ b/miniprogram/pageage/flow_labour/list/index.wxml
@@ -0,0 +1,59 @@
+
+
+
+
+
+ 进行中({{jxzCount}})
+ 已完成({{ywcCount}})
+
+
+
+
+
+
+ {{index < 9 ?'0'+(index+1):(index+1)}}
+ 投诉时间:{{format.parseDate(item.createTime)}}
+ 待项目经理审批
+ 甲方代表审批驳回
+ 待甲方代表审批
+ 集团公司审批驳回
+ 待集团公司审批
+ 审批完成
+
+
+
+
+
+ 项目名称:{{item.projectName}}
+ 总包单位:{{item.deptName}}
+ 分包单位:{{item.subDeptName}}
+ 投诉劳工:{{item.laborName}}
+ 欠薪人数:{{item.laborNumber}} 人
+ 欠薪金额:{{item.laborAmount}} 元
+ 原因说明:{{item.laborReason}}
+
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
\ No newline at end of file
diff --git a/miniprogram/pageage/flow_labour/list/index.wxss b/miniprogram/pageage/flow_labour/list/index.wxss
new file mode 100644
index 0000000..80ffeac
--- /dev/null
+++ b/miniprogram/pageage/flow_labour/list/index.wxss
@@ -0,0 +1 @@
+/* pageage/flow_labour/list/index.wxss */
\ No newline at end of file
diff --git a/miniprogram/pages/components/user-infos/index.js b/miniprogram/pages/components/user-infos/index.js
index 83a7938..fb4f136 100644
--- a/miniprogram/pages/components/user-infos/index.js
+++ b/miniprogram/pages/components/user-infos/index.js
@@ -2,8 +2,10 @@ import {
removeToken
} from '../../../utils/auth'
import {
- loginOut
+ loginOut,
+ findOpenUserMsgId
} from '../../../api/login'
+
const app = getApp()
Component({
/**数据监听 */
@@ -49,15 +51,25 @@ Component({
wx.getStorage({
key: 'userinfo',
success: function (res) {
- that.setData({
- show:true,
- userData: res.data,
- loginName: res.data.loginName,
- msgOpenId: res.data.msgOpenId || "",
- })
+ findOpenUserMsgId(res.data.openId).then(vo =>{
+ if(vo.code==200 && vo.data){
+ res.data.msgOpenId=vo.data.msgOpenId;
+ wx.setStorage({
+ key: 'userinfo',
+ data: res.data
+ });
+ that.setData({
+ show:true,
+ userData: res.data,
+ loginName: res.data.loginName,
+ msgOpenId: res.data.msgOpenId || "",
+ })
+ }
+ });
}
})
},
+
showPopup() {
this.setData({
show: true
diff --git a/miniprogram/pages/gengduogongneng/index.js b/miniprogram/pages/gengduogongneng/index.js
index b5572b3..82bd2f9 100644
--- a/miniprogram/pages/gengduogongneng/index.js
+++ b/miniprogram/pages/gengduogongneng/index.js
@@ -17,6 +17,7 @@ Page({
initData:{},
hiddenn:true,
todoDB:0,
+ lzyjDB:0,
approveDB:0,
ad:0,
td:0,
@@ -183,6 +184,7 @@ Page({
if(res.code=="200"){
that.setData({
todoDB:res.data.todo,
+ lzyjDB:res.data.approveLZYJ,
td:res.data.todo,
ad:res.data.approve+res.data.zlCount,
aq:res.data.aqCount,
diff --git a/miniprogram/pages/gengduogongneng/index.wxml b/miniprogram/pages/gengduogongneng/index.wxml
index 6825052..106f9a8 100644
--- a/miniprogram/pages/gengduogongneng/index.wxml
+++ b/miniprogram/pages/gengduogongneng/index.wxml
@@ -60,6 +60,7 @@
{{todoDB}}
+ {{lzyjDB}}
{{item.menu_name}}
diff --git a/miniprogram/pages/quality_manage/index.js b/miniprogram/pages/quality_manage/index.js
index 7ad9bd5..36bac56 100644
--- a/miniprogram/pages/quality_manage/index.js
+++ b/miniprogram/pages/quality_manage/index.js
@@ -479,7 +479,7 @@ Page({
res = res.data;
if (res.code == "200") {
that.setData({
- todoDb: res.data.todo,
+ todoDb: res.data.todo+res.data.approveLZYJ,
approveDb: res.data.approve + res.data.zlCount,
aq: res.data.aqCount,
zl: res.data.zlCount,
diff --git a/miniprogram/pages/safety_manage/index.js b/miniprogram/pages/safety_manage/index.js
index f53a205..4f2545b 100644
--- a/miniprogram/pages/safety_manage/index.js
+++ b/miniprogram/pages/safety_manage/index.js
@@ -554,7 +554,7 @@ Page({
res = res.data;
if (res.code == "200") {
that.setData({
- todoDb: res.data.todo,
+ todoDb: res.data.todo+res.data.approveLZYJ,
approveDb: res.data.approve + res.data.zlCount,
aq: res.data.aqCount
})
diff --git a/miniprogram/pages/wx-auth/index.js b/miniprogram/pages/wx-auth/index.js
index 8535fd8..7d438de 100644
--- a/miniprogram/pages/wx-auth/index.js
+++ b/miniprogram/pages/wx-auth/index.js
@@ -17,7 +17,7 @@ Page({
success: res => {
//config.manageUrl +
this.setData({
- url:"https://szgc.jhncidg.com/#/wxAuth?userOpenId=" + res.data.openId
+ url:"https://szgcwx.jhncidg.com/wechat/wxAuth/authorize?userOpenId=" + res.data.openId
})
}
})
diff --git a/miniprogram/pages/xiangmugaikuang/index.js b/miniprogram/pages/xiangmugaikuang/index.js
index ed4a329..c540688 100644
--- a/miniprogram/pages/xiangmugaikuang/index.js
+++ b/miniprogram/pages/xiangmugaikuang/index.js
@@ -1,8 +1,4 @@
import * as echarts from '../../ec-canvas/echarts';
-import {
- delOpenUserMsgId,
- findOpenUserMsgId
-} from '../../api/login'
const app = getApp();
@@ -399,7 +395,7 @@ Page({
success: function (res) {
if (options && options.showUser) {
//这里重新查询用户消息是否已授权
- that.reUserOpenMsgId(res.data);
+ that.reUserOpenMsgId();
}
that.setData({
loginName: res.data.loginName,
@@ -438,18 +434,9 @@ Page({
/**
* 查询公众号消息授权
*/
- reUserOpenMsgId(data){
- findOpenUserMsgId(data.openId).then(res =>{
- if(res.code==200 && res.data){
- data.msgOpenId=res.data.msgOpenId;
- wx.setStorage({
- key: 'userinfo',
- data: data
- });
- let userInfos = this.selectComponent("#userInfos");
- userInfos.loadUserInfo();
- }
- });
+ reUserOpenMsgId(){
+ let userInfos = this.selectComponent("#userInfos");
+ userInfos.loadUserInfo();
},
// 底部导航
@@ -717,7 +704,7 @@ Page({
res = res.data;
if (res.code == "200") {
that.setData({
- todoDb: res.data.todo,
+ todoDb: res.data.todo+res.data.approveLZYJ,
approveDb: res.data.approve+res.data.zlCount,
aq:res.data.aqCount,
})
diff --git a/miniprogram/utils/format.wxs b/miniprogram/utils/format.wxs
index ca667c3..06c4d6f 100644
--- a/miniprogram/utils/format.wxs
+++ b/miniprogram/utils/format.wxs
@@ -31,6 +31,55 @@ function indexNumFormat(num) {
return num;
}
+var dateFormat = function (timestamp, format) {
+ if (!format) {
+ format = "yyyy-MM-dd hh:mm:ss";
+ }
+ timestamp = parseInt(timestamp);
+ // 通过getDate()方法获取date类型的时间
+ var realDate = getDate(timestamp);
+
+ function timeFormat(num) {
+ return num < 10 ? '0' + num : num;
+ }
+ var date = [
+ ["M+", timeFormat(realDate.getMonth() + 1)],
+ ["d+", timeFormat(realDate.getDate())],
+ ["h+", timeFormat(realDate.getHours())],
+ ["m+", timeFormat(realDate.getMinutes())],
+ ["s+", timeFormat(realDate.getSeconds())],
+ ["q+", Math.floor((realDate.getMonth() + 3) / 3)],
+ ["S+", realDate.getMilliseconds()],
+ ];
+ var reg1 = regYear.exec(format);
+ // console.log(reg1[0]);
+ if (reg1) {
+
+ format = format.replace(reg1[1], (realDate.getFullYear() + '').substring(4 - reg1[1].length));
+ }
+ for (var i = 0; i < date.length; i++) {
+ var k = date[i][0];
+ var v = date[i][1];
+ // getRegExp初始化一个正则表达式对象
+ var reg2 = getRegExp("(" + k + ")").exec(format);
+ if (reg2) {
+ format = format.replace(reg2[1], reg2[1].length == 1 ?
+ v : ("00" + v).substring(("" + v).length));
+ }
+ }
+ return format;
+}
+
+function parseDate(dateStr) {
+ dateStr = dateStr.substring(0, 10);
+ return dateStr;
+}
+
module.exports = {
- indexNumFormat: indexNumFormat
+ parseDate: parseDate,
+ dateFormat: dateFormat,
+ indexNumFormat: indexNumFormat,
+ split:function(str,sign){
+ return str.split(sign);
+ }
}
\ No newline at end of file
diff --git a/miniprogram/utils/request.js b/miniprogram/utils/request.js
index 702c154..64ade5c 100644
--- a/miniprogram/utils/request.js
+++ b/miniprogram/utils/request.js
@@ -71,7 +71,7 @@ export function syncFileUpload(file) {
})
return new Promise((resolve, reject) => {
wx.uploadFile({
- url: config.baseUrl + '/common/upload', // 上传的服务器接口地址
+ url: config.baseUrl + '/wechat/common/upload', // 上传的服务器接口地址
filePath: file,
header: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
@@ -82,20 +82,21 @@ export function syncFileUpload(file) {
success: (res) => {
// 上传完成操作
wx.hideLoading()
- const code = res.data.code || 200
+ let resJson = JSON.parse(res.data)
+ const code = resJson.code || 200
if (code === 401) {
removeToken();
wx.redirectTo({
url: '../login/index',
});
} else if (code === 500 || code === 403) {
- app.toast(res.data.msg);
+ app.toast(resJson.msg);
setTimeout(() => {
- resolve(res.data);
+ resolve(resJson);
}, 800)
- resolve(res.data);
+ resolve(resJson);
} else {
- resolve(res.data);
+ resolve(resJson);
}
},
fail: (error) => {