| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726 |
- @extends('layouts.app')
- @section('title')快递查询-包裹管理@endsection
- @section('head')
- <style>
- .package-logistic-index {
- position: relative;
- }
- /*备注容器*/
- .order-package-remarks {
- position: relative;
- }
- /*新建按钮*/
- .btn-create-remark {
- width: 25px;
- height: 25px;
- line-height: 25px;
- text-align: center;
- position: absolute;
- display: none;
- background-color: rgb(92, 141, 236);
- border: blue solid 1px;
- color: #111;
- box-shadow: 0 0 6px #4747f1;
- float: left;
- }
- .order-package-remarks:hover .btn-create-remark {
- display: block;
- }
- /*新建输入框*/
- .remark-input {
- height: 30px;
- line-height: 30px;
- padding-left: 16px;
- margin-left: 35px;
- box-shadow: 0 0 6px #fff6a1;
- border-radius: 5px;
- }
- /*删除按钮*/
- .order-package-remarks table .destroy {
- float: right;
- position: absolute;
- right: 0;
- padding: 0 !important;
- width: 29px !important;
- min-width: 30px !important;
- border: 0 solid transparent !important;
- }
- .remark-created_at {
- border-right: none !important;
- }
- .btn-destroy-remark {
- display: none;
- background-color: rgba(0, 0, 0, 0);
- border: red solid 1px;
- color: red;
- box-shadow: 0 0 6px #ac4a4a;
- }
- .order-package-remarks table:hover .btn-destroy-remark {
- display: block;
- }
- </style>
- @stop
- @section('content')
- <div id="list" class="d-none package-logistic-index">
- <div class="container-fluid">
- <div id="form_div"></div>
- <div class="ml-3 form-inline" id="btn">
- @can('包裹管理-快递-异常类型-编辑')
- <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" @click="orderPackageExport(false)" href="javascript:">导出勾选内容</a>
- <a class="dropdown-item" @click="orderPackageExport(true)" href="javascript:">导出所有页</a>
- </div>
- </span>
- <span class="ml-1">
- <select class="form-control-sm ml-2" v-model="batchStatus">
- <option v-for="(value,index) in statuses" :value="value"
- :name="value" :key="index">@{{ value }}
- </option>
- </select>
- <button @click="batchStatusUpdate()" type="button"
- class="btn btn-sm ml-2 btn-outline-danger">批量状态修改
- </button>
- </span>
- <span class="ml-1">
- <select class="form-control-sm ml-2" v-model="batchExceptionStatus">
- <option v-for="(value,index) in exception_statuses" :value="value"
- :name="value" :key="index">@{{ value }}
- </option>
- </select>
- <button @click="batchExceptionStatusUpdate()" type="button"
- class="btn btn-sm ml-2 btn-outline-danger">批量异常状态修改
- </button>
- </span>
- <span class="ml-1">
- <!-- Button trigger modal -->
- <button
- type="button"
- class="btn btn-sm ml-2 btn-outline-info"
- data-toggle="modal" data-target="#staticBackdrop">
- 批量添加备注
- </button>
- </span>
- <span class="ml-1">
- <button type="button" class="btn btn-outline-dark btn-sm form-control-sm tooltipTarget"
- @click="copyLogisticNumber" style="background: #dad7e8;">复制快递单号</button>
- </span>
- {{-- 获取查询条件下的总条数--}}
- <span class="ml-1">
- <button type="button" class="btn btn-outline-success btn-sm form-control-sm tooltipTarget"
- @click="getTotal()"
- style="background: #dad7e8;">
- <span v-if="!total.loading">
- @{{ total.number===null?'获取总量':'总量:'+ total.number }}
- </span>
- <span v-else style="margin-left: 5px"><i class="fa fa-circle-o-notch fa-spin"></i>
- </span>
- </button>
- </span>
- @endcan
- </div>
- <table class="table table-striped table-bordered table-hover card-body td-min-width-80" id="table">
- <tr v-for="(package,i) in packages" @click="selectTr===i+1?selectTr=0:selectTr=i+1"
- :class="selectTr===i+1?'focusing' : ''">
- <td>
- <input class="checkItem" type="checkbox" :value="package.logistic_number">
- </td>
- <td>
- <span style="position:relative;line-height: 12px">
- @{{ i+1 }}
- <!-- 是否同步过 -->
- <span
- style="display: inline-block;width: 15px;height: 15px;border-radius: 50%;position: relative;top: 3px; margin-left: 3px;box-shadow: 0 0 3px #211f1f"
- :style="package.sync_routes_flag?'background-color:#4ed32d':'background-color:#e83939'"></span>
- <!-- 是否为问题件 -->
- <span class="badge badge-danger" v-if="package.order.issue">?</span>
- <!-- 是否手动修改 -->
- <span v-if="package.is_manual_update">
- <i class="fa fa-hand-paper-o" aria-hidden="true"
- style="color: red;margin-left: 5px"></i>
- </span>
- <!-- 延时发货图标 -->
- <span
- v-if="package.is_delay_deliver"
- style="margin-left: 5px">
- <i class="fa fa-circle-o-notch fa-spin"></i>
- </span>
- </span>
- </td>
- <td :style="package.exception_status=='单号异常'?'color:red':''">@{{ package.logistic_number }}</td>
- <td>@{{ package.status }}</td>
- <td>@{{ package.exception_status }}</td>
- <td>@{{ package.order != null ? package.order.logistic.name : '#' }}</td>
- <td>@{{ package.order != null ? package.order.owner.name : '#' }}</td>
- <td>@{{ package.order != null ? package.order.province : '#' }}</td>
- <td>@{{ package.created_at }}</td>
- <td>@{{ package.sent_at }}</td>
- <td>@{{ package.received_at }}</td>
- <td>@{{ package.weighed_at }}</td>
- <td>
- <div v-if="package.transfer_status && package.transfer_status.length>0"
- class="text-overflow-warp-200 up" :id="'route-'+i">
- <p v-for="route in package.transfer_status">
- @{{ route.accept_address+" "+ route.remark+" "+route.accept_time}}
- </p>
- </div>
- <div class="text-overflow-warp-200 " v-if=" package.transfer_status && !showList[i] && package.transfer_status.length > 0">
- @{{ package.transfer_status[0].accept_address+" "+ package.transfer_status[0].remark+" "+package.transfer_status[0].accept_time}}
- </div>
- <div @click="showRoute(i)" v-if="package.transfer_status && package.transfer_status.length > 1">
- <label class="text-center mt-0 p-0 cursor-pointer pull-left">
- <span class="fa"
- :class="package.isShowTransferStatus ? 'fa-angle-double-down' : 'fa-angle-double-right'"></span>
- <span v-if="package.transfer_status && showList[i]">收起</span><span
- v-else>展开</span> @{{ package.transfer_status.length }} 条
- </label>
- </div>
- </td>
- <!--退件状态-->
- <td>@{{ package.rejected_bill?'有':'无' }}</td>
- <td>@{{ package.order && package.order.oracle_d_o_c_order_header && package.order.oracle_d_o_c_order_header.notes }}</td>
- <td class="m-0 p-0 order-package-remarks" style="padding-left: 0 !important;padding-right: 0 !important">
- @can('包裹管理-快递-客服备注')
- <label :for="'create_remark_'+package.id" class="btn-create-remark" @click="package.input_remark=!package.input_remark">
- 新
- </label>
- <input :id="'create_remark_'+package.id" @keyup.enter="submitRemark(package)" v-model="remark" v-show="package.input_remark" type="text" class="remark-input">
- <table class="table m-0 p-0 ">
- <tr v-show="package.order_package_remarks.length > 0 && package.showMoreRemark===true" v-for="(item,index) of package.order_package_remarks" :key="item.id">
- <td :title="item.content" style="width: 100px;overflow:hidden !important;">@{{ item.content }}</td>
- <td class="text-secondary">@{{ item.user.name }}</td>
- <td class="text-secondary remark-created_at">@{{ item.created_at }}</td>
- <td class="destroy"><button class="btn-destroy-remark" @click="destroyRemark(package,item.id)">删</button></td>
- </tr>
- <tr v-show="(!package.showMoreRemark) && package.order_package_remarks.length > 0" >
- <td :title="package.order_package_remarks[0]? package.order_package_remarks[0].content:''" style="width: 100px;overflow:hidden !important;">@{{ package.order_package_remarks[0]?package.order_package_remarks[0].content:'' }}</td>
- <td class="text-secondary">@{{ package.order_package_remarks[0]?package.order_package_remarks[0].user.name:'' }}</td>
- <td class="text-secondary remark-created_at">@{{ package.order_package_remarks[0]?package.order_package_remarks[0].created_at:'' }}</td>
- <td class="destroy"><button class="btn-destroy-remark" @click="destroyRemark(package,package.order_package_remarks[0].id)">删</button></td>
- </tr>
- </table>
- <div
- class="float-left"
- @click="package.showMoreRemark = !package.showMoreRemark" v-show="package.order_package_remarks && package.order_package_remarks.length > 1">
- <label class="text-center mt-0 p-0 cursor-pointer pull-left">
- <span class="fa"
- :class="package.showMoreRemark ? 'fa-angle-double-down' : 'fa-angle-double-right'"></span>
- <span v-if="package.order_package_remarks && package.showMoreRemark">收起</span><span
- v-else>展开</span> @{{ package.order_package_remarks.length }} 条
- </label>
- </div>
- @endcan
- </td>
- <td class="text-overflow-warp-200"><span v-if="package.order && package.order.issue">@{{ package.order.issue.result_explain }}</span>
- </td>
- <td class="text-overflow-warp-200"><span
- v-if="package.order && package.order.issue && package.order.issue.issue_type">@{{ package.order.issue.issue_type.name }}</span>
- </td>
- <td class="text-overflow-warp-200">@{{ package.order && package.order.batch &&
- package.order.batch.wms_type }}
- </td>
- <td class="text-overflow-warp-200">@{{ package.order && package.order.oracle_d_o_c_order_header &&
- package.order.oracle_d_o_c_order_header.waveno }}
- </td>
- <td class="text-overflow-warp-200"><span
- v-if="package.order && package.order.issue && package.order.issue.logs.length >0"><span
- v-for="log in package.order.issue.logs">@{{ log.content }}<br></span></span></td>
- <td class="text-overflow-warp-200"><span
- v-if="package.order && package.order.issue && package.order.issue.logs.length >0"><span
- v-for="log in package.order.issue.logs">@{{ log && log.user && log.user.name }}<br></span></span>
- </td>
- <td class="text-overflow-warp-200"><span
- v-if="package.order && package.order.issue && package.order.issue.logs.length >0"><span
- v-for="log in package.order.issue.logs">@{{ log.created_at }}<br></span></span></td>
- </tr>
- </table>
- {{-- <div class="text-info h5 btn btn">{{$orderPackages->count()}}/{{$orderPackages->total()}}</div>--}}
- {{$orderPackages->appends($paginateParams)->links()}}
- <!-- Modal -->
- <div class="modal fade" id="staticBackdrop" data-backdrop="static" data-keyboard="false" tabindex="-1"
- aria-labelledby="staticBackdropLabel" aria-hidden="true" z-index="51">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title" id="staticBackdropLabel">添加备注</h5>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
- <span aria-hidden="true">×</span>
- </button>
- </div>
- <div class="modal-body">
- <div class="form-group">
- <textarea v-model="bench_remark" style="width:80%;margin: 0 auto;" class="form-control"
- id="exampleFormControlTextarea1" rows="3"></textarea>
- </div>
- </div>
- <div class="modal-footer">
- <button @click="bench_remark = ''" type="button" class="btn btn-secondary"
- data-dismiss="modal">关闭
- </button>
- <button @click="submitBenchRemark" type="button" class="btn btn-primary">提交</button>
- </div>
- </div>
- </div>
- </div>
- </div>
- <textarea id="clipboardDiv" style="opacity:0"></textarea>
- </div>
- @endsection
- @section('lastScript')
- <script type="text/javascript" src="{{mix('js/queryForm/export.js')}}"></script>
- <script type="text/javascript" src="{{mix('js/queryForm/queryForm.js')}}"></script>
- <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版2--}}
- <script>
- let vue = new Vue({
- el: "#list",
- data: {
- total: {
- number: null,
- loading: false
- },
- packages: [
- @foreach($orderPackages as $package)
- {!! $package !!},
- @endforeach
- ],
- logistics: [
- @foreach($logistics as $logistic)
- {
- name: '{{$logistic->id}}', value: '{{$logistic->name}}'
- },
- @endforeach
- ],
- owners: [
- @foreach($owners as $owner)
- {
- name: '{{$owner->id}}', value: '{{$owner->name}}'
- },
- @endforeach
- ],
- showList: {},
- showRemarkList: {},
- selectTr: 0,
- statuses: [
- '生成订单',
- '已复核',
- '已称重',
- '已揽件',
- '在途',
- '派送中',
- '已签收',
- '其他',
- '返回中',
- ],
- exception_statuses: [
- '单号异常',
- '无法获取路由',
- '延迟发货',
- '疑似库内丢件',
- '在途异常',
- '揽件异常',
- '派送异常'
- ],
- batchStatus: null,
- batchExceptionStatus: null,
- remarkHover: null,
- remark: null,
- isShowRemarkInput: false,
- showBenchRemarkWrapper: false,
- bench_remark: '',
- },
- created() {
- $.each(this.packages, function (index, item) {
- item.isShowTransferStatus = false;
- item.isShowRemark = false;
- if (item.transfer_status != null && item.transfer_status.length > 1) {
- item.transfer_status.sort(function (item1, item2) {
- let date1 = new Date(item1.accept_time);
- let date2 = new Date(item2.accept_time);
- if (date1 - date2 > 0) return -1;
- if (date1 - date2 < 0) return 1;
- return 0;
- });
- }
- });
- },
- mounted() {
- $('#list').removeClass('d-none');
- let _this = this;
- $(".up").slideUp();
- let data = [
- [
- {name: 'logistic_number', type: 'input', tip: '可支持多快递单号,糊模查找需要在右边打上%符号', placeholder: '快递单号'},
- {name: 'remark', type: 'input', tip: '糊模查找需要在右边打上%符号', placeholder: '客服备注'},
- {name: 'result_explain', type: 'input', tip: '糊模查找需要在右边打上%符号', placeholder: '情况说明'},
- {
- name: 'status',
- type: 'select_multiple_select',
- tip: ['输入关键词快速定位下拉列表,回车确定', '选择要显示的状态'],
- placeholder: ['状态', '定位或多选状态'],
- data: [
- {name: '0', value: '空'},
- {name: '1', value: '生成订单'},
- {name: '2', value: '已复核'},
- {name: '3', value: '已称重'},
- {name: '4', value: '已揽件'},
- {name: '5', value: '在途'},
- {name: '6', value: '派送中'},
- {name: '7', value: '已签收'},
- {name: '8', value: '其他'},
- {name: '9', value: '返回中'},
- ]
- },
- {name: 'sent_at_start', type: 'dateTime', tip: '选择显示发出时间的起始时间'},
- {
- name: 'is_weighed',
- type: 'select',
- tip: ['输入关键词快速定位下拉列表,回车确定', '选择要显示的状态'],
- placeholder: '是否称重',
- data: [{name: false, value: '无'}, {name: true, value: '已称重'}]
- },
- {name: 'received_at_start', type: 'dateTime', tip: '选择显示收货时间的起始时间'},
- {
- name: 'is_customer_service_remark',
- type: 'select',
- tip: ['输入关键词快速定位下拉列表,回车确定', '选择要显示的状态'],
- placeholder: ['客服备注'],
- data: [
- {name: '是', value: '是'},
- {name: '否', value: '否'},
- ]
- },
- {name: 'customer_service_remark_created_at_start', type: 'dateTime', tip: '选择显示客服备注时间的起始时间'},
- ],
- [
- {
- name: 'logistic',
- type: 'select_multiple_select',
- tip: ['输入关键词快速定位下拉列表,回车确定', '选择要显示的快递'],
- placeholder: ['快递', '定位或多选快递'],
- data: _this.logistics
- },
- {
- name: 'owner',
- type: 'select_multiple_select',
- tip: ['输入关键词快速定位下拉列表,回车确定', '选择要显示的货主'],
- placeholder: ['货主', '定位或多选货主'],
- data: _this.owners
- },
- {
- name: 'has_transfer_status',
- type: 'select',
- tip: ['输入关键词快速定位下拉列表,回车确定', '选择要显示的状态'],
- placeholder: '是否有物流信息',
- data: [{name: '是', value: '是'}, {name: '否', value: '否'}]
- },
- {
- name: 'sync_routes_flag',
- type: 'select',
- tip: ['输入关键词快速定位下拉列表,回车确定', '选择要显示的状态'],
- placeholder: '是否有查询记录',
- data: [{name: true, value: '是'}, {name: false, value: '否'}]
- },
- {name: 'sent_at_end', type: 'dateTime', tip: '选择显示发出时间的截止时间'},
- {
- name: 'is_issue',
- type: 'select',
- tip: ['输入关键词快速定位下拉列表,回车确定', '选择要显示的状态'],
- placeholder: '是否为问题件',
- data: [{name: '是', value: '是'}, {name: '否', value: '否'}]
- },
- {name: 'received_at_end', type: 'dateTime', tip: '选择显示收货时间的截止时间'},
- {
- name: 'is_new_rejecting',
- type: 'select',
- tip: ['输入关键词快速定位下拉列表,回车确定', '选择要显示的状态'],
- placeholder: '退件状态',
- data: [{name: '无', value: '无'}, {name: '有', value: '有'}]
- },
- {name: 'customer_service_remark_created_at_end', type: 'dateTime', tip: '选择显示客服备注时间的起始时间'},
- ],
- [
- {
- name: 'issue_type_name',
- type: 'select',
- tip: ['输入关键词快速定位下拉列表,回车确定', '选择要显示的状态'],
- placeholder: '问题类型',
- data: [
- {name: '拦截', value: '拦截'},
- {name: '快递异常', value: '快递异常'},
- {name: '信息更改', value: '信息更改'},
- {name: '联系不上', value: '联系不上'},
- {name: '其他', value: '其他'},
- {name: '错漏发', value: '错漏发'},
- {name: '仓库问题', value: '仓库问题'},
- {name: '快递丢件', value: '快递丢件'},
- {name: '破损', value: '破损'},
- {name: '撤销丢件', value: '撤销丢件'},
- {name: '二次加工', value: '二次加工'},
- {name: '全检问题', value: '全检问题'},
- {name: '系统问题', value: '系统问题'},
- {name: '延迟发货', value: '延迟发货'},
- {name: '仓库丢件', value: '仓库丢件'},
- {name: '快递方式更改', value: '快递方式更改'},
- {name: '无记录', value: '无记录'},
- ]
- },
- {name: 'order_notes', type: 'input', tip: '糊模查找需要在右边打上%符号', placeholder: '订单备注'},
- {
- name: 'exception_status',
- type: 'select_multiple_select',
- tip: ['输入关键词快速定位下拉列表,回车确定', '选择要显示的异常'],
- placeholder: ['异常', '定位或多选异常'],
- data: [
- {name: '1', value: '单号异常'},
- {name: '2', value: '无法获取路由'},
- {name: '3', value: '延迟发货'},
- {name: '4', value: '疑似库内丢件'},
- {name: '5', value: '在途异常'},
- {name: '6', value: '揽件异常'},
- {name: '7', value: '派送异常'},
- ]
- },
- {name: 'default_date', type: 'checkbox', tip: '默认15天', data: [{name: 'ture', value: '默认15天'}]},
- {
- name: 'default_logistics',
- type: 'checkbox',
- tip: '默认承运商',
- data: [{name: 'ture', value: '默认承运商'}]
- },
- {name: 'virtual_receive', type: 'checkbox', tip: '虚拟揽收', data: [{name: 'ture', value: '虚拟揽收'}]},
- ]
- ];
- _this.form = new query({
- el: '#form_div',
- condition: data,
- appendDom: "btn",
- });
- _this.form.init();
- let column = [
- {name: 'index', value: '序号', neglect: true},
- {name: 'logistic_number', value: '单号'},
- {name: 'status', value: '状态'},
- {name: 'exception_status', value: '异常状态'},
- {name: 'logistic_name', value: '快递公司'},
- {name: 'owner_name', value: '货主'},
- {name: 'province', value: '省份'},
- {name: 'created_at', value: '订单生成日期'},
- {name: 'sent_at', value: '发出日期'},
- {name: 'received_at', value: '收货日期'},
- {name: 'weighed_at', value: '称重日期'},
- {name: 'transfer_status', value: '快递路由'},
- {name: 'is_new_rejecting', value: '退件状态'},
- {name: 'order_notes', value: '订单备注'},
- {name: 'remark', value: '客服备注'},
- {name: 'result_explain', value: '情况说明'},
- {name: 'issue_type', value: '问题类别'},
- {name: 'wms_type', value: '波次规则'},
- {name: 'wave_no', value: '波次号'},
- {name: 'content', value: '说明'},
- {name: 'operation_name', value: '操作者'},
- {name: 'operation_date', value: '时间'},
- ];
- new Header({
- el: "table",
- name: "package",
- column: column,
- data: this.packages,
- restorationColumn: 'addtime',
- fixedTop: ($('#form_div').height()) + ($('#btn').height()) + 1,
- }).init();
- },
- methods: {
- //获取查询条件下的总条数
- getTotal() {
- if (!this.total.loading) {
- this.total.loading = true
- let query = "{{ request()->getQueryString() }}";
- query = query.replace(/amp;/g, "");
- let url = "{{ url()->current() }}";
- url += `/getTotal?${query}`;
- axios.get(url).then(res => {
- this.$forceUpdate();
- let responseData = res.data;
- if (responseData.success) {
- this.total.number = responseData.data.total;
- this.total.loading = false
- tempTip.showSuccess('获取总量成功!');
- }
- }).catch(e => {
- this.total.loading = false
- tempTip.show(`获取异常请稍后再试!${e}`);
- });
- } else {
- tempTip.show(`点击过于频繁请稍后再试!${e}`);
- }
- },
- showRoute(id) {
- if (this.showList[id]) {
- this.$set(this.showList, id, false);
- $("#route-" + id).slideUp();
- } else {
- this.$set(this.showList, id, true);
- $("#route-" + id).slideDown();
- }
- this.$forceUpdate();
- },
- showRemarkItem(id) {
- if (this.showRemarkList[id]) {
- this.$set(this.showRemarkList, id, false);
- $("#remark-" + id).slideUp();
- } else {
- this.$set(this.showRemarkList, id, true);
- $("#remark-" + id).slideDown();
- }
- this.$forceUpdate();
- },
- batchStatusUpdate() {
- if (!confirm('是否却认操作')) return;
- let _this = this;
- if (checkData.length === 0) {
- tempTip.show('没有勾选记录');
- return
- }
- axios.put('{{url('package/logistic/batchUpdate')}}', {
- status: this.batchStatus,
- logistic_numbers: checkData
- }).then(() => {
- tempTip.setDuration(1000);
- tempTip.showSuccess('批量状态成功');
- location.reload();
- })
- },
- batchExceptionStatusUpdate() {
- if (!confirm('是否却认操作')) return;
- let _this = this;
- if (checkData.length === 0) {
- tempTip.show('没有勾选记录');
- return
- }
- axios.put('{{url('package/logistic/batchUpdate')}}', {
- exceptionStatus: this.batchExceptionStatus,
- logistic_numbers: checkData
- }).then(() => {
- tempTip.setDuration(1000);
- tempTip.showSuccess('批量异常状态成功');
- location.reload();
- })
- },
- submitBenchRemark() {
- let _this = this;
- if (checkData.length === 0) {
- tempTip.show('没有勾选记录');
- return
- }
- axios.post('{{url('apiLocal/package/logistic/benchRemark')}}', {
- remark: this.bench_remark,
- logistic_numbers: checkData
- }).then(() => {
- location.reload();
- })
- },
- submitRemark(orderPackage) {
- if (this.remark === null) {
- return
- }
- let url = '{{url('apiLocal/package/logistic/')}}';
- let _this = this;
- tempTip.setDuration(2000);
- tempTip.showSuccess('正在操作请稍后!');
- axios.put(url, {remark: _this.remark, orderPackageId: orderPackage.id}).then(response => {
- if (response.data.success) {
- orderPackage.order_package_remarks = response.data.data
- tempTip.setDuration(2000);
- tempTip.showSuccess('成功!');
- _this.remark = '';
- orderPackage.input_remark = false;
- } else {
- tempTip.setDuration(5000);
- tempTip.show(response.data.fail_info);
- }
- }).catch(function (err) {
- tempTip.setDuration(3000);
- tempTip.show("网络错误:" + err)
- });
- },
- destroyRemark(orderPackage, remarkId) {
- let url = '{{url('apiLocal/package/logistic/delete')}}';
- if (!confirm('是否却认删除', false)) {
- return;
- }
- ;
- let _this = this;
- tempTip.setDuration(2000);
- tempTip.showSuccess('正在操作请稍后!');
- axios.post(url, {orderPackageId: orderPackage.id, remarkId: remarkId}).then(response => {
- if (response.data.success) {
- orderPackage.order_package_remarks = response.data.data
- tempTip.setDuration(2000);
- tempTip.showSuccess('成功!');
- } else {
- tempTip.setDuration(5000);
- tempTip.show(response.data.fail_info);
- }
- }).catch(function (err) {
- tempTip.setDuration(3000);
- tempTip.show("网络错误:" + err)
- });
- },
- copyLogisticNumber() {
- if (checkData.length === 0) {
- tempTip.show('没有勾选');
- return;
- }
- this.copyText(checkData.join('\n'));
- },
- copyText(text) {
- try {
- $('#clipboardDiv').text(text).select().focus();
- document.execCommand("Copy");
- tempTip.setIndex(1052)
- tempTip.setDuration(2000)
- tempTip.showSuccess('复制成功')
- } catch (e) {
- tempTip.setIndex(1052)
- tempTip.setDuration(2000)
- tempTip.showSuccess('复制失败:' + e)
- }
- },
- orderPackageExport(sign) {
- let url = '{{url('package/logistic/export')}}';
- let token = '{{ csrf_token() }}';
- if (sign) {
- excelExport(true, checkData, url, this.total, token);
- } else {
- excelExport(false, checkData, url, null, token);
- }
- },
- },
- filters: {
- toObjected: function (value) {
- return JSON.parse(value);
- }
- },
- });
- </script>
- @endsection
|