| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618 |
- @extends('layouts.app')
- @section('title')问题件-查询@endsection
- @section('content')
- @component("order.issue.menu")@endcomponent
- <div class="container-fluid" id="issue_div">
- <div style="min-width: 2000px;">
- <div id="list" class="d-none" style="min-width: 4000px">
- <div id="form_div" style="min-width: 2250px;" class="bg-white"></div>
- <div class="form-inline mt-1">
- <span class="dropdown">
- <button type="button" class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget" :class="[checkData.length>0?'btn-dark text-light':'']"
- data-toggle="dropdown" title="导出所有页将会以搜索条件得到的过滤结果,将其全部记录(每一页)导出">导出Excel
- </button>
- <div class="dropdown-menu">
- <a class="dropdown-item" @click="orderIssueExport(false)" href="javascript:">导出勾选内容</a>
- <a class="dropdown-item" @click="orderIssueExport(true)" href="javascript:">导出所有页</a>
- </div>
- </span>
- <span class="ml-1">
- <button type="button" class="btn btn-outline-dark btn-sm form-control-sm tooltipTarget" @click="endOrderIssue()" :class="[checkData.length>0?'btn-dark text-light':'']">完结</button>
- </span>
- <span class="ml-1">
- <button type="button" class="btn btn-outline-dark btn-sm form-control-sm tooltipTarget" @click="copyOrderNo()" >复制快递单号</button>
- </span>
- </div>
- <table class="table table-sm table-striped table-bordered table-hover card-body "
- style="background: #fff;">
- <tr>
- <th class="bg-white font-weight-bolder" colspan="3"></th>
- <th class=" text-center font-weight-bolder" colspan="15">原始运单号</th>
- <th class="bg-white text-center font-weight-bolder" colspan="15">情况说明</th>
- <th></th>
- </tr>
- <tr>
- <th>
- <label for="all">
- <input id="all" type="checkbox" @click="checkAll($event)"/>
- </label>
- </th>
- <th class="">序号</th>
- @can("订单管理-问题件-置顶")
- <th class="" style="width: 60px">置顶</th>
- @endcan
- <th class="">ID</th>
- <th class="">处理状态</th>
- <th class="">登记日期</th>
- <th class="">订单日期</th>
- <th class="">客户</th>
- <th class="">店铺</th>
- <th class="">原始订单号</th>
- <th class="">原始承运商</th>
- <th class="">原始运单号</th>
- <th class="" style="min-width: 90px">收货人名称</th>
- <th class="">收货人电话</th>
- <th class="" style="min-width: 70px">省</th>
- <th class="" style="min-width: 70px">市</th>
- <th class="" style="min-width: 70px">区</th>
- <th class="">收货人地址</th>
- <th class="">原始商品明细</th>
- <th class="bg-white">返回商品明细</th>
- <th class="bg-white">退单状态</th>
- <th class="bg-white">情况说明</th>
- <th class="bg-white">问题类别</th>
- <th class="bg-white">处理结果说明</th>
- <th class="bg-white">二次订单号</th>
- <th class="bg-white">二次承运商</th>
- <th class="bg-white">二次运单号</th>
- <th class="bg-white">二次商品明细</th>
- <th class="bg-white">最终转态</th>
- <th class="bg-white">承运商赔偿金额</th>
- <th class="bg-white">承运商快递减免</th>
- <th class="bg-white">宝石赔偿金额</th>
- <th class="bg-white">宝石快递减免</th>
- <th class="bg-white">事故责任方</th>
- <th>操作</th>
- </tr>
- <tr v-for="(orderIssue,index) in orderIssues" @click="selectedColor(orderIssue.id)" v-if="orderIssues">
- <td>
- <input class="checkItem" type="checkbox" :value="orderIssue.id" v-model="checkData">
- </td>
- <td class="">@{{index+1}}</td>
- @can("订单管理-问题件-置顶")
- <td class="td-warm text-muted" v-if="orderIssue.top" >
- <button type="button" class="btn btn-sm btn-outline-danger "
- @click="cancelOnTop($event)" :data_id="orderIssue.id" style="opacity: 0.75">取消
- </button>
- </td>
- <td v-else>
- <button type="button" class="btn btn-sm btn-outline-secondary"
- @click="OrderIssueOnTop($event)" :data_id="orderIssue.id" style="opacity: 0.75">置顶
- </button>
- </td>
- @endcan
- <td class="">@{{ orderIssue.id }}</td>
- <td class="">@{{ orderIssue.handle_status }}</td>
- <td class="">@{{ orderIssue.created_at }}</td>
- <td class="">@{{ orderIssue.order.created_at }}</td>
- <td class="">
- <template v-if='orderIssue.order.owner'>
- @{{ orderIssue.order.owner.name }}
- </template>
- </td> <!--客户-->
- <td class=""><template v-if="orderIssue.order.shop">@{{ orderIssue.order.shop.name }}</template> </td>
- <td class="">@{{ orderIssue.order.code }} </td>
- <td class="">
- <template v-if='orderIssue.order.logistic'>
- @{{ orderIssue.order.logistic.name }}
- </template>
- </td>
- <td class=" hide-content p-0" :id="orderIssue.id+'logisticNumbers'" valign="middle" align="center">
- <p v-for="logisticNumber in orderIssue.order.logisticNumbers"
- class="m-0 p-0 text-center text-muted " :class="orderIssue.order.logisticNumbers.length >1 ? 'toggle-content':'' ">@{{ logisticNumber }}</p>
- <button v-if="orderIssue.order.logisticNumbers.length > 1" type="button"
- class="btn btn-sm btn-outline-primary hint-btn text-center align-middle mt-1"
- @click="toggleNumber($event)" :data-value="orderIssue.id+'logisticNumbers'">
- 分箱@{{ orderIssue.order.logisticNumbers.length }}件,点击展开
- </button>
- </td>
- <td class="">@{{ orderIssue.order.consignee_name }}</td>
- <td class="">@{{ orderIssue.order.consignee_phone }}</td>
- <td class="">@{{ orderIssue.order.province }}</td>
- <td class="">@{{ orderIssue.order.city }}</td>
- <td class="">@{{ orderIssue.order.district }}</td>
- <td class="" ><p class="text-wrap" style="width: 350px">@{{ orderIssue.order.address }}</p></td>
- <td class=" p-0" :id="orderIssue.id+'items'" valign="middle" align="center" >
- <table v-if="orderIssue.order.packages.length > 0" class="table table-sm toggle-table m-0">
- <tr>
- <th>条码</th><th>商品名</th><th>数量</th>
- </tr>
- <template v-for="package in orderIssue.order.packages">
- <tr v-for="packageCommodity in package.commodities" class="toggle-content">
- <td>@{{ packageCommodity.commodity.sku }}</td>
- <td>@{{ packageCommodity.commodity.name }}</td>
- <td>@{{ packageCommodity.amount }}</td>
- </tr>
- </template>
- </table>
- <button v-if="orderIssue.order.packages.length > 1" type="button"
- class="btn btn-sm btn-outline-primary hint-btn text-center align-middle mt-1"
- @click="toggleTable($event)" :data-value="orderIssue.id+'items'">共有@{{ orderIssue.order.logisticNumbers.length }}件商品,点击展开
- </button>
- </td>
- <td class="bg-white" :id="orderIssue.id+'rejectedBill'" valign="middle" align="center">
- <div v-if="orderIssue.rejectedBill">
- <table v-if="orderIssue.rejectedBill.items" class="table table-sm toggle-table m-0">
- <tr>
- <th>条码</th>
- <th>商品名</th>
- <th>数量</th>
- <th>是否正品</th>
- <th>备注</th>
- </tr>
- <tr v-for="item in orderIssue.rejectedBill.items">
- <td>@{{ item.barcode_goods }}</td>
- <td>@{{ item.name_goods }}</td>
- <td>@{{ item.amount }}</td>
- <td>@{{ item.validity_at }}</td>
- <td>@{{ item.remark }}</td>
- </tr>
- </table>
- <button v-if="orderIssue.order.packages.length > 1" type="button"
- class="btn btn-sm btn-outline-primary hint-btn text-center align-middle mt-1"
- @click="toggleTable($event)" :data-value="orderIssue.id+'rejectedBill'">共有@{{ orderIssue.rejectedBill.items.length }}件商品,点击展开
- </button>
- </div>
- </td>
- <td class="bg-white">@{{ orderIssue.rejecting_status }}</td>
- <td class="bg-white" :id="orderIssue.id+'packages'" valign="middle" align="center">
- <template v-if="orderIssue.logs">
- <table v-if="orderIssue.logs" class="table table-sm toggle-table m-0">
- <tr>
- <th>内容</th><th>类型</th><th>操作人</th>
- </tr>
- <tr v-if="orderIssue.logs" v-for="log in orderIssue.logs" class="toggle-content">
- <td>log.content</td>
- <td>log.type</td>
- <td>log.user.name</td>
- </tr>
- </table>
- <button v-if="orderIssue.logs.length > 1" type="button"
- class="btn btn-sm btn-outline-primary hint-btn text-center align-middle mt-1"
- @click="toggleTable($event)" :data-value="orderIssue.id+'packages'">共有@{{ orderIssue.logs.length }}件商品,点击展开
- </button>
- </template>
- </td> {{--情况说明--}}
- <td class="bg-white">
- <p v-if="orderIssue.order_issue_type">@{{ orderIssue.order_issue_type}}</p>
- </td>
- <td class="bg-white">@{{ orderIssue.result_explain }}</td>
- <td class="bg-white"><p v-if="orderIssue.secondOrder"> @{{ orderIssue.secondOrder.code }}</p></td>
- <td class="bg-white"><p v-if="orderIssue.secondOrder"> @{{ orderIssue.secondOrder.logistic_id }}</p></td>
- <td class="bg-white"><p v-if="orderIssue.secondOrder"> @{{ orderIssue.secondOrder.logistic_number}}</p></td>
- <td class="bg-white"><p v-if="orderIssue.secondOrder"> @{{ orderIssue.secondOrder.code }}</p></td>
- <td class="bg-white">@{{ orderIssue.final_status }}</td>
- <td class="bg-white">@{{ orderIssue.logistic_indemnity_money }}</td>
- <td class="bg-white">@{{ orderIssue.logistic_express_remission }}</td>
- <td class="bg-white">@{{ orderIssue.baoshi_indemnity_money }}</td>
- <td class="bg-white">@{{ orderIssue.baoshi_express_remission }}</td>
- <td class="bg-white"></td>
- <td>
- <button type="button" class="btn btn-sm btn-outline-primary" @click="editOrderIssue($event)" :data-value="orderIssue.id">改</button>
- <button type="button" class="btn btn-sm btn-outline-danger" @click="deleteOrderIssue($event)" :data-value="orderIssue.id">删</button>
- </td>
- </tr>
- </table>
- <a :href="page.prevPageUrl" class="btn btn-sm" :class="page.curPage === 1 ?'':'btn-outline-primary'" :disabled="page.curPage === 1">上一页</a>
- <a :href="page.nextPageUrl" class="btn btn-sm" :class="page.curPage === page.lastPage ?'':'btn-outline-primary'" :disabled="page.curPage === page.lastPage" >下一页</a>
- <input @keyup.enter="pageTurning($event)" class="form-control-sm ml-3 tooltipTarget" :placeholder="'当前页数:'+page.curPage+'/'+page.lastPage" title="去往指定页">
- <span class="text-muted m-1">共 @{{page.total}} 条 </span>
- </div>
- </div>
- {{--deleteOrderIssue--}}
- <div class="modal fade" id="alertModal" tabindex="-1" role="dialog" aria-labelledby="alertModalLabel" aria-hidden="true">
- <div class="modal-dialog modal-dialog-centered">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title" id="exampleModalLabel">提示</h5>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close" @click="changeDeleteId">
- <span aria-hidden="true">×</span>
- </button>
- </div>
- <div class="modal-body">
- <p>是否删除当前订单问题件?</p>
- <input type="hidden" id = "deleteId" class="form-control" />
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-secondary" data-dismiss="modal" @click="changeDeleteId">取消</button>
- <button type="button" class="btn btn-primary" data-dismiss="modal" @click="deleteOrderIssueById">确认</button>
- </div>
- </div>
- </div>
- </div>
- {{--OrderIssue On Top--}}
- <div class="modal fade " id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
- <div class="modal-dialog modal-dialog-centered">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title" id="exampleModalLabel">请输入置顶备注</h5>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close" @click="changeRemark">
- <span aria-hidden="true">×</span>
- </button>
- </div>
- <div class="modal-body">
- <input type="hidden" class="form-control" id="onTopId">
- <textarea type="text" class="form-control" required id="remark" @change="changeRemark" ></textarea>
- <div class="invalid-feedback">
- 备注信息不能为空
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal" @click="changeRemark" >关闭</button>
- <button type="button" class="btn btn-sm btn-primary" @click="submitOnTop">提交</button>
- </div>
- </div>
- </div>
- </div>
- </div>
- @endsection
- @section('lastScript')
- <style type="text/css">
- .bg-light-yellow {
- background: #fffff8;
- }
- .top {
- padding-top: 0px;
- padding-left: 10px;
- margin-top: -4px;
- margin-left: -5px;
- line-height: 55px;
- position: absolute;
- animation: anima;
- animation-duration: 3s;
- animation-timing-function: cubic-bezier(0, 0, 1, 1);
- animation-direction: alternate;
- animation-play-state: running;
- -webkit-animation-name: anima;
- -webkit-animation-duration: 3s;
- -webkit-animation-timing-function: cubic-bezier(0, 0, 1, 1);
- -webkit-animation-iteration-count: infinite;
- -webkit-animation-direction: alternate;
- -webkit-animation-play-state: running;
- }
- </style>
- <script type="text/javascript" src="{{asset('js/queryForm/queryForm.js')}}"></script>
- <script type="text/javascript" src="{{asset('js/queryForm/export.js')}}"></script>
- <script>
- let listVue = new Vue({
- el: '#issue_div ',
- data: {
- orderIssues: {!! $orderIssues->toJson() !!}['data'],
- owners: [
- @foreach($owners as $owner)
- {name: '{{ $owner->id }}', value: '{{ $owner->name}}'},
- @endforeach
- ],
- checkData: [],
- from: '',
- finalStatus: [{name: '0', value: '已解决'}, {name: '1', value: '待退回'}, {name: '2', value: '退回中'}],
- selectedStyle: '',
- deleteId:'',
- page:{
- lastPage:{!! $orderIssues->toJson() !!}['last_page'],
- curPage:{!! $orderIssues->toJson() !!}['current_page'],
- total:{!! $orderIssues->toJson() !!}['total'],
- nextPageUrl:{!! $orderIssues->toJson() !!}['next_page_url'],
- prevPageUrl:{!! $orderIssues->toJson() !!}['prev_page_url'],
- lastPageUrl:{!! $orderIssues->toJson() !!}['last_page_url'],
- },
- onTopId:0,
- },
- mounted: function () {
- $('.tooltipTarget').tooltip({'trigger': 'hover'});
- $('#list').removeClass("d-none");
- let _this = this;
- let final_status = [{name:'0',value:'已解决'},{name:'1',value:'待退回'},{name:'2',value:'退回中'}];
- let data = [[
- {name: 'created_at_start', type: 'dataTime', tip: '订单开始日期'},
- {name: 'owner_id',type: 'select_multiple_select',tip: ['输入关键词快速定位下拉列表,回车确定','选择要显示的客户'], placeholder:['货主','定位或多选货主'],data: _this.owners},
- {name: 'final_status', type: 'select', tip: '问题件的最终状态', placeholder: '最终状态', data: final_status},
- {name: 'handle_status', type: 'checkbox', tip: '是否已完结', data: [{name: '2', value: '已完结'}]},
- ], [
- {name: 'created_at_end', type: 'dataTime', tip: '订单结束日期'},
- {name: 'logistic_indemnity_money', type: 'input', tip: '承运商赔偿金额', placeholder: '承运商赔偿金额'},
- @can('客户不可见')
- {name: 'baoshi_express_remission', type: 'input', tip: '宝时赔偿金额', placeholder: '宝时赔偿金额'},
- @endcan
- ]];
- this.form = new query({
- el: '#form_div',
- condition: data,
- })
- this.form.init();
- $('.table_tr').hide();
- $('.hideItems').hide();
- $('.toggle-content').hide();
- $('.toggle-table').hide();
- },
- watch:{
- checkData:{
- handler(){
- if (this.checkData.length === this.orderIssues.length){
- document.querySelector('#all').checked = true;
- }else {
- document.querySelector('#all').checked = false;
- }
- },
- deep:true
- },
- },
- methods: {
- selectedColor(orderno) {
- if (orderno === this.selectedStyle) {
- this.selectedStyle = '';
- return;
- }
- this.selectedStyle = orderno;
- },
- showItems($event) {
- let id = $($event.target).attr('data-value');
- let table = $('#' + 'id' + 'itemsTable');
- table.find('.table_tr').show();
- $('#' + 'id' + 'hide').show();
- },
- hideItems($event) {
- let id = $($event.target).attr('data-value');
- let table = $('#' + 'id' + 'itemsTable');
- table.find('.table_tr').hide();
- $('#' + 'id' + 'show').show();
- },
- toggleNumber($event) {
- let tr = $('#' + $($event.target).attr('data-value'));
- let toggleContent = tr.find('.toggle-content');
- let hintBtn = tr.find('.hint-btn');
- if (toggleContent.is(':hidden')) {
- toggleContent.show();
- hintBtn.text('点击收起');
- } else {
- toggleContent.hide();
- hintBtn.text('分箱 ' + toggleContent.length + ' 件,点击展开');
- }
- },
- toggleTable($event) {
- let tr = $('#' + $($event.target).attr('data-value'));
- let table = tr.find('.table');
- let toggleContent = tr.find('.toggle-content');
- let hintBtn = tr.find('.hint-btn');
- if (table.is(':hidden')) {
- table.show();
- toggleContent.show();
- hintBtn.text('点击收起');
- } else {
- table.hide();
- toggleContent.hide();
- hintBtn.text('共有 ' + toggleContent.length + ' 件商品,点击展开');
- }
- },
- editOrderIssue($event){
- let id = $($event.target).attr('data-value');
- },
- deleteOrderIssue($event){
- let id = $($event.target).attr('data-value');
- $('#deleteId').val(id);
- $('#alertModal').modal('show');
- },
- deleteOrderIssueById(){
- let _this = this;
- tempTip.setDuration(99999)
- tempTip.waitingTip('删除中,请稍候')
- let id = $('#deleteId').val();
- let data = {id:id};
- axios.post('{{url('order/issue/destroy')}}',data).then(function(res){
- tempTip.setDuration(5000)
- tempTip.cancelWaitingTip();
- if(res.data.success){
- for(let i = 0;i< _this.orderIssues.length;i++){
- let data = _this.orderIssues[i];
- if(data.id == id){
- _this.orderIssues.splice(i,1);
- _this.deleteId = 0;
- break;
- }
- }
- tempTip.setDuration(2000);
- tempTip.showSuccess('问题件删除成功');
- }else{
- tempTip.setDuration(2500);
- tempTip.show('标记勾选内容删除失败,错误:' + res.data.fail_info);
- }
- }).catch(function(err){
- tempTip.setDuration(4000);
- tempTip.cancelWaitingTip();
- tempTip.show('网络错误:' + err);
- });
- },
- changeDeleteId(){
- $('#deleteId').val('');
- },
- cancelOnTop(event){
- let id =$(event.target).attr('data-value')
- let data = {id:id};
- axios.post('{{url('order/issue/onTop')}}',data).then(function(res){
- if(res.data.success){
- tempTip.setDuration(2000);
- tempTip.showSuccess('订单问题件取消置顶成功!');
- window.location.reload();
- }else{
- tempTip.setDuration(2500);
- tempTip.show( res.data.fail_info);
- }
- }).catch(function(err){
- tempTip.setDuration(4000);
- tempTip.show('网络错误:' + err);
- });
- },
- changeRemark(){
- $('#remark').removeClass('is-invalid');
- },
- OrderIssueOnTop(event){
- let id = $(event.target).attr('data-value');
- $("#onTopId").val(id);
- $("#exampleModal").modal('show');
- },
- submitOnTop(){
- let _this = this;
- let remark = $("#remark").val();
- let id = $("#onTopId").val();
- if(remark === '') {
- $("#remark").focus();
- $('#remark').addClass('is-invalid');
- }else{
- let data = {id:id,remark:remark};
- axios.post('{{url('order/issue/onTop')}}',data).then(function(res){
- if(res.data.success){
- _this.orderIssues.forEach(function(orderIssue){
- if(orderIssue.id == id){
- orderIssue.top.remark = 'remark';
- }
- })
- } else {
- tempTip.setDuration(2500);
- tempTip.show( res.data.fail_info);
- }
- }).catch(function(err){
- tempTip.setDuration(4000);
- tempTip.show('网络错误:' + err);
- });
- }
- },
- pageTurning(event){
- let page = $(event.target).val();
- if (page>this.page.lastPage) {
- return;
- }
- window.location = this.form.goPage(page);
- },
- // 导出
- orderIssueExport(sign){
- let url = '{{url('order/issue/export')}}';
- let token='{{ csrf_token() }}';
- if(sign){
- // 所有页
- excelExport(true,this.checkData,url,this.page.total,token);
- }else{
- // 选中
- excelExport(false,this.checkData,url,null,token);
- }
- },
- // 复制快递单号
- copyOrderNo(){
- let _this =this;
- if(this.checkData.length === 0){
- tempTip.show('没有勾选订单');
- }else{
- let orderNos = [];
- this.orderIssues.forEach(function(item){
- if(_this.checkData.includes(item.id)){
- let logisticNumbers = item.order.logisticNumbers;
- if(logisticNumbers.length>0){
- orderNos.push(logisticNumbers);
- }
- }
- })
- let p =$('<input id="coty" value="'+orderNos.join(',')+'"/>');
- p.attr('opacity',0);
- $('body').append(p);
- let p_ele = document.getElementById('coty');
- p_ele.select();
- document.execCommand("Copy");
- p.remove();
- }
- },
- checkAll(e){
- if (e.target.checked){
- this.orderIssues.forEach((el,i)=>{
- if (this.checkData.indexOf(el.id) == '-1'){
- this.checkData.push(el.id);
- }
- });
- }else {
- this.checkData = [];
- }
- },
- // 完结
- endOrderIssue(){
- if(this.checkData.length === 0){
- tempTip.show('没有勾选订单');
- return ;
- }
- let _this = this;
- let data = {ids:this.checkData};
- axios.post('{{url('order/issue/endOrderIssue')}}',data).then(function(res){
- if(res.data.success){
- _this.orderIssues.forEach(function(item){
- if(_this.checkData.includes(item.id)){
- item.handle_status = '已完结';
- }
- })
- tempTip.setDuration(2000);
- tempTip.showSuccess('勾选订单已变为已完结');
- }else{
- tempTip.setDuration(3000);
- tempTip.show(res.data.fail_info);
- }
- }).catch(function(err){
- tempTip.setDuration(4000);
- tempTip.show('网络异常:'+err);
- })
- },
- // 添加日志
- addOrderIssueLog(event){
- let _this = this;
- let id ;
- let data= {id:id,content:''};
- axios.post('{{url('order/issue/addOrderIssuesLog')}}').then(function(res){
- if(res.data.success){
- // unshift
- _this.orderIssues.forEach( function(orderIssue){
- if(orderIssue.id == id){
- orderIssue.logs.unshift(res.data.data);
- }
- })
- tempTip.setDuration(2000);
- tempTip.showSuccess('添加成功');
- } else {
- tempTip.setDuration(3000);
- tempTip.showSuccess(res.data.fail_info);
- }
- }).catch(function(err){
- tempTip.setDuration(4000);
- tempTip.show('网络异常:'+err);
- });
- },
- }
- })
- // modal 隐藏时修改 input 为空
- $("#exampleModal").on('hide.bs.modal',function(e){
- $('#remark').val('');
- });
- $("#exampleModal").on('hide.bs.modal',function(e){
- $('#remark').val('');
- });
- </script>
- @endsection
|