|
|
@@ -23,9 +23,11 @@ define([ 'ngResource', 'common/query/storeViolations', 'ngTable', 'ngSanitize',
|
|
|
/**
|
|
|
* 企业信息记录
|
|
|
*/
|
|
|
- module.controller('EnterpriseInfoCtrl', ['$scope', 'StoreInfo', 'toaster', function ($scope, StoreInfo, toaster) {
|
|
|
+ module.controller('EnterpriseInfoCtrl', ['$scope', 'StoreInfo', 'toaster', 'ConsignmentAgreementRecord', 'ngTableParams', 'BaseService', function ($scope, StoreInfo, toaster, ConsignmentAgreementRecord, ngTableParams, BaseService) {
|
|
|
console.log('EnterpriseInfoCtrl');
|
|
|
|
|
|
+ $scope.showRecords = true;
|
|
|
+
|
|
|
active();
|
|
|
|
|
|
/**
|
|
|
@@ -42,6 +44,7 @@ define([ 'ngResource', 'common/query/storeViolations', 'ngTable', 'ngSanitize',
|
|
|
});
|
|
|
}
|
|
|
console.log($scope.store);
|
|
|
+ loadRecords($scope.store.enUU);
|
|
|
} else {
|
|
|
toaster.pop('error', '获取店铺信息失败,请刷新页面');
|
|
|
}
|
|
|
@@ -51,6 +54,41 @@ define([ 'ngResource', 'common/query/storeViolations', 'ngTable', 'ngSanitize',
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 加载寄售协议操作记录
|
|
|
+ *
|
|
|
+ * @param enUU 企业UU
|
|
|
+ */
|
|
|
+ function loadRecords(enUU) {
|
|
|
+ $scope.recordsTableParams = new ngTableParams({
|
|
|
+ page : 1,
|
|
|
+ count : 10
|
|
|
+ }, {
|
|
|
+ total : 0,
|
|
|
+ getData : function($defer, params) {
|
|
|
+ // 处理分页参数到URL中
|
|
|
+ var param = BaseService.parseParams(params.url());
|
|
|
+ param.enUU = enUU || 0;
|
|
|
+
|
|
|
+ ConsignmentAgreementRecord.pageRecordWhenAdminQueryInfo(param, {}, function (data) {
|
|
|
+ if (data.content && data.content.length > 0) {
|
|
|
+ $defer.resolve(data.content);
|
|
|
+ $scope.showRecords = true;
|
|
|
+ } else {
|
|
|
+ $defer.resolve([]);
|
|
|
+ $scope.showRecords = false;
|
|
|
+ }
|
|
|
+ console.log(data);
|
|
|
+ }, function (error) {
|
|
|
+ console.log(error);
|
|
|
+ $defer.resolve([]);
|
|
|
+ $scope.showRecords = false;
|
|
|
+ toaster.pop('error', '数据获取失败,请重新刷新页面');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
}]);
|
|
|
|
|
|
/**
|