Browse Source

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

yujia 7 years ago
parent
commit
a9bee73ea5

+ 55 - 19
src/main/java/com/uas/platform/b2c/prod/store/service/impl/StoreInServiceImpl.java

@@ -18,9 +18,9 @@ import com.uas.platform.b2c.core.utils.JacksonUtils;
 import com.uas.platform.b2c.core.utils.UuidUtils;
 import com.uas.platform.b2c.prod.commodity.dao.GoodsDao;
 import com.uas.platform.b2c.prod.commodity.dao.PCBDao;
+import com.uas.platform.b2c.prod.commodity.model.Goods;
 import com.uas.platform.b2c.prod.product.component.dao.ComponentDao;
 import com.uas.platform.b2c.prod.product.component.modal.Component;
-import com.uas.platform.b2c.prod.product.component.modal.ComponentGoods;
 import com.uas.platform.b2c.prod.store.dao.QualificationDao;
 import com.uas.platform.b2c.prod.store.dao.StoreApplyDao;
 import com.uas.platform.b2c.prod.store.dao.StoreBrandInfoDao;
@@ -36,6 +36,7 @@ import com.uas.platform.b2c.prod.store.model.StoreType;
 import com.uas.platform.b2c.prod.store.service.StoreInService;
 import com.uas.platform.b2c.trade.order.dao.PurchaseDao;
 import com.uas.platform.b2c.trade.support.ResultMap;
+import com.uas.platform.b2c.trade.vendor.model.VendorIntroduction;
 import com.uas.platform.core.exception.IllegalOperatorException;
 import com.uas.platform.core.exception.IllegalStatusException;
 import com.uas.platform.core.model.PageInfo;
