| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352 |
- @extends('layouts.app')
- @section('title')退货管理@endsection
- @section('content')
- <div id="nav2">
- @component('rejected.menu')@endcomponent
- </div>
- <div class="container-fluid">
- <div style="min-width: 2070px;">
- <div class="d-none mt-3" id="list">
- @if(Session::has('successTip'))
- <div class="alert alert-success h1">{{Session::get('successTip')}}</div>
- @endif
- <div class="col-12" style="background: #fff;">
- <div class="row">
- <div class="col" v-if="isBeingFilterConditions">
- <label for="">
- <a :href="'{{url('rejected').'?paginate='}}'+filterParams.paginate"><span class="btn btn-warning text-dark">清除过滤条件</span></a>
- </label>
- </div>
- <table class="table table-sm table-bordered m-0">
- <tr>
- <td>
- <span class="text-muted">每页显示记录:</span>
- </td>
- <td colspan="9">
- <select name="" id="setPaginate" class="tooltipTarget form-control-sm" style="vertical-align: middle"
- @change="setPaginate" v-model="filterParams.paginate">
- <option value="50">50条</option>
- <option value="100">100条</option>
- <option value="200">200条</option>
- <option value="500">500条</option>
- <option value="1000">1000条</option>
- </select>
- </td>
- </tr>
- <tr>
- <td class="text-muted">按条件过滤:</td>
- <td colspan="2">
- <label for="">时间:</label>
- <input type="date" name="created_at_start" class="form-control-sm tooltipTarget" style="width:140px"
- :class="filterParams.created_at_start?'bg-warning':''" v-model="filterParams.created_at_start"
- @keypress="created_at_startEntering" @change="created_at_startChange" title="选择显示指定日期的起始时间">
- </td>
- <td>
- <label for="">客户:</label>
- <input type="text" class="form-control-sm tooltipTarget" placeholder="查找"
- style="width:70px" @input="locateOwner" @keypress="owner_idEntering"
- title="输入关键词快速定位下拉列表,回车确定">
- <select name="owner_id" id="owner_id" class="form-control-sm tooltipTarget"
- :class="filterParams.owner_id?'bg-warning':''" v-model="filterParams.owner_id"
- title="选择要显示的客户" @change="owner_idChange">
- <option value="" selected>全部客户</option>
- <option v-for="owner in owners" :value="owner.id">@{{ owner.name }}</option>
- </select>
- </td>
- <td>
- <label for="">订单号:</label>
- <input type="text" class="form-control-sm tooltipTarget" placeholder="搜索订单号" name="order_number"
- :class="filterParams.order_number?'bg-warning':''" v-model="filterParams.order_number"
- @input="order_numberEntering" @keypress="submitFilterOnEnter" title="15天以内的支持模糊搜索,回车提交">
- </td>
- <td>
- <label for="">退回单号:</label>
- <input type="text" class="form-control-sm tooltipTarget" placeholder="搜索退回单号" name="logistic_number_return"
- :class="filterParams.logistic_number_return?'bg-warning':''"
- @input="logistic_number_returnEntering" @keypress="submitFilterOnEnter" title="15天以内的支持模糊搜索,回车提交">
- </td>
- <td>
- <label for="">原单单号:</label>
- <input type="text" class="form-control-sm tooltipTarget" placeholder="搜索原单单号" name="logistic_number"
- :class="filterParams.logistic_number?'bg-warning':''"
- @input="logistic_numberEntering" @keypress="submitFilterOnEnter" title="15天以内的支持模糊搜索,回车提交">
- </td>
- <td>
- <label for="">审核:</label>
- <select name="is_checked" class="form-control-sm" @change="is_checkedChange"
- :class="filterParams.is_checked?'bg-warning':''">
- <option value=""></option>
- <option value="1">已审核</option>
- <option value="0">未审核</option>
- </select>
- </td>
- <td width="16%"></td>
- </tr>
- <tr>
- <td ></td>
- <td colspan="2">
- <label for=""> </label>
- <input type="date" name="created_at_end" class="form-control-sm tooltipTarget" style="width:140px"
- :class="filterParams.created_at_end?'bg-warning':''"
- @keypress="created_at_endEntering" @change="created_at_endChange" title="选择显示指定日期的结束时间">
- </td>
- <td>
- <label for="">商品条码:</label>
- <input type="text" class="form-control-sm tooltipTarget" placeholder="包含该商品的退单" name="barcode_goods"
- :class="filterParams.barcode_goods?'bg-warning':''" title="可模糊匹配右边未填完的部分,按回车提交"
- @input="barcode_goodsEntering" @keypress="submitFilterOnEnter">
- </td>
- <td>
- <label for="">是否正品:</label>
- <select name="id_quality_label" id="id_quality_label" class="form-control-sm tooltipTarget"
- :class="filterParams.id_quality_label?'bg-warning':''"
- title="正品仅显示全部是正品的退单,但残次显示的是包含有残次的退单" @change="id_quality_labelChange">
- <option value="" selected></option>
- <option v-for="qualityLabel in qualityLabels" :value="qualityLabel.id">@{{ qualityLabel.name }}</option>
- </select>
- </td>
- <td>
- <label for="">寄件人手机:</label>
- <input type="text" class="form-control-sm tooltipTarget" name="mobile_sender"
- :class="filterParams.mobile_sender?'bg-warning':''"
- @input="mobile_senderEntering" @keypress="submitFilterOnEnter" title="输入完成敲回车提交">
- </td>
- <td>
- <label for="">审核批次号:</label>
- <input type="text" class="form-control-sm tooltipTarget" name="checked_numbers"
- :class="filterParams.checked_numbers?'bg-warning':''"
- @input="checked_numbersEntering" @keypress="submitFilterOnEnter" title="支持右位留空的模糊搜索">
- </td>
- <td>
- <label for="">是否入库:</label>
- <select name="is_loaded" id="is_loaded" class="form-control-sm"
- :class="filterParams.is_loaded?'bg-warning':''"
- title="" @change="is_loadedChange">
- <option value="" selected></option>
- <option value="1">是</option>
- <option value="0">否</option>
- <option value="null">无需入库</option>
- <option value="2">待推单</option>
- <option value="4">待确认</option>
- </select>
- </td>
- <td></td>
- </tr>
- <tr>
- <td>
- <span class="text-muted">操作选定记录:</span>
- </td>
- <td colspan="9">
- @can('退货管理-审核')
- <span class="btn btn-sm" @click="checkAll" style="cursor: pointer"
- :class="[rejectedBills_checkBoxes.length>0?'btn-dark':'btn-outline-dark']">审核</span>
- @endcan
- @can('退货管理-编辑')
- <span class="btn btn-sm" @click="finishAll" style="cursor: pointer"
- :class="[rejectedBills_checkBoxes.length>0?'btn-dark':'btn-outline-dark']">完结</span>
- @endcan
- {{-- <select name="" class="tooltipTarget form-control-sm" style="vertical-align: middle"--}}
- {{-- @change="exportExcel" title="导出所有页将会以搜索条件得到的过滤结果,将其全部记录(每一页)导出"--}}
- {{-- :class="[rejectedBills_checkBoxes.length>0?'btn-dark':'btn-outline-dark']">--}}
- {{-- <option value="">导出Excel</option>--}}
- {{-- <option value="1">导出勾选内容</option>--}}
- {{-- <option value="2">导出所有页</option>--}}
- {{-- </select>--}}
- <span class="dropdown">
- <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget":class="[rejectedBills_checkBoxes.length>0?'btn-dark text-light':'']"
- data-toggle="dropdown" title="导出所有页将会以搜索条件得到的过滤结果,将其全部记录(每一页)导出">
- 导出Excel
- </button>
- <div class="dropdown-menu">
- <a class="dropdown-item" @click="exportExcel(1)" href="javascript:">导出勾选内容</a>
- <a class="dropdown-item" @click="exportExcel(2)" href="javascript:">导出所有页</a>
- </div>
- </span>
- @can('退货管理-编辑')
- {{-- <select name="" class="tooltipTarget form-control-sm" style="vertical-align: middle"--}}
- {{-- title="将勾选记录的入库状态设定为是或否,仅对未完结状态的记录有效" @change="setIsLoaded_batch"--}}
- {{-- :class="[rejectedBills_checkBoxes.length>0?'btn-dark':'btn-outline-dark']">--}}
- {{-- <option value="">修改入库</option>--}}
- {{-- <option value="1">设定为是</option>--}}
- {{-- <option value="0">设定为否</option>--}}
- {{-- <option value="null">无需入库</option>--}}
- {{-- <option value="2">待推单</option>--}}
- {{-- </select>--}}
- <span class="dropdown">
- <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget":class="[rejectedBills_checkBoxes.length>0?'btn-dark text-light':'']"
- data-toggle="dropdown" title="将勾选记录的入库状态设定为是或否,仅对未完结状态的记录有效">
- 修改入库
- </button>
- <div class="dropdown-menu">
- <a class="dropdown-item" @click="setIsLoaded_batch(1)" href="javascript:">设定为是</a>
- <a class="dropdown-item" @click="setIsLoaded_batch(0)" href="javascript:">设定为否</a>
- <a class="dropdown-item" @click="setIsLoaded_batch('null')" href="javascript:">无需入库</a>
- <a class="dropdown-item" @click="setIsLoaded_batch(2)" href="javascript:">待推单</a>
- </div>
- </span>
- @endcan
- </td>
- </tr>
- </table>
- </div>
- </div>
- <table class="table table-striped table-sm table-bordered table-hover mt-3" style="background: #fff;">
- <tr>
- <th>
- <input type="checkbox" class="form-control-sm tooltipTarget" title="全选"
- id="checkSelectingAll" @click="checkBoxAllToggle" v-model="checkBoxAll" value="1">
- </th>
- <th>序号</th>
- <th>是否审核</th>
- <th>是否完结</th>
- <th>是否入库</th>
- <th>创建时间</th>
- <th>客户名称</th>
- <th>退回单号</th>
- <th>退回公司</th>
- <th>订单号</th>
- <th>姓名</th>
- <th>电话</th>
- <th>原单单号</th>
- <th>到付费用</th>
- <th>商品总数</th>
- <th>商品条码</th>
- <th>商品名称</th>
- <th>数量</th>
- <th>是否正品</th>
- <th>批次号</th>
- <th>生产日期</th>
- <th>效期</th>
- <th>备注</th>
- <th>退单备注</th>
- <th>录入人</th>
- @can('退货管理-编辑','退货管理-删除')
- <th>操作</th>
- @endcan
- </tr>
- <tr v-for="(rejectedBill,i) in rejectedBills" :data-id="rejectedBill.id">
- <td>
- <input type="checkbox" v-model="rejectedBills_checkBoxes" :value="rejectedBill.id"/>
- </td>
- <td class="text-muted" style="opacity:0.7">
- @{{ i+1 }}
- </td>
- <td class="text-muted">
- <span v-if="rejectedBill.is_checked==1" class="text-success">
- <span class="fa fa-check-square"></span> @{{ rejectedBill.checked_numbers }}
- </span>
- <span v-else>
- 未审核
- </span>
- </td>
- <td class="" :class="[rejectedBill.is_finished!=0?'text-success':'text-muted']">@{{rejectedBill.is_finished | yesNo}}</td>
- <td class="" :class="[rejectedBill.is_loaded==1?'text-success':'text-muted']">
- <span v-if="rejectedBill.is_loaded==4">
- <button class="btn btn-sm btn-info" @click="confirmBeStored($event,rejectedBill.id)">确定入库</button>
- </span>
- <span v-else>@{{rejectedBill.is_loaded | yesNoIsLoaded}}</span>
- </td>
- <td class="text-muted">@{{rejectedBill.created_at}}</td>
- <td>@{{rejectedBill.owner.name}}</td>
- <td>@{{rejectedBill.logistic_number_return}}</td>
- <td class="text-muted">@{{rejectedBill.logistic.name}}</td>
- <td>@{{rejectedBill.order_number}}</td>
- <td class="text-muted">@{{rejectedBill.sender}}</td>
- <td class="text-muted">@{{rejectedBill.mobile_sender}}</td>
- <td>@{{rejectedBill.logistic_number}}</td>
- <td class="text-muted">@{{rejectedBill.fee_collected}}</td>
- <td class="text-muted">@{{rejectedBill.goods_amount}}</td>
- <td colspan="8">
- <div class="text-center" v-if="rejectedBill.detailFolding && rejectedBill.items.length>1">
- <a href="javascript:;" @click="rejectedBill.detailFolding=false">@{{rejectedBill.goods_amount}}件商品,点击展开明细</a></div>
- <table class="table table-sm" v-else>
- <tr v-for="item in rejectedBill.items">
- <td style="width: 140px">@{{item.barcode_goods}}</td>
- <td style="width: 140px">@{{item.name_goods}}</td>
- <td style="width: 30px">@{{item.amount}}</td>
- <td class="text-muted">@{{item.quality_label}}</td>
- <td class="text-muted">@{{item.batch_number}}</td>
- <td class="text-muted">@{{item.made_at}}</td>
- <td class="text-muted">@{{item.validity_at}}</td>
- <td class="text-muted">@{{item.remark}}</td>
- </tr>
- <tr v-if="!rejectedBill.detailFolding && rejectedBill.items.length>1">
- <td colspan="8" class="text-center">
- <a href="javascript:;" @click="rejectedBill.detailFolding=true">点击收起明细</a>
- </td>
- </tr>
- </table>
- </td>
- <td class="text-muted" style="max-width: 190px">@{{rejectedBill.remark}}</td>
- <td class="text-muted">@{{rejectedBill.operator_name}}</td>
- @can('退货管理-编辑')
- <td>
- <span v-if="rejectedBill.is_finished==0">
- @can('退货管理-编辑')
- <button class="btn btn-outline-info btn-sm tooltipTarget" @click="edit">改</button>
- @endcan
- @can('退货管理-删除')
- <button
- class="btn btn-outline-danger btn-sm tooltipTarget" @click="destroy(rejectedBill)">删</button>
- @endcan
- </span>
- <span v-else class="text-muted">已完结</span>
- </td>
- @endcan
- </tr>
- </table>
- <div class="text-info h5 btn btn">{{$rejectedBills->count()}}/{{$rejectedBills->total()}}</div>
- {{$rejectedBills->appends($paginateParams)->links()}}
- </div>
- </div>
- </div>
- @endsection
- @section('lastScript')
- <script>
- let rejectedBills=[
- @foreach( $rejectedBills as $rejectedBill )
- {
- id:'{{$rejectedBill->id}}',is_checked:'{{$rejectedBill->is_checked}}',checked_numbers:'{{$rejectedBill->checked_numbers}}',
- created_at:'{{$rejectedBill->created_at->format("Y-m-d H:i")}}',owner:{!! $rejectedBill->owner !!},
- order_number:'{{$rejectedBill->order_number}}',sender:'{{$rejectedBill->sender}}',
- mobile_sender:'{{$rejectedBill->mobile_sender}}',logistic_number:'{{$rejectedBill->logistic_number}}',
- logistic_number_return:'{{$rejectedBill->logistic_number_return}}',logistic:{!!$rejectedBill->logistic!!},
- fee_collected:'{{$rejectedBill->fee_collected}}',goods_amount:'{{$rejectedBill->goods_amount}}',
- is_loaded:'{{$rejectedBill->is_loaded_null}}',operator_name:'{{$rejectedBill->operator_name}}',detailFolding:true,
- items:{!! $rejectedBill->items !!},is_finished:'{{$rejectedBill->is_finished}}',remark:'{{$rejectedBill->remark}}'
- },
- @endforeach
- ];
- let owners=[
- @foreach($owners as $owner)
- {id:'{{$owner->id}}',name:'{{$owner->name}}'},
- @endforeach
- ];
- let qualityLabels=[
- @foreach($qualityLabels as $qualityLabel)
- {id:'{{$qualityLabel->id}}',name:'{{$qualityLabel->name}}'},
- @endforeach
- ];
- @if(isset($paginateParams))
- let paginateParams={!! json_encode($paginateParams) !!};
- @endif
- let total='{{$rejectedBills->total()}}';
- let editUrl = "{{url('rejectedBill')}}/";
- let destroyUrl = "{{url('rejectedBill')}}/";
- let ajaxConfirmBeStoredUrl = '{{url("apiLocal/rejectedBill/apiConfirmBeStored")}}';
- let ajaxCheckUrl = '{{url("apiLocal/rejectedBill/apiSetIsLoadedAll")}}';
- let ajaxCheckAllURL = '{{url("rejected/ajaxCheckAll")}}';
- let ajaxFinishAllUrl='{{url("rejected/ajaxFinishAll")}}';
- let exportExcelURL = '{{url("rejected/exportExcel")}}';
- let exportExcelOnFilterParamsURL='{{url("rejected/exportExcelOnFilterParams")}}';
- let csrfInput='@csrf';
- </script>
- <script src="{{asset('js/singles/rejectedIndex200424.js')}}"></script>
- @endsection
|