Ver código fonte

Merge branch 'master' into haozi

eric2h 4 anos atrás
pai
commit
7c309e51ff

+ 1 - 1
app/Http/Controllers/DeliveryAppointmentController.php

@@ -121,7 +121,7 @@ class DeliveryAppointmentController extends Controller
         if ($codes){
             $codes = array_filter(array_unique(preg_split('/[,, ]+/u', $codes)));
             if (count($codes)>0){
-                $asnCount = Store::query()->where("asn_code",$codes)->count();
+                $asnCount = Store::query()->whereIn("asn_code",$codes)->count();
                 $codes = count($codes)===$asnCount ? implode(",",$codes) : null;
             }else{
                 $codes = null;

+ 8 - 8
app/Http/Controllers/ReceivingTaskController.php

@@ -73,14 +73,14 @@ class ReceivingTaskController extends Controller
             return ['success' => false, 'errors' => ['appointment_number' => ['预约号没有对应的Asn号']]];
         }
 
-        $receiving_task_items = ReceivingTaskItem::query()->whereIn('asn_no',$request->input('asn_nos') ?? [])->get()->map(function($item){
-            return $item->asn_no;
-        })->toArray();
-        if (count($receiving_task_items) >0 ){
-            return [
-                'success' => false,'errors' => ['appointment_number' => ['勾选的asn号'.json_encode($receiving_task_items).'已再其他开单入库中有关联']]
-            ];
-        }
+//        $receiving_task_items = ReceivingTaskItem::query()->whereIn('asn_no',$request->input('asn_nos') ?? [])->get()->map(function($item){
+//            return $item->asn_no;
+//        })->toArray();
+//        if (count($receiving_task_items) >0 ){
+//            return [
+//                'success' => false,'errors' => ['appointment_number' => ['勾选的asn号'.json_encode($receiving_task_items).'已再其他开单入库中有关联']]
+//            ];
+//        }
 
         if ($delivery_appointment_car->deliveryAppointment->owner_id != $request->input('owner_id')) {
             return ['success' => false, 'errors' => ['appointment_number' => ['预约号与货主未必填项']]];

+ 9 - 4
app/Services/OrderRejectingStatusService.php

@@ -29,16 +29,21 @@ class OrderRejectingStatusService
         $rejecting_status = $this->getOrderRejectingStatus($order);
         $query = OrderDetail::query()->where('order_id', $order->id);
         $order_detail = $query->first();
+        $is_new_rejecting = in_array($rejecting_status,['无','未退回']) ? '无':'有';
         if (!$order_detail) {
-            OrderDetail::query()->create(
-                ['order_id' => $order->id, 'is_new_rejecting' =>$rejecting_status === '无' ? '无' : '有', 'rejecting_status' => $rejecting_status ]
-            );
+            try {
+                OrderDetail::query()->create(
+                    ['order_id' => $order->id, 'is_new_rejecting' => $is_new_rejecting, 'rejecting_status' => $rejecting_status]
+                );
+            } catch (\Exception $e) {
+                LogService::log(__CLASS__,__METHOD__,$e->getMessage());
+            }
             return;
         }
         if (in_array($order_detail->is_new_rejecting, ['有', '已处理']) && $rejecting_status != '无') {
             $query->update(['rejecting_status' => $rejecting_status]);
         } else {
-            $query->update(['rejecting_status' => $rejecting_status, 'is_new_rejecting' =>$rejecting_status === '无' ? '无' : '有']);
+            $query->update(['rejecting_status' => $rejecting_status, 'is_new_rejecting' =>$is_new_rejecting]);
         }
     }
 

+ 2 - 2
resources/views/equipment/_detailInfo.blade.php

@@ -1,6 +1,6 @@
-<div class="modal fade" id="detailInfo" tabindex="-1" role="dialog" data-keyboard="false" aria-hidden="true"
+<div class="modal fade" id="detailInfo" tabindex="-1" role="dialog" data-keyboard="false" style="z-index: 1042" aria-hidden="true"
      :data-backdrop="current.eqId ? 'true' : 'static'" >
-    <div class="modal-dialog modal-lg modal-dialog-centered" role="document">
+    <div class="modal-dialog modal-lg modal-dialog-centered" role="document" style="z-index: 1043">
         <div class="modal-content">
             <div class="modal-header row m-0">
                 <div class="col-4 form-inline h-5 font-weight-bold">

+ 21 - 0
resources/views/equipment/_failTipList.blade.php

@@ -0,0 +1,21 @@
+<div class="modal fade" id="failTipList" style="z-index: 1044" tabindex="1" role="dialog" aria-hidden="true">
+    <div class="modal-dialog modal-lg modal-dialog-centered" role="document" style="z-index: 1045">
+        <div class="modal-content">
+            <div class="modal-header">
+                <h1 class="offset-4 text-muted">部分构建失败原因</h1>
+                <button type="button" class="close" data-dismiss="modal">&times;</button>
+            </div>
+            <div class="modal-body p-0">
+                <table class="table table-bordered w-100 overflow-y-scrollbar-200" style="max-height: 400px !important;">
+                    <tr v-for="(val,key) in failTipList">
+                        <td class="text-dark font-weight-bold text-center">@{{ key }}</td>
+                        <td class="text-danger">@{{ val }}</td>
+                    </tr>
+                </table>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-secondary" data-dismiss="modal">了解了</button>
+            </div>
+        </div>
+    </div>
+</div>

+ 76 - 24
resources/views/equipment/_location.blade.php

@@ -1,8 +1,8 @@
-<div class="modal fade" id="locationModal" v-if="currentEqChildIndex!==null" tabindex="1" role="dialog" aria-hidden="true">
-    <div class="modal-dialog modal-lg modal-dialog-centered" role="document">
+<div class="modal fade" id="locationModal" v-if="currentEqChildIndex!==null" style="z-index: 1044" tabindex="1" role="dialog" aria-hidden="true">
+    <div class="modal-dialog modal-lg modal-dialog-centered" role="document" style="z-index: 1045">
         <div class="modal-content">
             <div class="modal-header">
-                <h1 class="offset-5">@{{ current.code+'-'+((currentEqChildIndex+1)<10 ? '0'+(currentEqChildIndex+1) : (currentEqChildIndex+1)) }}</h1>
+                <h1 class="offset-5" v-if="!batchSign">@{{ current.code+'-'+((currentEqChildIndex+1)<10 ? '0'+(currentEqChildIndex+1) : (currentEqChildIndex+1)) }}</h1>
                 <button type="button" class="close" data-dismiss="modal">&times;</button>
             </div>
             <div class="modal-body p-0">
@@ -11,43 +11,95 @@
                 </div>
                 <div class="w-100" v-else>
                     <table class="table table-bordered w-100 h-100 m-0"
-                        v-if="current.children[currentEqChildIndex].row>0 && current.children[currentEqChildIndex].column>0">
+                        v-if="!batchSign && (current.children && current.children[currentEqChildIndex] && current.children[currentEqChildIndex].row>0 && current.children[currentEqChildIndex].column>0)">
                         <tr v-for="row in current.children[currentEqChildIndex].row">
                             <td v-for="column in current.children[currentEqChildIndex].column" v-if="locations[(row-1)*current.children[currentEqChildIndex].column+(column-1)]"
                                 class="p-0 text-center position-relative">
-                                <div style="border: 2px darkgray solid;" class="el-center w-100 h-100 text-secondary font-weight-bold"
-                                :style="locations[(row-1)*current.children[currentEqChildIndex].column+(column-1)].code|childStyle">
-                                    @{{ locations[(row-1)*current.children[currentEqChildIndex].column+(column-1)].code }}</div>
-                                <div style="position: absolute;bottom: 0" class="w-100 row">
-                                    <div class="col-5 offset-1">
-                                        <h6 class="text-muted">在库数量:</h6><b>@{{ locations[(row-1)*current.children[currentEqChildIndex].column+(column-1)].code | qty }}</b>
-                                    </div>
-                                    <div class="col-5">
-                                        <h6 class="text-muted">待操作数量:</h6><b>@{{ locations[(row-1)*current.children[currentEqChildIndex].column+(column-1)].code | qtyOver }}</b>
+                                <div style="min-height: 120px">
+                                    <div class="w-100 h-100 text-secondary font-weight-bold"
+                                         :style="locations[(row-1)*current.children[currentEqChildIndex].column+(column-1)].code|childStyle">
+                                        @{{ locations[(row-1)*current.children[currentEqChildIndex].column+(column-1)].code }}</div>
+                                    <div style="position: absolute;bottom: 0" class="w-100 row">
+                                        <div class="col-5 offset-1">
+                                            <h6 class="text-muted">在库数量:</h6><b>@{{ locations[(row-1)*current.children[currentEqChildIndex].column+(column-1)].code | qty }}</b>
+                                        </div>
+                                        <div class="col-5">
+                                            <h6 class="text-muted">待动数量:</h6><b>@{{ locations[(row-1)*current.children[currentEqChildIndex].column+(column-1)].code | qtyOver }}</b>
+                                        </div>
                                     </div>
                                 </div>
                             </td>
                         </tr>
                     </table>
-                    <div class="w-100 mt-5 row" v-else>
-                        <div class="input-group m-3 col-5">
-                            <input type="number" step="1" class="form-control" placeholder="构建行数" v-model="buildPool.row">
-                            <div class="input-group-append">
-                                <span class="input-group-text">行</span>
+                    <div class="w-100 mt-3" v-else>
+                        <div class="row">
+                            <div class="input-group m-3 col-5">
+                                <input type="number" step="1" class="form-control" placeholder="构建行数" v-model="buildPool.row">
+                                <div class="input-group-append">
+                                    <span class="input-group-text">行</span>
+                                </div>
+                            </div>
+                            <div class="col-1 mt-4 h5 font-weight-bold">×</div>
+                            <div class="input-group m-3 col-5">
+                                <input type="number" step="1" class="form-control" placeholder="构建列数" v-model="buildPool.column">
+                                <div class="input-group-append">
+                                    <span class="input-group-text">列</span>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="row mt-5">
+                            <label class="offset-1 col-4 text-right" for="usage">用途</label>
+                            <select class="col-5 form-control" id="usage" v-model="buildPool.usage">
+                                <option v-for="(msg,key) in locationAttr.usage" :value="key">@{{ key+'('+msg+')' }}</option>
+                            </select>
+                        </div>
+                        <div class="row mt-3">
+                            <label class="offset-1 col-4 text-right" for="handling">处理方式</label>
+                            <select class="col-5 form-control" id="handling" v-model="buildPool.handling">
+                                <option v-for="(msg,key) in locationAttr.handling" :value="key">@{{ key+'('+msg+')' }}</option>
+                            </select>
+                        </div>
+                        <div class="row mt-3">
+                            <label class="offset-1 col-4 text-right" for="attribute">属性</label>
+                            <select class="col-5 form-control" id="attribute" v-model="buildPool.attribute">
+                                <option v-for="(msg,key) in locationAttr.attribute" :value="key">@{{ key+'('+msg+')' }}</option>
+                            </select>
+                        </div>
+                        <div class="row mt-3">
+                            <label class="offset-1 col-4 text-right" for="category">类别</label>
+                            <select class="col-5 form-control" id="category" v-model="buildPool.category">
+                                <option v-for="(msg,key) in locationAttr.category" :value="key">@{{ key+'('+msg+')' }}</option>
+                            </select>
+                        </div>
+                        <div class="row mt-3">
+                            <label class="offset-1 col-4 text-right" for="demand">需求</label>
+                            <select class="col-5 form-control" id="demand" v-model="buildPool.demand">
+                                <option v-for="(msg,key) in locationAttr.demand" :value="key">@{{ key+'('+msg+')' }}</option>
+                            </select>
+                        </div>
+                        <div class="row mt-3">
+                            <label class="offset-1 col-4 text-right" for="mixFlag">是否允许产品混放</label>
+                            <div class="col-5">
+                                <input class="switch" type="checkbox" id="mixFlag" v-model="buildPool.mixFlag" />
+                            </div>
+                        </div>
+                        <div class="row mt-3">
+                            <label class="offset-1 col-4 text-right" for="mixLotFlag">是否允许批次混放</label>
+                            <div class="col-5">
+                                <input class="switch" type="checkbox" id="mixLotFlag" v-model="buildPool.mixLotFlag" />
                             </div>
                         </div>
-                        <div class="col-1 mt-4 h5 font-weight-bold">×</div>
-                        <div class="input-group m-3 col-5">
-                            <input type="number" step="1" class="form-control" placeholder="构建列数" v-model="buildPool.column">
-                            <div class="input-group-append">
-                                <span class="input-group-text">列</span>
+                        <div class="row mt-3">
+                            <label class="offset-1 col-4 text-right" for="loseIdFlag">上架后是否释放跟踪号</label>
+                            <div class="col-5">
+                                <input class="switch" type="checkbox" id="loseIdFlag" v-model="buildPool.loseIdFlag" />
                             </div>
                         </div>
                     </div>
                 </div>
             </div>
             <div class="modal-footer">
-                <button v-if="current.children[currentEqChildIndex].row>0 && current.children[currentEqChildIndex].column>0" @click="removeLocationBind()"
+                <button v-if="!batchSign && (current.children && current.children[currentEqChildIndex] && current.children[currentEqChildIndex].row>0 && current.children[currentEqChildIndex].column>0)" @click="removeLocationBind()"
                         class="pull-right btn btn-danger">解除该设备库位绑定</button>
                 <button v-else @click="locationBind()" class="pull-right btn btn-success">根据行列自动构建库位</button>
             </div>

+ 38 - 0
resources/views/equipment/_locationAttr.blade.php

@@ -0,0 +1,38 @@
+<div class="modal fade" id="locationAttr" tabindex="-1" aria-labelledby="modalTitle" style="z-index: 1042" role="dialog" aria-hidden="true">
+    <div class="modal-dialog modal-lg modal-dialog-centered" style="z-index: 1043">
+        <div class="modal-content">
+            <div class="modal-header">
+                <h5 class="modal-title" id="modalTitle">批量生成库位</h5>
+                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+                    <span aria-hidden="true">&times;</span>
+                </button>
+            </div>
+            <div class="modal-body container-fluid row p-0">
+                <div class="col-md-6" style="border-right: 1px #D3D3D3 solid">
+                    <div class="row p-2 m-0 cursor-pointer" style="border-top: 1px solid #dee2e6;"
+                         v-for="(arr,idx) in batchEquipment" :class="idx==batchEquipmentSign ? 'box-shadow-dark' : ''"
+                         @click="batchEquipmentSelected(arr,idx)">
+                        <div class="col-md-5">
+                            <div style="border: 1px #0070C0 solid" :style="[{backgroundColor:equipments[idx].color},{width:(equipments[idx].h*ratio)+'px'},{height:(equipments[idx].w*ratio)+'px'}]"></div>
+                        </div>
+                        <div class="col-md-5 text-overflow-replace">
+                            @{{ equipments[idx].describe }}
+                        </div>
+                        <div class="col-md-2" @click="showEquipmentCode(arr)">
+                            @{{ arr.length }}组
+                        </div>
+                    </div>
+                </div>
+                <div class="col-md-6" v-if="current.eqId">
+                    <div v-for="layer in flipLayer" style="border: 1px #000000 solid;height: 70px;cursor: pointer" @click="nextDetailBatch(layer)"
+                         :style="[layer===1 ? {borderTop:'none'} : '',layer===current.layer ? {borderBottom:'none'} : '',{width:100*(current.grid)+'px'}]">
+                        <span class="h-100 w-100 el-center">@{{ layer<10 ? '0'+layer : layer }}</span>
+                    </div>
+                </div>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
+            </div>
+        </div>
+    </div>
+</div>

+ 195 - 13
resources/views/equipment/index.blade.php

@@ -87,6 +87,7 @@
                 </ul>
             </div>
             <button class="btn btn-info mt-5 w-100 text-white" @click="openRepository()">新增库区</button>
+            <button class="btn btn-success mt-5 w-100 text-white" @click="searchingSelectEq()">批量构建库位</button>
             <p class="font-weight-bold p-0 mb-0 mt-1">位置</p>
             <div class="row text-muted small">
                 <small class="col-6">X</small>
@@ -255,6 +256,8 @@
     @include("equipment._warehouseDetail")
     @include("equipment._repository")
     @include("equipment._buildGroup")
+    @include("equipment._locationAttr")
+    @include("equipment._failTipList")
 </div>
 </body>
 <script src="{{ mix('js/app.js') }}"></script>
@@ -311,8 +314,8 @@
             grid:false,                                                  //设备拖拽是否开启网格
             turn:true,                                                  //设备是否翻转
             isLoadLocation:false,                                       //开启加载库位
-            //baseUrl:"http://127.0.0.1:8112/",
-            baseUrl:"https://swms.baoshi56.com/",
+            baseUrl:"http://127.0.0.1:8112/",
+            //baseUrl:"https://swms.baoshi56.com/",
             current:{},                                                 //当前操作的设备
             error:{},
             locations:[],                   //库位信息
@@ -324,6 +327,13 @@
             elSeList:[
                 {id:-1,w:1.2,h:2.4,grid:2,color:"RGB(255,255,0)",describe:"消防栓设施或立柱,不可设库位"},
             ],//场景元素预设列表
+            locationAttr:null,//库位建立时的可选择属性
+            batchEquipment:{
+
+            },//设备类型 与设备下标的映射
+            batchEquipmentSign:"",//当前选择的batchEquipment下标
+            batchSign:false,//当前是否为批量构建
+            failTipList:{},//构建失败的库位提示信息
         },
         mounted() {
             this.initPage();
@@ -373,6 +383,40 @@
             };
         },
         methods:{
+            //获取库位的可选择属性
+            _getLocationAttr(){
+                if (this.locationAttr!==null){
+                    return;
+                }
+                $.ajax({
+                    url : this.baseUrl+"location/getAttr",
+                    type : "post",
+                    dataType : "JSON",
+                    success : (res,status)=>{
+                        if (res.code===200){
+                            this.locationAttr = res.data;
+                        }else{
+                            window.toast.error(res.message);
+                        }
+                    },
+                    error : (err,status)=>{
+                        window.toast.error("库位选择属性加载失败");
+                    },
+                    timeout:3000,
+                })
+            },
+            /**
+             * 显示设备编码列表
+             */
+            showEquipmentCode(arr){
+                event.stopPropagation();
+                let obj = {};
+                arr.forEach(index=>{
+                    obj[this.equipmentElements[index].code] = "";
+                });
+                this.failTipList = obj;
+                $("#failTipList").modal("show");
+            },
             //检索所有元素,获取在指定范围内的元素
             searchingSelectEq(){
                 afterExt = function (){
@@ -392,13 +436,43 @@
                         }
                         resolve(result);
                     }).then(indexArr=>{
-                        indexArr.forEach(index=>{
-                            console.log(vue.equipmentElements[index].code);
-                        });
+                        if (indexArr.length===0){
+                            toast.error("未选中任何设备");
+                            return;
+                        }
+                        vue.batchOperationEquipment(indexArr);
                     });
                 }
                 clipScreenshots();
             },
