From d1d003e7f4127105a4ccf53ba41a4f148992da62 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?=
<7507756+jiang_yuqi@user.noreply.gitee.com>
Date: Sun, 18 May 2025 10:49:52 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../project_flowable/approveTask/index.js | 468 ++++++++++
.../project_flowable/approveTask/index.json | 8 +
.../project_flowable/approveTask/index.wxml | 347 +++++++
.../project_flowable/approveTask/index.wxss | 112 +++
.../project_flowable/detailTask/index.js | 391 ++++++++
.../project_flowable/detailTask/index.json | 8 +
.../project_flowable/detailTask/index.wxml | 314 +++++++
.../project_flowable/detailTask/index.wxss | 101 +++
.../project_flowable/subDepts/index.js | 277 ++++++
.../project_flowable/subDepts/index.json | 4 +
.../project_flowable/subDepts/index.wxml | 58 ++
.../project_flowable/subDepts/index.wxss | 1 +
.../project_flowable/subDeptsUsers/index.js | 372 ++++++++
.../project_flowable/subDeptsUsers/index.json | 4 +
.../project_flowable/subDeptsUsers/index.wxml | 65 ++
.../project_flowable/subDeptsUsers/index.wxss | 10 +
.../miniprogram/pageage/project_info/index.js | 615 +++++++++++++
.../pageage/project_info/index.json | 13 +
.../pageage/project_info/index.wxml | 287 ++++++
.../pageage/project_info/index.wxss | 255 ++++++
.../miniprogram/pageage/project_list/index.js | 74 ++
.../pageage/project_list/index.json | 7 +
.../pageage/project_list/index.wxml | 45 +
.../pageage/project_list/index.wxss | 324 +++++++
.../pageage/project_magusers/add/index.js | 586 ++++++++++++
.../pageage/project_magusers/add/index.json | 8 +
.../pageage/project_magusers/add/index.wxml | 122 +++
.../pageage/project_magusers/add/index.wxss | 11 +
.../pageage/project_magusers/info/index.js | 321 +++++++
.../pageage/project_magusers/info/index.json | 6 +
.../pageage/project_magusers/info/index.wxml | 244 +++++
.../pageage/project_magusers/info/index.wxss | 11 +
.../pageage/project_magusers/list/index.js | 228 +++++
.../pageage/project_magusers/list/index.json | 9 +
.../pageage/project_magusers/list/index.wxml | 61 ++
.../pageage/project_magusers/list/index.wxss | 19 +
.../miniprogram/pageage/project_more/index.js | 161 ++++
.../pageage/project_more/index.json | 7 +
.../pageage/project_more/index.wxml | 87 ++
.../pageage/project_more/index.wxss | 23 +
.../project_problemmodify/add/index.js | 422 +++++++++
.../project_problemmodify/add/index.json | 7 +
.../project_problemmodify/add/index.wxml | 93 ++
.../project_problemmodify/add/index.wxss | 18 +
.../project_problemmodify/check/index.js | 266 ++++++
.../project_problemmodify/check/index.json | 8 +
.../project_problemmodify/check/index.wxml | 145 +++
.../project_problemmodify/check/index.wxss | 34 +
.../project_problemmodify/draft/index.js | 350 ++++++++
.../project_problemmodify/draft/index.json | 7 +
.../project_problemmodify/draft/index.wxml | 113 +++
.../project_problemmodify/draft/index.wxss | 19 +
.../project_problemmodify/info/index.js | 232 +++++
.../project_problemmodify/info/index.json | 8 +
.../project_problemmodify/info/index.wxml | 167 ++++
.../project_problemmodify/info/index.wxss | 37 +
.../project_problemmodify/list/index.js | 257 ++++++
.../project_problemmodify/list/index.json | 7 +
.../project_problemmodify/list/index.wxml | 81 ++
.../project_problemmodify/list/index.wxss | 1 +
.../project_problemmodify/modify/index.js | 288 ++++++
.../project_problemmodify/modify/index.json | 10 +
.../project_problemmodify/modify/index.wxml | 148 +++
.../project_problemmodify/modify/index.wxss | 34 +
.../pageage/project_quality/index.js | 198 ++++
.../pageage/project_quality/index.json | 7 +
.../pageage/project_quality/index.wxml | 113 +++
.../pageage/project_quality/index.wxss | 27 +
.../pageage/project_safety/index.js | 197 ++++
.../pageage/project_safety/index.json | 7 +
.../pageage/project_safety/index.wxml | 113 +++
.../pageage/project_safety/index.wxss | 27 +
.../pageage/project_schedule/add/index.js | 327 +++++++
.../pageage/project_schedule/add/index.json | 7 +
.../pageage/project_schedule/add/index.wxml | 79 ++
.../pageage/project_schedule/add/index.wxss | 86 ++
.../pageage/project_schedule/info/index.js | 116 +++
.../pageage/project_schedule/info/index.json | 4 +
.../pageage/project_schedule/info/index.wxml | 85 ++
.../pageage/project_schedule/info/index.wxss | 25 +
.../pageage/project_schedule/list/index.js | 192 ++++
.../pageage/project_schedule/list/index.json | 7 +
.../pageage/project_schedule/list/index.wxml | 98 ++
.../pageage/project_schedule/list/index.wxss | 20 +
.../pageage/project_subdepts/add/index.js | 843 ++++++++++++++++++
.../pageage/project_subdepts/add/index.json | 8 +
.../pageage/project_subdepts/add/index.wxml | 234 +++++
.../pageage/project_subdepts/add/index.wxss | 11 +
.../pageage/project_subdepts/info/index.js | 261 ++++++
.../pageage/project_subdepts/info/index.json | 6 +
.../pageage/project_subdepts/info/index.wxml | 277 ++++++
.../pageage/project_subdepts/info/index.wxss | 11 +
.../pageage/project_subdepts/list/index.js | 220 +++++
.../pageage/project_subdepts/list/index.json | 8 +
.../pageage/project_subdepts/list/index.wxml | 58 ++
.../pageage/project_subdepts/list/index.wxss | 11 +
.../pageage/project_subgroups/add/index.js | 285 ++++++
.../pageage/project_subgroups/add/index.json | 8 +
.../pageage/project_subgroups/add/index.wxml | 82 ++
.../pageage/project_subgroups/add/index.wxss | 11 +
.../pageage/project_subgroups/info/index.js | 287 ++++++
.../pageage/project_subgroups/info/index.json | 6 +
.../pageage/project_subgroups/info/index.wxml | 139 +++
.../pageage/project_subgroups/info/index.wxss | 11 +
.../pageage/project_subgroups/list/index.js | 230 +++++
.../pageage/project_subgroups/list/index.json | 7 +
.../pageage/project_subgroups/list/index.wxml | 55 ++
.../pageage/project_subgroups/list/index.wxss | 14 +
.../pageage/project_subusers/add/index.js | 774 ++++++++++++++++
.../pageage/project_subusers/add/index.json | 8 +
.../pageage/project_subusers/add/index.wxml | 235 +++++
.../pageage/project_subusers/add/index.wxss | 11 +
.../pageage/project_subusers/info/index.js | 327 +++++++
.../pageage/project_subusers/info/index.json | 6 +
.../pageage/project_subusers/info/index.wxml | 244 +++++
.../pageage/project_subusers/info/index.wxss | 11 +
.../pageage/project_subusers/list/index.js | 238 +++++
.../pageage/project_subusers/list/index.json | 9 +
.../pageage/project_subusers/list/index.wxml | 61 ++
.../pageage/project_subusers/list/index.wxss | 19 +
.../pageage/project_video/info/index.js | 102 +++
.../pageage/project_video/info/index.json | 6 +
.../pageage/project_video/info/index.wxml | 32 +
.../pageage/project_video/info/index.wxss | 1 +
.../pageage/project_video/list/index.js | 147 +++
.../pageage/project_video/list/index.json | 4 +
.../pageage/project_video/list/index.wxml | 47 +
.../pageage/project_video/list/index.wxss | 18 +
.../miniprogram/pageage/sign_mags/index.js | 181 ++++
.../miniprogram/pageage/sign_mags/index.json | 5 +
.../miniprogram/pageage/sign_mags/index.wxml | 32 +
.../miniprogram/pageage/sign_mags/index.wxss | 272 ++++++
132 files changed, 16424 insertions(+)
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_flowable/approveTask/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_flowable/approveTask/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_flowable/approveTask/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_flowable/approveTask/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_flowable/detailTask/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_flowable/detailTask/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_flowable/detailTask/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_flowable/detailTask/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_flowable/subDepts/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_flowable/subDepts/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_flowable/subDepts/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_flowable/subDepts/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_flowable/subDeptsUsers/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_flowable/subDeptsUsers/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_flowable/subDeptsUsers/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_flowable/subDeptsUsers/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_info/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_info/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_info/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_info/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_list/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_list/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_list/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_list/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_magusers/add/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_magusers/add/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_magusers/add/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_magusers/add/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_magusers/info/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_magusers/info/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_magusers/info/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_magusers/info/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_magusers/list/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_magusers/list/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_magusers/list/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_magusers/list/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_more/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_more/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_more/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_more/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/add/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/add/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/add/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/add/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/check/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/check/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/check/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/check/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/draft/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/draft/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/draft/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/draft/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/info/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/info/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/info/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/info/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/list/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/list/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/list/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/list/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/modify/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/modify/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/modify/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_problemmodify/modify/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_quality/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_quality/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_quality/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_quality/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_safety/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_safety/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_safety/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_safety/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_schedule/add/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_schedule/add/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_schedule/add/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_schedule/add/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_schedule/info/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_schedule/info/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_schedule/info/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_schedule/info/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_schedule/list/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_schedule/list/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_schedule/list/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_schedule/list/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subdepts/add/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subdepts/add/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subdepts/add/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subdepts/add/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subdepts/info/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subdepts/info/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subdepts/info/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subdepts/info/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subdepts/list/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subdepts/list/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subdepts/list/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subdepts/list/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subgroups/add/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subgroups/add/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subgroups/add/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subgroups/add/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subgroups/info/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subgroups/info/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subgroups/info/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subgroups/info/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subgroups/list/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subgroups/list/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subgroups/list/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subgroups/list/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subusers/add/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subusers/add/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subusers/add/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subusers/add/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subusers/info/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subusers/info/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subusers/info/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subusers/info/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subusers/list/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subusers/list/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subusers/list/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_subusers/list/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_video/info/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_video/info/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_video/info/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_video/info/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_video/list/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_video/list/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_video/list/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/project_video/list/index.wxss
create mode 100644 yanzhu-ui-app/miniprogram/pageage/sign_mags/index.js
create mode 100644 yanzhu-ui-app/miniprogram/pageage/sign_mags/index.json
create mode 100644 yanzhu-ui-app/miniprogram/pageage/sign_mags/index.wxml
create mode 100644 yanzhu-ui-app/miniprogram/pageage/sign_mags/index.wxss
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_flowable/approveTask/index.js b/yanzhu-ui-app/miniprogram/pageage/project_flowable/approveTask/index.js
new file mode 100644
index 00000000..c246b4cf
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_flowable/approveTask/index.js
@@ -0,0 +1,468 @@
+import config from '../../../config'
+import {
+ reject,
+ complete,
+ returnTask,
+ returnList,
+ readDeployNotes,
+ findCommentByProcInsId
+} from '../../../api/flowable'
+import {
+ editApproveStatus,
+ findProSubDeptsInfoById,
+ findProSubDeptsUserInfoById
+} from '../../../api/project'
+import {
+ getToken
+} from '../../../utils/auth'
+const app = getApp()
+Page({
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ options: {},
+ active: 0,
+ stepList: [],
+ rejectNode: false,
+ activeName: "",
+ flowRecordList: [],
+ subDeptData: {
+ subDeptInfos: {}
+ },
+ subDeptUserData: {
+ userInfos: {},
+ },
+ comment: "",
+ targetKey: "",
+ targetKeyList: [],
+ imgBaseUrl: config.baseImgUrl
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ this.setData({
+ options: options
+ })
+ this.findFlowNodes();
+ this.findApplyDataInfo();
+ this.findCommentByProcInsId();
+ this.initTargetKeyList();
+ },
+
+ //查询工作流节点
+ findFlowNodes() {
+ readDeployNotes(this.data.options.deployId).then(res => {
+ let list = [{
+ text: '开始'
+ }];
+ let index = this.data.active;
+ res.data.forEach((item, idx) => {
+ if (this.data.options.taskName == item.name) {
+ index = idx + 1;
+ }
+ list.push({
+ text: item.name.substr(0,5),
+ desc: ''
+ });
+ });
+ list.push({
+ text: '结束'
+ });
+ this.setData({
+ active: index,
+ stepList: list
+ })
+ });
+ },
+
+ //查询审批日志
+ findCommentByProcInsId() {
+ findCommentByProcInsId({
+ procInsId: this.data.options.procInsId
+ }).then(res => {
+ this.setData({
+ flowRecordList: res.data
+ })
+ let list = [];
+ res.data.forEach((item, idx) => {
+ if (idx == 1 && (item.commentType == "3" || item.commentType == "2")) {
+ this.setData({
+ rejectNode: true
+ })
+ }
+ if (item.deleteReason) {
+ item.deleteReason = this.getDeleteReason(item.deleteReason);
+ }
+ if (item.duration) {
+ item.duration = app.getDurationDate(item.duration);
+ }
+ list.push(item);
+ })
+ this.setData({
+ flowRecordList: list
+ })
+ });
+ },
+
+ //查询审批表单参数
+ findApplyDataInfo() {
+ findProSubDeptsUserInfoById(this.data.options.businessKey).then(res => {
+ if (res.data.eduFilePath) {
+ let files = res.data.eduFilePath.split('/');
+ res.data.eduFileName = files[files.length - 1];
+ }
+ if(res.data.userInfos){
+ res.data.userInfos = JSON.parse(res.data.userInfos);
+ }
+ this.setData({
+ subDeptUserData: res.data
+ })
+ //查询单位信息
+ this.getSubDeptInfo(res.data.subDeptId);
+ })
+ },
+
+ //查询审批表单参数
+ getSubDeptInfo(subDeptId) {
+ findProSubDeptsInfoById(subDeptId).then(res => {
+ res.data.subDeptInfos = JSON.parse(res.data.subDeptInfos);
+ this.setData({
+ subDeptData: res.data
+ })
+ })
+ },
+
+
+ //初始化退回节点
+ initTargetKeyList() {
+ returnList({
+ taskId: this.data.options.taskId
+ }).then(res => {
+ if (res.data && res.data.length > 0) {
+ let list = [];
+ res.data.forEach(item => {
+ list.push({
+ id: item.id,
+ text: item.name
+ })
+ })
+ this.setData({
+ targetKey: list[0].id,
+ targetKeyList: list
+ })
+ }
+ });
+ },
+
+ //退回
+ onBack() {
+ let {
+ options,
+ comment
+ } = this.data;
+ //数据效验
+ if (!options.taskId) {
+ app.toast("数据异常,请刷新页面重试!")
+ return;
+ }
+ if (!comment) {
+ app.toast("请填写审批意见!")
+ return false;
+ }
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认审批驳回?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitBackTask();
+ }
+ }
+ })
+ },
+
+ /**
+ * 提交退回任务
+ */
+ submitBackTask() {
+ let {
+ options,
+ comment,
+ targetKeyList
+ } = this.data;
+ returnTask({
+ taskId: options.taskId,
+ targetKey: targetKeyList[0].id,
+ comment
+ }).then(res => {
+ if (res.code == 200) {
+ editApproveStatus(this.data.options.businessKey);
+ app.toast("驳回申请成功!")
+ setTimeout(() => {
+ this.returnToPage();
+ }, 500)
+ }
+ });
+ },
+
+ //通过
+ onPass() {
+ let {
+ options,
+ comment
+ } = this.data;
+ //数据效验
+ if (!options.taskId) {
+ app.toast("数据异常,请刷新页面重试!")
+ return;
+ }
+ if (comment == "") {
+ app.toast("请填写审批意见!")
+ return;
+ }
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认审批通过?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitPassTask();
+ }
+ }
+ })
+ },
+
+ /**
+ * 提交审核结果
+ */
+ submitPassTask() {
+ let {
+ options,
+ procInsId,
+ comment
+ } = this.data;
+ complete({
+ taskId: options.taskId,
+ instanceId: procInsId,
+ comment
+ }).then(res => {
+ if (res.code == 200) {
+ app.toast("申请审批通过成功!")
+ setTimeout(() => {
+ this.returnToPage();
+ }, 500)
+ }
+ });
+ },
+
+ //驳回
+ onReject() {
+ let {
+ taskId,
+ procInsId,
+ comment
+ } = this.data;
+ //数据效验
+ if (!taskId || !procInsId) {
+ app.toast("数据异常,请刷新页面重试!")
+ return;
+ }
+ if (comment == "") {
+ app.toast("请填写审批意见!")
+ return;
+ }
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认审批驳回?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitRejectTask();
+ }
+ }
+ })
+ },
+
+ /**
+ * 提交流程驳回
+ */
+ submitRejectTask() {
+ let {
+ taskId,
+ procInsId,
+ comment
+ } = this.data;
+ reject({
+ taskId,
+ instanceId: procInsId,
+ comment
+ }).then(res => {
+ if (res.code == 200) {
+ app.toast("驳回申请流程成功!")
+ setTimeout(() => {
+ this.returnToPage();
+ }, 500)
+ }
+ });
+ },
+
+ //申请说明
+ commentInput: function (options) {
+ this.data.comment = options.detail.value;
+ },
+
+ // 手风琴
+ onChange(event) {
+ this.setData({
+ activeName: event.detail,
+ });
+ },
+
+ /**
+ * 获取驳回节点
+ * @param {*} val
+ */
+ getDeleteReason(val) {
+ val = val.replace("Change activity to ", "");
+ let flowRecordList = this.data.flowRecordList;
+ for (let i = 0; i < flowRecordList.length; i++) {
+ if (flowRecordList[i].taskDefKey == val) {
+ return "驳回至" + flowRecordList[i].taskName;
+ }
+ }
+ },
+
+ //终止原因
+ commentblur: function (options) {
+ this.data.comment = options.detail.value;
+ },
+
+ //展示图片
+ showImg: function (e) {
+ let paths = e.target.dataset.set;
+ let path = [];
+ paths.split(',').forEach(url => {
+ path.push(config.baseImgUrl + url);
+ });
+ wx.previewImage({
+ urls: path,
+ current: path[0]
+ })
+ },
+
+ /**
+ * 下载并打开文档
+ * @param {*} e
+ */
+ downFile: function (e) {
+ let path = this.data.subDeptUserData.eduFilePath;
+ wx.downloadFile({
+ // 示例 url,并非真实存在
+ url: config.baseUrl + '/file/download?fileName=' + path,
+ header: {
+ 'Authorization': 'Bearer ' + getToken()
+ },
+ success: function (res) {
+ const filePath = res.tempFilePath
+ let fpt = path.split(".");
+ wx.openDocument({
+ filePath: filePath,
+ fileType: fpt[fpt.length - 1],
+ success: function (res) {
+ console.log('打开文档成功')
+ },
+ fail: function (res) {
+ console.log(res)
+ }
+ })
+ }
+ })
+ },
+
+ //选择退回节点
+ onSelectTargetKey(e) {
+ this.setData({
+ targetKey: e.detail.id,
+ backName: e.detail.name
+ })
+ },
+
+ /**
+ * 返回页面
+ */
+ returnToPage: function () {
+ if (wx.getStorageSync('nav-types') == "depts") {
+ wx.redirectTo({
+ url: '../subDepts/index',
+ })
+ } else if (wx.getStorageSync('nav-types') == "users") {
+ wx.redirectTo({
+ url: '../subDeptsUsers/index',
+ })
+ }
+ },
+
+ /**
+ * 修改申请
+ */
+ onEditApply: function () {
+ wx.redirectTo({
+ url: `../editTask/index?deployId=${this.data.options.deployId}&procInsId=${this.data.options.procInsId}&nickName=${this.data.options.nickName}&deptName=${this.data.options.deptName}&procDefName=${this.data.options.procDefName}&taskId=${this.data.options.taskId}&taskName=${this.data.options.taskName}&category=${this.data.options.category}&projectName=${this.data.options.projectName}&businessKey=${this.data.options.businessKey}&businessKeyParName=${this.data.options.businessKeyParName}&businessDeptId=${this.data.options.businessDeptId}&startUserId=${this.data.options.startUserId}`,
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_flowable/approveTask/index.json b/yanzhu-ui-app/miniprogram/pageage/project_flowable/approveTask/index.json
new file mode 100644
index 00000000..4cd33ca1
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_flowable/approveTask/index.json
@@ -0,0 +1,8 @@
+{
+ "usingComponents": {
+ "van-collapse": "@vant/weapp/collapse",
+ "van-collapse-item": "@vant/weapp/collapse-item",
+ "van-steps": "@vant/weapp/steps/index"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_flowable/approveTask/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_flowable/approveTask/index.wxml
new file mode 100644
index 00000000..8c6327a0
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_flowable/approveTask/index.wxml
@@ -0,0 +1,347 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{(flowRecordList.length-index) < 10 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}
+ {{item.taskName}}
+ {{item.commentResult}}
+ {{item.commentResult}}
+ {{item.commentResult}}
+ {{item.commentResult}}
+ {{item.commentResult}}
+
+
+
+
+
+ 办理用户:{{item.assigneeName}}
+
+
+ 办理单位:{{item.deptName}}
+
+
+ 候选办理:{{item.candidate}}
+
+
+ 驳回节点:{{item.deleteReason}}
+
+
+ 接收时间:{{item.startTime}}
+
+
+ 处理时间:{{item.endTime}}
+
+
+ 处理耗时:{{item.duration}}
+
+
+ 处理意见:{{item.message}}
+
+
+
+
+
+
+
+
+
+ {{subDeptData.projectName}}
+
+
+
+
+
+ 单位类型
+ {{subDeptData.subDeptTypeName}}
+
+
+
+
+ 单位名称
+ {{subDeptData.subDeptName}}
+
+
+
+
+ 信用代码
+ {{subDeptData.subDeptCode}}
+
+
+
+
+ 营业执照
+
+
+
+
+
+
+
+
+
+
+
+ 法人姓名
+ {{subDeptData.subDeptInfos.legalPerson}}
+
+
+
+
+ 法人身份证
+ {{subDeptData.subDeptInfos.legalPersonCard}}
+
+
+
+
+ 法人证件
+
+
+
+
+
+
+
+
+
+
+
+
+ 进入场地时间
+ {{subDeptData.useDates}}
+
+
+
+
+ 计划开工时间
+ {{subDeptData.startWorkDates}}
+
+
+
+
+ 计划完工时间
+ {{subDeptData.endWorkDates}}
+
+
+
+
+ 合同约定范围
+ {{subDeptData.contractInfos}}
+
+
+
+
+
+ 委托代理人
+ 人员姓名
+
+ {{subDeptUserData.userName}}
+
+
+
+
+
+ 代理人身份证
+ 身份证号码
+
+ {{subDeptUserData.cardCode}}
+
+
+
+
+
+ 工种岗位
+
+ {{subDeptUserData.craftPostName}}
+
+
+
+
+
+ 工种班组
+
+ {{subDeptUserData.subDeptGroupName}}
+
+
+
+
+ 民族
+ {{subDeptUserData.userInfos.nation}}
+
+
+
+
+ 籍贯
+ {{subDeptUserData.userInfos.nativePlace}}
+
+
+
+
+ 详细地址
+ {{subDeptUserData.userInfos.address}}
+
+
+
+
+
+ 代理人证件
+ 人员证件照
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 花名册近照
+
+
+
+
+
+
+
+
+
+
+
+ 单位委托书
+
+
+
+
+
+
+
+
+
+
+
+ 联系电话
+ {{subDeptUserData.userPhone}}
+
+
+
+
+ 紧急联系人
+ {{subDeptUserData.userInfos.emergencyContact}}
+
+
+
+
+ 紧急联系电话
+ {{subDeptUserData.userInfos.contactPhone}}
+
+
+
+
+ 开户行名称
+ {{subDeptUserData.userInfos.bankName}}
+
+
+
+
+ 开户行网点
+ {{subDeptUserData.userInfos.bankOffice}}
+
+
+
+
+ 工资银行卡号
+ {{subDeptUserData.userInfos.bankCardNo}}
+
+
+
+ 高血压、心脏病等基础身体健康问题
+
+
+ 无
+ 有
+
+
+
+ 严重呼吸系统疾病、严重心脑血管疾病、肝肾疾病、恶性肿瘤以及药物无法有效控制的高血压和糖尿病等基础性病症状征兆
+
+
+ 无
+ 有
+
+
+
+
+ 安全承诺书
+
+
+ 点击查看安全承诺书
+
+
+
+
+
+
+
+
+
+ 审批意见
+
+
+
+
+
+ 退回节点
+
+
+
+
+
+
+
+ 修改申请
+ 任务转办
+ 任务委派
+ 审批驳回
+ 审批通过
+
+
+
+ 修改申请信息
+
+
+ “任务转办” 指定人处理后由您继续审批。
+
+
+ “任务委派” 任务由指定人进行处理。
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_flowable/approveTask/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_flowable/approveTask/index.wxss
new file mode 100644
index 00000000..47b4cfa2
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_flowable/approveTask/index.wxss
@@ -0,0 +1,112 @@
+/* pageage/safetyManagement/addSafetyInspect/index.wxss */
+.van-popup{
+ background: none !important;
+}
+.van-image__img{
+ border-radius: 10rpx !important;
+}
+.radio_custom_class{
+ padding: 10rpx 100rpx 10rpx 0;
+}
+.radio_label_class{
+ color: #ffffff !important;
+}
+.max_tab_name{
+ padding: 0 40rpx;
+ font-size:30rpx;
+ height: 460rpx;
+ overflow: auto;
+ margin-top: 20rpx;
+ text-align: center;
+}
+.van-popup.van-popup--bottom{
+ background: #232a44;
+}
+.van-popup {
+ background-color: var(--popup-background-color,#232a44) !important;
+ }
+.font_color{
+ padding: 15rpx 0;
+ color: #157dd2;
+}
+.active{
+ font-size:30rpx;
+ font-weight: 600;
+ color: #14feff
+}
+.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: 30rpx;
+ 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;
+}
+.pass{
+ background-color: #388a38;
+}
+.transact{
+ background-color: #8e6424;
+}
+.text_active{
+ padding-left: 5rpx;
+ color: #8369f5;
+}
+.van-steps{
+ background-color: transparent !important;
+}
+.van-step--horizontal .van-step__circle-container{
+ background-color: transparent !important;
+}
+.van-steps--horizontal{
+ padding: 10px 20px !important;
+}
+.markers{
+ background: url("https://xiangguan.sxyanzhu.com/profile/icon/req.png") no-repeat left/40rpx;
+ height: 20px;
+ line-height: 20px;
+ padding-left: 42rpx;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ word-break: break-all;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_flowable/detailTask/index.js b/yanzhu-ui-app/miniprogram/pageage/project_flowable/detailTask/index.js
new file mode 100644
index 00000000..68d659c8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_flowable/detailTask/index.js
@@ -0,0 +1,391 @@
+import config from '../../../config'
+import {
+ readDeployNotes,
+ findCommentByProcInsId
+} from '../../../api/flowable'
+import {
+ findProSubDeptsInfoById,
+ findProSubDeptsUserInfoById
+} from '../../../api/project'
+import {
+ getToken
+} from '../../../utils/auth'
+const app = getApp()
+Page({
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ options: {},
+ active: 100,
+ rejectNode: false,
+ stepList: [],
+ activeName: "",
+ flowRecordList: [],
+ subDeptData: {
+ subDeptInfos: {}
+ },
+ subDeptUserData: {
+ userInfos: {},
+ },
+ stopShow: false,
+ deleteShow: false,
+ revocationShow: false,
+ fileNames: [],
+ minImageList: [],
+ imgTypes: ["png", "jpg", "jpeg"],
+ stopBtnShow: false,
+ comment: "",
+ imgBaseUrl: config.baseImgUrl
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ this.setData({
+ options: options
+ })
+ this.findFlowNodes();
+ this.findApplyDataInfo();
+ this.findCommentByProcInsId();
+ },
+
+ //查询工作流节点
+ findFlowNodes() {
+ readDeployNotes(this.data.options.deployId).then(res => {
+ let list = [{
+ text: '开始'
+ }];
+ let index = this.data.active;
+ res.data.forEach((item,idx) => {
+ console.log("this.data.options.taskName",this.data.options.taskName)
+ console.log("item.name",item.name)
+ if(this.data.options.taskName==item.name){
+ index = idx+1;
+ }
+ list.push({
+ text: item.name.substr(0,5),
+ desc: ''
+ });
+ });
+ list.push({
+ text: '结束'
+ });
+ this.setData({
+ active: index,
+ stepList: list
+ })
+ });
+ },
+
+ //查询审批日志
+ findCommentByProcInsId() {
+ findCommentByProcInsId({
+ procInsId: this.data.options.procInsId
+ }).then(res => {
+ this.setData({
+ flowRecordList: res.data
+ })
+ let list = [];
+ res.data.forEach((item, idx) => {
+ if (idx == 1 && (item.commentType == "3" || item.commentType == "2")) {
+ this.setData({
+ rejectNode: true
+ })
+ }
+ if (item.deleteReason) {
+ item.deleteReason = this.getDeleteReason(item.deleteReason);
+ }
+ if (item.duration) {
+ item.duration = app.getDurationDate(item.duration);
+ }
+ list.push(item);
+ })
+ this.setData({
+ flowRecordList: list
+ })
+ });
+ },
+
+ //查询审批表单参数
+ findApplyDataInfo() {
+ findProSubDeptsUserInfoById(this.data.options.businessKey).then(res => {
+ if (res.data.eduFilePath) {
+ let files = res.data.eduFilePath.split('/');
+ res.data.eduFileName = files[files.length - 1];
+ }
+ if(res.data.userInfos){
+ res.data.userInfos = JSON.parse(res.data.userInfos);
+ }
+ this.setData({
+ subDeptUserData: res.data
+ })
+ //查询单位信息
+ this.getSubDeptInfo(res.data.subDeptId);
+ })
+ },
+
+ //查询审批表单参数
+ getSubDeptInfo(subDeptId) {
+ findProSubDeptsInfoById(subDeptId).then(res => {
+ res.data.subDeptInfos = JSON.parse(res.data.subDeptInfos);
+ this.setData({
+ subDeptData: res.data
+ })
+ })
+ },
+
+ //流程退回
+ onStop() {
+ if (!this.data.stopBtnShow) {
+ app.toast("请填写终止原因!")
+ this.setData({
+ stopBtnShow: true
+ })
+ return;
+ } else {
+ if (this.data.comment == "") {
+ app.toast("请填写终止原因!")
+ this.setData({
+ stopBtnShow: true
+ })
+ return;
+ }
+ }
+ let that = this
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否终止当前流程申请?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitStopProcess();
+ }
+ }
+ })
+ },
+
+ /**
+ * 确认撤回
+ */
+ submitStopProcess() {
+ stopProcess({
+ instanceId: this.data.options.procInsId,
+ comment: this.data.comment
+ }).then(res => {
+ if (res.code == 200) {
+ app.toast("终止流程申请成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: '../../index/index',
+ })
+ }, 500)
+ }
+ });
+ },
+
+ //流程删除
+ onDelete() {
+ let that = this
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认删除流程申请?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitDeleteInstance();
+ }
+ }
+ })
+ },
+
+ /**
+ * 流程删除
+ */
+ submitDeleteInstance() {
+ deleteInstance(this.data.options.procInsId).then(res => {
+ if (res.code == 200) {
+ app.toast("删除流程申请成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: '../../index/index',
+ })
+ }, 500)
+ }
+ });
+ },
+
+ //流程撤回
+ onRevocation() {
+ let that = this
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认撤回当前任务流程?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitRevokeProcess();
+ }
+ }
+ });
+ },
+
+ /**
+ * 流程撤回
+ */
+ submitRevokeProcess() {
+ revokeProcess({
+ procInsId: this.data.options.procInsId,
+ instanceId: this.data.options.procInsId,
+ taskId: this.data.options.taskId
+ }).then(res => {
+ if (res.code == 200) {
+ app.toast("撤回流程申请成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: '../../index/index',
+ })
+ }, 500)
+ }
+ });
+ },
+
+ // 手风琴
+ onChange(event) {
+ this.setData({
+ activeName: event.detail,
+ });
+ },
+
+ /**
+ * 获取驳回节点
+ * @param {*} val
+ */
+ getDeleteReason(val) {
+ val = val.replace("Change activity to ", "");
+ let flowRecordList = this.data.flowRecordList;
+ for (let i = 0; i < flowRecordList.length; i++) {
+ if (flowRecordList[i].taskDefKey == val) {
+ return "驳回至" + flowRecordList[i].taskName;
+ }
+ }
+ },
+
+ //终止原因
+ commentblur: function (options) {
+ this.data.comment = options.detail.value;
+ },
+
+ /**
+ * 下载并打开文档
+ * @param {*} e
+ */
+ downFile: function (e) {
+ let path = this.data.subDeptUserData.eduFilePath;
+ wx.downloadFile({
+ // 示例 url,并非真实存在
+ url: config.baseUrl + '/file/download?fileName=' + path,
+ header: {
+ 'Authorization': 'Bearer ' + getToken()
+ },
+ success: function (res) {
+ const filePath = res.tempFilePath
+ let fpt = path.split(".");
+ wx.openDocument({
+ filePath: filePath,
+ fileType: fpt[fpt.length - 1],
+ success: function (res) {
+ console.log('打开文档成功')
+ },
+ fail: function (res) {
+ console.log(res)
+ }
+ })
+ }
+ })
+ },
+
+ //选择退回节点
+ onSelectTargetKey(e) {
+ this.setData({
+ targetKey: e.detail.id,
+ backName: e.detail.name
+ })
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到其它页面。*/
+ if (wx.getStorageSync('nav-types') == "depts") {
+ wx.redirectTo({
+ url: '../subDepts/index',
+ })
+ } else if (wx.getStorageSync('nav-types') == "users") {
+ wx.redirectTo({
+ url: '../subDeptsUsers/index',
+ })
+ }
+ },
+
+ //展示图片
+ showImg:function(e){
+ let paths = e.target.dataset.set;
+ let path = [];
+ paths.split(',').forEach(url => {
+ path.push(config.baseImgUrl + url);
+ });
+ wx.previewImage({
+ urls: path,
+ current: path[0]
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_flowable/detailTask/index.json b/yanzhu-ui-app/miniprogram/pageage/project_flowable/detailTask/index.json
new file mode 100644
index 00000000..4cd33ca1
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_flowable/detailTask/index.json
@@ -0,0 +1,8 @@
+{
+ "usingComponents": {
+ "van-collapse": "@vant/weapp/collapse",
+ "van-collapse-item": "@vant/weapp/collapse-item",
+ "van-steps": "@vant/weapp/steps/index"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_flowable/detailTask/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_flowable/detailTask/index.wxml
new file mode 100644
index 00000000..859a5eaf
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_flowable/detailTask/index.wxml
@@ -0,0 +1,314 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{(flowRecordList.length-index) < 10 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}
+ {{item.taskName}}
+ {{item.commentResult}}
+ {{item.commentResult}}
+ {{item.commentResult}}
+ {{item.commentResult}}
+ {{item.commentResult}}
+
+
+
+
+
+ 办理用户:{{item.assigneeName}}
+
+
+ 办理单位:{{item.deptName}}
+
+
+ 候选办理:{{item.candidate}}
+
+
+ 驳回节点:{{item.deleteReason}}
+
+
+ 接收时间:{{item.startTime}}
+
+
+ 处理时间:{{item.endTime}}
+
+
+ 处理耗时:{{item.duration}}
+
+
+ 处理意见:{{item.message}}
+
+
+
+
+
+
+
+
+
+ {{subDeptData.projectName}}
+
+
+
+
+
+ 单位类型
+ {{subDeptData.subDeptTypeName}}
+
+
+
+
+ 单位名称
+ {{subDeptData.subDeptName}}
+
+
+
+
+ 信用代码
+ {{subDeptData.subDeptCode}}
+
+
+
+
+ 营业执照
+
+
+
+
+
+
+
+
+
+
+
+ 法人姓名
+ {{subDeptData.subDeptInfos.legalPerson}}
+
+
+
+
+ 法人身份证
+ {{subDeptData.subDeptInfos.legalPersonCard}}
+
+
+
+
+ 法人证件
+
+
+
+
+
+
+
+
+
+
+
+
+ 进入场地时间
+ {{subDeptData.useDates}}
+
+
+
+
+ 计划开工时间
+ {{subDeptData.startWorkDates}}
+
+
+
+
+ 计划完工时间
+ {{subDeptData.endWorkDates}}
+
+
+
+
+ 合同约定范围
+ {{subDeptData.contractInfos}}
+
+
+
+
+
+ 委托代理人
+ 人员姓名
+
+ {{subDeptUserData.userName}}
+
+
+
+
+
+ 代理人身份证
+ 身份证号码
+
+ {{subDeptUserData.cardCode}}
+
+
+
+
+
+ 工种岗位
+
+ {{subDeptUserData.craftPostName}}
+
+
+
+
+
+ 工种班组
+
+ {{subDeptUserData.subDeptGroupName}}
+
+
+
+
+ 民族
+ {{subDeptUserData.userInfos.nation}}
+
+
+
+
+ 籍贯
+ {{subDeptUserData.userInfos.nativePlace}}
+
+
+
+
+ 详细地址
+ {{subDeptUserData.userInfos.address}}
+
+
+
+
+
+ 代理人证件
+ 人员证件照
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 花名册近照
+
+
+
+
+
+
+
+
+
+
+
+ 单位委托书
+
+
+
+
+
+
+
+
+
+
+
+ 联系电话
+ {{subDeptUserData.userPhone}}
+
+
+
+
+ 紧急联系人
+ {{subDeptUserData.userInfos.emergencyContact}}
+
+
+
+
+ 紧急联系电话
+ {{subDeptUserData.userInfos.contactPhone}}
+
+
+
+
+ 开户行名称
+ {{subDeptUserData.userInfos.bankName}}
+
+
+
+
+ 开户行网点
+ {{subDeptUserData.userInfos.bankOffice}}
+
+
+
+
+ 工资银行卡号
+ {{subDeptUserData.userInfos.bankCardNo}}
+
+
+
+ 高血压、心脏病等基础身体健康问题
+
+
+ 无
+ 有
+
+
+
+ 严重呼吸系统疾病、严重心脑血管疾病、肝肾疾病、恶性肿瘤以及药物无法有效控制的高血压和糖尿病等基础性病症状征兆
+
+
+ 无
+ 有
+
+
+
+
+ 安全承诺书
+
+
+ 点击下载安全承诺书
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_flowable/detailTask/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_flowable/detailTask/index.wxss
new file mode 100644
index 00000000..64f57fcf
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_flowable/detailTask/index.wxss
@@ -0,0 +1,101 @@
+.van-popup{
+ background: none !important;
+}
+.van-image__img{
+ border-radius: 10rpx !important;
+}
+.radio_custom_class{
+ padding: 10rpx 100rpx 10rpx 0;
+}
+.radio_label_class{
+ color: #ffffff !important;
+}
+.max_tab_name{
+ padding: 0 40rpx;
+ font-size:30rpx;
+ height: 460rpx;
+ overflow: auto;
+ margin-top: 20rpx;
+ text-align: center;
+ }
+ .van-popup.van-popup--bottom{
+ background: #232a44;
+ }
+ .van-popup {
+ background-color: var(--popup-background-color,#232a44) !important;
+ }
+ .font_color{
+ padding: 15rpx 0;
+ color: #157dd2;
+ }
+ .active{
+ font-size:30rpx;
+ font-weight: 600;
+ color: #14feff
+ }
+ .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: 30rpx;
+ 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;
+ }
+ .pass{
+ background-color: #388a38;
+ }
+ .transact{
+ background-color: #8e6424;
+ }
+ .text_active{
+ padding-left: 5rpx;
+ color: #8369f5;
+ }
+ .van-steps{
+ background-color: transparent !important;
+ }
+ .van-step--horizontal .van-step__circle-container{
+ background-color: transparent !important;
+ }
+ .van-steps--horizontal{
+ padding: 10px 20px !important;
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDepts/index.js b/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDepts/index.js
new file mode 100644
index 00000000..f6172954
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDepts/index.js
@@ -0,0 +1,277 @@
+import config from '../../../config'
+import {
+ getToken
+} from '../../../utils/auth'
+import {
+ quueryCount,
+ myAwaitFlowTaskList,
+ myFinishedFlowTaskList,
+} from '../../../api/flowable'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ projectId: '',
+ projectName: '',
+ initData: {},
+ activeState: "dsh",
+ dshCount: 0,
+ yshCount: 0,
+ listData: [],
+ pageNum: 1,
+ pageSize: 10,
+ total: 0,
+ imgBaseUrl: config.baseImgUrl
+ },
+
+ //项目切换 返回值
+ onProjectSelect(e) {
+ let projectId = e.detail.id;
+ let projectName = e.detail.text;
+ app.globalData.useProjectId = projectId;
+ app.globalData.useProjectName = projectName;
+ this.onLoad();
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (getToken()) {
+ this.setData({
+ pageNum: 1,
+ pageSize: 10,
+ listData: [],
+ total: 0,
+ dshCount: 0,
+ yshCount: 0,
+ activeState: "dsh",
+ projectId: app.globalData.useProjectId,
+ projectName: app.globalData.useProjectName,
+ initData: {
+ id: app.globalData.useProjectId,
+ text: app.globalData.useProjectName,
+ }
+ });
+ this.getListData();
+ this.getFlowableCount();
+ } else {
+ console.log("未查询到Token...{}...准备重新登录")
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ },
+
+ /**
+ * 查询列表数据
+ */
+ getListData() {
+ let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&activeTags=depts&startProId=" + app.globalData.useProjectId;
+ if (this.data.activeState == 'dsh') {
+ myAwaitFlowTaskList(params).then(res => {
+ if (res.code == "200") {
+ res.rows.forEach(item => {
+ item.businessImg = this.data.imgBaseUrl + item.businessImg;
+ item.durationStr = this.getDurationDate(item.duration);
+ });
+ this.setData({
+ total: res.total,
+ listData: this.data.listData.concat(res.rows)
+ })
+ }
+ });
+ } else {
+ myFinishedFlowTaskList(params).then(res => {
+ if (res.code == "200") {
+ res.rows.forEach(item => {
+ item.businessImg = this.data.imgBaseUrl + item.businessImg;
+ item.durationStr = this.getDurationDate(item.duration);
+ });
+ this.setData({
+ total: res.total,
+ listData: this.data.listData.concat(res.rows)
+ })
+ }
+ });
+ }
+ },
+
+ /**
+ * 统计分包单位数据
+ */
+ getFlowableCount() {
+ let params = "activeTags=depts&startProId=" + app.globalData.useProjectId;
+ quueryCount(params).then(res => {
+ if (res.code == 200) {
+ this.setData({
+ dshCount: res.data.await,
+ yshCount: res.data.finished
+ })
+ }
+ });
+ },
+
+ /**
+ * 统计审批数据
+ */
+ onScrollToLower() {
+ let nal = Math.ceil(this.data.total / this.data.pageSize);
+ if (this.data.pageNum < nal) {
+ this.setData({
+ pageNum: this.data.pageNum + 1
+ });
+ this.getListData();
+ }
+ },
+
+ /**
+ * 切换页签数据
+ */
+ switchTabJump(e) {
+ let index = e.currentTarget.dataset.index;
+ let nav = "";
+ if (index == 1) {
+ nav = 'dsh';
+ } else {
+ nav = 'ysh';
+ }
+ if (nav != this.data.activeState) {
+ this.setData({
+ activeState: nav,
+ pageNum: 1,
+ pageSize: 10,
+ listData: [],
+ });
+ this.getListData();
+ }
+ },
+
+ /**
+ * 点击栏目
+ * @param {*} e
+ */
+ findDetail(e) {
+ let {
+ taskId,
+ taskName,
+ procInsId,
+ deployId,
+ category,
+ businessKey,
+ finishTime
+ } = e.currentTarget.dataset.set
+ wx.setStorageSync('nav-types', "depts");
+ if (finishTime) {
+ //详情页面
+ wx.redirectTo({
+ url: `../detailTask/index?taskId=${taskId}&taskName=${taskName}&procInsId=${procInsId}&deployId=${deployId}&category=${category}&businessKey=${businessKey}`
+ })
+ } else {
+ //审批页面
+ wx.redirectTo({
+ url: `../approveTask/index?taskId=${taskId}&taskName=${taskName}&procInsId=${procInsId}&deployId=${deployId}&category=${category}&businessKey=${businessKey}`
+ })
+ }
+ },
+
+ /**
+ * 办理时间计算
+ * @param {*} val
+ */
+ getDurationDate(val) {
+ let day = 0;
+ let hours = 0;
+ let min = val;
+ if (min > 1440) {
+ day = parseInt(min / 1440);
+ min = min % 1440;
+ if (min > 60) {
+ hours = parseInt(min / 60);
+ min = min % 60;
+ }
+ } else if (min > 60) {
+ hours = parseInt(min / 60);
+ min = min % 60;
+ }
+ if (day > 0) {
+ if (day < 10) day = "0" + day;
+ if (hours < 10) hours = "0" + hours;
+ if (min < 10) min = "0" + min;
+ return day + "天" + hours + "小时" + min + "分钟";
+ }
+ if (hours > 0) {
+ if (hours < 10) hours = "0" + hours;
+ if (min < 10) min = "0" + min;
+ return hours + "小时" + min + "分钟";
+ }
+ if (min > 0) {
+ if (min < 10) min = "0" + min;
+ return min + "分钟";
+ }
+ if (min == 0) {
+ return "1分钟";
+ }
+ },
+
+ /**
+ * 返回页面
+ */
+ returnToPage: function () {
+ wx.redirectTo({
+ url: '../../project_more/index',
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDepts/index.json b/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDepts/index.json
new file mode 100644
index 00000000..ba2821f5
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDepts/index.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDepts/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDepts/index.wxml
new file mode 100644
index 00000000..64d884ac
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDepts/index.wxml
@@ -0,0 +1,58 @@
+
+
+
+
+ 待审核({{dshCount}})
+ 已审核({{yshCount}})
+
+
+
+
+
+
+
+ {{index < 10 ?'0'+(index+1):(index+1)}}
+
+ 申请时间 {{item.createTime}}
+ 办结时间 {{item.endTime}}
+
+
+
+
+
+
+
+
+
+ 单位类型:{{item.businessMk2}}
+ 单位名称:{{item.businessMk1}}
+ 信用代码:{{item.businessMk3}}
+ 处理耗时:{{item.durationStr}}
+
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDepts/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDepts/index.wxss
new file mode 100644
index 00000000..7acdceaf
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDepts/index.wxss
@@ -0,0 +1 @@
+/* pages/project_flowable/subDepts/index.wxss */
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDeptsUsers/index.js b/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDeptsUsers/index.js
new file mode 100644
index 00000000..c918a58a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDeptsUsers/index.js
@@ -0,0 +1,372 @@
+import config from '../../../config'
+import {
+ getToken,
+ getUserInfo
+} from '../../../utils/auth'
+import {
+ quueryCount,
+ batchComplete,
+ myAwaitFlowTaskList,
+ myFinishedFlowTaskList,
+} from '../../../api/flowable'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ projectId: '',
+ projectName: '',
+ initData: {},
+ activeState: "dsh",
+ dshCount: 0,
+ yshCount: 0,
+ listData: [],
+ pageNum: 1,
+ pageSize: 10,
+ total: 0,
+ checkedAll:false,
+ showChecked:false,
+ imgBaseUrl: config.baseImgUrl
+ },
+
+ //项目切换 返回值
+ onProjectSelect(e) {
+ let projectId = e.detail.id;
+ let projectName = e.detail.text;
+ app.globalData.useProjectId = projectId;
+ app.globalData.useProjectName = projectName;
+ this.onLoad();
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (getToken()) {
+ this.setData({
+ pageNum: 1,
+ pageSize: 10,
+ lastDataSize: 10,
+ listData: [],
+ total: 0,
+ dshCount: 0,
+ yshCount: 0,
+ activeState: "dsh",
+ projectId: app.globalData.useProjectId,
+ projectName: app.globalData.useProjectName,
+ initData: {
+ id: app.globalData.useProjectId,
+ text: app.globalData.useProjectName,
+ }
+ });
+ let userInfo = getUserInfo();
+ if(userInfo && userInfo.projectUserInfo && userInfo.projectUserInfo.subDeptType=="1"){
+ this.setData({
+ showChecked:true
+ });
+ }
+ this.getListData();
+ this.getFlowableCount();
+ } else {
+ console.log("未查询到Token...{}...准备重新登录")
+ wx.redirectTo({
+ url: '../../login/login',
+ })
+ }
+ },
+
+ /**
+ * 查询列表数据
+ */
+ getListData() {
+ let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&activeTags=users&startProId=" + app.globalData.useProjectId;
+ if (this.data.activeState == 'dsh') {
+ myAwaitFlowTaskList(params).then(res => {
+ if (res.code == "200") {
+ res.rows.forEach(item => {
+ item.businessImg = this.data.imgBaseUrl + item.businessImg;
+ item.durationStr = this.getDurationDate(item.duration);
+ });
+ this.setData({
+ total: res.total,
+ listData: this.data.listData.concat(res.rows)
+ })
+ }
+ });
+ } else {
+ myFinishedFlowTaskList(params).then(res => {
+ if (res.code == "200") {
+ res.rows.forEach(item => {
+ item.businessImg = this.data.imgBaseUrl + item.businessImg;
+ item.durationStr = this.getDurationDate(item.duration);
+ });
+ this.setData({
+ total: res.total,
+ listData: this.data.listData.concat(res.rows)
+ })
+ }
+ });
+ }
+ },
+
+ /**
+ * 统计分包单位数据
+ */
+ getFlowableCount() {
+ let params = "activeTags=users&startProId=" + app.globalData.useProjectId;
+ quueryCount(params).then(res => {
+ if (res.code == 200) {
+ this.setData({
+ dshCount: res.data.await,
+ yshCount: res.data.finished
+ })
+ }
+ });
+ },
+
+ /**
+ * 统计审批数据
+ */
+ onScrollToLower() {
+ let nal = Math.ceil(this.data.total / this.data.pageSize);
+ if (this.data.pageNum < nal) {
+ this.setData({
+ pageNum: this.data.pageNum + 1
+ });
+ this.getListData();
+ }
+ },
+
+ /**
+ * 切换页签数据
+ */
+ switchTabJump(e) {
+ let index = e.currentTarget.dataset.index;
+ let nav = "";
+ if (index == 1) {
+ nav = 'dsh';
+ } else {
+ nav = 'ysh';
+ }
+ if (nav != this.data.activeState) {
+ this.setData({
+ activeState: nav,
+ pageNum: 1,
+ pageSize: 10,
+ listData: [],
+ });
+ this.getListData();
+ }
+ },
+
+ /**
+ * 点击栏目
+ * @param {*} e
+ */
+ findDetail(e) {
+ let {
+ taskId,
+ taskName,
+ procInsId,
+ deployId,
+ category,
+ businessKey
+ } = e.currentTarget.dataset.set
+ wx.setStorageSync('nav-types', "users");
+ if (this.data.activeState=="ysh") {
+ //详情页面
+ wx.redirectTo({
+ url: `../detailTask/index?taskId=${taskId}&taskName=${taskName}&procInsId=${procInsId}&deployId=${deployId}&category=${category}&businessKey=${businessKey}`
+ })
+ } else {
+ //审批页面
+ wx.redirectTo({
+ url: `../approveTask/index?taskId=${taskId}&taskName=${taskName}&procInsId=${procInsId}&deployId=${deployId}&category=${category}&businessKey=${businessKey}`
+ })
+ }
+ },
+
+ /**
+ * 选中节点
+ * @param {*} e
+ */
+ selectItem: function(event){
+ let procInsId = event.currentTarget.dataset.set;
+ console.log("procInsId==>",procInsId)
+ let _listData = this.data.listData;
+ _listData.forEach(item =>{
+ if(procInsId==item.procInsId){
+ item.selected=!item.selected;
+ }
+ })
+ this.setData({
+ listData: _listData
+ });
+ },
+
+ /**
+ * 全选
+ */
+ onCheckedAll(){
+ let _checked = !this.data.checkedAll;
+ let _listData = this.data.listData;
+ _listData.forEach(item =>{
+ item.selected=_checked;
+ });
+ this.setData({
+ listData: _listData,
+ checkedAll: _checked
+ });
+ },
+
+ /**
+ * 批量
+ * 审核通过
+ */
+ onBatchPass(){
+ let taskIds = [];
+ let _listData = this.data.listData;
+ _listData.forEach(item =>{
+ if(item.selected){
+ taskIds.push(item.taskId);
+ }
+ });
+ if(taskIds.length==0){
+ app.toast("请选择要审批的数据项!","none",1500);
+ return false;
+ }
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认批量审批通过?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitBatchPass();
+ }
+ }
+ })
+ },
+
+ /**
+ * 提交审批
+ */
+ submitBatchPass(){
+ let taskIds = [];
+ let instanceIds = [];
+ let _listData = this.data.listData;
+ _listData.forEach(item =>{
+ if(item.selected){
+ taskIds.push(item.taskId);
+ instanceIds.push(item.procInsId);
+ }
+ });
+ let _data = {
+ 'taskIds':taskIds,
+ 'instanceIds':instanceIds
+ }
+ batchComplete(_data).then(res =>{
+ app.toast("批量审批通过成功!");
+ this.onLoad();
+ });
+ },
+
+ /**
+ * 办理时间计算
+ * @param {*} val
+ */
+ getDurationDate(val) {
+ let day = 0;
+ let hours = 0;
+ let min = val;
+ if (min > 1440) {
+ day = parseInt(min / 1440);
+ min = min % 1440;
+ if (min > 60) {
+ hours = parseInt(min / 60);
+ min = min % 60;
+ }
+ } else if (min > 60) {
+ hours = parseInt(min / 60);
+ min = min % 60;
+ }
+ if (day > 0) {
+ if (day < 10) day = "0" + day;
+ if (hours < 10) hours = "0" + hours;
+ if (min < 10) min = "0" + min;
+ return day + "天" + hours + "小时" + min + "分钟";
+ }
+ if (hours > 0) {
+ if (hours < 10) hours = "0" + hours;
+ if (min < 10) min = "0" + min;
+ return hours + "小时" + min + "分钟";
+ }
+ if (min > 0) {
+ if (min < 10) min = "0" + min;
+ return min + "分钟";
+ }
+ if (min == 0) {
+ return "1分钟";
+ }
+ },
+
+ /**
+ * 返回页面
+ */
+ returnToPage: function () {
+ wx.redirectTo({
+ url: '../../project_more/index',
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDeptsUsers/index.json b/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDeptsUsers/index.json
new file mode 100644
index 00000000..ba2821f5
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDeptsUsers/index.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDeptsUsers/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDeptsUsers/index.wxml
new file mode 100644
index 00000000..86c38fa2
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDeptsUsers/index.wxml
@@ -0,0 +1,65 @@
+
+
+
+
+ 待审核({{dshCount}})
+ 已审核({{yshCount}})
+
+
+
+
+
+
+
+ {{index < 10 ?'0'+(index+1):(index+1)}}
+
+ 申请时间 {{item.createTime}}
+ 办结时间 {{item.endTime}}
+
+
+
+
+
+
+
+
+
+
+
+
+ 工种类型:{{item.businessMk2}}
+ 单位名称:{{item.businessMk1}}
+ 信用代码:{{item.businessMk3}}
+ 处理耗时:{{item.durationStr}}
+
+
+
+
+
+
+ {{checkedAll?"全不选":"全选"}}
+ 审批通过
+
+
+
+
+ 暂无数据
+
+
+
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDeptsUsers/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDeptsUsers/index.wxss
new file mode 100644
index 00000000..f1f92344
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_flowable/subDeptsUsers/index.wxss
@@ -0,0 +1,10 @@
+/* pages/project_flowable/subDeptsUsers/index.wxss */
+.myIcon{
+ position: fixed;
+ right: 25px;
+}
+.myIcon image {
+ width: 22px;
+ height: 22px;
+ background-color: #eeeeee;
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_info/index.js b/yanzhu-ui-app/miniprogram/pageage/project_info/index.js
new file mode 100644
index 00000000..febd301d
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_info/index.js
@@ -0,0 +1,615 @@
+import config from '../../config'
+import {
+ getToken,
+ getUserInfo
+} from '../../utils/auth'
+import {
+ findProjectInfo,
+ findProjectDepts
+} from '../../api/project'
+import {
+ findSubDeptsUsers,
+ findDaysAttendanceView,
+ findUsersAttendanceView,
+ findSubDeptsAttendanceView
+} from '../../api/attendance'
+import {
+ findMyTask
+} from '../../api/flowable'
+const app = getApp();
+Page({
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ title: "项目详情",
+ activeNames: ["base"],
+ //项目信息
+ projectInfo: {},
+ projectDeptsList: [],
+ deptTypes: [{
+ "name": "建设单位",
+ "iconSrc": "https://xiangguan.sxyanzhu.com/profile/static/icon/WEB_jsdw.png"
+ }, {
+ "name": "监理单位",
+ "iconSrc": "https://xiangguan.sxyanzhu.com/profile/static/icon/WEB_jldw.png"
+ }, {
+ "name": "设计单位",
+ "iconSrc": "https://xiangguan.sxyanzhu.com/profile/static/icon/WEB_sjdw.png"
+ }, {
+ "name": "检测单位",
+ "iconSrc": "https://xiangguan.sxyanzhu.com/profile/static/icon/WEB_jcjg.png"
+ }, {
+ "name": "勘察单位",
+ "iconSrc": "https://xiangguan.sxyanzhu.com/profile/static/icon/web_ktdw.png"
+ }, {
+ "name": "总包单位",
+ "iconSrc": "https://xiangguan.sxyanzhu.com/profile/static/icon/web_zbdw.png"
+ }],
+ active: 0,
+ projectId: '',
+ projectName: '',
+ initData: {},
+ aqglDb: 0,
+ zlglDb: 0,
+ todoDb: 0,
+ nactive: 0,
+ labourData: [{
+ name: "管理人员",
+ total: 0,
+ unit: "人",
+ yesMonitor: 180
+ },
+ {
+ name: "劳务人员",
+ yesMonitor: 0,
+ total: 0,
+ unit: "人"
+ },
+ {
+ name: "特殊工种",
+ yesMonitor: 0,
+ total: 0,
+ unit: "人"
+ },
+ ],
+ labourDataList: [],
+ labourDays: [{
+ name: "管理人员",
+ total: 0,
+ unit: "人",
+ yesMonitor: 180
+ },
+ {
+ name: "劳务人员",
+ yesMonitor: 0,
+ total: 0,
+ unit: "人"
+ },
+ {
+ name: "特殊工种",
+ yesMonitor: 0,
+ total: 0,
+ unit: "人"
+ },
+ ],
+ labourDaysTotal: 0,
+ labourImg: "https://szgcwx.jhncidg.com/staticFiles/icon/zgry.png",
+ labourName: "在岗人员",
+ labourTotal: 0,
+ labourTypeList: [{
+ name: "在岗人员",
+ total: 0,
+ img: "https://szgcwx.jhncidg.com/staticFiles/icon/zgry.png"
+ }, {
+ name: "离岗人员",
+ total: 0,
+ img: "https://szgcwx.jhncidg.com/staticFiles/icon/rylg.png"
+ }],
+ animation: true,
+ animationData: {},
+ labourDatas: {
+ unit: '人',
+ legend: ['出勤人数', '当前在岗'],
+ color: ['#2e6ed0', '#fb9300'],
+ Xdata: ['01-01', '01-02', '01-03', '01-04', '01-05', '01-06', '01-07'],
+ Ydata: [
+ [0, 0, 0, 0, 0, 0, 0],
+ [0, 0, 0, 0, 0, 0, 0]
+ ]
+ },
+ switchChart: false,
+ attendanceListData: [],
+ subDeptUserInfo: {},
+ imgBaseUrl: config.baseImgUrl
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../pages/login/login',
+ })
+ }
+ wx.setStorageSync('nav-menu', "xmgk");
+ const proUserInfo = getUserInfo();
+ app.globalData.subDeptUserData = proUserInfo.projectUserInfo;
+ this.initAnimationData();
+ this.setData({
+ labourImg: this.data.labourTypeList[this.data.nactive].img,
+ projectId: app.globalData.useProjectId,
+ projectName: app.globalData.useProjectName,
+ initData: {
+ id: app.globalData.useProjectId,
+ text: app.globalData.useProjectName,
+ },
+ subDeptUserInfo: proUserInfo.projectUserInfo
+ });
+ //项目基本信息
+ this.getProjectInfo(app.globalData.useProjectId);
+ //用户项目信息
+ this.getProUserDatas();
+ //项目建设单位
+ this.getProjectDepts(app.globalData.useProjectId);
+ },
+
+ /**
+ * 统计劳务人员信息
+ * @param {*} proId
+ */
+ getSubDeptsUsers(proId) {
+ findSubDeptsUsers(proId).then(res => {
+ if (res.code == 200) {
+ let zg = 0;
+ let lg = 0;
+ res.data.forEach(item => {
+ if (item.useStatus == '0') {
+ zg += item.total;
+ } else {
+ lg += item.total;
+ }
+ });
+ this.setData({
+ "labourTypeList[0].total": zg,
+ "labourTypeList[1].total": lg,
+ labourTotal: zg,
+ labourDataList: res.data || []
+ })
+ this.initSubDeptUsersCharts();
+ }
+ });
+ },
+
+ /**
+ * 初始化动画
+ */
+ initAnimationData() {
+ var animation = wx.createAnimation({
+ duration: 1000,
+ timingFunction: 'linear',
+ })
+ this.animation = animation;
+ if (this.data.animation) {
+ animation.translateY(-8).step();
+ } else {
+ animation.translateY(8).step();
+ }
+ this.setData({
+ animation: this.data.animation ? false : true,
+ animationData: animation.export()
+ })
+ setTimeout(() => {
+ this.initAnimationData();
+ }, 1200)
+ },
+
+ /**
+ * 初始化统计图表
+ */
+ initSubDeptUsersCharts() {
+ let labourDataList = this.data.labourDataList;
+ if (labourDataList.length > 0) {
+ let gl = 0;
+ let ts = 0;
+ let lw = 0;
+ labourDataList.forEach(item => {
+ if (this.data.nactive == 0) {
+ if (item.useStatus == '0') {
+ if (item.craftType == '2') {
+ ts += item.total;
+ } else if (item.craftType == '3') {
+ gl += item.total;
+ } else {
+ lw += item.total;
+ }
+ }
+ } else {
+ if (item.useStatus != '0') {
+ if (item.craftType == '2') {
+ ts += item.total;
+ } else if (item.craftType == '3') {
+ gl += item.total;
+ } else {
+ lw += item.total;
+ }
+ }
+ }
+ });
+ this.setData({
+ "labourData[0].total": gl,
+ "labourData[0].yesMonitor": gl,
+ "labourData[1].total": ts,
+ "labourData[1].yesMonitor": ts,
+ "labourData[2].total": lw,
+ "labourData[2].yesMonitor": lw,
+ labourTotal: this.data.labourTypeList[this.data.nactive].total
+ })
+ if (this.data.switchChart) {
+ let chats = this.selectComponent("#userChart");
+ chats.initChart();
+ }
+ }
+ },
+
+ /**
+ * 初始化
+ * 今日考勤
+ * @param {*} proId
+ */
+ initSubDeptDaysCharts(proId) {
+ findDaysAttendanceView(proId).then(res => {
+ if (res.code == 200) {
+ let gl = 0;
+ let ts = 0;
+ let lw = 0;
+ res.data.forEach(item => {
+ if (item.craftType == '2') {
+ ts += item.total;
+ } else if (item.craftType == '3') {
+ gl += item.total;
+ } else {
+ lw += item.total;
+ }
+ });
+ this.setData({
+ "labourDays[0].total": gl,
+ "labourDays[0].yesMonitor": gl,
+ "labourDays[1].total": ts,
+ "labourDays[1].yesMonitor": ts,
+ "labourDays[2].total": lw,
+ "labourDays[2].yesMonitor": lw,
+ labourDaysTotal: gl + ts + lw
+ })
+ if (this.data.switchChart) {
+ let chats = this.selectComponent("#attsChart");
+ chats.initChart();
+ }
+ }
+ });
+ },
+
+ /**
+ * 统计
+ * 最近出勤信息
+ * @param {*} proId
+ */
+ getSubDeptsAttendanceView(proId) {
+ findSubDeptsAttendanceView(proId).then(res => {
+ if (res.code == 200) {
+ let xd = [];
+ let yd1 = [];
+ let yd2 = [];
+ res.data.list.forEach(item => {
+ xd.push(item.attendanceTime);
+ yd1.push(item.total);
+ });
+ if (xd.length < 7) {
+ let n = 7 - xd.length;
+ for (let i = 0; i < n; i++) {
+ xd.push('-');
+ yd1.push(0);
+ }
+ }
+ for (let y = 0; y < 7; y++) {
+ yd2.push(res.data.user);
+ }
+ let yd = [];
+ yd.push(yd1);
+ yd.push(yd2);
+ this.setData({
+ "labourDatas.Xdata": xd,
+ "labourDatas.Ydata": yd
+ });
+ if (this.data.switchChart) {
+ let chats = this.selectComponent("#chartBar");
+ chats.initChart();
+ }
+ }
+ });
+ },
+
+ /**
+ * 查询用户考勤
+ * @param {*} proId
+ */
+ getUsersAttendanceView(proId) {
+ findUsersAttendanceView(proId).then(res => {
+ if (res.code == 200) {
+ this.setData({
+ attendanceListData: res.data
+ });
+ }
+ })
+ },
+
+ /**
+ * 单位人员信息
+ * @param {*} proId
+ */
+ getProUserDatas() {
+ //劳务人员信息
+ if ((app.globalData.subDeptUserData.subDeptType == '1' || app.globalData.subDeptUserData.subDeptType == '4' || app.globalData.subDeptUserData.subDeptType == '5') && app.globalData.subDeptUserData.userPost != '4' && app.globalData.subDeptUserData.userPost != '5' && app.globalData.subDeptUserData.userPost != '6' && app.globalData.subDeptUserData.userPost != '8') {
+ //统计劳务人员信息
+ this.getSubDeptsUsers(app.globalData.useProjectId);
+ this.initSubDeptDaysCharts(app.globalData.useProjectId);
+ }
+ this.awaitTask();
+ //今日出勤信息
+ if (app.globalData.subDeptUserData.subDeptType == '1') {
+ this.getSubDeptsAttendanceView(app.globalData.useProjectId);
+ }
+ //人员出勤信息
+ if (app.globalData.subDeptUserData.userPost == '4' || app.globalData.subDeptUserData.userPost == '5' || app.globalData.subDeptUserData.userPost == '6' || app.globalData.subDeptUserData.userPost == '8') {
+ //统计劳务人员信息
+ this.getUsersAttendanceView(app.globalData.useProjectId);
+ }
+ },
+
+ /**
+ * 查询公众号消息授权
+ */
+ reUserOpenMsgId() {
+ let userInfos = this.selectComponent("#userInfos");
+ userInfos.loadUserInfo();
+ },
+
+ // 底部导航
+ onChange(event) {
+ // event.detail 的值为当前选中项的索引
+ this.setData({
+ active: event.detail
+ });
+ },
+
+ /**
+ * 初始化曲线图表
+ */
+ initLabourDatas() {
+ findGroupAllByDays({
+ projectId: app.globalData.projectId
+ }).then(res => {
+ if (res.code == 200) {
+ let xd = [];
+ let yd1 = [];
+ let yd2 = [];
+ res.data.list.forEach(item => {
+ xd.push(item.attendanceTime);
+ yd1.push(item.total);
+ });
+ if (xd.length < 7) {
+ let n = 7 - xd.length;
+ for (let i = 0; i < n; i++) {
+ xd.push('');
+ yd1.push(0);
+ }
+ }
+ for (let y = 0; y < 7; y++) {
+ yd2.push(res.data.user);
+ }
+ let yd = [];
+ yd.push(yd1);
+ yd.push(yd2);
+ this.setData({
+ "labourDatas.Xdata": xd,
+ "labourDatas.Ydata": yd
+ });
+ if (this.data.switchChart) {
+ let chats = this.selectComponent("#chartBar");
+ chats.initChart();
+ }
+ }
+ });
+ },
+
+ /**
+ * 查询项目详情
+ * @param {*} proId
+ */
+ getProjectInfo: function (proId) {
+ findProjectInfo(proId).then(res => {
+ if (res.data.scheduledStartTime) {
+ res.data.scheduledStartTime = res.data.scheduledStartTime.split("T")[0];
+ } else {
+ res.data.scheduledStartTime = " - ";
+ }
+ if (res.data.actualOperatingTime) {
+ res.data.actualOperatingTime = res.data.actualOperatingTime.split("T")[0];
+ } else {
+ res.data.actualOperatingTime = " - ";
+ }
+ if (res.data.plannedCompletionTime) {
+ res.data.plannedCompletionTime = res.data.plannedCompletionTime.split("T")[0];
+ } else {
+ res.data.plannedCompletionTime = " - ";
+ }
+ res.data.projectDeptsList.forEach(item => {
+ let typeItem = this.data.deptTypes.filter((v) => v.name == item.deptType);
+ if(typeItem.length>0){
+ item.iconSrc = typeItem[0].iconSrc;
+ }
+ });
+ this.setData({
+ projectInfo: res.data,
+ projectDeptsList: res.data.projectDeptsList
+ })
+ });
+ },
+
+ /**
+ * 查询
+ * 项目建设单位
+ * @param {*} proId
+ */
+ getProjectDepts: function (proId) {
+ findProjectDepts(proId).then(res => {
+ this.setData({
+ projectDeptsList: res.data
+ })
+ });
+ },
+
+ // 页签选中事件
+ selectedTab(e) {
+ this.setData({
+ nactive: e.target.dataset.set,
+ labourImg: this.data.labourTypeList[e.target.dataset.set].img,
+ })
+ this.initSubDeptUsersCharts();
+ },
+
+ //项目切换 返回值
+ onProjectSelect(e) {
+ let projectId = e.detail.id;
+ let projectName = e.detail.text;
+ app.globalData.useProjectId = projectId;
+ app.globalData.useProjectName = projectName;
+ this.setData({
+ switchChart: true
+ })
+ this.onLoad();
+ },
+
+ // 手风琴
+ onCollChange(event) {
+ this.setData({
+ activeNames: event.detail,
+ });
+ },
+
+ /**
+ * 拨打电话
+ * @param {*} event
+ */
+ calling: function (event) {
+ let callPhone = event.currentTarget.dataset.phone;
+ wx.makePhoneCall({
+ phoneNumber: callPhone,
+ success: function () {
+ console.log("拨打电话成功!")
+ },
+ fail: function () {
+ console.log("拨打电话失败!")
+ }
+ })
+ },
+
+ showImg: function (e) {
+ let paths = e.target.dataset.set;
+ let path = [];
+ paths.split(',').forEach(url => {
+ path.push(config.baseImgUrl + url);
+ });
+ wx.previewImage({
+ urls: path,
+ current: path[0]
+ })
+ },
+
+ /**
+ * 劳务管理查看详细
+ */
+ goLWGL: function () {
+ if (this.data.nactive == 2) {
+ wx.redirectTo({
+ url: '../../pageage/project_attendance/project_attendanceData/list/index'
+ })
+ } else {
+ let type;
+ if (this.data.nactive == 0) {
+ type = 1;
+ } else {
+ type = 2;
+ }
+ wx.redirectTo({
+ url: '../../pageage/project_attendance/project_attendanceUser/list/index?type=' + type
+ })
+ }
+ },
+
+ /**
+ * 最近出勤
+ */
+ goZJCQ: function () {
+ wx.redirectTo({
+ url: '../../pageage/project_attendance/project_attendanceData/list/index'
+ })
+ },
+
+ //跳转到安全管控
+ XMSP: function () {
+ wx.setStorageSync('nav-menu', "aqgl");
+ wx.redirectTo({
+ url: '../project_safety/index'
+ })
+ },
+
+ //跳转到质量管理
+ ZLGL: function () {
+ wx.setStorageSync('nav-menu', "zlgl");
+ wx.redirectTo({
+ url: '../project_quality/index'
+ })
+ },
+
+ //跳转到进度管理
+ JDGL: function () {
+ wx.setStorageSync('nav-menu', "xmgk");
+ wx.redirectTo({
+ url: '../project_schedule/list/index'
+ })
+ },
+
+ //跳转到项目管理
+ XMGL: function () {
+ wx.setStorageSync('nav-menu', "xmgl");
+ wx.redirectTo({
+ url: '../project_more/index'
+ })
+ },
+
+ //跳转到项目列表
+ XMLB: function () {
+ wx.redirectTo({
+ url: '../project_list/index'
+ })
+ },
+
+ /**
+ * 统计代办
+ */
+ awaitTask() {
+ let param = "proId=" + app.globalData.useProjectId;
+ findMyTask(param).then(res => {
+ if (res.code == 200) {
+ let proUserInfo = this.data.subDeptUserInfo;
+ this.setData({
+ todoDb: proUserInfo.subDeptType=="1"?(res.data.dwsh+res.data.rysh):res.data.todo,
+ aqglDb: proUserInfo.subDeptType=="1"?res.data.aqgl:0,
+ zlglDb: proUserInfo.subDeptType=="1"?res.data.zlgl:0
+ })
+ }
+ });
+ },
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_info/index.json b/yanzhu-ui-app/miniprogram/pageage/project_info/index.json
new file mode 100644
index 00000000..34a987bf
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_info/index.json
@@ -0,0 +1,13 @@
+{
+ "usingComponents": {
+ "van-row": "@vant/weapp/row",
+ "van-col": "@vant/weapp/col",
+ "van-tabbar": "@vant/weapp/tabbar",
+ "van-tabbar-item": "@vant/weapp/tabbar-item",
+ "van-collapse": "@vant/weapp/collapse",
+ "van-collapse-item": "@vant/weapp/collapse-item",
+ "ec-canvas": "../../ec-canvas/ec-canvas",
+ "van-notice-bar": "@vant/weapp/notice-bar"
+ },
+ "navigationStyle":"custom"
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_info/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_info/index.wxml
new file mode 100644
index 00000000..72e158dd
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_info/index.wxml
@@ -0,0 +1,287 @@
+
+
+
+
+
+
+
+
+
+
+
+ 项目单位:{{projectInfo.comName}}
+
+
+ 所属区域:{{projectInfo.province+' - '+projectInfo.city}}
+
+
+ 详细地址:{{projectInfo.projectAddress}}
+
+
+ 项目类型:{{projectInfo.projectTypeName}}
+
+
+ 总建筑面积:{{projectInfo.totalBuildingArea}}
+
+
+ 计划开工日期:{{projectInfo.scheduledStartTime}}
+
+
+ 实际开工日期:{{projectInfo.actualOperatingTime}}
+
+
+ 计划竣工日期:{{projectInfo.plannedCompletionTime}}
+
+
+ 总工期:{{projectInfo.projectTimeLimit + ' 天'}}
+
+
+ 项目负责人:{{projectInfo.projectPerson}}
+
+
+ 负责人手机号:{{projectInfo.projectPersonPhone}}
+
+
+ 项目概述:{{projectInfo.projectSummarize}}
+
+
+
+
+
+
+
+
+
+ {{item.deptType}}
+ {{item.deptName}}
+ {{item.leader}} {{item.phone}}
+
+
+
+
+
+
+
+
+
+ 劳务人员
+
+
+
+
+
+ {{item.name}}({{item.total}})
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ labourTotal }} 人
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 今日出勤
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ labourDaysTotal }} 人
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 我的二维码
+
+
+
+
+
+
+
+ 项目经理 扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。
+ 班组组长 扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。
+ 劳务人员 扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。
+
+
+
+
+
+
+
+
+
+ 最近出勤
+
+
+
+
+
+
+
+
+
+
+
+ 最近出勤
+
+
+
+
+
+ 默认展示近7天考勤数据!
+
+
+
+
+
+ {{index < 10 ?'0'+(index+1):(index+1)}}
+ 考勤时间:{{format.dateStrEv(item.inTime,item.outTime)}}
+
+
+
+
+
+
+
+
+
+ 人员姓名:{{item.userName}}
+ 入场时间:
+ {{format.timeStr(item.inTime)}}
+ 未打卡
+
+ 离场时间:
+ {{format.timeStr(item.outTime)}}
+ 未打卡
+
+
+
+
+ 单位名称:{{item.subDeptName}}
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 项目概况
+
+
+
+
+
+ 安全管理
+ {{aqglDB}}
+
+
+
+
+
+ 质量管理
+ {{zlglDB}}
+
+
+
+
+
+ 进度管理
+
+
+
+
+
+ 项目管理
+ {{todoDb}}
+
+
+
+
+
+
+
+
+ 项目概况
+
+
+
+
+
+ 项目管理
+ {{todoDb}}
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_info/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_info/index.wxss
new file mode 100644
index 00000000..c5b2a97a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_info/index.wxss
@@ -0,0 +1,255 @@
+/* pages/xiangmugaikuang/index.wxss */
+.information-review-tab {
+ display: flex;
+ justify-content: space-around;
+ align-items: center;
+ height: 80rpx;
+ color: #92a1ca;
+}
+
+.information-review-tab .active {
+ color: #87e3fa;
+ padding-left: 40rpx;
+ background: url("https://szgcwx.jhncidg.com/staticFiles/icon/utilization.png") no-repeat left/35rpx;
+}
+
+/* 有赞原码修改 */
+.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: 10rpx;
+ 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 {
+ padding: 0 30rpx;
+}
+
+.gk_open_con view {
+ padding: 10rpx 0;
+}
+
+.gk_open_con image {
+ width: 30rpx;
+ height: 30rpx;
+ margin-right: 5rpx;
+ position: relative;
+ top: 5rpx;
+}
+
+.echarts_max {
+ margin-top: 30rpx;
+ padding: 0 30rpx;
+}
+
+.echarts_min {
+ background: #1e2336;
+ font-size: 28rpx;
+ padding: 15rpx;
+ border-radius: 15rpx;
+}
+
+.eharts_title {
+ height: 40rpx;
+ line-height: 40rpx;
+ padding-left: 40rpx;
+ background: url("https://szgcwx.jhncidg.com/staticFiles/img/menu/CORE_52887EE6A33042408E11C2174974ABA1.png") no-repeat left/35rpx;
+}
+
+.eharts_head {
+ text-align: center;
+ padding: 30rpx 0;
+}
+
+.eharts_head text {
+ color: #0ad7ec;
+ font-size: 40rpx;
+}
+
+.eharts_con {
+ height: 320rpx;
+ width: auto;
+}
+
+.eharts_title_float {
+ float: right;
+}
+
+.eharts_title_float text {
+ padding: 0 5rpx;
+}
+
+.eharts_con_top {
+ margin-top: -320rpx;
+}
+
+.eharts_title_float_img {
+ width: 40rpx;
+ height: 40rpx;
+ float: right;
+ position: relative;
+ top: 2rpx;
+}
+
+.zdzb_bg {
+ height: 88rpx;
+ border-radius: 15rpx;
+ background: #2b345b;
+ margin: 30rpx;
+ font-size: 28rpx;
+ line-height: 88rpx;
+ padding-left: 30rpx;
+}
+
+.construction_unit {
+ padding: 10rpx 0;
+ display: flex;
+}
+
+.construction_unit_image {
+ padding-top: 15rpx;
+}
+
+.construction_unit_image image {
+ width: 80rpx;
+ height: 80rpx;
+}
+
+.construction_unit_list {
+ width: calc(100% - 100rpx);
+ padding-left: 20rpx;
+}
+
+.construction_unit_title {
+ padding: 6rpx 0;
+ color: #c5d9fc;
+}
+
+.construction_unit_name {
+ padding: 6rpx 0;
+ color: #54acf6;
+}
+
+.construction_unit_phone {
+ padding: 6rpx 0;
+ color: #ce9433;
+}
+
+.official {
+ margin-left: 30rpx;
+ margin-right: 30rpx;
+}
+
+.survey_content {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-top: 15px;
+}
+
+.survey_content_img {
+ width: 90px;
+ height: 90px;
+ text-align: center;
+ line-height: 90px;
+ position: relative;
+ background: url("https://szgcwx.jhncidg.com/staticFiles/icon/survey_total_icon.png") no-repeat bottom/90px 60px;
+}
+
+.survey_content_img image {
+ text-align: center;
+ line-height: 90px;
+ width: 50px;
+ height: 50px;
+}
+
+.labour-survey_content_number {
+ color: #cbdaff;
+ font-size: 16px;
+ text-align: center;
+ padding-top: 25px;
+ padding-left: 0;
+}
+
+.survey_content_number {
+ padding-left: 15px;
+ color: #cbdaff;
+ font-size: 16px;
+}
+
+.labour-survey_content_number {
+ color: #cbdaff;
+ font-size: 16px;
+ text-align: center;
+ padding-top: 25px;
+ padding-left: 0;
+}
+
+.survey_content_value text {
+ font-size: 25px;
+ font-style: italic;
+ font-weight: bold;
+ color: #87e3fa;
+ padding-right: 5px;
+}
+.inspect_max_scroll {
+ height: 30vh;
+ max-height: 82vh;
+}
+.zz{
+ color: #fcbc02;
+ font-weight: 800;
+}
+.qrcode{
+ text-align: center;
+}
+.qrtext{
+ margin-top: 25rpx;
+}
+.qrcode image{
+ width: 100px;
+ height: 100px;
+}
+
+.bt30{
+ margin-bottom: 20px;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_list/index.js b/yanzhu-ui-app/miniprogram/pageage/project_list/index.js
new file mode 100644
index 00000000..1d6028cc
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_list/index.js
@@ -0,0 +1,74 @@
+import {
+ getToken,
+ setUserInfo,
+ getUserInfo
+} from '../../utils/auth'
+import {
+ findMyProjectList,
+ findProSubDeptsUserInfo,
+} from '../../api/project'
+ const app = getApp()
+ Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ proCount:0,
+ projectInfoList:[],
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ if (getToken()) {
+ this.getMyProjectList();
+ } else {
+ console.log("未查询到Token...{}...准备重新登录")
+ wx.redirectTo({
+ url: '../../pages/login/login',
+ })
+ }
+ },
+
+ /**
+ * 查询
+ * 用户项目信息
+ * 根据项目配置进入不同页面...
+ */
+ getMyProjectList: function () {
+ findMyProjectList().then(res=>{
+ if(res.code==200){
+ res.rows.forEach(item =>{
+ item.videoNum = 0;
+ item.warningCount = 0;
+ item.monitoringCount = 0;
+ });
+ app.globalData.projectInfoList = res.rows;
+ this.setData({
+ proCount:res.total,
+ projectInfoList:res.rows
+ })
+ }
+ });
+ },
+
+ //项目详情
+ checkProject:function(even){
+ //赋值到公共参数
+ app.globalData.useProjectId = even.currentTarget.dataset['id'];
+ app.globalData.useProjectName = even.currentTarget.dataset['name'];
+ findProSubDeptsUserInfo(app.globalData.useProjectId).then(detail=>{
+ if(detail.code==200){
+ let userInfo = getUserInfo();
+ userInfo.projectUserInfo = detail.data;
+ setUserInfo(userInfo);
+ //单项目直接进入项目页面
+ wx.redirectTo({
+ url: '../project_info/index',
+ })
+ }
+ });
+ }
+ })
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_list/index.json b/yanzhu-ui-app/miniprogram/pageage/project_list/index.json
new file mode 100644
index 00000000..d860ff92
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_list/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-row": "@vant/weapp/row",
+ "van-col": "@vant/weapp/col"
+ },
+ "navigationStyle":"custom"
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_list/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_list/index.wxml
new file mode 100644
index 00000000..bae5028a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_list/index.wxml
@@ -0,0 +1,45 @@
+
+
+
+
+ 总工程数({{proCount}})
+
+
+
+
+
+ {{item.comName}}
+
+ {{item.projectName}}
+ {{item.projectAddress}}
+
+
+
+ 预警({{item.warningCount}})
+
+
+ 预警({{item.warningCount}})
+
+
+ 视频({{item.videoNum}})
+
+
+ 视频({{item.videoNum}})
+
+
+ 结构体({{item.monitoringCount}})
+
+
+ 结构体({{item.monitoringCount}})
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_list/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_list/index.wxss
new file mode 100644
index 00000000..8841868a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_list/index.wxss
@@ -0,0 +1,324 @@
+.list_max{
+ padding: 0 30rpx;
+ margin: 30rpx 0 10rpx;
+ }
+ .list_min{
+ border-radius:10rpx;
+ background: #2b345b;
+ height: 80rpx;
+ }
+ .list_min_1{
+ height: 80rpx;
+ line-height: 80rpx;
+ font-size: 28rpx;
+ padding-left: 10rpx;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ word-break: break-all;
+
+ }
+ .list_min_2{
+ height: 80rpx;
+ text-align: center;
+ line-height: 80rpx;
+ }
+ .list_bottom{
+ width:30rpx;
+ height:30rpx;
+ }
+ .list_title{
+ color:#8ca4ee;
+ font-size: 24rpx;
+ padding: 20rpx 30rpx;
+ }
+ .list_title text{
+ font-size: 26rpx;
+ color: #1aeff5;
+ }
+
+
+ .list_option_max{
+ padding:20rpx 30rpx;
+ }
+ .list_option{
+ margin-bottom: 40rpx;
+ background: #222840;
+ border-radius: 30rpx;
+ }
+ .list_left{
+ background: #273051;
+ border-radius: 30rpx 30rpx 0 0 ;
+ height: 80rpx;
+ font-size: 32rpx;
+ color: #14feff;
+ line-height: 80rpx;
+ padding-left: 30rpx;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ word-break: break-all;
+ }
+ .list_right{
+ font-size: 24rpx;
+ }
+ .list_con_bottom{
+ padding: 30rpx;
+ }
+ .list_right_name{
+ font-size: 30rpx;
+ }
+ .list_right_address{
+ padding: 20rpx 0 20rpx 35rpx;
+ color:#8ca4ee;
+ background: url("https://szgcwx.jhncidg.com/staticFiles/img/menu/CORE_B1C818B4CF2C44FE9D96624589329EBC.png") no-repeat left/35rpx;
+ }
+ .list_right_info{
+ padding: 10rpx 0;
+ font-size: 22rpx;
+ }
+ .list_warning{
+ background: url("https://szgcwx.jhncidg.com/staticFiles/img/CORE_632B884CD4084C4F8E556AB742809723.png") no-repeat left/30rpx;
+ padding-left: 35rpx;
+ }
+ .list_video{
+ background: url("https://szgcwx.jhncidg.com/staticFiles/img/CORE_970838B4C6F54BC7B33BB9F198D50130.png") no-repeat left/30rpx;
+ padding-left: 35rpx;
+ }
+ .list_dust{
+ background: url("https://szgcwx.jhncidg.com/staticFiles/img/62bfb39a8e5944f99a14c02922ffb80e.png") no-repeat left/30rpx;
+ padding-left: 35rpx;
+ }
+ .list_warning.active{
+ background: url("https://szgcwx.jhncidg.com/staticFiles/img/CORE_ACFA3598B4C943EB836848A6977C4189.png") no-repeat left/30rpx;
+ padding-left: 35rpx;
+ }
+ .list_video.active{
+ background: url("https://szgcwx.jhncidg.com/staticFiles/img/CORE_48D684509A314D55BD3B61EFFB77EF07.png") no-repeat left/30rpx;
+ padding-left: 35rpx;
+ }
+ .list_dust.active{
+ background: url("https://szgcwx.jhncidg.com/staticFiles/img/66036a52100146f5a36b0019849e8de0.png") no-repeat left/30rpx;
+ padding-left: 35rpx;
+ }
+ .sel_max{
+ width: 600rpx;
+ border-radius: 20rpx;
+ max-height: 800rpx;
+ padding: 30rpx;
+ background: #232a44;
+ border-radius: 20rpx;
+ overflow: auto;
+ }
+ .sel_min{
+ background: #273051;
+ height: 100rpx;
+ font-size: 28rpx;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ word-break: break-all;
+ line-height: 100rpx;
+ padding: 0 20rpx;
+ border-radius: 10rpx;
+ color: #14feff;
+ margin: 20rpx 0;
+ }
+ .sel_min:active{
+ background: #394577;
+ }
+ .van-popup.van-popup--center{
+ background: none;
+ }
+
+ .address{
+ margin: 0 30rpx;
+ color: #8ca4ee;
+ font-size: 28rpx;
+ padding: 20rpx 0 20rpx 50rpx;
+ background: url("https://szgcwx.jhncidg.com/staticFiles/img/CORE_1F1F3A2778334D3EAC1226DDCEBD48D0.png") no-repeat left/40rpx;
+ }
+ .map_list_info{
+ background: #232a44;
+ padding: 0 30rpx;
+ }
+
+ .van-center-enter-to.van-center-enter-active{
+ border-radius: 20rpx;
+ background: #232a44;
+ }
+ .map_list_info_title{
+ padding: 30rpx;
+ text-align: center;
+ }
+ .map_list_info .van-picker{
+ background: none;
+ }
+
+ .map_list_info view{
+ background: none;
+ }
+
+ .map_list_info .van-picker-column{
+ color: #157dd2;
+ }
+ .map_list_info .van-picker-column__item--selected{
+ color: #00e3fe;
+ }
+ .map_list_info .van-hairline--top-bottom:after{
+ border-width: 0px 0;
+ }
+
+ /* -------------------------- */
+ .van-popup.van-popup--bottom{
+ background: #232a44;
+ }
+ .all_name{
+ font-size: 26rpx;
+ padding:30rpx 20rpx;
+ line-height: 50rpx;
+ color: #00e3fe;
+ }
+ .van-tabs__scroll{
+ background: none !important;
+ }
+ .van-hairline--top-bottom:after{
+ border: none !important;
+ }
+ .van-tab.van-tab--active{
+ color: #14feff !important;
+ }
+ .van-tab{
+ color: #157dd2 !important;
+ }
+ .max_tab_name{
+ padding: 0 40rpx;
+ font-size:30rpx;
+ height: 460rpx;
+ overflow: auto;
+ margin-top: 20rpx;
+ text-align: center;
+ }
+
+ .font_color{
+ padding: 15rpx 0;
+ color: #157dd2;
+ }
+ .active1{
+ color: #14feff
+ }
+ .active2{
+ color: #14feff
+ }
+ .active3{
+ color: #14feff ;
+ }
+ .van-tabs__line{
+ background-color:#14feff !important;
+ }
+
+ .tab_max_tltie{
+ padding:0 30rpx;
+ font-size: 30rpx;
+ }
+ .tab_max_tltie text{
+ padding: 30rpx ;
+ color: #999999;
+ }
+ .tab_max_tltie .active{
+ font-weight: bold;
+ color: #00e3fe;
+ }
+
+ .choice_max{
+ width: 500rpx;
+ background: #232a44;
+ padding:0 30rpx;
+ }
+ .choice_tltie{
+ text-align: center;
+ color: #00e3fe;
+ font-size: 28rpx;
+ padding: 20rpx 0;
+ }
+ .choice_input input{
+ border: 1px solid #00e3fe;
+ width: 100%;
+ height:60rpx;
+ border-radius: 50rpx;
+ font-size: 28rpx;
+ color: #00e3fe;
+ padding-left: 30rpx;
+ box-sizing: border-box;
+ }
+ .choice_content{
+ padding: 20rpx 0;
+ }
+ .choice_content_max{
+ max-height: 515rpx;
+ overflow: auto;
+ }
+ .choice_content_min{
+ padding: 10px 0;
+ border-bottom: 1px solid #39446f;
+ font-size: 24rpx;
+ color: #157dd2;
+ }
+ .choice_content_min:active{
+ color: #00e3fe;
+ }
+ .queren{
+ float: right;
+ position: relative;
+ right: 20rpx;
+ padding: 10rpx;
+ color: #157dd2;
+ font-size: 28rpx;
+ }
+
+ .choice_max{
+ width: 500rpx;
+ background: #232a44;
+ padding:0 30rpx;
+ }
+ .choice_tltie{
+ text-align: center;
+ color: #00e3fe;
+ font-size: 28rpx;
+ padding: 20rpx 0;
+ }
+ .choice_input input{
+ border: 1px solid #00e3fe;
+ width: 100%;
+ height:60rpx;
+ border-radius: 50rpx;
+ font-size: 28rpx;
+ color: #00e3fe;
+ padding-left: 30rpx;
+ box-sizing: border-box;
+ }
+ .choice_content{
+ padding: 20rpx 0;
+ }
+ .choice_content_max{
+ max-height: 515rpx;
+ overflow: auto;
+ }
+ .choice_content_min{
+ padding: 10px 0;
+ border-bottom: 1px solid #39446f;
+ font-size: 24rpx;
+ color: #157dd2;
+ }
+ .choice_content_min:active{
+ color: #00e3fe;
+ }
+ .queren{
+ float: right;
+ position: relative;
+ right: 20rpx;
+ padding: 10rpx;
+ color: #157dd2;
+ font-size: 28rpx;
+ }
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_magusers/add/index.js b/yanzhu-ui-app/miniprogram/pageage/project_magusers/add/index.js
new file mode 100644
index 00000000..56a236aa
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_magusers/add/index.js
@@ -0,0 +1,586 @@
+import config from '../../../config'
+import {
+ getToken,
+ getUserInfo
+} from '../../../utils/auth'
+import {
+ findProRoles,
+ findDictCache,
+ findCardOcrFront
+} from '../../../api/publics'
+import {
+ addUser,
+ getUserRoles
+} from '../../../api/login'
+import {
+ findProSubUsersInfoById
+} from '../../../api/project'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ limit: 1,
+ maxDate: new Date(2088, 1, 1).getTime(),
+ form: {},
+ active: 0,
+ flowNodes: [{
+ text: '信息登记'
+ }, {
+ text: '信息审核'
+ }, {
+ text: '人员入场'
+ }],
+ deptsList: [],
+ postsList: [],
+ allPostList:[],
+ proRoleList: [],
+ loadShow: false,
+ imgBase: config.baseImgUrl,
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ if (options && options.id) {
+ //查询数据回填...
+ this.initData(options.id);
+ }
+ const proUserInfo = getUserInfo();
+ this.setData({
+ "form.comId": proUserInfo.projectUserInfo.comId,
+ "form.deptId": app.globalData.useProjectId,
+ "form.projectId": app.globalData.useProjectId,
+ "form.projectName": app.globalData.useProjectName
+ });
+ this.getDictCache();
+ this.getAllProDeptRoles();
+ },
+
+ /**
+ * 获取单位
+ */
+ getAllProDeptRoles() {
+ findProRoles(app.globalData.useProjectId).then(res => {
+ let list = [];
+ res.data.forEach(item => {
+ list.push({
+ "roleId": item.roleId,
+ "roleName": item.roleName,
+ "roleKey": item.roleKey,
+ "state": false
+ });
+ });
+ this.setData({
+ proRoleList: list
+ });
+ });
+ },
+
+ /**
+ * 获取字典缓存数据
+ */
+ getDictCache() {
+ // 初始化岗位
+ findDictCache("user_work_type").then(res => {
+ if (res.code == 200) {
+ let depts = [];
+ res.data.forEach(item => {
+ if(item.remark){
+ const exists = depts.some(ops => ops.id === item.remark);
+ if (!exists) {
+ depts.push({
+ 'id': item.remark,
+ 'text': item.remark,
+ 'post': []
+ });
+ }
+ }
+ });
+ depts.forEach(des => {
+ res.data.forEach(item => {
+ if (des.id == item.remark) {
+ des.post.push({
+ 'id': item.dictValue,
+ 'text': item.dictLabel
+ });
+ }
+ });
+ })
+ this.setData({
+ deptsList: depts,
+ allPostList: res.data
+ });
+ }
+ })
+ },
+
+ /**
+ * 初始化数据
+ * @param {*} id
+ */
+ initData(id) {
+ findProSubUsersInfoById(id).then(userRes => {
+ if (userRes.code == 200 && userRes.data != null) {
+ userRes.data.deptId = userRes.data.projectId;
+ userRes.data.nickName = userRes.data.userName;
+ userRes.data.phonenumber = userRes.data.userPhone;
+ if (userRes.data.userInfos) {
+ let userInfosJSON = JSON.parse(userRes.data.userInfos);
+ userRes.data.nativePlace = userInfosJSON.nativePlace;
+ userRes.data.nation = userInfosJSON.nation;
+ userRes.data.address = userInfosJSON.address;
+ userRes.data.cardImgPos = userInfosJSON.cardImgPos;
+ userRes.data.cardImgInv = userInfosJSON.cardImgInv;
+ }
+ if (userRes.data.cardImgPos) {
+ userRes.data.cardImgPos = (this.data.imgBase + userRes.data.cardImgPos).split(',');
+ }
+ if (userRes.data.cardImgInv) {
+ userRes.data.cardImgInv = (this.data.imgBase + userRes.data.cardImgInv).split(',');
+ }
+ if (userRes.data.userPicture) {
+ userRes.data.avatar = (this.data.imgBase + userRes.data.userPicture).split(',');
+ }
+ this.setData({
+ active: 100,
+ form: userRes.data
+ });
+ this.initUserRole(userRes.data.userId);
+ }
+ });
+ },
+
+ /**
+ * 初始化用户角色
+ * @param {*} userId
+ */
+ initUserRole(userId){
+ getUserRoles(userId).then(res => {
+ if(res.code==200){
+ let _roleIds = [];
+ let _roleNames = "";
+ res.data.roles.forEach(item =>{
+ _roleIds.push(item.roleId);
+ _roleNames += "," + item.roleName;
+ });
+ this.setData({
+ "form.deptId":res.data.deptId,
+ "form.roleIds": _roleIds,
+ "form.roleNames":_roleNames.substring(1)
+ })
+ }
+ })
+ },
+
+ //选择角色
+ onAddRoles(e) {
+ if (e.detail.length > 0) {
+ let _roleIds = "";
+ let _roleNames = "";
+ e.detail.forEach(item => {
+ _roleIds += "," + item.roleId;
+ _roleNames += "," + item.roleName;
+ });
+ this.setData({
+ "form.roleIds": _roleIds.substring(1).split(','),
+ "form.roleNames":_roleNames
+ })
+ console.log("dddddddd",this.data.form);
+ } else {
+ this.setData({
+ "form.roleIds": []
+ })
+ }
+ },
+
+ //取消页面
+ cancelSaveView() {
+ this.returnToPage()
+ },
+
+ /**
+ * 委托代理提交参建单位信息
+ */
+ submitSubUsers() {
+ let {
+ form
+ } = this.data;
+ //数据效验
+ if (!form.comId || !form.deptId || !form.projectId) {
+ app.toast("数据异常,请刷新页面重试!")
+ return false;
+ }
+ if (!form.cardImgPos || form.cardImgPos.length == 0) {
+ app.toast("请上传身份证正面照!");
+ return false;
+ }
+ if (!form.cardImgInv || form.cardImgInv.length == 0) {
+ app.toast("请上传身份证反面照!");
+ return false;
+ }
+ if (!form.avatar || form.avatar.length == 0) {
+ app.toast("请上传进场半身近照!");
+ return false;
+ }
+ if (!form.nickName) {
+ app.toast("请填写人员姓名!");
+ return false;
+ }
+ if (!form.cardCode) {
+ app.toast("请填写身份证号!");
+ return false;
+ } else {
+ const cardCodePattern = /^[1-9]\d{5}(18|19|20|21|22)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|[Xx])$/;
+ if (!cardCodePattern.test(form.cardCode)) {
+ app.toast("身份证号码不正确!");
+ return false;
+ }
+ }
+ if (!form.phonenumber) {
+ app.toast("请填写联系电话!");
+ return false;
+ } else {
+ const phonePattern = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
+ if (!phonePattern.test(form.phonenumber)) {
+ app.toast("人员联系电话不正确!");
+ return false;
+ }
+ }
+ if(!form.id){
+ if (!form.password) {
+ app.toast("请输入登录密码!");
+ return false;
+ }else if(form.password.length<6){
+ app.toast("登录密码最少6位字符!");
+ return false;
+ }
+ if (!form.depts) {
+ app.toast("请选择岗位部门!");
+ return false;
+ }
+ }
+ if (!form.workType) {
+ app.toast("请选择岗位级别!");
+ return false;
+ }
+ if (!form.roleIds || form.roleIds.length==0) {
+ app.toast("请选择用户角色!");
+ return false;
+ }
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认保存总包人员信息?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitSubUserForm();
+ }
+ }
+ })
+ },
+
+ /**
+ * 委托代理提交参建单位表单
+ */
+ submitSubUserForm() {
+ let _form = {
+ ...this.data.form
+ };
+ this.setData({
+ loadShow: true
+ })
+ let uploadFiles = [];
+ if (_form.cardImgPos && _form.cardImgPos.length > 0) {
+ uploadFiles.push({
+ type: 'cardImgPos',
+ path: _form.cardImgPos[0]
+ });
+ }
+ if (_form.cardImgInv && _form.cardImgInv.length > 0) {
+ uploadFiles.push({
+ type: 'cardImgInv',
+ path: _form.cardImgInv[0]
+ });
+ }
+ if (_form.avatar && _form.avatar.length > 0) {
+ uploadFiles.push({
+ type: 'userPicture',
+ path: _form.avatar[0]
+ });
+ }
+ let that = this;
+ let uploads = [];
+ uploadFiles.forEach(async (item, idx) => {
+ let obj;
+ if (item.path.indexOf(this.data.imgBase) > -1) {
+ obj = {
+ data: {
+ data: {
+ url: item.path.replace(this.data.imgBase, "")
+ }
+ }
+ }
+ } else {
+ //这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
+ obj = await that.syncUploadImage(item.path);
+ }
+ if (item.type == "cardImgPos") {
+ _form.cardImgPos = obj.data.data.url;
+ }
+ if (item.type == "cardImgInv") {
+ _form.cardImgInv = obj.data.data.url;
+ }
+ if (item.type == "userPicture") {
+ _form.avatar = obj.data.data.url;
+ }
+ uploads.push(obj.data.data.url);
+ //验证图片上传完毕
+ if (uploads.length == uploadFiles.length) {
+ let userInfos = {};
+ userInfos.nation = _form.nation;
+ userInfos.nativePlace = _form.nativePlace;
+ userInfos.address = _form.address;
+ userInfos.cardImgPos = _form.cardImgPos;
+ userInfos.cardImgInv = _form.cardImgInv;
+ _form.userInfos = JSON.stringify(userInfos);
+ addUser(_form).then(res => {
+ this.setData({
+ loadShow: false
+ });
+ if (res.code == 200) {
+ app.toast("保存数据成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: `../list/index`,
+ })
+ }, 200)
+ }
+ });
+ }
+ });
+ },
+
+ /**
+ * 个人身份证正面照
+ * @param {*} options
+ */
+ fileUploadCardImgPos(options) {
+ let file = options.detail;
+ this.setData({
+ "form.cardImgPos": file
+ });
+ file.forEach(async (item, idx) => {
+ let obj = await this.syncUploadImage(item);
+ findCardOcrFront(obj.data.data.url).then(res => {
+ if (res.code == 200) {
+ if (res.data.nation.indexOf("族") < 0) {
+ res.data.nation = res.data.nation + "族";
+ }
+ this.setData({
+ "form.nickName": res.data.name,
+ "form.cardCode": res.data.cardId,
+ "form.nation": res.data.nation,
+ "form.nativePlace": res.data.native,
+ "form.address": res.data.address
+ })
+ if (!res.data.name || !res.data.cardId) {
+ this.setData({
+ "form.cardImgPos": []
+ });
+ app.toast("身份证正面照识别失败!请重新上传");
+ }
+ }
+ });
+ })
+ },
+
+ /**
+ * 个人身份证反面照
+ * @param {*} options
+ */
+ fileUploadCardImgInv(options) {
+ let file = options.detail;
+ this.setData({
+ "form.cardImgInv": file
+ });
+ },
+
+ /**
+ * 个人半身近照
+ * @param {*} options
+ */
+ fileUploadUserPicture(options) {
+ let file = options.detail;
+ this.setData({
+ "form.avatar": file
+ });
+ },
+
+ /**
+ * 输入个人姓名
+ * @param {*} e
+ */
+ inputUserName(e) {
+ this.setData({
+ "form.nickName": e.detail.value
+ })
+ },
+
+ /**
+ * 输入个人身份证号
+ * @param {*} e
+ */
+ inputUserCode(e) {
+ this.setData({
+ "form.cardCode": e.detail.value
+ })
+ },
+
+ /**
+ * 输入联系电话
+ * @param {*} e
+ */
+ inputUserPhone(e) {
+ this.setData({
+ "form.phonenumber": e.detail.value
+ })
+ },
+
+ /**
+ * 登陆密码
+ * @param {*} e
+ */
+ inputPassword(e) {
+ this.setData({
+ "form.password": e.detail.value
+ })
+ },
+
+ /**
+ * 选择部门
+ * @param {*} e
+ */
+ onDepts(e) {
+ let _list = this.data.deptsList;
+ _list.forEach(item => {
+ if (item.id == e.detail.id) {
+ this.setData({
+ "form.depts": e.detail.id,
+ "form.workType": null,
+ postsList: item.post
+ })
+ }
+ });
+ },
+
+ /**
+ * 选择岗位
+ * @param {*} e
+ */
+ onPosts(e) {
+ this.setData({
+ "form.workType": e.detail.id
+ })
+ },
+
+ /**
+ * 这里考虑上传图片异步问题,封装为同步
+ */
+ syncUploadImage(file) {
+ let _baseUrl = config.baseUrl;
+ return new Promise((resolve, reject) => {
+ wx.uploadFile({
+ url: _baseUrl + "/file/upload", // 上传的服务器接口地址
+ filePath: file,
+ header: {
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
+ 'Authorization': 'Bearer ' + getToken()
+ },
+ name: "file", //上传的所需字段,后端提供
+ formData: {},
+ success: (res) => {
+ // 上传完成操作
+ const data = JSON.parse(res.data)
+ resolve({
+ data: data
+ })
+ },
+ fail: (err) => {
+ //上传失败:修改pedding为reject
+ console.log("访问接口失败", err);
+ wx.showToast({
+ title: "网络出错,上传失败",
+ icon: 'none',
+ duration: 1000
+ });
+ reject(err)
+ }
+ });
+ })
+ },
+
+ returnToPage: function () {
+ wx.redirectTo({
+ url: `../list/index`
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_magusers/add/index.json b/yanzhu-ui-app/miniprogram/pageage/project_magusers/add/index.json
new file mode 100644
index 00000000..6d420795
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_magusers/add/index.json
@@ -0,0 +1,8 @@
+{
+ "usingComponents": {
+ "van-steps": "@vant/weapp/steps/index",
+ "van-notice-bar": "@vant/weapp/notice-bar/index",
+ "van-overlay": "@vant/weapp/overlay/index"
+ },
+ "navigationStyle": "custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_magusers/add/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_magusers/add/index.wxml
new file mode 100644
index 00000000..4b7e43c1
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_magusers/add/index.wxml
@@ -0,0 +1,122 @@
+
+
+
+
+
+ {{form.projectName}}
+
+
+
+
+ 身份证正面
+
+
+
+
+
+
+ 身份证反面
+
+
+
+
+
+
+ 半身清晰照
+
+
+
+
+
+
+
+
+ 人员姓名
+ [不可输入,证件自动识别]
+
+
+
+
+
+
+ 身份证号
+ [不可输入,证件自动识别]
+
+
+
+
+
+
+ 手机号码
+ [不可修改]
+
+
+
+
+
+
+
+
+
+ 使用手机号码登录系统。
+
+
+ 登陆密码
+
+
+
+
+
+ 岗位部门
+
+
+
+
+
+ 岗位级别
+
+
+
+
+
+ 部门岗位
+
+
+
+
+
+ 用户角色
+
+
+
+
+
+
+ {{form.id?'修改':'新增'}}人员信息不进入审核流程、{{form.id?'修改':'新增'}}后立即生效。
+
+
+
+ 取消
+ 提交保存
+
+
+
+
+
+
+ 数据处理中!请稍后...
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_magusers/add/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_magusers/add/index.wxss
new file mode 100644
index 00000000..9febfc43
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_magusers/add/index.wxss
@@ -0,0 +1,11 @@
+.van-steps {
+ background-color: transparent !important;
+ }
+
+ .van-step--horizontal .van-step__circle-container {
+ background-color: transparent !important;
+ }
+
+ .van-steps--horizontal {
+ padding: 10px 20px !important;
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_magusers/info/index.js b/yanzhu-ui-app/miniprogram/pageage/project_magusers/info/index.js
new file mode 100644
index 00000000..7122a32f
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_magusers/info/index.js
@@ -0,0 +1,321 @@
+import config from '../../../config'
+import {
+ getToken
+} from '../../../utils/auth'
+import {
+ editSubUsersPhone,
+ editSubUsersUseStatus,
+ findProSubUsersInfoById
+} from '../../../api/project'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ active: 100,
+ flowNodes: [{
+ text: '信息登记'
+ }, {
+ text: '信息审核'
+ }, {
+ text: '人员入场'
+ }],
+ form: {},
+ newUserPhone:"",
+ isChange: false,
+ imgBaseUrl: config.baseImgUrl
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ if (options && options.id) {
+ //查询数据回填...
+ this.initData(options.id);
+ }
+ },
+
+ /**
+ * 初始化数据
+ * @param {*} id
+ */
+ initData(id) {
+ findProSubUsersInfoById(id).then(userRes => {
+ if (userRes.code == 200 && userRes.data != null) {
+ if (userRes.data.userInfos) {
+ let userInfosJSON = JSON.parse(userRes.data.userInfos);
+ userRes.data.nativePlace = userInfosJSON.nativePlace;
+ userRes.data.nation = userInfosJSON.nation;
+ userRes.data.address = userInfosJSON.address;
+ userRes.data.emergencyContact = userInfosJSON.emergencyContact;
+ userRes.data.contactPhone = userInfosJSON.contactPhone;
+ userRes.data.bankName = userInfosJSON.bankName;
+ userRes.data.bankOffice = userInfosJSON.bankOffice;
+ userRes.data.bankCardNo = userInfosJSON.bankCardNo;
+ userRes.data.cardImgPos = userInfosJSON.cardImgPos;
+ userRes.data.cardImgInv = userInfosJSON.cardImgInv;
+ }
+ if (userRes.data.cardImgPos) {
+ userRes.data.cardImgPos = (this.data.imgBaseUrl + userRes.data.cardImgPos).split(',');
+ }
+ if (userRes.data.cardImgInv) {
+ userRes.data.cardImgInv = (this.data.imgBaseUrl + userRes.data.cardImgInv).split(',');
+ }
+ if (userRes.data.userPicture) {
+ userRes.data.userPicture = (this.data.imgBaseUrl + userRes.data.userPicture).split(',');
+ }
+ if (userRes.data.subDeptPowerPath) {
+ userRes.data.subDeptPowerPath = (this.data.imgBaseUrl + userRes.data.subDeptPowerPath).split(',');
+ }
+ this.setData({
+ active: 100,
+ form: userRes.data
+ });
+ }
+ });
+ },
+
+ /**
+ * 返回上页
+ */
+ returnToPage: function () {
+ wx.redirectTo({
+ url: `../list/index`
+ })
+ },
+
+ /**
+ * 展示图片
+ * @param {*} e
+ */
+ showImg: function (e) {
+ let paths = e.target.dataset.set;
+ let path = [];
+ paths.split(',').forEach(url => {
+ path.push(url);
+ });
+ wx.previewImage({
+ urls: path,
+ current: path[0]
+ })
+ },
+
+ /**
+ * 下载并打开文档
+ * @param {*} e
+ */
+ downFile: function (e) {
+ let path = this.data.form.eduFilePath;
+ wx.downloadFile({
+ // 示例 url,并非真实存在
+ url: config.baseUrl + '/file/download?fileName=' + path,
+ header: {
+ 'Authorization': 'Bearer ' + getToken()
+ },
+ success: function (res) {
+ const filePath = res.tempFilePath
+ let fpt = path.split(".");
+ wx.openDocument({
+ filePath: filePath,
+ fileType: fpt[fpt.length - 1],
+ success: function (res) {
+ console.log('打开文档成功')
+ },
+ fail: function (res) {
+ console.log(res)
+ }
+ })
+ }
+ })
+ },
+
+ /**
+ * 单位入场
+ */
+ submitSubDeptsIn(){
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认班组人员入场?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitSubDeptsUseStatus(0);
+ }
+ }
+ })
+ },
+
+ /**
+ * 单位离场
+ */
+ submitSubDeptsOut(){
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认班组人员离场?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitSubDeptsUseStatus(1);
+ }
+ }
+ })
+ },
+
+ /**
+ * 表单提交
+ */
+ submitSubDeptsUseStatus(status){
+ editSubUsersUseStatus(this.data.form.id,status).then(res =>{
+ if(res.code==200){
+ app.toast("操作成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: `../list/index`,
+ })
+ }, 200)
+ }
+ });
+ },
+
+ /**
+ * 输入联系电话
+ * @param {*} e
+ */
+ inputUserPhone(e) {
+ this.setData({
+ newUserPhone: e.detail.value
+ })
+ },
+
+ /**
+ * 变更手机号
+ */
+ changeUserPhone() {
+ this.setData({
+ isChange: !this.data.isChange
+ });
+ setTimeout(() => {
+ wx.pageScrollTo({
+ scrollTop: 99999, // 滚动到内容区域的高度,即最底部
+ duration: 100 // 滚动的动画持续时间
+ });
+ }, 500)
+ },
+
+ /**
+ *
+ */
+ submitChangePhone(){
+ let {
+ form,
+ newUserPhone
+ } = this.data;
+ if(!newUserPhone){
+ app.toast("请输入新手机号码!")
+ return false;
+ }else{
+ const phonePattern = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
+ if (!phonePattern.test(newUserPhone)) {
+ app.toast("手机号码不正确!");
+ return false;
+ }
+ }
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认变更人员手机号?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitChangePhoneForm();
+ }
+ }
+ })
+ },
+
+ /**
+ * 确定
+ * 变更手机号
+ */
+ submitChangePhoneForm(){
+ let _form = {
+ ...this.data.form
+ };
+ let {
+ newUserPhone
+ } = this.data;
+ _form.userPhone = newUserPhone;
+ _form.cardImgPos = "";
+ _form.cardImgInv = "";
+ _form.userPicture = "";
+ _form.subDeptPowerPath = "";
+ editSubUsersPhone(_form).then(res =>{
+ if(res.code==200){
+ app.toast("变更成功!")
+ this.setData({
+ isChange: !this.data.isChange
+ })
+ this.onLoad({id: _form.id});
+ }
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_magusers/info/index.json b/yanzhu-ui-app/miniprogram/pageage/project_magusers/info/index.json
new file mode 100644
index 00000000..c6d742f6
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_magusers/info/index.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "van-steps": "@vant/weapp/steps/index"
+ },
+ "navigationStyle": "custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_magusers/info/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_magusers/info/index.wxml
new file mode 100644
index 00000000..726f952c
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_magusers/info/index.wxml
@@ -0,0 +1,244 @@
+
+
+
+
+
+ {{form.projectName}}
+
+
+
+
+ 单位类型
+ {{form.subDeptTypeName}}
+
+
+
+
+ 单位名称
+ {{form.subDeptName}}
+
+
+
+
+ 所属班组
+ {{form.subDeptGroupName}}
+
+
+
+
+ 工种类型
+ {{form.craftTypeName}}
+
+
+
+
+ 工种岗位
+
+ {{form.craftPostName}}
+ [班组长]
+
+
+
+
+
+ 身份证件
+
+
+
+
+
+
+
+
+
+
+
+
+ 半身近照
+
+
+
+
+
+
+
+
+
+
+
+ 单位委托书
+
+
+
+
+
+
+
+
+
+
+
+
+ 人员姓名
+
+ {{form.userName}}
+
+
+
+
+
+ 身份证号码
+
+ {{form.cardCode}}
+
+
+
+
+ 所属民族
+ {{form.nation}}
+
+
+
+
+ 籍贯地址
+ {{form.nativePlace}}
+
+
+
+
+ 详细地址
+ {{form.address}}
+
+
+
+
+ 联系电话
+ {{form.userPhone}}
+
+
+
+
+ 紧急联系人
+ {{form.emergencyContact}}
+
+
+
+
+ 紧急联系电话
+ {{form.contactPhone}}
+
+
+
+
+ 开户行名称
+ {{form.bankName}}
+
+
+
+
+ 开户行网点
+ {{form.bankOffice}}
+
+
+
+
+ 工资银行卡号
+ {{form.bankCardNo}}
+
+
+
+ 高血压、心脏病等基础身体健康问题
+
+
+ 无
+ 有
+
+
+
+ 严重呼吸系统疾病、严重心脑血管疾病、肝肾疾病、恶性肿瘤以及药物无法有效控制的高血压和糖尿病等基础性病症状征兆
+
+
+ 无
+ 有
+
+
+
+
+ 安全承诺书
+
+
+ 点击下载安全承诺书
+
+
+
+
+
+
+ 入场状态
+
+ 已入场
+ 已离场
+
+
+
+
+
+ 审批状态
+
+ 待提交
+ 审核中
+ 审核驳回
+ 审核通过
+ 系统免审
+
+
+
+
+
+ 数据来源
+ {{form.createBy}}
+
+
+
+
+ 创建时间
+ {{form.createTime}}
+
+
+
+
+
+
+ 变更手机号码
+
+
+
+ 新手机号码
+
+
+
+
+
+
+
+ 返回取消
+ 变更电话
+ 提交保存
+ 人员离场
+ 人员入场
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_magusers/info/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_magusers/info/index.wxss
new file mode 100644
index 00000000..5f49f05d
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_magusers/info/index.wxss
@@ -0,0 +1,11 @@
+.van-steps {
+ background-color: transparent !important;
+}
+
+.van-step--horizontal .van-step__circle-container {
+ background-color: transparent !important;
+}
+
+.van-steps--horizontal {
+ padding: 10px 20px !important;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_magusers/list/index.js b/yanzhu-ui-app/miniprogram/pageage/project_magusers/list/index.js
new file mode 100644
index 00000000..10df9b16
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_magusers/list/index.js
@@ -0,0 +1,228 @@
+import {
+ getToken
+} from '../../../utils/auth'
+import {
+ subusersList,
+ subusersCount
+} from '../../../api/project'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ addFlag: false,
+ initData: {},
+ pageNum: 1,
+ pageSize: 10000,
+ total: 0,
+ listData: [],
+ activeState: "0",
+ yrcCount: 0,
+ ylcCount: 0,
+ activeName: "0_0",
+ },
+
+ //项目切换 返回值
+ onProjectSelect(e) {
+ let projectId = e.detail.id;
+ let projectName = e.detail.text;
+ app.globalData.useProjectId = projectId;
+ app.globalData.useProjectName = projectName;
+ this.onLoad();
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ this.setData({
+ addFlag: true,
+ initData: {
+ id: app.globalData.useProjectId,
+ text: app.globalData.useProjectName,
+ },
+ pageNum: 1,
+ pageSize: 10000,
+ listData: [],
+ total: 0
+ });
+ //获取数据列表
+ this.getListData();
+ this.getListCount();
+ },
+
+ /**
+ * 添加按钮
+ */
+ skipAdd() {
+ wx.redirectTo({
+ url: `../add/index`,
+ })
+ },
+
+ /**
+ * 获取详情
+ * @param {*} e
+ */
+ getInfo(e) {
+ let _id = e.currentTarget.dataset.set;
+ wx.redirectTo({
+ url: `../info/index?id=${_id}`,
+ })
+ },
+
+ /**
+ * 修改按钮
+ * @param {*} e
+ */
+ editInfo(e) {
+ let _id = e.currentTarget.dataset.set;
+ wx.redirectTo({
+ url: `../add/index?id=${_id}`,
+ })
+ },
+
+ // 手风琴
+ onChange(e) {
+ this.setData({
+ activeName: e.target.dataset.set
+ });
+ },
+
+ /**
+ * 查询数据列表
+ */
+ getListData() {
+ let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&useStatus=" + this.data.activeState + "&activeTags=finished&searchValue=magUsers";
+ subusersList(params).then(res => {
+ if (res.code == 200) {
+ this.setData({
+ total: res.total,
+ listData: this.data.listData.concat(res.rows)
+ })
+ }
+ });
+ },
+
+ /**
+ * 统计数据列表
+ */
+ getListCount() {
+ let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&activeTags=finished&searchValue=magUsers";
+ subusersCount(params).then(res => {
+ if (res.code == 200) {
+ let _yrc = 0,
+ _ylc = 0;
+ res.data.forEach(item => {
+ if (item.useStatus == "0") {
+ _yrc = item.total;
+ } else {
+ _ylc = item.total;
+ }
+ });
+ this.setData({
+ yrcCount: _yrc,
+ ylcCount: _ylc
+ })
+ }
+ });
+ },
+
+ /**
+ * 标签切换
+ */
+ trainJump(e) {
+ let index = e.currentTarget.dataset.index;
+ let nav = "";
+ if (index == 1) {
+ nav = '0';
+ } else {
+ nav = '1';
+ }
+ this.setData({
+ activeState: nav,
+ pageNum: 1,
+ pageSize: 10000,
+ listData: [],
+ });
+ this.getListData();
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到其它页面。*/
+ wx.redirectTo({
+ url: '../../project_more/index',
+ })
+ },
+
+ /**
+ * 滚动到底部
+ */
+ onScrollToLower() {
+ let nal = Math.ceil(this.data.total / this.data.pageSize);
+ if (this.data.pageNum < nal) {
+ this.setData({
+ pageNum: this.data.pageNum + 1
+ });
+ this.getListData();
+ } else {
+ console.log("已经到底了,没有数据可加载!!!");
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_magusers/list/index.json b/yanzhu-ui-app/miniprogram/pageage/project_magusers/list/index.json
new file mode 100644
index 00000000..849b534a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_magusers/list/index.json
@@ -0,0 +1,9 @@
+{
+ "usingComponents": {
+ "van-collapse": "@vant/weapp/collapse",
+ "van-collapse-item": "@vant/weapp/collapse-item",
+ "van-cell-group": "@vant/weapp/cell-group",
+ "van-cell": "@vant/weapp/cell"
+ },
+ "navigationStyle": "custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_magusers/list/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_magusers/list/index.wxml
new file mode 100644
index 00000000..9304b3cd
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_magusers/list/index.wxml
@@ -0,0 +1,61 @@
+
+
+
+
+ 已入场({{yrcCount}})
+ 已离场({{ylcCount}})
+
+
+
+
+
+
+
+ {{index < 10 ?'0'+(index+1):(index+1)}}
+
+ {{item.subDeptName}}
+
+
+
+
+
+
+
+
+
+ 修改
+
+
+
+
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+ 新增
+
+
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_magusers/list/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_magusers/list/index.wxss
new file mode 100644
index 00000000..d73e4827
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_magusers/list/index.wxss
@@ -0,0 +1,19 @@
+/* pages/project_subDepts/index.wxss */
+.module_see_info_edit {
+ color: #91ef4a;
+ font-weight: 600;
+}
+
+.module_see_info_edit .edit_text {
+ padding-left: 10rpx;
+}
+
+.van-cell{
+ color: #89a3ee !important;
+ background-color: #32374c !important;
+}
+
+.van-collapse-item__content{
+ padding: 0;
+ background-color: transparent !important;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_more/index.js b/yanzhu-ui-app/miniprogram/pageage/project_more/index.js
new file mode 100644
index 00000000..bd4032a5
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_more/index.js
@@ -0,0 +1,161 @@
+import {
+ getToken,
+ getUserInfo
+} from '../../utils/auth'
+import {
+ findUserMenuList
+} from '../../api/publics'
+import {
+ findMyTask
+} from '../../api/flowable'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ active: 1,
+ projectId: '',
+ projectName: '',
+ subDeptUserInfo: {},
+ menuList: [],
+ initData: {},
+ aqglDb: 0,
+ zlglDb: 0,
+ todoDB: 0,
+ fbdwDB: 0,
+ fbrtDB: 0,
+ aqyhDB: 0,
+ zlyhDB: 0
+ },
+
+
+ //项目切换 返回值
+ onProjectSelect(e) {
+ let projectId = e.detail.id;
+ let projectName = e.detail.text;
+ app.globalData.useProjectId = projectId;
+ app.globalData.useProjectName = projectName;
+ this.onLoad();
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../pages/login/login',
+ })
+ }
+ const proUserInfo = getUserInfo();
+ this.setData({
+ projectId: app.globalData.useProjectId,
+ projectName: app.globalData.useProjectName,
+ initData: {
+ id: app.globalData.useProjectId,
+ text: app.globalData.useProjectName,
+ },
+ active: proUserInfo.projectUserInfo.subDeptType == '1' ? 4 : 1,
+ subDeptUserInfo: proUserInfo.projectUserInfo,
+ });
+ //用户权限菜单
+ this.getUserMenuList(app.globalData.useProjectId);
+ this.awaitTask();
+
+ },
+
+ /**
+ * 查询功能菜单
+ * @param {*} proId
+ */
+ getUserMenuList: function (proId) {
+ findUserMenuList(proId, 'gdgn').then(res => {
+ if (res.code == 200) {
+ this.setData({
+ menuList: res.data
+ })
+ }
+ });
+ },
+
+ goMenu: function (event) {
+ let _url = event.currentTarget.dataset.url;
+ if (!_url) {
+ app.toast("正在建设中...")
+ return false;
+ }
+ wx.setStorageSync('nav-menu', "xmgl");
+ wx.redirectTo({
+ url: _url
+ })
+ //跳转到其它小程序
+ //wx.navigateToMiniProgram({
+ // appId: 'wx7c39a25db91228f7',
+ // path: 'pages/tabbar/order-new/index?type=0'
+ //})
+ },
+
+ // 底部导航
+ onChange(event) {
+ // event.detail 的值为当前选中项的索引
+ this.setData({
+ active: event.detail
+ });
+ },
+
+ //跳转到项目概况
+ XMGK: function () {
+ wx.setStorageSync('nav-menu', "xmgk");
+ wx.redirectTo({
+ url: '../project_info/index'
+ })
+ },
+
+ //跳转到安全管理
+ AQGL: function () {
+ wx.setStorageSync('nav-menu', "aqgl");
+ wx.redirectTo({
+ url: '../project_safety/index'
+ })
+ },
+
+ //跳转到质量管理
+ ZLGL: function () {
+ wx.setStorageSync('nav-menu', "zlgl");
+ wx.redirectTo({
+ url: '../project_quality/index'
+ })
+ },
+
+ //跳转到进度管理
+ JDGL: function () {
+ wx.setStorageSync('nav-menu', "xmgl");
+ wx.redirectTo({
+ url: '../project_schedule/list/index'
+ })
+ },
+
+ /**
+ * 统计代办
+ */
+ awaitTask() {
+ let param = "proId=" + app.globalData.useProjectId;
+ findMyTask(param).then(res => {
+ if (res.code == 200) {
+ let proUserInfo = this.data.subDeptUserInfo;
+ this.setData({
+ todoDb: proUserInfo.subDeptType == "1" ? (res.data.dwsh + res.data.rysh) : res.data.todo,
+ fbdwDB: res.data.dwsh,
+ fbrtDB: res.data.rysh,
+ aqglDb: proUserInfo.subDeptType == "1" ? res.data.aqgl : 0,
+ zlglDb: proUserInfo.subDeptType == "1" ? res.data.zlgl : 0,
+ aqyhDB: res.data.aqgl,
+ zlyhDB: res.data.zlgl,
+ })
+ }
+ });
+ },
+
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_more/index.json b/yanzhu-ui-app/miniprogram/pageage/project_more/index.json
new file mode 100644
index 00000000..45980386
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_more/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-tabbar": "@vant/weapp/tabbar",
+ "van-tabbar-item": "@vant/weapp/tabbar-item"
+ },
+ "navigationStyle":"custom"
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_more/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_more/index.wxml
new file mode 100644
index 00000000..1f107353
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_more/index.wxml
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+
+ {{fbdwDB}}
+ {{fbrtDB}}
+ {{aqyhDB}}
+ {{zlyhDB}}
+
+ {{item.menuName}}
+
+
+
+
+
+
+
+
+
+
+ 项目概况
+
+
+
+
+
+ 安全管理
+ {{aqglDB}}
+
+
+
+
+
+ 质量管理
+ {{zhglDB}}
+
+
+
+
+
+ 进度管理
+
+
+
+
+
+ 项目管理
+ {{todoDb}}
+
+
+
+
+
+
+
+ 项目概况
+
+
+
+
+
+ 项目管理
+ {{todoDb}}
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_more/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_more/index.wxss
new file mode 100644
index 00000000..be16fedc
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_more/index.wxss
@@ -0,0 +1,23 @@
+.more_max{
+ padding:10rpx 30rpx 30rpx;
+ }
+ .more_manage{
+ border-radius: 10rpx;
+ margin-top: 50rpx;
+ }
+ .gd_max{
+ padding:10rpx 50rpx 0;
+ }
+ .gd_min{
+ padding: 30rpx 0;
+ text-align: center;
+ }
+ .gd_min image{
+ width: 150rpx;
+ height: 150rpx;
+ }
+ .gd_min view{
+ padding: 10rpx;
+ color: #89a4eb;
+ }
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/add/index.js b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/add/index.js
new file mode 100644
index 00000000..3ef625d0
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/add/index.js
@@ -0,0 +1,422 @@
+import config from '../../../config'
+import {
+ getToken,
+ getUserInfo
+} from '../../../utils/auth'
+import {
+ findDictCache
+} from '../../../api/publics'
+import {
+ findProjectDeptUsers
+} from '../../../api/project'
+import {
+ add,
+ findMyLastProblemmodify
+} from '../../../api/problemmodify'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ maxDate: new Date(2088, 1, 1).getTime(),
+ minDate: new Date().getTime()+(3600*48*1000),
+ type: "",
+ typeName: "",
+ problemTypeList: [],
+ problemSubTypeList: [],
+ imageInfoData: [],
+ form: {
+ projectId: "",
+ projectName: "",
+ infoType: "",
+ problemType: "1",
+ dangerType: "1",
+ workParts: "",
+ changeInfo: "",
+ nickedTime: "",
+ lordSent: "",
+ lordSentUser: "",
+ recheckSend: "",
+ recheckSendUser: "",
+ copySend: "",
+ copySendUser: ""
+ },
+ active: 1,
+ flowNodes: [{
+ text: '开始'
+ }, {
+ text: '提交隐患'
+ }, {
+ text: '隐患整改'
+ }, {
+ text: '隐患复检'
+ }, {
+ text: '结束'
+ }],
+ lordSentList: [],
+ copySendList: [],
+ checkUserList: [],
+ loadShow: false,
+ showHis: false,
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ const proUserInfo = getUserInfo();
+ this.setData({
+ type: options.type,
+ typeName: options.type == 1 ? "质量" : "安全",
+ "form.comId": proUserInfo.projectUserInfo.comId,
+ "form.projectId": app.globalData.useProjectId,
+ "form.projectName": app.globalData.useProjectName,
+ "form.infoType": options.type,
+ "form.recheckSend": proUserInfo.userId,
+ "form.recheckSendUser": proUserInfo.nickName
+ });
+ this.getDictCache();
+ this.getHisInfo(options.type);
+ this.getProjectUsers();
+ },
+
+ /**
+ * 获取字典缓存数据
+ */
+ getDictCache() {
+ // 初始化检查类型
+ findDictCache("ssp_proble_type").then(res => {
+ if (res.code == 200) {
+ let list = [];
+ res.data.forEach(item => {
+ list.push({
+ "id": item.dictValue,
+ "text": item.dictLabel
+ });
+ });
+ this.setData({
+ problemTypeList: list
+ });
+ }
+ });
+
+ //初始化隐患类型
+ findDictCache("ssp_proble_sub_type").then(res => {
+ if (res.code == 200) {
+ let list = [];
+ res.data.forEach(item => {
+ list.push({
+ "id": item.dictValue,
+ "text": item.dictLabel
+ });
+ });
+ this.setData({
+ problemSubTypeList: list
+ });
+ }
+ });
+ },
+
+ /**
+ * 查询项目人员数据
+ * 获取项目所有人员,在页面组装数据...
+ */
+ getProjectUsers() {
+ findProjectDeptUsers(app.globalData.useProjectId).then(res => {
+ if (res.code == 200) {
+ this.setData({
+ lordSentList: res.data.lordSentList,
+ copySendList: res.data.copySendList,
+ checkUserList: res.data.checkUserList,
+ });
+ }
+ });
+ },
+
+ /**
+ * 这里查询当前登录人上次提交隐患
+ * 自动填充整改人,复检人,抄送人
+ * @param {*} type
+ */
+ getHisInfo(type) {
+ findMyLastProblemmodify(app.globalData.useProjectId, type).then(res => {
+ if (res.code == 200 && res.data && res.data.length > 0) {
+ this.setData({
+ showHis: true,
+ "form.lordSent": res.data[0].lordSent,
+ "form.lordSentUser": res.data[0].lordSentUser,
+ "form.recheckSend": res.data[0].recheckSend,
+ "form.recheckSendUser": res.data[0].recheckSendUser,
+ "form.copySend": res.data[0].copySend,
+ "form.copySendUser": res.data[0].copySendUser
+ })
+ }
+ });
+ },
+
+ //隐患描述
+ onInputWorkParts(e) {
+ this.setData({
+ "form.workParts": e.detail.value
+ })
+ },
+
+ //整改要求
+ onInputChangeInfoValue(e) {
+ this.setData({
+ "form.changeInfo": e.detail.value
+ })
+ },
+
+ //验收时间
+ onInputTime(e) {
+ this.setData({
+ "form.nickedTime": e.detail
+ })
+ },
+
+ // 上传图片
+ onImagesArr(e) {
+ this.setData({
+ imageInfoData: e.detail
+ })
+ },
+
+ //添加整改人
+ onAddLordSent(e) {
+ if (e.detail.length > 0) {
+ this.setData({
+ "form.lordSent": e.detail[0].userId,
+ "form.lordSentUser": e.detail[0].userName
+ })
+ }
+ },
+
+ //添加抄送人
+ onAddCopySend(e) {
+ if (e.detail.length > 0) {
+ let _userIds = "";
+ let _userNames = "";
+ e.detail.forEach(it => {
+ _userIds += "," + it.userId;
+ _userNames += "," + it.userName;
+ });
+ this.setData({
+ "form.copySend": _userIds.substring(1),
+ "form.copySendUser": _userNames.substring(1)
+ })
+ } else {
+ this.setData({
+ "form.copySend": "",
+ "form.copySendUser": ""
+ })
+ }
+ },
+
+ //添加复检人
+ onAddRecheckSend(e) {
+ if (e.detail.length > 0) {
+ this.setData({
+ "form.recheckSend": e.detail[0].userId,
+ "form.recheckSendUser": e.detail[0].userName
+ })
+ }
+ },
+
+ //取消页面
+ cancelSaveView() {
+ this.returnToPage()
+ },
+
+ /**
+ * 数据保存
+ */
+ submitSave() {
+ let _form = {
+ ...this.data.form
+ };
+ let {
+ imageInfoData
+ } = this.data
+ //数据效验
+ if (!_form.comId || !_form.projectId) {
+ app.toast("数据异常,请刷新页面重试!")
+ return false;
+ }
+ if (imageInfoData.length == 0) {
+ app.toast("请上传隐患现场图片!")
+ return false;
+ }
+ if (!_form.problemType) {
+ app.toast("请选择检查类型!")
+ return false;
+ }
+ if (!_form.dangerType) {
+ app.toast("请选择隐患类型!")
+ return false;
+ }
+ if (!_form.workParts) {
+ app.toast("请填写隐患描述!")
+ return false;
+ }
+ if (!_form.changeInfo) {
+ app.toast("请填写隐患整改要求!")
+ return false;
+ }
+ if (!_form.nickedTime) {
+ app.toast("请选择整改截至时间!")
+ return false;
+ }
+ if (!_form.lordSent || !_form.lordSentUser) {
+ app.toast("请选择整改人!")
+ return false;
+ }
+ if (!_form.recheckSend || !_form.recheckSendUser) {
+ app.toast("请选择复检人!")
+ return false;
+ }
+ if (!_form.copySend || !_form.copySendUser) {
+ app.toast("请选择抄送人!")
+ return false;
+ }
+ let fileUrls = [];
+ this.setData({
+ loadShow: true
+ });
+ let that = this;
+ imageInfoData.forEach(async (item) => {
+ //这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
+ let obj = await that.syncUploadImage(item);
+ fileUrls.push(obj.data.data.url);
+ //验证图片上传完毕
+ if (fileUrls.length == imageInfoData.length) {
+ _form.smarkUrl = fileUrls.toString();
+ add(_form).then(res => {
+ this.setData({
+ loadShow: false
+ });
+ if (res.code == 200) {
+ app.toast("新增数据成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: `../list/index?type=${this.data.type}`,
+ })
+ }, 200)
+ }
+ });
+ }
+ })
+ },
+
+ //选择检查类型
+ onSelectProblemType(e) {
+ this.setData({
+ "form.problemType": e.detail.id
+ })
+ },
+
+ //选择隐患类型
+ onSelectDangerType(e) {
+ this.setData({
+ "form.dangerType": e.detail.id
+ })
+ },
+
+ /**
+ * 这里考虑上传图片异步问题,封装为同步
+ */
+ syncUploadImage(file) {
+ let _baseUrl = config.baseUrl;
+ return new Promise((resolve, reject) => {
+ wx.uploadFile({
+ url: _baseUrl + "/file/upload", // 上传的服务器接口地址
+ filePath: file,
+ header: {
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
+ 'Authorization': 'Bearer ' + getToken()
+ },
+ name: "file", //上传的所需字段,后端提供
+ formData: {},
+ success: (res) => {
+ // 上传完成操作
+ const data = JSON.parse(res.data)
+ resolve({
+ data: data
+ })
+ },
+ fail: (err) => {
+ //上传失败:修改pedding为reject
+ console.log("访问接口失败", err);
+ wx.showToast({
+ title: "网络出错,上传失败",
+ icon: 'none',
+ duration: 1000
+ });
+ reject(err)
+ }
+ });
+ })
+ },
+
+ returnToPage: function () {
+ wx.redirectTo({
+ url: `../list/index?type=${this.data.type}`
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/add/index.json b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/add/index.json
new file mode 100644
index 00000000..70315869
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/add/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-steps": "@vant/weapp/steps/index",
+ "van-overlay": "@vant/weapp/overlay/index"
+ },
+ "navigationStyle":"custom"
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/add/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/add/index.wxml
new file mode 100644
index 00000000..fd8197e5
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/add/index.wxml
@@ -0,0 +1,93 @@
+
+
+
+
+
+ {{form.projectName}}
+
+
+ 隐患图片
+
+
+
+
+
+ 检查类型
+
+
+
+
+
+ 隐患类型
+
+
+
+
+
+ 隐患描述
+
+
+
+
+
+ 整改要求
+
+
+
+
+
+ 整改截至时间
+
+
+
+
+
+ 整改人
+
+
+
+
+
+
+ 复检人
+
+
+
+
+
+
+ 抄送人
+
+
+
+
+
+
+ 已自动填充上次隐患的整改人,复检人,抄送人。
+
+
+
+ 取消
+ 提交隐患
+
+
+
+
+
+
+ 数据处理中!请稍后...
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/add/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/add/index.wxss
new file mode 100644
index 00000000..9b5e1efb
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/add/index.wxss
@@ -0,0 +1,18 @@
+.van-popup{
+ background: none !important;
+}
+.van-image__img{
+ border-radius: 10rpx !important;
+}
+
+.van-steps {
+ background-color: transparent !important;
+ }
+
+ .van-step--horizontal .van-step__circle-container {
+ background-color: transparent !important;
+ }
+
+ .van-steps--horizontal {
+ padding: 10px 20px !important;
+ }
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/check/index.js b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/check/index.js
new file mode 100644
index 00000000..2b4b30cf
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/check/index.js
@@ -0,0 +1,266 @@
+import config from '../../../config'
+import {
+ getToken
+} from '../../../utils/auth'
+import {
+ findInfo,
+ findAuditInfos,
+ checkProblemmodify
+} from '../../../api/problemmodify'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ infoData: {},
+ loadShow: false,
+ auditInfo1: {},
+ auditInfo3: {},
+ auditInfo4: {},
+ form: {},
+ imageInfoData: [],
+ imageList: [],
+ auditImageList: [],
+ active: 3,
+ flowNodes: [{
+ text: '开始'
+ }, {
+ text: '提交隐患'
+ }, {
+ text: '隐患整改'
+ }, {
+ text: '隐患复检'
+ }, {
+ text: '结束'
+ }]
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ this.setData({
+ type: options.type,
+ typeName: options.type == 1 ? "质量" : "安全",
+ });
+ this.getInfo(options.id);
+ this.getAuditInfos(options.id);
+ },
+
+ /**
+ * 查详隐患详情
+ * @param {*} id
+ */
+ getInfo(id) {
+ findInfo(id).then(res => {
+ if (res.code == 200) {
+ let urls = [];
+ if (res.data.smarkUrl) {
+ res.data.smarkUrl.split(',').forEach(item => {
+ urls.push(config.baseImgUrl + item);
+ });
+ }
+ this.setData({
+ infoData: res.data,
+ imageList: urls,
+ "form.mainId": res.data.id,
+ })
+ }
+ })
+ },
+
+ /**
+ * 查详隐患流程
+ * @param {*} id
+ */
+ getAuditInfos(id) {
+ findAuditInfos(id).then(res => {
+ if (res.code == 200 && res.data.length > 0) {
+ res.data.forEach(item => {
+ if (item.processState == "0") {
+ let urls = [];
+ if (item.files.length > 0) {
+ item.files.forEach(_file => {
+ urls.push(config.baseImgUrl + _file.fileUrl);
+ });
+ }
+ this.setData({
+ auditInfo1: item,
+ auditImageList: urls
+ })
+ } else if (item.processState == "1") {
+ this.setData({
+ auditInfo4: item
+ })
+ } else if (item.processState == "2") {
+ this.setData({
+ auditInfo3: item
+ })
+ }
+ });
+ }
+ });
+ },
+
+ //取消页面
+ cancelSaveView() {
+ this.returnToPage()
+ },
+
+ //保存
+ onSubmitSave(status) {
+ let _form = {
+ ...this.data.form
+ };
+ _form.processState = status;
+ this.setData({
+ loadShow: true
+ });
+ checkProblemmodify(_form).then(res =>{
+ this.setData({
+ loadShow: false
+ });
+ if (res.code == 200) {
+ app.toast("复检隐患成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: `../list/index?type=${this.data.type}`
+ })
+ }, 200)
+ }
+ });
+ },
+
+ //审核驳回
+ onRejectSave() {
+ let that = this;
+ if (this.data.form.opinion) {
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认隐患复检驳回?',
+ success: function (sm) {
+ if (sm.confirm) {
+ // 用户点击了确定 可以调用了
+ that.onSubmitSave(2);
+ } else if (sm.cancel) {
+ console.log('用户点击取消');
+ }
+ }
+ })
+ } else {
+ app.toast("请填写整改驳回意见!")
+ return false;
+ }
+ },
+
+ //审核通过
+ onPassSave() {
+ let that = this;
+ if (!this.data.form.opinion) {
+ this.setData({
+ "form.opinion": "审核通过!"
+ })
+ }
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认隐患复检通过?',
+ success: function (sm) {
+ if (sm.confirm) {
+ // 用户点击了确定 可以调用了
+ that.onSubmitSave(1);
+ } else if (sm.cancel) {
+ console.log('用户点击取消');
+ }
+ }
+ })
+ },
+
+ //展示图片
+ showImg: function (e) {
+ let img = e.target.dataset.set;
+ wx.previewImage({
+ urls: img.split(','),
+ current: 0
+ })
+ },
+
+ returnToPage: function () {
+ wx.redirectTo({
+ url: `../list/index?type=${this.data.type}`
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ // 审核意见
+ onInputOpinion(e) {
+ this.setData({
+ "form.opinion": e.detail.value
+ })
+ },
+
+ // list 上传图片
+ onImagesArr(e) {
+ var data = this.data.imageInfoData
+ data = e.detail
+ this.setData({
+ imageInfoData: data
+ })
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/check/index.json b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/check/index.json
new file mode 100644
index 00000000..8b79f9ef
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/check/index.json
@@ -0,0 +1,8 @@
+{
+ "usingComponents": {
+ "van-popup": "@vant/weapp/popup/index",
+ "van-steps": "@vant/weapp/steps/index",
+ "van-overlay": "@vant/weapp/overlay/index"
+ },
+ "navigationStyle": "custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/check/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/check/index.wxml
new file mode 100644
index 00000000..fe261c8c
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/check/index.wxml
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+ {{infoData.projectName}}
+
+
+
+
+ 隐患图片
+
+
+
+
+
+
+
+
+
+ 问题类型
+
+ {{infoData.problemTypeName}}
+ {{infoData.problemTypeName}}
+
+
+
+
+
+ 隐患类型
+ {{infoData.dangerTypeName}}
+
+
+
+
+ 隐患描述
+ {{infoData.workParts}}
+
+
+
+
+ 整改要求
+ {{infoData.changeInfo}}
+
+
+
+
+ 检查人
+ {{infoData.createUserName}}
+
+
+
+
+ 检查时间
+ {{infoData.createTime}}
+
+
+
+
+ 整改人
+ {{infoData.lordSentUser}}
+
+
+
+
+ 复检人
+ {{infoData.recheckSendUser}}
+
+
+
+
+ 抄送人
+ {{infoData.copySendUser}}
+
+
+
+
+ 截至时间
+ {{infoData.nickedTime}}
+
+
+
+
+
+
+
+ 隐患整改
+
+
+
+
+ 整改说明
+ {{auditInfo1.opinion}}
+
+
+
+
+ 整改后图片
+
+
+
+
+
+
+
+
+
+
+
+ 隐患复检意见
+
+
+
+
+
+
+
+
+
+
+ 整改驳回
+ 整改通过
+
+
+
+
+
+
+ 数据处理中!请稍后...
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/check/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/check/index.wxss
new file mode 100644
index 00000000..cd1a9e59
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/check/index.wxss
@@ -0,0 +1,34 @@
+.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 8px 0;
+ float: left;
+ }
+ .in-img-div image{
+ width: 180rpx;
+ height: 180rpx;
+ border-radius: 15rpx;
+ position: relative;
+ }
+
+ .van-steps {
+ background-color: transparent !important;
+ }
+
+ .van-step--horizontal .van-step__circle-container {
+ background-color: transparent !important;
+ }
+
+ .van-steps--horizontal {
+ padding: 10px 20px !important;
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/draft/index.js b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/draft/index.js
new file mode 100644
index 00000000..7c912362
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/draft/index.js
@@ -0,0 +1,350 @@
+import config from '../../../config'
+import {
+ getToken,
+ getUserInfo
+} from '../../../utils/auth'
+import {
+ findDictCache
+} from '../../../api/publics'
+import {
+ findProjectDeptUsers
+} from '../../../api/project'
+import {
+ addDraft,
+ findMyLastProblemmodify
+} from '../../../api/problemmodify'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ type: "",
+ typeName: "",
+ problemTypeList: [],
+ form: {
+ projectId: "",
+ projectName: "",
+ infoType: "",
+ problemType: "1",
+ lordSent: "",
+ lordSentUser: "",
+ },
+ active: 1,
+ flowNodes: [{
+ text: '开始'
+ }, {
+ text: '提交隐患'
+ }, {
+ text: '隐患整改'
+ }, {
+ text: '隐患复检'
+ }, {
+ text: '结束'
+ }],
+ lordSentList: [],
+ loadShow: false,
+ showHis: false,
+ inspectInfoData: [{
+ image_upload: []
+ }]
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ const proUserInfo = getUserInfo();
+ this.setData({
+ type: options.type,
+ typeName: options.type == 1 ? "质量" : "安全",
+ "form.comId": proUserInfo.projectUserInfo.comId,
+ "form.projectId": app.globalData.useProjectId,
+ "form.projectName": app.globalData.useProjectName,
+ "form.infoType": options.type
+ });
+ this.getDictCache();
+ this.getHisInfo(options.type);
+ this.getProjectUsers();
+ },
+
+ /**
+ * 获取字典缓存数据
+ */
+ getDictCache() {
+ // 初始化检查类型
+ findDictCache("ssp_proble_type").then(res => {
+ if (res.code == 200) {
+ let list = [];
+ res.data.forEach(item => {
+ list.push({
+ "id": item.dictValue,
+ "text": item.dictLabel
+ });
+ });
+ this.setData({
+ problemTypeList: list
+ });
+ }
+ });
+ },
+
+ /**
+ * 查询项目人员数据
+ * 获取项目所有人员,在页面组装数据...
+ */
+ getProjectUsers() {
+ findProjectDeptUsers(app.globalData.useProjectId).then(res => {
+ if (res.code == 200) {
+ this.setData({
+ lordSentList: res.data.lordSentList
+ });
+ }
+ });
+ },
+
+ /**
+ * 这里查询当前登录人上次提交隐患
+ * 自动填充整改人,复检人,抄送人
+ * @param {*} type
+ */
+ getHisInfo(type) {
+ findMyLastProblemmodify(app.globalData.useProjectId, type).then(res => {
+ if (res.code == 200 && res.data && res.data.length > 0) {
+ this.setData({
+ showHis: true,
+ "form.lordSent": res.data[0].lordSent,
+ "form.lordSentUser": res.data[0].lordSentUser
+ })
+ }
+ });
+ },
+
+ // 上传图片
+ onImagesArr(e) {
+ var index = e.currentTarget.dataset.index
+ var data = this.data.inspectInfoData
+ data[index].image_upload = e.detail
+ this.setData({
+ inspectInfoData: data
+ })
+ },
+
+ //添加整改人
+ onAddLordSent(e) {
+ if (e.detail.length > 0) {
+ this.setData({
+ "form.lordSent": e.detail[0].userId,
+ "form.lordSentUser": e.detail[0].userName
+ })
+ }
+ },
+
+ // 取消页面
+ cancelSaveView() {
+ this.returnToPage()
+ },
+
+ // 保存
+ submitSave() {
+ let _form = {
+ ...this.data.form
+ };
+ let {
+ inspectInfoData
+ } = this.data
+ //数据效验
+ if (!_form.comId || !_form.projectId) {
+ app.toast("数据异常,请刷新页面重试!");
+ return false;
+ }
+ if (!_form.problemType) {
+ app.toast("请选择检查类型!");
+ return false;
+ }
+ if (!_form.lordSent || !_form.lordSentUser) {
+ app.toast("请选择整改人!");
+ return false;
+ }
+
+ if (inspectInfoData.length > 0) {
+ for (let i = 0; i < inspectInfoData.length; i++) {
+ if (inspectInfoData[i].image_upload.length == 0) {
+ app.toast("请上传问题“" + (i + 1) + "”的隐患图片或删除问题项!");
+ return false;
+ }
+ }
+ }
+ this.setData({
+ loadShow: true
+ })
+ let fileUrls = [];
+ let that = this;
+ inspectInfoData.forEach(async (item) => {
+ let beforeCheckUrl = [];
+ item.image_upload.forEach(async (itFile) => {
+ //这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
+ let obj = await that.syncUploadImage(itFile);
+ beforeCheckUrl.push(obj.data.data.url);
+ if (beforeCheckUrl.length >= item.image_upload.length) {
+ fileUrls.push(beforeCheckUrl);
+ }
+ //验证图片上传完毕
+ if (fileUrls.length >= inspectInfoData.length) {
+ _form.smarkUrls = fileUrls;
+ addDraft(_form).then(res => {
+ this.setData({
+ loadShow: false
+ });
+ if (res.code == 200) {
+ app.toast("新增数据成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: `../list/index?type=${this.data.type}`,
+ })
+ }, 200);
+ }
+ });
+ }
+ });
+ })
+ },
+
+ /**
+ * 这里考虑上传图片异步问题,封装为同步
+ */
+ syncUploadImage(file) {
+ let _baseUrl = config.baseUrl;
+ return new Promise((resolve, reject) => {
+ wx.uploadFile({
+ url: _baseUrl + "/file/upload", // 上传的服务器接口地址
+ filePath: file,
+ header: {
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
+ 'Authorization': 'Bearer ' + getToken()
+ },
+ name: "file", //上传的所需字段,后端提供
+ formData: {},
+ success: (res) => {
+ // 上传完成操作
+ const data = JSON.parse(res.data)
+ resolve({
+ data: data
+ })
+ },
+ fail: (err) => {
+ //上传失败:修改pedding为reject
+ console.log("访问接口失败", err);
+ wx.showToast({
+ title: "网络出错,上传失败",
+ icon: 'none',
+ duration: 1000
+ });
+ reject(err)
+ }
+ });
+ })
+ },
+
+ /**
+ * 选择问题类型
+ * @param {*} e
+ */
+ onSelectProblemType(e) {
+ this.setData({
+ "form.problemType": e.detail.id,
+ })
+ },
+
+ returnToPage: function () {
+ if (wx.getStorageSync('nav-menu') == "list") {
+ wx.redirectTo({
+ url: `../list/index?type=${this.data.type}`
+ })
+ } else {
+ wx.redirectTo({
+ url: `../list/index?type=${this.data.type}`
+ })
+ }
+ },
+
+ //新增问题
+ onNewIssues() {
+ var data = this.data.inspectInfoData
+ if (data.length == 5) {
+ app.toast("一次最多只能提交5个问题!");
+ return false;
+ }
+ data.push({
+ image_upload: []
+ })
+ this.setData({
+ inspectInfoData: data
+ })
+ },
+
+ //删除
+ onNewIssuesDelete(e) {
+ var index = e.currentTarget.dataset.index
+ var data = this.data.inspectInfoData
+ data.splice(index, 1)
+ this.setData({
+ inspectInfoData: data
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/draft/index.json b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/draft/index.json
new file mode 100644
index 00000000..cb583d99
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/draft/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-steps": "@vant/weapp/steps/index",
+ "van-overlay": "@vant/weapp/overlay/index"
+ },
+ "navigationStyle": "custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/draft/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/draft/index.wxml
new file mode 100644
index 00000000..f3aa47de
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/draft/index.wxml
@@ -0,0 +1,113 @@
+
+
+
+
+
+ {{form.projectName}}
+
+
+ 检查类型
+
+
+
+
+
+ 整改人员
+
+
+
+
+
+
+ 已自动填充上次选择的隐患整改人员。
+
+
+
+ 问题 {{index + 1}}
+ 删除
+
+
+ 隐患图片
+
+
+
+
+
+
+ 新增问题
+
+
+ 草稿添加的数据在电脑端提交后生效!
+
+
+
+ 取消
+ 保存草稿
+
+
+
+
+
+
+ 数据处理中!请稍后...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/draft/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/draft/index.wxss
new file mode 100644
index 00000000..71dc6876
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/draft/index.wxss
@@ -0,0 +1,19 @@
+.van-popup {
+ background: none !important;
+}
+
+.van-image__img {
+ border-radius: 10rpx !important;
+}
+
+.van-steps {
+ background-color: transparent !important;
+}
+
+.van-step--horizontal .van-step__circle-container {
+ background-color: transparent !important;
+}
+
+.van-steps--horizontal {
+ padding: 10px 20px !important;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/info/index.js b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/info/index.js
new file mode 100644
index 00000000..078d624a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/info/index.js
@@ -0,0 +1,232 @@
+import config from '../../../config'
+import {
+ getToken,
+ getUserInfo
+} from '../../../utils/auth'
+import {
+ remove,
+ findInfo,
+ findAuditInfos
+} from '../../../api/problemmodify'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ infoData: {},
+ auditInfo1: {},
+ auditInfo3: {},
+ auditInfo4: {},
+ showDel: false,
+ imageList: [],
+ auditImageList: [],
+ proUserInfo: {},
+ active: 100,
+ flowNodes: [{
+ text: '开始'
+ }, {
+ text: '提交隐患'
+ }, {
+ text: '隐患整改'
+ }, {
+ text: '隐患复检'
+ }, {
+ text: '结束'
+ }]
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ const proUserInfo = getUserInfo();
+ this.setData({
+ proUserInfo,
+ type: options.type,
+ typeName: options.type == 1 ? "质量" : "安全",
+ });
+ this.getInfo(options.id);
+ this.getAuditInfos(options.id);
+ },
+
+ /**
+ * 查详隐患详情
+ * @param {*} id
+ */
+ getInfo(id) {
+ findInfo(id).then(res => {
+ if (res.code == 200) {
+ let state = this.data.active;
+ if (res.data.checkState == "0") {
+ state = 2;
+ } else if (res.data.checkState == "1") {
+ state = 3;
+ } else if (res.data.checkState == "3") {
+ state = 2;
+ }
+ this.setData({
+ active: state
+ })
+ let urls = [];
+ if (res.data.smarkUrl) {
+ res.data.smarkUrl.split(',').forEach(item => {
+ urls.push(config.baseImgUrl + item);
+ });
+ }
+ this.setData({
+ infoData: res.data,
+ imageList: urls
+ })
+ //判断当前能否删除
+ if (res.data.checkState != 4 && res.data.createUser == this.data.proUserInfo.userId) {
+ this.setData({
+ showDel: true
+ })
+ }
+ }
+ })
+ },
+
+ /**
+ * 查详隐患流程
+ * @param {*} id
+ */
+ getAuditInfos(id) {
+ findAuditInfos(id).then(res => {
+ if (res.code == 200 && res.data.length > 0) {
+ res.data.forEach(item => {
+ if (item.processState == "0") {
+ let urls = [];
+ if (item.files.length > 0) {
+ item.files.forEach(_file => {
+ urls.push(config.baseImgUrl + _file.fileUrl);
+ });
+ }
+ this.setData({
+ auditInfo1: item,
+ auditImageList: urls
+ })
+ } else if (item.processState == "1") {
+ this.setData({
+ auditInfo4: item
+ })
+ } else if (item.processState == "2") {
+ this.setData({
+ auditInfo3: item
+ })
+ }
+ });
+ }
+ });
+ },
+
+ /**
+ * 点击删除
+ */
+ onDelete() {
+ let that = this
+ wx.showModal({
+ title: '提示',
+ content: '是否确定删除当前隐患数据?',
+ success: function (sm) {
+ if (sm.confirm) {
+ // 用户点击了确定 可以调用了
+ that.submitDelete();
+ } else if (sm.cancel) {
+ console.log('用户点击取消');
+ }
+ }
+ })
+ },
+
+ /**
+ * 提交删除
+ */
+ submitDelete() {
+ let {
+ infoData
+ } = this.data
+ remove(infoData.id).then(res => {
+ if (res.code == 200) {
+ app.toast("删除数据成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: `../list/index?type=${this.data.type}`,
+ })
+ }, 200);
+ }
+ });
+ },
+
+ //展示图片
+ showImg: function (e) {
+ let img = e.target.dataset.set;
+ wx.previewImage({
+ urls: img.split(','),
+ current: 0
+ })
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到其它页面。*/
+ wx.redirectTo({
+ url: `../list/index?type=${this.data.type}`,
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/info/index.json b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/info/index.json
new file mode 100644
index 00000000..d16f2b0b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/info/index.json
@@ -0,0 +1,8 @@
+{
+ "usingComponents": {
+ "van-collapse": "@vant/weapp/collapse",
+ "van-steps": "@vant/weapp/steps/index",
+ "van-collapse-item": "@vant/weapp/collapse-item"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/info/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/info/index.wxml
new file mode 100644
index 00000000..0bb9511d
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/info/index.wxml
@@ -0,0 +1,167 @@
+
+
+
+
+
+
+ {{infoData.projectName}}
+
+
+
+
+ 隐患图片
+
+
+
+
+
+
+
+
+
+ 问题类型
+
+ {{infoData.problemTypeName}}
+ {{infoData.problemTypeName}}
+
+
+
+
+
+ 隐患类型
+ {{infoData.dangerTypeName}}
+
+
+
+
+ 隐患描述
+ {{infoData.workParts}}
+
+
+
+
+ 整改要求
+ {{infoData.changeInfo}}
+
+
+
+
+ 检查人
+ {{infoData.createUserName}}
+
+
+
+
+ 检查时间
+ {{infoData.createTime}}
+
+
+
+
+ 整改人
+
+ {{infoData.lordSentUser}}
+
+
+
+
+
+ 复检人
+ {{infoData.recheckSendUser}}
+
+
+
+
+ 抄送人
+ {{infoData.copySendUser}}
+
+
+
+
+ 截至时间
+ {{infoData.nickedTime}}
+
+
+
+
+
+
+
+ 隐患整改
+
+
+
+
+ 整改说明
+ {{auditInfo1.opinion}}
+
+
+
+
+ 整改后图片
+
+
+
+
+
+
+
+
+
+
+
+ 问题复检
+
+
+
+
+ 复检结果
+
+ 复检驳回
+ 复检通过
+
+
+
+
+
+ 复检意见
+ {{auditInfo3.opinion}}
+
+
+
+
+ 复检意见
+ {{auditInfo4.opinion}}
+
+
+
+
+ 复检时间
+ {{auditInfo3.createTime}}
+
+
+
+
+ 复检时间
+ {{auditInfo4.createTime}}
+
+
+
+
+
+ 删除
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/info/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/info/index.wxss
new file mode 100644
index 00000000..abe2ea52
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/info/index.wxss
@@ -0,0 +1,37 @@
+.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 8px 0;
+ float: left;
+}
+
+.in-img-div image {
+ width: 180rpx;
+ height: 180rpx;
+ border-radius: 15rpx;
+ position: relative;
+}
+
+.van-steps {
+ background-color: transparent !important;
+}
+
+.van-step--horizontal .van-step__circle-container {
+ background-color: transparent !important;
+}
+
+.van-steps--horizontal {
+ padding: 10px 20px !important;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/list/index.js b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/list/index.js
new file mode 100644
index 00000000..cae544f6
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/list/index.js
@@ -0,0 +1,257 @@
+import config from '../../../config'
+import {
+ getToken,
+ getUserInfo
+} from '../../../utils/auth'
+import {
+ list,
+ listCount
+} from '../../../api/problemmodify'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ type: "",
+ typeName: "",
+ addFlag: false,
+ addDraftFlag: false,
+ projectId: "",
+ projectName: "",
+ initData: {},
+ pageNum: 1,
+ pageSize: 10,
+ total: 0,
+ listData: [],
+ activeState: "dzg",
+ dzgCount: 0,
+ dfjCount: 0,
+ yzgCount: 0,
+ ywcCount: 0,
+ imgBaseUrl: config.baseImgUrl,
+ projectUserInfo: {}
+ },
+
+ //项目切换 返回值
+ onProjectSelect(e) {
+ let projectId = e.detail.id;
+ let projectName = e.detail.text;
+ app.globalData.useProjectId = projectId;
+ app.globalData.useProjectName = projectName;
+ this.onLoad({
+ type: this.data.type
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ const proUserInfo = getUserInfo();
+ const _activeState = proUserInfo.projectUserInfo.subDeptType == "1" ? "dfj" : "dzg";
+ this.setData({
+ type: options.type,
+ typeName: options.type == 1 ? "质量" : "安全",
+ addFlag: proUserInfo.projectUserInfo.subDeptType == "1",
+ addDraftFlag: proUserInfo.projectUserInfo.subDeptType == "1",
+ activeState: _activeState,
+ projectUserInfo: proUserInfo.projectUserInfo,
+ projectId: app.globalData.useProjectId,
+ projectName: app.globalData.useProjectName,
+ initData: {
+ id: app.globalData.useProjectId,
+ text: app.globalData.useProjectName,
+ },
+ pageNum: 1,
+ pageSize: 10,
+ listData: [],
+ total: 0
+ });
+ this.getListData(proUserInfo.projectUserInfo, _activeState, options.type);
+ },
+
+ /**
+ * 添加隐患信息
+ */
+ skipAdd() {
+ wx.redirectTo({
+ url: `../add/index?type=${this.data.type}`,
+ })
+ },
+
+ /**
+ * 添加隐患草稿
+ */
+ skipAddDarft() {
+ wx.redirectTo({
+ url: `../draft/index?type=${this.data.type}`,
+ })
+ },
+
+ getInfo(e) {
+ let {
+ id,
+ checkState,
+ lordSent,
+ recheckSend
+ } = e.currentTarget.dataset.set
+ if ((checkState == 0 || checkState == 3) && lordSent == this.data.projectUserInfo.userId) {
+ //整改页面(状态时待整改&&整改人是当前登录人)
+ wx.redirectTo({
+ url: `../modify/index?type=${this.data.type}&id=${id}`,
+ })
+ } else if (checkState == 1 && recheckSend == this.data.projectUserInfo.userId) {
+ //复检页面 (状态时待复检&&复检人是当前登录人)
+ wx.redirectTo({
+ url: `../check/index?type=${this.data.type}&id=${id}`,
+ })
+ } else {
+ wx.redirectTo({
+ url: `../info/index?type=${this.data.type}&id=${id}`,
+ })
+ }
+ },
+
+ /**
+ * 查询项目质量隐患排查数据
+ */
+ getListData(userInfo, activeState, type) {
+ let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&comId=" + userInfo.comId + "&projectId=" + app.globalData.useProjectId + "&infoType=" + type + "&activeTags=" + activeState;
+ list(params).then(res => {
+ if (res.code == 200) {
+ res.rows.forEach(item => {
+ item.marksPicture = item.smarkUrl.split(',')[0];
+ });
+ this.setData({
+ total: res.total,
+ listData: this.data.listData.concat(res.rows)
+ })
+ }
+ });
+ // 统计列表
+ listCount(params).then(res => {
+ if (res.code == 200) {
+ this.setData({
+ dzgCount: res.data.dzg,
+ dfjCount: res.data.dfj,
+ yzgCount: res.data.yzg,
+ ywcCount: res.data.ywc,
+ })
+ }
+ });
+ },
+
+ /**
+ * 标签切换
+ */
+ trainJump(e) {
+ let index = e.currentTarget.dataset.index;
+ let nav = "";
+ if (index == 1) {
+ nav = 'dzg';
+ }
+ if (index == 2) {
+ nav = 'yzg';
+ } else if (index == 3) {
+ nav = 'dfj';
+ } else if (index == 4) {
+ nav = 'dzg';
+ } else if (index == 5) {
+ nav = 'ywc';
+ }
+ this.setData({
+ activeState: nav,
+ pageNum: 1,
+ pageSize: 10,
+ listData: [],
+ });
+ this.getListData(this.data.projectUserInfo, nav, this.data.type);
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到其它页面。*/
+ if (wx.getStorageSync('nav-menu') == "xmgl") {
+ wx.redirectTo({
+ url: '../../project_more/index',
+ })
+ } else {
+ if (this.data.type == 1) {
+ wx.redirectTo({
+ url: '../../project_quality/index',
+ })
+ } else {
+ wx.redirectTo({
+ url: '../../project_safety/index',
+ })
+ }
+ }
+ },
+
+ onScrollToLower() {
+ let nal = Math.ceil(this.data.total / this.data.pageSize);
+ if (this.data.pageNum < nal) {
+ this.setData({
+ pageNum: this.data.pageNum + 1
+ });
+ this.getListData(this.data.projectUserInfo, this.data.activeState, this.data.type);
+ } else {
+ console.log("已经到底了,没有数据可加载!!!");
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/list/index.json b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/list/index.json
new file mode 100644
index 00000000..2c79689d
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/list/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-overlay": "@vant/weapp/overlay/index" ,
+ "van-popup": "@vant/weapp/popup/index"
+ },
+ "navigationStyle":"custom"
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/list/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/list/index.wxml
new file mode 100644
index 00000000..a65f312d
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/list/index.wxml
@@ -0,0 +1,81 @@
+
+
+
+
+ 待整改({{dzgCount}})
+ 已整改({{yzgCount}})
+
+
+ 待复检({{dfjCount}})
+ 待整改({{dzgCount}})
+ 已完成({{ywcCount}})
+
+
+
+
+
+
+
+ {{index < 10 ?'0'+(index+1):(index+1)}}
+
+ {{item.createTime}}
+
+ {{item.problemTypeName}}
+ {{item.problemTypeName}}
+
+
+
+
+
+ 待整改
+ 待复检
+ 已驳回
+ 已完成
+
+
+
+ 隐患类型:{{item.dangerTypeName}}
+ 隐患描述:{{item.workParts}}
+ 整改人员:{{item.lordSentUser}}
+ 复检人员:{{item.recheckSendUser}}
+
+
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+ 草稿
+
+
+
+
+
+ 新增
+
+
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/list/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/list/index.wxss
new file mode 100644
index 00000000..7669f94e
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/list/index.wxss
@@ -0,0 +1 @@
+/* pages/project_problemmodify/list/index.wxss */
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/modify/index.js b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/modify/index.js
new file mode 100644
index 00000000..1654062e
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/modify/index.js
@@ -0,0 +1,288 @@
+import config from '../../../config'
+import {
+ getToken
+} from '../../../utils/auth'
+import {
+ findInfo,
+ findAuditInfos,
+ modifyProblemmodify
+} from '../../../api/problemmodify'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ infoData: {},
+ loadShow: false,
+ auditInfo1: {},
+ auditInfo3: {},
+ auditInfo4: {},
+ form: {},
+ imageInfoData: [],
+ imageList: [],
+ auditImageList: [],
+ active: 2,
+ flowNodes: [{
+ text: '开始'
+ }, {
+ text: '提交隐患'
+ }, {
+ text: '隐患整改'
+ }, {
+ text: '隐患复检'
+ }, {
+ text: '结束'
+ }]
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ this.setData({
+ type: options.type,
+ typeName: options.type == 1 ? "质量" : "安全",
+ });
+ this.getInfo(options.id);
+ this.getAuditInfos(options.id);
+ },
+
+ /**
+ * 查详隐患详情
+ * @param {*} id
+ */
+ getInfo(id) {
+ findInfo(id).then(res => {
+ if (res.code == 200) {
+ let state = this.data.active;
+ if (res.data.checkState == "0") {
+ state = 2;
+ } else if (res.data.checkState == "1") {
+ state = 3;
+ } else if (res.data.checkState == "3") {
+ state = 2;
+ }
+ this.setData({
+ active: state
+ })
+ let urls = [];
+ if (res.data.smarkUrl) {
+ res.data.smarkUrl.split(',').forEach(item => {
+ urls.push(config.baseImgUrl + item);
+ });
+ }
+ this.setData({
+ infoData: res.data,
+ imageList: urls,
+ "form.mainId": res.data.id,
+ })
+ }
+ })
+ },
+
+ /**
+ * 查详隐患流程
+ * @param {*} id
+ */
+ getAuditInfos(id) {
+ findAuditInfos(id).then(res => {
+ if (res.code == 200 && res.data.length > 0) {
+ res.data.forEach(item => {
+ if (item.processState == "0") {
+ let urls = [];
+ if (item.files.length > 0) {
+ item.files.forEach(_file => {
+ urls.push(config.baseImgUrl + _file.fileUrl);
+ });
+ }
+ this.setData({
+ auditInfo1: item,
+ auditImageList: urls
+ })
+ } else if (item.processState == "1") {
+ this.setData({
+ auditInfo4: item
+ })
+ } else if (item.processState == "2") {
+ this.setData({
+ auditInfo3: item
+ })
+ }
+ });
+ }
+ });
+ },
+
+ //取消页面
+ cancelSaveView() {
+ this.returnToPage()
+ },
+
+ //保存
+ onSubmitSave() {
+ let _form = {
+ ...this.data.form
+ };
+ let {
+ imageInfoData
+ } = this.data
+ //数据效验
+ if (!_form.mainId) {
+ app.toast("数据异常,请刷新页面重试!")
+ return false;
+ }
+ if (!_form.opinion) {
+ app.toast("请填写整改说明!")
+ return false;
+ }
+ if (imageInfoData.length == 0) {
+ app.toast("请上传整改后图片!")
+ return false;
+ }
+ this.setData({
+ loadShow: true
+ })
+ let that = this
+ let fileUrls = [];
+ imageInfoData.forEach(async (item) => {
+ let obj = await that.syncUploadImage(item);
+ fileUrls.push(obj.data.data.url);
+ //验证图片上传完毕
+ if (fileUrls.length == imageInfoData.length) {
+ _form.processState = "0";
+ _form.images = fileUrls.toString();
+ modifyProblemmodify(_form).then(res => {
+ if (res.code == 200) {
+ app.toast("整改提交成功,请关注审核结果!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: `../list/index?type=${this.data.type}`,
+ })
+ }, 200)
+ }
+ });
+ }
+ })
+ },
+
+ /**
+ * 这里考虑上传图片异步问题,封装为同步
+ */
+ syncUploadImage(file) {
+ let _baseUrl = config.baseUrl;
+ return new Promise((resolve, reject) => {
+ wx.uploadFile({
+ url: _baseUrl + "/file/upload", // 上传的服务器接口地址
+ filePath: file,
+ header: {
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
+ 'Authorization': 'Bearer ' + getToken()
+ },
+ name: "file", //上传的所需字段,后端提供
+ formData: {},
+ success: (res) => {
+ // 上传完成操作
+ const data = JSON.parse(res.data)
+ resolve({
+ data: data
+ })
+ },
+ fail: (err) => {
+ //上传失败:修改pedding为reject
+ console.log("访问接口失败", err);
+ wx.showToast({
+ title: "网络出错,上传失败",
+ icon: 'none',
+ duration: 1000
+ });
+ reject(err)
+ }
+ });
+ })
+ },
+
+ //展示图片
+ showImg: function (e) {
+ let img = e.target.dataset.set;
+ wx.previewImage({
+ urls: img.split(','),
+ current: 0
+ })
+ },
+
+ returnToPage: function () {
+ wx.redirectTo({
+ url: `../list/index?type=${this.data.type}`
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ // 整改说明
+ onInputOpinion(e) {
+ this.setData({
+ "form.opinion": e.detail.value
+ })
+ },
+
+ // 上传图片
+ onImagesArr(e) {
+ this.setData({
+ imageInfoData: e.detail
+ })
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/modify/index.json b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/modify/index.json
new file mode 100644
index 00000000..d4712ee1
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/modify/index.json
@@ -0,0 +1,10 @@
+{
+ "usingComponents": {
+ "van-popup": "@vant/weapp/popup/index",
+ "van-collapse": "@vant/weapp/collapse",
+ "van-steps": "@vant/weapp/steps/index",
+ "van-collapse-item": "@vant/weapp/collapse-item",
+ "van-overlay": "@vant/weapp/overlay/index"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/modify/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/modify/index.wxml
new file mode 100644
index 00000000..38ea0e9f
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/modify/index.wxml
@@ -0,0 +1,148 @@
+
+
+
+
+
+
+ {{infoData.projectName}}
+
+
+
+
+ 隐患图片
+
+
+
+
+
+
+
+
+
+ 检查类型
+
+ {{infoData.problemTypeName}}
+ {{infoData.problemTypeName}}
+
+
+
+
+
+ 隐患类型
+ {{infoData.dangerTypeName}}
+
+
+
+
+ 隐患描述
+ {{infoData.workParts}}
+
+
+
+
+ 整改要求
+ {{infoData.changeInfo}}
+
+
+
+
+ 检查人
+ {{infoData.createUserName}}
+
+
+
+
+ 检查时间
+ {{infoData.createTime}}
+
+
+
+
+ 整改人
+ {{infoData.lordSentUser}}
+
+
+
+
+ 复检人
+ {{infoData.recheckSendUser}}
+
+
+
+
+ 抄送人
+ {{infoData.copySendUser}}
+
+
+
+
+ 截至时间
+ {{infoData.nickedTime}}
+
+
+
+
+
+
+
+ 隐患整改驳回
+
+
+
+
+ 驳回意见
+ {{auditInfo3.opinion}}
+
+
+
+
+ 驳回时间
+ {{auditInfo3.createTime}}
+
+
+
+
+
+
+ 隐患整改提交
+
+
+
+ 整改说明
+
+
+
+
+
+ 整改后图片
+
+
+
+
+
+
+
+ 取消
+ 保存
+
+
+
+
+
+
+ 数据处理中!请稍后...
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/modify/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/modify/index.wxss
new file mode 100644
index 00000000..cd1a9e59
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_problemmodify/modify/index.wxss
@@ -0,0 +1,34 @@
+.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 8px 0;
+ float: left;
+ }
+ .in-img-div image{
+ width: 180rpx;
+ height: 180rpx;
+ border-radius: 15rpx;
+ position: relative;
+ }
+
+ .van-steps {
+ background-color: transparent !important;
+ }
+
+ .van-step--horizontal .van-step__circle-container {
+ background-color: transparent !important;
+ }
+
+ .van-steps--horizontal {
+ padding: 10px 20px !important;
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_quality/index.js b/yanzhu-ui-app/miniprogram/pageage/project_quality/index.js
new file mode 100644
index 00000000..c989f0f9
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_quality/index.js
@@ -0,0 +1,198 @@
+import {
+ getToken,
+ getUserInfo
+} from '../../utils/auth'
+import {
+ findUserMenuList
+} from '../../api/publics'
+import {
+ findMyTask
+} from '../../api/flowable'
+import {
+ findGroupCountView
+} from '../../api/problemmodify'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ active: 2,
+ projectId: '',
+ projectName: '',
+ subDeptUserInfo: {},
+ menuList: [],
+ initData: {},
+ aqglDb: 0,
+ zlyhDB: 0,
+ zlglDb: 0,
+ todoDB: 0,
+ checkList: [{
+ id: 1,
+ name: "日常巡检问题",
+ rate: 0, //整改率
+ total: 0, //问题总数
+ number: 0, //检查次数
+ }, {
+ id: 2,
+ name: "周检隐患问题",
+ rate: 0, //整改率
+ total: 0, //问题总数
+ number: 0, //检查次数
+ }, {
+ id: 3,
+ name: "月检隐患问题",
+ rate: 0, //整改率
+ total: 0, //问题总数
+ number: 0, //检查次数
+ }, {
+ id: 4,
+ name: "专项检查问题",
+ rate: 0, //整改率
+ total: 0, //问题总数
+ number: 0, //检查次数
+ }],
+ },
+
+
+ //项目切换 返回值
+ onProjectSelect(e) {
+ let projectId = e.detail.id;
+ let projectName = e.detail.text;
+ app.globalData.useProjectId = projectId;
+ app.globalData.useProjectName = projectName;
+ this.onLoad();
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../pages/login/login',
+ })
+ }
+ const proUserInfo = getUserInfo();
+ this.setData({
+ projectId: app.globalData.useProjectId,
+ projectName: app.globalData.useProjectName,
+ initData: {
+ id: app.globalData.useProjectId,
+ text: app.globalData.useProjectName,
+ },
+ subDeptUserInfo: proUserInfo.projectUserInfo,
+ });
+ //用户权限菜单
+ this.getUserMenuList(app.globalData.useProjectId);
+ this.awaitTask();
+ this.getGroupCountView(app.globalData.useProjectId, 1);
+ },
+
+ /**
+ * 查询功能菜单
+ * @param {*} proId
+ */
+ getUserMenuList: function (proId) {
+ findUserMenuList(proId, 'zlgl').then(res => {
+ if (res.code == 200) {
+ this.setData({
+ menuList: res.data
+ })
+ }
+ });
+ },
+
+ /**
+ * 项目分组查询统计
+ * @param {*} proId
+ * @param {*} type
+ */
+ getGroupCountView(proId, type) {
+ findGroupCountView(proId, type).then(res => {
+ let _checkList = this.data.checkList;
+ //隐患统计数据
+ res.data.forEach((item, idx) => {
+ let _index = parseInt(item.problemType - 1);
+ _checkList[_index].rate = (item.comTotal / item.total * 100).toFixed(2);
+ _checkList[_index].total = item.comTotal;
+ _checkList[_index].number = item.total;
+ });
+ this.setData({
+ checkList: _checkList
+ })
+ });
+ },
+
+ goMenu: function (event) {
+ let _url = event.currentTarget.dataset.url;
+ if (!_url) {
+ app.toast("正在建设中...")
+ return false;
+ }
+ wx.setStorageSync('nav-menu', "zlgl");
+ wx.redirectTo({
+ url: _url
+ })
+ },
+
+ // 底部导航
+ onChange(event) {
+ // event.detail 的值为当前选中项的索引
+ this.setData({
+ active: event.detail
+ });
+ },
+
+ //跳转到项目概况
+ XMGK: function () {
+ wx.setStorageSync('nav-menu', "xmgk");
+ wx.redirectTo({
+ url: '../project_info/index'
+ })
+ },
+
+ //跳转到安全管理
+ AQGL: function () {
+ wx.setStorageSync('nav-menu', "aqgl");
+ wx.redirectTo({
+ url: '../project_safety/index'
+ })
+ },
+
+ //跳转到进度管理
+ JDGL: function () {
+ wx.setStorageSync('nav-menu', "zlgl");
+ wx.redirectTo({
+ url: '../project_schedule/list/index'
+ })
+ },
+
+ //跳转到项目管理
+ XMGL: function () {
+ wx.setStorageSync('nav-menu', "xmgl");
+ wx.redirectTo({
+ url: '../project_more/index'
+ })
+ },
+
+ /**
+ * 统计代办
+ */
+ awaitTask() {
+ let param = "proId=" + app.globalData.useProjectId;
+ findMyTask(param).then(res => {
+ if (res.code == 200) {
+ let proUserInfo = this.data.subDeptUserInfo;
+ this.setData({
+ aqglDb: proUserInfo.subDeptType == "1" ? res.data.aqgl : 0,
+ zlyhDB: res.data.zlyl,
+ zlglDb: proUserInfo.subDeptType == "1" ? res.data.zlgl : 0,
+ todoDb: proUserInfo.subDeptType == "1" ? (res.data.dwsh + res.data.rysh) : res.data.todo
+ })
+ }
+ });
+ },
+
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_quality/index.json b/yanzhu-ui-app/miniprogram/pageage/project_quality/index.json
new file mode 100644
index 00000000..2dfb8746
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_quality/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-tabbar": "@vant/weapp/tabbar",
+ "van-tabbar-item": "@vant/weapp/tabbar-item"
+ },
+ "navigationStyle": "custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_quality/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_quality/index.wxml
new file mode 100644
index 00000000..75e15715
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_quality/index.wxml
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
+
+
+ {{zlyhDB}}
+
+ {{item.menuName}}
+
+
+
+
+
+
+
+
+
+ 质量隐患统计
+ 查看详情
+
+
+
+
+
+
+ {{item.name}}
+
+
+ 整改率
+ {{item.rate}} %
+
+
+
+ 已整改问题数
+ {{item.total}}
+
+
+
+
+
+
+
+
+
+
+
+
+ 项目概况
+
+
+
+
+
+ 安全管理
+ {{aqglDB}}
+
+
+
+
+
+ 质量管理
+ {{zlglDB}}
+
+
+
+
+
+ 进度管理
+
+
+
+
+
+ 项目管理
+ {{todoDb}}
+
+
+
+
+
+
+
+ 项目概况
+
+
+
+
+
+ 项目管理
+ {{todoDb}}
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_quality/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_quality/index.wxss
new file mode 100644
index 00000000..46f6bbac
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_quality/index.wxss
@@ -0,0 +1,27 @@
+.more_max {
+ padding: 10rpx 30rpx 30rpx;
+}
+
+.more_manage {
+ border-radius: 10rpx;
+ margin-top: 50rpx;
+}
+
+.gd_max {
+ padding: 10rpx 50rpx 0;
+}
+
+.gd_min {
+ padding: 30rpx 0;
+ text-align: center;
+}
+
+.gd_min image {
+ width: 150rpx;
+ height: 150rpx;
+}
+
+.gd_min view {
+ padding: 10rpx;
+ color: #89a4eb;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_safety/index.js b/yanzhu-ui-app/miniprogram/pageage/project_safety/index.js
new file mode 100644
index 00000000..a3d7e2ed
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_safety/index.js
@@ -0,0 +1,197 @@
+import {
+ getToken,
+ getUserInfo
+} from '../../utils/auth'
+import {
+ findUserMenuList
+} from '../../api/publics'
+import {
+ findMyTask
+} from '../../api/flowable'
+import {
+ findGroupCountView
+} from '../../api/problemmodify'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ active: 1,
+ projectId: '',
+ projectName: '',
+ subDeptUserInfo: {},
+ menuList: [],
+ initData: {},
+ aqyhDB: 0,
+ aqglDB: 0,
+ zlglDB: 0,
+ todoDB: 0,
+ checkList: [{
+ id: 1,
+ name: "日常巡检问题",
+ rate: 0, //整改率
+ total: 0, //问题总数
+ number: 0, //检查次数
+ }, {
+ id: 2,
+ name: "周检隐患问题",
+ rate: 0, //整改率
+ total: 0, //问题总数
+ number: 0, //检查次数
+ }, {
+ id: 3,
+ name: "月检隐患问题",
+ rate: 0, //整改率
+ total: 0, //问题总数
+ number: 0, //检查次数
+ }, {
+ id: 4,
+ name: "专项检查问题",
+ rate: 0, //整改率
+ total: 0, //问题总数
+ number: 0, //检查次数
+ }],
+ },
+
+ //项目切换 返回值
+ onProjectSelect(e) {
+ let projectId = e.detail.id;
+ let projectName = e.detail.text;
+ app.globalData.useProjectId = projectId;
+ app.globalData.useProjectName = projectName;
+ this.onLoad();
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../pages/login/login',
+ })
+ }
+ const proUserInfo = getUserInfo();
+ this.setData({
+ projectId: app.globalData.useProjectId,
+ projectName: app.globalData.useProjectName,
+ initData: {
+ id: app.globalData.useProjectId,
+ text: app.globalData.useProjectName,
+ },
+ subDeptUserInfo: proUserInfo.projectUserInfo,
+ });
+ //用户权限菜单
+ this.getUserMenuList(app.globalData.useProjectId);
+ this.awaitTask();
+ this.getGroupCountView(app.globalData.useProjectId, 0);
+ },
+
+ /**
+ * 查询功能菜单
+ * @param {*} proId
+ */
+ getUserMenuList: function (proId) {
+ findUserMenuList(proId, 'aqgl').then(res => {
+ if (res.code == 200) {
+ this.setData({
+ menuList: res.data
+ })
+ }
+ });
+ },
+
+ /**
+ * 项目分组查询统计
+ * @param {*} proId
+ * @param {*} type
+ */
+ getGroupCountView(proId, type) {
+ findGroupCountView(proId, type).then(res => {
+ let _checkList = this.data.checkList;
+ //隐患统计数据
+ res.data.forEach((item, idx) => {
+ let _index = parseInt(item.problemType - 1);
+ _checkList[_index].rate = (item.comTotal / item.total * 100).toFixed(2);
+ _checkList[_index].total = item.comTotal;
+ _checkList[_index].number = item.total;
+ });
+ this.setData({
+ checkList: _checkList
+ })
+ });
+ },
+
+ goMenu: function (event) {
+ let _url = event.currentTarget.dataset.url;
+ if (!_url) {
+ app.toast("正在建设中...")
+ return false;
+ }
+ wx.setStorageSync('nav-menu', "aqgl");
+ wx.redirectTo({
+ url: _url
+ })
+ },
+
+ // 底部导航
+ onChange(event) {
+ // event.detail 的值为当前选中项的索引
+ this.setData({
+ active: event.detail
+ });
+ },
+
+ //跳转到项目概况
+ XMGK: function () {
+ wx.setStorageSync('nav-menu', "xmgk");
+ wx.redirectTo({
+ url: '../project_info/index'
+ })
+ },
+
+ //跳转到质量管理
+ ZLGL: function () {
+ wx.setStorageSync('nav-menu', "zlgl");
+ wx.redirectTo({
+ url: '../project_quality/index'
+ })
+ },
+
+ //跳转到进度管理
+ JDGL: function () {
+ wx.setStorageSync('nav-menu', "aqgl");
+ wx.redirectTo({
+ url: '../project_schedule/list/index'
+ })
+ },
+
+ //跳转到项目管理
+ XMGL: function () {
+ wx.setStorageSync('nav-menu', "xmgl");
+ wx.redirectTo({
+ url: '../project_more/index'
+ })
+ },
+
+ /**
+ * 统计代办
+ */
+ awaitTask() {
+ let param = "proId=" + app.globalData.useProjectId;
+ findMyTask(param).then(res => {
+ if (res.code == 200) {
+ let proUserInfo = this.data.subDeptUserInfo;
+ this.setData({
+ aqyhDB: res.data.aqyh,
+ aqglDb: proUserInfo.subDeptType == "1" ? res.data.aqgl : 0,
+ zlglDb: proUserInfo.subDeptType == "1" ? res.data.zlgl : 0,
+ todoDb: proUserInfo.subDeptType == "1" ? (res.data.dwsh + res.data.rysh) : res.data.todo
+ })
+ }
+ });
+ },
+
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_safety/index.json b/yanzhu-ui-app/miniprogram/pageage/project_safety/index.json
new file mode 100644
index 00000000..2dfb8746
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_safety/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-tabbar": "@vant/weapp/tabbar",
+ "van-tabbar-item": "@vant/weapp/tabbar-item"
+ },
+ "navigationStyle": "custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_safety/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_safety/index.wxml
new file mode 100644
index 00000000..a87d860e
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_safety/index.wxml
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
+
+
+ {{aqyhDB}}
+
+ {{item.menuName}}
+
+
+
+
+
+
+
+
+
+ 安全隐患统计
+ 查看详情
+
+
+
+
+
+
+ {{item.name}}
+
+
+ 整改率
+ {{item.rate}} %
+
+
+
+ 已整改问题数
+ {{item.total}}
+
+
+
+
+
+
+
+
+
+
+
+
+ 项目概况
+
+
+
+
+
+ 安全管理
+ {{aqglDB}}
+
+
+
+
+
+ 质量管理
+ {{zlglDB}}
+
+
+
+
+
+ 进度管理
+
+
+
+
+
+ 项目管理
+ {{todoDb}}
+
+
+
+
+
+
+
+ 项目概况
+
+
+
+
+
+ 项目管理
+ {{todoDb}}
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_safety/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_safety/index.wxss
new file mode 100644
index 00000000..46f6bbac
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_safety/index.wxss
@@ -0,0 +1,27 @@
+.more_max {
+ padding: 10rpx 30rpx 30rpx;
+}
+
+.more_manage {
+ border-radius: 10rpx;
+ margin-top: 50rpx;
+}
+
+.gd_max {
+ padding: 10rpx 50rpx 0;
+}
+
+.gd_min {
+ padding: 30rpx 0;
+ text-align: center;
+}
+
+.gd_min image {
+ width: 150rpx;
+ height: 150rpx;
+}
+
+.gd_min view {
+ padding: 10rpx;
+ color: #89a4eb;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_schedule/add/index.js b/yanzhu-ui-app/miniprogram/pageage/project_schedule/add/index.js
new file mode 100644
index 00000000..2c53ec51
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_schedule/add/index.js
@@ -0,0 +1,327 @@
+import config from '../../../config'
+import {
+ getToken
+} from '../../../utils/auth'
+import {
+ findPlanDatas,
+ findRecursionPlan,
+ findPreviousSchedule,
+ submitPlanSchedule
+} from '../../../api/project'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ maxDate: new Date().getTime() + (3600 * 24 * 30 * 1000),
+ form: {
+ schedulePercent: 1
+ },
+ loadShow: false,
+ imageInfoData: [],
+ picker: false,
+ planOptions: [],
+ previousSchedule: null, //上次填报数据
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ this.setData({
+ "form.projectId": app.globalData.useProjectId,
+ "form.projectName": app.globalData.useProjectName
+ });
+ this.initPlanDatas();
+ },
+
+ /**
+ * 打开选择窗
+ */
+ openPicker() {
+ this.setData({
+ picker: true
+ })
+ },
+
+ closePicker() {
+ this.setData({
+ picker: false
+ })
+ },
+
+ /**
+ * 构建树结构
+ * @param {*} all
+ * @param {*} id
+ */
+ buildTree(all, id) {
+ let tmps = all.filter((d) => d.parentId == id);
+ if (tmps.length > 0) {
+ tmps.forEach((it) => {
+ it.children = this.buildTree(all, it.taskId);
+ });
+ }
+ return tmps;
+ },
+
+ /**
+ * 初始化计划
+ */
+ initPlanDatas() {
+ findPlanDatas(app.globalData.useProjectId).then((res) => {
+ let treeDatas = this.buildTree(res.data, 1);
+ this.setData({
+ planOptions: treeDatas
+ })
+ });
+ },
+
+ /**
+ * 组件选中时会触发
+ */
+ handleClick: function (e) {
+ let checkIds = e.detail.idList;
+ if (checkIds.length > 0) {
+ let planValue = checkIds[checkIds.length - 1];
+ this.setData({
+ picker: false
+ })
+ findRecursionPlan(planValue.planId).then(res => {
+ if (res.data) {
+ this.setData({
+ "form.comId": res.data.comid,
+ "form.planId": planValue.planId,
+ "form.taskId": res.data.taskId,
+ "form.taskUniqueId": res.data.taskUniqueId,
+ "form.taskName": res.data.taskName,
+ "form.bimId": res.data.bimId,
+ });
+ } else {
+ this.setData({
+ "form.comId": null,
+ "form.taskId": null,
+ "form.taskUniqueId": null,
+ "form.taskName": null,
+ "form.bimId": null,
+ });
+ }
+ });
+ findPreviousSchedule(planValue.planId).then((res) => {
+ if (res.data) {
+ this.setData({
+ previousSchedule: res.data,
+ "form.schedulePercent": res.data.schedulePercent
+ });
+ } else {
+ this.setData({
+ previousSchedule: null,
+ "form.schedulePercent": 1
+ });
+ }
+ });
+ }
+ },
+
+ onChangeMinus(e) {
+ this.setData({
+ "form.schedulePercent": this.data.form.schedulePercent - 1
+ });
+ },
+ onChangePlus(e) {
+ this.setData({
+ "form.schedulePercent": this.data.form.schedulePercent + 1
+ });
+ },
+
+ onChangeBlur(e) {
+ this.setData({
+ "form.schedulePercent": e.detail.value
+ });
+ },
+
+ //完成时间
+ onInputTime(e) {
+ this.setData({
+ "form.finishDate": e.detail
+ })
+ },
+
+ //进度描述
+ onInputDescription(e) {
+ this.setData({
+ "form.description": e.detail.value
+ })
+ },
+
+ // 上传图片
+ onImagesArr(e) {
+ this.setData({
+ imageInfoData: e.detail
+ })
+ },
+
+ /**
+ * 数据保存
+ */
+ submitSave() {
+ let _form = {
+ ...this.data.form
+ };
+ let {
+ imageInfoData
+ } = this.data
+ //数据效验
+ if (!_form.projectId) {
+ app.toast("数据异常,请刷新页面重试!")
+ return false;
+ }
+ if (!_form.planId) {
+ app.toast("请选择工程计划!")
+ return false;
+ }
+ if (!_form.schedulePercent) {
+ app.toast("请填写计划完成进度!")
+ return false;
+ } else {
+ if (_form.schedulePercent == 100 && !_form.finishDate) {
+ app.toast("请选择完成时间!")
+ return false;
+ }
+ }
+ if (!_form.description) {
+ app.toast("请填写进度描述!")
+ return false;
+ }
+ if (imageInfoData.length == 0) {
+ app.toast("请上传施工现场作业图!")
+ return false;
+ }
+ let fileUrls = [];
+ this.setData({
+ loadShow: true
+ });
+ let that = this;
+ imageInfoData.forEach(async (item) => {
+ //这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
+ let obj = await that.syncUploadImage(item);
+ fileUrls.push(obj.data.data.url);
+ //验证图片上传完毕
+ if (fileUrls.length == imageInfoData.length) {
+ _form.images = fileUrls.toString();
+ submitPlanSchedule(_form).then(res => {
+ this.setData({
+ loadShow: false
+ });
+ if (res.code == 200) {
+ app.toast("新增进度成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: `../list/index`,
+ })
+ }, 200)
+ }
+ });
+ }
+ })
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到其它页面。*/
+ wx.redirectTo({
+ url: `../list/index`,
+ })
+ },
+
+ /**
+ * 这里考虑上传图片异步问题,封装为同步
+ */
+ syncUploadImage(file) {
+ let _baseUrl = config.baseUrl;
+ return new Promise((resolve, reject) => {
+ wx.uploadFile({
+ url: _baseUrl + "/file/upload", // 上传的服务器接口地址
+ filePath: file,
+ header: {
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
+ 'Authorization': 'Bearer ' + getToken()
+ },
+ name: "file", //上传的所需字段,后端提供
+ formData: {},
+ success: (res) => {
+ // 上传完成操作
+ const data = JSON.parse(res.data)
+ resolve({
+ data: data
+ })
+ },
+ fail: (err) => {
+ //上传失败:修改pedding为reject
+ console.log("访问接口失败", err);
+ wx.showToast({
+ title: "网络出错,上传失败",
+ icon: 'none',
+ duration: 1000
+ });
+ reject(err)
+ }
+ });
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_schedule/add/index.json b/yanzhu-ui-app/miniprogram/pageage/project_schedule/add/index.json
new file mode 100644
index 00000000..6042c1d7
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_schedule/add/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-overlay": "@vant/weapp/overlay/index",
+ "van-stepper": "@vant/weapp/stepper/index"
+ },
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_schedule/add/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_schedule/add/index.wxml
new file mode 100644
index 00000000..767bccc2
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_schedule/add/index.wxml
@@ -0,0 +1,79 @@
+
+
+
+
+ {{form.projectName}}
+
+
+ 工程计划
+
+
+
+
+
+ 选择工程计划
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成进度
+ [ 上次完成进度 {{previousSchedule.schedulePercent}} % ]
+
+
+
+
+
+
+ 完成时间
+
+
+
+
+
+ 进度描述
+
+
+
+
+
+ 施工图片
+
+
+
+
+
+
+ 取消
+ 保存进度
+
+
+
+
+
+
+ 数据处理中!请稍后...
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_schedule/add/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_schedule/add/index.wxss
new file mode 100644
index 00000000..7ccf5c4c
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_schedule/add/index.wxss
@@ -0,0 +1,86 @@
+.rectifier_max {
+ width: 100%;
+ background: #232a44;
+ border-radius: 15rpx;
+ position: relative;
+ height: 100%;
+}
+
+.rectifier_title {
+ position: relative;
+ background: #27304f;
+ border-radius: 15rpx;
+ text-align: center;
+ padding: 20rpx 15rpx;
+}
+
+.rectifier_close {
+ position: absolute;
+ width: 50rpx;
+ height: 50rpx;
+ right: 20rpx;
+ top: 12rpx;
+ line-height: 60rpx;
+ text-align: center;
+}
+
+.rectifier_list {
+ padding: 20rpx 40rpx;
+}
+
+.rectifier_list_height {
+ height: 990rpx;
+ overflow: auto;
+}
+
+.rectifier_list_for {
+ display: flex;
+ align-items: center;
+ padding: 16rpx 15rpx;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.rectifier_btn {
+ display: flex;
+ align-items: center;
+ background: #27304f;
+ border-radius: 0 0 15rpx 15rpx;
+}
+
+.rectifier_btn view {
+ width: 50%;
+ text-align: center;
+ height: 80rpx;
+ line-height: 80rpx;
+ color: #6874a4;
+}
+
+.rectifier_btn view:last-child {
+ border-left: 1px solid #6874a4;
+ color: #ffffff;
+}
+
+.van-stepper__minus {
+ width: 90rpx !important;
+ height: 90rpx !important;
+ background-color: #513ea7 !important;
+ color: #cdcdcd !important;
+}
+
+.van-stepper__input {
+ width: calc(100% - 196rpx) !important;
+ height: 90rpx !important;
+ background: #212737 !important;
+ border-radius: 10rpx !important;
+ padding: 0 30rpx !important;
+ color: #ffffff !important;
+}
+
+.van-stepper__plus {
+ width: 90rpx !important;
+ height: 90rpx !important;
+ background-color: #513ea7 !important;
+ color: #cdcdcd !important;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_schedule/info/index.js b/yanzhu-ui-app/miniprogram/pageage/project_schedule/info/index.js
new file mode 100644
index 00000000..c9581682
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_schedule/info/index.js
@@ -0,0 +1,116 @@
+import config from '../../../config'
+import {
+ getToken
+} from '../../../utils/auth'
+import {
+ planScheduleInfo
+} from '../../../api/project'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ infoData: {},
+ imageList: [],
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ this.getInfo(options.id);
+ },
+
+ /**
+ * 查详进度详情
+ * @param {*} id
+ */
+ getInfo(id) {
+ planScheduleInfo(id).then(res => {
+ if (res.code == 200) {
+ let urls = [];
+ if (res.data.images) {
+ res.data.images.split(',').forEach(item => {
+ urls.push(config.baseImgUrl + item);
+ });
+ }
+ this.setData({
+ infoData: res.data,
+ imageList: urls
+ })
+ }
+ })
+ },
+
+ //展示图片
+ showImg: function (e) {
+ let img = e.target.dataset.set;
+ wx.previewImage({
+ urls: img.split(','),
+ current: 0
+ })
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到其它页面。*/
+ wx.redirectTo({
+ url: `../list/index`,
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_schedule/info/index.json b/yanzhu-ui-app/miniprogram/pageage/project_schedule/info/index.json
new file mode 100644
index 00000000..ba2821f5
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_schedule/info/index.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationStyle":"custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_schedule/info/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_schedule/info/index.wxml
new file mode 100644
index 00000000..997e282f
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_schedule/info/index.wxml
@@ -0,0 +1,85 @@
+
+
+
+
+
+ {{infoData.projectName}}
+
+
+
+
+ 计划名称
+
+ {{infoData.taskName}}
+
+
+
+
+
+ 任务编号
+ {{infoData.taskUniqueId}}
+
+
+
+
+ BIM编号
+ {{infoData.bimId}}
+
+
+
+
+ 完成进度
+ {{infoData.schedulePercent}} %
+
+
+
+
+ 完成时间
+ {{infoData.finishDate}}
+
+
+
+
+ 进度描述
+ {{infoData.description}}
+
+
+
+
+ 进度图片
+
+
+
+
+
+
+
+
+
+ 填报用户
+ {{infoData.createBy}}
+
+
+
+
+ 填报时间
+ {{infoData.createDate}}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_schedule/info/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_schedule/info/index.wxss
new file mode 100644
index 00000000..e2d74500
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_schedule/info/index.wxss
@@ -0,0 +1,25 @@
+.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 8px 0;
+ float: left;
+}
+
+.in-img-div image {
+ width: 180rpx;
+ height: 180rpx;
+ border-radius: 15rpx;
+ position: relative;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_schedule/list/index.js b/yanzhu-ui-app/miniprogram/pageage/project_schedule/list/index.js
new file mode 100644
index 00000000..7291ceaa
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_schedule/list/index.js
@@ -0,0 +1,192 @@
+import config from '../../../config'
+import {
+ getToken,
+ getUserInfo
+} from '../../../utils/auth'
+import {
+ findMyTask
+} from '../../../api/flowable'
+import {
+ planScheduleList
+} from '../../../api/project'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ active: 3,
+ projectId: '',
+ projectName: '',
+ subDeptUserInfo: {},
+ initData: {},
+ aqglDb: 0,
+ zlyhDB: 0,
+ zlglDb: 0,
+ todoDB: 0,
+ pageNum: 1,
+ pageSize: 10,
+ total: 0,
+ listData: [],
+ imgBaseUrl:config.baseImgUrl
+ },
+
+
+ //项目切换 返回值
+ onProjectSelect(e) {
+ let projectId = e.detail.id;
+ let projectName = e.detail.text;
+ app.globalData.useProjectId = projectId;
+ app.globalData.useProjectName = projectName;
+ this.onLoad();
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ const proUserInfo = getUserInfo();
+ this.setData({
+ projectId: app.globalData.useProjectId,
+ projectName: app.globalData.useProjectName,
+ initData: {
+ id: app.globalData.useProjectId,
+ text: app.globalData.useProjectName,
+ },
+ subDeptUserInfo: proUserInfo.projectUserInfo,
+ pageNum: 1,
+ pageSize: 10,
+ total: 0,
+ listData: [],
+ });
+ this.awaitTask();
+ this.getListData();
+ },
+
+ /**
+ * 添加进度计划
+ */
+ skipAdd() {
+ wx.redirectTo({
+ url: `../add/index`,
+ })
+ },
+
+ /**
+ * 查看进度详情
+ * @param {*} e
+ */
+ getInfo(e) {
+ let {
+ id
+ } = e.currentTarget.dataset.set
+ wx.redirectTo({
+ url: `../info/index?id=${id}`,
+ })
+ },
+
+ /**
+ * 数据加载
+ */
+ getListData() {
+ let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId;
+ planScheduleList(params).then(res => {
+ if (res.code == 200) {
+ res.rows.forEach(item => {
+ let _tsk = item.taskName.split(' / ');
+ item.mainPlan = _tsk[_tsk.length];
+ item.planName = item.taskName.replace(item.mainPlan + " / ");
+ if (item.images) {
+ item.mainImage = item.images.split(',')[0];
+ } else {
+ item.mainImage = "default";
+ }
+ });
+ this.setData({
+ total: res.total,
+ listData: this.data.listData.concat(res.rows)
+ })
+ }
+ });
+ },
+
+ /**
+ * 滚动加载
+ */
+ onScrollToLower() {
+ let nal = Math.ceil(this.data.total / this.data.pageSize);
+ if (this.data.pageNum < nal) {
+ this.setData({
+ pageNum: this.data.pageNum + 1
+ });
+ this.getListData();
+ } else {
+ console.log("已经到底了,没有数据可加载!!!");
+ }
+ },
+
+ // 底部导航
+ onChange(event) {
+ // event.detail 的值为当前选中项的索引
+ this.setData({
+ active: event.detail
+ });
+ },
+
+ //跳转到项目概况
+ XMGK: function () {
+ wx.setStorageSync('nav-menu', "xmgk");
+ wx.redirectTo({
+ url: '../../project_info/index'
+ })
+ },
+
+ //跳转到安全管理
+ AQGL: function () {
+ wx.setStorageSync('nav-menu', "aqgl");
+ wx.redirectTo({
+ url: '../../project_safety/index'
+ })
+ },
+
+ //跳转到质量管理
+ ZLGL: function () {
+ wx.setStorageSync('nav-menu', "zlgl");
+ wx.redirectTo({
+ url: '../../project_quality/index'
+ })
+ },
+
+ //跳转到项目管理
+ XMGL: function () {
+ wx.setStorageSync('nav-menu', "xmgl");
+ wx.redirectTo({
+ url: '../../project_more/index'
+ })
+ },
+
+ /**
+ * 统计代办
+ */
+ awaitTask() {
+ let param = "proId=" + app.globalData.useProjectId;
+ findMyTask(param).then(res => {
+ if (res.code == 200) {
+ let proUserInfo = this.data.subDeptUserInfo;
+ this.setData({
+ aqglDb: proUserInfo.subDeptType == "1" ? res.data.aqgl : 0,
+ zlyhDB: res.data.zlyl,
+ zlglDb: proUserInfo.subDeptType == "1" ? res.data.zlgl : 0,
+ todoDb: proUserInfo.subDeptType == "1" ? (res.data.dwsh + res.data.rysh) : res.data.todo
+ })
+ }
+ });
+ },
+
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_schedule/list/index.json b/yanzhu-ui-app/miniprogram/pageage/project_schedule/list/index.json
new file mode 100644
index 00000000..2dfb8746
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_schedule/list/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-tabbar": "@vant/weapp/tabbar",
+ "van-tabbar-item": "@vant/weapp/tabbar-item"
+ },
+ "navigationStyle": "custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_schedule/list/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_schedule/list/index.wxml
new file mode 100644
index 00000000..e0fb8fe9
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_schedule/list/index.wxml
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+ {{index < 10 ?'0'+(index+1):(index+1)}}
+
+ 填报时间:{{item.createDate}}
+
+
+
+
+
+
+
+
+
+ 计划名称:{{item.taskName}}
+ 完成进度:{{item.schedulePercent}} %
+
+
+
+ 进度描述:{{item.description}}
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+ 新增
+
+
+
+
+
+
+
+
+
+ 项目概况
+
+
+
+
+
+ 安全管理
+ {{aqglDB}}
+
+
+
+
+
+ 质量管理
+ {{zlglDB}}
+
+
+
+
+
+ 进度管理
+
+
+
+
+
+ 项目管理
+ {{todoDb}}
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_schedule/list/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_schedule/list/index.wxss
new file mode 100644
index 00000000..7501bede
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_schedule/list/index.wxss
@@ -0,0 +1,20 @@
+
+element.style {
+}
+.inspect_add_to_copy {
+ position: fixed;
+ right: 30rpx;
+ bottom: 250rpx;
+ width: 120rpx;
+ height: 120rpx;
+ border-radius: 50%;
+ background: #273252;
+ text-align: center;
+ font-size: 26rpx;
+ color: #b0ccf5;
+}
+
+.inspect_add_to_copy image {
+ width: 40rpx;
+ height: 40rpx;
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subdepts/add/index.js b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/add/index.js
new file mode 100644
index 00000000..4cc6860e
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/add/index.js
@@ -0,0 +1,843 @@
+import config from '../../../config'
+import {
+ getToken
+} from '../../../utils/auth'
+import {
+ findDictCache,
+ findCardOcrFront
+} from '../../../api/publics'
+import {
+ registerSubDeptsGL,
+ findProSubDeptsInfoById
+} from '../../../api/project'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ limit: 1,
+ maxDate: new Date(2088, 1, 1).getTime(),
+ form: {
+ subDeptType: "3",
+ subDeptName: "",
+ subDeptCode: "",
+ businessLicensePath: "",
+ subDeptInfos: {
+ legalPersonCardImgPos: "",
+ legalPersonCardImgInv: "",
+ legalPerson: "",
+ legalPersonCard: ""
+ },
+ contractInfos: "",
+ useDates: "",
+ startWorkDates: "",
+ endWorkDates: "",
+ leaderCardImgPos: "",
+ leaderCardImgInv: "",
+ leaderUserPicture: "",
+ subDeptLeaderPowerPath: "",
+ subDeptLeaderName: "",
+ subDeptLeaderCode: "",
+ subDeptLeaderPhone: "",
+ nation: "",
+ nativePlace: "",
+ address: "",
+ emergencyContact: "",
+ contactPhone: "",
+ leaderDegreeGrade: ""
+ },
+ eduCationalType: [],
+ subDeptTypeList: [],
+ active: 0,
+ flowNodes: [{
+ text: '信息登记'
+ }, {
+ text: '信息审核'
+ }, {
+ text: '单位入场'
+ }],
+ loadShow: false,
+ imgBase: config.baseImgUrl,
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ if (options && options.id) {
+ //查询数据回填...
+ this.initData(options.id);
+ }
+ this.setData({
+ "form.projectId": app.globalData.useProjectId,
+ "form.projectName": app.globalData.useProjectName
+ });
+ this.getDictCache();
+ },
+
+ /**
+ * 获取字典缓存数据
+ */
+ getDictCache() {
+ // 初始化单位类型
+ findDictCache("sub_dept_type").then(res => {
+ if (res.code == 200) {
+ let list = [];
+ res.data.forEach(item => {
+ if (item.dictValue != "1") {
+ list.push({
+ "id": item.dictValue,
+ "text": item.dictLabel
+ });
+ }
+ });
+ this.setData({
+ subDeptTypeList: list
+ });
+ }
+ });
+ // 初始化学历类型
+ findDictCache("educational_type").then(res => {
+ if (res.code == 200) {
+ let eduCationalType = [];
+ res.data.forEach(item => {
+ eduCationalType.push({
+ "id": item.dictValue,
+ "text": item.dictLabel
+ });
+ })
+ this.setData({
+ eduCationalType
+ });
+ }
+ })
+ },
+
+ /**
+ * 初始化数据
+ * @param {*} id
+ */
+ initData(id) {
+ findProSubDeptsInfoById(id).then(deptRes => {
+ if (deptRes.code == 200 && deptRes.data) {
+ if (deptRes.data.proProjectInfoSubdeptsUsers) {
+ deptRes.data.leaderDegreeGrade = deptRes.data.proProjectInfoSubdeptsUsers.degreeGrade;
+ deptRes.data.eduFilePath = deptRes.data.proProjectInfoSubdeptsUsers.eduFilePath;
+ deptRes.data.subStep = deptRes.data.proProjectInfoSubdeptsUsers.subStep;
+ if (deptRes.data.proProjectInfoSubdeptsUsers.userPicture) {
+ deptRes.data.leaderUserPicture = (this.data.imgBase + deptRes.data.proProjectInfoSubdeptsUsers.userPicture).split(',');
+ }
+ if (deptRes.data.proProjectInfoSubdeptsUsers.subDeptPowerPath) {
+ deptRes.data.subDeptLeaderPowerPath = (this.data.imgBase + deptRes.data.proProjectInfoSubdeptsUsers.subDeptPowerPath).split(',');
+ }
+ if (deptRes.data.proProjectInfoSubdeptsUsers.userInfos) {
+ let userInfosJSON = JSON.parse(deptRes.data.proProjectInfoSubdeptsUsers.userInfos);
+ if (userInfosJSON.cardImgPos) {
+ deptRes.data.leaderCardImgPos = (this.data.imgBase + userInfosJSON.cardImgPos).split(',');
+ }
+ if (userInfosJSON.cardImgInv) {
+ deptRes.data.leaderCardImgInv = (this.data.imgBase + userInfosJSON.cardImgInv).split(',');
+ }
+ deptRes.data.proProjectInfoSubdeptsUsers.userInfos = userInfosJSON;
+ deptRes.data.nativePlace = userInfosJSON.nativePlace;
+ deptRes.data.nation = userInfosJSON.nation;
+ deptRes.data.address = userInfosJSON.address;
+ deptRes.data.emergencyContact = userInfosJSON.emergencyContact;
+ deptRes.data.contactPhone = userInfosJSON.contactPhone;
+ }
+ }
+ if (deptRes.data.businessLicensePath) {
+ deptRes.data.businessLicensePath = (this.data.imgBase + deptRes.data.businessLicensePath).split(',');
+ }
+ if (deptRes.data.subDeptInfos) {
+ let subDeptInfosJSON = JSON.parse(deptRes.data.subDeptInfos);
+ deptRes.data.subDeptInfos = subDeptInfosJSON;
+ if (deptRes.data.subDeptInfos.legalPersonCardImgPos) {
+ deptRes.data.subDeptInfos.legalPersonCardImgPos = (this.data.imgBase + deptRes.data.subDeptInfos.legalPersonCardImgPos).split(',');
+ }
+ if (deptRes.data.subDeptInfos.legalPersonCardImgInv) {
+ deptRes.data.subDeptInfos.legalPersonCardImgInv = (this.data.imgBase + deptRes.data.subDeptInfos.legalPersonCardImgInv).split(',');
+ }
+ }
+
+
+ this.setData({
+ active: 100,
+ form: deptRes.data
+ });
+ }
+ });
+ },
+
+ //取消页面
+ cancelSaveView() {
+ this.returnToPage()
+ },
+
+ /**
+ * 委托代理提交参建单位信息
+ */
+ submitSubDeptValues() {
+ let {
+ form
+ } = this.data;
+ let subDeptInfos = form.subDeptInfos;
+ if (!subDeptInfos) {
+ subDeptInfos = {};
+ }
+ //数据效验
+ if (!form.projectId) {
+ app.toast("数据异常,请刷新页面重试!")
+ return false;
+ }
+ //数据效验
+ if (!form.subDeptType) {
+ app.toast("请选择单位类型!");
+ return false;
+ }
+ if (!form.subDeptName) {
+ app.toast("请填写单位名称!");
+ return false;
+ }
+ if (!form.subDeptCode) {
+ app.toast("请填写单位社会信用代码!");
+ return false;
+ }
+ if (!form.useDates) {
+ app.toast("请选择进入场地时间!");
+ return false;
+ }
+ if (form.subDeptType == "4" || form.subDeptType == "5") {
+ if (!form.businessLicensePath || form.businessLicensePath.length == 0) {
+ app.toast("请上传营业执照副本!");
+ return false;
+ }
+ if (!subDeptInfos.legalPersonCardImgPos || subDeptInfos.legalPersonCardImgPos.length == 0) {
+ app.toast("请上传法人身份证正面照!");
+ return false;
+ }
+ if (!subDeptInfos.legalPersonCardImgInv || subDeptInfos.legalPersonCardImgInv.length == 0) {
+ app.toast("请上传法人身份证反面照!");
+ return false;
+ }
+ if (!subDeptInfos.legalPerson) {
+ app.toast("请填写法人姓名!");
+ return false;
+ }
+ if (!subDeptInfos.legalPersonCard) {
+ app.toast("请填写法人身份证号!");
+ return false;
+ }
+ if (!form.contractInfos) {
+ app.toast("请填写合同约定的承包范围!");
+ return false;
+ }
+ if (!form.startWorkDates) {
+ app.toast("请选择计划开工时间!");
+ return false;
+ }
+ if (!form.endWorkDates) {
+ app.toast("请选择计划完工时间!");
+ return false;
+ }
+ if (!form.leaderCardImgPos || form.leaderCardImgPos.length == 0) {
+ app.toast("请上传委托人身份证正面照!");
+ return false;
+ }
+ if (!form.leaderCardImgInv || form.leaderCardImgInv.length == 0) {
+ app.toast("请上传委托人身份证反面照!");
+ return false;
+ }
+ if (!form.leaderUserPicture || form.leaderUserPicture.length == 0) {
+ app.toast("请上传委托人半身近照!");
+ return false;
+ }
+ if (!form.subDeptLeaderPowerPath || form.subDeptLeaderPowerPath.length == 0) {
+ app.toast("请上传委托人单位委托书!");
+ return false;
+ }
+ if (!form.subDeptLeaderName) {
+ app.toast("请填写委托人姓名!");
+ return false;
+ }
+ if (!form.subDeptLeaderCode) {
+ app.toast("请填写委托人身份证号!");
+ return false;
+ } else {
+ const cardCodePattern = /^[1-9]\d{5}(18|19|20|21|22)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|[Xx])$/;
+ if (!cardCodePattern.test(form.subDeptLeaderCode)) {
+ app.toast("身份证号码不正确!");
+ return false;
+ }
+ }
+ if (!form.subDeptLeaderPhone) {
+ app.toast("请填写委托人联系电话!");
+ return false;
+ }else{
+ const phonePattern = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
+ if (!phonePattern.test(form.subDeptLeaderPhone)) {
+ app.toast("委托人联系电话不正确!");
+ return false;
+ }
+ }
+ if (!form.nativePlace) {
+ app.toast("请填写籍贯!");
+ return false;
+ }
+ if (!form.nation) {
+ app.toast("请填写民族!");
+ return false;
+ }
+ if (!form.address) {
+ app.toast("请填写地址!");
+ return false;
+ }
+ if (!form.emergencyContact) {
+ app.toast("请填写紧急联系人!");
+ return false;
+ }
+ if (!form.contactPhone) {
+ app.toast("请填写紧急联系人电话!");
+ return false;
+ } else {
+ const phonePattern = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
+ if (!phonePattern.test(form.contactPhone)) {
+ app.toast("紧急联系人电话不正确!");
+ return false;
+ }
+ }
+ if (!form.leaderDegreeGrade) {
+ app.toast("请选择委托人学历信息!");
+ return false;
+ }
+ }
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认保存参建单位信息?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitSubDeptForm();
+ }
+ }
+ })
+ },
+
+ /**
+ * 委托代理提交参建单位表单
+ */
+ submitSubDeptForm() {
+ let _form = {
+ ...this.data.form
+ };
+ let subDeptInfos = {
+ ..._form.subDeptInfos
+ };
+ this.setData({
+ loadShow: true
+ })
+ let uploadFiles = [];
+ if (_form.businessLicensePath && _form.businessLicensePath.length > 0) {
+ uploadFiles.push({
+ type: 'businessLicensePath',
+ path: _form.businessLicensePath[0]
+ });
+ }
+ if (subDeptInfos.legalPersonCardImgPos && subDeptInfos.legalPersonCardImgPos.length > 0) {
+ uploadFiles.push({
+ type: 'legalPersonCardImgPos',
+ path: subDeptInfos.legalPersonCardImgPos[0]
+ });
+ }
+ if (subDeptInfos.legalPersonCardImgInv && subDeptInfos.legalPersonCardImgInv.length > 0) {
+ uploadFiles.push({
+ type: 'legalPersonCardImgInv',
+ path: subDeptInfos.legalPersonCardImgInv[0]
+ });
+ }
+ if (_form.leaderCardImgPos && _form.leaderCardImgPos.length > 0) {
+ uploadFiles.push({
+ type: 'leaderCardImgPos',
+ path: _form.leaderCardImgPos[0]
+ });
+ }
+ if (_form.leaderCardImgInv && _form.leaderCardImgInv.length > 0) {
+ uploadFiles.push({
+ type: 'leaderCardImgInv',
+ path: _form.leaderCardImgInv[0]
+ });
+ }
+ if (_form.leaderUserPicture && _form.leaderUserPicture.length > 0) {
+ uploadFiles.push({
+ type: 'leaderUserPicture',
+ path: _form.leaderUserPicture[0]
+ });
+ }
+ if (_form.subDeptLeaderPowerPath && _form.subDeptLeaderPowerPath.length > 0) {
+ uploadFiles.push({
+ type: 'subDeptLeaderPowerPath',
+ path: _form.subDeptLeaderPowerPath[0]
+ });
+ }
+ let that = this;
+ let uploads = [];
+ if (uploadFiles.length > 0) {
+ uploadFiles.forEach(async (item) => {
+ let obj;
+ if (item.path.indexOf(this.data.imgBase) > -1) {
+ obj = {
+ data: {
+ data: {
+ url: item.path.replace(this.data.imgBase, "")
+ }
+ }
+ }
+ } else {
+ //这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
+ obj = await that.syncUploadImage(item.path);
+ }
+ if (item.type == "businessLicensePath") {
+ _form.businessLicensePath = obj.data.data.url;
+ }
+ if (item.type == "legalPersonCardImgPos") {
+ subDeptInfos.legalPersonCardImgPos = obj.data.data.url;
+ }
+ if (item.type == "legalPersonCardImgInv") {
+ subDeptInfos.legalPersonCardImgInv = obj.data.data.url;
+ }
+ if (item.type == "leaderCardImgPos") {
+ _form.leaderCardImgPos = obj.data.data.url;
+ }
+ if (item.type == "leaderCardImgInv") {
+ _form.leaderCardImgInv = obj.data.data.url;
+ }
+ if (item.type == "leaderUserPicture") {
+ _form.leaderUserPicture = obj.data.data.url;
+ }
+ if (item.type == "subDeptLeaderPowerPath") {
+ _form.subDeptLeaderPowerPath = obj.data.data.url;
+ }
+ uploads.push(obj.data.data.url);
+ //验证图片上传完毕
+ if (uploads.length == uploadFiles.length) {
+ _form.subDeptInfos = JSON.stringify(subDeptInfos);
+ let leaderUserInfos = {};
+ leaderUserInfos.nation = _form.nation;
+ leaderUserInfos.nativePlace = _form.nativePlace;
+ leaderUserInfos.address = _form.address;
+ leaderUserInfos.emergencyContact = _form.emergencyContact;
+ leaderUserInfos.contactPhone = _form.contactPhone;
+ leaderUserInfos.cardImgPos = _form.leaderCardImgPos;
+ leaderUserInfos.cardImgInv = _form.leaderCardImgInv;
+ _form.leaderUserInfos = JSON.stringify(leaderUserInfos);
+ if (_form.proProjectInfoSubdeptsUsers && _form.proProjectInfoSubdeptsUsers.userInfos) {
+ _form.proProjectInfoSubdeptsUsers.userInfos = JSON.stringify(_form.proProjectInfoSubdeptsUsers.userInfos);
+ }
+ registerSubDeptsGL(_form).then(res => {
+ this.setData({
+ loadShow: false
+ });
+ if (res.code == 200) {
+ app.toast("保存数据成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: `../list/index`,
+ })
+ }, 200)
+ }
+ });
+ }
+ });
+ } else {
+ _form.subDeptInfos = JSON.stringify(subDeptInfos);
+ let leaderUserInfos = {};
+ leaderUserInfos.nation = _form.nation;
+ leaderUserInfos.nativePlace = _form.nativePlace;
+ leaderUserInfos.address = _form.address;
+ leaderUserInfos.emergencyContact = _form.emergencyContact;
+ leaderUserInfos.contactPhone = _form.contactPhone;
+ leaderUserInfos.cardImgPos = _form.leaderCardImgPos;
+ leaderUserInfos.cardImgInv = _form.leaderCardImgInv;
+ _form.leaderUserInfos = JSON.stringify(leaderUserInfos);
+ registerSubDeptsGL(_form).then(res => {
+ this.setData({
+ loadShow: false
+ });
+ if (res.code == 200) {
+ app.toast("新增数据成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: `../list/index`,
+ })
+ }, 200)
+ }
+ });
+ }
+ },
+
+ //选择单位类型
+ onSubDeptType(e) {
+ this.setData({
+ "form.subDeptType": e.detail.id
+ })
+ },
+
+ //填写单位名称
+ onSubDeptName(e) {
+ this.setData({
+ "form.subDeptName": e.detail.value
+ })
+ },
+
+ //填写信用代码
+ onSubDeptCode(e) {
+ this.setData({
+ "form.subDeptCode": e.detail.value
+ })
+ },
+
+ /**
+ * 营业执照副本
+ * @param {*} options
+ */
+ fileUpload0(options) {
+ let file = options.detail;
+ this.setData({
+ "form.businessLicensePath": file
+ });
+ },
+
+ /**
+ * 法人身份证正面
+ * @param {*} options
+ */
+ fileUpload1(options) {
+ let file = options.detail;
+ this.setData({
+ "form.subDeptInfos.legalPersonCardImgPos": file
+ });
+ file.forEach(async (item, idx) => {
+ let obj = await this.syncUploadImage(item);
+ findCardOcrFront(obj.data.data.url).then(res => {
+ if (res.code == 200) {
+ this.setData({
+ "form.subDeptInfos.legalPerson": res.data.name,
+ "form.subDeptInfos.legalPersonCard": res.data.cardId
+ })
+ if (!res.data.name || !res.data.cardId) {
+ this.setData({
+ "form.subDeptInfos.legalPersonCardImgPos": []
+ });
+ app.toast("身份证正面照识别失败!请重新上传");
+ }
+ }
+ });
+ })
+ },
+
+ /**
+ * 法人身份证反面
+ * @param {*} options
+ */
+ fileUpload2(options) {
+ let file = options.detail;
+ this.setData({
+ "form.subDeptInfos.legalPersonCardImgInv": file
+ });
+ },
+
+ /** 单位法人姓名 */
+ inputInfoslegalPerson(e) {
+ this.setData({
+ "form.subDeptInfos.legalPerson": e.detail.value
+ })
+ },
+
+ /** 单位法人身份证号 */
+ inputInfoslegalPersonCard(e) {
+ this.setData({
+ "form.subDeptInfos.legalPersonCard": e.detail.value
+ })
+ },
+
+ /** 合同约定的承包范围 */
+ inputContractInfos(e) {
+ this.setData({
+ "form.contractInfos": e.detail.value
+ })
+ },
+
+ /** 进入场地时间 */
+ onInputTime0(e) {
+ this.setData({
+ "form.useDates": e.detail
+ })
+ },
+
+ /** 计划开工时间 */
+ onInputTime1(e) {
+ this.setData({
+ "form.startWorkDates": e.detail
+ })
+ },
+
+ /** 计划完工时间 */
+ onInputTime2(e) {
+ this.setData({
+ "form.endWorkDates": e.detail
+ })
+ },
+
+ /**
+ * 委托人身份证反面
+ * @param {*} options
+ */
+ fileUpload3(options) {
+ let file = options.detail;
+ this.setData({
+ "form.leaderCardImgPos": file
+ });
+ file.forEach(async (item, idx) => {
+ let obj = await this.syncUploadImage(item);
+ findCardOcrFront(obj.data.data.url).then(res => {
+ if (res.code == 200) {
+ this.setData({
+ "form.subDeptLeaderName": res.data.name,
+ "form.subDeptLeaderCode": res.data.cardId,
+ "form.nation": res.data.nation,
+ "form.nativePlace": res.data.native,
+ "form.address": res.data.address
+ })
+ if (!res.data.name || !res.data.cardId) {
+ this.setData({
+ "form.leaderCardImgPos": []
+ });
+ app.toast("身份证正面照识别失败!请重新上传");
+ }
+ }
+ });
+ })
+ },
+
+ /**
+ * 委托人身份证反面
+ * @param {*} options
+ */
+ fileUpload4(options) {
+ let file = options.detail;
+ this.setData({
+ "form.leaderCardImgInv": file
+ });
+ },
+
+ /**
+ * 委托人半身照
+ * @param {*} options
+ */
+ fileUpload5(options) {
+ let file = options.detail;
+ this.setData({
+ "form.leaderUserPicture": file
+ });
+ },
+
+ /**
+ * 委托人委托书
+ * @param {*} options
+ */
+ fileUpload6(options) {
+ let file = options.detail;
+ this.setData({
+ "form.subDeptLeaderPowerPath": file
+ });
+ },
+
+ /**
+ * 输入负责人姓名
+ * @param {*} e
+ */
+ inputLeaderName(e) {
+ this.setData({
+ "form.subDeptLeaderName": e.detail.value
+ })
+ },
+
+ /**
+ * 输入负责人身份证号
+ * @param {*} e
+ */
+ inputLeaderCode(e) {
+ this.setData({
+ "form.subDeptLeaderCode": e.detail.value
+ })
+ },
+
+ /**
+ * 输入负责人联系电话
+ * @param {*} e
+ */
+ subDeptLeaderPhone(e) {
+ this.setData({
+ "form.subDeptLeaderPhone": e.detail.value
+ })
+ },
+
+ /**
+ * 个人籍贯
+ * @param {*} e
+ */
+ inputOriginNative(e) {
+ this.setData({
+ "form.nativePlace": e.detail.value
+ })
+ },
+
+ /**
+ * 个人民族
+ * @param {*} e
+ */
+ inputOriginNation(e) {
+ this.setData({
+ "form.nation": e.detail.value
+ })
+ },
+
+ /**
+ * 个人籍贯地址
+ * @param {*} e
+ */
+ inputOriginAddress(e) {
+ this.setData({
+ "form.address": e.detail.value
+ })
+ },
+
+ /**
+ * 紧急联系人
+ * @param {*} e
+ */
+ inputUrgentUser(e) {
+ this.setData({
+ "form.emergencyContact": e.detail.value
+ })
+ },
+
+ /**
+ * 紧急联系人电话
+ * @param {*} e
+ */
+ inputUrgentUserPhone(e) {
+ this.setData({
+ "form.contactPhone": e.detail.value
+ })
+ },
+
+ /**
+ * 文化程度
+ * @param {*} e
+ */
+ onLeaderDegreeGrade(e) {
+ this.setData({
+ "form.leaderDegreeGrade": e.detail.id
+ })
+ },
+
+ /**
+ * 这里考虑上传图片异步问题,封装为同步
+ */
+ syncUploadImage(file) {
+ let _baseUrl = config.baseUrl;
+ return new Promise((resolve, reject) => {
+ wx.uploadFile({
+ url: _baseUrl + "/file/upload", // 上传的服务器接口地址
+ filePath: file,
+ header: {
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
+ 'Authorization': 'Bearer ' + getToken()
+ },
+ name: "file", //上传的所需字段,后端提供
+ formData: {},
+ success: (res) => {
+ // 上传完成操作
+ const data = JSON.parse(res.data)
+ resolve({
+ data: data
+ })
+ },
+ fail: (err) => {
+ //上传失败:修改pedding为reject
+ console.log("访问接口失败", err);
+ wx.showToast({
+ title: "网络出错,上传失败",
+ icon: 'none',
+ duration: 1000
+ });
+ reject(err)
+ }
+ });
+ })
+ },
+
+ returnToPage: function () {
+ wx.redirectTo({
+ url: `../list/index`
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subdepts/add/index.json b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/add/index.json
new file mode 100644
index 00000000..6d420795
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/add/index.json
@@ -0,0 +1,8 @@
+{
+ "usingComponents": {
+ "van-steps": "@vant/weapp/steps/index",
+ "van-notice-bar": "@vant/weapp/notice-bar/index",
+ "van-overlay": "@vant/weapp/overlay/index"
+ },
+ "navigationStyle": "custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subdepts/add/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/add/index.wxml
new file mode 100644
index 00000000..4fee2ebe
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/add/index.wxml
@@ -0,0 +1,234 @@
+
+
+
+
+
+ {{form.projectName}}
+
+
+ 单位类型
+ [不可修改]
+
+
+
+
+
+
+ 单位类型
+
+
+
+
+
+ 单位名称
+
+
+
+
+
+ 社会信用代码
+
+
+
+
+
+ 营业执照副本
+ [有效期内的清晰扫描照片]
+
+
+
+
+
+
+
+
+ 法人身份证正面
+
+
+
+
+
+
+ 法人身份证反面
+
+
+
+
+
+
+
+
+ 法定代表人姓名
+ [不可输入,证件自动识别]
+
+
+
+
+
+
+ 法定代表人身份证号
+ [不可输入,证件自动识别]
+
+
+
+
+
+
+ 合同约定的承包范围
+
+
+
+
+
+ 进入场地时间
+
+
+
+
+
+ 计划开工时间
+
+
+
+
+
+ 计划完工时间
+
+
+
+
+
+
+
+ 代理人证件正面
+
+
+
+
+
+
+ 代理人证件反面
+
+
+
+
+
+
+
+
+ 代理人半身照
+ [进场扫脸,请上传清晰照片]
+
+
+
+
+
+
+ 代理人委托书
+ [需加盖劳务单位的公章委托书照片]
+
+
+
+
+
+
+ 委托代理人姓名
+ [不可输入,证件自动识别]
+
+
+
+
+
+
+ 委托代理人身份证号
+ [不可输入,证件自动识别]
+
+
+
+
+
+
+ 委托代理人联系电话
+ [不可修改]
+
+
+
+
+
+
+ 委托代理人联系电话
+
+
+
+
+
+ 民族
+ [不可输入,证件自动识别]
+
+
+
+
+
+
+ 籍贯
+ [不可输入,证件自动识别]
+
+
+
+
+
+
+ 地址
+ [不可输入,证件自动识别]
+
+
+
+
+
+
+ 紧急联系人
+
+
+
+
+
+ 紧急联系人电话
+
+
+
+
+
+ 代理人文化程度
+
+
+
+
+
+ {{form.id?'修改':'新增'}}单位信息不进入审核流程、{{form.id?'修改':'新增'}}后立即生效。
+
+
+
+ 取消
+ 提交保存
+
+
+
+
+
+
+ 数据处理中!请稍后...
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subdepts/add/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/add/index.wxss
new file mode 100644
index 00000000..f820eab8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/add/index.wxss
@@ -0,0 +1,11 @@
+.van-steps {
+ background-color: transparent !important;
+}
+
+.van-step--horizontal .van-step__circle-container {
+ background-color: transparent !important;
+}
+
+.van-steps--horizontal {
+ padding: 10px 20px !important;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subdepts/info/index.js b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/info/index.js
new file mode 100644
index 00000000..9786afa4
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/info/index.js
@@ -0,0 +1,261 @@
+import config from '../../../config'
+import {
+ getToken
+} from '../../../utils/auth'
+import {
+ editSubDeptsUseStatus,
+ findProSubDeptsInfoById
+} from '../../../api/project'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ active: 100,
+ flowNodes: [{
+ text: '信息登记'
+ }, {
+ text: '信息审核'
+ }, {
+ text: '单位入场'
+ }],
+ form: {
+ subDeptInfos: {}
+ },
+ subDeptUserData: {
+ userInfos: {},
+ },
+ imgBaseUrl: config.baseImgUrl
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ if (options && options.id) {
+ //查询数据回填...
+ this.initData(options.id);
+ }
+ },
+
+ /**
+ * 初始化数据
+ * @param {*} id
+ */
+ initData(id) {
+ findProSubDeptsInfoById(id).then(deptRes => {
+ if (deptRes.code == 200 && deptRes.data) {
+ if (deptRes.data.proProjectInfoSubdeptsUsers) {
+ deptRes.data.leaderDegreeGrade = deptRes.data.proProjectInfoSubdeptsUsers.degreeGrade;
+ deptRes.data.eduFilePath = deptRes.data.proProjectInfoSubdeptsUsers.eduFilePath;
+ deptRes.data.subStep = deptRes.data.proProjectInfoSubdeptsUsers.subStep;
+ if (deptRes.data.proProjectInfoSubdeptsUsers.userPicture) {
+ deptRes.data.leaderUserPicture = deptRes.data.proProjectInfoSubdeptsUsers.userPicture.split(',');
+ }
+ if (deptRes.data.proProjectInfoSubdeptsUsers.subDeptPowerPath) {
+ deptRes.data.subDeptLeaderPowerPath = deptRes.data.proProjectInfoSubdeptsUsers.subDeptPowerPath.split(',');
+ }
+ if (deptRes.data.proProjectInfoSubdeptsUsers.userInfos) {
+ let userInfosJSON = JSON.parse(deptRes.data.proProjectInfoSubdeptsUsers.userInfos);
+ if (userInfosJSON.cardImgPos) {
+ deptRes.data.leaderCardImgPos = userInfosJSON.cardImgPos.split(',');
+ }
+ if (userInfosJSON.cardImgInv) {
+ deptRes.data.leaderCardImgInv = userInfosJSON.cardImgInv.split(',');
+ }
+ deptRes.data.proProjectInfoSubdeptsUsers.userInfos = userInfosJSON;
+ deptRes.data.nativePlace = userInfosJSON.nativePlace;
+ deptRes.data.nation = userInfosJSON.nation;
+ deptRes.data.address = userInfosJSON.address;
+ deptRes.data.emergencyContact = userInfosJSON.emergencyContact;
+ deptRes.data.contactPhone = userInfosJSON.contactPhone;
+ }
+ }
+ if (deptRes.data.businessLicensePath) {
+ deptRes.data.businessLicensePath = deptRes.data.businessLicensePath.split(',');
+ }
+ if (deptRes.data.subDeptInfos) {
+ let subDeptInfosJSON = JSON.parse(deptRes.data.subDeptInfos);
+ deptRes.data.subDeptInfos = subDeptInfosJSON;
+ if (deptRes.data.subDeptInfos.legalPersonCardImgPos) {
+ deptRes.data.subDeptInfos.legalPersonCardImgPos = deptRes.data.subDeptInfos.legalPersonCardImgPos.split(',');
+ }
+ if (deptRes.data.subDeptInfos.legalPersonCardImgInv) {
+ deptRes.data.subDeptInfos.legalPersonCardImgInv = deptRes.data.subDeptInfos.legalPersonCardImgInv.split(',');
+ }
+ }
+ let _subDeptUserData = {
+ userInfos: {}
+ };
+ if (deptRes.data.proProjectInfoSubdeptsUsers) {
+ _subDeptUserData = deptRes.data.proProjectInfoSubdeptsUsers;
+ }
+ this.setData({
+ active: 100,
+ form: deptRes.data,
+ subDeptUserData: _subDeptUserData
+ });
+ }
+ });
+ },
+
+ /**
+ * 返回上页
+ */
+ returnToPage: function () {
+ wx.redirectTo({
+ url: `../list/index`
+ })
+ },
+
+ /**
+ * 展示图片
+ * @param {*} e
+ */
+ showImg: function (e) {
+ let paths = e.target.dataset.set;
+ let path = [];
+ paths.split(',').forEach(url => {
+ path.push(config.baseImgUrl + url);
+ });
+ wx.previewImage({
+ urls: path,
+ current: path[0]
+ })
+ },
+
+ /**
+ * 下载并打开文档
+ * @param {*} e
+ */
+ downFile: function (e) {
+ let path = this.data.subDeptUserData.eduFilePath;
+ wx.downloadFile({
+ // 示例 url,并非真实存在
+ url: config.baseUrl + '/file/download?fileName=' + path,
+ header: {
+ 'Authorization': 'Bearer ' + getToken()
+ },
+ success: function (res) {
+ const filePath = res.tempFilePath
+ let fpt = path.split(".");
+ wx.openDocument({
+ filePath: filePath,
+ fileType: fpt[fpt.length - 1],
+ success: function (res) {
+ console.log('打开文档成功')
+ },
+ fail: function (res) {
+ console.log(res)
+ }
+ })
+ }
+ })
+ },
+
+ /**
+ * 单位入场
+ */
+ submitSubDeptsIn(){
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认参建单位入场?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitSubDeptsUseStatus(0);
+ }
+ }
+ })
+ },
+
+ /**
+ * 单位离场
+ */
+ submitSubDeptsOut(){
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认参建单位离场?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitSubDeptsUseStatus(1);
+ }
+ }
+ })
+ },
+
+ /**
+ * 表单提交
+ */
+ submitSubDeptsUseStatus(status){
+ editSubDeptsUseStatus(this.data.form.id,status).then(res =>{
+ if(res.code==200){
+ app.toast("操作成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: `../list/index`,
+ })
+ }, 200)
+ }
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subdepts/info/index.json b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/info/index.json
new file mode 100644
index 00000000..c6d742f6
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/info/index.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "van-steps": "@vant/weapp/steps/index"
+ },
+ "navigationStyle": "custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subdepts/info/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/info/index.wxml
new file mode 100644
index 00000000..bfb524b1
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/info/index.wxml
@@ -0,0 +1,277 @@
+
+
+
+
+
+ {{form.projectName}}
+
+
+
+
+ 单位类型
+ {{form.subDeptTypeName}}
+
+
+
+
+ 单位名称
+ {{form.subDeptName}}
+
+
+
+
+ 信用代码
+ {{form.subDeptCode}}
+
+
+
+
+ 营业执照
+
+
+
+
+
+
+
+
+
+
+
+ 法人姓名
+ {{form.subDeptInfos.legalPerson}}
+
+
+
+
+ 法人身份证
+ {{form.subDeptInfos.legalPersonCard}}
+
+
+
+
+ 法人证件
+
+
+
+
+
+
+
+
+
+
+
+
+ 进入场地时间
+ {{form.useDates}}
+
+
+
+
+ 计划开工时间
+ {{form.startWorkDates}}
+
+
+
+
+ 计划完工时间
+ {{form.endWorkDates}}
+
+
+
+
+ 合同约定范围
+ {{form.contractInfos}}
+
+
+
+
+
+ 代理人证件
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 半身近照
+
+
+
+
+
+
+
+
+
+
+
+
+ 委托代理人
+
+ {{subDeptUserData.userName}}
+
+
+
+
+
+ 身份证号码
+
+ {{subDeptUserData.cardCode}}
+
+
+
+
+ 民族
+ {{subDeptUserData.userInfos.nation}}
+
+
+
+
+ 籍贯
+ {{subDeptUserData.userInfos.nativePlace}}
+
+
+
+
+ 详细地址
+ {{subDeptUserData.userInfos.address}}
+
+
+
+
+ 单位委托书
+
+
+
+
+
+
+
+
+
+
+
+ 联系电话
+ {{subDeptUserData.userPhone}}
+
+
+
+
+ 紧急联系人
+ {{subDeptUserData.userInfos.emergencyContact}}
+
+
+
+
+ 紧急联系电话
+ {{subDeptUserData.userInfos.contactPhone}}
+
+
+
+
+ 开户行名称
+ {{subDeptUserData.userInfos.bankName}}
+
+
+
+
+ 开户行网点
+ {{subDeptUserData.userInfos.bankOffice}}
+
+
+
+
+ 工资银行卡号
+ {{subDeptUserData.userInfos.bankCardNo}}
+
+
+
+ 高血压、心脏病等基础身体健康问题
+
+
+ 无
+ 有
+
+
+
+ 严重呼吸系统疾病、严重心脑血管疾病、肝肾疾病、恶性肿瘤以及药物无法有效控制的高血压和糖尿病等基础性病症状征兆
+
+
+ 无
+ 有
+
+
+
+
+ 安全承诺书
+
+
+ 点击下载安全承诺书
+
+
+
+
+
+
+ 入场状态
+
+ 已入场
+ 已离场
+
+
+
+
+
+ 审批状态
+
+ 待提交
+ 审核中
+ 审核驳回
+ 审核通过
+ 系统免审
+
+
+
+
+
+ 数据来源
+ {{subDeptUserData.createBy}}
+
+
+
+
+ 创建时间
+ {{subDeptUserData.createTime}}
+
+
+
+
+
+ 返回取消
+ 单位离场
+ 单位入场
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subdepts/info/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/info/index.wxss
new file mode 100644
index 00000000..5f49f05d
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/info/index.wxss
@@ -0,0 +1,11 @@
+.van-steps {
+ background-color: transparent !important;
+}
+
+.van-step--horizontal .van-step__circle-container {
+ background-color: transparent !important;
+}
+
+.van-steps--horizontal {
+ padding: 10px 20px !important;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subdepts/list/index.js b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/list/index.js
new file mode 100644
index 00000000..cae59555
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/list/index.js
@@ -0,0 +1,220 @@
+import {
+ getToken
+} from '../../../utils/auth'
+import {
+ subdeptsList,
+ subdeptsCount
+} from '../../../api/project'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ addFlag: false,
+ initData: {},
+ pageNum: 1,
+ pageSize: 10,
+ total: 0,
+ listData: [],
+ activeState: "0",
+ yrcCount: 0,
+ ylcCount: 0
+ },
+
+ //项目切换 返回值
+ onProjectSelect(e) {
+ let projectId = e.detail.id;
+ let projectName = e.detail.text;
+ app.globalData.useProjectId = projectId;
+ app.globalData.useProjectName = projectName;
+ this.onLoad();
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ this.setData({
+ addFlag: true,
+ initData: {
+ id: app.globalData.useProjectId,
+ text: app.globalData.useProjectName,
+ },
+ pageNum: 1,
+ pageSize: 10,
+ listData: [],
+ total: 0
+ });
+ //获取数据列表
+ this.getListData();
+ this.getListCount();
+ },
+
+ /**
+ * 添加按钮
+ */
+ skipAdd() {
+ wx.redirectTo({
+ url: `../add/index`,
+ })
+ },
+
+ /**
+ * 获取详情
+ * @param {*} e
+ */
+ getInfo(e) {
+ let _id = e.currentTarget.dataset.set;
+ wx.redirectTo({
+ url: `../info/index?id=${_id}`,
+ })
+ },
+
+ /**
+ * 修改按钮
+ * @param {*} e
+ */
+ editInfo(e){
+ let _id = e.currentTarget.dataset.set;
+ wx.redirectTo({
+ url: `../add/index?id=${_id}`,
+ })
+ },
+
+ /**
+ * 查询数据列表
+ */
+ getListData() {
+ let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&useStatus=" + this.data.activeState + "&activeTags=finished";
+ subdeptsList(params).then(res => {
+ if (res.code == 200) {
+ this.setData({
+ total: res.total,
+ listData: this.data.listData.concat(res.rows)
+ })
+ }
+ });
+ },
+
+ /**
+ * 统计数据列表
+ */
+ getListCount() {
+ let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&activeTags=finished";
+ subdeptsCount(params).then(res => {
+ if (res.code == 200) {
+ let _yrc = 0,
+ _ylc = 0;
+ res.data.forEach(item => {
+ if (item.useStatus == "0") {
+ _yrc = item.total;
+ } else {
+ _ylc = item.total;
+ }
+ });
+ this.setData({
+ yrcCount: _yrc,
+ ylcCount: _ylc
+ })
+ }
+ });
+ },
+
+ /**
+ * 标签切换
+ */
+ trainJump(e) {
+ let index = e.currentTarget.dataset.index;
+ let nav = "";
+ if (index == 1) {
+ nav = '0';
+ } else {
+ nav = '1';
+ }
+ this.setData({
+ activeState: nav,
+ pageNum: 1,
+ pageSize: 10,
+ listData: [],
+ });
+ this.getListData();
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到其它页面。*/
+ wx.redirectTo({
+ url: '../../project_more/index',
+ })
+ },
+
+ /**
+ * 滚动到底部
+ */
+ onScrollToLower() {
+ let nal = Math.ceil(this.data.total / this.data.pageSize);
+ if (this.data.pageNum < nal) {
+ this.setData({
+ pageNum: this.data.pageNum + 1
+ });
+ this.getListData();
+ } else {
+ console.log("已经到底了,没有数据可加载!!!");
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subdepts/list/index.json b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/list/index.json
new file mode 100644
index 00000000..b76e01d8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/list/index.json
@@ -0,0 +1,8 @@
+{
+ "usingComponents": {
+ "van-collapse": "@vant/weapp/collapse",
+ "van-collapse-item": "@vant/weapp/collapse-item",
+ "van-steps": "@vant/weapp/steps/index"
+ },
+ "navigationStyle":"custom"
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subdepts/list/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/list/index.wxml
new file mode 100644
index 00000000..18f09875
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/list/index.wxml
@@ -0,0 +1,58 @@
+
+
+
+
+ 已入场({{yrcCount}})
+ 已离场({{ylcCount}})
+
+
+
+
+
+
+
+ {{index < 10 ?'0'+(index+1):(index+1)}}
+
+ {{item.subDeptTypeName}}
+
+ 修改
+
+
+
+
+
+ 单位名称:{{item.subDeptName}}
+ 信用代码:{{item.subDeptCode}}
+ 入场时间:{{item.useDates}}
+
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+ 新增
+
+
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subdepts/list/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/list/index.wxss
new file mode 100644
index 00000000..799ac43b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subdepts/list/index.wxss
@@ -0,0 +1,11 @@
+/* pages/project_subDepts/index.wxss */
+.module_see_info_edit {
+ padding-left: 10rpx;
+ color: #91ef4a;
+ display: flex;
+ align-items: center;
+ font-weight: 600;
+ }
+.module_see_info_edit .edit_text{
+ padding-left: 10rpx;
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subgroups/add/index.js b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/add/index.js
new file mode 100644
index 00000000..a8300cc5
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/add/index.js
@@ -0,0 +1,285 @@
+import {
+ getToken
+} from '../../../utils/auth'
+import {
+ findDictCache
+} from '../../../api/publics'
+import {
+ subdeptsList,
+ findSubdeptsGroupById,
+ registerSubDeptsGroupGL
+} from '../../../api/project'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ active: 0,
+ flowNodes: [{
+ text: '信息登记'
+ }, {
+ text: '信息审核'
+ }, {
+ text: '班组入场'
+ }],
+ form: {
+ subDeptId: "",
+ subDeptType: "",
+ subDeptName: "",
+ subDeptCode: "",
+ groupName: "",
+ craftType: "1",
+ craftPost: ""
+ },
+ subDeptList: [],
+ craftPostList: []
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ if (options && options.id) {
+ //查询数据回填...
+ this.initData(options.id);
+ this.getDictCache(options.id);
+ this.getAllSubDepts(options.id);
+ } else {
+ this.getDictCache(null);
+ this.getAllSubDepts(null);
+ }
+ this.setData({
+ "form.projectId": app.globalData.useProjectId,
+ "form.projectName": app.globalData.useProjectName
+ });
+
+ },
+
+ /**
+ * 获取单位
+ */
+ getAllSubDepts(optId) {
+ let params = "pageNum=1&pageSize=1000&useStatus=0&activeTags=finished&projectId=" + app.globalData.useProjectId;
+ subdeptsList(params).then(res => {
+ let list = [];
+ res.rows.forEach(item => {
+ list.push({
+ "id": item.id,
+ "text": item.subDeptName,
+ "type": item.subDeptType,
+ "code": item.subDeptCode,
+ });
+ });
+ this.setData({
+ subDeptList: list
+ });
+ if (!optId) {
+ this.setData({
+ "form.subDeptId": list.length > 0 ? list[0].id : null,
+ "form.subDeptType": list.length > 0 ? list[0].type : null,
+ "form.subDeptName": list.length > 0 ? list[0].text : null,
+ "form.subDeptCode": list.length > 0 ? list[0].code : null
+ });
+ }
+ });
+ },
+
+ /**
+ * 获取字典缓存数据
+ */
+ getDictCache(optId) {
+ /**
+ * 初始化工种类型
+ * (普通工种)
+ */
+ findDictCache("pro_craft_post").then(res => {
+ if (res.code == 200) {
+ let list = [];
+ res.data.forEach(item => {
+ if (item.cssClass == "1") {
+ list.push({
+ "id": item.dictValue,
+ "text": item.dictLabel
+ });
+ }
+ });
+ this.setData({
+ craftPostList: list
+ });
+ if (!optId) {
+ this.setData({
+ "form.craftPost": list[0].id
+ });
+ }
+ }
+ });
+ },
+
+ /**
+ * 初始化数据
+ * @param {*} id
+ */
+ initData(id) {
+ findSubdeptsGroupById(id).then(res => {
+ if (res.code == 200) {
+ this.setData({
+ active: 100,
+ form: res.data
+ });
+ }
+ });
+ },
+
+ /**
+ * 提交班组信息
+ */
+ submitValues() {
+ let {
+ form
+ } = this.data;
+ //数据效验
+ if (!form.projectId) {
+ app.toast("数据异常,请刷新页面重试!")
+ return false;
+ }
+ //数据效验
+ if (!form.craftPost) {
+ app.toast("请选择工种类型!");
+ return false;
+ }
+ if (!form.groupName) {
+ app.toast("请填写班组名称!");
+ return false;
+ }
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认保存单位班组信息?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitSubDeptForm();
+ }
+ }
+ })
+ },
+
+ /**
+ * 提交单位班组信息
+ */
+ submitSubDeptForm() {
+ let _form = {
+ ...this.data.form
+ };
+ this.setData({
+ loadShow: true
+ })
+ registerSubDeptsGroupGL(_form).then(res => {
+ this.setData({
+ loadShow: false
+ });
+ if (res.code == 200) {
+ app.toast("保存数据成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: `../list/index`,
+ })
+ }, 200)
+ }
+ });
+ },
+
+ //选择单位
+ onSubDept(e) {
+ let _list = this.data.subDeptList;
+ _list.forEach(item => {
+ if (item.id == e.detail.id) {
+ this.setData({
+ "form.subDeptId": item.id,
+ "form.subDeptType": item.type,
+ "form.subDeptName": item.text,
+ "form.subDeptCode": item.code
+ })
+ }
+ });
+ },
+
+ /**
+ * 选择工种类型
+ * @param {*} e
+ */
+ onCraftPost(e) {
+ this.setData({
+ "form.craftPost": e.detail.id
+ })
+ },
+
+ //填写班组名称
+ onGroupName(e) {
+ this.setData({
+ "form.groupName": e.detail.value
+ })
+ },
+
+ returnToPage: function () {
+ wx.redirectTo({
+ url: `../list/index`
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subgroups/add/index.json b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/add/index.json
new file mode 100644
index 00000000..6d420795
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/add/index.json
@@ -0,0 +1,8 @@
+{
+ "usingComponents": {
+ "van-steps": "@vant/weapp/steps/index",
+ "van-notice-bar": "@vant/weapp/notice-bar/index",
+ "van-overlay": "@vant/weapp/overlay/index"
+ },
+ "navigationStyle": "custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subgroups/add/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/add/index.wxml
new file mode 100644
index 00000000..a6e411ad
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/add/index.wxml
@@ -0,0 +1,82 @@
+
+
+
+
+
+ {{form.projectName}}
+
+
+ 参建单位
+ [不可修改]
+
+
+
+
+
+
+ 参建单位
+
+
+
+
+
+ 工种类型
+ [不可修改]
+
+
+
+
+
+
+
+
+
+
+
+
+ 工种类型
+
+
+
+
+
+ 班组名称
+
+
+
+
+
+ 系统生成默认班组不可修改。
+
+
+ 只能新增普通劳务班组、管理班组默认已创建。
+
+
+ {{form.id?'修改':'新增'}}班组信息不进入审核流程、{{form.id?'修改':'新增'}}后立即生效。
+
+
+
+ 取消
+ 提交保存
+
+
+
+
+
+
+ 数据处理中!请稍后...
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subgroups/add/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/add/index.wxss
new file mode 100644
index 00000000..f820eab8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/add/index.wxss
@@ -0,0 +1,11 @@
+.van-steps {
+ background-color: transparent !important;
+}
+
+.van-step--horizontal .van-step__circle-container {
+ background-color: transparent !important;
+}
+
+.van-steps--horizontal {
+ padding: 10px 20px !important;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subgroups/info/index.js b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/info/index.js
new file mode 100644
index 00000000..eb998d70
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/info/index.js
@@ -0,0 +1,287 @@
+import {
+ getToken,
+ getUserInfo
+} from '../../../utils/auth'
+import {
+ updateGroupLeader,
+ fileGroupLeaderUsers,
+ findSubdeptsGroupById,
+ editSubGroupsUseStatus
+} from '../../../api/project'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ active: 100,
+ flowNodes: [{
+ text: '信息登记'
+ }, {
+ text: '信息审核'
+ }, {
+ text: '班组入场'
+ }],
+ form: {},
+ editFlag:false,
+ isChange: false,
+ leaderUserList: []
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ const proUserInfo = getUserInfo();
+ this.setData({
+ editFlag: proUserInfo.projectUserInfo.subDeptType=='1'?true:false
+ });
+ if (options && options.id) {
+ //查询数据回填...
+ this.initData(options.id);
+ }
+ },
+
+ /**
+ * 初始化数据
+ * @param {*} id
+ */
+ initData(id) {
+ findSubdeptsGroupById(id).then(res => {
+ if (res.code == 200) {
+ this.setData({
+ active: 100,
+ form: res.data
+ });
+ }
+ });
+ },
+
+ /**
+ * 初始化班组长
+ */
+ initLeaderUser(subDeptId, craftPost) {
+ fileGroupLeaderUsers(subDeptId, craftPost).then(res => {
+ if (res.code == 200) {
+ let list = [];
+ res.data.forEach(item => {
+ let _pst = "";
+ if (item.userPost == "2") {
+ _pst = " [项目经理]"
+ } else if (item.userPost == "6") {
+ _pst = " [材料员]"
+ } else if (item.userPost == "8") {
+ _pst = " [安全员]"
+ }
+ item.text = item.userName + _pst;
+ list.push(item);
+ });
+ this.setData({
+ leaderUserList: list
+ });
+ if (!this.data.form.groupLeaderPhone && list.length > 0) {
+ this.setData({
+ "form.groupLeaderName": list[0].userName,
+ "form.groupLeaderCode": list[0].userCode,
+ "form.groupLeaderPhone": list[0].id,
+ });
+ }
+ }
+ });
+ },
+
+ /**
+ * 返回上页
+ */
+ returnToPage: function () {
+ wx.redirectTo({
+ url: `../list/index`
+ })
+ },
+
+ /**
+ * 班组入场
+ */
+ submitSubDeptsIn() {
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认单位班组入场?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitSubDeptsUseStatus(0);
+ }
+ }
+ })
+ },
+
+ /**
+ * 班组离场
+ */
+ submitSubDeptsOut() {
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认单位班组离场?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitSubDeptsUseStatus(1);
+ }
+ }
+ })
+ },
+
+ /**
+ * 表单提交
+ */
+ submitSubDeptsUseStatus(status) {
+ editSubGroupsUseStatus(this.data.form.id, status).then(res => {
+ if (res.code == 200) {
+ app.toast("操作成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: `../list/index`,
+ })
+ }, 200)
+ }
+ });
+ },
+
+ /**
+ * 变更班组长
+ */
+ changeGroupLeader() {
+ if (this.data.form.groupCode == 'DEFAULT' || this.data.form.groupCode == 'SPECIAL') {
+ app.toast("系统默认班组不能修改班组长信息!")
+ return false;
+ }
+ this.initLeaderUser(this.data.form.subDeptId, this.data.form.craftPost);
+ this.setData({
+ isChange: !this.data.isChange
+ });
+ setTimeout(() => {
+ wx.pageScrollTo({
+ scrollTop: 99999, // 滚动到内容区域的高度,即最底部
+ duration: 100 // 滚动的动画持续时间
+ });
+ }, 500)
+ },
+
+ /**
+ * 修改班组长
+ */
+ onLeaderUser(e) {
+ let _list = this.data.leaderUserList;
+ _list.forEach(item => {
+ if (item.id == e.detail.id) {
+ this.setData({
+ "form.groupLeaderName": item.userName,
+ "form.groupLeaderCode": item.userCode,
+ "form.groupLeaderPhone": item.id,
+ })
+ }
+ });
+ },
+
+ /**
+ * 保存班组长信息
+ */
+ submitSubGroupLeader(){
+ let {
+ form
+ } = this.data;
+ //数据效验
+ if (!form.projectId) {
+ app.toast("数据异常,请刷新页面重试!")
+ return false;
+ }
+ //数据效验
+ if (!form.groupLeaderPhone) {
+ app.toast("请选择班组组长!");
+ return false;
+ }
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认变更班组组长?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitSubGroupLeaderForm(1);
+ }
+ }
+ })
+ },
+
+ /**
+ * 确认变更
+ */
+ submitSubGroupLeaderForm(){
+ updateGroupLeader(this.data.form).then(res =>{
+ if (res.code == 200) {
+ app.toast("变更成功!")
+ this.setData({
+ isChange: !this.data.isChange
+ })
+ this.onLoad({id: this.data.form.id});
+ }
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subgroups/info/index.json b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/info/index.json
new file mode 100644
index 00000000..c6d742f6
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/info/index.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "van-steps": "@vant/weapp/steps/index"
+ },
+ "navigationStyle": "custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subgroups/info/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/info/index.wxml
new file mode 100644
index 00000000..ed70476b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/info/index.wxml
@@ -0,0 +1,139 @@
+
+
+
+
+
+ {{form.projectName}}
+
+
+
+
+ 单位类型
+ {{form.subDeptTypeName}}
+
+
+
+
+ 单位名称
+ {{form.subDeptName}}
+
+
+
+
+ 信用代码
+ {{form.subDeptCode}}
+
+
+
+
+ 工种类型
+
+ 管理人员
+ 特殊工种
+ {{form.craftPostName}}
+
+
+
+
+
+ 班组名称
+ {{form.groupName}}
+
+
+
+
+ 班组代码
+ {{form.groupCode}}
+
+
+
+
+ 组长姓名
+ -
+
+
+
+
+ 组长姓名
+ {{form.groupLeaderName}}
+
+
+
+
+ 组长电话
+ {{form.groupLeaderPhone}}
+
+
+
+
+ 入场状态
+
+ 已入场
+ 已离场
+
+
+
+
+
+ 审批状态
+
+ 待提交
+ 审核中
+ 审核驳回
+ 审核通过
+ 系统免审
+
+
+
+
+
+ 数据来源
+ {{form.createBy}}
+
+
+
+
+ 创建时间
+ {{form.createTime}}
+
+
+
+ 系统生成默认班组
+
+
+
+
+
+ 变更班组长
+
+
+
+ 班组组长
+
+
+
+
+
+
+
+ 返回取消
+ 变更组长
+ 提交保存
+ 班组离场
+ 班组入场
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subgroups/info/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/info/index.wxss
new file mode 100644
index 00000000..5f49f05d
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/info/index.wxss
@@ -0,0 +1,11 @@
+.van-steps {
+ background-color: transparent !important;
+}
+
+.van-step--horizontal .van-step__circle-container {
+ background-color: transparent !important;
+}
+
+.van-steps--horizontal {
+ padding: 10px 20px !important;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subgroups/list/index.js b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/list/index.js
new file mode 100644
index 00000000..e2617122
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/list/index.js
@@ -0,0 +1,230 @@
+import {
+ getToken,
+ getUserInfo
+} from '../../../utils/auth'
+import {
+ subgroupsList,
+ subgroupsCount
+} from '../../../api/project'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ addFlag: false,
+ initData: {},
+ pageNum: 1,
+ pageSize: 1000,
+ total: 0,
+ listData: [],
+ activeState: "0",
+ yrcCount: 0,
+ ylcCount: 0,
+ userInfo:{}
+ },
+
+ //项目切换 返回值
+ onProjectSelect(e) {
+ let projectId = e.detail.id;
+ let projectName = e.detail.text;
+ app.globalData.useProjectId = projectId;
+ app.globalData.useProjectName = projectName;
+ this.onLoad();
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ const proUserInfo = getUserInfo();
+ this.setData({
+ addFlag: proUserInfo.projectUserInfo.subDeptType=='1'?true:false,
+ userInfo: proUserInfo.projectUserInfo,
+ initData: {
+ id: app.globalData.useProjectId,
+ text: app.globalData.useProjectName,
+ },
+ pageNum: 1,
+ pageSize: 1000,
+ listData: [],
+ total: 0
+ });
+ //获取数据列表
+ this.getListData(proUserInfo.projectUserInfo);
+ this.getListCount(proUserInfo.projectUserInfo);
+ },
+
+ /**
+ * 添加按钮
+ */
+ skipAdd() {
+ wx.redirectTo({
+ url: `../add/index`,
+ })
+ },
+
+ /**
+ * 获取详情
+ * @param {*} e
+ */
+ getInfo(e) {
+ let _id = e.currentTarget.dataset.set;
+ wx.redirectTo({
+ url: `../info/index?id=${_id}`,
+ })
+ },
+
+ /**
+ * 修改按钮
+ * @param {*} e
+ */
+ editInfo(e){
+ let _id = e.currentTarget.dataset.set;
+ wx.redirectTo({
+ url: `../add/index?id=${_id}`,
+ })
+ },
+
+ /**
+ * 查询数据列表
+ */
+ getListData(_userInfo) {
+ let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&useStatus=" + this.data.activeState + "&activeTags=finished";
+ if(_userInfo.subDeptType && _userInfo.subDeptType!='1'){
+ params += "&subDeptId="+_userInfo.subDeptId;
+ }
+ subgroupsList(params).then(res => {
+ if (res.code == 200) {
+ this.setData({
+ total: res.total,
+ listData: this.data.listData.concat(res.rows)
+ })
+ }
+ });
+ },
+
+ /**
+ * 统计数据列表
+ */
+ getListCount(_userInfo) {
+ let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&activeTags=finished";
+ if(_userInfo.subDeptType && _userInfo.subDeptType!='1'){
+ params += "&subDeptId="+_userInfo.subDeptId;
+ }
+ subgroupsCount(params).then(res => {
+ if (res.code == 200) {
+ let _yrc = 0,
+ _ylc = 0;
+ res.data.forEach(item => {
+ if (item.useStatus == "0") {
+ _yrc = item.total;
+ } else {
+ _ylc = item.total;
+ }
+ });
+ this.setData({
+ yrcCount: _yrc,
+ ylcCount: _ylc
+ })
+ }
+ });
+ },
+
+ /**
+ * 标签切换
+ */
+ trainJump(e) {
+ let index = e.currentTarget.dataset.index;
+ let nav = "";
+ if (index == 1) {
+ nav = '0';
+ } else {
+ nav = '1';
+ }
+ this.setData({
+ activeState: nav,
+ pageNum: 1,
+ pageSize: 1000,
+ listData: [],
+ });
+ this.getListData(this.data.userInfo);
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到其它页面。*/
+ wx.redirectTo({
+ url: '../../project_more/index',
+ })
+ },
+
+ /**
+ * 滚动到底部
+ */
+ onScrollToLower() {
+ let nal = Math.ceil(this.data.total / this.data.pageSize);
+ if (this.data.pageNum < nal) {
+ this.setData({
+ pageNum: this.data.pageNum + 1
+ });
+ this.getListData(this.data.userInfo);
+ } else {
+ console.log("已经到底了,没有数据可加载!!!");
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subgroups/list/index.json b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/list/index.json
new file mode 100644
index 00000000..45e77c81
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/list/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-cell-group": "@vant/weapp/cell-group",
+ "van-cell": "@vant/weapp/cell"
+ },
+ "navigationStyle":"custom"
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subgroups/list/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/list/index.wxml
new file mode 100644
index 00000000..41879ceb
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/list/index.wxml
@@ -0,0 +1,55 @@
+
+
+
+
+ 已入场({{yrcCount}})
+ 已离场({{ylcCount}})
+
+
+
+
+
+
+
+ {{index < 10 ?'0'+(index+1):(index+1)}}
+
+ {{item.subDepts}}
+
+
+
+
+
+
+ 修改
+
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+ 新增
+
+
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subgroups/list/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/list/index.wxss
new file mode 100644
index 00000000..72a4c319
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subgroups/list/index.wxss
@@ -0,0 +1,14 @@
+/* pages/project_subDepts/index.wxss */
+.module_see_info_edit {
+ color: #91ef4a;
+ font-weight: 600;
+}
+
+.module_see_info_edit .edit_text {
+ padding-left: 10rpx;
+}
+
+.van-cell{
+ color: #89a3ee !important;
+ background-color: #32374c !important;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subusers/add/index.js b/yanzhu-ui-app/miniprogram/pageage/project_subusers/add/index.js
new file mode 100644
index 00000000..a9ddcfa1
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subusers/add/index.js
@@ -0,0 +1,774 @@
+import config from '../../../config'
+import {
+ getToken
+} from '../../../utils/auth'
+import {
+ findDictCache,
+ findCardOcrFront
+} from '../../../api/publics'
+import {
+ subdeptsList,
+ findSubGroupsList,
+ registerSubUsersGL,
+ findProSubUsersInfoById
+} from '../../../api/project'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ limit: 1,
+ maxDate: new Date(2088, 1, 1).getTime(),
+ form: {},
+ active: 0,
+ flowNodes: [{
+ text: '信息登记'
+ }, {
+ text: '信息审核'
+ }, {
+ text: '人员入场'
+ }],
+ subDeptList: [],
+ subGroupList: [],
+ userPostList: [],
+ eduCationalType: [],
+ loadShow: false,
+ imgBase: config.baseImgUrl,
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ if (options && options.id) {
+ //查询数据回填...
+ this.initData(options.id);
+ }
+ this.setData({
+ "form.projectId": app.globalData.useProjectId,
+ "form.projectName": app.globalData.useProjectName
+ });
+ this.getDictCache();
+ this.getAllSubDepts();
+ },
+
+ /**
+ * 获取单位
+ */
+ getAllSubDepts() {
+ let params = "pageNum=1&pageSize=1000&useStatus=0&activeTags=finished&projectId=" + app.globalData.useProjectId;
+ subdeptsList(params).then(res => {
+ let list = [];
+ res.rows.forEach(item => {
+ list.push({
+ "id": item.id,
+ "text": item.subDeptName,
+ "type": item.subDeptType,
+ "typeName": item.subDeptTypeName,
+ "code": item.subDeptCode,
+ });
+ });
+ this.setData({
+ subDeptList: list
+ });
+ });
+ },
+
+ /**
+ * 获取班组
+ */
+ getAllSubGroups(subDeptId) {
+ let params = "pageNum=1&pageSize=1000&useStatus=0&activeTags=finished&projectId=" + app.globalData.useProjectId + "&subDeptId=" + subDeptId;
+ findSubGroupsList(params).then(res => {
+ let list = [];
+ res.rows.forEach(item => {
+ list.push({
+ "id": item.id,
+ "text": item.groupName,
+ "groupCode": item.groupCode,
+ "craftType": item.craftType,
+ "craftTypeName": item.craftTypeName,
+ "craftPost": item.craftPost,
+ "craftPostName": item.craftPostName,
+ });
+ });
+ this.setData({
+ subGroupList: list
+ });
+ });
+ },
+
+ /**
+ * 获取字典缓存数据
+ */
+ getDictCache() {
+ // 初始化学历类型
+ findDictCache("educational_type").then(res => {
+ if (res.code == 200) {
+ let eduCationalType = [];
+ res.data.forEach(item => {
+ eduCationalType.push({
+ "id": item.dictValue,
+ "text": item.dictLabel
+ });
+ })
+ this.setData({
+ eduCationalType
+ });
+ }
+ })
+ },
+
+ /**
+ * 初始化数据
+ * @param {*} id
+ */
+ initData(id) {
+ findProSubUsersInfoById(id).then(userRes => {
+ if (userRes.code == 200 && userRes.data != null) {
+ if (userRes.data.userInfos) {
+ let userInfosJSON = JSON.parse(userRes.data.userInfos);
+ userRes.data.nativePlace = userInfosJSON.nativePlace;
+ userRes.data.nation = userInfosJSON.nation;
+ userRes.data.address = userInfosJSON.address;
+ userRes.data.emergencyContact = userInfosJSON.emergencyContact;
+ userRes.data.contactPhone = userInfosJSON.contactPhone;
+ userRes.data.bankName = userInfosJSON.bankName;
+ userRes.data.bankOffice = userInfosJSON.bankOffice;
+ userRes.data.bankCardNo = userInfosJSON.bankCardNo;
+ userRes.data.cardImgPos = userInfosJSON.cardImgPos;
+ userRes.data.cardImgInv = userInfosJSON.cardImgInv;
+ }
+ if (userRes.data.cardImgPos) {
+ userRes.data.cardImgPos = (this.data.imgBase + userRes.data.cardImgPos).split(',');
+ }
+ if (userRes.data.cardImgInv) {
+ userRes.data.cardImgInv = (this.data.imgBase + userRes.data.cardImgInv).split(',');
+ }
+ if (userRes.data.userPicture) {
+ userRes.data.userPicture = (this.data.imgBase + userRes.data.userPicture).split(',');
+ }
+ if (userRes.data.subDeptPowerPath) {
+ userRes.data.subDeptPowerPath = (this.data.imgBase + userRes.data.subDeptPowerPath).split(',');
+ }
+ userRes.data._userPost = userRes.data.craftPost;
+ this.setData({
+ active: 100,
+ form: userRes.data
+ });
+ this.initUserPostList(userRes.data.craftType,userRes.data.id);
+ }
+ });
+ },
+
+ //取消页面
+ cancelSaveView() {
+ this.returnToPage()
+ },
+
+ /**
+ * 委托代理提交参建单位信息
+ */
+ submitSubUsers() {
+ let {
+ form
+ } = this.data;
+ //数据效验
+ if (!form.projectId) {
+ app.toast("数据异常,请刷新页面重试!")
+ return false;
+ }
+ //数据效验
+ if (!form.subDeptId || !form.subDeptType || !form.subDeptName) {
+ app.toast("请选择参建单位!");
+ return false;
+ }
+ if (!form.subDeptGroup || !form.subDeptGroupName) {
+ app.toast("请选择所属班组!");
+ return false;
+ }
+ if (!form._userPost) {
+ app.toast("请选择工种岗位!");
+ return false;
+ }
+ if (!form.cardImgPos || form.cardImgPos.length == 0) {
+ app.toast("请上传身份证正面照!");
+ return false;
+ }
+ if (!form.cardImgInv || form.cardImgInv.length == 0) {
+ app.toast("请上传身份证反面照!");
+ return false;
+ }
+ if (!form.userPicture || form.userPicture.length == 0) {
+ app.toast("请上传进场半身近照!");
+ return false;
+ }
+ if (form._userPost == '2' || form._userPost == '6') {
+ if (!form.subDeptPowerPath || form.subDeptPowerPath.length == 0) {
+ app.toast("请上传委托人单位委托书!");
+ return false;
+ }
+ }
+ if (!form.userName) {
+ app.toast("请填写人员姓名!");
+ return false;
+ }
+ if (!form.cardCode) {
+ app.toast("请填写身份证号!");
+ return false;
+ } else {
+ const cardCodePattern = /^[1-9]\d{5}(18|19|20|21|22)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|[Xx])$/;
+ if (!cardCodePattern.test(form.cardCode)) {
+ app.toast("身份证号码不正确!");
+ return false;
+ }
+ }
+ if (!form.userPhone) {
+ app.toast("请填写联系电话!");
+ return false;
+ } else {
+ const phonePattern = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
+ if (!phonePattern.test(form.userPhone)) {
+ app.toast("人员联系电话不正确!");
+ return false;
+ }
+ }
+ if (!form.nativePlace) {
+ app.toast("请填写籍贯!");
+ return false;
+ }
+ if (!form.nation) {
+ app.toast("请填写民族!");
+ return false;
+ }
+ if (!form.address) {
+ app.toast("请填写地址!");
+ return false;
+ }
+ if (!form.emergencyContact) {
+ app.toast("请填写紧急联系人!");
+ return false;
+ }
+ if (!form.contactPhone) {
+ app.toast("请填写紧急联系人电话!");
+ return false;
+ } else {
+ const phonePattern = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
+ if (!phonePattern.test(form.contactPhone)) {
+ app.toast("紧急联系人电话不正确!");
+ return false;
+ }
+ }
+ if (!form.degreeGrade) {
+ app.toast("请选择文化程度!");
+ return false;
+ }
+ if (false) {
+ if (!form.bankName) {
+ app.toast("请填写开户银行名称!");
+ return false;
+ }
+ if (!form.bankOffice) {
+ app.toast("请填写开户银行网点!");
+ return false;
+ }
+ if (!form.bankCardNo) {
+ app.toast("请填写工资银行卡号!");
+ return false;
+ }
+ }
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认保存班组人员信息?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitSubUserForm();
+ }
+ }
+ })
+ },
+
+ /**
+ * 委托代理提交参建单位表单
+ */
+ submitSubUserForm() {
+ let _form = {
+ ...this.data.form
+ };
+ this.setData({
+ loadShow: true
+ })
+ let uploadFiles = [];
+ if (_form.cardImgPos && _form.cardImgPos.length > 0) {
+ uploadFiles.push({
+ type: 'cardImgPos',
+ path: _form.cardImgPos[0]
+ });
+ }
+ if (_form.cardImgInv && _form.cardImgInv.length > 0) {
+ uploadFiles.push({
+ type: 'cardImgInv',
+ path: _form.cardImgInv[0]
+ });
+ }
+ if (_form.userPicture && _form.userPicture.length > 0) {
+ uploadFiles.push({
+ type: 'userPicture',
+ path: _form.userPicture[0]
+ });
+ }
+ if (_form.subDeptPowerPath && _form.subDeptPowerPath.length > 0) {
+ uploadFiles.push({
+ type: 'subDeptPowerPath',
+ path: _form.subDeptPowerPath[0]
+ });
+ }
+ let that = this;
+ let uploads = [];
+ uploadFiles.forEach(async (item, idx) => {
+ let obj;
+ if (item.path.indexOf(this.data.imgBase) > -1) {
+ obj = {
+ data: {
+ data: {
+ url: item.path.replace(this.data.imgBase, "")
+ }
+ }
+ }
+ } else {
+ //这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
+ obj = await that.syncUploadImage(item.path);
+ }
+ if (item.type == "cardImgPos") {
+ _form.cardImgPos = obj.data.data.url;
+ }
+ if (item.type == "cardImgInv") {
+ _form.cardImgInv = obj.data.data.url;
+ }
+ if (item.type == "userPicture") {
+ _form.userPicture = obj.data.data.url;
+ }
+ if (item.type == "subDeptPowerPath") {
+ _form.subDeptPowerPath = obj.data.data.url;
+ }
+ uploads.push(obj.data.data.url);
+ //验证图片上传完毕
+ if (uploads.length == uploadFiles.length) {
+ let userInfos = {};
+ userInfos.nation = _form.nation;
+ userInfos.nativePlace = _form.nativePlace;
+ userInfos.address = _form.address;
+ userInfos.emergencyContact = _form.emergencyContact;
+ userInfos.contactPhone = _form.contactPhone;
+ userInfos.bankName = _form.bankName;
+ userInfos.bankOffice = _form.bankOffice;
+ userInfos.bankCardNo = _form.bankCardNo;
+ userInfos.cardImgPos = _form.cardImgPos;
+ userInfos.cardImgInv = _form.cardImgInv;
+ _form.userInfos = JSON.stringify(userInfos);
+ _form.craftPost = _form._userPost;
+ registerSubUsersGL(_form).then(res => {
+ this.setData({
+ loadShow: false
+ });
+ if (res.code == 200) {
+ app.toast("保存数据成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: `../list/index`,
+ })
+ }, 200)
+ }
+ });
+ }
+ });
+ },
+
+ //选择参建单位
+ onSubDept(e) {
+ this.setData({
+ subGroupList: [],
+ userPostList: [],
+ });
+ this.getAllSubGroups(e.detail.id);
+ let _list = this.data.subDeptList;
+ _list.forEach(item => {
+ if (item.id == e.detail.id) {
+ this.setData({
+ "form.subDeptId": item.id,
+ "form.subDeptType": item.type,
+ "form.subDeptTypeName": item.typeName,
+ "form.subDeptName": item.text,
+ "form.subDeptCode": item.code,
+ "form.subDeptGroup": null,
+ "form.subDeptGroupName": null,
+ "form.craftType": null,
+ "form.craftTypeName": null,
+ "form.craftPost": null,
+ "form.craftPostName": null,
+ "form._userPost": null,
+ })
+ }
+ });
+ },
+
+ //选择所属班组
+ onSubGroup(e) {
+ this.setData({
+ userPostList: [],
+ });
+ let _list = this.data.subGroupList;
+ _list.forEach(item => {
+ if (item.id == e.detail.id) {
+ this.setData({
+ "form.subDeptGroup": item.id,
+ "form.subDeptGroupName": item.text,
+ "form.craftType": item.craftType,
+ "form.craftTypeName": item.craftTypeName,
+ "form.craftPost": item.craftPost,
+ "form.craftPostName": item.craftPostName,
+ "form._userPost": item.craftType=='1'?item.craftPost:null,
+ })
+ this.initUserPostList(item.craftType,this.data.form.id);
+ }
+ });
+ },
+
+ /**
+ * 初始化用户岗位
+ */
+ initUserPostList(type,optId) {
+ if (!type) {
+ type == "1";
+ }
+ findDictCache("pro_craft_post").then(res => {
+ if (res.code == 200) {
+ let list = [];
+ res.data.forEach(item => {
+ let _rms = item.remark.split(',');
+ if (item.cssClass == type && _rms.includes(this.data.form.subDeptType)) {
+ if (type == "3") {
+ if (item.dictValue != "3022") {
+ list.push({
+ "id": item.dictValue,
+ "text": item.dictLabel
+ });
+ }
+ } else {
+ list.push({
+ "id": item.dictValue,
+ "text": item.dictLabel
+ });
+ }
+ }
+ });
+ this.setData({
+ userPostList: list
+ });
+ if(!optId && type!="1"){
+ this.setData({
+ "form._userPost": list.length == 1 ? list[0].id : null
+ });
+ }
+ }
+ });
+ },
+
+ /**
+ * 选择工种岗位
+ * @param {*} e
+ */
+ onUserPost(e) {
+ this.setData({
+ "form._userPost": e.detail.id
+ })
+ console.log("form",this.data.form);
+ },
+
+ /**
+ * 个人身份证正面照
+ * @param {*} options
+ */
+ fileUploadCardImgPos(options) {
+ let file = options.detail;
+ this.setData({
+ "form.cardImgPos": file
+ });
+ file.forEach(async (item, idx) => {
+ let obj = await this.syncUploadImage(item);
+ findCardOcrFront(obj.data.data.url).then(res => {
+ if (res.code == 200) {
+ if (res.data.nation.indexOf("族") < 0) {
+ res.data.nation = res.data.nation + "族";
+ }
+ this.setData({
+ "form.userName": res.data.name,
+ "form.cardCode": res.data.cardId,
+ "form.nation": res.data.nation,
+ "form.nativePlace": res.data.native,
+ "form.address": res.data.address
+ })
+ if (!res.data.name || !res.data.cardId) {
+ this.setData({
+ "form.cardImgPos": []
+ });
+ app.toast("身份证正面照识别失败!请重新上传");
+ }
+ }
+ });
+ })
+ },
+
+ /**
+ * 个人身份证反面照
+ * @param {*} options
+ */
+ fileUploadCardImgInv(options) {
+ let file = options.detail;
+ this.setData({
+ "form.cardImgInv": file
+ });
+ },
+
+ /**
+ * 个人半身近照
+ * @param {*} options
+ */
+ fileUploadUserPicture(options) {
+ let file = options.detail;
+ this.setData({
+ "form.userPicture": file
+ });
+ },
+
+ /**
+ * 单位委托书
+ * @param {*} options
+ */
+ fileUploadDeptPower(options) {
+ let file = options.detail;
+ this.setData({
+ "form.subDeptPowerPath": file
+ });
+ },
+
+ /**
+ * 输入个人姓名
+ * @param {*} e
+ */
+ inputUserName(e) {
+ this.setData({
+ "form.userName": e.detail.value
+ })
+ },
+
+ /**
+ * 输入个人身份证号
+ * @param {*} e
+ */
+ inputUserCode(e) {
+ this.setData({
+ "form.cardCode": e.detail.value
+ })
+ },
+
+ /**
+ * 输入联系电话
+ * @param {*} e
+ */
+ inputUserPhone(e) {
+ this.setData({
+ "form.userPhone": e.detail.value
+ })
+ },
+
+ /**
+ * 个人籍贯
+ * @param {*} e
+ */
+ inputOriginNative(e) {
+ this.setData({
+ "form.nativePlace": e.detail.value
+ })
+ },
+
+ /**
+ * 个人民族
+ * @param {*} e
+ */
+ inputOriginNation(e) {
+ this.setData({
+ "form.nation": e.detail.value
+ })
+ },
+
+ /**
+ * 个人籍贯地址
+ * @param {*} e
+ */
+ inputOriginAddress(e) {
+ this.setData({
+ "form.address": e.detail.value
+ })
+ },
+
+ /**
+ * 紧急联系人
+ * @param {*} e
+ */
+ inputUrgentUser(e) {
+ this.setData({
+ "form.emergencyContact": e.detail.value
+ })
+ },
+
+ /**
+ * 紧急联系人电话
+ * @param {*} e
+ */
+ inputUrgentUserPhone(e) {
+ this.setData({
+ "form.contactPhone": e.detail.value
+ })
+ },
+
+ /**
+ * 个人文化程度
+ * @param {*} e
+ */
+ onDegreeGrade(e) {
+ this.setData({
+ "form.degreeGrade": e.detail.id
+ })
+ },
+
+ /**
+ * 开户行名称
+ * @param {*} e
+ */
+ inputBankName(e) {
+ this.setData({
+ "form.bankName": e.detail.value
+ })
+ },
+
+ /**
+ * 开户行网点
+ * @param {*} e
+ */
+ inputBankOffice(e) {
+ this.setData({
+ "form.bankOffice": e.detail.value
+ })
+ },
+
+ /**
+ * 开户行卡号
+ * @param {*} e
+ */
+ inputBankCardNo(e) {
+ this.setData({
+ "form.bankCardNo": e.detail.value
+ })
+ },
+
+ /**
+ * 这里考虑上传图片异步问题,封装为同步
+ */
+ syncUploadImage(file) {
+ let _baseUrl = config.baseUrl;
+ return new Promise((resolve, reject) => {
+ wx.uploadFile({
+ url: _baseUrl + "/file/upload", // 上传的服务器接口地址
+ filePath: file,
+ header: {
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
+ 'Authorization': 'Bearer ' + getToken()
+ },
+ name: "file", //上传的所需字段,后端提供
+ formData: {},
+ success: (res) => {
+ // 上传完成操作
+ const data = JSON.parse(res.data)
+ resolve({
+ data: data
+ })
+ },
+ fail: (err) => {
+ //上传失败:修改pedding为reject
+ console.log("访问接口失败", err);
+ wx.showToast({
+ title: "网络出错,上传失败",
+ icon: 'none',
+ duration: 1000
+ });
+ reject(err)
+ }
+ });
+ })
+ },
+
+ returnToPage: function () {
+ wx.redirectTo({
+ url: `../list/index`
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subusers/add/index.json b/yanzhu-ui-app/miniprogram/pageage/project_subusers/add/index.json
new file mode 100644
index 00000000..6d420795
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subusers/add/index.json
@@ -0,0 +1,8 @@
+{
+ "usingComponents": {
+ "van-steps": "@vant/weapp/steps/index",
+ "van-notice-bar": "@vant/weapp/notice-bar/index",
+ "van-overlay": "@vant/weapp/overlay/index"
+ },
+ "navigationStyle": "custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subusers/add/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_subusers/add/index.wxml
new file mode 100644
index 00000000..4d65ab73
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subusers/add/index.wxml
@@ -0,0 +1,235 @@
+
+
+
+
+
+ {{form.projectName}}
+
+
+ 参建单位
+ [不可修改]
+
+
+
+
+
+
+ 参建单位
+ [不可修改]
+
+
+
+
+
+
+ 单位类型
+ [不可修改]
+
+
+
+
+
+
+ 所属班组
+ [不可修改]
+
+
+
+
+
+
+ 所属班组
+
+
+
+
+
+ 班组岗位
+ [不可修改]
+
+
+
+
+
+
+ 工种岗位
+ [不可修改]
+
+
+
+
+
+
+
+
+
+
+ 工种岗位
+ [不可修改]
+
+
+
+
+
+
+
+
+
+ 班组长不能修改工种岗位。
+
+
+
+
+ 身份证正面
+
+
+
+
+
+
+ 身份证反面
+
+
+
+
+
+
+
+
+ 半身近照
+ [进场扫脸,请上传清晰照片]
+
+
+
+
+
+
+ 劳务单位委托书
+ [需加盖劳务单位的公章委托书照片]
+
+
+
+
+
+
+ 人员姓名
+ [不可输入,证件自动识别]
+
+
+
+
+
+
+ 身份证号
+ [不可输入,证件自动识别]
+
+
+
+
+
+
+ 联系电话
+ [不可修改]
+
+
+
+
+
+
+
+
+
+ 民族
+ [不可输入,证件自动识别]
+
+
+
+
+
+
+ 籍贯
+ [不可输入,证件自动识别]
+
+
+
+
+
+
+ 地址
+ [不可输入,证件自动识别]
+
+
+
+
+
+
+ 紧急联系人
+
+
+
+
+
+ 紧急联系人电话
+
+
+
+
+
+ 文化程度
+
+
+
+
+
+ 开户银行名称
+ [非必填]
+
+
+
+
+
+
+ 开户银行网点
+ [非必填,开户银行地址]
+
+
+
+
+
+
+ 工资银行卡号
+ [非必填]
+
+
+
+
+
+
+ {{form.id?'修改':'新增'}}人员信息不进入审核流程、{{form.id?'修改':'新增'}}后立即生效。
+
+
+
+ 取消
+ 提交保存
+
+
+
+
+
+
+ 数据处理中!请稍后...
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subusers/add/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_subusers/add/index.wxss
new file mode 100644
index 00000000..9febfc43
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subusers/add/index.wxss
@@ -0,0 +1,11 @@
+.van-steps {
+ background-color: transparent !important;
+ }
+
+ .van-step--horizontal .van-step__circle-container {
+ background-color: transparent !important;
+ }
+
+ .van-steps--horizontal {
+ padding: 10px 20px !important;
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subusers/info/index.js b/yanzhu-ui-app/miniprogram/pageage/project_subusers/info/index.js
new file mode 100644
index 00000000..fa5497a8
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subusers/info/index.js
@@ -0,0 +1,327 @@
+import config from '../../../config'
+import {
+ getToken,
+ getUserInfo
+} from '../../../utils/auth'
+import {
+ editSubUsersPhone,
+ editSubUsersUseStatus,
+ findProSubUsersInfoById
+} from '../../../api/project'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ active: 100,
+ flowNodes: [{
+ text: '信息登记'
+ }, {
+ text: '信息审核'
+ }, {
+ text: '人员入场'
+ }],
+ form: {},
+ newUserPhone:"",
+ editFlag:false,
+ isChange: false,
+ imgBaseUrl: config.baseImgUrl
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ const proUserInfo = getUserInfo();
+ this.setData({
+ editFlag: proUserInfo.projectUserInfo.subDeptType=='1'?true:false
+ });
+ if (options && options.id) {
+ //查询数据回填...
+ this.initData(options.id);
+ }
+ },
+
+ /**
+ * 初始化数据
+ * @param {*} id
+ */
+ initData(id) {
+ findProSubUsersInfoById(id).then(userRes => {
+ if (userRes.code == 200 && userRes.data != null) {
+ if (userRes.data.userInfos) {
+ let userInfosJSON = JSON.parse(userRes.data.userInfos);
+ userRes.data.nativePlace = userInfosJSON.nativePlace;
+ userRes.data.nation = userInfosJSON.nation;
+ userRes.data.address = userInfosJSON.address;
+ userRes.data.emergencyContact = userInfosJSON.emergencyContact;
+ userRes.data.contactPhone = userInfosJSON.contactPhone;
+ userRes.data.bankName = userInfosJSON.bankName;
+ userRes.data.bankOffice = userInfosJSON.bankOffice;
+ userRes.data.bankCardNo = userInfosJSON.bankCardNo;
+ userRes.data.cardImgPos = userInfosJSON.cardImgPos;
+ userRes.data.cardImgInv = userInfosJSON.cardImgInv;
+ }
+ if (userRes.data.cardImgPos) {
+ userRes.data.cardImgPos = (this.data.imgBaseUrl + userRes.data.cardImgPos).split(',');
+ }
+ if (userRes.data.cardImgInv) {
+ userRes.data.cardImgInv = (this.data.imgBaseUrl + userRes.data.cardImgInv).split(',');
+ }
+ if (userRes.data.userPicture) {
+ userRes.data.userPicture = (this.data.imgBaseUrl + userRes.data.userPicture).split(',');
+ }
+ if (userRes.data.subDeptPowerPath) {
+ userRes.data.subDeptPowerPath = (this.data.imgBaseUrl + userRes.data.subDeptPowerPath).split(',');
+ }
+ this.setData({
+ active: 100,
+ form: userRes.data
+ });
+ }
+ });
+ },
+
+ /**
+ * 返回上页
+ */
+ returnToPage: function () {
+ wx.redirectTo({
+ url: `../list/index`
+ })
+ },
+
+ /**
+ * 展示图片
+ * @param {*} e
+ */
+ showImg: function (e) {
+ let paths = e.target.dataset.set;
+ let path = [];
+ paths.split(',').forEach(url => {
+ path.push(url);
+ });
+ wx.previewImage({
+ urls: path,
+ current: path[0]
+ })
+ },
+
+ /**
+ * 下载并打开文档
+ * @param {*} e
+ */
+ downFile: function (e) {
+ let path = this.data.form.eduFilePath;
+ wx.downloadFile({
+ // 示例 url,并非真实存在
+ url: config.baseUrl + '/file/download?fileName=' + path,
+ header: {
+ 'Authorization': 'Bearer ' + getToken()
+ },
+ success: function (res) {
+ const filePath = res.tempFilePath
+ let fpt = path.split(".");
+ wx.openDocument({
+ filePath: filePath,
+ fileType: fpt[fpt.length - 1],
+ success: function (res) {
+ console.log('打开文档成功')
+ },
+ fail: function (res) {
+ console.log(res)
+ }
+ })
+ }
+ })
+ },
+
+ /**
+ * 单位入场
+ */
+ submitSubDeptsIn(){
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认班组人员入场?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitSubDeptsUseStatus(0);
+ }
+ }
+ })
+ },
+
+ /**
+ * 单位离场
+ */
+ submitSubDeptsOut(){
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认班组人员离场?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitSubDeptsUseStatus(1);
+ }
+ }
+ })
+ },
+
+ /**
+ * 表单提交
+ */
+ submitSubDeptsUseStatus(status){
+ editSubUsersUseStatus(this.data.form.id,status).then(res =>{
+ if(res.code==200){
+ app.toast("操作成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: `../list/index`,
+ })
+ }, 200)
+ }
+ });
+ },
+
+ /**
+ * 输入联系电话
+ * @param {*} e
+ */
+ inputUserPhone(e) {
+ this.setData({
+ newUserPhone: e.detail.value
+ })
+ },
+
+ /**
+ * 变更手机号
+ */
+ changeUserPhone() {
+ this.setData({
+ isChange: !this.data.isChange
+ });
+ setTimeout(() => {
+ wx.pageScrollTo({
+ scrollTop: 99999, // 滚动到内容区域的高度,即最底部
+ duration: 100 // 滚动的动画持续时间
+ });
+ }, 500)
+ },
+
+ /**
+ *
+ */
+ submitChangePhone(){
+ let {
+ form,
+ newUserPhone
+ } = this.data;
+ if(!newUserPhone){
+ app.toast("请输入新手机号码!")
+ return false;
+ }else{
+ const phonePattern = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
+ if (!phonePattern.test(newUserPhone)) {
+ app.toast("手机号码不正确!");
+ return false;
+ }
+ }
+ let that = this;
+ //弹出确认
+ wx.showModal({
+ title: '提示',
+ content: '是否确认变更人员手机号?',
+ success: function (sm) {
+ if (sm.confirm) {
+ that.submitChangePhoneForm();
+ }
+ }
+ })
+ },
+
+ /**
+ * 确定
+ * 变更手机号
+ */
+ submitChangePhoneForm(){
+ let _form = {
+ ...this.data.form
+ };
+ let {
+ newUserPhone
+ } = this.data;
+ _form.userPhone = newUserPhone;
+ _form.cardImgPos = "";
+ _form.cardImgInv = "";
+ _form.userPicture = "";
+ _form.subDeptPowerPath = "";
+ editSubUsersPhone(_form).then(res =>{
+ if(res.code==200){
+ app.toast("变更成功!")
+ this.setData({
+ isChange: !this.data.isChange
+ })
+ this.onLoad({id: _form.id});
+ }
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subusers/info/index.json b/yanzhu-ui-app/miniprogram/pageage/project_subusers/info/index.json
new file mode 100644
index 00000000..c6d742f6
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subusers/info/index.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "van-steps": "@vant/weapp/steps/index"
+ },
+ "navigationStyle": "custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subusers/info/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_subusers/info/index.wxml
new file mode 100644
index 00000000..8573622a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subusers/info/index.wxml
@@ -0,0 +1,244 @@
+
+
+
+
+
+ {{form.projectName}}
+
+
+
+
+ 单位类型
+ {{form.subDeptTypeName}}
+
+
+
+
+ 单位名称
+ {{form.subDeptName}}
+
+
+
+
+ 所属班组
+ {{form.subDeptGroupName}}
+
+
+
+
+ 工种类型
+ {{form.craftTypeName}}
+
+
+
+
+ 工种岗位
+
+ {{form.craftPostName}}
+ [班组长]
+
+
+
+
+
+ 身份证件
+
+
+
+
+
+
+
+
+
+
+
+
+ 半身近照
+
+
+
+
+
+
+
+
+
+
+
+ 单位委托书
+
+
+
+
+
+
+
+
+
+
+
+
+ 人员姓名
+
+ {{form.userName}}
+
+
+
+
+
+ 身份证号码
+
+ {{form.cardCode}}
+
+
+
+
+ 所属民族
+ {{form.nation}}
+
+
+
+
+ 籍贯地址
+ {{form.nativePlace}}
+
+
+
+
+ 详细地址
+ {{form.address}}
+
+
+
+
+ 联系电话
+ {{form.userPhone}}
+
+
+
+
+ 紧急联系人
+ {{form.emergencyContact}}
+
+
+
+
+ 紧急联系电话
+ {{form.contactPhone}}
+
+
+
+
+ 开户行名称
+ {{form.bankName}}
+
+
+
+
+ 开户行网点
+ {{form.bankOffice}}
+
+
+
+
+ 工资银行卡号
+ {{form.bankCardNo}}
+
+
+
+ 高血压、心脏病等基础身体健康问题
+
+
+ 无
+ 有
+
+
+
+ 严重呼吸系统疾病、严重心脑血管疾病、肝肾疾病、恶性肿瘤以及药物无法有效控制的高血压和糖尿病等基础性病症状征兆
+
+
+ 无
+ 有
+
+
+
+
+ 安全承诺书
+
+
+ 点击下载安全承诺书
+
+
+
+
+
+
+ 入场状态
+
+ 已入场
+ 已离场
+
+
+
+
+
+ 审批状态
+
+ 待提交
+ 审核中
+ 审核驳回
+ 审核通过
+ 系统免审
+
+
+
+
+
+ 数据来源
+ {{form.createBy}}
+
+
+
+
+ 创建时间
+ {{form.createTime}}
+
+
+
+
+
+
+ 变更手机号码
+
+
+
+ 新手机号码
+
+
+
+
+
+
+
+ 返回取消
+ 变更电话
+ 提交保存
+ 人员离场
+ 人员入场
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subusers/info/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_subusers/info/index.wxss
new file mode 100644
index 00000000..5f49f05d
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subusers/info/index.wxss
@@ -0,0 +1,11 @@
+.van-steps {
+ background-color: transparent !important;
+}
+
+.van-step--horizontal .van-step__circle-container {
+ background-color: transparent !important;
+}
+
+.van-steps--horizontal {
+ padding: 10px 20px !important;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subusers/list/index.js b/yanzhu-ui-app/miniprogram/pageage/project_subusers/list/index.js
new file mode 100644
index 00000000..123a6445
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subusers/list/index.js
@@ -0,0 +1,238 @@
+import {
+ getToken,
+ getUserInfo
+} from '../../../utils/auth'
+import {
+ subusersList,
+ subusersCount
+} from '../../../api/project'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ addFlag: false,
+ initData: {},
+ pageNum: 1,
+ pageSize: 10000,
+ total: 0,
+ listData: [],
+ activeState: "0",
+ yrcCount: 0,
+ ylcCount: 0,
+ activeName: "",
+ userInfo:{}
+ },
+
+ //项目切换 返回值
+ onProjectSelect(e) {
+ let projectId = e.detail.id;
+ let projectName = e.detail.text;
+ app.globalData.useProjectId = projectId;
+ app.globalData.useProjectName = projectName;
+ this.onLoad();
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ const proUserInfo = getUserInfo();
+ this.setData({
+ addFlag: proUserInfo.projectUserInfo.subDeptType=='1'?true:false,
+ userInfo: proUserInfo.projectUserInfo,
+ initData: {
+ id: app.globalData.useProjectId,
+ text: app.globalData.useProjectName,
+ },
+ pageNum: 1,
+ pageSize: 10000,
+ listData: [],
+ total: 0
+ });
+ //获取数据列表
+ this.getListData(proUserInfo.projectUserInfo);
+ this.getListCount(proUserInfo.projectUserInfo);
+ },
+
+ /**
+ * 添加按钮
+ */
+ skipAdd() {
+ wx.redirectTo({
+ url: `../add/index`,
+ })
+ },
+
+ /**
+ * 获取详情
+ * @param {*} e
+ */
+ getInfo(e) {
+ let _id = e.currentTarget.dataset.set;
+ wx.redirectTo({
+ url: `../info/index?id=${_id}`,
+ })
+ },
+
+ /**
+ * 修改按钮
+ * @param {*} e
+ */
+ editInfo(e) {
+ let _id = e.currentTarget.dataset.set;
+ wx.redirectTo({
+ url: `../add/index?id=${_id}`,
+ })
+ },
+
+ // 手风琴
+ onChange(e) {
+ this.setData({
+ activeName: e.target.dataset.set
+ });
+ },
+
+ /**
+ * 查询数据列表
+ */
+ getListData(_userInfo) {
+ let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&useStatus=" + this.data.activeState + "&activeTags=finished&searchValue=subUsers";
+ if(_userInfo.subDeptType && _userInfo.subDeptType!='1'){
+ params += "&subDeptId="+_userInfo.subDeptId;
+ }
+ subusersList(params).then(res => {
+ if (res.code == 200) {
+ this.setData({
+ total: res.total,
+ listData: this.data.listData.concat(res.rows)
+ })
+ }
+ });
+ },
+
+ /**
+ * 统计数据列表
+ */
+ getListCount(_userInfo) {
+ let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&activeTags=finished&searchValue=subUsers";
+ if(_userInfo.subDeptType && _userInfo.subDeptType!='1'){
+ params += "&subDeptId="+_userInfo.subDeptId;
+ }
+ subusersCount(params).then(res => {
+ if (res.code == 200) {
+ let _yrc = 0,
+ _ylc = 0;
+ res.data.forEach(item => {
+ if (item.useStatus == "0") {
+ _yrc = item.total;
+ } else {
+ _ylc = item.total;
+ }
+ });
+ this.setData({
+ yrcCount: _yrc,
+ ylcCount: _ylc
+ })
+ }
+ });
+ },
+
+ /**
+ * 标签切换
+ */
+ trainJump(e) {
+ let index = e.currentTarget.dataset.index;
+ let nav = "";
+ if (index == 1) {
+ nav = '0';
+ } else {
+ nav = '1';
+ }
+ this.setData({
+ activeState: nav,
+ pageNum: 1,
+ pageSize: 10000,
+ listData: [],
+ });
+ this.getListData(this.data.userInfo);
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到其它页面。*/
+ wx.redirectTo({
+ url: '../../project_more/index',
+ })
+ },
+
+ /**
+ * 滚动到底部
+ */
+ onScrollToLower() {
+ let nal = Math.ceil(this.data.total / this.data.pageSize);
+ if (this.data.pageNum < nal) {
+ this.setData({
+ pageNum: this.data.pageNum + 1
+ });
+ this.getListData(this.data.userInfo);
+ } else {
+ console.log("已经到底了,没有数据可加载!!!");
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subusers/list/index.json b/yanzhu-ui-app/miniprogram/pageage/project_subusers/list/index.json
new file mode 100644
index 00000000..849b534a
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subusers/list/index.json
@@ -0,0 +1,9 @@
+{
+ "usingComponents": {
+ "van-collapse": "@vant/weapp/collapse",
+ "van-collapse-item": "@vant/weapp/collapse-item",
+ "van-cell-group": "@vant/weapp/cell-group",
+ "van-cell": "@vant/weapp/cell"
+ },
+ "navigationStyle": "custom"
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subusers/list/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_subusers/list/index.wxml
new file mode 100644
index 00000000..0dd394b0
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subusers/list/index.wxml
@@ -0,0 +1,61 @@
+
+
+
+
+ 已入场({{yrcCount}})
+ 已离场({{ylcCount}})
+
+
+
+
+
+
+
+ {{index < 10 ?'0'+(index+1):(index+1)}}
+
+ {{item.subDeptName}}
+
+
+
+
+
+
+
+
+
+ 修改
+
+
+
+
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+ 新增
+
+
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_subusers/list/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_subusers/list/index.wxss
new file mode 100644
index 00000000..d73e4827
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_subusers/list/index.wxss
@@ -0,0 +1,19 @@
+/* pages/project_subDepts/index.wxss */
+.module_see_info_edit {
+ color: #91ef4a;
+ font-weight: 600;
+}
+
+.module_see_info_edit .edit_text {
+ padding-left: 10rpx;
+}
+
+.van-cell{
+ color: #89a3ee !important;
+ background-color: #32374c !important;
+}
+
+.van-collapse-item__content{
+ padding: 0;
+ background-color: transparent !important;
+}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_video/info/index.js b/yanzhu-ui-app/miniprogram/pageage/project_video/info/index.js
new file mode 100644
index 00000000..d072b8e3
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_video/info/index.js
@@ -0,0 +1,102 @@
+import {
+ getToken
+} from '../../../utils/auth'
+import {
+ getYsToken
+} from '../../../api/project'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ ysToken: '',
+ palyUrl: '',
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ this.findYsToken(options.id);
+ this.setData({
+ palyUrl: options.url
+ });
+ },
+
+ findYsToken: function (id) {
+ getYsToken(id).then(res =>{
+ if(res.code==200){
+ this.setData({
+ ysToken: res.msg
+ });
+ }
+ });
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到其它页面。*/
+ wx.redirectTo({
+ url: `../list/index`,
+ })
+ },
+
+ handleError: function () {
+ app.toast("播放监控视频出错了!")
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_video/info/index.json b/yanzhu-ui-app/miniprogram/pageage/project_video/info/index.json
new file mode 100644
index 00000000..b198e222
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_video/info/index.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "ezplayer": "plugin://ezplayer/ezplayer"
+ },
+ "navigationStyle":"custom"
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_video/info/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_video/info/index.wxml
new file mode 100644
index 00000000..89064724
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_video/info/index.wxml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_video/info/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_video/info/index.wxss
new file mode 100644
index 00000000..3376c53b
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_video/info/index.wxss
@@ -0,0 +1 @@
+/* pages/project_video/info/index.wxss */
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_video/list/index.js b/yanzhu-ui-app/miniprogram/pageage/project_video/list/index.js
new file mode 100644
index 00000000..0cd9e333
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_video/list/index.js
@@ -0,0 +1,147 @@
+import {
+ getToken
+} from '../../../utils/auth'
+import {
+ proVideoList
+} from '../../../api/project'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ initData: {},
+ pageNum: 1,
+ pageSize: 10,
+ total: 0,
+ listData: [],
+ },
+
+ //项目切换 返回值
+ onProjectSelect(e) {
+ let projectId = e.detail.id;
+ let projectName = e.detail.text;
+ app.globalData.useProjectId = projectId;
+ app.globalData.useProjectName = projectName;
+ this.onLoad();
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (!getToken()) {
+ wx.redirectTo({
+ url: '../../../pages/login/login',
+ })
+ }
+ this.setData({
+ initData: {
+ id: app.globalData.useProjectId,
+ text: app.globalData.useProjectName,
+ },
+ pageNum: 1,
+ pageSize: 10,
+ listData: [],
+ total: 0
+ });
+ this.getListData();
+ },
+
+ /**
+ * 播放视频
+ * @param {*} e
+ */
+ videoPlay(e) {
+ let {
+ id,
+ url
+ } = e.currentTarget.dataset.set
+ wx.redirectTo({
+ url: `../info/index?id=${id}&url=${url}`,
+ })
+ },
+
+ /**
+ * 查询数据列表
+ */
+ getListData() {
+ let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId;
+ proVideoList(params).then(res => {
+ if (res.code == 200) {
+ this.setData({
+ total: res.total,
+ listData: this.data.listData.concat(res.rows)
+ })
+ }
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ returnToPage: function () {
+ wx.redirectTo({
+ url: '../../project_safety/index',
+ })
+ },
+
+ onScrollToLower() {
+ let nal = Math.ceil(this.data.total / this.data.pageSize);
+ if (this.data.pageNum < nal) {
+ this.setData({
+ pageNum: this.data.pageNum + 1
+ });
+ this.getListData();
+ } else {
+ console.log("已经到底了,没有数据可加载!!!");
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_video/list/index.json b/yanzhu-ui-app/miniprogram/pageage/project_video/list/index.json
new file mode 100644
index 00000000..d98015c7
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_video/list/index.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationStyle":"custom"
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_video/list/index.wxml b/yanzhu-ui-app/miniprogram/pageage/project_video/list/index.wxml
new file mode 100644
index 00000000..86e0dc69
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_video/list/index.wxml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+ {{index < 10 ?'0'+(index+1):(index+1)}}
+
+ {{item.monitorName}}
+
+ {{item.manufacturer}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/project_video/list/index.wxss b/yanzhu-ui-app/miniprogram/pageage/project_video/list/index.wxss
new file mode 100644
index 00000000..d8d08b9c
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/project_video/list/index.wxss
@@ -0,0 +1,18 @@
+/* pages/project_video/list/index.wxss */
+.video-imgage-container {
+ position: relative;
+ }
+ .video-imgage-container .video-image{
+ height: 112px;
+ background: #333333;
+ vertical-align: top;
+ }
+ .video-imgage-container .video-play{
+ position: absolute;
+ display: inline-block;
+ width: 26px;
+ height: 26px;
+ top:43px;
+ left: 45%;
+ z-index: 100;
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/sign_mags/index.js b/yanzhu-ui-app/miniprogram/pageage/sign_mags/index.js
new file mode 100644
index 00000000..110f6731
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/sign_mags/index.js
@@ -0,0 +1,181 @@
+import config from '../../config'
+import {
+ getToken
+} from '../../utils/auth'
+import {
+ submitUserSign,
+ findUserSignList
+} from '../../api/publics'
+import {
+ securitySignFileUpload
+} from '../../utils/request'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ projectId: '',
+ projectName: '',
+ initData: {},
+ signData: {
+ id: null,
+ signetPath: null
+ },
+ signPath: '',
+ imgBaseUrl: config.baseImgUrl
+ },
+
+ //项目切换 返回值
+ onProjectSelect(e) {
+ let projectId = e.detail.id;
+ let projectName = e.detail.text;
+ app.globalData.useProjectId = projectId;
+ app.globalData.useProjectName = projectName;
+ this.onLoad();
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if (getToken()) {
+ this.setData({
+ projectId: app.globalData.useProjectId,
+ projectName: app.globalData.useProjectName,
+ initData: {
+ id: app.globalData.useProjectId,
+ text: app.globalData.useProjectName,
+ }
+ });
+ this.getUserSignList(app.globalData.useProjectId);
+ } else {
+ console.log("未查询到Token...{}...准备重新登录")
+ wx.redirectTo({
+ url: '../../pages/login/login',
+ })
+ }
+ },
+
+ /**
+ * 获取签名
+ * @param {*} proId
+ */
+ getUserSignList(proId) {
+ findUserSignList(proId).then(res => {
+ if (res.code == 200 && res.data.length > 0) {
+ this.setData({
+ signData: res.data[0]
+ });
+ }
+ })
+ },
+
+ /**
+ * 确认签名
+ */
+ sign(e) {
+ let tempFilePath = e.detail
+ securitySignFileUpload(tempFilePath).then(res => {
+ if (res.code == 200) {
+ this.setData({
+ signPath: res.data.url
+ });
+ }
+ });
+ },
+
+ /**
+ * 确认修改签名
+ */
+ submitSign() {
+ let {
+ projectId,
+ signPath,
+ signData
+ } = this.data;
+ //数据效验
+ if (!projectId) {
+ app.toast("信息异常...请刷新后重试!");
+ return false;
+ }
+ if (!signPath) {
+ app.toast("还未完成签名或修改,请签名后再试!");
+ return false;
+ }
+ let param = {
+ id: signData.id,
+ projectId: projectId,
+ signetPath: signPath
+ }
+ submitUserSign(param).then(res => {
+ if (res.code == 200) {
+ app.toast("保存签名成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: '../project_more/index',
+ })
+ }, 200)
+ }
+ });
+ },
+
+ /**
+ * 返回上级页面
+ */
+ BACK() {
+ wx.redirectTo({
+ url: '../project_more/index',
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/sign_mags/index.json b/yanzhu-ui-app/miniprogram/pageage/sign_mags/index.json
new file mode 100644
index 00000000..04e1677f
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/sign_mags/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ },
+ "navigationStyle":"custom"
+ }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pageage/sign_mags/index.wxml b/yanzhu-ui-app/miniprogram/pageage/sign_mags/index.wxml
new file mode 100644
index 00000000..b1ae2538
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/sign_mags/index.wxml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+ 我的签名[点击签名进行修改]
+
+
+
+
+
+
+ 保 存 签 名
+
+
+
diff --git a/yanzhu-ui-app/miniprogram/pageage/sign_mags/index.wxss b/yanzhu-ui-app/miniprogram/pageage/sign_mags/index.wxss
new file mode 100644
index 00000000..9ac15d43
--- /dev/null
+++ b/yanzhu-ui-app/miniprogram/pageage/sign_mags/index.wxss
@@ -0,0 +1,272 @@
+/* pages/xiangmugaikuang/index.wxss */
+.information-review-tab {
+ display: flex;
+ justify-content: space-around;
+ align-items: center;
+ height: 80rpx;
+ color: #92a1ca;
+}
+
+.information-review-tab .active {
+ color: #87e3fa;
+ padding-left: 40rpx;
+ background: url("https://szgcwx.jhncidg.com/staticFiles/icon/utilization.png") no-repeat left/35rpx;
+}
+
+/* 有赞原码修改 */
+.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: 10rpx;
+ 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 {
+ padding: 0 30rpx;
+}
+
+.gk_open_con view {
+ padding: 10rpx 0;
+}
+
+.gk_open_con image {
+ width: 30rpx;
+ height: 30rpx;
+ margin-right: 5rpx;
+ position: relative;
+ top: 5rpx;
+}
+
+.echarts_max {
+ margin-top: 30rpx;
+ padding: 0 30rpx;
+}
+
+.echarts_min {
+ background: #1e2336;
+ font-size: 28rpx;
+ padding: 15rpx;
+ border-radius: 15rpx;
+}
+
+.eharts_title {
+ height: 40rpx;
+ line-height: 40rpx;
+ padding-left: 40rpx;
+ background: url("https://szgcwx.jhncidg.com/staticFiles/img/menu/CORE_52887EE6A33042408E11C2174974ABA1.png") no-repeat left/35rpx;
+}
+
+.eharts_head {
+ text-align: center;
+ padding: 30rpx 0;
+}
+
+.eharts_head text {
+ color: #0ad7ec;
+ font-size: 40rpx;
+}
+
+.eharts_con {
+ height: 320rpx;
+ width: auto;
+}
+
+.eharts_title_float {
+ float: right;
+}
+
+.eharts_title_float text {
+ padding: 0 5rpx;
+}
+
+.eharts_con_top {
+ margin-top: -320rpx;
+}
+
+.eharts_title_float_img {
+ width: 40rpx;
+ height: 40rpx;
+ float: right;
+ position: relative;
+ top: 2rpx;
+}
+
+.zdzb_bg {
+ height: 88rpx;
+ border-radius: 15rpx;
+ background: #2b345b;
+ margin: 30rpx;
+ font-size: 28rpx;
+ line-height: 88rpx;
+ padding-left: 30rpx;
+}
+
+.construction_unit {
+ padding: 10rpx 0;
+ display: flex;
+}
+
+.construction_unit_image {
+ padding-top: 15rpx;
+}
+
+.construction_unit_image image {
+ width: 80rpx;
+ height: 80rpx;
+}
+
+.construction_unit_list {
+ width: calc(100% - 100rpx);
+ padding-left: 20rpx;
+}
+
+.construction_unit_title {
+ padding: 6rpx 0;
+ color: #c5d9fc;
+}
+
+.construction_unit_name {
+ padding: 6rpx 0;
+ color: #54acf6;
+}
+
+.construction_unit_phone {
+ padding: 6rpx 0;
+ color: #ce9433;
+}
+
+.official {
+ margin-left: 30rpx;
+ margin-right: 30rpx;
+}
+
+.survey_content {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-top: 15px;
+}
+
+.survey_content_img {
+ width: 90px;
+ height: 90px;
+ text-align: center;
+ line-height: 90px;
+ position: relative;
+ background: url("https://szgcwx.jhncidg.com/staticFiles/icon/survey_total_icon.png") no-repeat bottom/90px 60px;
+}
+
+.survey_content_img image {
+ text-align: center;
+ line-height: 90px;
+ width: 50px;
+ height: 50px;
+}
+
+.labour-survey_content_number {
+ color: #cbdaff;
+ font-size: 16px;
+ text-align: center;
+ padding-top: 25px;
+ padding-left: 0;
+}
+
+.survey_content_number {
+ padding-left: 15px;
+ color: #cbdaff;
+ font-size: 16px;
+}
+
+.labour-survey_content_number {
+ color: #cbdaff;
+ font-size: 16px;
+ text-align: center;
+ padding-top: 25px;
+ padding-left: 0;
+}
+
+.survey_content_value text {
+ font-size: 25px;
+ font-style: italic;
+ font-weight: bold;
+ color: #87e3fa;
+ padding-right: 5px;
+}
+.inspect_max_scroll {
+ height: 30vh;
+ max-height: 82vh;
+}
+.zz{
+ color: #fcbc02;
+ font-weight: 800;
+}
+.qrcode{
+ text-align: center;
+}
+.qrtext{
+ margin-top: 25rpx;
+}
+.qrcode image{
+ width: 100px;
+ height: 100px;
+}
+
+.sign_div{
+ padding: 20rpx 0;
+ height: 170rpx;
+ }
+ .sign_div_min{
+ padding: 20rpx;
+ height: 150rpx;
+ background:#f4f4f4;
+ border-radius: 15rpx;
+ line-height: 150rpx;
+ color: #aaa;
+ }
+
+ .qm_img{
+ height: 300rpx;
+ width: 150rpx;
+ position: relative;
+ top: -75rpx;
+ transform: rotate(270deg);
+ }
\ No newline at end of file