//订单查询 (function (vc) { var DEFAULT_PAGE = 1; var DEFAULT_ROWS = 10; vc.extends({ data: { shopManageInfo: { shops: [], storeTypes: [], total: 0, records: 1, orderDetail: false, conditions: { shopName: '', storeType: '', state: '', mallApiCode: 'queryShopsByAdminBmoImpl' } } }, _initMethod: function () { $that._listShops(DEFAULT_PAGE, DEFAULT_ROWS); vc.getDict('s_shop', "stop_type", function (_data) { $that.shopManageInfo.storeTypes = _data; }); }, _initEvent: function () { vc.on('pagination', 'page_event', function (_currentPage) { $that._listShops(_currentPage, DEFAULT_ROWS); }); vc.on('shop', 'shopManage', function () { $that._listShops(DEFAULT_PAGE,DEFAULT_ROWS); }); }, methods: { _listShops: function (_page, _rows) { $that.shopManageInfo.conditions.page = _page; $that.shopManageInfo.conditions.row = _rows; let param = { params: $that.shopManageInfo.conditions }; //发送get请求 vc.http.apiGet('/mall.getAdminMallOpenApi', param, function (json, res) { let _json = JSON.parse(json); $that.shopManageInfo.total = _json.total; $that.shopManageInfo.records = _json.records; $that.shopManageInfo.shops = _json.data; vc.emit('pagination', 'init', { total: $that.shopManageInfo.records, dataCount: $that.shopManageInfo.total, currentPage: _page }); }, function (errInfo, error) { console.log('请求失败处理'); } ); }, _queryOrdersMethod: function () { $that._listShops(DEFAULT_PAGE, DEFAULT_ROWS); }, _openShopWithdrawModel: function(_shop){ vc.emit('shopWithdraw','shopWithdrawModel', _shop); }, _openOrderDetailModel: function (_order) { $that.shopManageInfo.orderDetail = true; vc.emit('orderDetailManage', 'listOrderDetails', _order.cBusiness); } } }); })(window.vc);