Ver Fonte

Merge branch 'Haozi'

# Conflicts:
#	resources/views/transport/waybill/edit.blade.php
zhouzhendong há 4 anos atrás
pai
commit
f63f01bc6d

+ 2 - 0
app/Http/Controllers/WaybillController.php

@@ -806,6 +806,7 @@ class WaybillController extends Controller
             'carrier_weight_unit_id'=>'sometimes|required_with:carrier_weight',
             'carrier_weight_other'=>'sometimes|nullable|min:0|numeric|max:999999',
             'carrier_weight_unit_id_other'=>'sometimes|required_with:carrier_weight_other',
+            'deliver_at_date'=>'required',
         ];
         if ($request->type == '专线'){
             $rule['origination_city_id']='required|integer';
@@ -840,6 +841,7 @@ class WaybillController extends Controller
             'carrier_weight_other'=>'承运商计数二',
             'warehouse_weight_unit_id_other'=>'仓库技数单位二',
             'carrier_weight_unit_id_other'=>'承运商计数单位二',
+            'deliver_at_date'=>'发货日期',
         ]);
         return $validator;
     }

+ 27 - 3
resources/views/inventory/stockInventory/inventoryMission.blade.php

@@ -45,8 +45,7 @@
                 <button class="btn btn-sm btn-info" @click="新增盘点记录()" :class="listMode?'btn-dark':'btn-outline-dark'" v-if="!listMode&&!addInventoryMission">新增盘点记录</button>
                  <button class="btn btn-sm" @click="收起新增()" :class="addInventoryMission?'btn-dark':'btn-outline-dark'" v-if="addInventoryMission">收起新增</button>
             </span>
-
-
+            <button class="btn btn-sm btn-success" @click="outToULine()" v-if="!listMode&&materialBoxCodes">出库</button>
             <span class="form-group  mb-5">
             <label class="text-muted">货主:</label><span class="font-weight-bold">@{{ inventory.owner.name }}</span>
         </span>
@@ -715,7 +714,8 @@
                     scanEndInputted:false,binDisable:false,barcodeDisable:true,amountDisable:false,
                 },
                 goodses:[],
-                selectTr:''
+                selectTr:'',
+                materialBoxCodes:'',
             },
             beforeMount: function () {
                 this.重排序并标记全列表类型();
@@ -770,8 +770,32 @@
                     _this.listMode = false;
                 })();
                 _this.建立记录索引();
+                _this.inventoryMissions.forEach(function (inventoryMission){
+                    if (inventoryMission.location.indexOf('IDE')>-1){
+                        _this.materialBoxCodes += inventoryMission.location + ','
+                    }
+                });
+                if (_this.materialBoxCodes.length > 0) {
+                    _this.materialBoxCodes = _this.materialBoxCodes.substr(0,_this.materialBoxCodes.length - 1);
+                }
             },
             methods:{
+                outToULine(){
+                    if(!confirm('确定要将当前盘点任务涉及的IDE料箱号出至输送线吗?')){return;}
+                    let _this=this;
+                    let text = _this.materialBoxCodes;
+                    if(!text){
+                        alert('当前盘点任务未查询到IDE料箱号!')
+                        return
+                    }
+                    console.log(text)
+                    axios.post('{{url('/api/thirdPart/haiq/storage/takeOutToULine')}}',{codes:text})
+                        .then(function(response){
+                            tempTip.okWindow(response.data.result,'确定')
+                        }).catch(function(err){
+                        tempTip.okWindow(err,'确定')
+                    })
+                },
                 checkAll(e) {
                     if (e.target.checked) {
                         this.inventoryMissions.forEach((el,i)=>{