Просмотр исходного кода

Merge branch 'release-201845-wangcz' of ssh://10.10.101.21/source/platform-b2c into feature-201845-wangcz

hejq 7 лет назад
Родитель
Сommit
00a34fa6d7

+ 11 - 11
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/GoodsServiceImpl.java

@@ -1567,22 +1567,21 @@ public class GoodsServiceImpl implements GoodsService {
         if (resultMap.getCode() != CodeType.OK.code()) {
             return null;
         }
-        GoodsHistory history = goodsHistoryService.converTGoodsHist(nowGoods,
-                OperateType.Update.getPhrase(), false);
-        // 修改上下架状态并产生上下架历史
-        goodsHistoryService.save(history);
+        GoodsHistory history = null;
         if (!nowGoods.getStatus().equals(oldStatus)) {
-            GoodsHistory goodsHistory = null;
             //做上下架判断
             if ((oldStatus.equals(Status.REMOVED.value())) && (nowGoods.getStatus().equals(Status.AVAILABLE.value()) || nowGoods.getStatus().equals(Status.UNAVAILABLE.value()) || nowGoods.getStatus().equals(Status.NO_SHELVE.value()))) {
-                goodsHistory = goodsHistoryService.converTGoodsHist(nowGoods, OperateType.Publish.getPhrase(), false);
+                history = goodsHistoryService.converTGoodsHist(nowGoods, OperateType.Publish.getPhrase(), false);
                 nowGoods.setPublishTime(new Date());
             } else if ((nowGoods.getStatus().equals(Status.REMOVED.value())) && (oldStatus.equals(Status.UNAVAILABLE.value()) || oldStatus.equals(Status.AVAILABLE.value()) || oldStatus.equals(Status.NO_SHELVE.value()))) {
-                goodsHistory = goodsHistoryService.converTGoodsHist(nowGoods, OperateType.Down.getPhrase(), false);
-            }
-            if (null != goodsHistory) {
-                goodsHistoryService.save(goodsHistory);
+                history = goodsHistoryService.converTGoodsHist(nowGoods, OperateType.Down.getPhrase(), false);
             }
+        } else {
+             history = goodsHistoryService.converTGoodsHist(nowGoods,
+                    OperateType.Update.getPhrase(), false);
+        }
+        if (null != history) {
+            goodsHistoryService.save(history);
         }
 
         List<Order> orders = detailService.updateOrderDetailsByGoods(nowGoods);
@@ -3880,9 +3879,10 @@ public class GoodsServiceImpl implements GoodsService {
                 goods.adjustFragmentPrice();
                 Integer status = goods.getStatus();
                 goods.setStatus();
-                if ((Status.AVAILABLE.value() == goods.getStatus()) || (Status.UNAVAILABLE.value() == goods.getStatus() || Status.NO_SHELVE.value() == goods.getStatus()) && (Status.REMOVED.value() == status)) {
+                if ((Status.AVAILABLE.value() == goods.getStatus()) || (Status.UNAVAILABLE.value() == goods.getStatus() || Status.NO_SHELVE.value() == goods.getStatus()) && (Status.REMOVED.value() == status || status == null)) {
                     //如果现在是已上架,原先是未上架或者已下架,则做上架处理。否则做更新处理
                     list.add(goodsHistoryService.converTGoodsHist(goods, GoodsHistory.OperateType.Publish.getPhrase(), false));
+                    goods.setPublishTime(new Date());
                 } else {
                     list.add(goodsHistoryService.converTGoodsHist(goods, GoodsHistory.OperateType.Update.getPhrase(), false));
                 }

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductServiceImpl.java

@@ -2972,7 +2972,7 @@ public class ProductServiceImpl implements ProductService {
                 type = GoodsHistory.OperateType.Publish.getPhrase();
                 goods.setPublishTime(new Date());
             } else {
-                type = GoodsHistory.OperateType.INIT.getPhrase();
+                type = GoodsHistory.OperateType.Update.getPhrase();
             }
         }
         goodsHistory = goodsHistoryService.converTGoodsHist(goods, type, false);

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ReleaseProductByBatchServiceImpl.java

@@ -1930,7 +1930,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 								prids.add(releaseProductByBatch.getProductid());
 								Integer status = g.getStatus();
 								g.updateGoodsByReleaseProductByBatch(releaseProductByBatch, delayTime, ignoreImport);
-								if ((Status.AVAILABLE.value() == g.getStatus() || Status.UNAVAILABLE.value() == g.getStatus() || Status.NO_SHELVE.value() == g.getStatus()) &&  Status.REMOVED.value() == status) {
+								if ((Status.AVAILABLE.value() == g.getStatus() || Status.UNAVAILABLE.value() == g.getStatus() || Status.NO_SHELVE.value() == g.getStatus()) &&  Status.REMOVED.value() == status || status == null) {
 									//如果现在是已上架,原先是未上架或者已下架,则做上架处理。否则做更新处理
 									goodsHistoryList.add(goodsHistoryService.converTGoodsHist(g, GoodsHistory.OperateType.Publish.getPhrase(), false));
 									g.setPublishTime(new Date());

+ 1 - 1
src/main/webapp/resources/js/common/services.js

@@ -160,7 +160,7 @@ define([ 'angular', 'common/utils', 'big'], function(angular, utils, Big) {
                     } else if (this.getRootPath().indexOf('b2c.usoftchina.com') > -1 || this.getRootPath().indexOf('mall.usoftchina.com') > -1) {
                         $rootScope.b2bUrl = 'https://b2b.usoftchina.com'
 					} else {
-                        $rootScope.b2bUrl = 'http://10.1.51.101:8090/platform-b2b'
+                        $rootScope.b2bUrl = 'http://10.1.51.125:8090/platform-b2b/'
 					}
 				}
 				return $rootScope.b2bUrl;

+ 3 - 1
src/main/webapp/resources/js/usercenter/controllers/b2b/fa/arCheck.js

@@ -346,6 +346,8 @@
                               params.total(page.totalElement);
                               $defer.resolve(page.content);
                           }
+                          $scope.infoCommon = page
+                          $scope.infoCommon.all = page.content.length
                           $scope.ALLList = page.content || []
                           $scope.totalCount = page.totalElement;
                       }, function (response) {
@@ -611,7 +613,7 @@
                           data.totalCount = _totalArr
 
                           var _MonthTodoCountArr = []
-                          data.thisMonthTodoCount && list.thisMonthTodoCount.forEach(function(item) {
+                          data.thisMonthTodoCount && data.thisMonthTodoCount.forEach(function(item) {
                               if (item.amount > 0) {
                                   _MonthTodoCountArr.push(item)
                               }

+ 26 - 5
src/main/webapp/resources/js/vendor/controllers/b2b/apCheck.js

@@ -134,6 +134,8 @@ define(['app/app'], function (app) {
                           params.total(page.totalElement);
                           $defer.resolve(page.content);
                       }
+                      $scope.infoCommon = page
+                      $scope.infoCommon.all = page.content.length
                       $scope.ALLList = page.content
                       $scope.totalCount = page.totalElement;
                   }, function (response) {
@@ -409,7 +411,7 @@ define(['app/app'], function (app) {
                       data.totalCount = _totalArr
 
                       var _MonthTodoCountArr = []
-                      data.thisMonthTodoCount && list.thisMonthTodoCount.forEach(function(item) {
+                      data.thisMonthTodoCount && data.thisMonthTodoCount.forEach(function(item) {
                           if (item.amount > 0) {
                               _MonthTodoCountArr.push(item)
                           }
@@ -589,7 +591,8 @@ define(['app/app'], function (app) {
                   taxrate: '',
                   sendcode: '',
                   whname: '',
-                  custUserUU: ''
+                  custUserUU: '',
+                  sourceDate: ''
               };
 
               //应收对账单明细行来源表信息
@@ -655,10 +658,10 @@ define(['app/app'], function (app) {
                   }
 
                   //获取筛选时间的开始时间为对账的开始时间
-                  $scope.apCheck.beginDate = $scope.fromDate;
+                  // $scope.apCheck.beginDate = $scope.fromDate;
 
                   //获取筛选的截止时间为对账的截止时间
-                  $scope.apCheck.endDate = $scope.endDate;
+                  // $scope.apCheck.endDate = $scope.endDate;
 
                   //应收对账单明细行数据
                   $scope.item.orderCode = check.ordercode;
@@ -682,7 +685,7 @@ define(['app/app'], function (app) {
                   $scope.item.sendcode = check.sendcode;
                   $scope.item.whname = check.whname;
                   $scope.item.custUserUU = check.custuseruu;
-
+                  $scope.item.sourceDate = check.pidate
                   //来源表相关信息
                   $scope.sourceInfo.sourceid = check.sourceid;
                   $scope.sourceInfo.sourcetable = check.sourcetable;
@@ -693,7 +696,25 @@ define(['app/app'], function (app) {
                   $scope.haveSelected = true;
               }
           });
+          if ($scope.apCheckCondition.$open) {
+              $scope.fromDate = $scope.apCheckCondition.dateFrom ? $scope.apCheckCondition.dateFrom.getTime() : null;
+              $scope.endDate = $scope.apCheckCondition.dateTo ? $scope.apCheckCondition.dateTo.getTime() : null;
+          } else {
+              var _isShowApcheckList = $scope.thisMouth + '-01'
+              var _time1 = _isShowApcheckList
+              _time1 = _time1.replace(/-/g, '/')
+              var _d = new Date(_time1)
+              _d.setDate(1)
+              _d.setMonth(_d.getMonth() + 1)
+              _d.setDate(_d.getDate() - 1)
 
+              // 获取筛选时间的开始时间为对账的开始时间
+              var _time2 = _isShowApcheckList
+              _time2 = _time2.replace(/-/g, '/')
+              $scope.fromDate = new Date(_time2).getTime()
+              // 获取筛选的截止时间为对账的截止时间
+              $scope.endDate = _d.getTime()
+          }
           //保存生成的应收对账单
           $scope.saveApCheck = function () {
               if ($scope.apCheck.items.length == 0) {

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

@@ -54,6 +54,7 @@ define(['app/app'], function (app) {
           var initInquiryItem = function () {
             $scope.validSayPrice = {
               leadtime: false,
+              taxrate: false,
               repliesPrice: false,
               repliesLapQty: false,
               replaceBrand: false,
@@ -297,6 +298,7 @@ define(['app/app'], function (app) {
                   toaster.pop('success', '感谢您参与报价,敬请期待回复');
                   $scope.isShowSayPriceBox = false;
                   $scope.seekPurchaseTableParams.reload();
+                  initInquiryItem()
                 }, function (response) {
                   toaster.pop('error', '请勿重复报价或报价自己的求购');
                 });
@@ -305,6 +307,7 @@ define(['app/app'], function (app) {
                   toaster.pop('success', '感谢您参与报价,敬请期待回复');
                   $scope.isShowSayPriceBox = false;
                   $scope.seekPurchaseTableParams.reload();
+                  initInquiryItem()
                 }, function (response) {
                   toaster.pop('error', '请勿重复报价或报价自己的求购');
                 });

+ 11 - 8
src/main/webapp/resources/view/sso/staffManagement.html

@@ -940,7 +940,7 @@
                              全选</th>-->
                         <!--<th width="143">UU账号</th>-->
                         <th width="101">姓名</th>
-                        <th width="67">性别</th>
+                        <!--<th width="67">性别</th>-->
                         <th width="133">手机</th>
                         <th width="207">邮箱</th>
                         <th width="188">商城角色</th>
@@ -960,12 +960,12 @@
                         <td>
                             <input type="text" ng-model="newUser.userName" required placeholder="用户名">
                         </td>
-                        <td>
-                            <select ng-model="newUser.userSex" ng-init="newUser.userSex='M'" >
-                                <option value="M">男</option>
-                                <option value="F">女</option>
-                            </select>
-                        </td>
+                        <!--<td>-->
+                            <!--<select ng-model="newUser.userSex" ng-init="newUser.userSex='M'" >-->
+                                <!--<option value="M">男</option>-->
+                                <!--<option value="F">女</option>-->
+                            <!--</select>-->
+                        <!--</td>-->
                         <td ng-class="{'has-error': userTelError, 'has-success': userTelSuccess}">
                             <input ng-model="newUser.userTel"
                                    ng-blur="telValid(newUser.userTel)" required name="newUserTel"
@@ -980,6 +980,9 @@
                         <td class="role-tag-area">
                             <span class="role-tag bgcolor-5">普</span>
                         </td>
+                        <td class="role-tag-area">
+                            <!--<span class="role-tag bgcolor-5">普</span>-->
+                        </td>
                         <td class="submit-area">
                             <span ng-click="setAddingUser(false)" >取消</span>
                             <span ng-click="addUser(newUser)">确定</span>
@@ -994,7 +997,7 @@
                          </td>-->
                         <!--<td>{{user.userUU}}</td>-->
                         <td>{{user.userName}}</td>
-                        <td>{{user.userSex != null ? (user.userSex == 'M' || user.userSex == '男' ? '男' : '女') : '-'}}</td>
+                        <!--<td>{{user.userSex != null ? (user.userSex == 'M' || user.userSex == '男' ? '男' : '女') : '-'}}</td>-->
                         <td>{{user.userTel}}</td>
                         <td>{{user.userEmail}}</td>
                         <td class="role-tag-area detail-role-tag">

+ 6 - 3
src/main/webapp/resources/view/usercenter/b2b/fa/arCheck.html

@@ -771,7 +771,7 @@
           </td>
         </tr>
         </tbody>
-        <tbody ng-if="active === 'all' && (ALLList !== undefined && ALLList.length == 0)">
+        <tbody ng-if="active === 'all' && (ALLList === undefined || ALLList.length == 0)">
         <tr>
           <td colspan="6">
             <div class="empty">
@@ -940,7 +940,7 @@
         <!--</div>-->
         <!--</div>-->
         <!--ng-show="condition.$open">-->
-        <label class="col-sm-2 control-label">税率:</label>
+        <label class="col-sm-2 control-label">税&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;率:</label>
         <div class="col-sm-4">
           <div class="form-group form-group-sm has-feedback">
             <input type="search" class="form-control input-sm"
@@ -1033,10 +1033,13 @@
             <td width="40">{{::check.orderprice}}</td>
             <td width="40" align="center">{{::check.taxrate}}</td>
             <td width="70">{{::(check.orderprice || 0)*(check.thischeckqty || 0) | number:2}}</td>
-            <td width="100">
+            <td width="100" ng-if="check.haveChecked === 1">
               <div>{{::check.recorder || '-'}}</div>
               <div>{{::check.apCheckDate | date:'yyyy年MM月dd日'  || '-'}}</div>
             </td>
+            <td width="100" ng-if="check.haveChecked !== 1">
+              未对账
+            </td>
           </tr>
           <tr ng-if="!data || data.length==0">
             <td colspan="11">

+ 3 - 3
src/main/webapp/resources/view/vendor/b2b/apCheck.html

@@ -771,7 +771,7 @@
           </td>
         </tr>
         </tbody>
-        <tbody ng-if="active === 'all' && (ALLList !== undefined && ALLList.length == 0)">
+        <tbody ng-if="active === 'all' && (ALLList === undefined || ALLList.length == 0)">
           <tr>
             <td colspan="6">
               <div class="empty">
@@ -922,7 +922,7 @@
                   ng-class="{'fa-angle-up': condition.$open, 'fa-angle-down': !condition.$open}"></i></a>
           <div class="btn-group btn-group-sm">
             <a class="btn btn-default" ng-click="searchOrder()" title="筛选"><i class="fa fa-search fa-fw btn-icon-left"></i>筛选</a>
-            <a class="btn btn-default" ng-click="createApCheck(check.$selected)" ng-disabled="!data || data.length==0"><i class="fa fa-check-circle-o fa-fw btn-icon-left"></i>对账</a>
+            <a class="btn btn-default" ng-click="createApCheck(check.$selected)" ng-disabled="!data || data.length==0"><i class="fa fa-check-circle-o fa-fw btn-icon-left"></i>确认</a>
             <a class="btn btn-default" ng-click="exportApcheckList()" title="导出Excel" ng-disabled="!data || data.length==0"><i class="fa fa-file-text fa-fw btn-icon-left"></i>导出</a>
           </div>
         </div>
@@ -939,7 +939,7 @@
           <!--</div>-->
         <!--</div>-->
         <!--ng-show="condition.$open">-->
-        <label class="col-sm-2 control-label">税率:</label>
+        <label class="col-sm-2 control-label">税&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;率:</label>
         <div class="col-sm-4">
           <div class="form-group form-group-sm has-feedback">
             <input type="search" class="form-control input-sm"

+ 15 - 10
src/main/webapp/resources/view/vendor/b2b/apCheck_detail.html

@@ -191,6 +191,11 @@
       <!-- <a ng-click="print(order)" class="pull-right text-simple"><i
       class="fa fa-print fa-fw"></i>打印</a> -->
     </div>
+    <div class="btn-group btn-group-sm"  style="float: right;font-size: 14px;cursor: pointer;text-align: right;height: 40px;line-height: 40px; margin-right: 20px;;color: #fff;" ui-sref="fa_apCheck">
+      <img src="static/img/vendor/images/backIcon.png" width="20"/>返回
+      <!--<b class="new-dot" ng-if="unread.cancelled > 0">{{unread.cancelled > 99 ? '99+' : unread.cancelled}}</b>-->
+
+    </div>
   </div>
   <div class="pane-body">
     <div class="bottomB">
@@ -202,10 +207,10 @@
         <span class="title">客户名称</span>
         <div class="content" ng-bind="::data.custName"></div>
       </div>
-      <div class="col-xs-6">
-        <span class="title">应付供应商</span>
-        <div class="content" ng-bind="::data.items[0].receiveName"></div>
-      </div>
+      <!--<div class="col-xs-6">-->
+        <!--<span class="title">应付供应商</span>-->
+        <!--<div class="content" ng-bind="::data.items[0].receiveName"></div>-->
+      <!--</div>-->
     </div>
     <div class="row row-sm item">
       <div class="col-xs-6">
@@ -279,10 +284,10 @@
         <tr class="header">
           <th width="40">采购单号</th>
           <th width="100">验收单</th>
-          <th width="30" style="padding:8px 0;">行号</th>
+          <!--<th width="30" style="padding:8px 0;">行号</th>-->
           <th width="120">商品</th>
-          <th>采购序号</th>
-          <th>验收单序号</th>
+          <!--<th>采购序号</th>-->
+          <!--<th>验收单序号</th>-->
           <th>单价</th>
           <!--<th width="80">单据类型</th>-->
           <th>税率</th>
@@ -295,13 +300,13 @@
         <tr>
           <td ng-bind="item.orderCode"></td>
           <td ng-bind="item.inoutno"></td>
-          <td ng-bind="item.number" style="padding:8px 0;"></td>
+          <!--<td ng-bind="item.number" style="padding:8px 0;"></td>-->
           <td style="max-width: 250px;" class="text-left">
             <div>编号: <span ng-bind="item.prodCode"></span></div>
             <div>规格: <span ng-bind="item.prodSpec"></span></div>
           </td>
-          <td ng-bind="item.orderDetno"></td>
-          <td ng-bind="item.inoutnodetno"></td>
+          <!--<td ng-bind="item.orderDetno"></td>-->
+          <!--<td ng-bind="item.inoutnodetno"></td>-->
           <!--<td ng-bind="item.orderClass"></td>-->
           <td ng-bind="isUser?'-':item.price"></td>
           <td ng-bind="item.taxrate"></td>