mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 18:11:00 +08:00
优化代码
This commit is contained in:
parent
66ac15ccbb
commit
e2a89c756b
@ -24,7 +24,6 @@
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
$that._loadStepStaff();
|
||||
},
|
||||
_initEvent: function () {
|
||||
|
||||
@ -49,14 +48,13 @@
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.get('myAuditOrders',
|
||||
'list',
|
||||
vc.http.apiGet('resourceStore.listAllocationStoreAuditOrders',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _allocationStorehouseAuditOrdersInfo = JSON.parse(json);
|
||||
vc.component.allocationStorehouseAuditOrdersInfo.total = _allocationStorehouseAuditOrdersInfo.total;
|
||||
vc.component.allocationStorehouseAuditOrdersInfo.records = _allocationStorehouseAuditOrdersInfo.records;
|
||||
vc.component.allocationStorehouseAuditOrdersInfo.auditOrders = _allocationStorehouseAuditOrdersInfo.resourceOrders;
|
||||
vc.component.allocationStorehouseAuditOrdersInfo.auditOrders = _allocationStorehouseAuditOrdersInfo.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.allocationStorehouseAuditOrdersInfo.records,
|
||||
currentPage: _page
|
||||
@ -77,10 +75,9 @@
|
||||
_auditOrderInfo: function (_auditInfo) {
|
||||
console.log("提交得参数:" + _auditInfo);
|
||||
_auditInfo.taskId = vc.component.allocationStorehouseAuditOrdersInfo.orderInfo.taskId;
|
||||
_auditInfo.applyOrderId = vc.component.allocationStorehouseAuditOrdersInfo.orderInfo.applyOrderId;
|
||||
_auditInfo.asId = vc.component.allocationStorehouseAuditOrdersInfo.orderInfo.asId;
|
||||
//发送get请求
|
||||
vc.http.post('myAuditOrders',
|
||||
'audit',
|
||||
vc.http.apiPost('resourceStore.auditAllocationStoreOrder',
|
||||
JSON.stringify(_auditInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
@ -97,13 +94,12 @@
|
||||
_finishAuditOrder: function (_auditOrder) {
|
||||
let _auditInfo = {
|
||||
taskId: _auditOrder.taskId,
|
||||
applyOrderId: _auditOrder.applyOrderId,
|
||||
asId: _auditOrder.asId,
|
||||
state: '1200',
|
||||
remark: '处理结束'
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.post('myAuditOrders',
|
||||
'audit',
|
||||
vc.http.apiPost('resourceStore.auditAllocationStoreOrder',
|
||||
JSON.stringify(_auditInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
|
||||
@ -0,0 +1,54 @@
|
||||
<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">物品ID</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="auditOrder in allocationStorehouseHistoryAuditOrdersInfo.auditOrders">
|
||||
<td class="text-center">{{auditOrder.resId}}</td>
|
||||
<td class="text-center">{{auditOrder.resName}}</td>
|
||||
<td class="text-center">{{auditOrder.shaName}}</td>
|
||||
<td class="text-center">{{auditOrder.shzName}}</td>
|
||||
<td class="text-center">{{auditOrder.stock}}</td>
|
||||
<td class="text-center">{{auditOrder.startUserName}}</td>
|
||||
<td class="text-center">{{auditOrder.remark}}</td>
|
||||
<td class="text-center">
|
||||
<div>
|
||||
|
||||
</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,76 @@
|
||||
/**
|
||||
审核订单
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
allocationStorehouseHistoryAuditOrdersInfo: {
|
||||
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);
|
||||
},
|
||||
_initEvent: function () {
|
||||
|
||||
vc.on('allocationStorehouseHistoryAuditOrders', '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.allocationStorehouseHistoryAuditOrdersInfo.conditions.page = _page;
|
||||
vc.component.allocationStorehouseHistoryAuditOrdersInfo.conditions.row = _rows;
|
||||
var param = {
|
||||
params: vc.component.allocationStorehouseHistoryAuditOrdersInfo.conditions
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('resourceStore.listAllocationStoreAuditOrders',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _allocationStorehouseHistoryAuditOrdersInfo = JSON.parse(json);
|
||||
vc.component.allocationStorehouseHistoryAuditOrdersInfo.total = _allocationStorehouseHistoryAuditOrdersInfo.total;
|
||||
vc.component.allocationStorehouseHistoryAuditOrdersInfo.records = _allocationStorehouseHistoryAuditOrdersInfo.records;
|
||||
vc.component.allocationStorehouseHistoryAuditOrdersInfo.auditOrders = _allocationStorehouseHistoryAuditOrdersInfo.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.allocationStorehouseHistoryAuditOrdersInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_openAuditOrderModel: function (_auditOrder) {
|
||||
vc.component.allocationStorehouseHistoryAuditOrdersInfo.orderInfo = _auditOrder;
|
||||
vc.emit('audit', 'openAuditModal', {});
|
||||
},
|
||||
_queryAuditOrdersMethod: function () {
|
||||
vc.component._listAuditOrders(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user