Browse Source

收发货优化

shenjj 7 years ago
parent
commit
d3845ba5b8

+ 3 - 2
src/main/webapp/resources/js/usercenter/controllers/forstore/order_detail_ctrl.js

@@ -9,7 +9,7 @@ define(['app/app'], function(app) {
 		$scope.acceptGoods = $location.search().fromPage || false // 是否是 收货入库进来
 		$scope.CheckId = 'autoMonth0' // 当前发货点选择按钮
     $scope.ChooseItem = {} // 当前选择发货单
-		$scope.sendGoodsList = [{},{},{}]
+
     // 记录状态激活信息
 		$scope.steps = {
 			step1 : false,
@@ -195,6 +195,7 @@ define(['app/app'], function(app) {
 					return ;
 				}
 				$scope.order = data;
+        $scope.sendGoodsList = $scope.order.inIds.split(',')
 				$scope.order.orderHistory = angular.fromJson($scope.order.statushistory);
 				if ($scope.order.orderRemark){
 					$scope.remarkList = angular.fromJson($scope.order.orderRemark);
@@ -255,7 +256,7 @@ define(['app/app'], function(app) {
     $scope.ensureAccept = function() {
       // var orderids = Object.getOwnPropertyNames($scope.store);
       var ids = $scope.order.id
-      OrderSimpleInfo.ensureAccept({ids: ids},{},function(data){
+      OrderSimpleInfo.ensureAccept({ids: ids},{invoiceId: $scope.ChooseItem},function(data){
         toaster.pop('success', '成功' ,'确认收货成功');
         $scope.goBack()
       }, function(res){

+ 20 - 6
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_delivery_ctrl.js

@@ -406,12 +406,15 @@ define(['app/app'], function(app) {
             if(!isValid) {
                 return ;
             }
+
+
             // if ($scope.showTip){
             //     //验证通过后保存卖家输入额外的快递公司名称
             //     KdnLogistics.saveSellerLogistics({companyName :$scope.logistics.companyName}, {}, function (data) {
             //         console.log(data);
             //     });
             // }
+
             var sendInfo = {};
             sendInfo.sendType = $scope.checkinvoice.sendType;
             if ($scope.logistics.companyName && $scope.logistics.number){
@@ -419,13 +422,24 @@ define(['app/app'], function(app) {
                 sendInfo.logisticsInfo.companyName = $scope.logistics.companyName;
                 sendInfo.logisticsInfo.number = $scope.logistics.number;
             }
+            var HasCount = false
             var _obj = []
             for (var i = 0; i < $scope.checkinvoice.purchaseDetails.length; i++) {
-                if (Math.abs($scope.checkinvoice.purchaseDetails[i].sendCount) > 0) {
-                  var _id = $scope.checkinvoice.purchaseDetails[i].id
-                  _obj.push({id: _id, qty: $scope.checkinvoice.purchaseDetails[i].sendCount})
-                }
+              if (Math.abs($scope.checkinvoice.purchaseDetails[i].sendCount)
+                  > 0) {
+                HasCount = true
+                var _id = $scope.checkinvoice.purchaseDetails[i].id
+                _obj.push({
+                  id: _id,
+                  qty: $scope.checkinvoice.purchaseDetails[i].sendCount
+                })
+              }
+            }
+            if (!HasCount) {
+              toaster.pop("info", "提示", "最少填写一个发货数量");
+              return ;
             }
+            // 如果没有输入发货数量,默认是全部发货
             sendInfo.map = _obj
             // if($scope.checkinvoice.deliveryType == 'logistics') {
             //     sendInfo.deliveryType = 'logistics';
@@ -731,11 +745,11 @@ define(['app/app'], function(app) {
             });
         }
         // 修改本次发货
-        $scope.isSendCount = 0
+        // $scope.isSendCount = 0
         // todo 已发货信息到时候需要根据当前对象获取信息
         $scope.ChangeSendCount = function(details, val, ind) {
             if (val > details.number - details.shipQty) {
-                toaster.pop('warning', '提示', '本次发货数量不能大于已数量')
+                toaster.pop('warning', '提示', '本次发货数量不能大于已数量')
                 val = details.number - details.shipQty
             }
             $scope.checkinvoice.purchaseDetails[ind].sendCount = val

+ 5 - 3
src/main/webapp/resources/view/usercenter/forstore/order_detail.html

@@ -351,7 +351,7 @@
 		<!--</div>-->
 
 		<!-- 收入入库抬头 -->
-		<div class="log_menu">
+		<div class="log_menu" ng-if="acceptGoods">
 			<span ng-if="order.status != 602 && order.status != 603 && order.status != 604 && order.status != 605 && order.status != 606 && order.status != 315">
 				订单信息 <a style="margin: 0 5px"></a>卖家:
 				<span style="white-space: nowrap;text-align: left;line-height: 24px;position: relative;border-bottom: 0px;height: 24px;width: 480px;margin-left: 0px;padding-left: 0px;">
@@ -444,7 +444,7 @@
 						<input type="radio" id="autoMonth0" name="date" ng-click="ChooseSendGoodsItem(item, $index)" ng-checked="CheckId === 'autoMonth'+$index">
 						<label style="vertical-align: top" for="autoMonth0"></label>
 						<div class="clearfix">
-							<div style="color: #666">发货单:</div><div style="color: #333">FH001001002003004 (2018-08-11 11:20:20)</div>
+							<div style="color: #666">发货单:</div><div style="color: #333">{{item}}</div>
 						</div>
 					</label>
 				</li>
@@ -466,7 +466,7 @@
 					</b>
 				</span>
 			</div>
-			<div class="log_menu">
+			<div class="log_menu" ng-if="acceptGoods">
 				<span>订单明细</span>
 			</div>
 			<div class="oder_xq clearfix" ng-if="address && !acceptGoods" style="background: #f8f8f8">
@@ -570,6 +570,7 @@
 								<!--<div class="text-area" ng-if="detail.goodsnumber">-->
 									<!--<i ng-bind="detail.goodsnumber">金石为开取数据五块钱叫稍微亲上加亲</i>-->
 								<!--</div>-->
+								<!-- 已收货 -->
 								<div class="text-area">
                   <i >80</i>
                 </div>
@@ -579,6 +580,7 @@
 								<!--<div class="text-area" ng-if="detail.remark">-->
 									<!--<i ng-bind="detail.remark">金石为开取数据五块钱叫稍微亲上加亲</i>-->
 								<!--</div>-->
+								<!-- 本次收货 -->
 								<div class="text-area">
                   <i>80</i>
                 </div>

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

@@ -1414,9 +1414,7 @@
                     <img src="static/img/seekPurchase/Excel.png" alt="">
                     <div style="width:300px">
                         <p ng-bind="bom.remark"></p>
-                        <div ng-bind="bom.date | date:'yyyy-MM-dd HH:mm:ss'">
-
-                        </div>
+                        <div>规格:4 16:02:05</div>
                         <!--<div>共 <span class="blue-text" ng-bind="bom.amount || 0"></span> 个产品&lt;!&ndash;,<span class="red-text" ng-bind="bom.offerAmount || 0">10</span> 个有报价,<span class="red-text" ng-bind="bom.goodsAmount || 0">7</span> 个有现货&ndash;&gt;</div>-->
                         <!--<div ng-bind="bom.releaseDate | date:'yyyy-MM-dd HH:mm:ss'"></div>-->
                     </div>
@@ -1428,6 +1426,9 @@
                         </div>
                         <p>本单共<span>{{bom.amount}}</span>个产品,<span>{{bom.quotedAmount}}</span>个已报价</p>
                     </div>
+                    <div>
+                        创建时间:{{bom.date | date:'yyyy-MM-dd HH:mm:ss'}}
+                    </div>
                     <a class="fr">查看详情</a>
                 </td>
             </tr>

+ 5 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_delivery.html

@@ -769,15 +769,18 @@
               <span style="width: 10%;" ng-bind="detail.number">100</span>
               <span ng-show="!isChange" class="wd01 red" ng-bind="detail.taxUnitPrice * detail.number | formateNumber : 6 | currencySysmbol : detail.currencyName"></span>
               <span ng-show="isChange" class="wd01 red" ng-bind="detail.currentTaxUnitPrice * detail.number | formateNumber : 6 | currencySysmbol : detail.currencyName"></span>
-              <!--物料编码-->
+
               <span class="wd01" style="line-height: 18px;">
                 <!--<textarea placeholder="可填写产品备注!例如物料编号"></textarea>-->
                 <!--<input type="text" ng-model="mockModal" ng-blur="Change" />-->
                 <!--<em ng-if="!detail.goodsnumber">&nbsp;</em>-->
+
+                <!--已发货数量-->
                 <div class="text-area">
                   <i >{{detail.shipQty > 0 ? detail.shipQty : '-'}}</i>
                 </div>
               </span>
+
               <span class="wd01" style="line-height: 18px;">
                 <!--<textarea placeholder="可填写产品备注!例如物料编号"></textarea>-->
                 <!--<em ng-if="!detail.remark">&nbsp;</em>-->
@@ -787,6 +790,7 @@
                 <div class="text-area" ng-if="detail.shipQty === detail.number">
                   <i>-</i>
                 </div>
+                <!--本次发货数量-->
                 <input ng-if="detail.shipQty < detail.number" class="sendInput" type="text" ng-model="detail.sendCount" ng-blur="ChangeSendCount(detail, detail.sendCount, $index)" />
               </span>
             </dd>

+ 1 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_material.html

@@ -840,7 +840,7 @@
 	.edit-replace-box .content {
 		padding: 9px 0;
 		background: #fff;
-    max-height: 280px;
+    /*max-height: 280px;*/
 		position: relative;
 		z-index: 11
 	}