Преглед изворни кода

Merge branch 'dev-mysql' into feature_release-tomysql

yangc пре 8 година
родитељ
комит
10b7843f83

+ 1 - 1
src/main/java/com/uas/platform/b2c/trade/seek/service/impl/SeekPurchaseBomServiceImpl.java

@@ -553,7 +553,7 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
 
     @Override
     public Map<String, Object> getImportBomInfo(Long bomId) {
-        String sql = "select bom_id,count(bom_id) as successImport,(sum((IF(sp_brand is null,1,0)))+sum((IF(sp_code is null,1,0)))+sum((IF(sp_deadline is null,1,0)))) as nullField "
+        String sql = "select bom_id,count(bom_id) as successImport,(count(sp_brand or sp_code or sp_deadline is null)) as nullField "
                 + "from trade$seek_purchase_by_batch where bom_id = ? group by bom_id";
         try {
             Map<String, Object> map = jdbcTemplate.queryForMap(sql, new Object[]{bomId});

+ 5 - 4
src/main/webapp/resources/js/vendor/controllers/forstore/seek_purchase_ctrl.js

@@ -301,14 +301,15 @@ define(['app/app'], function (app) {
 
           $scope.onLeadtimeInput = function () {
             var time = $scope.inquiryItem.leadtime.toString();
-            if (time.length > 2) {
-              $scope.inquiryItem.leadtime = Number(time.substring(0, 2));
+            console.info();
+            if (time.length > 3) {
+              $scope.inquiryItem.leadtime = Number(time.substring(0, 3));
             }
           }
           $scope.onLeadtimeBlur = function () {
-            if (!$scope.inquiryItem.leadtime || $scope.inquiryItem.leadtime < 1 || $scope.inquiryItem.leadtime > 31 || $scope.inquiryItem.leadtime.toString().indexOf('.') !== -1) {
+            if (!$scope.inquiryItem.leadtime || $scope.inquiryItem.leadtime < 1 || $scope.inquiryItem.leadtime >= 1000 || $scope.inquiryItem.leadtime.toString().indexOf('.') !== -1) {
               $scope.validSayPrice.leadtime = false;
-              toaster.pop('error', '交期只能填写1-31之间的整数值');
+              toaster.pop('error', '交期请填写1-999之间的正整数');
             } else {
               $scope.validSayPrice.leadtime = true;
             }

+ 3 - 3
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialPersonCtrl.js

@@ -2651,7 +2651,9 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 			}
 		}
 		$scope.onBrandChange = function (brand, index) {
-			if ((/[^\x00-\xff]/g).test(brand)) {
+			if (brand && getRealLen(brand) > 50) {
+				$scope.replaceMaterialList[index].ptrBranden = cutOutString(brand, 50);
+			} else if ((/[^\x00-\xff]/g).test(brand)) {
 				var chineseIndex = -1;
 				for (var i = 0; i < brand.length; i++) {
 					if ((/[^\x00-\xff]/g).test(brand.charAt(i)) && !(/[\u4e00-\u9fa5]/).test(brand.charAt(i))) {
@@ -2662,8 +2664,6 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 				if (chineseIndex > -1) {
 					$scope.replaceMaterialList[index].ptrBranden = brand.substring(0, chineseIndex);
 				}
-			} else if (brand && getRealLen(brand) > 50) {
-				$scope.replaceMaterialList[index].ptrBranden = cutOutString(brand, 50);
 			} else {
 				if (!brand) {
 					$scope.setShowSimilarBrandList(false, index);

+ 5 - 33
src/main/webapp/resources/view/vendor/forstore/seekPurchase.html

@@ -207,6 +207,9 @@
         cursor: pointer;
         border-radius: 2px;
     }
+    .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate div.disable{
+        background: #cccbcb;
+    }
     .seek-purchase .seek-purchase-content >table tbody tr.default-row td.operate span {
         margin: 17px 0 0 0;
         color: #39ae05;
@@ -677,39 +680,12 @@
                     <td class="left-time" ng-if="seek.remainingTime == null"><span style="color: red;">-</span></td>
                     <td class="operate">
                         <!--<a ng-click="setLinkBoxIndex($index)">联系买家 <img src="static/img/seekPurchase/link-buyer.png" alt=""></a>-->
-                        <div ng-if="seek.quoted != 1 && seek.remainingTime > 0" ng-click="setSeekActive(seek, true, index)">我要报价</div>
+                        <div ng-if="userInfo.enterprise.uu != seek.inquiry.enUU && seek.quoted != 1 && seek.remainingTime > 0" ng-click="setSeekActive(seek, true, index)">我要报价</div>
+                        <div class="disable" ng-if="userInfo.enterprise.uu == seek.inquiry.enUU && seek.quoted != 1 && seek.remainingTime > 0" ng-disabled="true">我要报价</div>
                         <span ng-if="seek.quoted == 1">已报价 <img src="static/img/seekPurchase/check.png" alt=""></span>
                         <!--<img ng-if="seek.quoted == 1" src="static/img/seekPurchase/recieved.png" alt="">-->
                     </td>
                 </tr>
-                <!--<tr class="say-price">
-                    <td colspan="10">
-                        <div>
-                            <div>报价</div>
-                            <div>
-                                <i>*</i>单价
-                                <select ng-if="!seek.currency" ng-init="offer.currency = 'RMB'" ng-model="offer.currency">
-                                    <option value="RMB">¥</option>
-                                    <option value="USD">$</option>
-                                </select>
-                                <div ng-if="seek.currency == 'RMB'" ng-model="offer.currency">¥</div>
-                                <div ng-if="seek.currency == 'USD'" ng-model="offer.currency">$</div>
-                                <input type="number" class="form-control" ng-blur="onUnitPriceBlur()" ng-change="onUnitPriceChange()" ng-model="offer.unitPrice">
-                            </div>
-                            <div>
-                                <i>*</i>交期&nbsp;
-                                <input type="number" class="form-control" ng-model="offer.minDay" ng-blur="onMinDayInput()" ng-change="onMinDayChange()">&nbsp;-&nbsp;<input type="number" class="form-control" ng-model="offer.maxDay" ng-blur="onMaxDayInput()" ng-change="onMaxDayChange()">&nbsp;天
-                            </div>
-                            <div>
-                                生产日期&nbsp;<input type="text" class="form-control" ng-model="offer.produceDate" ng-change="onProduceDateChange()">
-                            </div>
-                            <div>
-                                <span ng-click="setSeekActive(seek, false)">取消</span>
-                                <span ng-disabled="saveOfferBtn" ng-click="saveOffer(seek)">提交</span>
-                            </div>
-                        </div>
-                    </td>
-                </tr>-->
             </tbody>
         </table>
     </div>
@@ -735,10 +711,6 @@
                 <div class="content-line">
                     <div class="form-item form-left">
                         <span><i>*</i>交期:</span>
-                        <!--
-                        <input type="text" class="form-control" placeholder="天数">
-                        -
-                        -->
                         <input type="number" class="form-control" ng-change="onLeadtimeInput()" ng-blur="onLeadtimeBlur()" ng-model="inquiryItem.leadtime" placeholder="天数">
                     </div>
                     <div class="form-item form-upload">