|
|
@@ -1,8 +1,7 @@
|
|
|
@extends("layouts.app")
|
|
|
@section('title','处理工单')
|
|
|
@section('head')
|
|
|
- <link href="{{ mix('css/element-ui.css') }}" rel="stylesheet">
|
|
|
- <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
|
|
+ <link href="{{ asset('css/element-ui.css') }}" rel="stylesheet">
|
|
|
@endsection
|
|
|
|
|
|
@section("content")
|
|
|
@@ -11,6 +10,16 @@
|
|
|
<div class="">
|
|
|
<div id="form_div" style="min-width: 1220px;"></div>
|
|
|
<div class="ml-3 form-inline" id="btn">
|
|
|
+ <span class="dropdown">
|
|
|
+ <button type="button"
|
|
|
+ class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget"
|
|
|
+ data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">导出Excel
|
|
|
+ </button>
|
|
|
+ <div class="dropdown-menu">
|
|
|
+ <a class="dropdown-item" href="javascript:" @click="workOrderExport(false)">导出勾选内容</a>
|
|
|
+ <a class="dropdown-item" href="javascript:" @click="workOrderExport(true)">导出所有页</a>
|
|
|
+ </div>
|
|
|
+ </span>
|
|
|
@can('订单管理-订单问题件生成')
|
|
|
<button type="button"
|
|
|
class="ml-2 btn btn-sm btn-outline-dark "
|
|
|
@@ -34,13 +43,13 @@
|
|
|
@if(\Illuminate\Support\Facades\Gate::check('订单管理-工单处理-宝时编辑') || \Illuminate\Support\Facades\Gate::check('订单管理-工单处理-承运商编辑'))
|
|
|
<button type="button"
|
|
|
class="ml-1 btn btn-outline-primary btn-sm"
|
|
|
- @click="showBatchStoreProcessLogs">批量处理日志
|
|
|
+ @click="showBatchStoreProcessLogs">工单批量处理日志
|
|
|
</button>
|
|
|
@endif
|
|
|
@can('订单管理-问题件-编辑')
|
|
|
<button type="button"
|
|
|
class="ml-1 btn btn-outline-dark btn-sm"
|
|
|
- @click="showBatchEditOrderIssueLog">批量处理说明
|
|
|
+ @click="showBatchEditOrderIssueLog">问题件批量处理日志
|
|
|
</button>
|
|
|
@endcan
|
|
|
|
|
|
@@ -77,11 +86,12 @@
|
|
|
|
|
|
<template>
|
|
|
<span class="badge badge-success" v-show="isLogisticHandler(item)">承</span>
|
|
|
- <span v-show="item.order_detail && ['有','已处理'].includes(item.order_detail.is_new_rejecting)"
|
|
|
+ <span
|
|
|
+ v-show="item.order_detail && ['有','已处理'].includes(item.order_detail.is_new_rejecting)"
|
|
|
class="badge badge-primary">退</span>
|
|
|
</template>
|
|
|
|
|
|
- <template >
|
|
|
+ <template>
|
|
|
<br v-show="item.is_issue_order">
|
|
|
<a :href="'{{url("order/issue/index")}}'+'?is_handle=ture&orderCode='+item.orderno"
|
|
|
v-show="item.is_issue_order"
|
|
|
@@ -93,7 +103,7 @@
|
|
|
<template v-show="item.order_detail">
|
|
|
<br>
|
|
|
<span class="badge badge-light"
|
|
|
- v-text="item.order_detail ? item.order_detail.rejecting_status : ''"></span>
|
|
|
+ v-text="item.order_detail ? item.order_detail.rejecting_status : ''"></span>
|
|
|
</template>
|
|
|
</td>
|
|
|
<td>
|
|
|
@@ -106,6 +116,10 @@
|
|
|
<button class="btn btn-sm btn-outline-secondary"
|
|
|
@click="showOrderCommoditiesInfo(item)">商品详情
|
|
|
</button>
|
|
|
+ <br>
|
|
|
+ <button class="btn btn-sm btn-outline-secondary" @click="getEqualsMap(item)">
|
|
|
+ 商品比较
|
|
|
+ </button>
|
|
|
</td>
|
|
|
<td>
|
|
|
@can('订单管理-订单问题件生成')
|
|
|
@@ -188,6 +202,7 @@
|
|
|
</button>
|
|
|
@endcan
|
|
|
</td>
|
|
|
+ <td v-text="item.created_at"></td>
|
|
|
<td>
|
|
|
<span v-text="item.issue_type_name"></span>
|
|
|
</td>
|
|
|
@@ -205,12 +220,20 @@
|
|
|
<span v-text="logistic_number"></span>
|
|
|
</div>
|
|
|
</td>
|
|
|
-
|
|
|
- <td v-text="item.created_at"></td>
|
|
|
<td v-text="item.status"></td>
|
|
|
<td v-text="item.creator ? item.creator.name : ''"></td>
|
|
|
<td v-text="item.result_explain ? item.result_explain: item.remark"></td>
|
|
|
- <td class="text-muted child-layer-3-hide" >
|
|
|
+ <td class="p-0 m-0 w-50" style="width:30px;" v-if="i===0"
|
|
|
+ :rowspan="workOrders.length">
|
|
|
+ <span class="btn"
|
|
|
+ style="max-width: 50px"
|
|
|
+ :class="hideRejectedBills ? 'btn-outline-secondary':'btn-outline-info'"
|
|
|
+ @click="toggleRejectedBill()" :style="{'min-height':toggleBtnHeight+'px'}"
|
|
|
+ v-text="hideRejectedBills ? '展开运单列' : '隐藏运单列'">
|
|
|
+ </span>
|
|
|
+ </td>
|
|
|
+
|
|
|
+ <td class="text-muted child-layer-3-hide" v-if="!hideRejectedBills">
|
|
|
<div class="form-inline">
|
|
|
<div class="form-group">
|
|
|
<input type="text" class="form-control form-text form-control-sm mr-1">
|
|
|
@@ -225,17 +248,64 @@
|
|
|
v-for="relation in item.order_issue_rejected_bills">
|
|
|
<input type="text" class="form-control form-control-sm mt-1 mr-1"
|
|
|
:value="relation.logistic_number_return"
|
|
|
-{{-- @change="reviseJoinRejectedBill(item,orderIssueRejectedBill.logistic_number_return,$event)"--}}
|
|
|
@focus="displayDelBtn(true,$event)"
|
|
|
@blur="displayDelBtn(false,$event)">
|
|
|
<button type="button" class="btn btn-sm btn-outline-danger mt-1 d-none"
|
|
|
- @click="unJoinLogisticNumberReturn(item,relation.logistic_number_return,i)"
|
|
|
- >
|
|
|
+ @click="unJoinLogisticNumberReturn(item,relation.logistic_number_return,i)">
|
|
|
删
|
|
|
</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</td>
|
|
|
+ @if( \Illuminate\Support\Facades\Gate::check('订单管理-工单处理-宝时编辑') || \Illuminate\Support\Facades\Gate::check('订单管理-工单处理-商家编辑') )
|
|
|
+ <td class="p-0 child-layer-3-hide align-center" v-if="!hideRejectedBills">
|
|
|
+ <div class="m-0 p-0" v-if="item.rejected_bill_items">
|
|
|
+ <table class="table table-sm m-0" v-show="showRejectedBillItem === item.id">
|
|
|
+ <tr v-for="rejected_bill_item in item.rejected_bill_items">
|
|
|
+ <td class="w-50">
|
|
|
+ <span v-text="rejected_bill_item.barcode_goods"></span>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <p class="text-truncate text-primary m-0 p-0 tooltipTarget"
|
|
|
+ style="width: 100px;cursor:pointer;text-decoration: underline"
|
|
|
+ title="双击展开"
|
|
|
+ @dblclick="nowrapText($event)"
|
|
|
+ v-text="rejected_bill_item.name_goods"></p>
|
|
|
+ <p class="text-nowrap m-0 p-0 tooltipTarget"
|
|
|
+ style="display: none;cursor:pointer"
|
|
|
+ title="双击收起"
|
|
|
+ @dblclick="truncateText($event)"
|
|
|
+ v-text="rejected_bill_item.name_goods"></p>
|
|
|
+ </td>
|
|
|
+ <td class="w-25">
|
|
|
+ <span v-text="rejected_bill_item.amount"></span>
|
|
|
+ </td>
|
|
|
+ <td class="w-25">
|
|
|
+ <span v-text="rejected_bill_item.quality_label"></span>
|
|
|
+ </td>
|
|
|
+ <td class="w-auto">
|
|
|
+ <span v-text="rejected_bill_item.remark"></span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ <div class="text-center" v-show="item.rejected_bill_item_amount_count > 0">
|
|
|
+ <button type="button"
|
|
|
+ class="btn btn-sm btn-outline-primary align-middle mt-1"
|
|
|
+ v-show="showRejectedBillItem !== item.id"
|
|
|
+ @click="showRejectedBillItem = item.id"
|
|
|
+ v-text="'商品' + item.rejected_bill_item_amount_count + '件,点击展开'">
|
|
|
+ </button>
|
|
|
+ <button type="button"
|
|
|
+ class="btn btn-sm btn-outline-primary align-middle mt-1"
|
|
|
+ v-show="showRejectedBillItem === item.id"
|
|
|
+ @click="showRejectedBillItem = null">
|
|
|
+ 点击收起
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ @endif
|
|
|
+
|
|
|
|
|
|
<td class="log-td"
|
|
|
v-on:mouseover="showAddBtn($event)"
|
|
|
@@ -249,10 +319,72 @@
|
|
|
@include('order.workOrder._issue_logs')
|
|
|
</td>
|
|
|
@endcan
|
|
|
- <td class="container">
|
|
|
+ @can('订单管理-工单处理-宝时编辑')
|
|
|
+ <td>
|
|
|
+ <input type="number" class="form-control form-control-sm"
|
|
|
+ v-model="item.logistic_indemnity_money"
|
|
|
+ @change="changeWorkOrderInfo(item,'logistic_indemnity_money',$event)">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <select class="form-control form-control-sm"
|
|
|
+ v-model="item.logistic_express_remission"
|
|
|
+ @change="changeWorkOrderInfo(item,'logistic_express_remission',$event)">
|
|
|
+ <option v-for="type in workOrderRemissionType" :value="type.name"
|
|
|
+ v-text="type.name"></option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input type="number" class="form-control form-control-sm"
|
|
|
+ v-model="item.bao_shi_indemnity_money"
|
|
|
+ @change="changeWorkOrderInfo(item,'bao_shi_indemnity_money',$event)">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <select
|
|
|
+ class="form-control form-control-sm"
|
|
|
+ v-model="item.bao_shi_express_remission"
|
|
|
+ @change="changeWorkOrderInfo(item,'bao_shi_express_remission',$event)">
|
|
|
+ <option v-for="type in workOrderRemissionType" :value="type.name"
|
|
|
+ v-text="type.name"></option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+
|
|
|
+ <td>
|
|
|
+ <table class="table table-sm">
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <select class="form-control form-control-sm"
|
|
|
+ @change="createUserWorkGroup(item,$event)">
|
|
|
+ <option value=""></option>
|
|
|
+ <option v-for="data in userWorkgroup" :value="data.name"
|
|
|
+ v-text="data.value"></option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr v-for="(user_workgroup,index) in item.user_work_groups">
|
|
|
+ <td>
|
|
|
+ <span v-text="user_workgroup.name"></span>
|
|
|
+ <button class="btn btn-sm btn-outline-danger float-right"
|
|
|
+ @click="destroyUserWorkGroup(item,index,$event)">删
|
|
|
+ </button>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+
|
|
|
+
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <select class="form-control form-control-sm"
|
|
|
+ v-model="item.user_owner_group_id"
|
|
|
+ @change="changeUserOwnerGroup(item,$event)">
|
|
|
+ <option v-for="data in userOwnerGroup" :value="data.name"
|
|
|
+ v-text="data.value"></option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ @endcan
|
|
|
+ <td class="container" style="min-width: 500px">
|
|
|
<div class="row">
|
|
|
@can('订单管理-工单处理-删除')
|
|
|
- <div class="col-1 ">
|
|
|
+ <div class="col-2 ">
|
|
|
<div class="header-alert">
|
|
|
<button type="button"
|
|
|
class="btn btn-sm btn-outline-danger"
|
|
|
@@ -262,16 +394,13 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
@endcan
|
|
|
- <div class="col-6 m-0 ">
|
|
|
+ <div class="col-10 m-0 ">
|
|
|
@include('order.workOrder._work_order_details')
|
|
|
</div>
|
|
|
- <div @can('订单管理-工单处理-删除') class="col-5 m-0"
|
|
|
- @else class="col-6 p-0" @endcan>
|
|
|
- @include('order.workOrder._work_order_log')
|
|
|
- </div>
|
|
|
</div>
|
|
|
-
|
|
|
</td>
|
|
|
+
|
|
|
+ </tr>
|
|
|
</template>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
@@ -279,9 +408,6 @@
|
|
|
{{ $workOrders->withQueryString()->links() }}
|
|
|
</div>
|
|
|
</div>
|
|
|
- @can('订单管理-工单处理-审核')
|
|
|
- {{-- @include('order.workOrder._edit_issue_type')--}}
|
|
|
- @endcan
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
@include('order.workOrder._work_order_show')
|
|
|
@@ -294,6 +420,7 @@
|
|
|
@include('order.workOrder._edit_order_issue_log')
|
|
|
@include('order.workOrder._edit_process_log')
|
|
|
@include('order.workOrder._order_commodity_info')
|
|
|
+ @include('order.workOrder._rejected_item_equals_order_commodity')
|
|
|
</div>
|
|
|
@endsection()
|
|
|
|
|
|
@@ -301,7 +428,8 @@
|
|
|
<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 type="text/javascript" src="{{asset('js/element/index.js')}}"></script>
|
|
|
+ <script type="text/javascript" src="{{mix('js/queryForm/export.js')}}"></script>
|
|
|
|
|
|
<style>
|
|
|
.fade-enter-active {
|
|
|
@@ -426,6 +554,20 @@
|
|
|
},
|
|
|
@endforeach
|
|
|
],
|
|
|
+ userWorkgroup: [
|
|
|
+ @foreach($userWorkgroup as $item)
|
|
|
+ {
|
|
|
+ name: '{{$item->id}}', value: '{{$item->name}}'
|
|
|
+ },
|
|
|
+ @endforeach
|
|
|
+ ],
|
|
|
+ userOwnerGroup: [
|
|
|
+ @foreach($userOwnerGroup as $item)
|
|
|
+ {
|
|
|
+ name: '{{$item->id}}', value: '{{$item->name}}'
|
|
|
+ },
|
|
|
+ @endforeach
|
|
|
+ ],
|
|
|
logisticEditWorkOrder: {
|
|
|
id: null,
|
|
|
issue_type_name: null,
|
|
|
@@ -507,12 +649,16 @@
|
|
|
dialogBatchEditOrderIssueLogVisible: false, // 问题件日志
|
|
|
dialogProcessLogVisible: false, // 工单处理日志
|
|
|
dialogOrderCommoditiesVisible: false, // 订单商品详情
|
|
|
+ dialogCommoditiesEqualsVisible: false, // 商品对比
|
|
|
|
|
|
showProcessLogId: null, // workOrder->id
|
|
|
showAddDetailProcessLog: null, // workOrderDetail->ids
|
|
|
showAddProcessLogFrom: null, //
|
|
|
showAddProcessLogBtn: null,
|
|
|
+ showWorkOrderProcessLog: null,
|
|
|
+ showOrderIssueProcessLog: null,
|
|
|
|
|
|
+ showRejectedBillItem: null, // 退回商品详情
|
|
|
batchHandlerWorkOrder: {
|
|
|
issue_type_name: '',
|
|
|
process_progress: '',
|
|
|
@@ -526,7 +672,23 @@
|
|
|
orderInfo: {
|
|
|
commodities: [],
|
|
|
},
|
|
|
- order_info_commodities_key:101,
|
|
|
+ order_info_commodities_key: 101,
|
|
|
+ workOrderRemissionType: [
|
|
|
+ {name: '原单减免', value: '原单减免'},
|
|
|
+ {name: '补发减免', value: '补发减免'},
|
|
|
+ {name: '全部减免', value: '全部减免'},
|
|
|
+ ],
|
|
|
+ rejectingStatus: [
|
|
|
+ {name: '无', value: '无'},
|
|
|
+ {name: '未退回', value: '未退回'},
|
|
|
+ {name: '全部退回', value: '全部退回'},
|
|
|
+ {name: '部分退回', value: '部分退回'},
|
|
|
+ {name: '差异退回', value: '差异退回'},
|
|
|
+ ],
|
|
|
+ commodityEqualsMap: [],
|
|
|
+ hideRejectedBills: true,
|
|
|
+ tableHeader:null,
|
|
|
+ toggleBtnHeight:0,
|
|
|
},
|
|
|
computed: {},
|
|
|
mounted() {
|
|
|
@@ -614,6 +776,28 @@
|
|
|
]
|
|
|
},
|
|
|
{name: 'is_end', type: 'checkbox', tip: '是否已拦截', data: [{name: 'ture', value: '已完成'}]},
|
|
|
+ ], [
|
|
|
+ {name: 'logistic_indemnity_money', type: 'input', placeholder: '承运商赔偿金额'},
|
|
|
+ {
|
|
|
+ name: 'logistic_express_remission',
|
|
|
+ type: 'select',
|
|
|
+ placeholder: '承运商快递减免',
|
|
|
+ data: this.workOrderRemissionType
|
|
|
+ },
|
|
|
+ {name: 'bao_shi_indemnity_money', type: 'input', placeholder: '宝时赔偿金额'},
|
|
|
+ {
|
|
|
+ name: 'bao_shi_express_remission',
|
|
|
+ type: 'select',
|
|
|
+ placeholder: '宝时快递减免',
|
|
|
+ data: this.workOrderRemissionType
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'user_work_group_id', type: 'select_multiple_select',
|
|
|
+ tip: ['输入关键词快速定位下拉列表,回车确定', '选择要显示的仓库责任方'],
|
|
|
+ placeholder: ['仓库责任方', '定位或多选仓库责任方'], data: this.userWorkgroup
|
|
|
+ },
|
|
|
+ {name: 'user_owner_group_id', type: 'select', placeholder: '项目责任方', data: this.userOwnerGroup},
|
|
|
+ {name: 'rejecting_status', type: 'select', placeholder: '退回状态', data: this.rejectingStatus},
|
|
|
], [
|
|
|
{name: 'order_issue_log', type: 'input', placeholder: '问题件处理日志'},
|
|
|
{
|
|
|
@@ -641,6 +825,17 @@
|
|
|
},
|
|
|
{name: 'shop_name', type: 'input', placeholder: '商铺名'},
|
|
|
{name: 'work_order_process_log', type: 'input', placeholder: '工单处理日志'},
|
|
|
+ {
|
|
|
+ name: "rejectingStatus", type: 'select', placeholder: '退单状态',
|
|
|
+ data: [
|
|
|
+ {name: '无', value: '无'},
|
|
|
+ {name: '未退回', value: '未退回'},
|
|
|
+ {name: '全部退回', value: '全部退回'},
|
|
|
+ {name: '部分退回', value: '部分退回'},
|
|
|
+ {name: '差异退回', value: '差异退回'},
|
|
|
+ {name: '超量退回', value: '超量退回'},
|
|
|
+ ]
|
|
|
+ }
|
|
|
]];
|
|
|
this.form = new query({
|
|
|
el: '#form_div',
|
|
|
@@ -648,51 +843,7 @@
|
|
|
appendDom: "btn",
|
|
|
});
|
|
|
this.form.init();
|
|
|
- let column = [
|
|
|
- {name: 'id', value: '工单号', neglect: true},
|
|
|
- {name: 'operation', value: '操作', neglect: true},
|
|
|
- {name: 'work_type', value: '工单类型', neglect: true},
|
|
|
- {name: 'process_progress', value: '当前进度', neglect: true},
|
|
|
- {name: 'owner', value: '客户', neglect: true},
|
|
|
- {name: 'shop_name', value: '店铺名称'},
|
|
|
- {name: 'client_no', value: '客户订单号'},
|
|
|
- {name: 'logistic_name', value: '承运人'},
|
|
|
- {name: 'logistic_numbers', value: '快递单号'},
|
|
|
- {name: 'created_at', value: '创建时间', neglect: true},
|
|
|
- {name: 'status', value: '当前处理人', neglect: true},
|
|
|
- {name: 'creator', value: '创建人'},
|
|
|
- {name: 'remark', value: '情况说明'},
|
|
|
- {name: 'return_logistic_number', value: '退回单号'},
|
|
|
- {name: 'process_logs', value: '处理日志'},
|
|
|
- @can('订单管理-工单处理-宝时编辑')
|
|
|
- {
|
|
|
- name: 'order_issue_log', value: '处理结果'
|
|
|
- },
|
|
|
- @endcan
|
|
|
- {
|
|
|
- name: 'ab_operation', type: 'multi', title: "其他操作", rows: [
|
|
|
- @can('订单管理-工单处理-删除')
|
|
|
- {
|
|
|
- value: "删除", col: "1"
|
|
|
- },
|
|
|
- {value: "查看资料", col: "6"},
|
|
|
- {value: "处理日志", col: "5"},
|
|
|
- @else
|
|
|
- {
|
|
|
- value: "查看资料", col: "6"
|
|
|
- },
|
|
|
- {value: "处理日志", col: "6"},
|
|
|
- @endcan
|
|
|
- ], neglect: true
|
|
|
- },
|
|
|
- ];
|
|
|
- new Header({
|
|
|
- el: "table",
|
|
|
- name: "work_orders",
|
|
|
- column: column,
|
|
|
- data: this.workOrders,
|
|
|
- fixedTop: ($('#form_div').height()) + ($('#btn').height()) + 1,
|
|
|
- }).init();
|
|
|
+ this.initTableHeader();
|
|
|
},
|
|
|
created() {
|
|
|
this.workOrders.forEach(item => {
|
|
|
@@ -718,6 +869,18 @@
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ initTableHeader(){
|
|
|
+ let column = this.headerColumn();
|
|
|
+ this.tableHeader = new Header({
|
|
|
+ el: "table",
|
|
|
+ name: "work_orders",
|
|
|
+ column: column,
|
|
|
+ data: this.workOrders,
|
|
|
+ fixedTop: ($('#form_div').height()) + ($('#btn').height()) + 1,
|
|
|
+ });
|
|
|
+ this.tableHeader.init();
|
|
|
+ this.toggleBtnHeight = document.getElementById('table').clientHeight;
|
|
|
+ },
|
|
|
waitingTempTip(message) {
|
|
|
window.tempTip.setIndex(2005);
|
|
|
window.tempTip.waitingTip(message);
|
|
|
@@ -779,15 +942,6 @@
|
|
|
$(e.target).text("记录共" + orderIssue.logs.length + "条,点击展开");
|
|
|
}
|
|
|
},
|
|
|
- toggleWorkOrderLogs(item, e, index) {
|
|
|
- if (item.log_is_show === false) {
|
|
|
- item.log_is_show = true;
|
|
|
- $(e.target).text('点击收起');
|
|
|
- } else {
|
|
|
- item.log_is_show = false;
|
|
|
- $(e.target).text("记录共" + item.process_logs.length + "条,点击展开");
|
|
|
- }
|
|
|
- },
|
|
|
sortOrder(workOrder) {
|
|
|
workOrder.last_handler_name = workOrder.last_handler ? workOrder.last_handler.name : '';
|
|
|
workOrder.detail_infos = this.groupDetails(workOrder); // 工单详情
|
|
|
@@ -811,6 +965,23 @@
|
|
|
workOrder.order_commodities = this.groupOrderPackageCommodities(workOrder);
|
|
|
workOrder.is_issue_order = workOrder.order_issue !== null;
|
|
|
if (workOrder.order_issue !== null) workOrder.order_issue.log_is_show = 'order_issue' in workOrder;
|
|
|
+ let rejected_bill_items = this.groupRejectedBillItems(workOrder);
|
|
|
+ workOrder.rejected_bill_items = rejected_bill_items;
|
|
|
+ workOrder.rejected_bill_item_amount_count = rejected_bill_items ? rejected_bill_items.map(e => Number(e.amount)).reduce((a, b) => Number(a) + Number(b), 0) : 0;
|
|
|
+ },
|
|
|
+ groupRejectedBillItems(workOrder) {
|
|
|
+ let {order_issue_rejected_bills} = workOrder;
|
|
|
+ if (!order_issue_rejected_bills) return [];
|
|
|
+ return order_issue_rejected_bills.map(e => e.rejected_bill).filter(e => e).map(e => e.items).reduce((a, b) => a.concat(b), [])
|
|
|
+ .map(e => {
|
|
|
+ return {
|
|
|
+ amount: e.amount,
|
|
|
+ quality_label: e.quality_label,
|
|
|
+ barcode_goods: e.barcode_goods,
|
|
|
+ name_goods: e.name_goods,
|
|
|
+ remark: e.remark,
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
groupOrderPackageCommodities(workOrder) {
|
|
|
let order_packages = workOrder.order ? workOrder.order.packages : [];
|
|
|
@@ -1929,7 +2100,7 @@
|
|
|
getLogisticCheckResult() {
|
|
|
let {issue_type_name} = this.logisticEditWorkOrder;
|
|
|
let items = [
|
|
|
- {issue_type_name: '快递异常', option: ['已处理', '已拦截']},
|
|
|
+ {issue_type_name: '快递异常', option: ['已签收', '拦截退回']},
|
|
|
{issue_type_name: '破损', option: ['核实全部破损', '核实部分破损', '核实未破损']},
|
|
|
];
|
|
|
let item = items.find(e => e.issue_type_name === issue_type_name);
|
|
|
@@ -1978,7 +2149,7 @@
|
|
|
canTagWorkOrder(item) {
|
|
|
let {pending_detail, status, issue_type_name} = item;
|
|
|
if (status !== '承运商处理') return false;
|
|
|
- if (!['拦截', '取消拦截', '信息更改'].includes(issue_type_name)) return false;
|
|
|
+ if (!['拦截', '取消拦截', '信息更改', '快递异常'].includes(issue_type_name)) return false;
|
|
|
let {logistic_handle_tag} = pending_detail;
|
|
|
return logistic_handle_tag !== '承运商处理中';
|
|
|
},
|
|
|
@@ -3318,54 +3489,237 @@
|
|
|
}, 100);
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
- joinLogisticNumberReturn(item,e,index){
|
|
|
+ nowrapText(e) {
|
|
|
+ let truncateSpan = $(e.target);
|
|
|
+ truncateSpan.hide();
|
|
|
+ truncateSpan.siblings('.text-nowrap').show();
|
|
|
+ },
|
|
|
+ truncateText(e) {
|
|
|
+ let nowrapSpan = $(e.target);
|
|
|
+ nowrapSpan.hide();
|
|
|
+ nowrapSpan.siblings('.text-truncate').show();
|
|
|
+ },
|
|
|
+ joinLogisticNumberReturn(item, e, index) {
|
|
|
let logistic_number_return = $(e.target).prev().val();
|
|
|
- if (logistic_number_return.trim().length === 0){
|
|
|
+ if (logistic_number_return.trim().length === 0) {
|
|
|
this.errorTempTip('请输入退回单号进行添加');
|
|
|
return;
|
|
|
}
|
|
|
let url = "{{route('workOrder.rejectedBill.storeApi')}}";
|
|
|
- let data = {order_id:item.order_id,logistic_number_return:logistic_number_return};
|
|
|
+ let data = {order_id: item.order_id, logistic_number_return: logistic_number_return};
|
|
|
this.waitingTempTip('处理中');
|
|
|
- window.axios.post(url,data).then(res=>{
|
|
|
+ window.axios.post(url, data).then(res => {
|
|
|
window.tempTip.cancelWaitingTip();
|
|
|
- if (res.data.success){
|
|
|
+ if (res.data.success) {
|
|
|
this.sortOrder(res.data.data);
|
|
|
- this.$set(this.workOrders,index,res.data.data);
|
|
|
+ this.$set(this.workOrders, index, res.data.data);
|
|
|
this.successTempTip('处理完成');
|
|
|
this.$forceUpdate();
|
|
|
$(e.target).prev().val('');
|
|
|
- return ;
|
|
|
+ return;
|
|
|
}
|
|
|
- this.errorTempTip(res.data.message ? res.data.message : '处理出现异常' )
|
|
|
- }).catch(err=>{
|
|
|
+ this.errorTempTip(res.data.message ? res.data.message : '处理出现异常')
|
|
|
+ }).catch(err => {
|
|
|
window.tempTip.cancelWaitingTip();
|
|
|
this.errorTempTip(err);
|
|
|
});
|
|
|
},
|
|
|
- unJoinLogisticNumberReturn(item,logistic_number_return,index){
|
|
|
- if (logistic_number_return.trim().length === 0){
|
|
|
+ unJoinLogisticNumberReturn(item, logistic_number_return, index) {
|
|
|
+ if (logistic_number_return.trim().length === 0) {
|
|
|
this.errorTempTip('请输入退回单号进行添加');
|
|
|
return;
|
|
|
}
|
|
|
let url = "{{route('workOrder.rejectedBill.destroyApi')}}";
|
|
|
- let data = {order_id:item.order_id,logistic_number_return:logistic_number_return};
|
|
|
+ let data = {order_id: item.order_id, logistic_number_return: logistic_number_return};
|
|
|
this.waitingTempTip('处理中');
|
|
|
- window.axios.post(url,data).then(res=>{
|
|
|
+ window.axios.post(url, data).then(res => {
|
|
|
window.tempTip.cancelWaitingTip();
|
|
|
- if (res.data.success){
|
|
|
+ if (res.data.success) {
|
|
|
this.sortOrder(res.data.data);
|
|
|
- this.$set(this.workOrders,index,res.data.data);
|
|
|
+ this.$set(this.workOrders, index, res.data.data);
|
|
|
this.successTempTip('处理完成');
|
|
|
this.$forceUpdate();
|
|
|
- return ;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.errorTempTip(res.data.message ? res.data.message : '处理出现异常')
|
|
|
+ }).catch(err => {
|
|
|
+ window.tempTip.cancelWaitingTip();
|
|
|
+ this.errorTempTip(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ changeWorkOrderInfo(item, column, e) {
|
|
|
+ let url = "{{route('workOrder.updateRemissionApi')}}";
|
|
|
+ let data = {
|
|
|
+ id: item.id,
|
|
|
+ column: column,
|
|
|
+ value: $(e.target).val(),
|
|
|
+ };
|
|
|
+ this.waitingTempTip('处理中');
|
|
|
+ axios.post(url, data).then(res => {
|
|
|
+ window.tempTip.cancelWaitingTip();
|
|
|
+ if (res.data.success) {
|
|
|
+ item[column] = $(e.target).val();
|
|
|
+ this.successTempTip('处理完成');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.errorTempTip(res.data.message ? res.data.message : '处理出现异常,刷新重试');
|
|
|
+ }).catch(err => {
|
|
|
+ window.tempTip.cancelWaitingTip();
|
|
|
+ this.errorTempTip(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ changeUserOwnerGroup(item, e) {
|
|
|
+ let url = "{{route('workOrder.userOwnerGroup.updateApi')}}";
|
|
|
+ let data = {
|
|
|
+ id: item.id,
|
|
|
+ user_owner_group_id: $(e.target).val(),
|
|
|
+ };
|
|
|
+ this.waitingTempTip('处理中');
|
|
|
+ axios.post(url, data).then(res => {
|
|
|
+ window.tempTip.cancelWaitingTip();
|
|
|
+ if (res.data.success) {
|
|
|
+ item.user_work_group_id = $(e.target).val();
|
|
|
+ this.successTempTip('处理完成');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.errorTempTip(res.data.message ? res.data.message : '处理出现异常,刷新后重试');
|
|
|
+ }).catch(err => {
|
|
|
+ window.tempTip.cancelWaitingTip();
|
|
|
+ this.errorTempTip(err);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ createUserWorkGroup(item, e) {
|
|
|
+ let url = "{{route('workOrder.userWorkGroups.storeApi')}}";
|
|
|
+ let data = {
|
|
|
+ id: item.id,
|
|
|
+ user_workgroup_id: $(e.target).val(),
|
|
|
+ };
|
|
|
+ this.waitingTempTip('处理中');
|
|
|
+ axios.post(url, data).then(res => {
|
|
|
+ window.tempTip.cancelWaitingTip();
|
|
|
+ if (res.data.success) {
|
|
|
+ this.successTempTip('处理完成');
|
|
|
+ item.user_work_groups = res.data.data;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.errorTempTip(res.data.message ? res.data.message : '处理出现异常,刷新后重试');
|
|
|
+ }).catch(err => {
|
|
|
+ window.tempTip.cancelWaitingTip();
|
|
|
+ this.errorTempTip(err);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ destroyUserWorkGroup(item, index, e) {
|
|
|
+ if (!confirm('确认删除?')) return;
|
|
|
+ let url = "{{route('workOrder.userWorkGroups.destroyApi')}}";
|
|
|
+ let data = {
|
|
|
+ id: item.id,
|
|
|
+ user_workgroup_id: $(e.target).val(),
|
|
|
+ };
|
|
|
+ this.waitingTempTip('处理中');
|
|
|
+ axios.post(url, data).then(res => {
|
|
|
+ window.tempTip.cancelWaitingTip();
|
|
|
+ if (res.data.success) {
|
|
|
+ this.successTempTip('处理完成');
|
|
|
+ item.user_work_groups.splice(index, 1);
|
|
|
+ return;
|
|
|
}
|
|
|
- this.errorTempTip(res.data.message ? res.data.message : '处理出现异常' )
|
|
|
- }).catch(err=>{
|
|
|
+ this.errorTempTip(res.data.message ? res.data.message : '处理出现异常,刷新后重试');
|
|
|
+ }).catch(err => {
|
|
|
+ window.tempTip.cancelWaitingTip();
|
|
|
+ this.errorTempTip(err);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getEqualsMap(item) {
|
|
|
+ let order_detail_id = item.pending_detail.id;
|
|
|
+ let url = "{{route('workOrder.commodity.equalsMapApi')}}";
|
|
|
+ let data = {
|
|
|
+ id: order_detail_id,
|
|
|
+ }
|
|
|
+ this.waitingTempTip('获取中..');
|
|
|
+ axios.post(url, data).then(res => {
|
|
|
+ window.tempTip.cancelWaitingTip();
|
|
|
+ if (res.data.success) {
|
|
|
+ this.commodityEqualsMap = res.data.data;
|
|
|
+ this.dialogCommoditiesEqualsVisible = true;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.errorTempTip(res.data.message ? res.data.message : '获取失败');
|
|
|
+ }).catch(err => {
|
|
|
window.tempTip.cancelWaitingTip();
|
|
|
this.errorTempTip(err);
|
|
|
});
|
|
|
+ },
|
|
|
+ workOrderExport(sign) {
|
|
|
+ let url = '{{route('workOrder.exportApi')}}';
|
|
|
+ let token = '{{ csrf_token() }}';
|
|
|
+ if (sign) {
|
|
|
+ excelExport(true, checkData, url, this.total, token);
|
|
|
+ } else {
|
|
|
+ excelExport(false, checkData, url, null, token);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ toggleRejectedBill() {
|
|
|
+ this.hideRejectedBills = !this.hideRejectedBills;
|
|
|
+ if(this.tableHeader !== null){
|
|
|
+ let column = this.headerColumn();
|
|
|
+ this.tableHeader.redrawHeader(column);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ headerColumn() {
|
|
|
+ let columns = [];
|
|
|
+ columns.push({name: 'id', value: '工单号', neglect: true},
|
|
|
+ {name: 'operation', value: '操作', neglect: true},
|
|
|
+ {name: 'created_at', value: '创建时间', neglect: true},
|
|
|
+ {name: 'work_type', value: '工单类型', neglect: true},
|
|
|
+ {name: 'process_progress', value: '当前进度', neglect: true},
|
|
|
+ {name: 'owner', value: '客户', neglect: true},
|
|
|
+ {name: 'shop_name', value: '店铺名称'},
|
|
|
+ {name: 'client_no', value: '客户订单号'},
|
|
|
+ {name: 'logistic_name', value: '承运人'},
|
|
|
+ {name: 'logistic_numbers', value: '快递单号'},
|
|
|
+ {name: 'status', value: '当前处理人', neglect: true},
|
|
|
+ {name: 'creator', value: '创建人'},
|
|
|
+ {name: 'remark', value: '情况说明'},
|
|
|
+ {name: 'rejectedBills', value: '展开',neglect: true,max_width:30},)
|
|
|
+ if (!this.hideRejectedBills) {
|
|
|
+ columns.push({name: 'return_logistic_number', value: '退回单号'});
|
|
|
+ @if( \Illuminate\Support\Facades\Gate::check('订单管理-工单处理-宝时编辑') || \Illuminate\Support\Facades\Gate::check('订单管理-工单处理-商家编辑') )
|
|
|
+ columns.push({name: 'rejected_bills_items', value: '退回商品详情'});
|
|
|
+ @endif
|
|
|
+ }
|
|
|
+ columns.push({
|
|
|
+ name: 'process_logs', value: '处理日志'
|
|
|
+ },
|
|
|
+ @can('订单管理-工单处理-宝时编辑')
|
|
|
+ {
|
|
|
+ name: 'order_issue_log', value: '问题件处理结果'
|
|
|
+ },
|
|
|
+ @endcan
|
|
|
+ @can('订单管理-工单处理-宝时编辑')
|
|
|
+ {
|
|
|
+ name: 'logistic_indemnity_money', value: '承运商赔偿金额'
|
|
|
+ },
|
|
|
+ {name: 'logistic_express_remission', value: '承运商快递减免'},
|
|
|
+ {name: 'bao_shi_indemnity_money', value: '宝时赔偿金额'},
|
|
|
+ {name: 'bao_shi_express_remission', value: '宝时快递减免'},
|
|
|
+ {name: 'user_work_groups', value: '仓库组责任方'},
|
|
|
+ {name: 'user_owner_group', value: '项目组责任方'},
|
|
|
+ @endcan
|
|
|
+ {
|
|
|
+ name: 'ab_operation', type: 'multi', title: "其他操作", rows: [
|
|
|
+ @can('订单管理-工单处理-删除')
|
|
|
+ {
|
|
|
+ value: "删除", col: "2"
|
|
|
+ },
|
|
|
+ {value: "查看资料", col: "10"},
|
|
|
+ @else
|
|
|
+ {
|
|
|
+ value: "查看资料", col: "12"
|
|
|
+ },
|
|
|
+ @endcan
|
|
|
+ ], neglect: true
|
|
|
+ },);
|
|
|
+ return columns;
|
|
|
}
|
|
|
},
|
|
|
});
|