فهرست منبع

调整tab样式,去掉部分全部选项

wangcz 7 سال پیش
والد
کامیت
6f096b902b

+ 12 - 7
src/main/webapp/resources/js/usercenter/controllers/forstore/pay_center_ctrl.js

@@ -48,12 +48,16 @@ define(['app/app'], function(app) {
 
 		$scope.paytype = 'ALL';
 
-		// 交易方式
-		$scope.remitteeType = 'ALL';
-
-		// 时间域选择
-		$scope.dateArea = 'ALL';
-
+        var init = function () {
+            // 交易方式
+            $scope.remitteeType = 'PAIDTOPLATFORM';
+
+            // 时间域选择
+            $scope.dateArea = 'oneMonth';
+            var currentTime = _getClearDay(new Date());
+            $scope.startDate = new Date(currentTime - 30 * 24 * 60 * 60 * 1000);
+            $scope.endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+        }
 		/**
 		 * 使用ngTable 获取支付记录信息
 		 */
@@ -162,7 +166,7 @@ define(['app/app'], function(app) {
 			// }
 			$event.preventDefault();
 			$event.stopPropagation();
-			openParam == 0 ? $scope.condition[1].open = false : $scope.condition[0].open = false;
+			openParam == 0 ? $scope.condition[1].open = false : $scope.condition[0].open = falsremitteeTypee;
 			item[openParam].open = !item[openParam].open;
 		};
 
@@ -342,6 +346,7 @@ define(['app/app'], function(app) {
 					break;
 			}
 		};
+		init();
 		loadData();
 
 		$scope.search = function () {

+ 12 - 1
src/main/webapp/resources/js/usercenter/controllers/forstore/seek_purchase_ctrl.js

@@ -693,7 +693,18 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
                 $scope.seekPurchaseTableParams.page(1);
                 $scope.seekPurchaseTableParams.reload();
           };
-
+              var formatDateTime = function (date) {
+                  var y = date.getFullYear();
+                  var m = date.getMonth() + 1;
+                  m = m < 10 ? ('0' + m) : m;
+                  var d = date.getDate();
+                  d = d < 10 ? ('0' + d) : d;
+                  var h = 23;
+                  var minute = 59;
+                  var sec = 59;
+                  //minute = minute < 10 ? ('0' + minute) : minute;
+                  return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + sec;
+              };
           /*获取时间戳代表的天数*/
           $scope.getDay = function (timeStamp) {
             return Math.floor(timeStamp / (1000 * 60 * 60 * 24));

+ 17 - 9
src/main/webapp/resources/js/vendor/controllers/forstore/pay_center_ctrl.js

@@ -24,11 +24,16 @@ define(['app/app'], function(app) {
         $scope.paytype = 'ALL';
         $scope.$$transfer = {};
 
-        // 交易方式
-        $scope.remitteeType = 'ALL';
-
-        // 时间域选择
-        $scope.dateArea = 'ALL';
+        var init = function () {
+            // 交易方式
+            $scope.remitteeType = 'PLATFORMPAIDTOVENDOR';
+
+            // 时间域选择
+            $scope.dateArea = 'oneMonth';
+            var currentTime = _getClearDay(new Date());
+            $scope.startDate = new Date(currentTime - 30 * 24 * 60 * 60 * 1000);
+            $scope.endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+        }
 
         var getTransferMoney = function () {
             bankTransferService.getTotalTransferMoney({}, function (data) {
@@ -63,7 +68,7 @@ define(['app/app'], function(app) {
                     if ($scope.endDate){
                         param.toDate = $scope.endDate.getTime();
                     }
-                    if ($scope.remitteeType && $scope.remitteeType !== 'ALL') {
+                    if ($scope.remitteeType) {
                         param.remitteeType = $scope.remitteeType;
                     }
                     bankTransferService.getVendorBankTransferByMall(param, function (page) {
@@ -147,7 +152,6 @@ define(['app/app'], function(app) {
                 getTradeRecordInfo();
             }
         };
-        loadHistory();
 
         var clearRecordParams = function () {
             $scope.keyword = null;
@@ -181,11 +185,14 @@ define(['app/app'], function(app) {
                 }
             }
             return fmt;
-        }
+        };
 
         var _getClearDay = function (date) {
             return new Date(_formatDate(date, 'yyyy-MM-dd')).getTime() - 8 * 60 * 60 * 1000
-        }
+        };
+
+        init();
+        loadHistory();
 
         $scope.setFilters = function (type, val) {
             $scope[type] = val;
@@ -237,6 +244,7 @@ define(['app/app'], function(app) {
                     break;
             }
         };
+        init();
         loadData();
 
         //切换tab方法

+ 45 - 4
src/main/webapp/resources/js/vendor/controllers/forstore/purchase_offer_ctrl.js

@@ -4,11 +4,51 @@ define(['app/app'], function(app) {
         $rootScope.active = 'vendor_seek_purchase';
         $scope.seekPurchaseRate = {};
         $scope.offer = {};
+        var _formatDate = function (date, fmt) {
+            if (!date) {
+                return null;
+            }
+            if (typeof date === 'string') {
+                date = new Date(Date.parse(date.replace(/-/g, '/')));
+            }
+            var o = {
+                'M+': date.getMonth() + 1, // 月份
+                'd+': date.getDate(), // 日
+                'h+': date.getHours(), // 小时
+                'm+': date.getMinutes(), // 分
+                's+': date.getSeconds(), // 秒
+                'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
+                'S': date.getMilliseconds() // 毫秒
+            }
+            if (/(y+)/.test(fmt)) {
+                fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
+            }
+            for (var k in o) {
+                if (new RegExp('(' + k + ')').test(fmt)) {
+                    fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)));
+                }
+            }
+            return fmt;
+        }
 
-        // 发布时间
-        $scope.dateArea = 'ALL';
-        // 求购时间
-        $scope.dateAreaSeek = 'ALL';
+        var _getClearDay = function (date) {
+            return new Date(_formatDate(date, 'yyyy-MM-dd')).getTime() - 8 * 60 * 60 * 1000
+        }
+
+        var init = function () {
+            // 求购选择
+            $scope.vendorType = 'all';
+            // 发布时间
+            $scope.dateArea = 'sevenDay';
+            // 求购时间
+            $scope.dateAreaSeek = 'sevenDay';
+            var currentTime = _getClearDay(new Date());
+            $scope.startDate = new Date(currentTime - 7 * 24 * 60 * 60 * 1000);
+            $scope.endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+            $scope.startDelivery = new Date(currentTime - 7 * 24 * 60 * 60 * 1000);
+            $scope.endDelivery = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+        }
+        init();
 
       seekPurchase.getSeekUrl({}, function(data) {
         var seekUrl = data.url;
@@ -22,6 +62,7 @@ define(['app/app'], function(app) {
             getData : function ($defer, params) {
                 var param = BaseService.parseParams(params.url());
                 var filter = {};
+                filter.userUU = $scope.vendorType === 'self' ? $scope.userInfo.userUU : null;
                 filter.vendUU = $scope.userInfo.enterprise.uu;
                 // param.enUU = $scope.userInfo.enterprise.uu;
                 // param.deadline = $scope.deadline;

+ 39 - 33
src/main/webapp/resources/js/vendor/controllers/forstore/seek_purchase_ctrl.js

@@ -8,9 +8,45 @@ define(['app/app'], function (app) {
           $rootScope.active = 'vendor_seek_purchase';
           $scope.seekPurchaseRate = {};
           $scope.sayType = 'current'; // 报价类型,current为当前,replace为替代料
+            var _formatDate = function (date, fmt) {
+                if (!date) {
+                    return null;
+                }
+                if (typeof date === 'string') {
+                    date = new Date(Date.parse(date.replace(/-/g, '/')));
+                }
+                var o = {
+                    'M+': date.getMonth() + 1, // 月份
+                    'd+': date.getDate(), // 日
+                    'h+': date.getHours(), // 小时
+                    'm+': date.getMinutes(), // 分
+                    's+': date.getSeconds(), // 秒
+                    'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
+                    'S': date.getMilliseconds() // 毫秒
+                }
+                if (/(y+)/.test(fmt)) {
+                    fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
+                }
+                for (var k in o) {
+                    if (new RegExp('(' + k + ')').test(fmt)) {
+                        fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)));
+                    }
+                }
+                return fmt;
+            }
+
+            var _getClearDay = function (date) {
+                return new Date(_formatDate(date, 'yyyy-MM-dd')).getTime() - 8 * 60 * 60 * 1000
+            }
 
-            // 发布时间
-            $scope.dateArea = 'ALL';
+            var init = function () {
+
+                // 发布时间
+                $scope.dateArea = 'sevenDay';
+                var currentTime = _getClearDay(new Date());
+                $scope.startDate = new Date(currentTime - 7 * 24 * 60 * 60 * 1000);
+                $scope.endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+            }
 
           seekPurchase.getSeekUrl({}, function(data) {
             var seekUrl = data.url;
@@ -26,6 +62,7 @@ define(['app/app'], function (app) {
             };
             $scope.inquiryItem = {};
           }
+          init();
           initInquiryItem();
 
             $scope.setSayType = function (type) {
@@ -278,37 +315,6 @@ define(['app/app'], function (app) {
 
           $scope.condition = {endDateOpen: false, startDateOpen: false};
               // 筛选
-              var _formatDate = function (date, fmt) {
-                  if (!date) {
-                      return null;
-                  }
-                  if (typeof date === 'string') {
-                      date = new Date(Date.parse(date.replace(/-/g, '/')));
-                  }
-                  var o = {
-                      'M+': date.getMonth() + 1, // 月份
-                      'd+': date.getDate(), // 日
-                      'h+': date.getHours(), // 小时
-                      'm+': date.getMinutes(), // 分
-                      's+': date.getSeconds(), // 秒
-                      'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
-                      'S': date.getMilliseconds() // 毫秒
-                  }
-                  if (/(y+)/.test(fmt)) {
-                      fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
-                  }
-                  for (var k in o) {
-                      if (new RegExp('(' + k + ')').test(fmt)) {
-                          fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)));
-                      }
-                  }
-                  return fmt;
-              }
-
-              var _getClearDay = function (date) {
-                  return new Date(_formatDate(date, 'yyyy-MM-dd')).getTime() - 8 * 60 * 60 * 1000
-              }
-
               $scope.setFilters = function (type, val) {
                   $scope[type] = val;
                   if (type == 'dateArea') {

+ 9 - 19
src/main/webapp/resources/view/usercenter/forstore/pay_center.html

@@ -449,7 +449,7 @@
 		margin-right:5px;
 	}
 	.check-filter {
-		height: 80px;
+		height: auto;
 		line-height: 30px;
 		padding-left: 22px;
 		margin-top: 0;
@@ -600,25 +600,20 @@
 			<div class="tab" ng-show="status == 'pay-history'" style="display: inline-block">
 				<!--搜索时间筛选-->
 				<div class="screen check-filter">
-					<div class="radio-block">
+					<div class="radio-block" style="display:block;">
 						交易方式:
 						<label class="com-check-radio">
-							<input type="radio" id="methodAll" name="method" ng-click="setFilters('remitteeType', 'ALL')" ng-checked="remitteeType == 'ALL'">
-							<label for="methodAll"></label>
-							全部
+							<input type="radio" id="forPlatform" name="method" ng-click="setFilters('remitteeType', 'PAIDTOPLATFORM')" ng-checked="remitteeType == 'PAIDTOPLATFORM'">
+							<label for="forPlatform"></label>
+							平台代收
 						</label>
 						<label class="com-check-radio">
 							<input type="radio" id="forSeller" name="method" ng-click="setFilters('remitteeType', 'PAIDTOVENDOR')" ng-checked="remitteeType == 'PAIDTOVENDOR'">
 							<label for="forSeller"></label>
 							卖家收款
 						</label>
-						<label class="com-check-radio">
-							<input type="radio" id="forPlatform" name="method" ng-click="setFilters('remitteeType', 'PAIDTOPLATFORM')" ng-checked="remitteeType == 'PAIDTOPLATFORM'">
-							<label for="forPlatform"></label>
-							平台代收
-						</label>
 					</div>
-					<div class="radio-block">
+					<div class="radio-block" style="display:block;">
 					交易币种:
 					<label class="com-check-radio">
 						<input type="radio" id="currencyAll" name="currency" ng-click="setFilters('currency', 'ALL')" ng-checked="currency == 'ALL'">
@@ -638,25 +633,20 @@
 				</div>
 					<div class="radio-block date-radio">
 						交易时间:
-						<label class="com-check-radio">
-							<input type="radio" id="dateAll" name="date" ng-click="setFilters('dateArea', 'ALL')" ng-checked="dateArea == 'ALL'">
-							<label for="dateAll"></label>
-							全部
-						</label>
 						<label class="com-check-radio">
 							<input type="radio" id="oneMonth" name="date" ng-click="setFilters('dateArea', 'oneMonth')" ng-checked="dateArea == 'oneMonth'">
 							<label for="oneMonth"></label>
-							一个月
+							30天
 						</label>
 						<label class="com-check-radio">
 							<input type="radio" id="threeMonth" name="date" ng-click="setFilters('dateArea', 'threeMonth')" ng-checked="dateArea == 'threeMonth'">
 							<label for="threeMonth"></label>
-							三个月
+							90天
 						</label>
 						<label class="com-check-radio">
 							<input type="radio" id="sixMonth" name="date" ng-click="setFilters('dateArea', 'sixMonth')" ng-checked="dateArea == 'sixMonth'">
 							<label for="sixMonth"></label>
-							六个月
+							180天
 						</label>
 						<label class="com-check-radio">
 							<input type="radio" id="autoMonth" name="date" ng-click="setFilters('dateArea', 'autoMonth')" ng-checked="dateArea == 'autoMonth'">

+ 7 - 16
src/main/webapp/resources/view/vendor/forstore/pay_center.html

@@ -692,42 +692,33 @@
                     <div class="radio-block" style="display: block;">
                         交易方式:
                         <label class="com-check-radio">
-                            <input type="radio" id="methodAll" name="method" ng-click="setFilters('remitteeType', 'ALL')" ng-checked="remitteeType == 'ALL'">
-                            <label for="methodAll"></label>
-                            全部
+                            <input type="radio" id="forPlatform" name="method" ng-click="setFilters('remitteeType', 'PLATFORMPAIDTOVENDOR')" ng-checked="remitteeType == 'PLATFORMPAIDTOVENDOR'">
+                            <label for="forPlatform"></label>
+                            平台代付
                         </label>
                         <label class="com-check-radio">
                             <input type="radio" id="forSeller" name="method" ng-click="setFilters('remitteeType', 'PAIDTOVENDOR')" ng-checked="remitteeType == 'PAIDTOVENDOR'">
                             <label for="forSeller"></label>
                             买家付款
                         </label>
-                        <label class="com-check-radio">
-                            <input type="radio" id="forPlatform" name="method" ng-click="setFilters('remitteeType', 'PLATFORMPAIDTOVENDOR')" ng-checked="remitteeType == 'PLATFORMPAIDTOVENDOR'">
-                            <label for="forPlatform"></label>
-                            平台代付
-                        </label>
+
                     </div>
                     <div class="radio-block date-radio">
                         交易时间:
-                        <label class="com-check-radio">
-                            <input type="radio" id="dateAll" name="date" ng-click="setFilters('dateArea', 'ALL')" ng-checked="dateArea == 'ALL'">
-                            <label for="dateAll"></label>
-                            全部
-                        </label>
                         <label class="com-check-radio">
                             <input type="radio" id="oneMonth" name="date" ng-click="setFilters('dateArea', 'oneMonth')" ng-checked="dateArea == 'oneMonth'">
                             <label for="oneMonth"></label>
-                            一个月
+                            30天
                         </label>
                         <label class="com-check-radio">
                             <input type="radio" id="threeMonth" name="date" ng-click="setFilters('dateArea', 'threeMonth')" ng-checked="dateArea == 'threeMonth'">
                             <label for="threeMonth"></label>
-                            三个月
+                            90天
                         </label>
                         <label class="com-check-radio">
                             <input type="radio" id="sixMonth" name="date" ng-click="setFilters('dateArea', 'sixMonth')" ng-checked="dateArea == 'sixMonth'">
                             <label for="sixMonth"></label>
-                            六个月
+                            180天
                         </label>
                         <label class="com-check-radio">
                             <input type="radio" id="autoMonth" name="date" ng-click="setFilters('dateArea', 'autoMonth')" ng-checked="dateArea == 'autoMonth'">

+ 7 - 22
src/main/webapp/resources/view/vendor/forstore/purchaseOffer.html

@@ -715,13 +715,8 @@
             <!--</div>-->
         <!--</div>-->
         <div class="screen check-filter">
-            <div class="radio-block" style="display: none;">
+            <div class="radio-block" style="display: block;">
                 求购筛选:
-                <label class="com-check-radio">
-                    <input type="radio" id="methodAll" name="method" ng-click="setFilters('vendorType', 'noOppor')" ng-checked="vendorType == 'noOppor'">
-                    <label for="methodAll"></label>
-                    全部
-                </label>
                 <label class="com-check-radio">
                     <input type="radio" id="forSeller" name="method" ng-click="setFilters('vendorType', 'all')" ng-checked="vendorType == 'all'">
                     <label for="forSeller"></label>
@@ -736,25 +731,20 @@
             <div>
                 <div class="radio-block date-radio">
                     发布时间:
-                    <label class="com-check-radio">
-                        <input type="radio" id="dateAll" name="date" ng-click="setFilters('dateArea', 'ALL')" ng-checked="dateArea == 'ALL'">
-                        <label for="dateAll"></label>
-                        全部
-                    </label>
                     <label class="com-check-radio">
                         <input type="radio" id="oneDay" name="date" ng-click="setFilters('dateArea', 'oneDay')" ng-checked="dateArea == 'oneDay'">
                         <label for="oneDay"></label>
-                        1天
+                        1天
                     </label>
                     <label class="com-check-radio">
                         <input type="radio" id="threeDay" name="date" ng-click="setFilters('dateArea', 'threeDay')" ng-checked="dateArea == 'threeDay'">
                         <label for="threeDay"></label>
-                        3天
+                        3天
                     </label>
                     <label class="com-check-radio">
                         <input type="radio" id="sevenDay" name="date" ng-click="setFilters('dateArea', 'sevenDay')" ng-checked="dateArea == 'sevenDay'">
                         <label for="sevenDay"></label>
-                        7天
+                        7天
                     </label>
                     <label class="com-check-radio">
                         <input type="radio" id="autoDay" name="date" ng-click="setFilters('dateArea', 'autoDay')" ng-checked="dateArea == 'autoDay'">
@@ -794,25 +784,20 @@
           <div>
               <div class="radio-block date-radio">
                   报价时间:
-                  <label class="com-check-radio">
-                      <input type="radio" id="dateAllSeek" name="dateSeek" ng-click="setFilters('dateAreaSeek', 'ALL')" ng-checked="dateAreaSeek == 'ALL'">
-                      <label for="dateAllSeek"></label>
-                      全部
-                  </label>
                   <label class="com-check-radio">
                       <input type="radio" id="oneDaySeek" name="dateSeek" ng-click="setFilters('dateAreaSeek', 'oneDay')" ng-checked="dateAreaSeek == 'oneDay'">
                       <label for="oneDaySeek"></label>
-                      1天
+                      1天
                   </label>
                   <label class="com-check-radio">
                       <input type="radio" id="threeDaySeek" name="dateSeek" ng-click="setFilters('dateAreaSeek', 'threeDay')" ng-checked="dateAreaSeek == 'threeDay'">
                       <label for="threeDaySeek"></label>
-                      3天
+                      3天
                   </label>
                   <label class="com-check-radio">
                       <input type="radio" id="sevenDaySeek" name="dateSeek" ng-click="setFilters('dateAreaSeek', 'sevenDay')" ng-checked="dateAreaSeek == 'sevenDay'">
                       <label for="sevenDaySeek"></label>
-                      7天
+                      7天
                   </label>
                   <label class="com-check-radio">
                       <input type="radio" id="autoDaySeek" name="dateSeek" ng-click="setFilters('dateAreaSeek', 'autoDay')" ng-checked="dateAreaSeek == 'autoDay'">

+ 3 - 8
src/main/webapp/resources/view/vendor/forstore/seekPurchase.html

@@ -842,25 +842,20 @@
             </div>
             <div class="radio-block date-radio">
                 发布时间:
-                <label class="com-check-radio">
-                    <input type="radio" id="dateAll" name="date" ng-click="setFilters('dateArea', 'ALL')" ng-checked="dateArea == 'ALL'">
-                    <label for="dateAll"></label>
-                    全部
-                </label>
                 <label class="com-check-radio">
                     <input type="radio" id="oneDay" name="date" ng-click="setFilters('dateArea', 'oneDay')" ng-checked="dateArea == 'oneDay'">
                     <label for="oneDay"></label>
-                    1天
+                    1天
                 </label>
                 <label class="com-check-radio">
                     <input type="radio" id="threeDay" name="date" ng-click="setFilters('dateArea', 'threeDay')" ng-checked="dateArea == 'threeDay'">
                     <label for="threeDay"></label>
-                    3天
+                    3天
                 </label>
                 <label class="com-check-radio">
                     <input type="radio" id="sevenDay" name="date" ng-click="setFilters('dateArea', 'sevenDay')" ng-checked="dateArea == 'sevenDay'">
                     <label for="sevenDay"></label>
-                    7天
+                    7天
                 </label>
                 <label class="com-check-radio">
                     <input type="radio" id="autoDay" name="date" ng-click="setFilters('dateArea', 'autoDay')" ng-checked="dateArea == 'autoDay'">