Browse Source

Merge remote-tracking branch 'origin/release-201824-wangcz' into release-201824-wangcz

yujia 7 years ago
parent
commit
cc04181e04

+ 2 - 2
src/main/java/com/uas/platform/b2c/common/search/rpc/service/Impl/SearchServiceImpl.java

@@ -357,9 +357,9 @@ public class SearchServiceImpl implements SearchService{
                 resultCmp = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.SIMILAR_PRODUCTS_STORETYPE_URL, String.class, map);
                 resultCmp = resultCmp.replaceAll("pr_pcmpcode","code");
                 resultBrand = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.SIMILAR_BRAND_STORETYPE_URL, String.class, map);
-                resultBrand = resultBrand.replaceAll("br_name_en_untokenized","brand");
+                resultBrand = resultBrand.replaceAll("br_name_en_untokenized","nameEn");
                 resultKind = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.SIMILAR_KIND_STORETYPE_URL, String.class, map);
-                resultKind = resultKind.replaceAll("ki_name_cn","kind");
+                resultKind = resultKind.replaceAll("ki_name_cn","nameCn");
                 break;
             default:
                 result = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.SIMILAR_KEYWORD_URL, String.class, map);

+ 51 - 10
src/main/webapp/resources/js/admin/controllers/checkMoney/SettlementCtrl.js

