Browse Source

增加下架模块代码,主要是Push代码共享

wangcz 8 years ago
parent
commit
9c33d00db1

+ 2 - 2
src/main/webapp/resources/js/admin/app.js

@@ -1,4 +1,4 @@
- define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ui-form', 'ngLocal', 'ngTable', 'ngSanitize', 'ngDraggable', 'common/services', 'common/directives', 'common/query/brand', 'common/query/address', 'common/query/return' , 'common/query/change' ,'common/query/component', 'common/query/order', 'common/query/purchase', 'common/query/invoice', 'common/query/property', 'common/query/kind', 'common/query/property', 'common/query/receipt', 'common/query/logistics' ,'angular-toaster', 'ui-jquery', 'jquery-uploadify','common/query/dateParse' , 'common/query/bankTransfer' ,'common/query/bankInfo', 'common/query/urlencryption', 'common/query/bill', 'common/query/makerDemand', 'common/query/goods', 'common/query/validtime', 'file-upload','file-upload-shim', 'common/query/slideImage', 'common/query/kindAdvice', 'common/query/responseLogistics', 'common/query/search','common/directives/dynamicInput', 'common/query/auditorMail', 'common/query/tradeBasicProperties', 'common/query/exchangeRate', 'common/query/tradeDeliveryDelayTime', 'common/query/payment', 'common/query/kindContrast', 'common/query/crawlTask', 'common/query/afterSale', 'common/query/refund', 'common/query/messageBoard', 'common/query/logisticsPort', 'common/query/storeInfo', 'common/query/cms', 'common/query/help', 'common/query/commonCount', 'common/module/store_admin_violations_module', 'common/query/internalMessage','common/query/user','common/query/secQuestion','common/query/keyWord','common/query/logUsage', 'treeControl'], function(angularAMD) {
+ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ui-form', 'ngLocal', 'ngTable', 'ngSanitize', 'ngDraggable', 'common/services', 'common/directives', 'common/query/brand', 'common/query/address', 'common/query/return' , 'common/query/change' ,'common/query/component', 'common/query/order', 'common/query/purchase', 'common/query/invoice', 'common/query/property', 'common/query/kind', 'common/query/property', 'common/query/receipt', 'common/query/logistics' ,'angular-toaster', 'ui-jquery', 'jquery-uploadify','common/query/dateParse' , 'common/query/bankTransfer' ,'common/query/bankInfo', 'common/query/urlencryption', 'common/query/bill', 'common/query/makerDemand', 'common/query/goods', 'common/query/validtime', 'file-upload','file-upload-shim', 'common/query/slideImage', 'common/query/kindAdvice', 'common/query/responseLogistics', 'common/query/search','common/directives/dynamicInput', 'common/query/auditorMail', 'common/query/tradeBasicProperties', 'common/query/exchangeRate', 'common/query/tradeDeliveryDelayTime', 'common/query/payment', 'common/query/kindContrast', 'common/query/crawlTask', 'common/query/afterSale', 'common/query/refund', 'common/query/messageBoard', 'common/query/logisticsPort', 'common/query/storeInfo', 'common/query/cms', 'common/query/help', 'common/query/commonCount', 'common/module/store_admin_violations_module', 'common/query/internalMessage','common/query/user','common/query/secQuestion','common/query/keyWord','common/query/logUsage'], function(angularAMD) {
 	'use strict';
 
 	 /**
@@ -8,7 +8,7 @@
 		 return this.length > 0 ? this[this.length - 1] : null;
 	 };
 
-	var app = angular.module('myApp', [ 'ui.router', 'ui.bootstrap', 'ui.form', 'ng.local', 'ngTable', 'ngSanitize', 'ngDraggable', 'common.services', 'common.directives', 'brandServices', 'addressServices', 'returnServices', 'changeServices', 'componentServices', 'orderServices', 'purchaseServices', 'invoiceServices', 'propertyServices', 'receiptServices', 'logisticsServices', 'common.query.kind', 'toaster','ui.jquery' ,'dateparseServices', 'bankInfo' , 'bankTransfer', 'urlencryptionServices', 'billServices', 'makerDemand', 'goodsServices', 'validtimeServices', 'angularFileUpload', 'slideImageService', 'common.query.kindAdvice', 'responseLogisticsService', 'searchService', 'ngDynamicInput', 'ReviewerEmailInfoService', 'tradeBasicPropertiesServices', 'exchangeRateModule', 'tradeDeliveryDelayTimeModule', 'PaymentService', 'kindContrastServices', 'crawlTaskServices', 'afterSaleService', 'refundModule', 'messageBoardServices', 'logisticsPortService', 'storeInfoServices', 'cmsService', 'helpServices', 'commonCountServices', 'tool.directives', 'StoreAdminViolationsModule', 'internalMessageServices','common.query.user','secQuestionServices','keyWordServices','logUsageServices', 'treeControl']);
+	var app = angular.module('myApp', [ 'ui.router', 'ui.bootstrap', 'ui.form', 'ng.local', 'ngTable', 'ngSanitize', 'ngDraggable', 'common.services', 'common.directives', 'brandServices', 'addressServices', 'returnServices', 'changeServices', 'componentServices', 'orderServices', 'purchaseServices', 'invoiceServices', 'propertyServices', 'receiptServices', 'logisticsServices', 'common.query.kind', 'toaster','ui.jquery' ,'dateparseServices', 'bankInfo' , 'bankTransfer', 'urlencryptionServices', 'billServices', 'makerDemand', 'goodsServices', 'validtimeServices', 'angularFileUpload', 'slideImageService', 'common.query.kindAdvice', 'responseLogisticsService', 'searchService', 'ngDynamicInput', 'ReviewerEmailInfoService', 'tradeBasicPropertiesServices', 'exchangeRateModule', 'tradeDeliveryDelayTimeModule', 'PaymentService', 'kindContrastServices', 'crawlTaskServices', 'afterSaleService', 'refundModule', 'messageBoardServices', 'logisticsPortService', 'storeInfoServices', 'cmsService', 'helpServices', 'commonCountServices', 'tool.directives', 'StoreAdminViolationsModule', 'internalMessageServices','common.query.user','secQuestionServices','keyWordServices','logUsageServices']);
 	app.init = function() {
 		angularAMD.bootstrap(app);
 	};

+ 37 - 5
src/main/webapp/resources/js/admin/controllers/product/productManageCtrl.js

@@ -1,9 +1,41 @@
 define(['app/app'], function(app) {
     'use strict';
-    app.register.controller('productManageCtrl', ['$scope', '$modal', 'toaster', 'ngTableParams', 'treeControl', function($scope, $modal, toaster, ngTableParams, treeControl) {
-        $scope.treedata = createSubTree(3, 4, "");
-        $scope.showSelected = function(sel) {
-            $scope.selectedNode = sel;
-        };
+    app.register.controller('productManageCtrl', ['$scope', '$modal', 'toaster', 'ngTableParams', 'BaseService', function($scope, $modal, toaster, ngTableParams, BaseService) {
+        // $scope.manageTableParams = new ngTableParams({
+        //     page: 1,
+        //     count: 10,
+        //     sorting: {
+        //         date: 'DESC'
+        //     }
+        // }, {
+        //     total: 0,
+        //     counts: [10, 25, 50, 100],
+        //     getData: function ($defer, params) {
+        //         var param = BaseService.parseParams(params.url());
+        //         params.total();
+        //         $defer.resolve();
+        //     }
+        // })
+        $scope.soldOutProduct = function (data) {
+            var modalInstance = $modal.open({
+                templateUrl: 'static/view/admin/modal/manage/ManageSoldOut.html',
+                controller: 'soleOutCtrl',
+                size : 'sm',
+                resolve: {
+                    account: function () {
+                        return angular.copy(data);
+                    }
+                }
+            });
+            modalInstance.result.then(function(account) {
+
+            }, function () {
+
+            })
+        }
+    }]);
+
+    app.register.controller('soleOutCtrl', ['$scope', 'account', function($scope,account) {
+
     }])
 })

+ 0 - 2
src/main/webapp/resources/js/admin/main.js

@@ -6,7 +6,6 @@ require.config({
 		'lib' : 'lib',
 		'common' : 'js/common',
 		'angular' : 'lib/angular/angular.min',
-		'tree-control' : 'lib/angular/angular-tree-control',
 		'ngResource' : 'lib/angular/angular-resource.min',
 		'angularAMD' : 'lib/angular/angularAMD',
 		'ui-bootstrap' : 'lib/angular/ui-bootstrap-tpls.min',
@@ -59,7 +58,6 @@ require.config({
 			'deps' : [ 'angular' ]
 		},
 		'ngAnimate' : ['angular'],
-		'treeControl': ['angular'],
 		'bootstrap' : ['jquery'],
 		'jquery-uploadify' : [ 'jquery' ],
 		'jquery-summernote' : ['jquery', 'bootstrap'],

+ 46 - 46
src/main/webapp/resources/view/admin/modal/billInfoModal.html

@@ -62,52 +62,52 @@ div.title {
 </div>
 <form class="form-horizontal " name="myForm" novalidate>
 	<div class="modal-body" id="body">
-			<div class="padding-bottom-10">
-				<div class="row-left text-right">开票抬头:</div>
-				<div class="row-right" ng-bind="bill.head"></div>
+		<div class="padding-bottom-10">
+			<div class="row-left text-right">开票抬头:</div>
+			<div class="row-right" ng-bind="bill.head"></div>
+		</div>
+		<div class="padding-bottom-10">
+			<div class="row-left text-right">发票类型:</div>
+			<div class="row-right" ng-bind="bill.kind==1206 ? '增值税(普通)发票': '增值税(专用)发票'"></div>
+		</div>
+		<div class="padding-bottom-10">
+			<div class="row-left text-right">收票人:</div>
+			<div class="row-right" ng-bind="bill.name"></div>
+		</div>
+		<div class="padding-bottom-10">
+			<div class="row-left text-right">收票人电话:</div>
+			<div class="row-right" ng-bind="bill.telephone"></div>
+		</div>
+		<div class="padding-bottom-10">
+			<div class="row-left text-right">收票人地址:</div>
+			<div class="row-right auto-br" title="{{address}}" ng-init="address= bill.area+ bill.detailAddress">
+				<span ng-bind="bill.area"></span>
+				<span ng-bind="bill.detailAddress"></span>
 			</div>
-			<div class="padding-bottom-10">
-				<div class="row-left text-right">发票类型:</div>
-				<div class="row-right" ng-bind="bill.kind==1206 ? '增值税(普通)发票': '增值税(专用)发票'"></div>
-			</div>
-			<div class="padding-bottom-10">
-		    	<div class="row-left text-right">收票人:</div>
-		    	<div class="row-right" ng-bind="bill.name"></div>
-		  	</div>
-		  	<div class="padding-bottom-10">
-		  		<div class="row-left text-right">收票人电话:</div>
-		  		<div class="row-right" ng-bind="bill.telephone"></div>
-		  	</div>
-		  	<div class="padding-bottom-10">
-		  		<div class="row-left text-right">收票人地址:</div>
-		  		<div class="row-right auto-br" title="{{address}}" ng-init="address= bill.area+ bill.detailAddress">
-		  			<span ng-bind="bill.area"></span>
-		  			<span ng-bind="bill.detailAddress"></span>
-		  		</div>
-		  	</div>
-		  	<div class="padding-bottom-10" ng-show="bill.companyAddress">
-		  		<div class="row-left text-right">企业地址:</div>
-		  		<div class="row-right" ng-bind="bill.companyAddress"></div>
-		  	</div>
-		  	<div class="padding-bottom-10" ng-show="bill.companyTaxNumber">
-		  		<div class="row-left text-right">税务登记号:</div>
-		  		<div class="row-right" ng-bind="bill.companyTaxNumber"></div>
-		  	</div>
-		  	<div class="padding-bottom-10" ng-show="bill.companyPhone">
-		  		<div class="row-left text-right">企业电话:</div>
-		  		<div class="row-right" ng-bind="bill.companyPhone"></div>
-		  	</div>
-		  	<div class="padding-bottom-10" ng-show="bill.bankName">
-		  		<div class="row-left text-right">开户银行:</div>
-		  		<div class="row-right" ng-bind="bill.bankName"></div>
-		  	</div>
-		  	<div class="padding-bottom-10" ng-show="bill.bankAccount">
-		  		<div class="row-left text-right">开户银行账户:</div>
-		  		<div class="row-right" ng-bind="bill.bankAccount"></div>
-		  	</div>
-		  	<div class="padding-bottom-10" ng-show="bill.attachUrl">
-		  		<div class="row-left text-right">发票资料:</div>
-		  		<div class="row-right"><a href="{{bill.attachUrl}}" target="_blank">点击查看</a></div>
-		  	</div>
+		</div>
+		<div class="padding-bottom-10" ng-show="bill.companyAddress">
+			<div class="row-left text-right">企业地址:</div>
+			<div class="row-right" ng-bind="bill.companyAddress"></div>
+		</div>
+		<div class="padding-bottom-10" ng-show="bill.companyTaxNumber">
+			<div class="row-left text-right">税务登记号:</div>
+			<div class="row-right" ng-bind="bill.companyTaxNumber"></div>
+		</div>
+		<div class="padding-bottom-10" ng-show="bill.companyPhone">
+			<div class="row-left text-right">企业电话:</div>
+			<div class="row-right" ng-bind="bill.companyPhone"></div>
+		</div>
+		<div class="padding-bottom-10" ng-show="bill.bankName">
+			<div class="row-left text-right">开户银行:</div>
+			<div class="row-right" ng-bind="bill.bankName"></div>
+		</div>
+		<div class="padding-bottom-10" ng-show="bill.bankAccount">
+			<div class="row-left text-right">开户银行账户:</div>
+			<div class="row-right" ng-bind="bill.bankAccount"></div>
+		</div>
+		<div class="padding-bottom-10" ng-show="bill.attachUrl">
+			<div class="row-left text-right">发票资料:</div>
+			<div class="row-right"><a href="{{bill.attachUrl}}" target="_blank">点击查看</a></div>
+		</div>
 	</div>
 </form>

+ 83 - 10
src/main/webapp/resources/view/admin/modal/manage/ManageSoldOut.html

@@ -1,10 +1,83 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <title>Title</title>
-</head>
-<body>
-
-</body>
-</html>
+<div class="modal-header">
+    <button type="button" class="close" ng-click=""><span >×</span></button>
+</div>
+<div class="modal-body">
+    <div class="title">
+        <h3 class="modal-title">是否下架此产品</h3>
+        <span><em>*</em>此产品已被推荐至店铺首页</span>
+    </div>
+    <div class="row">
+        <div class="col-xs-2">
+            <span>原因:</span>
+        </div>
+        <div class="col-xs-10">
+            <form class="form-horizontal " name="myForm" novalidate>
+                <div class="modal-body" id="body">
+                    <div class="padding-bottom-10">
+                        <div class="row-left text-right">开票抬头:</div>
+                        <div class="row-right" ng-bind="bill.head"></div>
+                    </div>
+                    <div class="padding-bottom-10">
+                        <div class="row-left text-right">发票类型:</div>
+                        <div class="row-right" ng-bind="bill.kind==1206 ? '增值税(普通)发票': '增值税(专用)发票'"></div>
+                    </div>
+                    <div class="padding-bottom-10">
+                        <div class="row-left text-right">收票人:</div>
+                        <div class="row-right" ng-bind="bill.name"></div>
+                    </div>
+                    <div class="padding-bottom-10">
+                        <div class="row-left text-right">收票人电话:</div>
+                        <div class="row-right" ng-bind="bill.telephone"></div>
+                    </div>
+                    <div class="padding-bottom-10">
+                        <div class="row-left text-right">收票人地址:</div>
+                        <div class="row-right auto-br" title="{{address}}" ng-init="address= bill.area+ bill.detailAddress">
+                            <span ng-bind="bill.area"></span>
+                            <span ng-bind="bill.detailAddress"></span>
+                        </div>
+                    </div>
+                    <div class="padding-bottom-10" ng-show="bill.companyAddress">
+                        <div class="row-left text-right">企业地址:</div>
+                        <div class="row-right" ng-bind="bill.companyAddress"></div>
+                    </div>
+                    <div class="padding-bottom-10" ng-show="bill.companyTaxNumber">
+                        <div class="row-left text-right">税务登记号:</div>
+                        <div class="row-right" ng-bind="bill.companyTaxNumber"></div>
+                    </div>
+                    <div class="padding-bottom-10" ng-show="bill.companyPhone">
+                        <div class="row-left text-right">企业电话:</div>
+                        <div class="row-right" ng-bind="bill.companyPhone"></div>
+                    </div>
+                    <div class="padding-bottom-10" ng-show="bill.bankName">
+                        <div class="row-left text-right">开户银行:</div>
+                        <div class="row-right" ng-bind="bill.bankName"></div>
+                    </div>
+                    <div class="padding-bottom-10" ng-show="bill.bankAccount">
+                        <div class="row-left text-right">开户银行账户:</div>
+                        <div class="row-right" ng-bind="bill.bankAccount"></div>
+                    </div>
+                    <div class="padding-bottom-10" ng-show="bill.attachUrl">
+                        <div class="row-left text-right">发票资料:</div>
+                        <div class="row-right"><a href="{{bill.attachUrl}}" target="_blank">点击查看</a></div>
+                    </div>
+                </div>
+            </form>
+        </div>
+    </div>
+    <div class="form-btn">
+        <button class="btn" ng-click="cancelAdd()">取消</button>
+        <button class="btn" type="submit" ng-click="ensureAddAccount()">确定</button>
+    </div>
+</div>
+<style>
+    .modal-header{
+        height:22px;
+        line-height: 22px;
+        background: #2ca3e7;
+    }
+    .modal-header .close {
+        margin-top: -10px;
+        color: #fff;
+        opacity:1;
+    }
+</style>

+ 55 - 9
src/main/webapp/resources/view/admin/product/productManage.html

@@ -50,13 +50,51 @@
                 </div>
                 <div class="form-inline">
                     <div class="form-group form-group-sm">
-                        <label class="control-label">
+                        <label class="control-label" treeview>
                             &nbsp;&nbsp;&nbsp;类目:
-                            <treecontrol class="tree-dark"
-                                         tree-model="treedata"
-                                         on-selection="showSelected(node)">
-                                label: {{node.label}} ({{node.id}})
-                            </treecontrol>
+                            <div class="tree">
+                                <ul>
+                                    <li ng-repeat="address in tree.$data">
+                                        <div>
+                                            <i class="fa fa-fw" ng-class="address.folded?'fa-caret-right':'fa-caret-down'" ng-click="tree.toggleFold(address)"></i>
+                                            <span ng-bind="::address.label" ng-click="tree.toggleFold(address)"></span><em ng-if="address.selectedNum!=0 && address.selectedNum!=address.items.length">({{address.selectedNum}})</em>
+                                            <div class="check-1">
+                                                <label class="check-act" ng-class="{'intermediate': tree.isSemiChecked(address)}">
+                                                    <input type="checkbox" ng-model="address.checked" ng-change="tree.check(address)"  id="{{address.label}}">
+                                                    <label for="{{address.label}}"></label>
+                                                </label>
+                                            </div>
+                                        </div>
+                                        <ul ng-hide="address.folded">
+                                            <li ng-repeat="city in address.items">
+                                                <div>
+                                                    <i ng-if="city.items" class="fa fa-fw" ng-class="city.folded?'fa-caret-right':'fa-caret-down'" ng-click="tree.toggleFold(city)"></i>
+                                                    <span ng-bind="::city.label" ng-click="tree.toggleFold(city)"></span><em ng-if="city.selectedNum!=0 && city.selectedNum!=city.items.length">({{city.selectedNum}})</em>
+                                                    <div class="check-1">
+                                                        <label class="check-act" ng-class="{'intermediate': tree.isSemiChecked(city)}" >
+                                                            <input type="checkbox" ng-model="city.checked" ng-change="tree.check(city)" id="{{city.label}}">
+                                                            <label for="{{city.label}}"></label>
+                                                        </label>
+                                                    </div>
+                                                </div>
+                                                <ul ng-hide="city.folded">
+                                                    <li ng-repeat="area in city.items">
+                                                        <label style="width: 100%;">
+                                                            <span ng-bind="::area.label"></span>
+                                                            <div class="check-1">
+                                                                <label class="check-act">
+                                                                    <input type="checkbox" ng-model="area.checked" ng-change="tree.check(area)" id="{{area.label}}">
+                                                                    <label for="{{area.label}}"></label>
+                                                                </label>
+                                                            </div>
+                                                        </label>
+                                                    </li>
+                                                </ul>
+                                            </li>
+                                        </ul>
+                                    </li>
+                                </ul>
+                            </div>
                         </label>
                     </div>
                     <div class="form-group form-group-sm">
@@ -114,7 +152,7 @@
             </div>
         </div>
         <div class="manage-table">
-           <table class="table">
+           <table class="table" ng-table="manageTableParams">
                <thead>
                <tr>
                    <th width="80">
@@ -146,7 +184,7 @@
                        <button>审核</button>
                        <br/>
                        <button style="margin-left:-1px;">日志</button>
-                       <button>下架</button>
+                       <button ng-click="soldOutProduct()">下架</button>
                    </td>
                    <td>
                        <span>深圳华商龙safdsafda小亲和力</span>
@@ -219,6 +257,15 @@
         font-size: 14px;
         color:#666;
     }
+    .manage-form .form-top .tree{
+        width: 141px;
+        height: 25px;
+        line-height: 25px;
+        overflow: hidden;
+        display: inline-flex;
+        border: 1px solid #d0d0d0;
+        border-radius:3px;
+    }
     .manage-form .form-top label input{
         display: inline-block;
         height:25px;
@@ -258,7 +305,6 @@
     .manage-form .form-bottom button{
         margin:0 18px;
     }
-    .manage-table{}
     .manage-table table{
         table-layout: fixed;
         font-size: 14px;