|
|
@@ -23,7 +23,31 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
return httpInterceptor;
|
|
|
}]);
|
|
|
app.config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) {
|
|
|
- $stateProvider.state('sale', {
|
|
|
+ $stateProvider.state('index', {
|
|
|
+ url: "/index",
|
|
|
+ views: {
|
|
|
+ "left-view": {
|
|
|
+ templateUrl: "static/tpl/index/common/leftAll.html",
|
|
|
+ controller: 'LeftCtrl'
|
|
|
+ },
|
|
|
+ "right-view": {
|
|
|
+ templateUrl: "static/tpl/index/home/right.html",
|
|
|
+ controller: 'RightCtrl'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).state('home', {
|
|
|
+ url: "/",
|
|
|
+ views: {
|
|
|
+ "left-view": {
|
|
|
+ templateUrl: "static/tpl/index/common/leftAll.html",
|
|
|
+ controller: 'LeftCtrl'
|
|
|
+ },
|
|
|
+ "right-view": {
|
|
|
+ templateUrl: "static/tpl/index/home/right.html",
|
|
|
+ controller: 'RightCtrl'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).state('sale', {
|
|
|
url: "/sale",
|
|
|
views: {
|
|
|
"left-view": {
|
|
|
@@ -775,7 +799,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
templateUrl: "static/tpl/index/sale/vendorPerformanceAssess_detail.html",
|
|
|
controller: 'VendorPerformanceAssessDetailCtrl'
|
|
|
});
|
|
|
- $urlRouterProvider.otherwise('sale/pubinquiry');
|
|
|
+ $urlRouterProvider.otherwise('/index');
|
|
|
}]);
|
|
|
|
|
|
|
|
|
@@ -15553,7 +15577,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
/**
|
|
|
* 建立合作关系申请 (新的合作伙伴)
|
|
|
*/
|
|
|
- app.controller('NewPartnerCtrl', ['$scope', 'AddPartnerMyRequest', 'toaster', 'BaseService', 'ngTableParams', 'AddPartner', '$timeout', '$rootScope', 'VendorInfo', '$window', function ($scope, AddPartnerMyRequest, toaster, BaseService, ngTableParams, AddPartner, $timeout, $rootScope, VendorInfo, $window) {
|
|
|
+ app.controller('NewPartnerCtrl', ['$scope', 'AddPartnerMyRequest', 'toaster', 'BaseService', 'ngTableParams', 'AddPartner', '$timeout', '$rootScope', 'VendorInfo', '$window', '$modal',
|
|
|
+ function ($scope, AddPartnerMyRequest, toaster, BaseService, ngTableParams, AddPartner, $timeout, $rootScope, VendorInfo, $window, $modal) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
$scope.status = "partner";
|
|
|
$scope.active = 'all'; // 所有申请记录
|
|
|
@@ -15690,12 +15715,25 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
AddPartner.agreeRequest({id: id}, {}, function (data) {
|
|
|
if (data.success) {
|
|
|
toaster.pop('success', '提示', '操作成功');
|
|
|
+ if (data.result) {
|
|
|
+ //选择打印模板
|
|
|
+ var modalInstance = $modal.open({
|
|
|
+ templateUrl: 'static/tpl/index/baseInfo/modal/partnership_modal.html',
|
|
|
+ controller: 'PartnerShipCtrl',
|
|
|
+ resolve: {
|
|
|
+ PartnerShipInfo: function () {
|
|
|
+ return data.result;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ modalInstance.result.then(function () {
|
|
|
+ window.location.reload();
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
if (data.error) {
|
|
|
toaster.pop('error', '提示', '操作失败');
|
|
|
}
|
|
|
- // $scope.tableParams.reload();
|
|
|
- $window.location.reload();
|
|
|
}, function (response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
@@ -15790,7 +15828,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
if (data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
|
}
|
|
|
- // $scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
|
}, function (response) {
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
@@ -15798,6 +15835,64 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
}]);
|
|
|
|
|
|
+ /**
|
|
|
+ * 同意申请后续操作
|
|
|
+ */
|
|
|
+ app.controller('PartnerShipCtrl', ['$scope', 'PartnerShipInfo', '$modalInstance', 'AddPartner', 'toaster',
|
|
|
+ function($scope, PartnerShipInfo, $modalInstance, AddPartner, toaster) {
|
|
|
+ $scope.partInfo = PartnerShipInfo;
|
|
|
+
|
|
|
+ // 添加为服务商
|
|
|
+ $scope.addServicer = function (vendUID) {
|
|
|
+ AddPartner.addServicer({businessCode: vendUID}, {}, function (data) {
|
|
|
+ if (data.success) {
|
|
|
+ toaster.pop('success', '提示', data.success);
|
|
|
+ $scope.tableParams.reload();
|
|
|
+ }
|
|
|
+ if (data.error) {
|
|
|
+ toaster.pop('error', '提示', data.error);
|
|
|
+ }
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', '失败', response.data);
|
|
|
+ })
|
|
|
+ };
|
|
|
+
|
|
|
+ // 添加客户
|
|
|
+ $scope.addCust = function (vendUID) {
|
|
|
+ AddPartner.addCust({businessCode: vendUID}, {}, function (data) {
|
|
|
+ if (data.success) {
|
|
|
+ toaster.pop('success', '提示', data.success);
|
|
|
+ $scope.tableParams.reload();
|
|
|
+ }
|
|
|
+ if (data.error) {
|
|
|
+ toaster.pop('error', '提示', data.error);
|
|
|
+ }
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', '失败', response.data);
|
|
|
+ })
|
|
|
+ };
|
|
|
+
|
|
|
+ // 添加为供应商
|
|
|
+ $scope.addSupplier = function (vendUID) {
|
|
|
+ AddPartner.addSupplier({businessCode: vendUID}, {}, function (data) {
|
|
|
+ if (data.success) {
|
|
|
+ toaster.pop('success', '提示', data.success);
|
|
|
+ $scope.tableParams.reload();
|
|
|
+ }
|
|
|
+ if (data.error) {
|
|
|
+ toaster.pop('error', '提示', data.error);
|
|
|
+ }
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', '失败', response.data);
|
|
|
+ })
|
|
|
+ };
|
|
|
+
|
|
|
+ // 关闭
|
|
|
+ $scope.close = function() {
|
|
|
+ $modalInstance.close();
|
|
|
+ }
|
|
|
+ }]);
|
|
|
+
|
|
|
/**
|
|
|
* 建立合作关系处理申请
|
|
|
*/
|