@@ -112,6 +113,12 @@ public class StoreInServiceImpl implements StoreInService {
 
 	private final PCBDao pcbDao;
 
+    private static final String CODE_FIELD = "code";
+
+    private static final String KIND_FIELD = "kind";
+
+    private static final String BRAND_FIELD = "brand";
+
 	@Autowired
 	public StoreInServiceImpl(StoreInDao storeDao, QualificationDao qualificationDao, GoodsDao goodsDao, ComponentDao componentDao, PurchaseDao purchaseDao, StoreBrandInfoDao brandInfoDao, StoreAdsService adsService, SysConf sysConf, EnterpriseService enterpriseService, SearchHistoryDao searchHistoryDao, SearcherService searcherService, PCBDao pcbDao) {
 		this.storeDao = storeDao;
@@ -722,27 +729,56 @@ public class StoreInServiceImpl implements StoreInService {
 		}
 		// 搜索店铺名称
 		if (!StringUtils.isEmpty(keyword)) {
-            if ("similar".equals(field)) {
-                // 搜索器件、品牌、类目
-                PageParams pageParams = new PageParams();
-                pageParams.setCount(20);
-                pageParams.setPage(1);
-
-                ModelMap map = searcherService.searchComponentGoods(keyword, pageParams, request);
-                List<ComponentGoods> components = (List<ComponentGoods>) map.get("components");
-                Set<String> storeIds = new HashSet<>();
-                for (ComponentGoods componentGood : components) {
-                    if (componentGood.getStoreId() != null) {
-                        storeIds.add(componentGood.getStoreId());
+            PageParams pageParams = new PageParams();
+            pageParams.setCount(20);
+            pageParams.setPage(1);
+            Set<String> storeIds = new HashSet<>();
+            ModelMap map = new ModelMap();
+            switch (field) {
+                // 搜索型号
+                case CODE_FIELD :
+                    map = searcherService.searchComponentGoods(keyword, pageParams, request);
+                    List<Goods> goodsList = (List<Goods>) ((Map) map.get("stock")).get("content");
+                    if (CollectionUtils.isNotEmpty(goodsList)) {
+                        for (Goods goods : goodsList) {
+                            if (goods.getStoreid() != null) {
+                                storeIds.add(goods.getStoreid());
+                            }
+                        }
                     }
-                }
+                    break;
+                case KIND_FIELD :
+                    map = searcherService.getEnterpriseBySearchKind(keyword, pageParams);
+                    List<VendorIntroduction> vendorIntroductions = (List<VendorIntroduction>) ((HashMap) map.get("stock")).get("content");
+                    if (CollectionUtils.isNotEmpty(vendorIntroductions)) {
+                        for (VendorIntroduction vendorIntroduction : vendorIntroductions) {
+                            if (vendorIntroduction.getStoreUuid() != null) {
+                                storeIds.add(vendorIntroduction.getStoreUuid());
+                            }
+                        }
+                    }
+                    break;
+                case BRAND_FIELD :
+                    map = searcherService.getEnterpriseBySearchBrand(keyword, pageParams);
+                    List<VendorIntroduction> vendorIntroductionsByBrand = (List<VendorIntroduction>) ((HashMap) map.get("stock")).get("content");
+                    if (CollectionUtils.isNotEmpty(vendorIntroductionsByBrand)) {
+                        for (VendorIntroduction vendorIntroduction : vendorIntroductionsByBrand) {
+                            if (vendorIntroduction.getStoreUuid() != null) {
+                                storeIds.add(vendorIntroduction.getStoreUuid());
+                            }
+                        }
+                    }
+                    break;
+                default:
+                    nameSimpleEx = PredicateUtils.like("storeName", keyword, true);
+                    break;
+            }
 
-                if (CollectionUtils.isEmpty(storeIds)) {
-                    storeIds.add("");
-                }
-				keywordLogicalEx = PredicateUtils.in("uuid", storeIds, true);
+            if (CollectionUtils.isNotEmpty(storeIds)) {
+                keywordLogicalEx = PredicateUtils.in("uuid", storeIds, true);
             } else {
-                nameSimpleEx = PredicateUtils.like("storeName", keyword, true);
+                storeIds.add("");
+                keywordLogicalEx = PredicateUtils.in("uuid", storeIds, true);
             }
 
 			if (nameSimpleEx != null) {

+ 2 - 2
src/main/java/com/uas/platform/b2c/trade/vendor/service/impl/VendorIntroductionServiceImpl.java

@@ -51,12 +51,12 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
 	/**
 	 * 型号
 	 */
-	private static final String PCMPCODE_EQUAL = "pCmpCode";
+	private static final String PCMPCODE_EQUAL = "code";
 
 	/**
 	 * 品牌
 	 */
-	private static final String PBRANDEN_EQUAL = "pBrandEn";
+	private static final String PBRANDEN_EQUAL = "brand";
 
 	/**
 	 * 根据关键词(非必填)精确匹配来获取供应商资源列表

+ 6 - 2
src/main/webapp/resources/js/usercenter/controllers/forstore/pay_center_ctrl.js

@@ -375,8 +375,12 @@ define(['app/app'], function(app) {
 				var currencyStr = "currencyName=" + $scope.currency;
 				strArray.push(currencyStr);
 			}
-			if ($scope.paytype && $scope.paytype != 'ALL'){
-				var typeStr = "method=" + $scope.paytype;
+			// if ($scope.paytype && $scope.paytype != 'ALL'){
+			// 	var typeStr = "method=" + $scope.paytype;
+			// 	strArray.push(typeStr);
+			// }
+			if ($scope.remitteeType && $scope.remitteeType !== 'ALL') {
+				var typeStr = 'remitteeType=' + $scope.remitteeType;
 				strArray.push(typeStr);
 			}
 			if ($scope.startDate){

+ 4 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/pay_center_ctrl.js

@@ -654,6 +654,10 @@ define(['app/app'], function(app) {
                 var endStr = "toDate=" + $scope.endDate.getTime();
                 strArray.push(endStr);
             }
+            if ($scope.remitteeType && $scope.remitteeType !== 'ALL') {
+                var typeStr = 'remitteeType=' + $scope.remitteeType;
+                strArray.push(typeStr);
+            }
             if (strArray.length != 0){
                 var str = strArray.join("&");
                 url = url + "?" + str;

+ 132 - 0
src/main/webapp/resources/view/common/bankInfoModal.html

@@ -0,0 +1,132 @@
+<style>
+    .margin15 {
+        margin: 0 7px 0 0;
+        font-size: 14px;
+        font-weight: normal;
+        width: 67px;
+    }
+
+    .divinline {
+        display: inline-block;
+    }
+    .modal-header {
+        padding: 15px 18px;
+        border-bottom: 1px solid #ddd;
+    }
+    .divinline .form-control {
+        opacity: 1;
+        width: 241px;
+        border-radius: 0;
+        position:relative;
+    }
+    .divinline .select-down{
+        float:left;
+        width: 241px;
+        max-height:230px;
+        overflow-y: scroll;
+        border-radius: 3px;
+        border:1px solid #5078cb;
+        position:absolute;
+        background: #fff;
+        top:34px;
+        z-index:1000;
+    }
+    .divinline .select-down li{
+        line-height: 32px;
+        padding:6px;
+        padding-left:12px;
+    }
+    .divinline .select-down li:hover{
+        background: #5078cb;
+        color:#fff;
+        cursor:pointer;
+    }
+    .divinline .select-down li.active{
+        background: #5078cb;
+        color:#fff;
+        cursor:pointer;
+    }
+    .modal-content {
+        width: 482px;
+    }
+    .modal-body .form-group .warn-message {
+        color: #f41b1b;
+        font-size: 12px;
+        margin-left: 10px;
+    }
+    .modal-body .remind-message {
+        width: auto;
+        font-size: 12px;
+        position: relative;
+        left: -15px;
+        bottom: 3px;
+    }
+    .modal-footer {
+        text-align: center;
+        border: none;
+        padding-top: 0;
+    }
+    .modal-footer button {
+        margin-right: 10px;
+    }
+</style>
+<div class="modal-header" style="position:relative">
+    <h3 class="modal-title" style="font-weight: 700">{{title}}</h3>
+    <span style="color:#cbcaca;width:10px;height:10px;position:absolute;top:15px;right:15px;"><i class="fa fa-close" style="font-size: 14px;" ng-click="cancel()"></i></span>
+</div>
+<form class="form-horizontal add-bank-account" style="margin-left: 17px;" name="myForm" novalidate>
+    <div class="modal-body">
+        <div class="form-group">
+            <label class="margin15"><b class="text-inverse">*&nbsp;</b>开户银行</label>
+            <div class="divinline" style="position:relative;margin-right:25px;">
+                <!--<select class="form-control select-adder">-->
+                <!--<option>请选择开户银行</option>-->
+                <!--<option value="1">1</option>-->
+                <!--<option value="2">2</option>-->
+                <!--</select>-->
+                <input name="bankname" ng-model="account.bankname" ng-change="checkAccount(1)" autocomplete="off" type="text" class="form-control" placeholder="请选择开户银行" required style="width:216px;border-right:transparent;border-radius:3px 0 0 3px;" ng-keydown="onKeyUp()" ng-focus="getItemFocus()" ng-blur="onItemBlur()">
+                <i class="select-adder" style="display:inline-block;width:25px;height:34px;border:1px solid #ddd;position:absolute;right:-25px;top:0;border-radius:0 3px 3px 0;border-left:transparent" ng-click="showList()"></i>
+                <ul class="select-down" ng-if="showBankFrame && matchData" id="ulContent">
+                    <li ng-click="fitBankToAccount(bank)" ng-repeat="bank in resultList" ng-class="{'active': $index==selectIndex}">{{bank}}</li>
+                </ul>
+            </div>
+            <span class="warn-message" ng-if="account.bankname && !matchData">请填写正确的开户银行</span>
+            <span class="warn-message" ng-if="myForm.bankname.$touched && myForm.bankname.$invalid">开户银行不能为空</span>
+        </div>
+        <div class="form-group">
+            <label class="margin15"><b class="text-inverse">*&nbsp;</b>开户支行</label>
+            <div class="divinline">
+                <input name="branchname" type="text" class="form-control" ng-model="account.branchname" ng-change="checkAccount(2)" autocomplete="off"
+                       placeholder="例如:侨香支行" ng-required="true">
+            </div>
+            <span class="warn-message" ng-if="account.branchname && branchPattError">请填写正确的开户支行</span>
+            <span class="warn-message" ng-if="account.branchname && !branchPattError && branchError">请勿超过20个字</span>
+            <span class="warn-message" ng-if="myForm.branchname.$touched && myForm.branchname.$invalid">开户支行不能为空</span>
+        </div>
+        <div class="form-group">
+            <label class="margin15"><b class="text-inverse">*&nbsp;</b>银行账号</label>
+            <div class="divinline">
+                <input name="number" ng-model="account.number" type="text" class="form-control"
+                       placeholder="请填写银行账号" ng-required="true" ng-change="checkAccount(3)" autocomplete="off">
+            </div>
+            <span class="warn-message" ng-if="account.number && numberPattError">请填写正确的银行账号</span>
+            <span class="warn-message" ng-if="account.number && !numberPattError && numberError">请勿超过30个字符</span>
+            <span class="warn-message" ng-if="account.number && !numberPattError && !numberError && repeatError">该银行账号已存在</span>
+            <span class="warn-message" ng-if="myForm.number.$touched && myForm.number.$invalid">银行账号不能为空</span>
+        </div>
+        <div class="form-group">
+            <label class="margin15"><b class="text-inverse">*&nbsp;</b>开户名称</label>
+            <div class="divinline">
+                <input name="accountname" type="text" class="form-control" ng-model="account.accountname"
+                       placeholder="请填写开户人姓名或企业名称" ng-required="true" ng-change="checkAccount(4)" autocomplete="off">
+            </div>
+            <span class="warn-message" ng-if="account.accountname && nameError">请勿超过50个字</span>
+            <span class="warn-message" ng-if="myForm.accountname.$touched && myForm.accountname.$invalid">开户名称不能为空</span>
+        </div>
+        <label class="remind-message"><b class="text-inverse">*&nbsp;</b>为保障您的资金安全,账户信息加密显示且不可修改,只能删除后重新提交。</label>
+    </div>
+</form>
+<div class="modal-footer">
+    <button class="com-btn-level1 com-btn-cancel" ng-click="cancel()">取消</button>
+    <input type="submit" class="com-btn-submit com-btn-level1" ng-click="confirm()" value="确定" />
+</div>

+ 12 - 12
src/main/webapp/resources/view/prod/modal/edit-invoice-modal.html

@@ -663,18 +663,18 @@
                 </div>
                 <div class="text-inverse error col-md-3" ng-show="form.account.$touched&&(form.account.$invalid)" ng-bind="form.account.$error.required?'请填写开户银行账号':'请填写30位以内的数字'"></div>
             </div>
-            <div class="form-group"  ng-if="invoiceType == 1205">
-                <label class="col-md-2 control-label"><b class="text-inverse">*</b>上传开户许可证:{{form.permissionUpload}}</label>
-                <div class="form-input-line file-line">
-                    <input type="text" name="permission" required class="form-control" ng-model="bill.attachUrl" readonly style="background: #fff">
-                </div>
-                <div class="col-md-1">
-                    <label class="select-file-box">
-                        <span>选择文件</span>
-                        <input class="input-file-default" type="file" ng-file-select ng-model="bill.billInfo" ng-change="onUploadPermission()" ng-multiple="false" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg,application/pdf,*.pdf">
-                    </label></div>
-                <div class="text-inverse error col-md-3" ng-show="isDoUpload&&(form.permission.$error.required)">请勿超过3M</div>
-            </div>
+            <!--<div class="form-group"  ng-if="invoiceType == 1205">-->
+                <!--<label class="col-md-2 control-label"><b class="text-inverse">*</b>上传开户许可证:{{form.permissionUpload}}</label>-->
+                <!--<div class="form-input-line file-line">-->
+                    <!--<input type="text" name="permission" required class="form-control" ng-model="bill.attachUrl" readonly style="background: #fff">-->
+                <!--</div>-->
+                <!--<div class="col-md-1">-->
+                    <!--<label class="select-file-box">-->
+                        <!--<span>选择文件</span>-->
+                        <!--<input class="input-file-default" type="file" ng-file-select ng-model="bill.billInfo" ng-change="onUploadPermission()" ng-multiple="false" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg,application/pdf,*.pdf">-->
+                    <!--</label></div>-->
+                <!--<div class="text-inverse error col-md-3" ng-show="isDoUpload&&(form.permission.$error.required)">请勿超过3M</div>-->
+            <!--</div>-->
             <div class="form-group">
                 <label class="col-md-2 control-label"><b class="text-inverse">*</b>收票人:</label>
                 <div class="form-input-line">

+ 1 - 1
src/main/webapp/resources/view/usercenter/forstore/bomDetail.html

@@ -859,7 +859,7 @@
                                                 <ul class="red-text">
                                                     <li ng-repeat="re in of.replies track by $Rekey">
                                                         <span title="{{re.lapQty}}" ng-if="$Rekey === 0">{{re.lapQty}}+</span>
-                                                        <span title="{{re.lapQty}}" ng-if="$Rekey > 0">{{re.lapQty}}</span>
+                                                        <span title="{{re.lapQty}}" ng-if="$Rekey > 0">{{re.lapQty}}+</span>
                                                         <span title="{{of.currency + re.price | currencyStr}}">{{of.currency + re.price | currencyStr}}</span>
                                                     </li>
                                                 </ul>

+ 2 - 2
src/main/webapp/resources/view/vendor/forstore/vendor-invoice.html

@@ -442,7 +442,7 @@
                                         </div>
                                         <div class="clearboth w100">
                                             <div class="pull-left name">买家: </div>
-                                            <div class="pull-left marginLeft overhidden" title="{{item.submiter.userName}}" style="max-width: 224px">{{item.submiter.userName}}</div>
+                                            <div class="pull-left marginLeft overhidden" title="{{item.submitEnterprise.enName}}&nbsp;&nbsp;|&nbsp;&nbsp;{{item.submiter.userName}}" style="max-width: 224px">{{item.submitEnterprise.enName}}&nbsp;&nbsp;|&nbsp;&nbsp;{{item.submiter.userName}}</div>
                                         </div>
                                         <div class="clearboth w100">
                                             <div class="pull-left name">开票金额: </div>
@@ -616,7 +616,7 @@
                                         </div>
                                         <div class="clearboth w100">
                                             <div class="pull-left name">买家: </div>
-                                            <div class="pull-left marginLeft overhidden" title="{{item.submiter.userName}}" style="max-width: 224px">{{item.submiter.userName}}</div>
+                                            <div class="pull-left marginLeft overhidden" title="{{item.submitEnterprise.enName}}&nbsp;&nbsp;|&nbsp;&nbsp;{{item.submiter.userName}}" style="max-width: 224px">{{item.submitEnterprise.enName}}&nbsp;&nbsp;|&nbsp;&nbsp;{{item.submiter.userName}}</div>
                                         </div>
                                         <div class="clearboth w100">
                                             <div class="pull-left name">开票金额: </div>