1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
| //订单查询
| (function(vc) {
| var DEFAULT_PAGE = 1;
| var DEFAULT_ROWS = 10;
| vc.extends({
| data: {
| storeOrderCartManageInfo: {
| orderCarts: [],
| total: 0,
| records: 1,
| orderDetail: false,
| shops: [],
| conditions: {
| cartId: '',
| state: '',
| shopId: '',
| prodName: '',
| mallApiCode:'queryAdminStoreOrderCartBmoImpl'
| },
| address: {
| username: '',
| tel: '',
| address: ''
| },
| curOrderCart: {}
| }
| },
| _initMethod: function() {
| $that._listOrders(DEFAULT_PAGE, DEFAULT_ROWS);
| $that._listOrderShops(DEFAULT_PAGE, DEFAULT_ROWS);
| },
| _initEvent: function() {
| vc.on('storeOrderCartManage', 'goBack', function(_param) {
| $that.storeOrderCartManageInfo.orderDetail = false;
| });
| vc.on('storeOrderCartManage', 'list', function() {
| $that._listOrders(DEFAULT_PAGE, DEFAULT_ROWS);
| });
| vc.on('pagination', 'page_event', function(_currentPage) {
| $that._listOrders(_currentPage, DEFAULT_ROWS);
| });
| },
| methods: {
| _listOrders: function(_page, _rows) {
| $that.storeOrderCartManageInfo.conditions.page = _page;
| $that.storeOrderCartManageInfo.conditions.row = _rows;
| var param = {
| params: $that.storeOrderCartManageInfo.conditions
| };
| //发送get请求
| vc.http.apiGet('/mall.getAdminMallOpenApi',
| param,
| function(json, res) {
| let _json = JSON.parse(json);
| $that.storeOrderCartManageInfo.total = _json.total;
| $that.storeOrderCartManageInfo.records = _json.records;
| $that.storeOrderCartManageInfo.orderCarts = _json.data;
| vc.emit('pagination', 'init', {
| total: $that.storeOrderCartManageInfo.records,
| dataCount: $that.storeOrderCartManageInfo.total,
| currentPage: _page
| });
| },
| function(errInfo, error) {
| console.log('请求失败处理');
| }
| );
| },
| _listOrderShops: function(_page, _rows) {
| var param = {
| params: {
| page: _page,
| row: _rows,
| mallApiCode:'queryShopsByAdminBmoImpl'
| }
| };
|
| //发送get请求
| vc.http.apiGet('/mall.getAdminMallOpenApi',
| param,
| function(json, res) {
| let _json = JSON.parse(json);
| $that.storeOrderCartManageInfo.total = _json.total;
| $that.storeOrderCartManageInfo.records = _json.records;
| $that.storeOrderCartManageInfo.shops = _json.data;
| },
| function(errInfo, error) {
| console.log('请求失败处理');
| }
| );
| },
| _queryOrdersMethod: function() {
| $that._listOrders(DEFAULT_PAGE, DEFAULT_ROWS);
| },
| _openOrderDetailModel: function(_order) {
| vc.jumpToPage('/#/pages/goods/storeOrderCartDetail?orderId=' + _order.orderId + '&cartId=' + _order.cartId);
| },
|
| clearAddress: function() {
| $that.storeOrderCartManageInfo.address = {
| username: '',
| tel: '',
| address: ''
| }
| },
| _closeStoreOrderCartModal: function() {
| $("#storeOrderCartModal").modal('hide');
| },
|
| }
| });
| })(window.vc);
|
|