提交ok
parent
871964321d
commit
6443a6e929
|
@ -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",
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 246 KiB |
|
@ -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() {
|
||||
|
||||
}
|
||||
})
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-overlay": "@vant/weapp/overlay/index" ,
|
||||
"van-popup": "@vant/weapp/popup/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">待我办理管理</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<view class="inspect_max">
|
||||
<view class="inspect_list">
|
||||
<view class="inspect_for" wx:for="{{listData}}" wx:key="index" data-set="{{item}}" bindtap="infoTap">
|
||||
<view class="inspect_for_bgd">
|
||||
<view class="inspect_list_title">
|
||||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
<view class="inspect_list_title_number">{{index < 10 ?'0'+(index+1):(index+1)}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text"><text class="color_orange">{{item.taskName}}</text>
|
||||
<text wx:if="{{item.taskName!='提交申请'}}" class="timeline_for_state_1 color_green" style="font-weight: 800;">待审批</text>
|
||||
<text wx:if="{{item.taskName=='提交申请'}}" class="timeline_for_state_2">审批驳回</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info">
|
||||
<view class="inspect_list_info_data_prop color_purple">项目名称:{{item.businessKeyParName}}</view>
|
||||
<view class="inspect_list_info_data_prop color_blue">临建项目:{{item.businessKeyName}}</view>
|
||||
<view class="inspect_list_info_data_prop color_purple">申请类型:{{item.procDefName}}</view>
|
||||
<view class="inspect_list_info_data_prop color_purple">接收时间:{{item.createTime}}</view>
|
||||
<view class="inspect_list_info_data_prop">申请用户:{{item.startUserName}}</view>
|
||||
<view class="inspect_list_info_data_prop">申请单位:{{item.startDeptName}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="../../../images/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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;
|
||||
}
|
|
@ -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() {
|
||||
|
||||
}
|
||||
})
|
|
@ -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"
|
||||
}
|
|
@ -1,164 +0,0 @@
|
|||
<wxs module="format" src="/utils/format.wxs"></wxs>
|
||||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage">
|
||||
<image src="/images/left.png"></image>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">修改审批申请</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ stepList }}" active="{{ active }}" rejectNode="{{ active<100 && rejectNode ? active+1:0 }}" />
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
|
||||
<view class="inspect_overview inspect_overview_max">
|
||||
<view class="gk_open">
|
||||
<van-collapse value="{{activeName}}" bind:change="onChange">
|
||||
<van-collapse-item title="审批日志" name="logs">
|
||||
<view class="inspect_list">
|
||||
<view class="inspect_for" wx:for="{{flowRecordList}}" wx:key="index">
|
||||
<view class="inspect_for_bgd">
|
||||
<view class="inspect_list_title">
|
||||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
<view class="inspect_list_title_number">{{(flowRecordList.length-index) < 10 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text">{{item.taskName}}
|
||||
<text wx:if="{{item.commentResult=='通过'}}" class="timeline_for_state_1 color_green">{{item.commentResult}}</text>
|
||||
<text wx:if="{{item.commentResult=='委派'}}" class="timeline_for_state_1 color_blue">{{item.commentResult}}</text>
|
||||
<text wx:if="{{item.commentResult=='转办'}}" class="timeline_for_state_1 color_blue">{{item.commentResult}}</text>
|
||||
<text wx:if="{{item.commentResult=='驳回'}}" class="timeline_for_state_2 color_purple">{{item.commentResult}}</text>
|
||||
<text wx:if="{{item.commentResult=='退回'}}" class="timeline_for_state_2 color_purple">{{item.commentResult}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info gk_open_con">
|
||||
<view wx:if="{{item.assigneeName}}">
|
||||
<image src="/images/lw_3.png"></image>办理用户:<text>{{item.assigneeName}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.assigneeName}}">
|
||||
<image src="/images/s_1.png"></image>办理单位:<text class="color_blue">{{item.deptName}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.candidate}}">
|
||||
<image src="/images/s_2.png"></image>候选办理:<text>{{item.candidate}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.deleteReason}}">
|
||||
<image src="/images/s_18.png"></image>驳回节点:<text>{{item.deleteReason}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<image src="/images/s_6.png"></image>接收时间:<text>{{item.startTime}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.endTime}}">
|
||||
<image src="/images/lw_8.png"></image>处理时间:<text>{{item.endTime}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.duration}}">
|
||||
<image src="/images/img_11.png"></image>处理耗时:<text>{{item.duration}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.message}}">
|
||||
<image src="/images/s_7.png"></image>处理意见:<text>{{item.message}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info">
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">使用单位</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-select columns="{{deptList}}" placeholder="请选择使用单位" selectValue="{{infoData.deptId}}" bindchange="onSelectDept"></voucher-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">使用时间</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-date counts="5" placeholder="请选择使用时间" maxDate="{{maxDate}}" bindchange="onInputTime" time="{{format.dateStr(infoData.createTime)}}"></voucher-date>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">申请原因</view>
|
||||
<view class="inspect_info_content">
|
||||
<textarea class="add_textarea" placeholder="请填写申请原因(500字内)" placeholder-style="color:#6777aa;" maxlength="500" bindinput="applyReasonblur" model:value="{{infoData.applyReason}}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" style="width: 100%;">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">申请图片
|
||||
<text style="font-size: small;">[其它格式文件请截图上传、电脑端上传]</text>
|
||||
</view>
|
||||
<view class="inspect_info_content" style="margin-left: 10px;">
|
||||
<file-uploader bindimages="imgUpload" limit="{{limit}}" fileUrlArray="{{minImageList}}"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" style="width: 100%;" wx:if="{{fileNames.length>0}}">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">申请文件
|
||||
<text style="font-size: small;">[仅可上传pdf、doc、docx、xls、xlsx]</text>
|
||||
</view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader-all bindfiles="fileUpload" limit="{{limit}}" fileUrlArray="{{fileNames}}"></file-uploader-all>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view>
|
||||
<view class="inspect_info" wx:for="{{detailDataList}}" wx:key="index">
|
||||
<view class="module_title module_title_flex">
|
||||
<view class="text_active">申请明细 {{ format.indexNumFormat(index) }}</view>
|
||||
<view class="module_see_info_delete" wx:if="{{index != 0}}" bindtap="delApplyDetail" data-index="{{index}}">
|
||||
<van-icon name="delete" /> 删除
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<input placeholder="请选择申请明细" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" value="{{item.showDetailsName}}" data-index="{{index}}" bindtap="onShowPopup" disabled="disabled" />
|
||||
<van-popup show="{{ item.showDetailsPopup }}" data-index="{{index}}" bind:close="onClosePopup" position="bottom" round="5">
|
||||
<van-tree-select items="{{ dataList }}" main-active-index="{{ item.mainActiveIndex }}" active-id="{{ item.activeId }}" data-index="{{index}}" bind:click-nav="onClickNav" bind:click-item="onClickItem">
|
||||
</van-tree-select>
|
||||
</van-popup>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<van-row>
|
||||
<van-col span="12">
|
||||
<input type="number" placeholder="填写申请数量" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" value="{{item.applyNumber}}" data-index="{{index}}" bindinput="onInputNumber" />
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<voucher-select columns="{{item.assetsUnits}}" placeholder="选择单位名称" selectValue="{{item.useUnitIndex}}" data-index="{{index}}" bindchange="onSelectUnit"></voucher-select>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{category=='wzl'}}">
|
||||
<input placeholder="请填写规格型号" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" value="{{item.assetsVersion}}" bindinput="onInputVersion" data-index="{{index}}" maxlength="32" />
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<textarea placeholder="请填写使用说明(500字内)" placeholder-style="color:#6777aa;" class="add_textarea" value="{{item.useReason}}" bindinput="onInputUseReason" data-index="{{index}}" maxlength="500" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="inspect_new_issues_max">
|
||||
<view class="inspect_new_issues" bindtap="newApplyDetail">
|
||||
<van-icon name="add-o" style="position: relative;top:5rpx;font-size: 30rpx;" /> 添加申请明细
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{stopBtnShow}}">
|
||||
<view class="inspect_info">
|
||||
<view class="inspect_overview_list">
|
||||
<view class="inspect_overview_title" style="padding: 20rpx 0 10rpx;">终止原因</view>
|
||||
<view class="inspect_overview_content">
|
||||
<textarea class="add_textarea" placeholder="请填写终止原因(500字内)" placeholder-style="color:#6777aa;" maxlength="500" bindinput="commentblur" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="problem_submit_to">
|
||||
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
|
||||
<view wx:if="{{stopShow}}" class="problem_submit_to_btn problem_submit_to_delete" bindtap="onStopApply">终止申请</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSaveApply">提交申请</view>
|
||||
</view>
|
||||
</view>
|
|
@ -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;
|
||||
}
|
|
@ -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() {
|
||||
|
||||
}
|
||||
})
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-overlay": "@vant/weapp/overlay/index" ,
|
||||
"van-popup": "@vant/weapp/popup/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage">
|
||||
<image src="/images/left.png"></image>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">办理完成管理</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
||||
<project-select wx:if="{{false}}" init="{{initData}}" bindchange="onProjectSelect"></project-select>
|
||||
<view class="inspect_max_scroll_1">
|
||||
<view class="inspect_for_scroll" wx:for="{{listData}}" wx:key="index" data-set="{{item}}" bindtap="infoTap">
|
||||
<view class="inspect_for_bgd">
|
||||
<view class="inspect_list_title">
|
||||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
<view class="inspect_list_title_number">{{index < 10 ?'0'+(index+1):(index+1)}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text"><text>{{item.endTime}}</text>
|
||||
<text wx:if="{{item.taskName=='提交申请'}}" class="timeline_for_state_1 color_green" style="font-weight: 800;">已提交</text>
|
||||
<text wx:if="{{item.taskName!='提交申请' && item.taskComType=='1'}}" class="timeline_for_state_1">已完成</text>
|
||||
<text wx:if="{{item.taskName!='提交申请' && item.taskComType=='2'}}" class="timeline_for_state_2">已退回</text>
|
||||
<text wx:if="{{item.taskName!='提交申请' && item.taskComType=='6'}}" class="timeline_for_state_2">已终止</text>
|
||||
<text wx:if="{{item.taskName!='提交申请' && item.taskComType=='3'}}" class="timeline_for_state_2">已驳回</text>
|
||||
<text wx:if="{{item.taskName!='提交申请' && item.taskComType=='7'}}" class="timeline_for_state_2">已撤回</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info">
|
||||
<view class="inspect_list_info_data_prop color_orange">临时项目:{{item.businessKeyName}}</view>
|
||||
<view class="inspect_list_info_data_prop color_blue">审批事项:<text>{{item.procDefName}}</text>
|
||||
<!-- <text class="code_label_2 code_label_green">{{' 流程版本v'+item.procDefVersion}}</text> -->
|
||||
</view>
|
||||
<view class="inspect_list_info_data_prop">当前节点:<text wx:if="{{item.finishTime == null}}">{{item.taskName}}</text>
|
||||
<text wx:if="{{item.finishTime != null}}">流程结束</text>
|
||||
</view>
|
||||
<view class="inspect_list_info_data_prop">接收时间:{{item.createTime}}</view>
|
||||
<view class="inspect_list_info_data_prop">申请用户:{{item.startUserName}}</view>
|
||||
<view class="inspect_list_info_data_prop">申请单位:{{item.startDeptName}}</view>
|
||||
<!-- <view class="inspect_list_info_data_prop">处理耗时:{{item.duration}}</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="../../../images/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
|
@ -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;
|
||||
}
|
|
@ -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() {
|
||||
|
||||
}
|
||||
})
|
|
@ -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"
|
||||
}
|
|
@ -1,92 +0,0 @@
|
|||
<wxs module="format" src="/utils/format.wxs"></wxs>
|
||||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage">
|
||||
<image src="/images/left.png"></image>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="16">
|
||||
<view class="header_name">发起审批申请</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ stepList }}" active="{{ active }}" />
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
|
||||
<view class="inspect_info">
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">使用单位</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-select columns="{{deptList}}" placeholder="请选择使用单位" selectValue="{{useDeptId}}" bindchange="onSelectDept"></voucher-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">使用时间</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-date counts="5" placeholder="请选择使用时间" maxDate="{{maxDate}}" bindchange="onInputTime"></voucher-date>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">申请原因</view>
|
||||
<view class="inspect_info_content">
|
||||
<textarea class="add_textarea" placeholder="请填写申请原因(500字内)" placeholder-style="color:#6777aa;" maxlength="500" bindinput="applyReasonblur" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" style="width: 100%;">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">申请图片
|
||||
<text style="font-size: small; color: #ff711e;">[其它格式文件请截图上传或电脑端上传]</text>
|
||||
</view>
|
||||
<view class="inspect_info_content" style="margin-left: 10px;">
|
||||
<file-uploader bindimages="fileUpload" limit="{{limit}}"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view>
|
||||
<view class="inspect_info" wx:for="{{detailDataList}}" wx:key="index">
|
||||
<view class="module_title module_title_flex">
|
||||
<view class="text_active">申请明细 {{ format.indexNumFormat(index) }}</view>
|
||||
<view class="module_see_info_delete" wx:if="{{index != 0}}" bindtap="delApplyDetail" data-index="{{index}}">
|
||||
<van-icon name="delete" /> 删除
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<input placeholder="请选择申请明细" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" value="{{item.showDetailsName}}" data-index="{{index}}" bindtap="onShowPopup" disabled="disabled"/>
|
||||
<van-popup show="{{ item.showDetailsPopup }}" data-index="{{index}}" bind:close="onClosePopup" position="bottom" round="5">
|
||||
<van-tree-select items="{{ dataList }}" main-active-index="{{ item.mainActiveIndex }}" active-id="{{ item.activeId }}" data-index="{{index}}" bind:click-nav="onClickNav" bind:click-item="onClickItem">
|
||||
</van-tree-select>
|
||||
</van-popup>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<van-row>
|
||||
<van-col span="12">
|
||||
<input type="number" placeholder="填写申请数量" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" data-index="{{index}}" bindinput="onInputNumber" />
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<voucher-select columns="{{item.assetsUnits}}" placeholder="选择单位名称" selectValue="{{item.useUnitIndex}}" data-index="{{index}}" bindchange="onSelectUnit"></voucher-select>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{options.category=='wzl'}}">
|
||||
<input placeholder="请填写规格型号" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" value="{{item.assetsVersion}}" bindinput="onInputVersion" data-index="{{index}}" maxlength="32" />
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<textarea placeholder="请填写使用说明(500字内)" placeholder-style="color:#6777aa;" class="add_textarea" value="{{item.useReason}}" bindinput="onInputUseReason" data-index="{{index}}" maxlength="500" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="inspect_new_issues_max">
|
||||
<view class="inspect_new_issues" bindtap="newApplyDetail">
|
||||
<van-icon name="add-o" style="position: relative;top:5rpx;font-size: 30rpx;" /> 添加申请明细
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="problem_submit_to">
|
||||
<view class="problem_submit_to_btn" bindtap="returnToPage">取消</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSave">提交申请</view>
|
||||
</view>
|
||||
</view>
|
|
@ -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;
|
||||
}
|
|
@ -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() {
|
||||
|
||||
}
|
||||
})
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-overlay": "@vant/weapp/overlay/index" ,
|
||||
"van-popup": "@vant/weapp/popup/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="16">
|
||||
<view class="header_name">发起审批申请</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<view class="inspect_max">
|
||||
<view class="inspect_list">
|
||||
<view class="inspect_for" wx:for="{{listData}}" wx:key="index" data-set="{{item}}" bindtap="addInfo">
|
||||
<view class="inspect_for_bgd">
|
||||
<view class="inspect_list_title">
|
||||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
<view class="inspect_list_title_number">{{index < 10 ?'0'+(index+1):(index+1)}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text color_blue">{{item.name}}<text class="timeline_for_state_1">{{' v '+item.version}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info" wx:if="{{item.category=='sbl'}}">
|
||||
<view class="inspect_list_info_details">
|
||||
<view class="color_purple">主要用于申请设备费、维保费、安拆费、运输费、配件配、燃油费、检测费等。</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info" wx:if="{{item.category=='wzl'}}">
|
||||
<view class="inspect_list_info_details">
|
||||
<view class="color_purple">主要用于申请主材、辅助材料、周转材料、安装材料等。</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info" wx:if="{{item.category=='gll'}}">
|
||||
<view class="inspect_list_info_details">
|
||||
<view class="color_purple">主要用于申请生活用品、办公用品、差旅费、招待费、广告费、信息化系统、其他费用等。</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info" wx:if="{{item.category=='rgl'}}">
|
||||
<view class="inspect_list_info_details">
|
||||
<view class="color_purple">主要用于申请人工类大临、小临、零工等。</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="../../../images/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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;
|
||||
}
|
|
@ -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() {
|
||||
|
||||
}
|
||||
})
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-overlay": "@vant/weapp/overlay/index" ,
|
||||
"van-popup": "@vant/weapp/popup/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
||||
</van-col>
|
||||
<van-col span="16">
|
||||
<view class="header_name">我发起的审批</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
||||
<project-select wx:if="{{false}}" init="{{initData}}" bindchange="onProjectSelect"></project-select>
|
||||
<view class="modify_video_nav" style="margin-top: 5rpx;">
|
||||
<view class="{{activeState=='all'?'active':''}}" bindtap="typeJump" data-index="1"><text>全部({{allCount}})</text></view>
|
||||
<view class="{{activeState=='await'?'active':''}}" bindtap="typeJump" data-index="2"><text>进行中({{awaitCount}})</text></view>
|
||||
<view class="{{activeState=='finished'?'active':''}}" bindtap="typeJump" data-index="3"><text>已完成({{finishedCount}})</text></view>
|
||||
</view>
|
||||
<view class="inspect_max_scroll">
|
||||
<view class="inspect_for_scroll" wx:for="{{listData}}" wx:key="index" data-index="{{index}}" data-set="{{item}}" bindtap="infoTap">
|
||||
<view class="inspect_for_bgd">
|
||||
<view class="inspect_list_title">
|
||||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
<view class="inspect_list_title_number">{{index < 10 ?'0'+(index+1):(index+1)}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text"><text>{{item.createTime}}</text>
|
||||
<text wx:if="{{item.finishTime==null}}" class="timeline_for_state_1 color_green" style="font-weight: 800;">进行中</text>
|
||||
<text wx:if="{{item.finishTime != null && item.taskComType=='1'}}" class="timeline_for_state_1">已完成</text>
|
||||
<text wx:if="{{item.finishTime != null && item.taskComType=='2'}}" class="timeline_for_state_2">已退回</text>
|
||||
<text wx:if="{{item.finishTime != null && item.taskComType=='6'}}" class="timeline_for_state_2">已终止</text>
|
||||
<text wx:if="{{item.finishTime != null && item.taskComType=='3'}}" class="timeline_for_state_2">已驳回</text>
|
||||
<text wx:if="{{item.finishTime != null && item.taskComType=='7'}}" class="timeline_for_state_2">已撤回</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info">
|
||||
<view class="inspect_list_info_data_prop color_orange">临时项目:{{item.businessKeyName}}</view>
|
||||
<view class="inspect_list_info_data_prop color_blue">申请类型:<text>{{item.procDefName}}</text>
|
||||
<text class="code_label_2 code_label_green ml10">{{' 流程版本v'+item.procDefVersion}}</text></view>
|
||||
<view class="inspect_list_info_data_prop">当前节点:<text wx:if="{{item.finishTime == null}}">{{item.taskName}}</text>
|
||||
<text wx:if="{{item.finishTime != null}}">流程结束</text>
|
||||
</view>
|
||||
<view class="inspect_list_info_data_prop">处理耗时:{{item.duration}}</view>
|
||||
<view class="inspect_list_info_data_prop" wx:if="{{item.finishTime!=null}}">办结时间:{{item.finishTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="../../../images/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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;
|
||||
}
|
|
@ -8,7 +8,7 @@
|
|||
</view>
|
||||
</van-col>
|
||||
<van-col span="16">
|
||||
<view class="header_name">班组人员详情</view>
|
||||
<view class="header_name">总包人员详情</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
|
|
Loading…
Reference in New Issue