diff --git a/yanzhu-ui-app/miniprogram/app.json b/yanzhu-ui-app/miniprogram/app.json
index 579f941e..be82e9ce 100644
--- a/yanzhu-ui-app/miniprogram/app.json
+++ b/yanzhu-ui-app/miniprogram/app.json
@@ -8,14 +8,8 @@
"pages/project_safety/index",
"pages/project_quality/index",
"pages/sign_mags/index",
- "pages/project_flowable/initTask/index",
- "pages/project_flowable/myFlowDefinition/index",
- "pages/project_flowable/await/index",
"pages/project_flowable/approveTask/index",
- "pages/project_flowable/finished/index",
"pages/project_flowable/detailTask/index",
- "pages/project_flowable/editTask/index",
- "pages/project_flowable/myProcessIns/index",
"pages/project_flowable/subDepts/index",
"pages/project_flowable/subDeptsUsers/index",
"pages/project_problemmodify/list/index",
diff --git a/yanzhu-ui-app/miniprogram/images/icons_1.png b/yanzhu-ui-app/miniprogram/images/icons_1.png
deleted file mode 100644
index 4a01a1e5..00000000
Binary files a/yanzhu-ui-app/miniprogram/images/icons_1.png and /dev/null differ
diff --git a/yanzhu-ui-app/miniprogram/images/icons_2.png b/yanzhu-ui-app/miniprogram/images/icons_2.png
deleted file mode 100644
index 22f8ff27..00000000
Binary files a/yanzhu-ui-app/miniprogram/images/icons_2.png and /dev/null differ
diff --git a/yanzhu-ui-app/miniprogram/images/icons_3.png b/yanzhu-ui-app/miniprogram/images/icons_3.png
deleted file mode 100644
index 81e04f9c..00000000
Binary files a/yanzhu-ui-app/miniprogram/images/icons_3.png and /dev/null differ
diff --git a/yanzhu-ui-app/miniprogram/images/icons_4.png b/yanzhu-ui-app/miniprogram/images/icons_4.png
deleted file mode 100644
index e71a7505..00000000
Binary files a/yanzhu-ui-app/miniprogram/images/icons_4.png and /dev/null differ
diff --git a/yanzhu-ui-app/miniprogram/images/icons_5.png b/yanzhu-ui-app/miniprogram/images/icons_5.png
deleted file mode 100644
index cd75a414..00000000
Binary files a/yanzhu-ui-app/miniprogram/images/icons_5.png and /dev/null differ
diff --git a/yanzhu-ui-app/miniprogram/images/nodata.png b/yanzhu-ui-app/miniprogram/images/nodata.png
deleted file mode 100644
index 17d832cc..00000000
Binary files a/yanzhu-ui-app/miniprogram/images/nodata.png and /dev/null differ
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.js b/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.js
deleted file mode 100644
index 04b5e62a..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.js
+++ /dev/null
@@ -1,120 +0,0 @@
-import {
- myAwaitFlowTaskList
-} from '../../../api/flowable'
-const app = getApp()
-Page({
-
- /**
- * 页面的初始数据
- */
- data: {
- listData: []
- },
-
- /**
- * 查看详情
- * @param {*} e
- */
- infoTap(e) {
- let {
- deployId,
- procInsId,
- taskId,
- taskName,
- category,
- startDeptName,
- startUserName,
- procDefName,
- businessKey,
- businessKeyName,
- businessDeptId,
- businessKeyParName,
- startUserId,
- finishTime
- } = e.currentTarget.dataset.set
- if (taskName == "提交申请") {
- wx.redirectTo({
- url: `../editTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&category=${category}&projectName=${businessKeyName}&businessKey=${businessKey}&businessKeyParName=${businessKeyParName}&businessDeptId=${businessDeptId}&startUserId=${startUserId}`,
- })
- } else {
- wx.redirectTo({
- url: `../approveTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&category=${category}&projectName=${businessKeyName}&businessKey=${businessKey}&businessKeyParName=${businessKeyParName}&businessDeptId=${businessDeptId}&startUserId=${startUserId}&finishTime=${finishTime}`,
- })
- }
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- this.initListData();
- },
-
- /**
- * 初始化待我办理列表数据
- */
- initListData() {
- myAwaitFlowTaskList({}).then(res => {
- if (res.code == 200) {
- this.setData({
- listData: res.data
- })
- }
- });
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
-
- },
-
- returnToPage: function () {
- wx.redirectTo({
- url: '../../index/index',
- })
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
-
- }
-})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.json b/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.json
deleted file mode 100644
index c38e2687..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "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/pages/project_flowable/await/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.wxml
deleted file mode 100644
index 153e9617..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.wxml
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
-
- {{index < 10 ?'0'+(index+1):(index+1)}}
- {{item.taskName}}
- 待审批
- 审批驳回
-
-
-
-
- 项目名称:{{item.businessKeyParName}}
- 临建项目:{{item.businessKeyName}}
- 申请类型:{{item.procDefName}}
- 接收时间:{{item.createTime}}
- 申请用户:{{item.startUserName}}
- 申请单位:{{item.startDeptName}}
-
-
-
-
-
-
-
- 暂无数据
-
-
-
-
-
-
-
-
-
-
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.wxss b/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.wxss
deleted file mode 100644
index 838c6981..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/await/index.wxss
+++ /dev/null
@@ -1,16 +0,0 @@
-/* pageage/project_checking_list/project_checking_list.wxss */
-.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/pages/project_flowable/editTask/index.js b/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.js
deleted file mode 100644
index 4cd37989..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.js
+++ /dev/null
@@ -1,830 +0,0 @@
-import {
- complete,
- stopProcess,
- readDeployNotes,
- findCommentByProcInsId
-} from '../../../api/flowable'
-import {
- findMyDeptList,
- findAllByCategory,
- findProjectApplyData
-} from '../../../api/publics'
-import {
- updateProjectApply
-} from '../../../api/projectApply'
-import {
- syncFileUpload
-} from '../../../utils/request'
-import config from '../../../config'
-const app = getApp()
-Page({
-
- /**
- * 页面的初始数据
- */
- data: {
- maxDate: new Date(2088, 1, 1).getTime(),
- deptList: [],
- deployId: "",
- procInsId: "",
- procDefName: "",
- deptName: "",
- nickName: "",
- taskId: "",
- taskName: "",
- category: "",
- projectName: "",
- businessKey: "",
- businessDeptId: "",
- projectParName: "",
- infoData: {},
- active: 100,
- stepList: [],
- rejectNode: false,
- limit: 9,
- imgTypes: ["png", "jpg", "jpeg"],
- fileTypes: ["pdf", "doc", "docx", "xls", "xlsx"],
- fileNames: [],
- minImageList: [],
- detailDataList: [],
- dataList: [],
- stopShow: false,
- stopBtnShow: false,
- activeName: "",
- comment: "",
- useDeptIdIndex: 0,
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- let {
- deployId,
- procInsId,
- procDefName,
- deptName,
- nickName,
- taskId,
- taskName,
- category,
- businessKey,
- projectName,
- businessDeptId,
- projectParName,
- startUserId
- } = options
- this.setData({
- businessKey,
- projectName,
- procInsId,
- procDefName,
- deployId,
- deptName,
- nickName,
- taskId,
- taskName,
- category,
- businessDeptId,
- projectParName,
- initData: {
- id: businessKey,
- text: projectName
- },
- stopShow: startUserId == app.globalData.userData?.userId,
- })
- debugger
- this.initDeptList();
- this.findMyDeptAssetsList();
- this.findFlowNodes();
- this.findCommentByProcInsId();
- },
-
- //查询部门资产列表信息
- findMyDeptAssetsList() {
- findAllByCategory(this.data.category).then(res => {
- if (res.code == '200') {
- let list = [];
- res.data.forEach(item => {
- let children = [];
- item.childrenAssetsTypeList.forEach(child => {
- children.push({
- id: child.id,
- text: child.name,
- units: child.unit,
- detailName: item.name + ' > ' + child.name
- });
- })
- list.push({
- id: item.id,
- text: item.name,
- children: children
- });
- });
- this.findApplyDataInfo();
- this.setData({
- dataList: list
- })
- }
- });
- },
-
- /**
- * 初始化部门列表
- */
- initDeptList() {
- findMyDeptList().then(res => {
- let list = [];
- res.data.forEach(item => {
- list.push({
- "id": item.deptId,
- "text": item.deptName
- });
- });
- this.setData({
- deptList: list
- })
- });
- },
-
- //查询工作流节点
- findFlowNodes() {
- readDeployNotes(this.data.deployId).then(res => {
- if (res.code == 200) {
- let list = [{
- text: '开始'
- }];
- let index = this.data.active;
- res.data.forEach((item, idx) => {
- if (this.data.taskName == item.name) {
- index = idx + 1;
- }
- list.push({
- text: item.name,
- desc: ''
- });
- });
- list.push({
- text: '结束'
- });
- this.setData({
- active: index,
- stepList: list
- })
- }
- });
- },
-
- //查询审批日志
- findCommentByProcInsId() {
- findCommentByProcInsId({
- procInsId: this.data.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() {
- findProjectApplyData(this.data.businessKey).then(res => {
- let imgList = [];
- let fileNames = [];
- if (res.data.applyFiles) {
- res.data.applyFiles.split(',').forEach(files => {
- if(files){
- let fileType = files.split(".")[files.split(".").length - 1].toLowerCase();
- if (this.data.imgTypes.indexOf(fileType) == -1) {
- let it = files.split('/');
- fileNames.push({
- name: it[it.length - 1],
- path: files
- });
- } else {
- imgList.push(config.baseUrl + files + '.min.jpg');
- }
- }
- });
- }
- if (res.data.proProjectApplyDetailList.length > 0) {
- let data = [];
- res.data.proProjectApplyDetailList.forEach(item => {
- let activeId = [];
- activeId.push(item.typeId);
- let mainActiveIndex = 0;
- let useUnitIndex = 0;
- let assetsUnits = [];
- this.data.dataList.forEach((_it, _itIndex) => {
- if (_it.id == item.typeId) {
- mainActiveIndex = _itIndex;
- _it.children.forEach((_children, _childrenIndex) => {
- if (_children.id == item.assetsId && _children.units) {
- let unitList = _children.units.split(',');
- if (unitList.length > 0) {
- unitList.forEach((unit, idx) => {
- if (unit == item.assetsUnit) {
- useUnitIndex = idx;
- }
- assetsUnits.push({
- id: idx,
- text: unit
- });
- });
- }
- }
- });
- }
- });
- data.push({
- detailId: item.assetsId,
- detailName: item.assetsName,
- showDetailsName: item.typeName + ' > ' + item.assetsName,
- showDetailsPopup: false,
- mainActiveIndex: mainActiveIndex,
- activeId: activeId,
- useUnit: item.assetsUnit,
- assetsUnits: assetsUnits,
- useUnitIndex: useUnitIndex,
- applyNumber: item.number,
- assetsVersion: item.assetsVersion,
- useReason: item.useReason
- })
- });
- this.setData({
- detailDataList: data
- })
- }
- this.setData({
- infoData: res.data,
- fileNames: fileNames,
- minImageList: imgList,
- })
- })
- },
-
- /**
- * 获取驳回节点
- * @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;
- }
- }
- },
-
- //保存申请
- onSaveApply() {
- let {
- procInsId,
- initData,
- infoData,
- detailDataList,
- fileNames,
- minImageList
- } = this.data;
- //数据效验
- if (!procInsId || !initData.id) {
- app.toast("数据异常,请刷新页面重试!")
- return false;
- }
- if (!infoData.deptId) {
- app.toast("请选择使用单位!")
- return false;
- }
- if (!infoData.useTime) {
- app.toast("请选择使用时间!")
- return false;
- }
- if (!infoData.applyReason) {
- app.toast("请填写申请原因!")
- return false;
- }
- if (detailDataList.length > 0) {
- for (let i = 0; i < detailDataList.length; i++) {
- if (!detailDataList[i].detailId || !detailDataList[i].detailName || detailDataList[i].activeId.length == 0) {
- app.toast("请选择申请明细!")
- return false;
- }
- if (!detailDataList[i].applyNumber) {
- app.toast("请填写申请数量!")
- return false;
- }
- if (!detailDataList[i].useUnit) {
- app.toast("请选择单位名称!")
- return false;
- }
- }
- } else {
- app.toast("请添加申请明细!")
- }
- if (fileNames.length > 0) {
- for (let i = 0; i < fileNames.length; i++) {
- if(fileNames[0]){
- let _fileType = fileNames[0].path.split('.');
- _fileType = _fileType[_fileType.length - 1].toLowerCase();
- if (this.data.fileTypes.indexOf(_fileType) == -1) {
- app.toast("申请附件不支持 [ " + _fileType + " ] 格式!请检查第" + (i + 1) + "个附件")
- return false;
- }
- }
- }
- }
- let that = this;
- wx.showModal({
- title: '提示',
- content: '是否确定提交流程申请?',
- success: function (sm) {
- if (sm.confirm) {
- that.submitBefore();
- } else if (sm.cancel) {
- console.log('用户点击取消');
- }
- }
- })
- },
-
- /**
- * 提交前数据准备
- */
- submitBefore() {
- let {
- fileNames,
- minImageList
- } = this.data;
- if (fileNames.length > 0) {
- fileNames.forEach(item => {
- minImageList.push(item.path);
- });
- }
- let fileUrls = [];
- if (minImageList.length > 0) {
- minImageList.forEach(item => {
- //这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
- if (item.indexOf("/profile/") > -1) {
- fileUrls.push(item.replace(config.baseUrl, "").replace(".min.jpg", ""));
- if (fileUrls.length == minImageList.length) {
- //上传完毕
- this.submitApply(fileUrls);
- }
- } else {
- syncFileUpload(item).then(res => {
- fileUrls.push(res.fileName);
- //验证图片上传完毕
- if (fileUrls.length == minImageList.length) {
- this.submitApply(fileUrls);
- }
- });
- }
- });
- } else {
- this.submitApply(fileUrls);
- }
- },
-
- /**
- * 提交表单
- */
- submitApply(fileData) {
- if (this.data.taskName == '提交申请') {
- let {
- taskId,
- procInsId,
- infoData,
- category,
- dataList,
- detailDataList
- } = this.data;
- let applyDetailList = [];
- detailDataList.forEach(detail => {
- applyDetailList.push({
- superTypeKey: category,
- typeId: dataList[detail.mainActiveIndex].id,
- typeName: dataList[detail.mainActiveIndex].text,
- assetsId: detail.detailId,
- assetsName: detail.detailName,
- number: detail.applyNumber,
- assetsUnit: detail.useUnit,
- assetsVersion: detail.assetsVersion,
- useReason: detail.useReason
- });
- });
- let params = {
- taskId,
- instanceId: procInsId,
- comment:"修改并重新提交申请",
- variables: {},
- proProjectApply: {
- id: infoData.id,
- deptId: infoData.deptId,
- projId: infoData.projId,
- projName: infoData.projName,
- applyType: infoData.applyType,
- applyStatus: 1,
- useTime: infoData.useTime,
- applyReason: infoData.applyReason,
- applyFiles: fileData.toString(),
- proProjectApplyDetailList: applyDetailList
- }
- }
- complete(params).then(res => {
- if (res.code == 200) {
- app.toast("修改申请信息成功!")
- setTimeout(() => {
- wx.redirectTo({
- url: `../../index/index`,
- })
- }, 300)
- }
- });
- } else {
- this.submitData(fileData);
- }
- },
-
- /**
- * 提交表单
- */
- submitData(fileData) {
- let {
- infoData,
- category,
- dataList,
- detailDataList
- } = this.data;
- let applyDetailList = [];
- detailDataList.forEach(detail => {
- applyDetailList.push({
- superTypeKey: category,
- typeId: dataList[detail.mainActiveIndex].id,
- typeName: dataList[detail.mainActiveIndex].text,
- assetsId: detail.detailId,
- assetsName: detail.detailName,
- number: detail.applyNumber,
- assetsUnit: detail.useUnit,
- assetsVersion: detail.assetsVersion,
- useReason: detail.useReason
- });
- });
- let params = {
- id: infoData.id,
- deptId: infoData.deptId,
- projId: infoData.projId,
- projName: infoData.projName,
- applyType: infoData.applyType,
- applyStatus: 1,
- useTime: infoData.useTime,
- applyReason: infoData.applyReason,
- applyFiles: fileData.toString(),
- proProjectApplyDetailList: applyDetailList
- }
- updateProjectApply(params).then(res => {
- if (res.code == 200) {
- app.toast("修改申请信息成功!")
- setTimeout(() => {
- wx.redirectTo({
- url: `../approveTask/index?deployId=${this.data.deployId}&procInsId=${this.data.procInsId}&nickName=${this.data.nickName}&deptName=${this.data.deptName}&procDefName=${this.data.procDefName}&taskId=${this.data.taskId}&taskName=${this.data.taskName}&category=${this.data.category}&projectName=${this.data.projectName}&businessKey=${this.data.businessKey}&businessKeyParName=${this.data.businessKeyParName}&businessDeptId=${this.data.businessDeptId}&startUserId=${this.data.startUserId}`,
- })
- }, 300)
- }
- });
- },
-
- //申请说明输入
- applyReasonblur: function (options) {
- this.data.infoData.applyReason = options.detail.value;
- },
-
- //使用单位
- onSelectDept(e) {
- this.setData({
- "infoData.deptId": e.detail.id
- })
- },
-
- //使用时间
- onInputTime(e) {
- this.setData({
- "infoData.useTime": e.detail
- })
- },
-
- /**
- * 图片上传
- * @param {*} options
- */
- imgUpload(options) {
- let imgs = options.detail;
- this.setData({
- minImageList: imgs
- });
- },
-
- /**
- * 文件上传
- * @param {*} options
- */
- fileUpload(options) {
- let files = options.detail;
- this.setData({
- fileNames: files
- });
- },
-
- // 手风琴
- onChange(event) {
- this.setData({
- activeName: event.detail,
- });
- },
-
- returnToPage: function () {
- /*关闭当前页面,跳转到其它页面。*/
- wx.redirectTo({
- url: '../await/index',
- })
- },
-
- /**
- * 栏目触发事件
- */
- onClickNav(e) {
- var index = e.currentTarget.dataset.index
- let list = this.data.detailDataList;
- list[index].activeId = null;
- list[index].mainActiveIndex = e.detail.index;
- this.setData({
- detailDataList: list
- })
- console.log(e.detail.index, this.data.dataList);
- },
-
- /**
- * 选项触发事件
- */
- onClickItem(e) {
- var index = e.currentTarget.dataset.index
- let list = this.data.detailDataList;
- list[index].detailId = e.detail.id;
- list[index].detailName = e.detail.text;
- list[index].showDetailsName = e.detail.detailName;
- if (e.detail.units) {
- let itemList = [];
- e.detail.units.split(',').forEach((item, idx) => {
- if (idx == 0) {
- list[index].useUnitIndex = idx;
- list[index].useUnit = item;
- }
- itemList.push({
- id: idx,
- text: item
- });
- });
- list[index].assetsUnits = itemList;
- }
- list[index].activeId = e.detail.id;
- list[index].showDetailsPopup = false;
- this.setData({
- detailDataList: list
- })
- },
-
- //新增问题
- newApplyDetail() {
- var data = this.data.detailDataList
- data.push({
- detailId: '',
- detailName: '',
- showDetailsName: '',
- showDetailsPopup: false,
- mainActiveIndex: 0,
- activeId: [],
- useUnit: "",
- useUnitIndex: "",
- assetsUnits: [],
- applyNumber: "",
- assetsVersion: "",
- useReason: ""
- })
- this.setData({
- detailDataList: data
- })
- },
-
- /**
- * 删除申请详情
- * @param {*} e
- */
- delApplyDetail(e) {
- var index = e.currentTarget.dataset.index
- var data = this.data.detailDataList
- data.splice(index, 1);
- this.setData({
- detailDataList: data
- })
- },
-
- //输入申请数量
- onInputNumber(e) {
- var index = e.currentTarget.dataset.index
- let list = this.data.detailDataList;
- let value = e.detail.value;
- list[index].applyNumber = value;
- this.setData({
- detailDataList: list
- })
- },
-
- //选择资产单位
- onSelectUnit(e) {
- var index = e.currentTarget.dataset.index
- let list = this.data.detailDataList;
- list[index].useUnit = e.detail.text;
- list[index].useUnitIndex = e.detail.id;
- this.setData({
- detailDataList: list
- })
- },
-
- //输入规格型号
- onInputVersion(e) {
- var index = e.currentTarget.dataset.index
- let list = this.data.detailDataList;
- list[index].assetsVersion = e.detail.value;
- this.setData({
- detailDataList: list
- })
- },
-
- //输入使用说明
- onInputUseReason(e) {
- var index = e.currentTarget.dataset.index
- let list = this.data.detailDataList;
- list[index].useReason = e.detail.value;
- this.setData({
- detailDataList: list
- })
- },
-
- //关闭申请明细选择
- onShowPopup(e) {
- var index = e.currentTarget.dataset.index
- let list = this.data.detailDataList;
- list[index].showDetailsPopup = true;
- this.setData({
- detailDataList: list
- })
- },
-
- //关闭申请明细选择
- onClosePopup(e) {
- var index = e.currentTarget.dataset.index
- let list = this.data.detailDataList;
- list[index].showDetailsPopup = false;
- this.setData({
- detailDataList: list
- })
- },
-
- /**
- * 切换临建项目
- * @param {*} e
- */
- onProjectSelect: function (e) {
- let projectId = e.detail.id;
- let projectName = e.detail.text;
- app.globalData.useProjectId = projectId;
- app.globalData.useProjectName = projectName;
- this.setData({
- initData: {
- id: app.globalData.useProjectId,
- text: app.globalData.useProjectName
- }
- })
- },
-
- //流程退回
- onStopApply() {
- 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.procInsId,
- comment: this.data.comment
- }).then(res => {
- if (res.code == 200) {
- app.toast("终止流程申请成功!")
- setTimeout(() => {
- wx.redirectTo({
- url: '../../index/index',
- })
- }, 500)
- }
- });
- },
-
- //终止原因
- commentblur: function (options) {
- this.data.comment = options.detail.value;
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
-
- }
-})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.json b/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.json
deleted file mode 100644
index 67590fea..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "usingComponents": {
- "van-overlay": "@vant/weapp/overlay/index",
- "van-collapse": "@vant/weapp/collapse",
- "van-collapse-item": "@vant/weapp/collapse-item",
- "van-popup": "@vant/weapp/popup",
- "van-picker": "@vant/weapp/picker/index",
- "van-steps": "@vant/weapp/steps/index",
- "van-tree-select": "@vant/weapp/tree-select/index"
- },
- "navigationStyle":"custom"
-}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.wxml
deleted file mode 100644
index 2832f43d..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.wxml
+++ /dev/null
@@ -1,164 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{(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}}
-
-
-
-
-
-
-
-
-
-
-
- 使用单位
-
-
-
-
-
- 使用时间
-
-
-
-
-
- 申请原因
-
-
-
-
-
- 申请图片
- [其它格式文件请截图上传、电脑端上传]
-
-
-
-
-
-
- 申请文件
- [仅可上传pdf、doc、docx、xls、xlsx]
-
-
-
-
-
-
-
-
-
-
- 申请明细 {{ format.indexNumFormat(index) }}
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 添加申请明细
-
-
-
-
-
-
- 终止原因
-
-
-
-
-
-
-
-
- 取消
- 终止申请
- 提交申请
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.wxss b/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.wxss
deleted file mode 100644
index 7e98c59b..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/editTask/index.wxss
+++ /dev/null
@@ -1,201 +0,0 @@
-/* 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;
- }
- .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;
- }
- .text_active{
- padding-left: 5rpx;
- color: #8369f5;
- }
- .van-sidebar{
- background-color: #212737!important;
- }
- .van-sidebar-item{
- color: #EFEFEF!important;
- background-color: #212737!important;
- }
- .van-sidebar-item--selected{
- border-color:var(--sidebar-selected-border-color,#8369f5)!important;
- background-color: #252d41 !important;
- color: #83a5ef !important;
- }
- .van-tree-select__content{
- background-color:#252d41 !important;
- }
- .van-tree-select__item--active {
- color: var(--tree-select-item-active-color,#8369f5) !important;
- }
- .van-tree-select{
- height: 800rpx !important;
- }
- .van-popup.van-popup--bottom {
- margin-bottom: -55rpx !important;
- }
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.js b/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.js
deleted file mode 100644
index feaca6c7..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.js
+++ /dev/null
@@ -1,144 +0,0 @@
-import {
- myFinishedFlowTaskList
-} from '../../../api/flowable'
-const app = getApp()
-Page({
-
- /**
- * 页面的初始数据
- */
- data: {
- initData: {},
- listData: [],
- pageNum: 1,
- pageSize: 50,
- total: 0,
- },
-
- infoTap(e) {
- let {
- deployId,
- procInsId,
- taskId,
- taskName,
- category,
- startDeptName,
- startUserName,
- procDefName,
- businessKey,
- businessKeyName,
- businessDeptId,
- businessKeyParName,
- startUserId,
- finishTime
- } = e.currentTarget.dataset.set
- if (!finishTime) {
- finishTime = "";
- }
- wx.redirectTo({
- url: `../detailTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&category=${category}&projectName=${businessKeyName}&businessKey=${businessKey}&businessKeyParName=${businessKeyParName}&businessDeptId=${businessDeptId}&startUserId=${startUserId}&finishTime=${finishTime}&ret=finished`,
- })
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- this.getListData();
- },
-
- /**
- * 查询项目举牌验收数据
- */
- getListData() {
- let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize;
- myFinishedFlowTaskList(params).then(res => {
- if (res.code == 200) {
- let _list = [];
- res.rows.forEach( it => {
- it.duration = app.getDurationDate(it.duration);
- _list.push(it);
- });
- this.setData({
- total: res.total,
- listData: this.data.listData.concat(_list)
- });
- }
- });
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
-
- },
-
- returnToPage: function () {
- /*关闭当前页面,跳转到其它页面。*/
- wx.redirectTo({
- url: '../../index/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();
- }
- },
-
- //项目切换 返回值
- onProjectSelect(e) {
- let projectId = e.detail.id;
- let projectName = e.detail.text;
- app.globalData.projectId = projectId;
- app.globalData.projectName = projectName;
- this.onLoad();
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
-
- }
-})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.json b/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.json
deleted file mode 100644
index c38e2687..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "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/pages/project_flowable/finished/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.wxml
deleted file mode 100644
index b541c2b7..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.wxml
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
-
-
-
- {{index < 10 ?'0'+(index+1):(index+1)}}
- {{item.endTime}}
- 已提交
- 已完成
- 已退回
- 已终止
- 已驳回
- 已撤回
-
-
-
-
- 临时项目:{{item.businessKeyName}}
- 审批事项:{{item.procDefName}}
-
-
- 当前节点:{{item.taskName}}
- 流程结束
-
- 接收时间:{{item.createTime}}
- 申请用户:{{item.startUserName}}
- 申请单位:{{item.startDeptName}}
-
-
-
-
-
-
-
- 暂无数据
-
-
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.wxss b/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.wxss
deleted file mode 100644
index 8aacdd75..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/finished/index.wxss
+++ /dev/null
@@ -1,19 +0,0 @@
-/* pageage/project_checking_list/project_checking_list.wxss */
-.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;
- }
- .inspect_max_scroll_1 {
- height: 82vh;
-}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.js b/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.js
deleted file mode 100644
index c093be58..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.js
+++ /dev/null
@@ -1,547 +0,0 @@
-import {
- readNotes,
- readDeployNotes,
- startProcessInstance
-} from '../../../api/flowable'
-import {
- findMyDeptList,
- findAllByCategory
-} from '../../../api/publics'
-import config from '../../../config'
-import {
- getToken
-} from '../../../utils/auth'
-const app = getApp()
-Page({
-
- /**
- * 页面的初始数据
- */
- data: {
- maxDate: new Date(2088, 1, 1).getTime(),
- options: {},
- initData: {},
- deptList: [],
- dataList: [],
- useDeptId: "",
- useTime: "",
- applyReason: "",
- limit: 9,
- detailDataList: [],
- filesData: [],
- fileType: ["png", "jpg", "jpeg"],
- flowNodeList: [],
- flowNodes: [],
- stepList: [],
- active: "",
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- this.setData({
- options: options,
- initData: {
- id: app.globalData.useProjectId,
- text: app.globalData.useProjectName
- }
- })
- this.initDeptList();
- this.findMyDeptAssetsList();
- this.findFlowNodes();
- this.newApplyDetail();
- },
-
- /**
- * 栏目触发事件
- */
- onClickNav(e) {
- var index = e.currentTarget.dataset.index
- let list = this.data.detailDataList;
- list[index].activeId = null;
- list[index].mainActiveIndex = e.detail.index;
- this.setData({
- detailDataList: list
- })
- console.log(e.detail.index, this.data.dataList);
- },
-
- /**
- * 选项触发事件
- */
- onClickItem(e) {
- var index = e.currentTarget.dataset.index
- let list = this.data.detailDataList;
- list[index].detailId = e.detail.id;
- list[index].detailName = e.detail.text;
- list[index].showDetailsName = e.detail.detailName;
- if (e.detail.units) {
- let itemList = [];
- e.detail.units.split(',').forEach((item, idx) => {
- if (idx == 0) {
- list[index].useUnitIndex = idx;
- list[index].useUnit = item;
- }
- itemList.push({
- id: idx,
- text: item
- });
- });
- list[index].assetsUnits = itemList;
- }
- list[index].activeId = e.detail.id;
- list[index].showDetailsPopup = false;
- this.setData({
- detailDataList: list
- })
- },
-
- /**
- * 初始化部门列表
- */
- initDeptList() {
- findMyDeptList().then(res => {
- let list = [];
- res.data.forEach(item => {
- list.push({
- "id": item.deptId,
- "text": item.deptName
- });
- });
- this.setData({
- deptList: list,
- useDeptId: app.globalData.userData?.deptId,
- })
- });
- },
-
- //查询工作流节点
- findFlowNodes() {
- //readNotes
- readDeployNotes(this.data.options.deploymentId).then(res => {
- if (res.code == 200) {
- let list = [{
- text: '开始'
- }];
- res.data.forEach(item => {
- list.push({
- text: item.name,
- desc: ''
- });
- });
- list.push({
- text: '结束'
- });
- this.setData({
- stepList: list
- })
- }
- });
- },
-
- //新增问题
- newApplyDetail() {
- var data = this.data.detailDataList
- data.push({
- detailId: '',
- detailName: '',
- showDetailsName: '',
- showDetailsPopup: false,
- mainActiveIndex: 0,
- activeId: [],
- useUnit: "",
- useUnitIndex: "",
- assetsUnits: [],
- applyNumber: "",
- assetsVersion: "",
- useReason: ""
- })
- this.setData({
- detailDataList: data
- })
- },
-
- /**
- * 删除申请详情
- * @param {*} e
- */
- delApplyDetail(e) {
- var index = e.currentTarget.dataset.index
- var data = this.data.detailDataList
- data.splice(index, 1);
- this.setData({
- detailDataList: data
- })
- },
-
- //保存
- onSave() {
- let {
- options,
- initData,
- useDeptId,
- useTime,
- applyReason,
- detailDataList,
- filesData
- } = this.data;
- //数据效验
- if (!initData.id || !options.procDefId || !options.category || !options.deploymentId) {
- app.toast("数据异常,请刷新页面重试!")
- return false;
- }
- if (useDeptId == "") {
- app.toast("请选择使用单位!")
- return false;
- }
- if (useTime == "") {
- app.toast("请选择使用时间!")
- return false;
- }
- if (applyReason == "") {
- app.toast("请填写申请原因!")
- return false;
- }
- if (detailDataList.length > 0) {
- for (let i = 0; i < detailDataList.length; i++) {
- if (!detailDataList[i].detailId || !detailDataList[i].detailName || detailDataList[i].activeId.length == 0) {
- app.toast("请选择申请明细!")
- return false;
- }
- if (!detailDataList[i].applyNumber) {
- app.toast("请填写申请数量!")
- return false;
- }
- if (!detailDataList[i].useUnit) {
- app.toast("请选择单位名称!")
- return false;
- }
- }
- } else {
- app.toast("请添加申请明细!")
- }
- if (filesData.length > 0) {
- for (let i = 0; i < filesData.length; i++) {
- let _fileType = filesData[0].split('.');
- _fileType = _fileType[_fileType.length - 1].toLowerCase();
- if (this.data.fileType.indexOf(_fileType) == -1) {
- app.toast("申请附件不支持 [ " + _fileType + " ] 格式!请检查第" + (i + 1) + "个附件")
- return false;
- }
- }
- }
- let that = this;
- wx.showModal({
- title: '提示',
- content: '是否确定提交流程申请?',
- success: function (sm) {
- if (sm.confirm) {
- that.submit()
- } else if (sm.cancel) {
- console.log('用户点击取消');
- }
- }
- })
- },
-
- /**
- * 表单确认提交
- */
- submit() {
- let {
- filesData,
- } = this.data;
- let fileUrls = [];
- if (filesData.length > 0) {
- filesData.forEach(async (item) => {
- //这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
- let ajaxResult = await this.syncUploadImage(item);
- fileUrls.push(ajaxResult.data.fileName);
- //验证图片上传完毕
- if (fileUrls.length == filesData.length) {
- this.sbm(fileUrls.toString());
- }
- })
- } else {
- this.sbm("");
- }
-
- },
-
- sbm(fileUrls) {
- let {
- options,
- initData,
- useDeptId,
- useTime,
- applyReason,
- detailDataList,
- dataList
- } = this.data;
- let applyDetailList = [];
- detailDataList.forEach(detail => {
- applyDetailList.push({
- superTypeKey: options.category,
- typeId: dataList[detail.mainActiveIndex].id,
- typeName: dataList[detail.mainActiveIndex].name,
- assetsId: detail.detailId,
- assetsName: detail.detailName,
- number: detail.applyNumber,
- assetsUnit: detail.useUnit,
- assetsVersion: detail.assetsVersion,
- useReason: detail.useReason
- });
- });
- let params = {
- procDefId: options.procDefId,
- proProjectApply: {
- deptId: useDeptId,
- projId: initData.id,
- projName: initData.text,
- applyType: options.category,
- applyStatus: 1,
- useTime,
- applyReason,
- applyFiles: fileUrls,
- proProjectApplyDetailList: applyDetailList
- }
- }
- startProcessInstance(params).then(res => {
- if (res.code == '200') {
- app.toast("提交流程申请成功!", 'success');
- //跳转页面
- wx.redirectTo({
- url: '../../index/index',
- })
- }
- });
- },
-
- /**
- * 这里考虑上传图片异步问题,封装为同步
- */
- syncUploadImage(file) {
- let url = config.baseUrl + "/common/upload";
- let name = "file";
- return new Promise((resolve, reject) => {
- wx.uploadFile({
- url, // 上传的服务器接口地址
- filePath: file,
- header: {
- "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
- 'Authorization': 'Bearer ' + getToken(),
- },
- name, //上传的所需字段,后端提供
- formData: null,
- 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)
- }
- });
- })
- },
-
- //申请说明输入
- applyReasonblur: function (options) {
- this.data.applyReason = options.detail.value;
- },
-
- //申请附件上传
- fileUpload(options) {
- let files = options.detail;
- this.setData({
- filesData: files
- });
- },
-
- //使用单位
- onSelectDept(e) {
- this.setData({
- useDeptId: e.detail.id
- })
- },
-
- //使用时间
- onInputTime(e) {
- this.setData({
- useTime: e.detail
- })
- },
-
- //查询部门资产列表信息
- findMyDeptAssetsList() {
- findAllByCategory(this.data.options.category).then(res => {
- if (res.code == '200') {
- let list = [];
- res.data.forEach(item => {
- let children = [];
- item.childrenAssetsTypeList.forEach(child => {
- children.push({
- id: child.id,
- text: child.name,
- units: child.unit,
- detailName: item.name + ' > ' + child.name
- });
- })
- list.push({
- id: item.id,
- text: item.name,
- children: children
- });
- });
- this.setData({
- dataList: list
- })
- }
- });
- },
-
- //输入申请数量
- onInputNumber(e) {
- var index = e.currentTarget.dataset.index
- let list = this.data.detailDataList;
- let value = e.detail.value;
- list[index].applyNumber = value;
- this.setData({
- detailDataList: list
- })
- },
-
- //选择资产单位
- onSelectUnit(e) {
- var index = e.currentTarget.dataset.index
- let list = this.data.detailDataList;
- list[index].useUnit = e.detail.text;
- list[index].useUnitIndex = e.detail.id;
- this.setData({
- detailDataList: list
- })
- },
-
- //输入规格型号
- onInputVersion(e) {
- var index = e.currentTarget.dataset.index
- let list = this.data.detailDataList;
- list[index].assetsVersion = e.detail.value;
- this.setData({
- detailDataList: list
- })
- },
-
- //输入使用说明
- onInputUseReason(e) {
- var index = e.currentTarget.dataset.index
- let list = this.data.detailDataList;
- list[index].useReason = e.detail.value;
- this.setData({
- detailDataList: list
- })
- },
-
- //关闭申请明细选择
- onShowPopup(e) {
- var index = e.currentTarget.dataset.index
- let list = this.data.detailDataList;
- list[index].showDetailsPopup = true;
- this.setData({
- detailDataList: list
- })
- },
-
- //关闭申请明细选择
- onClosePopup(e) {
- var index = e.currentTarget.dataset.index
- let list = this.data.detailDataList;
- list[index].showDetailsPopup = false;
- this.setData({
- detailDataList: list
- })
- },
-
- /**
- * 切换临建项目
- * @param {*} e
- */
- onProjectSelect: function (e) {
- let projectId = e.detail.id;
- let projectName = e.detail.text;
- app.globalData.useProjectId = projectId;
- app.globalData.useProjectName = projectName;
- this.setData({
- initData: {
- id: app.globalData.useProjectId,
- text: app.globalData.useProjectName
- }
- })
- },
-
- returnToPage: function () {
- /*关闭当前页面,跳转到其它页面。*/
- wx.redirectTo({
- url: '../myFlowDefinition/index',
- })
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
-
- }
-})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.json b/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.json
deleted file mode 100644
index d3af9c66..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "usingComponents": {
- "van-overlay": "@vant/weapp/overlay/index",
- "van-collapse": "@vant/weapp/collapse",
- "van-popup": "@vant/weapp/popup",
- "van-picker": "@vant/weapp/picker/index",
- "van-steps": "@vant/weapp/steps/index",
- "van-tree-select": "@vant/weapp/tree-select/index"
- },
- "navigationStyle":"custom"
-}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.wxml
deleted file mode 100644
index acbcec88..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.wxml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
-
-
-
- 使用单位
-
-
-
-
-
- 使用时间
-
-
-
-
-
- 申请原因
-
-
-
-
-
- 申请图片
- [其它格式文件请截图上传或电脑端上传]
-
-
-
-
-
-
-
-
-
-
- 申请明细 {{ format.indexNumFormat(index) }}
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 添加申请明细
-
-
-
-
- 取消
- 提交申请
-
-
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.wxss b/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.wxss
deleted file mode 100644
index 648a1cbc..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/initTask/index.wxss
+++ /dev/null
@@ -1,110 +0,0 @@
-.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;
- }
- .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;
- }
-
- .van-sidebar{
- background-color: #212737!important;
- }
- .van-sidebar-item{
- color: #EFEFEF!important;
- background-color: #212737!important;
- }
- .van-sidebar-item--selected{
- border-color:var(--sidebar-selected-border-color,#8369f5)!important;
- background-color: #252d41 !important;
- color: #83a5ef !important;
- }
- .van-tree-select__content{
- background-color:#252d41 !important;
- }
- .van-tree-select__item--active {
- color: var(--tree-select-item-active-color,#8369f5) !important;
- }
- .van-tree-select{
- height: 800rpx !important;
- }
- .van-popup.van-popup--bottom {
- margin-bottom: -55rpx !important;
-}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.js b/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.js
deleted file mode 100644
index e8fab2d0..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.js
+++ /dev/null
@@ -1,104 +0,0 @@
-import {
- myDefinitionList,
-} from '../../../api/flowable'
-const app = getApp()
-Page({
-
- /**
- * 页面的初始数据
- */
- data: {
- pamams: {
- pageNum: 1,
- pageSize: 10
- },
- listData: [],
- },
-
- addInfo(e) {
- let {
- id,
- category,
- deploymentId
- } = e.currentTarget.dataset.set
- wx.redirectTo({
- url: `../initTask/index?procDefId=${id}&category=${category}&deploymentId=${deploymentId}`,
- })
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- this.getListData();
- },
-
- /**
- * 查询项目举牌验收数据
- */
- getListData() {
- myDefinitionList(this.data.pamams).then(res => {
- if(res.data.records.length>0){
- this.setData({
- listData: res.data.records
- })
- }
- });
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
-
- },
-
- returnToPage: function () {
- /*关闭当前页面,跳转到其它页面。*/
- wx.redirectTo({
- url: '../../index/index',
- })
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
-
- }
-})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.json b/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.json
deleted file mode 100644
index c38e2687..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "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/pages/project_flowable/myFlowDefinition/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.wxml
deleted file mode 100644
index 0da2393c..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.wxml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
-
-
-
-
- {{index < 10 ?'0'+(index+1):(index+1)}}
- {{item.name}}{{' v '+item.version}}
-
-
-
-
- 主要用于申请设备费、维保费、安拆费、运输费、配件配、燃油费、检测费等。
-
-
-
-
- 主要用于申请主材、辅助材料、周转材料、安装材料等。
-
-
-
-
- 主要用于申请生活用品、办公用品、差旅费、招待费、广告费、信息化系统、其他费用等。
-
-
-
-
- 主要用于申请人工类大临、小临、零工等。
-
-
-
-
-
-
-
-
- 暂无数据
-
-
-
-
-
-
-
-
-
-
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.wxss b/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.wxss
deleted file mode 100644
index 0b1f79a0..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/myFlowDefinition/index.wxss
+++ /dev/null
@@ -1,6 +0,0 @@
-page {
- background: #191d28 url("http://fileimg.makalu.cc/CORE_40247DD946964A15AA0D4000E1031E19.png") no-repeat bottom/100%;
- }
-.inspect_list_title_text{
- padding-left: 50rpx;
-}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.js b/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.js
deleted file mode 100644
index 602ab0eb..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.js
+++ /dev/null
@@ -1,268 +0,0 @@
-import {
- queryTaskCount,
- myInstanceList
-} from '../../../api/flowable'
-const app = getApp()
-Page({
-
- /**
- * 页面的初始数据
- */
- data: {
- projectId: "",
- projectData: {},
- initData: {},
- show: false,
- list: [],
- listData: [],
- pageNum: 1,
- pageSize: 10,
- lastDataSize: 10,
- activeState: "await",
- allCount: 0,
- awaitCount: 0,
- finishedCount: 0,
- },
-
- /**
- * 标签切换
- */
- typeJump(e) {
- let index = e.currentTarget.dataset.index;
- let nav = "";
- if (index == 1) {
- nav = 'all';
- } else if (index == 2) {
- nav = 'await';
- } else if (index == 3) {
- nav = 'finished';
- }
-
- this.setData({
- activeState: nav,
- pageNum: 1,
- pageSize: 10,
- lastDataSize: 10,
- listData: [],
- list: []
- });
- this.getMyDataList();
- },
-
- infoTap(e) {
- let {
- deployId,
- procInsId,
- taskId,
- taskName,
- category,
- startDeptName,
- startUserName,
- procDefName,
- businessKey,
- businessKeyName,
- businessDeptId,
- businessKeyParName,
- startUserId,
- finishTime
- } = e.currentTarget.dataset.set
- if (taskName == "提交申请") {
- wx.redirectTo({
- url: `../editTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&category=${category}&projectName=${businessKeyName}&businessKey=${businessKey}&businessKeyParName=${businessKeyParName}&businessDeptId=${businessDeptId}&startUserId=${startUserId}`,
- })
- } else {
- wx.redirectTo({
- url: `../detailTask/index?deployId=${deployId}&procInsId=${procInsId}&nickName=${startUserName}&deptName=${startDeptName}&procDefName=${procDefName}&taskId=${taskId}&taskName=${taskName}&category=${category}&projectName=${businessKeyName}&businessKey=${businessKey}&businessKeyParName=${businessKeyParName}&businessDeptId=${businessDeptId}&startUserId=${startUserId}&finishTime=${finishTime}&ret=myProcessIns`,
- })
- }
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- this.setData({
- pageNum: 1,
- pageSize: 10,
- lastDataSize: 10,
- listData: [],
- list: [],
- initData: app.globalData.searchProject
- })
- //查询我的申请数据
- this.getMyDataList();
- },
-
- /**
- * 查询我的流程申请
- */
- getMyDataList() {
- //进入这里说明数据加载完毕
- if (this.data.lastDataSize < this.data.pageSize) {
- //app.toast("已经到底了,暂无可继续加载数据!")
- return;
- }
- var that = this;
- let param = {
- "activeName": this.data.activeState
- }
- this.queryTaskCount(param);
- param.pageNum = that.data.pageNum;
- param.pageSize = that.data.pageSize;
- myInstanceList(param).then(res => {
- //这里处理this.data.lastDataSize=this.data.pageSize
- if (that.data.list.length > 0 && res.rows.length > 0 && that.data.list[0].taskId == res.rows[0].taskId) {
- that.setData({
- lastDataSize: 0,
- })
- } else {
- let _list = [];
- res.rows.forEach(it => {
- it.duration = that.getDurationDate(it.duration);
- _list.push(it);
- });
- that.setData({
- pageNum: that.data.pageNum + 1,
- lastDataSize: res.rows.length,
- list: res.rows,
- listData: that.data.listData.concat(_list)
- })
- }
- });
- },
-
- /***
- * 查询申请发起数量统计
- */
- queryTaskCount(param) {
- queryTaskCount(param).then(res => {
- let awaits = 0;
- if (res.data.await) {
- awaits = res.data.await;
- }
- let finished = 0;
- if (res.data.finished) {
- finished = res.data.finished;
- }
- this.setData({
- allCount: awaits + finished,
- awaitCount: awaits,
- finishedCount: finished
- });
- });
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
-
- },
-
- returnToPage: function () {
- /*关闭当前页面,跳转到其它页面。*/
- wx.redirectTo({
- url: '../../index/index',
- })
- },
-
- /**
- * 分页加载数据
- */
- onScrollToLower() {
- console.log("滚动条到底了,开始加载新数据");
- this.getMyDataList();
- },
-
- //项目切换 返回值
- onProjectSelect(e) {
- let project = {
- id: e.detail.id,
- text: e.detail.text,
- projectId: e.detail.id,
- projectName: e.detail.text
- }
- app.globalData.searchProject = project;
- this.onLoad();
- },
-
- /**
- * 获取流程耗时
- */
- 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分钟";
- }
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
-
- }
-})
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.json b/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.json
deleted file mode 100644
index c38e2687..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "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/pages/project_flowable/myProcessIns/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.wxml
deleted file mode 100644
index a9b3d5df..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.wxml
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
- 全部({{allCount}})
- 进行中({{awaitCount}})
- 已完成({{finishedCount}})
-
-
-
-
-
-
- {{index < 10 ?'0'+(index+1):(index+1)}}
- {{item.createTime}}
- 进行中
- 已完成
- 已退回
- 已终止
- 已驳回
- 已撤回
-
-
-
-
- 临时项目:{{item.businessKeyName}}
- 申请类型:{{item.procDefName}}
- {{' 流程版本v'+item.procDefVersion}}
- 当前节点:{{item.taskName}}
- 流程结束
-
- 处理耗时:{{item.duration}}
- 办结时间:{{item.finishTime}}
-
-
-
-
-
-
- 暂无数据
-
-
-
-
-
-
-
-
-
-
diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.wxss b/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.wxss
deleted file mode 100644
index 1413b2a8..00000000
--- a/yanzhu-ui-app/miniprogram/pages/project_flowable/myProcessIns/index.wxss
+++ /dev/null
@@ -1,22 +0,0 @@
-/* pageage/project_checking_list/project_checking_list.wxss */
-.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;
- }
- .inspect_max_scroll_1 {
- height: 82vh;
-}
-.ml10{
- margin-left: 15rpx;
-}
\ No newline at end of file
diff --git a/yanzhu-ui-app/miniprogram/pages/project_magusers/info/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_magusers/info/index.wxml
index 6364b7b2..726f952c 100644
--- a/yanzhu-ui-app/miniprogram/pages/project_magusers/info/index.wxml
+++ b/yanzhu-ui-app/miniprogram/pages/project_magusers/info/index.wxml
@@ -8,7 +8,7 @@
-
+