@@ -133,15 +133,45 @@ define(['app/app'], function(app) {
 
 		//平台应付账号
 		var getAdminAccount = function() {
-			bankInfoService.getAdminEnterAccount('', function(data) {
-				$scope.b2cAccountInfos = resolveData(data);
-				angular.forEach($scope.b2cAccountInfos, function(b2cAccountInfos) {
-					b2cAccountInfos.filterAccount = b2cAccountInfos.number;
-				});
-				$scope.b2cAccount = getOriginalData($scope.b2cAccountInfos);
-			}, function(res) {
-				toaster.pop('error', '错误', '获取卖家信息失败');
-			});
+			// bankInfoService.getBuyPersonalBank({count: 1000, page: 1, sorting: {"num":"ASC"},type: 'buyer'}, function(data) {
+			// 	$scope.b2cAccountInfos = data;
+			// 	console.log($scope.b2cAccountInfos)
+			// 	angular.forEach($scope.b2cAccountInfos.content, function(b2cAccountInfos) {
+			// 		b2cAccountInfos.filterAccount = b2cAccountInfos.number;
+			// 	});
+			// 	// $scope.b2cAccount = getOriginalData($scope.b2cAccountInfos);
+       //  $scope.b2cAccount = $scope.b2cAccountInfos.content[0]
+			// 	console.log($scope.b2cAccount)
+			// }, function(res) {
+			// 	toaster.pop('error', '错误', '获取卖家信息失败');
+			// });
+      $scope.bankInfoTableParams = new ngTableParams({
+        page : 1,
+        count : 5,
+        sorting : {
+          num : 'ASC'
+        }
+      },{
+        total : 0,
+        getData : function ($defer, params) {
+          var param = BaseService.parseParams(params.url());
+          param.type = 'buyer'
+          bankInfoService.getBuyPersonalBank(param, {}, function(data) {
+            $scope.accounts = data.content;
+            angular.forEach($scope.accounts, function(account) {
+              account.filterAccount = hideBankFilter(account.number);
+              if (account.num === 1) {
+                $scope.b2cAccount = account
+              }
+            })
+            $scope.totalElements = data.totalElements;
+            params.total(data.totalElements);
+            $defer.resolve(data.content);
+          }, function(response) {
+            toaster.pop('error', '获取账户信息失败 '+ response.data);
+          })
+        }
+      });
 		};
 		getAdminAccount();
 
@@ -214,8 +244,9 @@ define(['app/app'], function(app) {
 			});
 
 			modalInstance.result.then(function(account) {
+        account.accountType = 'PAY_TYPE'
 				//企业账户
-				bankInfoService.saveAdminEnteAccount({}, account, function(data) {
+				bankInfoService.saveBuyPersonalBank({}, account, function(data) {
 					toaster.pop('success', '保存成功','信息已保存');
 					$scope.kind = account.kind;
 					getAdminAccount();
@@ -240,6 +271,16 @@ define(['app/app'], function(app) {
 			}
 		};
 
+    $scope.setDefaultAccount = function(id) {
+    	// var id = account.id
+      bankInfoService.setDefaultAccount({id : id}, function() {
+        toaster.pop('success', '设置成功');
+        getAdminAccount();
+      }, function(response) {
+        toaster.pop('error', '设置默认账户失败');
+      })
+    }
+
 		//expose代表展开的状态,isBuyd代表当前操作的数据
 		$scope.doExpose = function(expose, isVender) {
 			if(isVender) {

+ 1 - 1
src/main/webapp/resources/js/admin/controllers/checkMoney/creditCardAdminCtrl.js

@@ -51,7 +51,7 @@ define(['app/app'], function(app) {
                 var param = BaseService.parseParams(params.url());
                 bankInfoService[getState()](param, {}, function(data) {
                     $scope.accounts = data.content;
-                    angular.forEach($scope.accounts.content, function(account) {
+                    angular.forEach($scope.accounts, function(account) {
                         account.filterAccount = hideBankFilter(account.number);
                     })
 

+ 67 - 63
src/main/webapp/resources/js/usercenter/controllers/forstore/seek_purchase_ctrl.js

@@ -18,6 +18,37 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
           }
           $rootScope.ShaRETimer = {}
 
+            // 筛选
+            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
+            }
           var clearSeekStatus = function () {
             // if ($scope.seekListData) {}
             angular.forEach($scope.seekListData.content, function (item) {
@@ -32,23 +63,50 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
             }
 
           // 发布时间
-          $scope.dateArea = 'ALL';
+          $scope.dateArea = 'sevenDay';
 
           // 更换待报价状态
-          $scope.vendorType = 'all'
+          $scope.vendorType = 'self'
           $scope.onVendorTypeChange = function () {
             $scope.keyword = '';
-            $scope.startDate = null;
-            $scope.endDate = null;
             $scope.seekPurchaseTableParams.page(1);
             $scope.seekPurchaseTableParams.reload();
           }
+            $scope.setFilters = function (type, val, flag) {
+                $scope[type] = val;
+                if (type == 'dateArea') {
+                    // 时间筛选
+                    var currentTime = _getClearDay(new Date());
+                    var endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+                    if (val == 'ALL' || val == 'autoDay') {
+                        $scope.startDate = null;
+                        $scope.endDate = null;
+                    } else if (val == 'oneDay') {
+                        $scope.startDate = new Date(currentTime - 24 * 60 * 60 * 1000);
+                        $scope.endDate = endDate;
+                    } else if (val == 'threeDay') {
+                        $scope.startDate = new Date(currentTime - 3 * 24 * 60 * 60 * 1000);
+                        $scope.endDate = endDate;
+                    } else if (val == 'sevenDay') {
+                        $scope.startDate = new Date(currentTime - 7 * 24 * 60 * 60 * 1000);
+                        $scope.endDate = endDate;
+                    } else {
+                        $scope.startDate = null;
+                        $scope.endDate = null;
+                    }
+                }
+                if (flag) return
+                $scope.seekPurchaseTableParams.page(1);
+                $scope.seekPurchaseTableParams.reload();
+            }
+            $scope.setFilters('dateArea', 'sevenDay', '1')
+
           seekPurchase.getSeekUrl({}, function(data) {
             var seekUrl = data.url;
             //   var seekUrl = 'http://10.1.51.82:24002';
             /*$scope.tab = 'waitOffer';*/
             $scope.toogleTab = function (tab) {
-              $scope.vendorType = 'all'
+              $scope.vendorType = 'self'
                 $scope.tab = tab;
               $scope.seekPurchaseTableParams = new ngTableParams({
                 page: 1,
@@ -77,7 +135,7 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
                         ? $scope.startDate.getTime() : null;
                     param.endDate = $scope.endDate ? $scope.endDate.getTime()
                         : null;
-                    param.overdue = $scope.vendorType === 'all' ? '' : ($scope.vendorType === 'self' ? '0' : '1')
+                    param.overdue = $scope.vendorType === 'self' ? '0' : '1'
                     $http({
                       method: 'get',
                       dataType: 'json',
@@ -110,7 +168,7 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
                         ? $scope.startDate.getTime() : null;
                     param.endDate = $scope.endDate ? $scope.endDate.getTime()
                         : null;
-                    param.overdue = $scope.vendorType === 'all' ? '' : ($scope.vendorType === 'self' ? '0' : '1')
+                    param.overdue =$scope.vendorType === 'self' ? '0' : '1'
                     $http({
                       method: 'get',
                       dataType: 'json',
@@ -543,6 +601,7 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
           }
           // 采纳报价
           $scope.adopt = function (of) {
+            $scope.showCurrentRefuseOffer = false;
             $http({
                 headers:{
                     'content-Type':'application/x-www-form-urlencoded'
@@ -1162,63 +1221,8 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
             })
           }
           });
-            // 筛选
-            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') {
-                    // 时间筛选
-                    var currentTime = _getClearDay(new Date());
-                    var endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
-                    if (val == 'ALL' || val == 'autoDay') {
-                        $scope.startDate = null;
-                        $scope.endDate = null;
-                    } else if (val == 'oneDay') {
-                        $scope.startDate = new Date(currentTime - 24 * 60 * 60 * 1000);
-                        $scope.endDate = endDate;
-                    } else if (val == 'threeDay') {
-                        $scope.startDate = new Date(currentTime - 3 * 24 * 60 * 60 * 1000);
-                        $scope.endDate = endDate;
-                    } else if (val == 'sevenDay') {
-                        $scope.startDate = new Date(currentTime - 7 * 24 * 60 * 60 * 1000);
-                        $scope.endDate = endDate;
-                    } else {
-                        $scope.startDate = null;
-                        $scope.endDate = null;
-                    }
-                }
-                $scope.seekPurchaseTableParams.page(1);
-                $scope.seekPurchaseTableParams.reload();
-            }
+
         }]);
 });

+ 71 - 48
src/main/webapp/resources/view/admin/checkMoney/Settlement.html

@@ -189,59 +189,82 @@
 					<div class="row-fluid ">
 						<span class="minTitle span10">平台应付账户</span>
 					</div>
-					<div class="row-fluid">
+					<div class="row-fluid" style="margin: 15px 0">
 						<div role="button" class="span2"
-							 ng-click="newAccount()" style="color: #2fa4e7; font-size: 14px;position: relative; top: 15px; z-index: 20; width: 200px;">
+							 ng-click="newAccount()" style="color: #2fa4e7; font-size: 14px;z-index: 20; width: 200px;">
 							<i class="fa fa-plus-square"></i>&nbsp;新增账户
 						</div>
 					</div>
 					<div class="count-list01">
-						<div class="row-fluid " ng-repeat="b2cAccountInfo in b2cAccountInfos" ng-if="salexpose">
-							<div class="com-open col-md-12">
-								<div class="pull-right" ng-show="$index == 0">
-								<span role="button" ng-if="!salexpose"
-									  ng-click="doExpose(true, false)"><i
-										class="fa fa-angle-double-down"></i>&nbsp;展开列表</span> <span
-										role="button" ng-if="salexpose"
-										ng-click="doExpose(false, false)"><i
-										class="fa fa-angle-double-up"></i>&nbsp;收起列表</span>
-								</div>
-							</div>
-							<div class="col-md-12" ng-class="{true : 'select', false: 'diselect'}[b2cAccountInfo.id == b2cAccount.id]">
-								<div class="row-fluid" ng-click="select(b2cAccountInfo)" >
-									<span ng-bind="b2cAccountInfo.accountname" class="name"></span>
-									<span ng-bind="b2cAccountInfo.filterAccount"></span>
-									<span ng-bind="b2cAccountInfo.bankname">&nbsp;&nbsp;<i class="fa fa-credit-card"></i></span>
-									<span class="fr">
-										<span role="button" ng-click="newAccount(b2cAccountInfo)" class="edit"><i class="fa fa-edit"></i>&nbsp;编辑</span>&nbsp;
-										<span role="button" ng-click="deleteAccount(b2cAccountInfo)" class="delete"><i class="fa fa-remove"></i>&nbsp;删除</span>
-									</span>
-								</div>
-							</div>
-						</div>
-						<div class="row-fluid" ng-if="!salexpose">
-							<div class="com-open col-md-12">
-								<div class="pull-right">
-								<span role="button" ng-if="!salexpose"
-									  ng-click="doExpose(true, false)"><i
-										class="fa fa-angle-double-down"></i>&nbsp;展开列表</span> <span
-										role="button" ng-if="salexpose"
-										ng-click="doExpose(false, false)"><i
-										class="fa fa-angle-double-up"></i>&nbsp;收起列表</span>
-								</div>
-							</div>
-							<div class="col-md-12" ng-class="{true : 'select', false: 'diselect'}[b2cAccount.id == b2cAccount.id]" >
-								<div class="row-fluid">
-									<span ng-bind="b2cAccount.accountname" class="name"></span>
-									<span ng-bind="b2cAccount.filterAccount"></span>
-									<span ng-bind="b2cAccount.bankname"><i class="fa fa-credit-card"></i></span>
-									<span class="fr">
-										<span role="button" ng-click="newAccount(b2cAccount)" class="edit"><i class="fa fa-edit"></i>&nbsp;编辑</span>&nbsp;
-										<span role="button" ng-click="deleteAccount(b2cAccount)" class="delete"><i class="fa fa-remove"></i>&nbsp;删除</span>
-									</span>
-								</div>
-							</div>
-						</div>
+						<table ng-table="bankInfoTableParams" class="table table-bordered table-striped text-center" style="margin-top: 10px;">
+							<thead  class="text-center">
+							<tr>
+								<th width="240px">开户人</th>
+								<th width="240px">开户行</th>
+								<th width="240px">银行账号</th>
+								<th width="300px">操作</th>
+							</tr>
+							</thead>
+							<tbody>
+							<tr ng-repeat="account in accounts" class="text-center">
+								<td ng-bind="account.accountname"></td>
+								<td ng-bind="account.bankname"></td>
+								<td ng-bind="account.filterAccount"></td>
+								<td>
+									<button class="btn btn-default" ng-click="deleteAccount(account)">删除</button>
+									<button class="btn btn-default" ng-click="newAccount(account)">修改</button>
+									<button ng-if="account.num !=1" class="btn btn-default" ng-click="setDefaultAccount(account.id)">设为默认账户</button>
+								</td>
+							</tr>
+							</tbody>
+						</table>
+						<!--<div class="row-fluid " ng-repeat="b2cAccountInfo in b2cAccountInfos.content" ng-if="salexpose">-->
+							<!--<div class="com-open col-md-12">-->
+								<!--<div class="pull-right" ng-show="$index == 0">-->
+								<!--<span role="button" ng-if="!salexpose"-->
+									  <!--ng-click="doExpose(true, false)"><i-->
+										<!--class="fa fa-angle-double-down"></i>&nbsp;展开列表</span> <span-->
+										<!--role="button" ng-if="salexpose"-->
+										<!--ng-click="doExpose(false, false)"><i-->
+										<!--class="fa fa-angle-double-up"></i>&nbsp;收起列表</span>-->
+								<!--</div>-->
+							<!--</div>-->
+							<!--<div class="col-md-12" ng-class="{true : 'select', false: 'diselect'}[b2cAccountInfo.id == b2cAccount.id]">-->
+								<!--<div class="row-fluid" ng-click="select(b2cAccountInfo)" >-->
+									<!--<span ng-bind="b2cAccountInfo.accountname" class="name"></span>-->
+									<!--<span ng-bind="b2cAccountInfo.filterAccount"></span>-->
+									<!--<span ng-bind="b2cAccountInfo.bankname">&nbsp;&nbsp;<i class="fa fa-credit-card"></i></span>-->
+									<!--<span class="fr">-->
+										<!--<span role="button" ng-click="setDefaultAccount(b2cAccountInfo)" class="edit" ng-if="$index !== 0">&nbsp;设为默认</span>&nbsp;-->
+										<!--<span role="button" ng-click="newAccount(b2cAccountInfo)" class="edit"><i class="fa fa-edit"></i>&nbsp;编辑</span>&nbsp;-->
+										<!--<span role="button" ng-click="deleteAccount(b2cAccountInfo)" class="delete"><i class="fa fa-remove"></i>&nbsp;删除</span>-->
+									<!--</span>-->
+								<!--</div>-->
+							<!--</div>-->
+						<!--</div>-->
+						<!--<div class="row-fluid" ng-if="!salexpose">-->
+							<!--<div class="com-open col-md-12">-->
+								<!--<div class="pull-right">-->
+								<!--<span role="button" ng-if="!salexpose"-->
+									  <!--ng-click="doExpose(true, false)"><i-->
+										<!--class="fa fa-angle-double-down"></i>&nbsp;展开列表</span> <span-->
+										<!--role="button" ng-if="salexpose"-->
+										<!--ng-click="doExpose(false, false)"><i-->
+										<!--class="fa fa-angle-double-up"></i>&nbsp;收起列表</span>-->
+								<!--</div>-->
+							<!--</div>-->
+							<!--<div class="col-md-12" ng-class="{true : 'select', false: 'diselect'}[b2cAccount.id == b2cAccount.id]" >-->
+								<!--<div class="row-fluid">-->
+									<!--<span ng-bind="b2cAccount.accountname" class="name"></span>-->
+									<!--<span ng-bind="b2cAccount.filterAccount"></span>-->
+									<!--<span ng-bind="b2cAccount.bankname"><i class="fa fa-credit-card"></i></span>-->
+									<!--<span class="fr">-->
+										<!--<span role="button" ng-click="newAccount(b2cAccount)" class="edit"><i class="fa fa-edit"></i>&nbsp;编辑</span>&nbsp;-->
+										<!--<span role="button" ng-click="deleteAccount(b2cAccount)" class="delete"><i class="fa fa-remove"></i>&nbsp;删除</span>-->
+									<!--</span>-->
+								<!--</div>-->
+							<!--</div>-->
+						<!--</div>-->
 					</div>
 					<label class="minTitle marginTop30">供应商应收账户</label>
 					<div class="count-list01">

+ 3 - 13
src/main/webapp/resources/view/usercenter/forstore/seekPurchase.html

@@ -1098,11 +1098,6 @@
         <div class="screen check-filter">
             <div class="radio-block" ng-show="tab == 'waitOffer'" style="display: block;">
                 求购筛选:
-                <label class="com-check-radio">
-                    <input type="radio" id="methodAll" name="method" ng-click="setFilters('vendorType', 'all')" ng-checked="vendorType == 'all'">
-                    <label for="methodAll"></label>
-                    全部
-                </label>
                 <label class="com-check-radio">
                     <input type="radio" id="forSeller" name="method" ng-click="setFilters('vendorType', 'self')" ng-checked="vendorType == 'self'">
                     <label for="forSeller"></label>
@@ -1116,25 +1111,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'">