mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
加入领用已办
This commit is contained in:
parent
165bbd152a
commit
b31f5a4223
@ -0,0 +1,53 @@
|
||||
<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="auditOrderHistory in auditOrderHistorysInfo.auditOrderHistorys">
|
||||
<td class="text-center">{{auditOrderHistory.applyOrderId}}</td>
|
||||
<td class="text-center">{{auditOrderHistory.resOrderTypeName}}</td>
|
||||
<td class="text-center">{{auditOrderHistory.stateName}}</td>
|
||||
<td class="text-center">{{auditOrderHistory.createTime}}</td>
|
||||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openDetailPurchaseApplyModel(auditOrderHistory)">查看
|
||||
</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>
|
||||
</div>
|
||||
@ -0,0 +1,61 @@
|
||||
/**
|
||||
审核订单
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
auditOrderHistorysInfo: {
|
||||
auditOrderHistorys: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
userName: '',
|
||||
conditions: {
|
||||
AuditOrderHistorysId: '',
|
||||
userName: '',
|
||||
auditLink: '',
|
||||
},
|
||||
orderInfo:'',
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.component._listAuditOrderHistorys(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
_listAuditOrderHistorys: function (_page, _rows) {
|
||||
|
||||
vc.component.auditOrderHistorysInfo.conditions.page = _page;
|
||||
vc.component.auditOrderHistorysInfo.conditions.row = _rows;
|
||||
var param = {
|
||||
params: vc.component.auditOrderHistorysInfo.conditions
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('auditUser.listAuditHistoryOrders',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _auditOrderHistorysInfo = JSON.parse(json);
|
||||
vc.component.auditOrderHistorysInfo.total = _auditOrderHistorysInfo.total;
|
||||
vc.component.auditOrderHistorysInfo.records = _auditOrderHistorysInfo.records;
|
||||
vc.component.auditOrderHistorysInfo.auditOrderHistorys = _auditOrderHistorysInfo.resourceOrders;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.auditOrderHistorysInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_openDetailPurchaseApplyModel:function(_purchaseApply){
|
||||
vc.jumpToPage("/admin.html#/pages/common/purchaseApplyDetail?applyOrderId="+_purchaseApply.applyOrderId+"&resOrderType="+_purchaseApply.resOrderType);
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
@ -49,14 +49,13 @@
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.get('myAuditOrders',
|
||||
'list',
|
||||
vc.http.apiGet('/collection/getCollectionAuditOrder',
|
||||
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.component.auditOrdersInfo.auditOrders = _auditOrdersInfo.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.auditOrdersInfo.records,
|
||||
currentPage: _page
|
||||
@ -146,7 +145,7 @@
|
||||
},
|
||||
|
||||
_distributionOrder:function(_purchaseApply){
|
||||
vc.jumpToPage("/admin.html#/pages/common/resourceEnterManage?applyOrderId="+_purchaseApply.applyOrderId+"&resOrderType="+_purchaseApply.resOrderType+"&taskId="+_purchaseApply.taskId);
|
||||
vc.jumpToPage("/admin.html#/pages/common/resourceOutManage?applyOrderId="+_purchaseApply.applyOrderId+"&resOrderType="+_purchaseApply.resOrderType+"&taskId="+_purchaseApply.taskId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -67,7 +67,7 @@
|
||||
<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>
|
||||
@ -78,16 +78,21 @@
|
||||
<td class="text-center">{{itemOut.createTime}}</td>
|
||||
<td class="text-center">{{itemOut.stateName}}</td>
|
||||
|
||||
<td class="text-center">
|
||||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openDetailItemOutModel(itemOut)">查看
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-group" v-if="itemOut.state == '1000'">
|
||||
<!-- <div class="btn-group" v-if="itemOut.state == '1000'">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openDeleteItemOutModel(itemOut)">取消
|
||||
</button>
|
||||
</div> -->
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openRunWorkflowImage(itemOut)">流程图
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@ -111,4 +116,6 @@
|
||||
|
||||
<!-- <vc:create path="common/deleteItemOut"></vc:create> -->
|
||||
|
||||
<vc:create path="common/viewImage"></vc:create>
|
||||
|
||||
</div>
|
||||
|
||||
@ -80,7 +80,32 @@
|
||||
},
|
||||
_queryInspectionPlanMethod:function () {
|
||||
vc.component._listItemOuts(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
}
|
||||
},
|
||||
_openRunWorkflowImage: function (_itemOut) {
|
||||
var param = {
|
||||
params: {
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
businessKey: _itemOut.applyOrderId
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('workflow.listRunWorkflowImage',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _workflowManageInfo = JSON.parse(json);
|
||||
if (_workflowManageInfo.code != '0') {
|
||||
vc.toast(_workflowManageInfo.msg);
|
||||
|
||||
return;
|
||||
}
|
||||
vc.emit('viewImage', 'showImage', {
|
||||
url: 'data:image/png;base64,' + _workflowManageInfo.data
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
|
||||
61
public/pages/common/resourceOutManage/resourceOutManage.html
Normal file
61
public/pages/common/resourceOutManage/resourceOutManage.html
Normal file
@ -0,0 +1,61 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>单号:{{resourceOutManageInfo.applyOrderId}}</h5>
|
||||
</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-center">发放数量</th>
|
||||
<th class="text-center">备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="resourceOut in resourceOutManageInfo.purchaseApplyDetailVo">
|
||||
<td class="text-center">{{resourceOut.resName}}</td>
|
||||
<td class="text-center">{{resourceOut.resCode}}</td>
|
||||
<td class="text-center">{{resourceOut.stock}}</td>
|
||||
<td class="text-center">{{resourceOut.quantity}}</td>
|
||||
<td class="text-center">
|
||||
<input v-model="resourceOut.purchaseQuantity" type="number"
|
||||
placeholder="必填,请填写发放数量" class="form-control">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input v-model="resourceOut.purchaseRemark" type="text" placeholder="可填,请填写备注" class="form-control">
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<ul class="pagination float-right"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-10"></div>
|
||||
<div class="col-md-2 " style="margin-bottom:10px; text-align:right">
|
||||
|
||||
<button type="button" class="btn btn-primary"
|
||||
style="margin-left:10px;" v-on:click="_submit()">提交
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
150
public/pages/common/resourceOutManage/resourceOutManage.js
Normal file
150
public/pages/common/resourceOutManage/resourceOutManage.js
Normal file
@ -0,0 +1,150 @@
|
||||
/**
|
||||
//入库
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
resourceOutManageInfo: {
|
||||
resourceOuts: [],
|
||||
applyOrderId: '',
|
||||
taskId: '',
|
||||
resOrderType: '',
|
||||
purchaseApplyDetailVo: [],
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.component.resourceOutManageInfo.applyOrderId = vc.getParam('applyOrderId');
|
||||
vc.component.resourceOutManageInfo.resOrderType = vc.getParam('resOrderType');
|
||||
vc.component.resourceOutManageInfo.taskId = vc.getParam('taskId');
|
||||
vc.component._listPurchaseApply(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
|
||||
},
|
||||
methods: {
|
||||
_listPurchaseApply: function (_page, _rows) {
|
||||
var param = {
|
||||
params: {
|
||||
page: _page,
|
||||
row: _rows,
|
||||
applyOrderId: vc.component.resourceOutManageInfo.applyOrderId,
|
||||
resOrderType: vc.component.resourceOutManageInfo.resOrderType,
|
||||
}
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.get('purchaseApplyManage',
|
||||
'list',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _purchaseApplyDetailInfo = JSON.parse(json);
|
||||
var _purchaseApply = _purchaseApplyDetailInfo.purchaseApplys;
|
||||
vc.copyObject(_purchaseApply[0], vc.component.resourceOutManageInfo);
|
||||
$that.resourceOutManageInfo.purchaseApplyDetailVo.forEach(function (item) {
|
||||
item.purchaseQuantity = '';
|
||||
item.price = '';
|
||||
item.purchaseRemark = '';
|
||||
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_openDetailResourceEnterModel: function (_resourceOut) {
|
||||
vc.jumpToPage("/admin.html#/pages/common/resourceOutDetail?applyOrderId=" + _resourceOut.applyOrderId + "&resOrderType=10000");
|
||||
},
|
||||
_openResourceEnterDetailManageModel: function (_resourceOut) {
|
||||
vc.jumpToPage("/admin.html#/pages/common/resourceOutDetailManage?applyOrderId=" + _resourceOut.applyOrderId + "&resOrderType=10000");
|
||||
},
|
||||
_queryResourceEnterMethod: function () {
|
||||
vc.component._listResourceEnters(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
|
||||
},
|
||||
_moreCondition: function () {
|
||||
if (vc.component.resourceOutManageInfo.moreCondition) {
|
||||
vc.component.resourceOutManageInfo.moreCondition = false;
|
||||
} else {
|
||||
vc.component.resourceOutManageInfo.moreCondition = true;
|
||||
}
|
||||
},
|
||||
_queryInspectionPlanMethod: function () {
|
||||
vc.component._listResourceEnters(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_openAddResourceQuantityModel: function () {
|
||||
|
||||
},
|
||||
_submit: function () {
|
||||
let _flag = true;
|
||||
//校验 是否填写正确
|
||||
$that.resourceOutManageInfo.purchaseApplyDetailVo.forEach(function (item) {
|
||||
|
||||
if (!vc.notNull(item.purchaseQuantity)) {
|
||||
vc.toast('采购数量未填写');
|
||||
_flag = false;
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('item',item);
|
||||
if (item.purchaseQuantity > item.stock) {
|
||||
vc.toast('库存不足');
|
||||
_flag = false;
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
if(_flag == false){
|
||||
return;
|
||||
}
|
||||
|
||||
vc.http.apiPost(
|
||||
'/collection/resourceOut',
|
||||
JSON.stringify($that.resourceOutManageInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//处理审核通过
|
||||
$that._finishAuditOrder();
|
||||
return;
|
||||
}
|
||||
vc.toast(_json.msg);
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
|
||||
vc.toast(errInfo);
|
||||
});
|
||||
},
|
||||
_finishAuditOrder: function () {
|
||||
let _auditInfo = {
|
||||
taskId: $that.resourceOutManageInfo.taskId,
|
||||
applyOrderId: $that.resourceOutManageInfo.applyOrderId,
|
||||
state: '1100',
|
||||
remark: '出库完成'
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.post('myAuditOrders',
|
||||
'audit',
|
||||
JSON.stringify(_auditInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
vc.toast("处理成功");
|
||||
vc.goBack();
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.toast("处理失败:" + errInfo);
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user