index.blade.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. @extends('layouts.app')
  2. @section('content')
  3. <div id="nav2">
  4. @component('rejected.menu')@endcomponent
  5. </div>
  6. <div class="container-fluid">
  7. <div style="min-width: 2070px;">
  8. <div class="d-none mt-3" id="list">
  9. @if(Session::has('successTip'))
  10. <div class="alert alert-success h1">{{Session::get('successTip')}}</div>
  11. @endif
  12. <div class="col-12" style="background: #fff;">
  13. <div class="row">
  14. <div class="col" v-if="isBeingFilterConditions">
  15. <label for="">
  16. <a :href="'{{url('rejected').'?paginate='}}'+filterParams.paginate"><span class="btn btn-warning text-dark">清除过滤条件</span></a>
  17. </label>
  18. </div>
  19. <table class="table table-sm table-bordered m-0">
  20. <tr>
  21. <td>
  22. <span class="text-muted">每页显示记录:</span>
  23. </td>
  24. <td colspan="9">
  25. <select name="" id="setPaginate" class="tooltipTarget form-control-sm" style="vertical-align: middle"
  26. @change="setPaginate" v-model="filterParams.paginate">
  27. <option value="50">50条</option>
  28. <option value="100">100条</option>
  29. <option value="200">200条</option>
  30. <option value="500">500条</option>
  31. <option value="1000">1000条</option>
  32. </select>
  33. </td>
  34. </tr>
  35. <tr>
  36. <td class="text-muted">按条件过滤:</td>
  37. <td colspan="2">
  38. <label for="">时间:</label>
  39. <input type="date" name="created_at_start" class="form-control-sm tooltipTarget" style="width:140px"
  40. :class="filterParams.created_at_start?'bg-warning':''" v-model="filterParams.created_at_start"
  41. @keypress="created_at_startEntering" @change="created_at_startChange" title="选择显示指定日期的起始时间">
  42. </td>
  43. <td>
  44. <label for="">客户:</label>
  45. <input type="text" class="form-control-sm tooltipTarget" placeholder="查找"
  46. style="width:70px" @input="locateOwner" @keypress="owner_idEntering"
  47. title="输入关键词快速定位下拉列表,回车确定">
  48. <select name="owner_id" id="owner_id" class="form-control-sm tooltipTarget"
  49. :class="filterParams.owner_id?'bg-warning':''" v-model="filterParams.owner_id"
  50. title="选择要显示的客户" @change="owner_idChange">
  51. <option value="" selected>全部客户</option>
  52. <option v-for="owner in owners" :value="owner.id">@{{ owner.name }}</option>
  53. </select>
  54. </td>
  55. <td>
  56. <label for="">订单号:</label>
  57. <input type="text" class="form-control-sm tooltipTarget" placeholder="搜索订单号" name="order_number"
  58. :class="filterParams.order_number?'bg-warning':''" v-model="filterParams.order_number"
  59. @keypress="order_numberEntering" title="15天以内的支持模糊搜索,回车提交">
  60. </td>
  61. <td>
  62. <label for="">退回单号:</label>
  63. <input type="text" class="form-control-sm tooltipTarget" placeholder="搜索退回单号" name="logistic_number_return"
  64. :class="filterParams.logistic_number_return?'bg-warning':''"
  65. @keypress="logistic_number_returnEntering" title="15天以内的支持模糊搜索,回车提交">
  66. </td>
  67. <td>
  68. <label for="">原单单号:</label>
  69. <input type="text" class="form-control-sm tooltipTarget" placeholder="搜索原单单号" name="logistic_number"
  70. :class="filterParams.logistic_number?'bg-warning':''"
  71. @keypress="logistic_numberEntering" title="15天以内的支持模糊搜索,回车提交">
  72. </td>
  73. <td>
  74. <label for="">审核:</label>
  75. <select name="is_checked" class="form-control-sm" @change="is_checkedChange"
  76. :class="filterParams.is_checked?'bg-warning':''">
  77. <option value=""></option>
  78. <option value="1">已审核</option>
  79. <option value="0">未审核</option>
  80. </select>
  81. </td>
  82. <td width="16%"></td>
  83. </tr>
  84. <tr>
  85. <td ></td>
  86. <td colspan="2">
  87. <label for="">&nbsp;  &nbsp;&nbsp;</label>
  88. <input type="date" name="created_at_end" class="form-control-sm tooltipTarget" style="width:140px"
  89. :class="filterParams.created_at_end?'bg-warning':''"
  90. @keypress="created_at_endEntering" @change="created_at_endChange" title="选择显示指定日期的结束时间">
  91. </td>
  92. <td>
  93. <label for="">商品条码:</label>
  94. <input type="text" class="form-control-sm tooltipTarget" placeholder="包含该商品的退单" name="barcode_goods"
  95. :class="filterParams.barcode_goods?'bg-warning':''" title="可模糊匹配右边未填完的部分,按回车提交"
  96. @keypress="barcode_goodsEntering">
  97. </td>
  98. <td>
  99. <label for="">是否正品:</label>
  100. <select name="id_quality_label" id="id_quality_label" class="form-control-sm tooltipTarget"
  101. :class="filterParams.id_quality_label?'bg-warning':''"
  102. title="正品仅显示全部是正品的退单,但残次显示的是包含有残次的退单" @change="id_quality_labelChange">
  103. <option value="" selected></option>
  104. <option v-for="qualityLabel in qualityLabels" :value="qualityLabel.id">@{{ qualityLabel.name }}</option>
  105. </select>
  106. </td>
  107. <td>
  108. <label for="">寄件人手机:</label>
  109. <input type="text" class="form-control-sm tooltipTarget" name="mobile_sender"
  110. :class="filterParams.mobile_sender?'bg-warning':''"
  111. @change="mobile_senderChange" title="输入完成敲回车提交">
  112. </td>
  113. <td>
  114. <label for="">审核批次号:</label>
  115. <input type="text" class="form-control-sm tooltipTarget" name="checked_numbers"
  116. :class="filterParams.checked_numbers?'bg-warning':''"
  117. @change="checked_numbersChange" title="支持右位留空的模糊搜索">
  118. </td>
  119. <td>
  120. <label for="">是否入库:</label>
  121. <select name="is_loaded" id="is_loaded" class="form-control-sm"
  122. :class="filterParams.is_loaded?'bg-warning':''"
  123. title="" @change="is_loadedChange">
  124. <option value="" selected></option>
  125. <option value="1">是</option>
  126. <option value="0">否</option>
  127. <option value="null">无需入库</option>
  128. <option value="2">待推单</option>
  129. </select>
  130. </td>
  131. <td></td>
  132. </tr>
  133. <tr>
  134. <td>
  135. <span class="text-muted">操作选定记录:</span>
  136. </td>
  137. <td colspan="9">
  138. @can('退货管理-审核')
  139. <span class="btn btn-sm" @click="checkAll" style="cursor: pointer"
  140. :class="[rejectedBills_checkBoxes.length>0?'btn-dark':'btn-outline-dark']">审核</span>
  141. @endcan
  142. @can('退货管理-编辑')
  143. <span class="btn btn-sm" @click="finishAll" style="cursor: pointer"
  144. :class="[rejectedBills_checkBoxes.length>0?'btn-dark':'btn-outline-dark']">完结</span>
  145. @endcan
  146. <select name="" id="setIsLoaded_batch" class="tooltipTarget form-control-sm" style="vertical-align: middle"
  147. @change="exportExcel" title="导出所有页将会以搜索条件得到的过滤结果,将其全部记录(每一页)导出"
  148. :class="[rejectedBills_checkBoxes.length>0?'btn-dark':'btn-outline-dark']">
  149. <option value="">导出Excel</option>
  150. <option value="1">导出勾选内容</option>
  151. <option value="2">导出所有页</option>
  152. </select>
  153. @can('退货管理-编辑')
  154. <select name="" id="setIsLoaded_batch" class="tooltipTarget form-control-sm" style="vertical-align: middle"
  155. title="将勾选记录的入库状态设定为是或否,仅对未完结状态的记录有效" @change="setIsLoaded_batch"
  156. :class="[rejectedBills_checkBoxes.length>0?'btn-dark':'btn-outline-dark']">
  157. <option value="">修改入库</option>
  158. <option value="1">设定为是</option>
  159. <option value="0">设定为否</option>
  160. <option value="null">无需入库</option>
  161. <option value="2">待推单</option>
  162. </select>
  163. @endcan
  164. </td>
  165. </tr>
  166. </table>
  167. </div>
  168. </div>
  169. <table class="table table-striped table-sm table-bordered table-hover mt-3" style="background: #fff;">
  170. <tr>
  171. <th>
  172. <input type="checkbox" class="form-control-sm tooltipTarget" title="全选"
  173. id="checkSelectingAll" @click="checkBoxAllToggle" v-model="checkBoxAll" value="1">
  174. </th>
  175. <th>序号</th>
  176. <th>是否审核</th>
  177. <th>是否完结</th>
  178. <th>是否入库</th>
  179. <th>创建时间</th>
  180. <th>客户名称</th>
  181. <th>退回单号</th>
  182. <th>退回公司</th>
  183. <th>订单号</th>
  184. <th>姓名</th>
  185. <th>电话</th>
  186. <th>原单单号</th>
  187. <th>到付费用</th>
  188. <th>商品总数</th>
  189. <th>商品条码</th>
  190. <th>商品名称</th>
  191. <th>数量</th>
  192. <th>是否正品</th>
  193. <th>批次号</th>
  194. <th>生产日期</th>
  195. <th>效期</th>
  196. <th>备注</th>
  197. <th>退单备注</th>
  198. <th>录入人</th>
  199. @can('退货管理-编辑','退货管理-删除')
  200. <th>操作</th>
  201. @endcan
  202. </tr>
  203. <tr v-for="(rejectedBill,i) in rejectedBills" :data-id="rejectedBill.id">
  204. <td>
  205. <input type="checkbox" v-model="rejectedBills_checkBoxes" :value="rejectedBill.id"/>
  206. </td>
  207. <td class="text-muted" style="opacity:0.7">
  208. @{{ i+1 }}
  209. </td>
  210. <td class="text-muted">
  211. <span v-if="rejectedBill.is_checked==1" class="text-success">
  212. <span class="fa fa-check-square"></span> @{{ rejectedBill.checked_numbers }}
  213. </span>
  214. <span v-else class="text-muted">
  215. 未审核
  216. </span>
  217. </td>
  218. <td class="" :class="[rejectedBill.is_finished!=0?'text-success':'text-muted']">@{{rejectedBill.is_finished | yesNo}}</td>
  219. <td class="" :class="[rejectedBill.is_loaded==1?'text-success':'text-muted']">@{{rejectedBill.is_loaded | yesNoIsLoaded}}</td>
  220. <td class="text-muted">@{{rejectedBill.created_at}}</td>
  221. <td>@{{rejectedBill.owner.name}}</td>
  222. <td>@{{rejectedBill.logistic_number_return}}</td>
  223. <td class="text-muted">@{{rejectedBill.logistic.name}}</td>
  224. <td>@{{rejectedBill.order_number}}</td>
  225. <td class="text-muted">@{{rejectedBill.sender}}</td>
  226. <td class="text-muted">@{{rejectedBill.mobile_sender}}</td>
  227. <td>@{{rejectedBill.logistic_number}}</td>
  228. <td class="text-muted">@{{rejectedBill.fee_collected}}</td>
  229. <td class="text-muted">@{{rejectedBill.goods_amount}}</td>
  230. <td colspan="8">
  231. <div class="text-center" v-if="rejectedBill.detailFolding && rejectedBill.items.length>1">
  232. <a href="javascript:;" @click="rejectedBill.detailFolding=false">@{{rejectedBill.goods_amount}}件商品,点击展开明细</a></div>
  233. <table class="table table-sm" v-else>
  234. <tr v-for="item in rejectedBill.items">
  235. <td style="width: 140px">@{{item.barcode_goods}}</td>
  236. <td style="width: 140px">@{{item.name_goods}}</td>
  237. <td style="width: 30px">@{{item.amount}}</td>
  238. <td class="text-muted">@{{item.quality_label}}</td>
  239. <td class="text-muted">@{{item.batch_number}}</td>
  240. <td class="text-muted">@{{item.made_at}}</td>
  241. <td class="text-muted">@{{item.validity_at}}</td>
  242. <td class="text-muted">@{{item.remark}}</td>
  243. </tr>
  244. <tr v-if="!rejectedBill.detailFolding && rejectedBill.items.length>1">
  245. <td colspan="8" class="text-center">
  246. <a href="javascript:;" @click="rejectedBill.detailFolding=true">点击收起明细</a>
  247. </td>
  248. </tr>
  249. </table>
  250. </td>
  251. <td class="text-muted" style="max-width: 190px">@{{rejectedBill.remark}}</td>
  252. <td class="text-muted">@{{rejectedBill.operator_name}}</td>
  253. @can('退货管理-编辑')
  254. <td>
  255. <span v-if="rejectedBill.is_finished==0">
  256. @can('退货管理-编辑')
  257. <button class="btn btn-outline-info btn-sm tooltipTarget" @click="edit">改</button>
  258. @endcan
  259. @can('退货管理-删除')
  260. <button
  261. class="btn btn-outline-danger btn-sm tooltipTarget" @click="destroy(rejectedBill)">删</button>
  262. @endcan
  263. </span>
  264. <span v-else class="text-muted">已完结</span>
  265. </td>
  266. @endcan
  267. </tr>
  268. </table>
  269. <div class="text-info h5 btn btn">{{$rejectedBills->count()}}/{{$rejectedBills->total()}}</div>
  270. {{$rejectedBills->appends($paginateParams)->links()}}
  271. </div>
  272. </div>
  273. </div>
  274. @endsection
  275. @section('lastScript')
  276. <script>
  277. let rejectedBills=[
  278. @foreach( $rejectedBills as $rejectedBill )
  279. {
  280. id:'{{$rejectedBill->id}}',is_checked:'{{$rejectedBill->is_checked}}',checked_numbers:'{{$rejectedBill->checked_numbers}}',
  281. created_at:'{{$rejectedBill->created_at->format("Y-m-d H:i")}}',owner:{!! $rejectedBill->owner !!},
  282. order_number:'{{$rejectedBill->order_number}}',sender:'{{$rejectedBill->sender}}',
  283. mobile_sender:'{{$rejectedBill->mobile_sender}}',logistic_number:'{{$rejectedBill->logistic_number}}',
  284. logistic_number_return:'{{$rejectedBill->logistic_number_return}}',logistic:{!!$rejectedBill->logistic!!},
  285. fee_collected:'{{$rejectedBill->fee_collected}}',goods_amount:'{{$rejectedBill->goods_amount}}',
  286. is_loaded:'{{$rejectedBill->is_loaded_null}}',operator_name:'{{$rejectedBill->operator_name}}',detailFolding:true,
  287. items:{!! $rejectedBill->items !!},is_finished:'{{$rejectedBill->is_finished}}',remark:'{{$rejectedBill->remark}}'
  288. },
  289. @endforeach
  290. ];
  291. let owners=[
  292. @foreach($owners as $owner)
  293. {id:'{{$owner->id}}',name:'{{$owner->name}}'},
  294. @endforeach
  295. ];
  296. let qualityLabels=[
  297. @foreach($qualityLabels as $qualityLabel)
  298. {id:'{{$qualityLabel->id}}',name:'{{$qualityLabel->name}}'},
  299. @endforeach
  300. ];
  301. @if(isset($paginateParams))
  302. let paginateParams={!! json_encode($paginateParams) !!};
  303. @endif
  304. let total='{{$rejectedBills->total()}}';
  305. let editUrl = "{{url('rejectedBill')}}/";
  306. let destroyUrl = "{{url('rejectedBill')}}/";
  307. let ajaxCheckUrl = '{{url("apiLocal/rejectedBill/apiSetIsLoadedAll")}}';
  308. let ajaxCheckAllURL = '{{url("rejected/ajaxCheckAll")}}';
  309. let ajaxFinishAllUrl='{{url("rejected/ajaxFinishAll")}}';
  310. let exportExcelURL = '{{url("rejected/exportExcel")}}';
  311. let exportExcelOnFilterParamsURL='{{url("rejected/exportExcelOnFilterParams")}}';
  312. let csrfInput='@csrf';
  313. </script>
  314. <script src="{{asset('js/singles/rejectedIndex200212.js')}}"></script>
  315. @endsection