加入领用待办

This commit is contained in:
java110 2020-07-16 12:01:15 +08:00
parent 15677b2383
commit 165bbd152a
8 changed files with 272 additions and 43 deletions

8
app.js
View File

@ -34,10 +34,10 @@ let opts = {
//app.use('/callComponent',proxy('https://app.demo.winqi.cn/',opts));
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012/',opts));
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts));
//app.use('/callComponent',proxy('http://192.168.1.16:8012',opts));
//app.use('/app',proxy('http://192.168.1.16:8012',opts));
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
//app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts));
app.use('/callComponent',proxy('http://192.168.1.16:8012',opts));
app.use('/app',proxy('http://192.168.1.16:8012',opts));
//app.listen(3000);
app.use(express.json());

View File

@ -3,7 +3,8 @@
vc.extends({
propTypes: {
callBackListener: vc.propTypes.string, //父组件名称
callBackFunction: vc.propTypes.string //父组件监听方法
callBackFunction: vc.propTypes.string, //父组件监听方法
flowType:vc.propTypes.string='30003'
},
data: {
purchaseApproversInfo: {
@ -47,7 +48,7 @@
var param = {
params: {
communityId: vc.getCurrentCommunity().communityId,
flowType: '30003'
flowType: $props.flowType
}
};
//发送get请求

View File

@ -0,0 +1,76 @@
<div class=" animated fadeInRight ecommerce">
<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">订单类型</th>
<th class="text-center">订单状态</th>
<th class="text-center">创建时间</th>
<th class="text-right">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="auditOrder in auditOrdersInfo.auditOrders">
<td class="text-center">{{auditOrder.applyOrderId}}</td>
<td class="text-center">{{auditOrder.resOrderTypeName}}</td>
<td class="text-center">{{auditOrder.stateName}}</td>
<td class="text-center">{{auditOrder.createTime}}</td>
<td class="text-right">
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openDetailPurchaseApplyModel(auditOrder)">查看
</button>
</div>
<div v-if="auditOrdersInfo.procure == false">
<div class="btn-group"
v-if="auditOrdersInfo.currentUserId != auditOrder.userId">
<button class="btn-white btn btn-xs"
v-on:click="_openAuditOrderModel(auditOrder)">审批
</button>
</div>
<div class="btn-group" v-else>
<button class="btn-white btn btn-xs"
v-on:click="_finishAuditOrder(auditOrder)">结束
</button>
</div>
</div>
<div class="btn-group" v-else>
<button class="btn-white btn btn-xs"
v-on:click="_distributionOrder(auditOrder)">物品发放
</button>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->
<vc:create path="frame/pagination"></vc:create>
</div>
</div>
</div>
</div>
<vc:create path="common/audit" callBackListener="myAuditOrders" callBackFunction="notifyAudit"></vc:create>
</div>

View File

@ -0,0 +1,155 @@
/**
审核订单
**/
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
auditOrdersInfo: {
auditOrders: [],
total: 0,
records: 1,
moreCondition: false,
userName: '',
currentUserId:vc.getData('/nav/getUserInfo').userId,
conditions: {
AuditOrdersId: '',
userName: '',
auditLink: '',
},
orderInfo:'',
procure:false
}
},
_initMethod: function () {
vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
$that._loadStepStaff();
},
_initEvent: function () {
vc.on('myAuditOrders', 'listAuditOrders', function (_param) {
vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('pagination', 'page_event', function (_currentPage) {
vc.component._listAuditOrders(_currentPage, DEFAULT_ROWS);
});
vc.on('myAuditOrders','notifyAudit',function(_auditInfo){
vc.component._auditOrderInfo(_auditInfo);
});
},
methods: {
_listAuditOrders: function (_page, _rows) {
vc.component.auditOrdersInfo.conditions.page = _page;
vc.component.auditOrdersInfo.conditions.row = _rows;
var param = {
params: vc.component.auditOrdersInfo.conditions
};
//发送get请求
vc.http.get('myAuditOrders',
'list',
param,
function (json, res) {
var _auditOrdersInfo = JSON.parse(json);
vc.component.auditOrdersInfo.total = _auditOrdersInfo.total;
vc.component.auditOrdersInfo.records = _auditOrdersInfo.records;
vc.component.auditOrdersInfo.auditOrders = _auditOrdersInfo.resourceOrders;
vc.emit('pagination', 'init', {
total: vc.component.auditOrdersInfo.records,
currentPage: _page
});
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_openAuditOrderModel: function (_auditOrder) {
vc.component.auditOrdersInfo.orderInfo = _auditOrder;
vc.emit('audit','openAuditModal',{});
},
_queryAuditOrdersMethod: function () {
vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
},
_openDetailPurchaseApplyModel:function(_purchaseApply){
vc.jumpToPage("/admin.html#/pages/common/purchaseApplyDetail?applyOrderId="+_purchaseApply.applyOrderId+"&resOrderType="+_purchaseApply.resOrderType);
},
//提交审核信息
_auditOrderInfo: function (_auditInfo) {
console.log("提交得参数:"+_auditInfo);
_auditInfo.taskId = vc.component.auditOrdersInfo.orderInfo.taskId;
_auditInfo.applyOrderId = vc.component.auditOrdersInfo.orderInfo.applyOrderId;
//发送get请求
vc.http.post('myAuditOrders',
'audit',
JSON.stringify(_auditInfo),
{
emulateJSON: true
},
function (json, res) {
vc.toast("处理成功");
vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
}, function (errInfo, error) {
console.log('请求失败处理');
vc.toast("处理失败:" + errInfo);
}
);
},
_finishAuditOrder:function(_auditOrder){
let _auditInfo = {
taskId: _auditOrder.taskId,
applyOrderId: _auditOrder.applyOrderId,
state:'1200',
remark:'处理结束'
};
//发送get请求
vc.http.post('myAuditOrders',
'audit',
JSON.stringify(_auditInfo),
{
emulateJSON: true
},
function (json, res) {
vc.toast("处理成功");
vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
}, function (errInfo, error) {
console.log('请求失败处理');
vc.toast("处理失败:" + errInfo);
}
);
},
_loadStepStaff: function () {
var param = {
params: {
page:1,
row:1,
staffId: $that.auditOrdersInfo.currentUserId,
staffRole: '3003'
}
};
//发送get请求
vc.http.apiGet('workflow.listWorkflowStepStaffs',
param,
function (json, res) {
var _json = JSON.parse(json);
if(_json.data.length > 0){
$that.auditOrdersInfo.procure = true;
}
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_distributionOrder:function(_purchaseApply){
vc.jumpToPage("/admin.html#/pages/common/resourceEnterManage?applyOrderId="+_purchaseApply.applyOrderId+"&resOrderType="+_purchaseApply.resOrderType+"&taskId="+_purchaseApply.taskId);
}
}
});
})(window.vc);

View File

@ -23,6 +23,7 @@
<vc:create path="property/purchaseApprovers"
callBackListener="addItemOutStep"
callBackFunction="notify3"
flowType="40004"
></vc:create>
</div>

View File

@ -8,15 +8,15 @@
$step: {},
index: 0,
infos: [],
purchaseApply:{
resourceStores:[],
description:'',
endUserName:'',
endUserTel:'',
file:'',
resOrderType:'',
staffId:'',
staffName:''
purchaseApply: {
resourceStores: [],
description: '',
endUserName: '',
endUserTel: '',
file: '',
resOrderType: '',
staffId: '',
staffName: ''
}
}
},
@ -51,7 +51,7 @@
vc.component.addItemOutStepInfo.$step.step({
index: 0,
time: 500,
title: ["选择物品", "申请信息","审批人"]
title: ["选择物品", "申请信息", "审批人"]
});
vc.component.addItemOutStepInfo.index = vc.component.addItemOutStepInfo.$step.getIndex();
},
@ -71,19 +71,16 @@
vc.toast("请选择或填写必选信息");
return;
}
for( var i = 0; i < _resourceStores.length; i++){
if(_resourceStores[i].quantity <= 0){
vc.toast("请完善物品信息");
for (var i = 0; i < _resourceStores.length; i++) {
if (_resourceStores[i].quantity <= 0) {
vc.toast("请完善物品信息");
return;
}
if(vc.component.addItemOutStepInfo.purchaseApply.resOrderType == "20000"){
if(_resourceStores[i].quantity > _resourceStores[i].stock){
vc.toast(_resourceStores[i].resName+",库存不足");
return;
}
}
}
}
if (_resourceStores[i].quantity > _resourceStores[i].stock) {
vc.toast(_resourceStores[i].resName + ",库存不足");
return;
}
}
vc.component.addItemOutStepInfo.$step.nextStep();
vc.component.addItemOutStepInfo.index = vc.component.addItemOutStepInfo.$step.getIndex();
@ -94,14 +91,14 @@
_finishStep: function () {
vc.emit('addItemOutViewInfo', 'setItemOutInfo', null);
var _currentData = vc.component.addItemOutStepInfo.infos[vc.component.addItemOutStepInfo.index];
if(vc.component.addItemOutStepInfo.index != 2){
if (vc.component.addItemOutStepInfo.index != 2) {
if (_currentData == null || _currentData == undefined) {
vc.toast("请选择或填写必选信息");
return;
}
}
}
vc.http.apiPost(
'/purchase/purchaseApply',
'/collection/goodsCollection',
JSON.stringify(vc.component.addItemOutStepInfo.purchaseApply),
{
emulateJSON: true
@ -110,9 +107,9 @@
let _json = JSON.parse(json);
if (_json.code == 0) {
//关闭model
if(vc.component.addItemOutStepInfo.purchaseApply.resOrderType == "10000"){
if (vc.component.addItemOutStepInfo.purchaseApply.resOrderType == "10000") {
vc.jumpToPage("/admin.html#/pages/common/purchaseApplyManage");
}else{
} else {
vc.jumpToPage("/admin.html#/pages/common/itemOutManage");
}
return;

View File

@ -47,11 +47,11 @@
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<h5>物品申请信息</h5>
<h5>物品领用</h5>
<div class="ibox-tools" style="top:10px;">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddItemOutModal()">
<i class="fa fa-plus"></i>
物品申请
领用申请
</button>
</div>
</div>
@ -63,22 +63,21 @@
<thead>
<tr>
<th class="text-center">单号</th>
<th class="text-center">审批状态</th>
<th class="text-center">流程处理人</th>
<th class="text-center">物品</th>
<th class="text-center">申请人</th>
<th class="text-center">申请时间</th>
<th class="text-center">物品</th>
<th class="text-center">状态</th>
<th class="text-center">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="itemOut in itemOutManageInfo.itemOuts">
<td class="text-center">{{itemOut.applyOrderId}}</td>
<td class="text-center">{{itemOut.stateName}}</td>
<td class="text-center">{{itemOut.agreeMan}}</td>
<td class="text-center">{{itemOut.userName}}</td>
<td class="text-center">{{itemOut.createTime}}</td>
<td class="text-center">{{itemOut.resourceNames}}</td>
<td class="text-center">{{itemOut.userName}}</td>
<td class="text-center">{{itemOut.createTime}}</td>
<td class="text-center">{{itemOut.stateName}}</td>
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs"

View File

@ -5,7 +5,7 @@
<div class="ibox-title">
<h5>申请信息</h5>
<div class="ibox-tools" style="top:10px;">
<button type="button" class="btn btn-primary btn-sm"
<button type="button" class="btn btn-primary btn-sm" v-if="purchaseApplyDetailInfo.resOrderType == '10000'"
v-on:click="_printPurchaseApply()">
打印
</button>