|
|
@@ -1,10 +1,11 @@
|
|
|
define([ 'app/app' ], function(app) {
|
|
|
'use strict';
|
|
|
- app.register.controller('vendorDeliveryRuleCtrl', ['$scope', '$rootScope', 'ngTableParams', 'DistributionRule', 'BaseService', 'toaster', '$state', '$http', 'Enterprise', 'TreeData','$q','NumberService', function ($scope, $rootScope, ngTableParams, DistributionRule, BaseService, toaster, $state, $http, Enterprise, TreeData,$q,NumberService) {
|
|
|
+ app.register.controller('vendorDeliveryRuleCtrl', ['$scope', '$rootScope', 'ngTableParams', 'DistributionRule', 'BaseService', 'toaster', '$state', '$http', 'Enterprise', 'TreeData','$q','NumberService','TipRecord', function ($scope, $rootScope, ngTableParams, DistributionRule, BaseService, toaster, $state, $http, Enterprise, TreeData,$q,NumberService,TipRecord) {
|
|
|
$rootScope.active = 'vendor_logistics';
|
|
|
$scope.tab = 'deliverRule';
|
|
|
$scope.title = '配送规则';
|
|
|
$scope.$$rule = {};
|
|
|
+ $scope.currentStep = 1;
|
|
|
document.title = '配送规则-优软商城';
|
|
|
$scope.ruleTableParams = new ngTableParams({
|
|
|
page : 1,
|
|
|
@@ -39,6 +40,15 @@ define([ 'app/app' ], function(app) {
|
|
|
$scope.tab = tab;
|
|
|
};
|
|
|
|
|
|
+ var getTipRecord = function () {
|
|
|
+ TipRecord.findTipRecordOfRule({}, {}, function (data) {
|
|
|
+ $scope.showOperate = data.tipAgain == 0;
|
|
|
+ }, function (error) {
|
|
|
+ toaster.pop("error", error.data);
|
|
|
+ });
|
|
|
+ };
|
|
|
+ getTipRecord();
|
|
|
+
|
|
|
/**
|
|
|
* 编辑或新增配送规则,初始化
|
|
|
* @param data
|
|
|
@@ -142,6 +152,18 @@ define([ 'app/app' ], function(app) {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+ $scope.cancelOperateTip = function (noTip) {
|
|
|
+ if (noTip){
|
|
|
+ TipRecord.turnTipRecordOfRule({}, {}, function (data) {
|
|
|
+
|
|
|
+ },function (error) {
|
|
|
+ toaster.pop("error", error.data)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ $scope.currentStep = 1;
|
|
|
+ $scope.showOperate = false;
|
|
|
+ };
|
|
|
+
|
|
|
//配送方式类型
|
|
|
$scope.deliveryMethod = {
|
|
|
1301: '第三方配送',
|