加入流程 待办和已办页面

This commit is contained in:
java110 2021-08-25 08:41:30 +08:00
parent ed5cc6fc83
commit 799ab1c9fb
7 changed files with 465 additions and 6 deletions

View File

@ -0,0 +1,95 @@
<div>
<div class="row">
<div class="col-lg-12">
<div class="ibox ">
<div class="ibox-title">
<h5>查询条件</h5>
<div class="ibox-tools" style="top:10px;">
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<input type="text" placeholder="请输入申请人"
v-model="newOaWorkflowFinishInfo.conditions.createUserName" class=" form-control">
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<input type="text" placeholder="请输入开始时间"
v-model="newOaWorkflowFinishInfo.conditions.startTime"
class=" form-control finishStartTime">
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<input type="text" placeholder="请输入结束时间"
v-model="newOaWorkflowFinishInfo.conditions.endTime"
class=" form-control finishEndTime">
</div>
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-sm"
v-on:click="_queryOaWorkflowFinishMethod()">
<i class="fa fa-search"></i> 查询
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<h5>已办流程</h5>
<div class="ibox-tools" style="top:10px;">
</div>
</div>
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">申请人</th>
<th class="text-center" v-for="(item,index) in newOaWorkflowFinishInfo.formJson"
v-if="item.type != 'text' && item.type != 'button' && item.type != 'textarea'">
{{item.label}}</th>
<th class="text-center">状态</th>
<th class="text-center">创建时间</th>
<th class="text-center">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="(finish,index) in newOaWorkflowFinishInfo.finishs" :key="finish.id">
<td class="text-center">{{finish.create_user_name}}</td>
<td class="text-center" v-for="(item1,index1) in newOaWorkflowFinishInfo.formJson"
v-if="item1.type != 'text' && item1.type != 'button' && item1.type != 'textarea'">
{{finish[item1.key]}}</td>
<td class="text-center">{{_getNewOaWorkflowFinishState(finish)}}</td>
<td class="text-center">{{finish.create_time}}</td>
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openNewOaWorkflowFinishDetail(finish)">详情
</button>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->
<vc:create path="frame/paginationPlus" namespace="newOaWorkflowFinish"></vc:create>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,117 @@
/**
入驻小区
**/
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
newOaWorkflowFinishInfo: {
finishs: [],
total: 0,
records: 1,
formJson: [],
conditions: {
createUserName: '',
startTime: '',
endTime: '',
flowId: ''
}
}
},
_initMethod: function () {
},
_initEvent: function () {
vc.on('newOaWorkflowFinish', 'witch', function (_value) {
$that.newOaWorkflowFinishInfo.conditions.flowId = _value.flowId;
vc.initDateTime('finishStartTime', function (_value) {
$that.newOaWorkflowFinishInfo.conditions.startTime = _value;
});
vc.initDateTime('finishEndTime', function (_value) {
$that.newOaWorkflowFinishInfo.conditions.endTime = _value;
});
$that._listOaWorkFlowFinishForm();
vc.component._listOaWorkflowFinishs(DEFAULT_PAGE, DEFAULT_ROWS);
})
vc.on('newOaWorkflowFinish','paginationPlus', 'page_event', function (_currentPage) {
vc.component._listOaWorkflowFinishs(_currentPage, DEFAULT_ROWS);
});
},
methods: {
_listOaWorkFlowFinishForm: function () {
var param = {
params: {
page: 1,
row: 1,
flowId: $that.newOaWorkflowFinishInfo.conditions.flowId
}
};
//发送get请求
vc.http.apiGet('/oaWorkflow/queryOaWorkflowForm',
param,
function (json, res) {
let _newOaWorkflowFormInfo = JSON.parse(json);
$that.newOaWorkflowFinishInfo.formJson = JSON.parse(_newOaWorkflowFormInfo.data[0].formJson).components;
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_listOaWorkflowFinishs: function (_page, _rows) {
vc.component.newOaWorkflowFinishInfo.conditions.page = _page;
vc.component.newOaWorkflowFinishInfo.conditions.row = _rows;
var param = {
params: vc.component.newOaWorkflowFinishInfo.conditions
};
//发送get请求
vc.http.apiGet('/oaWorkflow/queryOaWorkflowFormData',
param,
function (json, res) {
var _newOaWorkflowFinishInfo = JSON.parse(json);
vc.component.newOaWorkflowFinishInfo.total = _newOaWorkflowFinishInfo.total;
vc.component.newOaWorkflowFinishInfo.records = _newOaWorkflowFinishInfo.records;
vc.component.newOaWorkflowFinishInfo.finishs = _newOaWorkflowFinishInfo.data;
vc.emit('newOaWorkflowFinish','paginationPlus', 'init', {
total: vc.component.newOaWorkflowFinishInfo.records,
dataCount: vc.component.newOaWorkflowFinishInfo.total,
currentPage: _page
});
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_openNewOaWorkflowFinishDetail: function (_notice) {
vc.jumpToPage("/admin.html#/pages/common/noticeDetail?noticeId=" + _notice.noticeId);
},
_queryOaWorkflowFinishMethod: function () {
vc.component._listOaWorkflowFinishs(DEFAULT_PAGE, DEFAULT_ROWS);
},
_getNewOaWorkflowFinishState: function (_finish) {
/**
* 1001 申请 1002 待审核 1003 退回 1004 委托 1005 办结
*/
if (!_finish.hasOwnProperty('state')) {
return "未知";
}
switch (_finish.state) {
case '1001':
return "申请";
case '1002':
return "待审核";
case '1003':
return "退回";
case '1004':
return "委托";
case '1005':
return "办结";
}
return "未知"
}
}
});
})(window.vc);

View File

@ -67,7 +67,7 @@
<td class="text-center" v-for="(item1,index1) in newOaWorkflowPoolInfo.formJson"
v-if="item1.type != 'text' && item1.type != 'button' && item1.type != 'textarea'">
{{pool[item1.key]}}</td>
<td class="text-center">{{pool.stateName}}</td>
<td class="text-center">{{_getNewOaWorkflowPoolState(pool)}}</td>
<td class="text-center">{{pool.create_time}}</td>
<td class="text-center">
<div class="btn-group">
@ -87,7 +87,7 @@
</tfoot>
</table>
<!-- 分页 -->
<vc:create path="frame/pagination"></vc:create>
<vc:create path="frame/paginationPlus" namespace="newOaWorkflowPool"></vc:create>
</div>
</div>
</div>

View File

@ -34,7 +34,7 @@
$that._listOaWorkFlowPoolForm();
vc.component._listOaWorkflowPools(DEFAULT_PAGE, DEFAULT_ROWS);
})
vc.on('pagination', 'page_event', function (_currentPage) {
vc.on('newOaWorkflowPool','paginationPlus', 'page_event', function (_currentPage) {
vc.component._listOaWorkflowPools(_currentPage, DEFAULT_ROWS);
});
},
@ -73,7 +73,7 @@
vc.component.newOaWorkflowPoolInfo.total = _newOaWorkflowPoolInfo.total;
vc.component.newOaWorkflowPoolInfo.records = _newOaWorkflowPoolInfo.records;
vc.component.newOaWorkflowPoolInfo.pools = _newOaWorkflowPoolInfo.data;
vc.emit('pagination', 'init', {
vc.emit('newOaWorkflowPool','paginationPlus', 'init', {
total: vc.component.newOaWorkflowPoolInfo.records,
dataCount: vc.component.newOaWorkflowPoolInfo.total,
currentPage: _page
@ -88,6 +88,29 @@
},
_queryOaWorkflowPoolMethod: function () {
vc.component._listOaWorkflowPools(DEFAULT_PAGE, DEFAULT_ROWS);
},
_getNewOaWorkflowPoolState: function (_pool) {
/**
* 1001 申请 1002 待审核 1003 退回 1004 委托 1005 办结
*/
if (!_pool.hasOwnProperty('state')) {
return "未知";
}
switch (_pool.state) {
case '1001':
return "申请";
case '1002':
return "待审核";
case '1003':
return "退回";
case '1004':
return "委托";
case '1005':
return "办结";
}
return "未知"
}
}
});

View File

@ -0,0 +1,101 @@
<div>
<div class="row">
<div class="col-lg-12">
<div class="ibox ">
<div class="ibox-title">
<h5>查询条件</h5>
<div class="ibox-tools" style="top:10px;">
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<input type="text" placeholder="请输入申请人"
v-model="newOaWorkflowUndoInfo.conditions.createUserName" class=" form-control">
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<input type="text" placeholder="请输入开始时间"
v-model="newOaWorkflowUndoInfo.conditions.startTime"
class=" form-control undoStartTime">
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<input type="text" placeholder="请输入结束时间"
v-model="newOaWorkflowUndoInfo.conditions.endTime"
class=" form-control undoEndTime">
</div>
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-sm"
v-on:click="_queryOaWorkflowUndoMethod()">
<i class="fa fa-search"></i> 查询
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<h5>待办流程</h5>
<div class="ibox-tools" style="top:10px;">
</div>
</div>
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">申请人</th>
<th class="text-center" v-for="(item,index) in newOaWorkflowUndoInfo.formJson"
v-if="item.type != 'text' && item.type != 'button' && item.type != 'textarea'">
{{item.label}}</th>
<th class="text-center">状态</th>
<th class="text-center">创建时间</th>
<th class="text-center">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="(undo,index) in newOaWorkflowUndoInfo.undos" :key="undo.id">
<td class="text-center">{{undo.create_user_name}}</td>
<td class="text-center" v-for="(item1,index1) in newOaWorkflowUndoInfo.formJson"
v-if="item1.type != 'text' && item1.type != 'button' && item1.type != 'textarea'">
{{undo[item1.key]}}</td>
<td class="text-center">{{_getNewOaWorkflowUndoState(undo)}}</td>
<td class="text-center">{{undo.create_time}}</td>
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openNewOaWorkflowUndoDetail(undo)">审核
</button>
<button class="btn-white btn btn-xs"
v-on:click="_openNewOaWorkflowUndoDetail(undo)">委托
</button>
<button class="btn-white btn btn-xs"
v-on:click="_openNewOaWorkflowUndoDetail(undo)">详情
</button>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->
<vc:create path="frame/paginationPlus" namespace="newOaWorkflowUndo"></vc:create>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,117 @@
/**
入驻小区
**/
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
newOaWorkflowUndoInfo: {
undos: [],
total: 0,
records: 1,
formJson: [],
conditions: {
createUserName: '',
startTime: '',
endTime: '',
flowId: ''
}
}
},
_initMethod: function () {
},
_initEvent: function () {
vc.on('newOaWorkflowUndo', 'witch', function (_value) {
$that.newOaWorkflowUndoInfo.conditions.flowId = _value.flowId;
vc.initDateTime('undoStartTime', function (_value) {
$that.newOaWorkflowUndoInfo.conditions.startTime = _value;
});
vc.initDateTime('undoEndTime', function (_value) {
$that.newOaWorkflowUndoInfo.conditions.endTime = _value;
});
$that._listOaWorkFlowUndoForm();
vc.component._listOaWorkflowUndos(DEFAULT_PAGE, DEFAULT_ROWS);
})
vc.on('newOaWorkflowUndo','paginationPlus', 'page_event', function (_currentPage) {
vc.component._listOaWorkflowUndos(_currentPage, DEFAULT_ROWS);
});
},
methods: {
_listOaWorkFlowUndoForm: function () {
var param = {
params: {
page: 1,
row: 1,
flowId: $that.newOaWorkflowUndoInfo.conditions.flowId
}
};
//发送get请求
vc.http.apiGet('/oaWorkflow/queryOaWorkflowForm',
param,
function (json, res) {
let _newOaWorkflowFormInfo = JSON.parse(json);
$that.newOaWorkflowUndoInfo.formJson = JSON.parse(_newOaWorkflowFormInfo.data[0].formJson).components;
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_listOaWorkflowUndos: function (_page, _rows) {
vc.component.newOaWorkflowUndoInfo.conditions.page = _page;
vc.component.newOaWorkflowUndoInfo.conditions.row = _rows;
var param = {
params: vc.component.newOaWorkflowUndoInfo.conditions
};
//发送get请求
vc.http.apiGet('/oaWorkflow/queryOaWorkflowFormData',
param,
function (json, res) {
var _newOaWorkflowUndoInfo = JSON.parse(json);
vc.component.newOaWorkflowUndoInfo.total = _newOaWorkflowUndoInfo.total;
vc.component.newOaWorkflowUndoInfo.records = _newOaWorkflowUndoInfo.records;
vc.component.newOaWorkflowUndoInfo.undos = _newOaWorkflowUndoInfo.data;
vc.emit('newOaWorkflowUndo','paginationPlus', 'init', {
total: vc.component.newOaWorkflowUndoInfo.records,
dataCount: vc.component.newOaWorkflowUndoInfo.total,
currentPage: _page
});
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_openNewOaWorkflowUndoDetail: function (_notice) {
vc.jumpToPage("/admin.html#/pages/common/noticeDetail?noticeId=" + _notice.noticeId);
},
_queryOaWorkflowUndoMethod: function () {
vc.component._listOaWorkflowUndos(DEFAULT_PAGE, DEFAULT_ROWS);
},
_getNewOaWorkflowUndoState: function (_undo) {
/**
* 1001 申请 1002 待审核 1003 退回 1004 委托 1005 办结
*/
if (!_undo.hasOwnProperty('state')) {
return "未知";
}
switch (_undo.state) {
case '1001':
return "申请";
case '1002':
return "待审核";
case '1003':
return "退回";
case '1004':
return "委托";
case '1005':
return "办结";
}
return "未知"
}
}
});
})(window.vc);

View File

@ -10,10 +10,10 @@
:class="{'vc-node-selected':newOaWorkflowInfo.switchValue=='newOaWorkflowForm'}" @click="swatch('newOaWorkflowForm')">
起草流程</li>
<li class="list-group-item node-orgTree "
:class="{'vc-node-selected':newOaWorkflowInfo.switchValue=='undo'}" @click="swatch('undo')">流程待办
:class="{'vc-node-selected':newOaWorkflowInfo.switchValue=='newOaWorkflowUndo'}" @click="swatch('newOaWorkflowUndo')">流程待办
</li>
<li class="list-group-item node-orgTree "
:class="{'vc-node-selected':newOaWorkflowInfo.switchValue=='finish'}" @click="swatch('finish')">
:class="{'vc-node-selected':newOaWorkflowInfo.switchValue=='newOaWorkflowFinish'}" @click="swatch('newOaWorkflowFinish')">
流程已办</li>
</ul>
</div>
@ -25,6 +25,12 @@
<div v-if="newOaWorkflowInfo.switchValue=='newOaWorkflowForm'">
<vc:create path="property/newOaWorkflowForm"></vc:create>
</div>
<div v-show="newOaWorkflowInfo.switchValue=='newOaWorkflowUndo'">
<vc:create path="property/newOaWorkflowUndo"></vc:create>
</div>
<div v-show="newOaWorkflowInfo.switchValue=='newOaWorkflowFinish'">
<vc:create path="property/newOaWorkflowFinish"></vc:create>
</div>
</div>
</div>
</div>