diff --git a/miniprogram/api/projectFunVerify.js b/miniprogram/api/projectFunVerify.js
new file mode 100644
index 0000000..362ec66
--- /dev/null
+++ b/miniprogram/api/projectFunVerify.js
@@ -0,0 +1,55 @@
+import {
+ request
+} from '../utils/request'
+
+// 查询工程功能检验列表
+export function listProjectFunVerify(data,pageNum,pageSize) {
+ return request({
+ url: '/wechat/projectFunVerify/list?pageNum='+pageNum+'pageSize'+pageSize,
+ method: 'get',
+ data: data
+ })
+}
+
+// 统计工程功能检验
+export function findGroupCountByApprove(data) {
+ return request({
+ url: '/wechat/projectFunVerify/findGroupCountByApprove',
+ method: 'get',
+ data: data
+ })
+}
+
+// 查询工程功能检验详细
+export function getProjectFunVerify(id) {
+ return request({
+ url: '/wechat/projectFunVerify/info/' + id,
+ method: 'get'
+ })
+}
+
+// 新增工程功能检验
+export function addProjectFunVerify(data) {
+ return request({
+ url: '/wechat/projectFunVerify/add',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改工程功能检验
+export function updateProjectFunVerify(data) {
+ return request({
+ url: '/wechat/projectFunVerify/edit',
+ method: 'post',
+ data: data
+ })
+}
+
+// 删除工程功能检验
+export function delProjectFunVerify(id) {
+ return request({
+ url: '/wechat/projectFunVerify/remove/' + id,
+ method: 'get'
+ })
+}
\ No newline at end of file
diff --git a/miniprogram/api/publics.js b/miniprogram/api/publics.js
index a58078d..3e3bee4 100644
--- a/miniprogram/api/publics.js
+++ b/miniprogram/api/publics.js
@@ -64,4 +64,13 @@ export function getDictCache(type){
url: '/wechat/publics/v1/getDictCache/'+type,
method: 'get'
})
-}
\ No newline at end of file
+}
+
+// 获取审批流程信息
+export function selectProjectAuditinfoList(data){
+ return request({
+ url: '/wechat/projectAuditinfo/selectProjectAuditinfo',
+ method: 'get',
+ data:data
+ })
+}
diff --git a/miniprogram/app.js b/miniprogram/app.js
index de68e76..b47fde9 100644
--- a/miniprogram/app.js
+++ b/miniprogram/app.js
@@ -34,7 +34,7 @@ App({
reqUrl:'https://szgcwx.jhncidg.com',
//reqUrl:'http://127.0.0.1:8091',
uploadUrl:"https://szgcwx.jhncidg.com/wechat",
- //uploadUrl:'http://127.0.0.1:8082/wechat',
+ //uploadUrl:'http://127.0.0.1:8091/wechat',
//御景路数字化集成管控平台接口访问域名
szhUrl:'https://szh.makalu.cc',
diff --git a/miniprogram/app.json b/miniprogram/app.json
index 356651c..fef7706 100644
--- a/miniprogram/app.json
+++ b/miniprogram/app.json
@@ -31,7 +31,8 @@
"pages/project_approve/approveCheckDetection/index",
"pages/project_approve/approveChecking/index",
"pages/project_approve/approveMaterialSeal/index",
- "pages/project_approve/approveMeasure/index"
+ "pages/project_approve/approveMeasure/index",
+ "pages/project_approve/approveFunVerify/index"
],
"subpackages": [
{
@@ -68,6 +69,10 @@
"project_checking/list/index",
"project_checking/edit/index",
"project_checking/info/index",
+ "project_funVerify/add/index",
+ "project_funVerify/list/index",
+ "project_funVerify/edit/index",
+ "project_funVerify/info/index",
"project_problemmodify/security/list/index",
"project_problemmodify/security/info/index",
"project_problemmodify/security/modify/index",
@@ -148,7 +153,7 @@
"voucher-date": "pages/components/voucher-date/index",
"voucher-datetime": "pages/components/voucher-datetime/index",
"file-uploader": "pages/components/file-uploader/index",
- "file-uploader-all":"pages/components/file-uploader-all/index",
+ "file-uploader-all": "pages/components/file-uploader-all/index",
"project-select": "pages/components/project-select/index",
"safety-pie-chart": "./newComponents/safety-pie-chart/index",
"safety-pie-charts": "./newComponents/safety-pie-charts/index",
@@ -163,7 +168,7 @@
"van-dropdown-menu": "@vant/weapp/dropdown-menu/index",
"van-dropdown-item": "@vant/weapp/dropdown-item/index",
"curve-echarts": "pages/components/curve-echarts/index",
- "user-infos":"pages/components/user-infos/index"
+ "user-infos": "pages/components/user-infos/index"
},
"window": {
"backgroundTextStyle": "light",
diff --git a/miniprogram/pageage/project_funVerify/add/index.js b/miniprogram/pageage/project_funVerify/add/index.js
new file mode 100644
index 0000000..70a89ec
--- /dev/null
+++ b/miniprogram/pageage/project_funVerify/add/index.js
@@ -0,0 +1,408 @@
+import {
+ syncFileUpload
+} from '../../../utils/request'
+import {
+ getDictCache
+} from '../../../api/publics'
+import {
+ addProjectFunVerify
+} from '../../../api/projectFunVerify'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ maxDate: new Date(2088, 1, 1).getTime(),
+ minDate: new Date(2001, 1, 1).getTime(),
+ deptId: "",
+ projectId: "",
+ projectName: "",
+ loginName: "",
+ userName: "",
+ rectifierData: [],
+ rectifierData2: [],
+ imageInfoData: [],
+ checkingResult: "1",
+ //验收时间
+ checkTime: '',
+ qualityUser: "",
+ qualityUserName: "",
+ superviseUser: "",
+ superviseUserName: "",
+ checkName: "",
+ intro: "",
+ checkType: "1",
+ dataTypeList: [],
+ list: [{
+ id: 1,
+ text: "合格"
+ }, {
+ id: 2,
+ text: "不合格"
+ }],
+ flowNodes: [{
+ text: '开始'
+ }, {
+ text: '提交申请'
+ }, {
+ text: '监理审批'
+ }, {
+ text: '结束'
+ }],
+ limit: 999,
+ active: 0,
+ checkFiles: "",
+ fileType: ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf", "png", "jpg", "jpeg"]
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let {
+ projectId,
+ projectName
+ } = options
+ //获取缓存数据
+ wx.getStorage({
+ key: 'userinfo',
+ success: res => {
+ this.setData({
+ projectId,
+ projectName,
+ deptId: res.data.deptId,
+ loginName: res.data.loginName,
+ userName: res.data.nickName
+ })
+ this.getProjectUserData();
+ this.getDataTypeList();
+ }
+ })
+ },
+
+ //查询项目人员数据
+ getProjectUserData() {
+ let that = this
+ wx.request({
+ url: app.globalData.reqUrl + '/wechat/projectuserinfo/selectProjectUnitUser',
+ method: "get",
+ data: {
+ unitType: "4",
+ projectId: that.data.projectId
+ },
+ header: {
+ 'content-type': 'application/x-www-form-urlencoded'
+ },
+ success(res) {
+ res = res.data
+ if (res.code == 200) {
+ that.setData({
+ rectifierData: res.data,
+ })
+ }
+ }
+ })
+
+ wx.request({
+ url: app.globalData.reqUrl + '/wechat/projectuserinfo/selectProjectUnitUser',
+ method: "get",
+ data: {
+ unitType: "2",
+ projectId: that.data.projectId
+ },
+ header: {
+ 'content-type': 'application/x-www-form-urlencoded'
+ },
+ success(res) {
+ res = res.data
+ if (res.code == 200) {
+ that.setData({
+ rectifierData2: res.data,
+ })
+ }
+ }
+ })
+ },
+
+ //查询验收类型数据
+ getDataTypeList() {
+ getDictCache('project_fun_verify_type').then(res => {
+ if (res.code == 200) {
+ let list = [];
+ res.data.forEach(item =>{
+ list.push({id:item.dictValue,text:item.dictLabel});
+ });
+ this.setData({
+ dataTypeList: list
+ })
+ }
+ });
+ },
+
+ //切换验收结果
+ onSelectType(e) {
+ this.setData({
+ checkingResult: e.detail.id
+ })
+ },
+
+ //验收类型
+ onSelectType(e) {
+ this.setData({
+ checkType: e.detail.id
+ })
+ },
+
+ //工序部位
+ onInputCheckName(e) {
+ this.setData({
+ checkName: e.detail.value
+ })
+ },
+ //验收描述
+ onInputIntroValue(e) {
+ let intro = e.detail.value
+ this.setData({
+ intro
+ })
+ },
+
+ //验收时间
+ onInputTime(e) {
+ let checkTime = e.detail
+ this.setData({
+ checkTime
+ })
+ },
+
+ // list 上传图片
+ onImagesArr(e) {
+ var data = this.data.imageInfoData
+ data = e.detail
+ this.setData({
+ imageInfoData: data
+ })
+ },
+
+ //添加质量专员
+ onAddQualityUser(e) {
+ if (e.detail.length > 0) {
+ this.setData({
+ qualityUser: e.detail[0].phoneNumber,
+ qualityUserName: e.detail[0].userName
+ })
+ }
+ },
+
+ //添加监理专员
+ onAddSuperviseUser(e) {
+ if (e.detail.length > 0) {
+ this.setData({
+ superviseUser: e.detail[0].phoneNumber,
+ superviseUserName: e.detail[0].userName
+ })
+ }
+ },
+
+ //取消页面
+ cancelSaveView() {
+ this.returnToPage()
+ },
+
+ //保存
+ onProblemSubmitSave() {
+ let that = this
+ let {
+ projectId,
+ deptId,
+ qualityUser,
+ qualityUserName,
+ superviseUser,
+ superviseUserName,
+ checkName,
+ intro,
+ checkTime,
+ checkingResult,
+ imageInfoData,
+ loginName,
+ checkType,
+ checkFiles
+ } = that.data;
+ //数据效验
+ if (projectId == "" || deptId == "") {
+ app.toast("数据异常,请刷新页面重试!")
+ return;
+ }
+ if (imageInfoData.length == 0) {
+ app.toast("请上传检验报告!")
+ return;
+ }
+ if (checkType == "") {
+ app.toast("请选择检验类型!")
+ return;
+ }
+ if (qualityUser == "" || qualityUserName == "") {
+ app.toast("请选择质量专员!")
+ return;
+ }
+ if (superviseUser == "" || superviseUserName == "") {
+ app.toast("请选择监理专员!")
+ return;
+ }
+ if (checkName == "") {
+ app.toast("请填写检验名称!")
+ return;
+ }
+ if (checkTime == "") {
+ app.toast("请选择检验时间!")
+ return;
+ }
+ if (intro == "") {
+ app.toast("请填写检验描述!")
+ return;
+ }
+ // if(checkingResult==""){
+ // app.toast("请选择验收结果!")
+ // that.setData({
+ // loadShow:false
+ // })
+ // return;
+ // }
+ if (checkFiles.length > 0) {
+ for (let i = 0; i < checkFiles.length; i++) {
+ let _fileType = checkFiles[i].path.split('.');
+ _fileType = _fileType[_fileType.length - 1].toLowerCase();
+ //判断附件类型,如果是图片直接展示,非图片则显示附件
+ if (that.data.fileType.indexOf(_fileType) == -1) {
+ app.toast("当前 [ " + _fileType + " ] 文件不支持上传!")
+ return;
+ }
+ }
+ }
+ let _images = [];
+ let _files = [];
+ imageInfoData.forEach(item => {
+ syncFileUpload(item).then(res => {
+ _images.push(res.fileName);
+ //验证图片上传完毕
+ if (_images.length == imageInfoData.length) {
+ let params = {
+ projectId,
+ deptId: deptId,
+ qualityUser,
+ qualityUserName,
+ superviseUser,
+ superviseUserName,
+ checkType,
+ checkName,
+ checkDate: checkTime,
+ intro,
+ //checkResult:checkingResult,
+ approveStatus: "1",
+ createBy: loginName,
+ imageUrls: _images.toString()
+ }
+ if (checkFiles.length > 0) {
+ checkFiles.forEach(file => {
+ syncFileUpload(file.path).then(res => {
+ _files.push(res.fileName);
+ if (checkFiles.length == _files.length) {
+ params.checkFiles = _files.toString();
+ that.submitForm(params);
+ }
+ });
+ });
+ } else {
+ that.submitForm(params);
+ }
+ }
+ });
+ })
+ },
+
+ /**
+ * 提交表单
+ * @param {*} params
+ */
+ submitForm(params) {
+ addProjectFunVerify(params).then(res => {
+ if (res.code == 200) {
+ app.toast("新增工程功能检验成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: '../list/index',
+ })
+ }, 300)
+ }
+ });
+ },
+
+ /**
+ * 相关附件上传
+ * @param {*} options
+ */
+ otherFileUpload(options) {
+ let file = options.detail;
+ this.setData({
+ checkFiles: file
+ });
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../list/index',
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/miniprogram/pageage/project_funVerify/add/index.json b/miniprogram/pageage/project_funVerify/add/index.json
new file mode 100644
index 0000000..9003141
--- /dev/null
+++ b/miniprogram/pageage/project_funVerify/add/index.json
@@ -0,0 +1,8 @@
+{
+ "usingComponents": {
+ "van-steps": "@vant/weapp/steps/index",
+ "van-overlay": "@vant/weapp/overlay/index"
+ },
+ "navigationStyle":"custom",
+ "navigationBarTitleText": "新增工程功能检验"
+}
\ No newline at end of file
diff --git a/miniprogram/pageage/project_funVerify/add/index.wxml b/miniprogram/pageage/project_funVerify/add/index.wxml
new file mode 100644
index 0000000..9657ad5
--- /dev/null
+++ b/miniprogram/pageage/project_funVerify/add/index.wxml
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+ {{projectName}}
+
+
+ 检验报告
+
+
+
+
+
+ 检验类型
+
+
+
+
+
+ 检验名称
+
+
+
+
+
+ 质量专员
+
+
+
+
+
+
+ 监理专员
+
+
+
+
+
+
+ 检验时间
+
+
+
+
+
+ 检验描述
+
+
+
+
+
+ 相关附件 [非必填项]
+
+
+
+
+
+ 验收结果
+
+
+
+
+
+
+ 取消
+ 保存
+
+
\ No newline at end of file
diff --git a/miniprogram/pageage/project_funVerify/add/index.wxss b/miniprogram/pageage/project_funVerify/add/index.wxss
new file mode 100644
index 0000000..ed3bf8c
--- /dev/null
+++ b/miniprogram/pageage/project_funVerify/add/index.wxss
@@ -0,0 +1,13 @@
+/* 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;
+}
diff --git a/miniprogram/pageage/project_funVerify/edit/index.js b/miniprogram/pageage/project_funVerify/edit/index.js
new file mode 100644
index 0000000..66eb0f0
--- /dev/null
+++ b/miniprogram/pageage/project_funVerify/edit/index.js
@@ -0,0 +1,519 @@
+import {
+ syncFileUpload
+} from '../../../utils/request'
+import {
+ getDictCache,
+ selectProjectAuditinfoList
+} from '../../../api/publics'
+import {
+ getProjectFunVerify,
+ updateProjectFunVerify
+} from '../../../api/projectFunVerify'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ maxDate: new Date(2088, 1, 1).getTime(),
+ deptId: "",
+ projectId: "",
+ projectName: "",
+ loginName: "",
+ userName: "",
+ rectifierData: [],
+ rectifierData2: [],
+ imageInfoData: [],
+ checkingResult: "1",
+ //验收时间
+ checkTime: '',
+ qualityUser: "",
+ qualityUserName: "",
+ superviseUser: "",
+ superviseUserName: "",
+ checkName: "",
+ intro: "",
+ infoData: {},
+ activeName: "",
+ flowRecordList: [],
+ minUrls: [],
+ checkType: "",
+ dataTypeList: [],
+ list: [{
+ id: 1,
+ text: "合格"
+ }, {
+ id: 2,
+ text: "不合格"
+ }],
+ request: app.globalData.reqUrl,
+ flowNodes: [{
+ text: '开始'
+ }, {
+ text: '提交申请'
+ }, {
+ text: '监理审批'
+ }, {
+ text: '结束'
+ }],
+ limit: 999,
+ active: 1,
+ checkFiles: "",
+ fileType: ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf", "png", "jpg", "jpeg"],
+ fileUrlArray: []
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let {
+ id
+ } = options
+ //获取缓存数据
+ wx.getStorage({
+ key: 'userinfo',
+ success: res => {
+ this.setData({
+ id,
+ projectId: app.globalData.projectId,
+ projectName: app.globalData.projectName,
+ deptId: res.data.deptId,
+ loginName: res.data.loginName,
+ userName: res.data.nickName
+ })
+ this.getProjectUserData();
+ this.getDataTypeList();
+ this.getInfo();
+ this.getAuditinfo();
+ }
+ })
+ },
+
+ //查询项目人员数据
+ getProjectUserData() {
+ let that = this
+ wx.request({
+ url: app.globalData.reqUrl + '/wechat/projectuserinfo/selectProjectUnitUser',
+ method: "get",
+ data: {
+ unitType: "4",
+ projectId: that.data.projectId
+ },
+ header: {
+ 'content-type': 'application/x-www-form-urlencoded'
+ },
+ success(res) {
+ res = res.data
+ if (res.code == 200) {
+ let tempData = []
+ that.setData({
+ rectifierData: res.data,
+ })
+ }
+ }
+ })
+
+ wx.request({
+ url: app.globalData.reqUrl + '/wechat/projectuserinfo/selectProjectUnitUser',
+ method: "get",
+ data: {
+ unitType: "2",
+ projectId: that.data.projectId
+ },
+ header: {
+ 'content-type': 'application/x-www-form-urlencoded'
+ },
+ success(res) {
+ res = res.data
+ if (res.code == 200) {
+ let tempData = []
+ that.setData({
+ rectifierData2: res.data,
+ })
+ }
+ }
+ })
+ },
+
+ //查询验收类型数据
+ getDataTypeList() {
+ getDictCache('project_fun_verify_type').then(res => {
+ if (res.code == 200) {
+ let list = [];
+ res.data.forEach(item =>{
+ list.push({id:item.dictValue,text:item.dictLabel});
+ });
+ this.setData({
+ dataTypeList: list
+ })
+ }
+ });
+ },
+
+ //切换验收结果
+ onSelectType(e) {
+ this.setData({
+ checkingResult: e.detail.id
+ })
+ },
+
+ //验收类型
+ onSelectType(e) {
+ this.setData({
+ checkType: e.detail.id
+ })
+ },
+
+ //工序部位
+ onInputCheckNameValue(e) {
+ this.setData({
+ checkName:e.detail.value
+ })
+ },
+
+ //验收描述
+ onInputIntroValue(e) {
+ let intro = e.detail.value
+ this.setData({
+ intro
+ })
+ },
+
+ //验收时间
+ onInputTime(e) {
+ let checkTime = e.detail
+ this.setData({
+ checkTime
+ })
+ },
+
+ /**
+ * 获取安全检查详情信息
+ *
+ */
+ getInfo() {
+ getProjectFunVerify(this.data.id).then(res =>{
+ if(res.code==200){
+ let imageInfoData = [];
+ if (res.data.imageUrls) {
+ res.data.imageUrls.split(',').forEach(element => {
+ imageInfoData.push(this.data.request + element + '.min.jpg');
+ });
+ }
+ let checkFiles = [];
+ if (res.data.checkFiles) {
+ res.data.checkFiles.split(",").forEach(item => {
+ let it = item.split('/');
+ checkFiles.push({
+ 'name': it[it.length - 1],
+ path: item
+ });
+ });
+ }
+ this.setData({
+ infoData: res.data,
+ fileUrlArray: checkFiles,
+ checkType: res.data.checkType,
+ qualityUser: res.data.qualityUser,
+ qualityUserName: res.data.qualityUserName,
+ superviseUser: res.data.superviseUser,
+ superviseUserName: res.data.superviseUserName,
+ checkName: res.data.checkName,
+ intro: res.data.intro,
+ checkTime: res.data.checkDate,
+ imageInfoData
+ })
+ }
+ });
+ },
+
+ /**
+ * 查询流程日志
+ */
+ getAuditinfo() {
+ let param = {
+ fromType: "5",
+ fromId: this.data.id
+ }
+ selectProjectAuditinfoList(param).then(res =>{
+ if (res.code == 200) {
+ this.setData({
+ flowRecordList: res.data
+ })
+ }
+ });
+ },
+
+ // 手风琴
+ onChange(event) {
+ this.setData({
+ activeName: event.detail,
+ });
+ },
+
+ // list 上传图片
+ onImagesArr(e) {
+ var data = this.data.imageInfoData
+ data = e.detail
+ this.setData({
+ imageInfoData: data
+ })
+ },
+
+ //添加质量专员
+ onAddQualityUser(e) {
+ if (e.detail.length > 0) {
+ this.setData({
+ qualityUser: e.detail[0].phoneNumber,
+ qualityUserName: e.detail[0].userName
+ })
+ }
+ },
+
+ //添加监理专员
+ onAddSuperviseUser(e) {
+ if (e.detail.length > 0) {
+ this.setData({
+ superviseUser: e.detail[0].phoneNumber,
+ superviseUserName: e.detail[0].userName
+ })
+ }
+ },
+
+ //取消页面
+ cancelSaveView() {
+ this.returnToPage()
+ },
+
+ //保存
+ onProblemSubmitSave() {
+ let that = this
+ let {
+ id,
+ qualityUser,
+ qualityUserName,
+ superviseUser,
+ superviseUserName,
+ checkName,
+ intro,
+ checkTime,
+ imageInfoData,
+ loginName,
+ checkType,
+ checkFiles
+ } = that.data;
+ //数据效验
+ if (id == "") {
+ app.toast("数据异常,请刷新页面重试!")
+ return;
+ }
+ if (imageInfoData.length == 0) {
+ app.toast("请上传检验报告!")
+ return;
+ }
+ if (checkType == "") {
+ app.toast("请选择检验类型!")
+ return;
+ }
+ if (qualityUser == "" || qualityUserName == "") {
+ app.toast("请选择质量专员!")
+ return;
+ }
+ if (superviseUser == "" || superviseUserName == "") {
+ app.toast("请选择监理专员!")
+ return;
+ }
+ if (checkName == "") {
+ app.toast("请填写检验名称!")
+ return;
+ }
+ if (checkTime == "") {
+ app.toast("请选择验收时间!")
+ return;
+ }
+ if (intro == "") {
+ app.toast("请填写检验描述!")
+ return;
+ }
+ if (checkFiles.length > 0) {
+ for (let i = 0; i < checkFiles.length; i++) {
+ let _fileType = checkFiles[i].path.split('.');
+ _fileType = _fileType[_fileType.length - 1].toLowerCase();
+ //判断附件类型,如果是图片直接展示,非图片则显示附件
+ if (that.data.fileType.indexOf(_fileType) == -1) {
+ app.toast("当前 [ " + _fileType + " ] 文件不支持上传!")
+ return;
+ }
+ }
+ }
+ let _images = [];
+ let _checkFiles = [];
+ imageInfoData.forEach(async (item) => {
+ let uploadUrl = app.globalData.uploadUrl + '/common/upload'
+ let name = "file"
+ //这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
+ if (item.indexOf(that.data.request) > -1) {
+ _images.push(item.replace(that.data.request, "").replace(".min.jpg", ""));
+ } else {
+ let obj = await that.syncUploadImage(uploadUrl, item, name);
+ _images.push(obj.data.fileName);
+ }
+ //验证图片上传完毕
+ if (_images.length == imageInfoData.length) {
+ let params = {
+ id,
+ qualityUser,
+ qualityUserName,
+ superviseUser,
+ superviseUserName,
+ checkType,
+ checkName,
+ checkDate: checkTime,
+ intro,
+ //checkResult:checkingResult,
+ approveStatus: "1",
+ createBy: loginName,
+ imageUrls: _images.toString()
+ }
+ if (checkFiles.length > 0) {
+ checkFiles.forEach(async (file) => {
+ if (file.path.indexOf('/profile/') > -1) {
+ _checkFiles.push(file.path);
+ } else {
+ let obj = await that.syncUploadImage(uploadUrl, file.path, name);
+ _checkFiles.push(obj.data.fileName);
+ }
+ if (checkFiles.length == _checkFiles.length) {
+ params.checkFiles = _checkFiles.toString();
+ this.submitForm(params);
+ }
+ });
+ } else {
+ this.submitForm(params);
+ }
+ }
+ })
+ },
+
+ /**
+ * 提交表单
+ * @param {*} params
+ */
+ submitForm(data){
+ updateProjectFunVerify(data).then(res =>{
+ if (res.code == 200) {
+ app.toast("修改成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: '../list/index',
+ })
+ }, 200)
+ }
+ })
+ },
+
+ /**
+ * 这里考虑上传图片异步问题,封装为同步
+ */
+ syncUploadImage(url, uploadFile, name) {
+ return new Promise((resolve, reject) => {
+ wx.uploadFile({
+ url, // 上传的服务器接口地址
+ filePath: uploadFile,
+ header: {
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
+ },
+ name, //上传的所需字段,后端提供
+ formData: {
+ user: 'test'
+ },
+ 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 () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../list/index',
+ })
+ },
+
+ /**
+ * 相关附件上传
+ * @param {*} options
+ */
+ otherFileUpload(options) {
+ let file = options.detail;
+ this.setData({
+ checkFiles: file
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/miniprogram/pageage/project_funVerify/edit/index.json b/miniprogram/pageage/project_funVerify/edit/index.json
new file mode 100644
index 0000000..77e8b48
--- /dev/null
+++ b/miniprogram/pageage/project_funVerify/edit/index.json
@@ -0,0 +1,10 @@
+{
+ "usingComponents": {
+ "van-overlay": "@vant/weapp/overlay/index",
+ "van-collapse": "@vant/weapp/collapse",
+ "van-steps": "@vant/weapp/steps/index",
+ "van-collapse-item": "@vant/weapp/collapse-item"
+ },
+ "navigationStyle":"custom",
+ "navigationBarTitleText": "修改工程功能检验"
+}
\ No newline at end of file
diff --git a/miniprogram/pageage/project_funVerify/edit/index.wxml b/miniprogram/pageage/project_funVerify/edit/index.wxml
new file mode 100644
index 0000000..79ac671
--- /dev/null
+++ b/miniprogram/pageage/project_funVerify/edit/index.wxml
@@ -0,0 +1,114 @@
+
+
+
+
+
+ {{projectName}}
+
+
+
+
+
+
+
+
+
+ {{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}
+
+ 提交工程功能检验
+ 审批工程功能检验
+ {{item.commentResult}}
+ 合格
+ 不合格
+
+
+
+
+
+ 办理用户:{{item.userName}}
+
+
+ 办理单位:{{item.deptName}}
+
+
+ 办理时间:{{item.createTime}}
+
+
+ 审批意见:{{item.comment}}
+
+
+
+
+
+
+
+
+
+ 检验报告
+
+
+
+
+
+ 检验类型
+
+
+
+
+
+ 检验名称
+
+
+
+
+
+ 质量专员
+
+
+
+
+
+
+ 监理专员
+
+
+
+
+
+
+ 检验时间
+
+
+
+
+
+ 检验描述
+
+
+
+
+
+ 相关附件 [非必填项]
+
+
+
+
+
+
+ 取消
+ 保存
+
+
\ No newline at end of file
diff --git a/miniprogram/pageage/project_funVerify/edit/index.wxss b/miniprogram/pageage/project_funVerify/edit/index.wxss
new file mode 100644
index 0000000..4746c01
--- /dev/null
+++ b/miniprogram/pageage/project_funVerify/edit/index.wxss
@@ -0,0 +1,61 @@
+/* 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;
+}
+.van-collapse.van-hairline--top-bottom:after{
+ border-width: 0px 0;
+ }
+ .van-cell.van-cell--borderless{
+ background-color: #2b345b;
+ color: #fff;
+ margin-top: 30rpx;
+ border-radius: 5rpx;
+ }
+ .van-cell.van-cell--borderless:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__title.van-collapse-item__title--expanded:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item .van-cell:after{
+ border-bottom: 0;
+ }
+ .van-collapse-item.van-hairline--top:after{
+ border-top-width:0
+ }
+ .van-cell.van-cell--clickable{
+ background-color: #2b345b;
+ margin-top: 5rpx;
+ margin-bottom: 5rpx;
+ color: #fff;
+ border-radius: 15rpx;
+
+ }
+ .van-cell.van-cell--clickable:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__wrapper .van-collapse-item__content{
+ background-color: #1e2336;
+ color:#8ca4ec ;
+ border-width: 0px 0;
+ }
+ .gk_open_con view{
+ padding: 10rpx 0;
+ width: 100%;
+ }
+ .gk_open_con image{
+ width: 30rpx;
+ height: 30rpx;
+ margin-right: 5rpx;
+ position: relative;
+ top: 5rpx;
+ }
diff --git a/miniprogram/pageage/project_funVerify/info/index.js b/miniprogram/pageage/project_funVerify/info/index.js
new file mode 100644
index 0000000..1f9a489
--- /dev/null
+++ b/miniprogram/pageage/project_funVerify/info/index.js
@@ -0,0 +1,253 @@
+import {
+ selectProjectAuditinfoList
+} from '../../../api/publics'
+import {
+ getProjectFunVerify,
+ delProjectFunVerify
+} from '../../../api/projectFunVerify'
+
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ id: "",
+ infoData: {},
+ imageList: [],
+ minImageList: [],
+ loginName: "",
+ showDel: true,
+ activeName: "",
+ flowRecordList: [],
+ request: app.globalData.reqUrl,
+ flowNodes: [{
+ text: '开始'
+ }, {
+ text: '提交申请'
+ }, {
+ text: '监理审批'
+ }, {
+ text: '结束'
+ }],
+ active: 100,
+ checkFiles:[]
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let {
+ id
+ } = options
+ //获取缓存数据
+ wx.getStorage({
+ key: 'userinfo',
+ success: res => {
+ this.setData({
+ id,
+ loginName: res.data.loginName
+ })
+ this.getInfo();
+ this.getAuditinfo();
+ }
+ })
+ },
+
+ /**
+ * 获取安全检查详情信息
+ *
+ */
+ getInfo() {
+ getProjectFunVerify(this.data.id).then(res =>{
+ if(res.code==200){
+ let state = this.data.active;
+ if (res.data.approveStatus == "1") {
+ state = 2;
+ } else if (res.data.approveStatus == "3") {
+ state = 1;
+ }
+ this.setData({
+ active: state
+ })
+ let urls = [];
+ let minUrls = [];
+ let checkFiles = [];
+ if (res.data.imageUrls) {
+ res.data.imageUrls.split(',').forEach(element => {
+ urls.push(this.data.request + element);
+ minUrls.push(this.data.request + element + '.min.jpg');
+ });
+ }
+ if(res.data.checkFiles){
+ res.data.checkFiles.split(",").forEach(item =>{
+ let it = item.split('/');
+ checkFiles.push({'name':it[it.length-1],path:item});
+ });
+ }
+ this.setData({
+ infoData: res.data,
+ imageList: urls,
+ minImageList: minUrls,
+ checkFiles,
+ })
+ //判断当前能否删除
+ if (res.data.createBy == this.data.loginName && res.data.approveStatus != "4") {
+ this.setData({
+ showDel: true
+ })
+ }
+ }
+ });
+ },
+
+ onDelete() {
+ //弹出确认
+ let that = this
+ wx.showModal({
+ title: '提示',
+ content: '是否确定删除此条数据?',
+ success: function (sm) {
+ if (sm.confirm) {
+ // 用户点击了确定 可以调用了
+ that.deleteData();
+ } else if (sm.cancel) {
+ console.log('用户点击取消');
+ }
+ }
+ })
+ },
+
+ deleteData() {
+ delProjectFunVerify(this.data.id).then(res =>{
+ app.toast("删除成功!")
+ wx.navigateTo({
+ url: `../list/index`,
+ })
+ });
+ },
+
+ //跳转修改页面
+ onUpdate: function () {
+ let id = this.data.id;
+ wx.redirectTo({
+ url: `../edit/index?id=${id}`,
+ })
+ },
+
+ /**
+ * 查询流程日志
+ */
+ getAuditinfo() {
+ let params = {
+ fromType: "5",
+ fromId: this.data.id
+ }
+ selectProjectAuditinfoList(params).then(res =>{
+ if (res.code == 200) {
+ this.setData({
+ flowRecordList: res.data
+ })
+ }
+ });
+ },
+
+ // 手风琴
+ onChange(event) {
+ this.setData({
+ activeName: event.detail,
+ });
+ },
+
+ //展示图片
+ showImg: function (e) {
+ var that = this;
+ wx.previewImage({
+ urls: that.data.imageList,
+ current: that.data.imageList[e.currentTarget.dataset.index]
+ })
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.navigateTo({
+ url: '../list/index',
+ })
+ },
+
+ /**
+ * 下载附件
+ * @param {*} e
+ */
+ downFile: function (e) {
+ let {
+ path,
+ } = e.currentTarget.dataset.set
+ wx.downloadFile({
+ url: app.globalData.uploadUrl + '/common/download/resource?resource=' + path,
+ success: function (res) {
+ const filePath = res.tempFilePath
+ wx.openDocument({
+ filePath: filePath,
+ success: function (res) {
+ console.log('打开文档成功')
+ },
+ fail: function (res) {
+ console.log(res)
+ }
+ })
+ }
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/miniprogram/pageage/project_funVerify/info/index.json b/miniprogram/pageage/project_funVerify/info/index.json
new file mode 100644
index 0000000..44cc3e1
--- /dev/null
+++ b/miniprogram/pageage/project_funVerify/info/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"
+ },
+ "navigationStyle":"custom",
+ "navigationBarTitleText": "工程功能检验详情"
+}
\ No newline at end of file
diff --git a/miniprogram/pageage/project_funVerify/info/index.wxml b/miniprogram/pageage/project_funVerify/info/index.wxml
new file mode 100644
index 0000000..76c4a01
--- /dev/null
+++ b/miniprogram/pageage/project_funVerify/info/index.wxml
@@ -0,0 +1,152 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}
+
+ 提交工程功能检验
+ 审批工程功能检验
+ 合格
+ 不合格
+
+
+
+
+
+ 办理用户:{{item.userName}}
+
+
+ 办理单位:{{item.deptName}}
+
+
+ 办理时间:{{item.createTime}}
+
+
+ 审批意见:{{item.comment}}
+
+
+
+
+
+
+
+
+
+ {{infoData.projectName}}
+
+
+
+
+ 单位名称
+ {{infoData.deptName}}
+
+
+
+
+ 检验报告
+
+
+
+
+
+
+
+
+
+ 检验类型
+ {{infoData.checkTypeName}}
+
+
+
+
+ 检验名称
+ {{infoData.checkName}}
+
+
+
+
+ 质量专员
+ {{infoData.qualityUserName}} {{infoData.qualityUser}}
+
+
+
+
+ 监理专员
+ {{infoData.superviseUserName}} {{infoData.superviseUser}}
+
+
+
+
+ 检验时间
+ {{infoData.checkDate}}
+
+
+
+
+ 检验描述
+ {{infoData.intro}}
+
+
+
+
+ 相关附件
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+ 验收结果
+
+ 待审批
+ 合格
+ 不合格
+
+
+
+
+
+ 提交时间
+ {{infoData.createTime}}
+
+
+
+
+ 提交用户
+ {{infoData.createBy}}
+
+
+
+
+
+
+ 删除
+ 修改
+
+
\ No newline at end of file
diff --git a/miniprogram/pageage/project_funVerify/info/index.wxss b/miniprogram/pageage/project_funVerify/info/index.wxss
new file mode 100644
index 0000000..bc7a2b7
--- /dev/null
+++ b/miniprogram/pageage/project_funVerify/info/index.wxss
@@ -0,0 +1,71 @@
+/* pageage/project_checking/info/index.wxss */
+.in-img-max:after{
+ display:block;
+ clear:both;
+ content:"";
+ visibility:hidden;
+ height:0
+ }
+ .in-img-max{
+ width: auto;
+ zoom:1
+ }
+ .in-img-div{
+ position: relative;
+ margin: 0 8px 8px 0;
+ float: left;
+ }
+ .in-img-div image{
+ width: 180rpx;
+ height: 180rpx;
+ border-radius: 15rpx;
+ position: relative;
+ }
+ .van-collapse.van-hairline--top-bottom:after{
+ border-width: 0px 0;
+ }
+ .van-cell.van-cell--borderless{
+ background-color: #2b345b;
+ color: #fff;
+ margin-top: 30rpx;
+ border-radius: 5rpx;
+ }
+ .van-cell.van-cell--borderless:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__title.van-collapse-item__title--expanded:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item .van-cell:after{
+ border-bottom: 0;
+ }
+ .van-collapse-item.van-hairline--top:after{
+ border-top-width:0
+ }
+ .van-cell.van-cell--clickable{
+ background-color: #2b345b;
+ margin-top: 5rpx;
+ margin-bottom: 5rpx;
+ color: #fff;
+ border-radius: 15rpx;
+
+ }
+ .van-cell.van-cell--clickable:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__wrapper .van-collapse-item__content{
+ background-color: #1e2336;
+ color:#8ca4ec ;
+ border-width: 0px 0;
+ }
+ .gk_open_con view{
+ padding: 10rpx 0;
+ width: 100%;
+ }
+ .gk_open_con image{
+ width: 30rpx;
+ height: 30rpx;
+ margin-right: 5rpx;
+ position: relative;
+ top: 5rpx;
+ }
\ No newline at end of file
diff --git a/miniprogram/pageage/project_funVerify/list/index.js b/miniprogram/pageage/project_funVerify/list/index.js
new file mode 100644
index 0000000..0bee1c2
--- /dev/null
+++ b/miniprogram/pageage/project_funVerify/list/index.js
@@ -0,0 +1,330 @@
+import {
+ getToken
+} from '../../../utils/auth'
+import {
+ listProjectFunVerify,
+ findGroupCountByApprove
+} from '../../../api/projectFunVerify'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ deptId: "",
+ loginName: "",
+ userName: "",
+ minRoleId: "",
+ projectId: "",
+ projectData: {},
+ projectNameArgs: "",
+ initData: {},
+ show: false,
+ listData: [],
+ jxzCount: 0,
+ ywcCount: 0,
+ activeState: "jxz",
+ pageNum: 1,
+ pageSize: 10,
+ lastDataSize: 10,
+ list: [],
+ request: app.globalData.reqUrl
+ },
+
+ onClose() {
+ this.setData({
+ show: false
+ });
+ },
+ showPopup() {
+ this.setData({
+ show: true
+ });
+ },
+
+ skipAdd() {
+ wx.redirectTo({
+ url: `../add/index?projectId=${this.data.initData.id}&projectName=` + this.data.initData.text,
+ })
+ },
+
+ getInfo(e) {
+ let {
+ id,
+ approveStatus,
+ superviseUser
+ } = e.currentTarget.dataset.set
+ if (approveStatus == "1" && superviseUser == this.data.loginName) {
+ wx.redirectTo({
+ url: `../../../pages/project_approve/approveFunVerify/index?id=${id}`
+ })
+ } else {
+ wx.redirectTo({
+ url: `../info/index?id=${id}`
+ })
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ if(!getToken()){
+ wx.redirectTo({
+ url: '../../../pages/login/index',
+ })
+ }
+ if (options && options.barProId) {
+ //数据未加载完毕,从文件读取数据
+ if (app.globalData.projectInfoList.length == 0) {
+ wx.getStorage({
+ key: 'projectInfoList',
+ success: res => {
+ app.globalData.projectInfoList = res.data;
+ app.globalData.projectInfoList.forEach(item => {
+ if (item.projectId == options.barProId) {
+ app.globalData.projectId = item.projectId;
+ app.globalData.projectName = item.projectName;
+ }
+ });
+ //未查询到项目信息
+ if (!app.globalData.projectId) {
+ app.globalData.projectInfoList.push({
+ projectId: options.barProId,
+ projectId: options.barProName
+ });
+ app.globalData.projectId = options.barProId;
+ app.globalData.projectName = options.barProName;
+ }
+ //从缓存读取项目信息
+ this.setData({
+ initData: {
+ text: app.globalData.projectName,
+ id: app.globalData.projectId
+ }
+ })
+ let myProjects = this.selectComponent("#projectSel");
+ myProjects.load();
+ },
+ fail: err => {
+ //未获取用户信息时,重新登录
+ wx.redirectTo({
+ url: '../pages/login/index',
+ })
+ }
+ })
+ } else {
+ app.globalData.projectInfoList.forEach(item => {
+ if (item.projectId == options.barProId) {
+ app.globalData.projectId = item.projectId;
+ app.globalData.projectName = item.projectName;
+ }
+ });
+ //未查询到项目信息
+ if (!app.globalData.projectId) {
+ app.globalData.projectInfoList.push({
+ projectId: options.barProId,
+ projectId: options.barProName
+ });
+ app.globalData.projectId = options.barProId;
+ app.globalData.projectName = options.barProName;
+ }
+ //从缓存读取项目信息
+ this.setData({
+ initData: {
+ text: app.globalData.projectName,
+ id: app.globalData.projectId
+ }
+ })
+ }
+ } else {
+ //从缓存读取项目信息
+ this.setData({
+ initData: {
+ text: app.globalData.projectName,
+ id: app.globalData.projectId
+ }
+ })
+ }
+ //获取缓存数据
+ wx.getStorage({
+ key: 'userinfo',
+ success: res => {
+ this.setData({
+ deptId: res.data.deptId,
+ loginName: res.data.loginName,
+ userName: res.data.userName,
+ minRoleId: res.data.minRoleId,
+ projectId: app.globalData.projectId,
+ projectNameArgs: app.globalData.projectName,
+ pageNum: 1,
+ pageSize: 10,
+ lastDataSize: 10,
+ listData: []
+ })
+ this.getProjectFunVerifyData();
+ },
+ fail: err => {
+ //未获取用户信息时,重新登录
+ wx.redirectTo({
+ url: '../pages/login/index',
+ })
+ }
+ })
+ },
+
+ /**
+ * 查询项目举牌验收数据
+ */
+ getProjectFunVerifyData() {
+ //进入这里说明数据加载完毕
+ if (this.data.lastDataSize < this.data.pageSize) {
+ //app.toast("已经到底了,暂无可继续加载数据!")
+ return;
+ }
+ var that = this;
+ //判断角色,
+ let mr = this.data.minRoleId;
+ let deptId = this.data.deptId;
+ if (mr == 2 || mr == 3 || mr == 4) {
+ deptId = 0;
+ }
+ let param = {
+ "projectId": this.data.projectId,
+ "deptId": deptId,
+ "nowUserName": this.data.loginName,
+ "activeName": this.data.activeState
+ }
+ this.queryCount(param);
+ listProjectFunVerify(param,that.data.pageNum,that.data.pageSize).then(res =>{
+ if (res.code == "200") {
+ //这里处理this.data.lastDataSize=this.data.pageSize
+ if (that.data.list.length > 0 && res.rows.length > 0 && that.data.list[0].id == res.rows[0].id) {
+ that.setData({
+ lastDataSize: 0,
+ })
+ } else {
+ that.setData({
+ pageNum: that.data.pageNum + 1,
+ lastDataSize: res.rows.length,
+ list: res.rows,
+ listData: that.data.listData.concat(res.rows)
+ })
+ }
+ }
+ })
+ },
+
+ /**
+ * 加载更多数据
+ */
+ onScrollToLower() {
+ console.log("滚动条到底了,开始加载新数据");
+ this.getProjectFunVerifyData();
+ },
+
+ //查询统计
+ queryCount(param) {
+ //查询统计数量
+ findGroupCountByApprove(param).then(res =>{
+ this.setData({
+ jxzCount: res.data.jxz,
+ ywcCount: res.data.ywc
+ });
+ });
+ },
+
+ /**
+ * 标签切换
+ */
+ typeJump(e) {
+ let index = e.currentTarget.dataset.index;
+ let nav = "";
+ if (index == 1) {
+ nav = 'jxz';
+ } else if (index == 2) {
+ nav = 'ywc';
+ }
+ this.setData({
+ activeState: nav,
+ pageNum: 1,
+ pageSize: 10,
+ lastDataSize: 10,
+ listData: [],
+ list: []
+ });
+ this.getProjectFunVerifyData();
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ if (wx.getStorageSync('nav-menu') == "gd") {
+ wx.redirectTo({
+ url: '../../../pages/gengduogongneng/index',
+ })
+ } else {
+ wx.redirectTo({
+ url: '../../../pages/quality_manage/index',
+ })
+ }
+ },
+
+ //项目切换 返回值
+ onProjectSelect(e) {
+ let projectId = e.detail.id;
+ let projectName = e.detail.text;
+ app.globalData.projectId = projectId;
+ app.globalData.projectName = projectName;
+ this.onLoad();
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/miniprogram/pageage/project_funVerify/list/index.json b/miniprogram/pageage/project_funVerify/list/index.json
new file mode 100644
index 0000000..9f00a0e
--- /dev/null
+++ b/miniprogram/pageage/project_funVerify/list/index.json
@@ -0,0 +1,8 @@
+{
+ "usingComponents": {
+ "van-overlay": "@vant/weapp/overlay/index" ,
+ "van-popup": "@vant/weapp/popup/index"
+ },
+ "navigationStyle":"custom",
+ "navigationBarTitleText": "举牌验收管理"
+}
\ No newline at end of file
diff --git a/miniprogram/pageage/project_funVerify/list/index.wxml b/miniprogram/pageage/project_funVerify/list/index.wxml
new file mode 100644
index 0000000..dbdbfc9
--- /dev/null
+++ b/miniprogram/pageage/project_funVerify/list/index.wxml
@@ -0,0 +1,63 @@
+
+
+
+
+ 进行中({{jxzCount}})
+ 已完成({{ywcCount}})
+
+
+
+
+
+
+ {{index < 9 ?'0'+(index+1):(index+1)}}
+ {{item.checkTypeName}}
+
+
+
+
+
+ 待审批
+ 合格
+ 不合格
+
+
+
+ 检验名称:{{item.checkName}}
+ 质量专员:{{item.qualityUserName}}
+ 监理专员:{{item.superviseUserName}}
+ 检验时间:{{item.checkDate}}
+
+
+ 检验描述:{{item.intro}}
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+
+
+ 新增
+
+
+
\ No newline at end of file
diff --git a/miniprogram/pageage/project_funVerify/list/index.wxss b/miniprogram/pageage/project_funVerify/list/index.wxss
new file mode 100644
index 0000000..f370194
--- /dev/null
+++ b/miniprogram/pageage/project_funVerify/list/index.wxss
@@ -0,0 +1 @@
+/* pageage/project_checking_list/project_checking_list.wxss */
diff --git a/miniprogram/pageage/project_standard/list/index.js b/miniprogram/pageage/project_standard/list/index.js
index d20ec49..0866e2a 100644
--- a/miniprogram/pageage/project_standard/list/index.js
+++ b/miniprogram/pageage/project_standard/list/index.js
@@ -22,13 +22,13 @@ Page({
standardActive: '',
typeList: [{
id: 1,
- name: '作业标准化',
- icon: config.baseUrl + '/staticFiles/img/zybzh.png',
+ name: '现场管理标准',
+ icon: config.baseUrl + '/staticFiles/img/xcglbzh.png',
count: 0,
}, {
id: 2,
- name: '现场管理标准',
- icon: config.baseUrl + '/staticFiles/img/xcglbzh.png',
+ name: '作业标准化',
+ icon: config.baseUrl + '/staticFiles/img/zybzh.png',
count: 0,
},
{
diff --git a/miniprogram/pages/project_approve/approveChecking/index.js b/miniprogram/pages/project_approve/approveChecking/index.js
index b7addfc..55b6b69 100644
--- a/miniprogram/pages/project_approve/approveChecking/index.js
+++ b/miniprogram/pages/project_approve/approveChecking/index.js
@@ -1,4 +1,3 @@
-// pageage/project_checking/info/index.js
const app = getApp()
Page({
@@ -10,7 +9,6 @@ Page({
infoData:{},
imageList:[],
minImageList:[],
- loadShow:false,
loginName:"",
request:app.globalData.reqUrl,
list:[{id:1,text:"合格"},{id:2,text:"不合格"}],
@@ -80,7 +78,6 @@ Page({
imageList:urls,
minImageList:minUrls,
checkingFiles,
- loadShow:false
})
}
}
@@ -89,9 +86,6 @@ Page({
//保存
onSubmitSave(){
- this.setData({
- loadShow:true
- })
let that = this
let {infoData,result,comment,loginName} = that.data;
//数据效验
@@ -99,24 +93,15 @@ Page({
}else{
app.toast("数据异常,请刷新页面重试!")
- that.setData({
- loadShow:false
- })
return;
}
if(result==""){
app.toast("请选择审批结果!")
- that.setData({
- loadShow:false
- })
return;
}
if(comment==""){
app.toast("请填写审批意见!")
- that.setData({
- loadShow:false
- })
return;
}
let params = {
@@ -142,9 +127,6 @@ Page({
"Content-Type": "application/json"
},
success(res){
- that.setData({
- loadShow:false
- })
res = res.data
if(res.code == 200){
app.toast("审批成功!")
@@ -157,9 +139,6 @@ Page({
}
})
} else if (sm.cancel) {
- that.setData({
- loadShow:false
- })
console.log('用户点击取消');
}
}
@@ -238,7 +217,7 @@ Page({
returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
wx.redirectTo({
- url: '../../../pageage/project_checking/list/index',
+ url: '../../../pageage/project_funVerify/list/index',
})
},
diff --git a/miniprogram/pages/project_approve/approveFunVerify/index.js b/miniprogram/pages/project_approve/approveFunVerify/index.js
new file mode 100644
index 0000000..fa74858
--- /dev/null
+++ b/miniprogram/pages/project_approve/approveFunVerify/index.js
@@ -0,0 +1,283 @@
+import {
+ getDictCache,
+ selectProjectAuditinfoList
+} from '../../../api/publics'
+import {
+ getProjectFunVerify,
+ updateProjectFunVerify
+} from '../../../api/projectFunVerify'
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ id: "",
+ infoData: {},
+ imageList: [],
+ minImageList: [],
+ loadShow: false,
+ loginName: "",
+ request: app.globalData.reqUrl,
+ list: [{
+ id: 1,
+ text: "合格"
+ }, {
+ id: 2,
+ text: "不合格"
+ }],
+ result: "1",
+ comment: "",
+ flowNodes: [{
+ text: '开始'
+ }, {
+ text: '提交申请'
+ }, {
+ text: '监理审批'
+ }, {
+ text: '结束'
+ }],
+ active: 2,
+ checkFiles: []
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let {
+ id
+ } = options
+ //获取缓存数据
+ wx.getStorage({
+ key: 'userinfo',
+ success: res => {
+ this.setData({
+ id,
+ loginName: res.data.loginName
+ })
+ this.getInfo();
+ this.getAuditinfo();
+ }
+ })
+ },
+
+
+ /**
+ * 获取安全检查详情信息
+ *
+ */
+ getInfo() {
+ let that = this;
+ getProjectFunVerify(this.data.id).then(res => {
+ if (res.code == 200) {
+ let urls = [];
+ let minUrls = [];
+ let checkFiles = [];
+ if (res.data.imageUrls) {
+ res.data.imageUrls.split(',').forEach(element => {
+ urls.push(that.data.request + element);
+ minUrls.push(that.data.request + element + '.min.jpg');
+ });
+ }
+ if (res.data.checkFiles) {
+ res.data.checkFiles.split(',').forEach(item => {
+ let it = item.split('/');
+ checkFiles.push({
+ 'name': it[it.length - 1],
+ path: item
+ });
+ });
+ }
+ that.setData({
+ infoData: res.data,
+ imageList: urls,
+ minImageList: minUrls,
+ checkFiles,
+ })
+ }
+ });
+ },
+
+ //保存
+ onSubmitSave() {
+ let that = this
+ let {
+ infoData,
+ result,
+ comment,
+ loginName
+ } = that.data;
+ //数据效验
+ if (!infoData.id) {
+ app.toast("数据异常,请刷新页面重试!")
+ return;
+ }
+
+ if (result == "") {
+ app.toast("请选择审批结果!")
+ return;
+ }
+ if (comment == "") {
+ app.toast("请填写审批意见!")
+ return;
+ }
+ let params = {
+ id: infoData.id,
+ checkResult: result,
+ comment,
+ approveStatus: result == '1' ? '4' : '3',
+ updateBy: loginName
+ }
+ let msg = result == '1' ? '合格' : '不合格';
+ wx.showModal({
+ title: '提示',
+ content: '是否确定审批' + msg + '?',
+ success: function (sm) {
+ if (sm.confirm) {
+ // 用户点击了确定 可以调用了
+ that.submitForm(params);
+ } else if (sm.cancel) {
+ console.log('用户点击取消');
+ }
+ }
+ })
+ },
+
+ /**
+ * 提交表单
+ * @param {*} params
+ */
+ submitForm(params) {
+ updateProjectFunVerify(params).then(res => {
+ if (res.code == 200) {
+ app.toast("审批成功!")
+ setTimeout(() => {
+ wx.redirectTo({
+ url: '../../../pageage/project_funVerify/list/index',
+ })
+ }, 200)
+ }
+ });
+ },
+
+ //选择检测结果
+ onSelect(e) {
+ this.setData({
+ result: e.detail.id
+ })
+ },
+
+ //审批意见
+ onInputValue(e) {
+ let comment = e.detail.value
+ this.setData({
+ comment
+ })
+ },
+
+ /**
+ * 查询流程日志
+ */
+ getAuditinfo() {
+ let params = {
+ fromType: "5",
+ fromId: this.data.id
+ }
+ selectProjectAuditinfoList(params).then(res => {
+ if (res.code == 200) {
+ this.setData({
+ flowRecordList: res.data
+ })
+ }
+ });
+ },
+
+ // 手风琴
+ onChange(event) {
+ this.setData({
+ activeName: event.detail,
+ });
+ },
+
+ //展示图片
+ showImg: function (e) {
+ var that = this;
+ wx.previewImage({
+ urls: that.data.imageList,
+ current: that.data.imageList[e.currentTarget.dataset.index]
+ })
+ },
+
+ //选择检测结果
+ onSelect(e) {
+ this.setData({
+ result: e.detail.id
+ })
+ },
+
+ //审批意见
+ onInputValue(e) {
+ let comment = e.detail.value
+ this.setData({
+ comment
+ })
+ },
+
+ returnToPage: function () {
+ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
+ wx.redirectTo({
+ url: '../../../pageage/project_funVerify/list/index',
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/miniprogram/pages/project_approve/approveFunVerify/index.json b/miniprogram/pages/project_approve/approveFunVerify/index.json
new file mode 100644
index 0000000..96e88ac
--- /dev/null
+++ b/miniprogram/pages/project_approve/approveFunVerify/index.json
@@ -0,0 +1,11 @@
+{
+ "usingComponents": {
+ "van-overlay": "@vant/weapp/overlay/index",
+ "van-popup": "@vant/weapp/popup/index",
+ "van-collapse": "@vant/weapp/collapse",
+ "van-steps": "@vant/weapp/steps/index",
+ "van-collapse-item": "@vant/weapp/collapse-item"
+ },
+ "navigationStyle":"custom",
+ "navigationBarTitleText": "举牌验收详情"
+}
\ No newline at end of file
diff --git a/miniprogram/pages/project_approve/approveFunVerify/index.wxml b/miniprogram/pages/project_approve/approveFunVerify/index.wxml
new file mode 100644
index 0000000..6a33dd6
--- /dev/null
+++ b/miniprogram/pages/project_approve/approveFunVerify/index.wxml
@@ -0,0 +1,178 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{(flowRecordList.length-index) < 9 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}
+
+ 提交工程功能检验
+ 审批工程功能检验
+ 合格
+ 不合格
+
+
+
+
+
+ 办理用户:{{item.userName}}
+
+
+ 办理单位:{{item.deptName}}
+
+
+ 办理时间:{{item.createTime}}
+
+
+ 审批意见:{{item.comment}}
+
+
+
+
+
+
+
+
+
+ {{infoData.projectName}}
+
+
+
+
+ 单位名称
+ {{infoData.deptName}}
+
+
+
+
+ 检验报告
+
+
+
+
+
+
+
+
+
+ 检验类型
+ {{infoData.checkTypeName}}
+
+
+
+
+ 检验名称
+ {{infoData.checkName}}
+
+
+
+
+ 质量专员
+ {{infoData.qualityUserName}} {{infoData.qualityUser}}
+
+
+
+
+ 监理专员
+ {{infoData.superviseUserName}} {{infoData.superviseUser}}
+
+
+
+
+ 检验时间
+ {{infoData.checkDate}}
+
+
+
+
+ 检验描述
+ {{infoData.intro}}
+
+
+
+
+ 其它附件
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+ 验收结果
+
+ 待审批
+ 合格
+ 不合格
+
+
+
+
+
+ 提交时间
+ {{infoData.createTime}}
+
+
+
+
+ 提交用户
+ {{infoData.createBy}}
+
+
+
+
+
+
+
+ 工程功能检验审批
+
+
+
+ 审批结果
+
+
+
+
+
+ 审批意见
+
+
+
+
+
+ 取消
+ 提交审批
+
+
+
+
+
+
+
+ 数据加载中!请稍后...
+
+
\ No newline at end of file
diff --git a/miniprogram/pages/project_approve/approveFunVerify/index.wxss b/miniprogram/pages/project_approve/approveFunVerify/index.wxss
new file mode 100644
index 0000000..bc7a2b7
--- /dev/null
+++ b/miniprogram/pages/project_approve/approveFunVerify/index.wxss
@@ -0,0 +1,71 @@
+/* pageage/project_checking/info/index.wxss */
+.in-img-max:after{
+ display:block;
+ clear:both;
+ content:"";
+ visibility:hidden;
+ height:0
+ }
+ .in-img-max{
+ width: auto;
+ zoom:1
+ }
+ .in-img-div{
+ position: relative;
+ margin: 0 8px 8px 0;
+ float: left;
+ }
+ .in-img-div image{
+ width: 180rpx;
+ height: 180rpx;
+ border-radius: 15rpx;
+ position: relative;
+ }
+ .van-collapse.van-hairline--top-bottom:after{
+ border-width: 0px 0;
+ }
+ .van-cell.van-cell--borderless{
+ background-color: #2b345b;
+ color: #fff;
+ margin-top: 30rpx;
+ border-radius: 5rpx;
+ }
+ .van-cell.van-cell--borderless:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__title.van-collapse-item__title--expanded:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item .van-cell:after{
+ border-bottom: 0;
+ }
+ .van-collapse-item.van-hairline--top:after{
+ border-top-width:0
+ }
+ .van-cell.van-cell--clickable{
+ background-color: #2b345b;
+ margin-top: 5rpx;
+ margin-bottom: 5rpx;
+ color: #fff;
+ border-radius: 15rpx;
+
+ }
+ .van-cell.van-cell--clickable:active{
+ background-color: #2b345b;
+ }
+ .van-collapse-item__wrapper .van-collapse-item__content{
+ background-color: #1e2336;
+ color:#8ca4ec ;
+ border-width: 0px 0;
+ }
+ .gk_open_con view{
+ padding: 10rpx 0;
+ width: 100%;
+ }
+ .gk_open_con image{
+ width: 30rpx;
+ height: 30rpx;
+ margin-right: 5rpx;
+ position: relative;
+ top: 5rpx;
+ }
\ No newline at end of file
diff --git a/miniprogram/pages/project_flowable/editTask/index.js b/miniprogram/pages/project_flowable/editTask/index.js
index 8e22b8c..45fbdfb 100644
--- a/miniprogram/pages/project_flowable/editTask/index.js
+++ b/miniprogram/pages/project_flowable/editTask/index.js
@@ -45,6 +45,8 @@ Page({
fbAptitude: false,
subDeptTypes: [],
subDeptScopes: [],
+ persChange1: false,
+ persChange2: false,
},
/**
@@ -69,6 +71,16 @@ Page({
fbAptitude: true
})
}
+ if (procDefKey == "flow_xmglzdl_xmzbdwrybg" || procDefKey == "flow_xmglzdl_xmjldwrybg") {
+ this.setData({
+ persChange1: true
+ })
+ }
+ if (procDefKey == "flow_xmglzdl_xmjlzjrybg" || procDefKey == "flow_xmglzdl_xmzbjlrybg") {
+ this.setData({
+ persChange2: true
+ })
+ }
//获取缓存数据
wx.getStorage({
key: 'userinfo',
diff --git a/miniprogram/pages/project_flowable/editTask/index.wxml b/miniprogram/pages/project_flowable/editTask/index.wxml
index 25eb732..9abede3 100644
--- a/miniprogram/pages/project_flowable/editTask/index.wxml
+++ b/miniprogram/pages/project_flowable/editTask/index.wxml
@@ -147,6 +147,12 @@
+
+
+
+
+
+
审批内容 [仅可上传图片]
diff --git a/miniprogram/pages/project_flowable/initTask/index.js b/miniprogram/pages/project_flowable/initTask/index.js
index 4937d6a..ecb2a59 100644
--- a/miniprogram/pages/project_flowable/initTask/index.js
+++ b/miniprogram/pages/project_flowable/initTask/index.js
@@ -42,6 +42,8 @@ Page({
subDeptCustodian: "",
subDeptCustodianCardId: "",
subDeptApproachDate: "",
+ persChange1: false,
+ persChange2: false,
},
/**
@@ -60,6 +62,16 @@ Page({
fbAptitude: true
})
}
+ if (procDefKey == "flow_xmglzdl_xmzbdwrybg" || procDefKey == "flow_xmglzdl_xmjldwrybg") {
+ this.setData({
+ persChange1: true
+ })
+ }
+ if (procDefKey == "flow_xmglzdl_xmjlzjrybg" || procDefKey == "flow_xmglzdl_xmzbjlrybg") {
+ this.setData({
+ persChange2: true
+ })
+ }
//获取缓存数据
wx.getStorage({
key: 'userinfo',
diff --git a/miniprogram/pages/project_flowable/initTask/index.wxml b/miniprogram/pages/project_flowable/initTask/index.wxml
index a893654..cac29ba 100644
--- a/miniprogram/pages/project_flowable/initTask/index.wxml
+++ b/miniprogram/pages/project_flowable/initTask/index.wxml
@@ -103,6 +103,12 @@
+
+
+
+
+
+
审批内容 [仅可上传图片]
diff --git a/miniprogram/pages/quality_manage/index.js b/miniprogram/pages/quality_manage/index.js
index 36bac56..52e94f9 100644
--- a/miniprogram/pages/quality_manage/index.js
+++ b/miniprogram/pages/quality_manage/index.js
@@ -52,6 +52,7 @@ Page({
scslDb: 0,
jpysDb: 0,
clfyDb: 0,
+ gcgnDb: 0,
},
/**
@@ -486,7 +487,8 @@ Page({
qyfsDb: res.data.approveQYFS,
scslDb: res.data.approveSCSL,
jpysDb: res.data.approveJPYS,
- clfyDb: res.data.approveCLFY
+ clfyDb: res.data.approveCLFY,
+ gcgnDb: res.data.approveGCGN
})
console.log(that.data)
}
diff --git a/miniprogram/pages/quality_manage/index.wxml b/miniprogram/pages/quality_manage/index.wxml
index 98bb818..0df1e17 100644
--- a/miniprogram/pages/quality_manage/index.wxml
+++ b/miniprogram/pages/quality_manage/index.wxml
@@ -29,6 +29,7 @@
{{jpysDb}}
{{qyfsDb}}
{{zl}}
+ {{gcgnDb}}
{{item.menu_name}}