+            /**
+             * 批量选中设备后唤起构建器
+             */
+            batchOperationEquipment(indexArr){
+                this.current = {};
+                let obj = {};
+                indexArr.forEach(index=>{
+                    let eq = this.equipmentElements[index];
+                    let eqTypeIndex = this._getEqTypeIndex(eq.id);
+                    if (!obj[eqTypeIndex])obj[eqTypeIndex] = [];
+                    obj[eqTypeIndex].push(index);
+                });
+                this.batchEquipment = obj;
+                $("#locationAttr").modal('show');
+            },
+            /**
+             * 根据库位类型ID获取库位类型下标
+             */
+            _getEqTypeIndex(id){
+                //当前是ID为下标+1,所以直接ID-1获取下标
+                return id-1;
+                for (let i=0;i<this.equipments.length;i++){
+                    if (this.equipments[i].id==id){
+                        return i;
+                    }
+                }
+                return null;
+            },
             buildComponent(eq){
                 let component = {
                     "x":eq.x,"y":eq.y,"width":eq.turn ? eq.w : eq.h,"height":eq.turn ? eq.h : eq.w,"name":"","color":eq.color,
@@ -798,15 +872,55 @@
                 let val = event.target.value;
                 this.currentEl[key] = val ? parseFloat(val) : 0;
             },
+            _getObjFirstKey(obj){
+                for(let key in obj){
+                    return key;
+                }
+                return null;
+            },
+            /**
+             * 构建库位的默认值信息
+             * */
+            _locationAttrDefault(){
+                this.buildPool.usage = this._getObjFirstKey(this.locationAttr.usage);
+                this.buildPool.handling = this._getObjFirstKey(this.locationAttr.handling);
+                this.buildPool.attribute = this._getObjFirstKey(this.locationAttr.attribute);
+                this.buildPool.category = this._getObjFirstKey(this.locationAttr.category);
+                this.buildPool.demand = this._getObjFirstKey(this.locationAttr.demand);
+                this.buildPool.mixFlag = true;
+                this.buildPool.mixLotFlag = false;
+                this.buildPool.loseIdFlag = true;
+            },
+            /**
+             * 批量构建库位时的操作
+             * */
+            nextDetailBatch(index){
+                if (!this.current.children || this.current.children.length===0){
+                    window.toast.error("设备信息尚未加载完毕,请稍后重试!");
+                    return;
+                }
+                this.batchSign = true;
+                this.currentEqChildIndex = index-1;
+                setTimeout(function (){
+                    let parentDom = document.getElementById("locationAttr").firstChild.firstChild;
+                    let childDom = document.getElementById("locationModal").firstChild.firstChild;
+                    childDom.style.minWidth = parentDom.offsetWidth+'px';
+                    childDom.style.minHeight = parentDom.offsetHeight+'px';
+                    $("#locationModal").modal("show");
+                },20);
+                this._locationAttrDefault();
+            },
             //子设备选定时的库位加载
             nextDetail(index){
                 if (!this.current.eqId)return;
+                this.batchSign = false;
                 this.currentEqChildIndex = index-1;
                 this.isLoadLocation = true;
+                this._locationAttrDefault();
                 setTimeout(function (){
                     let parentDom = document.getElementById("detailInfo").firstChild.firstChild;
                     let childDom = document.getElementById("locationModal").firstChild.firstChild;
-                    childDom.style.minWidth = parentDom.offsetWidth+'px';
+                    childDom.style.minWidth = (parentDom.offsetWidth+200)+'px';
                     childDom.style.minHeight = parentDom.offsetHeight+'px';
                     $("#locationModal").modal("show");
                 },20);
@@ -820,13 +934,8 @@
                         switch (res.code){
                             case 200:
                                 this.locations = res.data[0];
-                                this.locationMapping = res.data[1];
+                                this.locationMapping = res.data[1] ? res.data[1] : {};
                                 this.isLoadLocation = false;
-                                setTimeout(()=>{
-                                    let parentDom = document.getElementById("detailInfo").firstChild.firstChild;
-                                    let childDom = document.getElementById("locationModal").firstChild.firstChild;
-                                    childDom.children[1].firstChild.style.height = parentDom.children[1].offsetHeight+'px';
-                                },10);
                                 break;
                             default:
                                 window.toast.error(res.message);
@@ -840,6 +949,7 @@
                 })
             },
             showDetail(equipment){
+                this._getLocationAttr();
                 if (!this.isNotEdit)return;
                 this.current = equipment;
                 setTimeout(()=>{
@@ -849,6 +959,9 @@
                 this.getChildren(this.current);
             },
             getChildren(equipment){
+                if (equipment.children && equipment.children.length>0){
+                    return;
+                }
                 $.ajax({
                     url : this.baseUrl+"equipment/getChildren",
                     type : "post",
@@ -975,7 +1088,64 @@
                     timeout:3000,
                 })
             },
+            locationBatchBind(){
+                $("#loading").show();
+                let arr = this.batchEquipment[this.batchEquipmentSign];
+                let request = [];
+                let failTipList = {};
+                arr.forEach(index=>{
+                    let eq = this.equipmentElements[index];
+                    if (!eq){
+                        window.toast.error("异常设备选择");
+                    }else if (!eq.children || eq.children.length===0 || !eq.children[this.currentEqChildIndex]){
+                        failTipList[eq.code]="详情尚未加载完毕";
+                    }else{
+                        let item = eq.children[this.currentEqChildIndex];
+                        let code = eq.code+'-'+((this.currentEqChildIndex+1)<10 ? '0'+(this.currentEqChildIndex+1) : (this.currentEqChildIndex+1));
+                        request.push(Object.assign({id:item.id,code:code},
+                            this.buildPool))
+                    }
+                });
+                $.ajax({
+                    url : this.baseUrl+"location/locationBatchBound",
+                    type : "post",
+                    dataType : "JSON",
+                    data : JSON.stringify(request),
+                    headers:{'Content-Type':'application/json;charset=utf8'},
+                    success : (res)=>{
+                        switch (res.code){
+                            case 200:
+                                $("#locationModal").modal('hide');
+                                window.toast.success("构建完毕!");
+                                this.failTipList = Object.assign(failTipList,res.data);
+                                if (JSON.stringify(this.failTipList)!=="{}"){
+                                    $("#failTipList").modal("show");
+                                }
+                                let ele = document.querySelectorAll("#locationAttr span.el-center")[this.current.layer-1-this.currentEqChildIndex];
+                                ele.className += " bg-success";
+                                break;
+                            default:
+                                window.toast.error(res.message);
+                        }
+                    },
+                    error : (err)=>{
+                        window.tempTip.setIndex(999);
+                        window.tempTip.show("网络错误");
+                    },
+                    complete:(req,status)=>{
+                        $("#loading").hide();
+                        if (status==='timeout'){
+                            window.toast.error("库位批量构建失败,响应超时");
+                        }
+                    },
+                    timeout:3000,
+                });
+            },
             locationBind(){
+                if (this.batchSign){
+                    this.locationBatchBind();
+                    return;
+                }
                 if (this.isLoadLocation)return;
                 let eq = this.current.children[this.currentEqChildIndex];
                 let code = this.current.code+'-'+((this.currentEqChildIndex+1)<10 ? '0'+(this.currentEqChildIndex+1) : (this.currentEqChildIndex+1));
@@ -984,7 +1154,8 @@
                     url : this.baseUrl+"location/locationBind",
                     type : "post",
                     dataType : "JSON",
-                    data : {id:eq.id,row:this.buildPool.row,column:this.buildPool.column,code:code},
+                    headers:{'Content-Type':'application/json;charset=utf8'},
+                    data : JSON.stringify(Object.assign({id:eq.id,code:code},this.buildPool)),
                     success : (res)=>{
                         switch (res.code){
                             case 200:
@@ -1129,6 +1300,17 @@
                     timeout:3000,
                 })
             },
+            /**
+             * 批量构建设备库位时的选中操作
+             * */
+            batchEquipmentSelected(arr,index){
+                this.current = this.equipmentElements[arr[0]];
+                this.batchEquipmentSign = index;
+                arr.forEach(i=>{
+                    this.getChildren(this.equipmentElements[i]);
+                })
+                this._getLocationAttr();
+            },
         },
         filters:{
             qty(code){

+ 1 - 1
resources/views/order/workOrder/_order_commodity_info.blade.php

@@ -3,7 +3,7 @@
         商品详情
     </div>
     <el-table
-        :key="order_info_commodityes_key"
+        :key="order_info_commodities_key"
         :data="orderInfo.commodities"
         row-key="order_commodities_id"
         border

+ 6 - 6
resources/views/order/workOrder/index.blade.php

@@ -194,8 +194,8 @@
                                     <span class="badge  badge-warning" v-if="'快递异常' === item.issue_type_name"
                                           v-text="item.type"></span>
                                 </td>
-                                <td v-text="item.shop_name"></td>
                                 <td v-text="item.owner_name"></td>
+                                <td v-text="item.shop_name"></td>
                                 <td v-text="item.order_client_code"></td>
                                 <td v-text="item.logisitc_name"></td>
                                 <td>
@@ -299,7 +299,7 @@
     <script type="text/javascript" src="{{asset('js/queryForm/queryForm.js')}}"></script>
     <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
     <script type="text/javascript" src="{{mix('js/element-ui.js') }}"></script>
-{{--    <script src="https://unpkg.com/element-ui/lib/index.js"></script>--}}
+    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
 
     <style>
         .fade-enter-active {
@@ -524,7 +524,7 @@
                 orderInfo: {
                     commodities: [],
                 },
-                order_info_commodityes_key: 1,
+                order_info_commodities_key:101,
             },
             computed: {},
             mounted() {
@@ -651,9 +651,8 @@
                     {name: 'operation', value: '操作', neglect: true},
                     {name: 'work_type', value: '工单类型', neglect: true},
                     {name: 'process_progress', value: '当前进度', neglect: true},
-
-                    {name: 'shop_name', value: '店铺名称'},
                     {name: 'owner', value: '客户', neglect: true},
+                    {name: 'shop_name', value: '店铺名称'},
                     {name: 'client_no', value: '客户订单号'},
                     {name: 'logistic_name', value: '承运人'},
                     {name: 'logistic_numbers', value: '快递单号'},
@@ -3307,7 +3306,8 @@
 
                 showOrderCommoditiesInfo(item) {
                     this.dialogOrderCommoditiesVisible = true;
-                    this.orderInfo.commodities = item.order_commodities;
+                    this.orderInfo.commodities = item.order_commodities
+                    console.log(this.orderInfo.commodities);
                 },
 
                 displayDelBtn(bool, e) {