Browse Source

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

wangcz 7 years ago
parent
commit
08a9eb1b41

+ 1 - 5
src/main/java/com/uas/platform/b2c/core/config/MicroServicesConf.java

@@ -77,11 +77,7 @@ public class MicroServicesConf {
 	}
 
 	public String getRequestUrlForNews(String requestUrl) {
-		if ("prod".equals(profile)){
-			return String.format("http://%s%s", this.newsMicroServiceIp, requestUrl);
-		}else {
-			return String.format("http://%s:%d%s", this.microServiceIp, 80, requestUrl);
-		}
+		return String.format("http://%s%s", this.newsMicroServiceIp, requestUrl);
 	}
 
 	public String getRequestUrlForFloor(int port, String requestUrl) {

+ 55 - 1
src/main/webapp/resources/js/vendor/controllers/b2b/apCheck.js

@@ -92,6 +92,22 @@ define(['app/app'], function (app) {
 
                   FaApCheck.customer(BaseService.parseParams(pageParams), function (page) {
                       $scope.loading = false;
+                      page.content.forEach(function(list) {
+                          var _l = []
+                          list.thisMonthCount && list.thisMonthCount.forEach(function(count) {
+                              if (count.amount > 0) {
+                                  _l.push(count)
+                              }
+                          })
+                          list.thisMonthCount = _l
+                          var _k = []
+                          list.totalCount && list.totalCount.forEach(function(count) {
+                              if (count.amount > 0) {
+                                  _k.push(count)
+                              }
+                          })
+                          list.totalCount = _k
+                      })
                       if (page) {
                           params.total(page.totalElement);
                           $defer.resolve(page.content);
@@ -385,7 +401,7 @@ define(['app/app'], function (app) {
 
       $scope.exportApcheckList = function() {
           var url = 'sale/apCheck/xls?1=1';
-          if (angular.isDefined($scope.fromDate) && angular.isDefined($scope.endDate)) {
+          if (null !== $scope.fromDate && null !== $scope.endDate) {
               url = url + '&fromDate=' + $scope.fromDate + '&endDate=' + $scope.endDate;
           }
           if (angular.isDefined($scope.thisMouth)) {
@@ -646,6 +662,8 @@ define(['app/app'], function (app) {
       }
 
       // 新增
+      $scope.MouthOutShow = true
+      $scope.MouthinShow = true
       $scope.apCheckCondition = {
           $open: false
       }
@@ -658,16 +676,28 @@ define(['app/app'], function (app) {
           }
       };
       $scope.addMouth = function(val) {
+          var _sp = new Date().getMonth() + 1
           var _time = new Date($scope.thisMouth)
           _time.setMonth(_time.getMonth() + val)
+          if (_time.getMonth() + 1 >= Number(_sp)) {
+              $scope.MouthinShow = false
+          } else {
+              $scope.MouthinShow = true
+          }
           $scope.thisMouth = _time.getFullYear() + '-' + (_time.getMonth() + 1)
           $scope.apCheckCondition.$open = false
           this.searchOrder()
       }
 
       $scope.addMouthOut = function(val) {
+          var _sp = new Date().getMonth() + 1
           var _time = new Date($scope.thisMouthOut)
           _time.setMonth(_time.getMonth() + val)
+          if (_time.getMonth() + 1 >= Number(_sp)) {
+              $scope.MouthOutShow = false
+          } else {
+              $scope.MouthOutShow = true
+          }
           $scope.thisMouthOut = _time.getFullYear() + '-' + (_time.getMonth() + 1)
           $scope.tableParams.page(1);
           $scope.tableParams.reload();
@@ -678,12 +708,36 @@ define(['app/app'], function (app) {
       }
 
       $scope.$watch('thisMouthOut', function(newVal, oldVal) {
+          var _fromDate = new Date()
+          var _d = new Date(_fromDate)
+          _d.setDate(1)
+          _d.setMonth(_d.getMonth() + 1)
+          _d.setDate(_d.getDate() - 1)
+
+          var _time2 = new Date(newVal)
+          if (_time2.getTime() > _d.getTime()) {
+              toaster.pop('error', '提示', '所选对账日期不能超过当前时间');
+              $scope.thisMouthOut = oldVal
+              return
+          }
           if (newVal !== oldVal) {
               $scope.tableParams.page(1);
               $scope.tableParams.reload();
           }
       })
       $scope.$watch('thisMouth', function(newVal, oldVal) {
+          var _fromDate = new Date()
+          var _d = new Date(_fromDate)
+          _d.setDate(1)
+          _d.setMonth(_d.getMonth() + 1)
+          _d.setDate(_d.getDate() - 1)
+
+          var _time2 = new Date(newVal)
+          if (_time2.getTime() > _d.getTime()) {
+              toaster.pop('error', '提示', '所选对账日期不能超过当前时间');
+              $scope.thisMouth = oldVal
+              return
+          }
           if (newVal !== oldVal) {
               $scope.searchOrder()
           }

+ 30 - 35
src/main/webapp/resources/view/usercenter/b2b/fa/arCheck_detail.html

@@ -225,7 +225,7 @@
     </div>
       <div class="row row-sm item">
         <div class="col-xs-6">
-          <span class="title">供应商:</span>
+          <span class="title">应付供应商:</span>
           <div class="content" ng-bind="::order.vendorName"></div>
         </div>
         <div class="col-xs-6">
@@ -318,46 +318,41 @@
       <table class="block table table-default table-striped table-hover">
         <thead>
         <tr class="header">
-          <th width="52">行号</th>
-          <th>商品</th>
-          <th width="200">单据信息</th>
-          <th width="80">单价</th>
-          <th width="120">对账数量</th>
-          <th width="120">对账金额</th>
+          <th width="40" style="padding:8px 0;font-size: 16px">行号</th>
+          <th width="150" style="font-size: 16px">商品</th>
+          <th width="40" style="font-size: 16px">采购单号</th>
+          <th style="font-size: 16px">采购序号</th>
+          <th width="100" style="font-size: 16px">验收单</th>
+          <th style="font-size: 16px">验收单序号</th>
+          <th style="font-size: 16px">单价</th>
+          <!--<th width="80">单据类型</th>-->
+          <th style="font-size: 16px">税率</th>
+          <th style="font-size: 16px">对账数量</th>
+          <th style="font-size: 16px">对账金额</th>
         </tr>
         </thead>
         <tbody>
         <tr ng-repeat="item in order.items track by item.id">
-          <td class="text-center text-num text-bold f-16 text-success">
-            <span ng-bind="::item.number"></span>
-          </td>
-          <td>
-            <div class="text-num text-bold">
-              <span ng-bind="::item.prodCode" title="商品编号"></span>
-            </div>
-            <div class="text-muted" ng-bind="::item.prodSpec" title="商品规格"></div>
-          </td>
-          <td class="text-muted text-num">
-            <div>
-              <i class="fa fa-share-square-o fa-fw" title="出库单号"></i>
-              <span ng-bind="::item.orderCode"></span> 第<span ng-bind="item.orderDetno"></span>行
-            </div>
-          </td>
-          <td class="text-center">
-            <div class="text-num" ng-bind="::item.price | number:6"></div>
-            <div class="text-muted f12">税率:{{::item.taxrate || 0}}%</div>
-          </td>
-          <td class="text-center">
-            <div>
-              <span class="badge" ng-if="item.status==201 && !item.agreed">供</span>
-              <span class="text-num text-bold" ng-bind="::item.checkQty | number"></span>
-            </div>
-          </td>
-          <td>
-            <div class="text-num text-inverse text-bold" ng-bind="::item.amount | number:6"></div>
+          <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.orderCode"></td>
+          <td style="text-align: center" ng-bind="item.orderDetno"></td>
+          <td ng-bind="item.inoutno"></td>
+          <td style="text-align: center" ng-bind="item.inoutnodetno"></td>
+
+          <!--<td ng-bind="item.orderClass"></td>-->
+          <td ng-bind="isUser?'-':item.price"></td>
+          <td style="text-align: center" ng-bind="item.taxrate"></td>
+          <td style="text-align: center" ng-bind="item.checkQty"></td>
+          <td style="text-align: center" ng-bind="isUser?'-':(item.amount | number:2)"></td>
         </tr>
         <tr>
+          <td></td>
+          <td></td>
+          <td></td>
           <td></td>
           <td></td>
           <td></td>
@@ -372,4 +367,4 @@
       </table>
     </div>
   </div>
-</div>
+</div>

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

@@ -553,16 +553,16 @@
      <div class="fl" ng-show="active === 'all'" >
           <label class="control-label">请选择月份:</label>
           <span ng-click="addMouthOut(-1)" style="    display: inline-block;
-                width: 30px;
-                height: 30px;
+                width: 32px;
+                height: 32px;
                 border: 1px solid #ddd;
                 text-align: center;
-                line-height: 30px;
+                line-height: 32px;
                 cursor: pointer;
                 vertical-align: middle;">
                 <img src="/static/img/vendor/images/arrow-left-d-l.png" width="24"/>
             </span>
-          <span class="inputsIcon control-label" style="padding-right: 5px;display: inline-block">
+          <span class="inputsIcon control-label" style="padding-right: 0px;display: inline-block">
               <wui-date
                       format="yyyy-mm"
                       placeholder="请选择或输入日期"
@@ -572,12 +572,12 @@
               >
               </wui-date>
             </span>
-         <span  ng-click="addMouthOut(1)" style="display: inline-block;
-                width: 30px;
-                height: 30px;
+         <span  ng-click="addMouthOut(1)" ng-show="MouthOutShow" style="display: inline-block;
+                width: 32px;
+                height: 32px;
                 border: 1px solid #ddd;
                 text-align: center;
-                line-height: 30px;
+                line-height: 32px;
                 cursor: pointer;
                 vertical-align: middle;"><img src="/static/img/vendor/images/arrow-right-d-l.png" width="24"/></span>
       </div>
@@ -673,7 +673,7 @@
             </p>
           </td>
           <td class="status">
-            <div ng-if="check.checkStatus == '未对账'" class="text-center text-muted f14"><br>未对账!</div>
+            <!--<div ng-if="check.checkStatus == '未对账'" class="text-center text-muted f14"><br>未对账!</div>-->
             <div></div>
             <div ng-if="check.checkStatus == '已确认'" class="text-center text-muted f14">
               <br> <i class="fa fa-check-square-o"></i> 已确认
@@ -712,19 +712,18 @@
         <tbody ng-show="active === 'all'" ng-repeat="check in ALLList">
           <tr >
             <td style="color: #3f84f6">{{::check.myEnterprise.enName}}</td>
-            <td ng-if="check.thisMonthCount && check.thisMonthCount.length > 0">
-              <div ng-repeat="count in check.thisMonthCount">
-                <span>{{count.currency}}:{{count.amount | number:2}}</span>
-              </div>
-
-            </td>
-            <td ng-if="!check.thisMonthCount">-</td>
-            <td ng-if="check.totalCount && check.totalCount.length > 0">
-              <div ng-repeat="count in check.totalCount">
-                <span>{{count.currency}}:{{count.amount | number:2}}</span>
-              </div>
-            </td>
-            <td ng-if="!check.totalCount">-</td>
+              <td ng-if="check.thisMonthCount.length > 0">
+                  <div ng-repeat="count in check.thisMonthCount">
+                      <span>{{count.currency}}:{{count.amount | number:2}}</span>
+                  </div>
+              </td>
+              <td ng-if="check.thisMonthCount.length === 0">-</td>
+              <td ng-if="check.totalCount.length > 0">
+                  <div ng-repeat="count in check.totalCount">
+                      <span ng-if="count.amount > 0">{{count.currency}}:{{count.amount | number:2}}</span>
+                  </div>
+              </td>
+              <td ng-if="check.totalCount.length === 0">-</td>
             <td style="color: #3f84f6;cursor: pointer" ng-click="goToMNs(check)">立即对账</td>
           </tr>
         </tbody>
@@ -804,16 +803,16 @@
           <div>
             <label class="control-label">请选择月份:</label>
             <span ng-click="addMouth(-1)" style="    display: inline-block;
-                width: 30px;
-                height: 30px;
+                width: 32px;
+                height: 32px;
                 border: 1px solid #ddd;
                 text-align: center;
-                line-height: 30px;
+                line-height: 32px;
                 cursor: pointer;
                 vertical-align: middle;">
                 <img src="/static/img/vendor/images/arrow-left-d-l.png" width="24"/>
             </span>
-            <span class="control-label" style="padding-right: 5px;display: inline-block" ng-click="apCheckCondition.$open = false">
+            <span class="control-label" style="padding-right: 5px;display: inline-block;vertical-align: middle;    padding-top: 0;" ng-click="apCheckCondition.$open = false">
               <wui-date
                       format="yyyy-mm"
                       placeholder="请选择或输入日期"
@@ -822,12 +821,12 @@
                       ng-model="thisMouth"
               >
               </wui-date>
-            </span><span  ng-click="addMouth(1)" style="display: inline-block;
-                width: 30px;
-                height: 30px;
+            </span><span  ng-click="addMouth(1)" ng-show="MouthinShow" style="display: inline-block;
+                width: 32px;
+                height: 32px;
                 border: 1px solid #ddd;
                 text-align: center;
-                line-height: 30px;
+                line-height: 32px;
                 cursor: pointer;
                 vertical-align: middle;"><img src="/static/img/vendor/images/arrow-right-d-l.png" width="24"/></span>
             <label class="control-label com-check-radio" ng-click="apCheckCondition.$open = true">
@@ -1120,4 +1119,13 @@
   .inputsIcon .wui-date-editor .icon1{
       top: 11px !important;
   }
+  .wui-input {
+      border: 1px solid #3f84f6;
+      font-size: 14px;
+      color: #3f84f6;
+      font-weight: bold;
+  }
+  .wui-date-editor .iconfont {
+      color: #3f84f6
+  }
 </style>

+ 18 - 9
src/main/webapp/resources/view/vendor/b2b/apCheck_detail.html

@@ -278,34 +278,37 @@
         <thead>
         <tr class="header">
           <th width="30" style="padding:8px 0;">行号</th>
-          <th>序号</th>
-          <th>采购单</th>
           <th width="120">商品</th>
+          <th width="40">采购单号</th>
+          <th>采购序号</th>
           <th width="100">验收单</th>
-          <th width="80">单据类型</th>
+          <th>验收单序号</th>
           <th>单价</th>
+          <!--<th width="80">单据类型</th>-->
           <th>税率</th>
-          <th width="80">验收数量</th>
-          <th width="80">小计</th>
-          <th>采购序号</th>
+          <th>对账数量</th>
+          <th>对账金额</th>
+
         </tr>
         </thead>
         <tbody ng-repeat="item in data.items" style="text-align: center;">
         <tr>
           <td ng-bind="item.number" style="padding:8px 0;"></td>
-          <td ng-bind="item.orderCode"></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.orderCode"></td>
+          <td ng-bind="item.orderDetno"></td>
           <td ng-bind="item.inoutno"></td>
-          <td ng-bind="item.orderClass"></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>
           <td ng-bind="item.checkQty"></td>
           <td ng-bind="isUser?'-':(item.amount | number:2)"></td>
-          <td ng-bind="item.orderDetno"></td>
+
         </tr>
         </tbody>
       </table>
@@ -321,3 +324,9 @@
     </div>
   </div>
 </div>
+
+<style>
+  .header tr {
+    font-size: 16px
+  }
+</style>