index.blade.php 93 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543
  1. @extends('layouts.app')
  2. @section('title')问题件-查询@endsection
  3. @section('content')
  4. @component("order.issue.menu")@endcomponent
  5. <div class="container-fluid" id="issue_div">
  6. <div style="@cannot('订单管理-问题件-客户不可见')min-width: 3000px;@else min-width: 1990px; @endcannot">
  7. <div id="list" class="d-none container-fluid">
  8. <div id="form_div" style="min-width: 2250px;"></div>
  9. <div class="form-inline mt-1" id = "btn">
  10. <span class="dropdown">
  11. <button type="button"
  12. class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget"
  13. :class="[checkData.length>0?'btn-dark text-light':'']"
  14. data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">导出Excel
  15. </button>
  16. <div class="dropdown-menu">
  17. <a class="dropdown-item" @click="orderIssueExport(false)" href="javascript:">导出勾选内容</a>
  18. <a class="dropdown-item" @click="orderIssueExport(true)" href="javascript:">导出所有页</a>
  19. </div>
  20. </span>
  21. @cannot('订单管理-问题件-客户不可见')
  22. <span class="ml-1">
  23. <button type="button" class="btn btn-outline-dark btn-sm form-control-sm tooltipTarget" @click="endOrderIssue" :class="[checkData.length>0?'btn-dark text-light':'']">
  24. 批量完结
  25. </button>
  26. </span>
  27. @endcannot
  28. @can('订单管理-问题件-删除')
  29. <span class="ml-1">
  30. <button type="button" class="btn btn-outline-dark btn-sm form-control-sm tooltipTarget" @click="batchDeleteOrderIssue">
  31. 批量删除
  32. </button>
  33. </span>
  34. @endcan
  35. @can('订单管理-问题件-编辑')
  36. <span class="ml-1">
  37. <button type="button" class="btn btn-outline-dark btn-sm form-control-sm tooltipTarget" @click="batchStoreLogsModel">
  38. 批量处理说明
  39. </button>
  40. </span>
  41. @endcan
  42. <span class="ml-1">
  43. <button type="button" class="btn btn-outline-dark btn-sm form-control-sm tooltipTarget" @click="copyOrderNo">
  44. 复制快递单号
  45. </button>
  46. </span>
  47. <span class="ml-1">
  48. <button type="button" class="btn btn-outline-dark btn-sm form-control-sm tooltipTarget" @click="importdispose">
  49. 批量导入处理
  50. </button>
  51. </span>
  52. @cannot('订单管理-问题件-客户不可见')
  53. @can('订单管理-问题件-财务确认')
  54. <span class="ml-1">
  55. <button type="button" class="btn btn-outline-dark btn-sm form-control-sm tooltipTarget" @click="financeConfirm">
  56. 批量财务确认
  57. </button>
  58. </span>
  59. @endcan
  60. @can('订单管理-问题件-批量归档')
  61. <span class="ml-1">
  62. <button type="button" class="btn btn-outline-primary btn-sm form-control-sm tooltipTarget" @click="archiveOrderIssue" v-show="checkData.length>0" >
  63. 批量归档
  64. </button>
  65. </span>
  66. @endcan
  67. @endcannot
  68. </div>
  69. <table class="table table-sm table-striped table-bordered table-hover card-body p-0 m-0" style="background: #fff;@cannot('订单管理-问题件-客户不可见')min-width: 3000px;@else min-width: 1990px; @endcannot">
  70. <tr class="tr-yellow" align="center" >
  71. <th class=" font-weight-bolder header-1" ></th>
  72. <th class="td-yellow font-weight-bolder original-class table-head-warning header-2">
  73. <span>原始运单</span>
  74. <button class="btn btn-sm btn-outline-secondary float-right" v-if="isShowOrderInfo" @click="hideOrderInfo">
  75. 隐藏运单列
  76. </button>
  77. </th>
  78. <th class="font-weight-bolder header-3">
  79. <button class="btn btn-sm btn-outline-secondary float-left" v-if="isShowRejectedBill" @click="hideRejectedBill">
  80. 隐藏退单列
  81. </button>
  82. 情况说明
  83. @cannot('订单管理-问题件-客户不可见')
  84. <button class="btn btn-sm btn-outline-secondary" v-if="isShowSecondOrderInfo" @click="hideSecondOrder">
  85. 隐藏运单列
  86. </button>
  87. @endcannot
  88. </th>
  89. @cannot('订单管理-问题件-客户不可见')
  90. <th></th>
  91. @endcannot
  92. </tr>
  93. <tr class="tr-yellow" align="center">
  94. <th rowspan="2" class="align-middle one-layer">
  95. <label for="all">
  96. <input id="all" type="checkbox" @click="checkAll($event)"/>
  97. </label>
  98. </th>
  99. <th class="one-layer align-middle" rowspan="2" style=" min-width: 50px;">序号</th>
  100. <th class="one-layer align-middle" rowspan="2" style=" min-width: 70px;">ID</th>
  101. @cannot('订单管理-问题件-客户不可见')
  102. <th class="one-layer align-middle" rowspan="2" style=" min-width: 75px;">新退件状态</th>
  103. @can("订单管理-问题件-置顶")
  104. <th class="one-layer align-middle" rowspan="2" style=" min-width: 75px;">置顶</th>
  105. @endcan
  106. <th class="one-layer align-middle" rowspan="2" style=" min-width: 100px;">退单状态</th>
  107. @endcannot
  108. <th class="one-layer align-middle" rowspan="2" style="min-width: 120px">最终状态</th>
  109. @cannot('订单管理-问题件-客户不可见')
  110. <th class="tow-layer align-middle td-yellow" rowspan="2" style="min-width: 165px;">登记日期</th>
  111. @endcannot
  112. <th class="tow-layer align-middle td-yellow" rowspan="2" style="min-width: 165px;">订单日期</th>
  113. <th class="tow-layer align-middle td-yellow" rowspan="2" style="min-width: 100px;">客户</th>
  114. <th class="tow-layer align-middle td-yellow" rowspan="2" style="min-width: 200px;">店铺</th>
  115. <th class="tow-layer align-middle td-yellow" rowspan="2" style="min-width: 200px;">客户订单号</th>
  116. <th class="tow-layer align-middle td-yellow" rowspan="2" style="min-width: 100px;">原始承运商</th>
  117. <th class="tow-layer align-middle td-yellow" rowspan="2" style="min-width: 150px;">原始运单号</th>
  118. {{--原始商品明细 开始--}}
  119. <th class="tow-layer align-middle td-yellow" v-if="!isShowOrderInfo" rowspan="2" style="min-width:50px">展开</th>
  120. <th class="tow-layer align-middle td-yellow" v-if="isShowOrderInfo" rowspan="2" style="min-width: 200px">收货人名称</th>
  121. <th class="tow-layer align-middle td-yellow" v-if="isShowOrderInfo" rowspan="2" style="min-width: 200px;">收货人电话</th>
  122. <th class="tow-layer align-middle td-yellow" v-if="isShowOrderInfo" rowspan="2" style="min-width: 70px">省</th>
  123. <th class="tow-layer align-middle td-yellow" v-if="isShowOrderInfo" rowspan="2" style="min-width: 70px">市</th>
  124. <th class="tow-layer align-middle td-yellow" v-if="isShowOrderInfo" rowspan="2" style="min-width: 70px">区</th>
  125. <th class="tow-layer align-middle td-yellow" v-if="isShowOrderInfo" rowspan="2" style="min-width:300px">收货人地址</th>
  126. <th class="tow-layer align-middle td-yellow" v-if="isShowOrderInfo" colspan="3" style="min-width:300px">原始商品明细</th>
  127. <th class="three-layer align-middle" rowspan="2" v-if="!isShowRejectedBill" style="min-width:50px">展开</th>
  128. <th class="three-layer align-middle" rowspan="2" v-if="isShowRejectedBill" style="min-width:220px">退回单号</th>
  129. <th class="three-layer align-middle" colspan="5" v-if="isShowRejectedBill" style="min-width: 450px">返回商品明细</th>
  130. <th class="three-layer bg-whit align-middle" rowspan="2" style="min-width: 180px">情况说明</th>
  131. <th class="three-layer align-middle" rowspan="2" style="min-width: 115px">问题类别</th>
  132. <th class="three-layer align-middle" colspan="4" style="min-width: 155px">处理结果</th>
  133. @cannot('订单管理-问题件-客户不可见')
  134. <th class="three-layer align-middle" rowspan="2" v-if="!isShowSecondOrderInfo" style="width:50px">展开</th>
  135. <th class="three-layer align-middle" rowspan="2" v-if="isShowSecondOrderInfo" style=" min-width: 120px;">二次客户订单号</th>
  136. <th class="three-layer align-middle" rowspan="2" v-if="isShowSecondOrderInfo" style=" min-width: 100px;">二次承运商</th>
  137. <th class="three-layer align-middle" rowspan="2" v-if="isShowSecondOrderInfo" style=" min-width: 200px;">二次运单号</th>
  138. <th class="three-layer" colspan="3" v-if="isShowSecondOrderInfo" style=" min-width: 350px;">二次商品明细</th>
  139. @endcannot
  140. @cannot('订单管理-问题件-客户自定义订单号')
  141. <th class="three-layer align-middle" rowspan="2" style="min-width: 120px">自定义订单号</th>
  142. @endcannot
  143. @cannot('订单管理-问题件-客户不可见')
  144. <th class="three-layer align-middle" rowspan="2" style="min-width: 120px">承运商赔偿金额</th>
  145. <th class="three-layer align-middle" rowspan="2" style="min-width: 120px">承运商快递减免</th>
  146. @endcannot
  147. <th class="three-layer align-middle" rowspan="2" style="min-width: 120px">宝时赔偿金额</th>
  148. <th class="three-layer align-middle" rowspan="2" style="min-width: 120px">宝时快递减免</th>
  149. @cannot('订单管理-问题件-客户不可见')
  150. <th class="three-layer align-middle" rowspan="2" style="min-width: 120px">事故责任方</th>
  151. <th class="align-middle" rowspan="2" style="min-width: 120px">操作</th>
  152. @endcannot
  153. </tr>
  154. <tr class=" tr-yellow" align="center">
  155. <th class="td-yellow" v-if="isShowOrderInfo" style="min-width: 120px">条码</th>
  156. <th class="td-yellow" v-if="isShowOrderInfo" style="min-width: 150px">商品名</th>
  157. <th class="td-yellow" v-if="isShowOrderInfo" style="min-width: 75px">数量</th>
  158. @cannot('订单管理-问题件-客户不可见')
  159. <th v-if="isShowRejectedBill" style="min-width: 75px">条码</th>
  160. <th v-if="isShowRejectedBill" style="min-width: 100px">商品名</th>
  161. <th v-if="isShowRejectedBill" style="min-width: 50px">数量</th>
  162. <th v-if="isShowRejectedBill" style="min-width: 50px">是否正品</th>
  163. <th v-if="isShowRejectedBill" style="min-width: 100px">备注</th>
  164. @endcannot
  165. <th style="min-width: 120px">说明</th>
  166. <th style="min-width: 100px">操作者</th>
  167. <th style="min-width: 170px">时间</th>
  168. <th ></th>
  169. @cannot('订单管理-问题件-客户不可见')
  170. <th v-if="isShowSecondOrderInfo" style="min-width: 100px">条码</th>
  171. <th v-if="isShowSecondOrderInfo" style="min-width: 100px">商品名</th>
  172. <th v-if="isShowSecondOrderInfo" style="min-width: 75px">数量</th>
  173. @endcannot
  174. </tr>
  175. <tr class="tr-yellow text-center table-body" v-if="orderIssues" v-for="(orderIssue,index) in orderIssues"
  176. @click="selectedColor(orderIssue.id,$event)" :class="orderIssue.remark ? 'tr_top':''" v-on:mouseover="hidetop($event)" v-on:mouseleave="showtop($event)">
  177. {{-- :style="[{'font-weight': orderIssue.id===selectedStyle?'bold':''}]">--}}
  178. <td class="child-layer-1">
  179. <div class="m-0 p-0 " :style="[{'min-height':orderIssue.remark ?'72px':'45px'}]">
  180. <input class="checkItem" type="checkbox" :value="orderIssue.id" v-model="checkData">
  181. </div>
  182. </td>
  183. <td class="child-layer-1 text-nowrap">
  184. @{{index+1}}
  185. <span class="text-muted" v-if="orderIssue.finance_confirm === '是'">财务确认</span>
  186. </td>
  187. <td class="child-layer-1">
  188. @{{ orderIssue.id }}
  189. @can('订单管理-问题件-编辑')
  190. <button type="button" v-if="orderIssue.imported_status === '导入未处理'" class="btn btn-sm btn-primary" @click="updateOrderIssue(orderIssue,'imported_status',$event)">导入</button>
  191. @endcan
  192. </td>
  193. @cannot('订单管理-问题件-客户不可见')
  194. <td class="child-layer-1">
  195. @can('订单管理-问题件-编辑')
  196. <button type="button" class="btn btn-sm btn-outline-secondary" @click="disposeOrderIssue($event,orderIssue)" :data-value="orderIssue.id"
  197. v-if="orderIssue.is_new_rejecting === '有'">有
  198. </button>
  199. <span v-else>@{{ orderIssue.is_new_rejecting }}</span>
  200. @else
  201. <span v-if="orderIssue.is_new_rejecting">@{{ orderIssue.is_new_rejecting }}</span>
  202. @endcan
  203. </td>
  204. @can("订单管理-问题件-置顶")
  205. <td class="text-muted child-layer-1">
  206. <button type="button" class="btn btn-sm btn-outline-danger " @click="cancelOnTop($event)" :data-value="orderIssue.top.id" style="opacity: 0.75" v-if="orderIssue.top">
  207. 取消
  208. </button>
  209. <button type="button" class="btn btn-sm btn-outline-secondary" @click="OrderIssueOnTop($event)" :data-value="orderIssue.id" style="opacity: 0.75" v-else>
  210. 置顶
  211. </button>
  212. </td>
  213. @endcan
  214. <td class="child-layer-1">
  215. @can('订单管理-问题件-编辑')
  216. <select class="form-control form-control-sm" :value="orderIssue.rejecting_status" @change="updateOrderIssue(orderIssue,'rejecting_status',$event)">
  217. <option v-for="item in rejectingStatus" :value="item.name">@{{ item.value }}</option>
  218. </select>
  219. @else
  220. @{{ orderIssue.rejecting_status }}
  221. @endcan
  222. </td>
  223. @endcannot
  224. <td class="child-layer-1">
  225. @can('订单管理-问题件-编辑')
  226. <select class="form-control form-control-sm" :value="orderIssue.final_status" @change="updateOrderIssue(orderIssue,'final_status',$event)">
  227. <option v-for="item in finalStatus" :value="item.value">@{{ item.name }}</option>
  228. </select>
  229. @else
  230. @{{ orderIssue.final_status }}
  231. @endcan
  232. </td>
  233. @cannot('订单管理-问题件-客户不可见')
  234. <td class="toptd td-yellow child-layer-2">
  235. <div v-if="orderIssue.remark" class="bg-light-yellow text-danger top text-left" data-toggle="tooltip" style="opacity: 0.1;position: absolute;z-index: 1">
  236. 置顶备注:@{{ orderIssue.remark }}
  237. </div>
  238. @{{ orderIssue.created_at }}
  239. </td>
  240. @endcannot
  241. <td class="td-yellow child-layer-2">
  242. @cannot('订单管理-问题件-客户不可见')
  243. @else
  244. <div v-if="orderIssue.remark" class="bg-light-yellow text-danger top text-left" data-toggle="tooltip" style="opacity: 0.1;position: absolute;z-index: 1">
  245. 置顶备注:@{{ orderIssue.remark }}
  246. </div>
  247. @endcannot
  248. @{{ orderIssue.order.created_at }}
  249. </td>
  250. <td class="td-yellow child-layer-2">
  251. <span v-if='orderIssue.order.owner'>@{{ orderIssue.order.owner.name }}</span>
  252. </td>
  253. <td class="td-yellow child-layer-2">
  254. <template v-if="orderIssue.order.shop">@{{ orderIssue.order.shop.name }}</template>
  255. </td>
  256. <td class="td-yellow child-layer-2">
  257. <template v-if="orderIssue.order"> @{{ orderIssue.order.client_code }}</template>
  258. <td class="td-yellow child-layer-2">
  259. <span v-if='orderIssue.order.logistic'>@{{ orderIssue.order.logistic.name }}</span>
  260. </td>
  261. <td class=" hide-content p-0 td-yellow child-layer-2" valign="middle" align="center">
  262. <span :class="orderIssue.order.logisticNumbers.length > 1 ?'collapse ':''" :id="'logisticNumbers'+orderIssue.id" >
  263. <span class="m-0 p-0 d-inline-block" v-for="logisticNumber in orderIssue.order.logisticNumbers" >@{{ logisticNumber }}&nbsp;&nbsp;</span>
  264. </span>
  265. <button v-if="orderIssue.order.logisticNumbers.length > 1" type="button" class="btn btn-sm btn-outline-primary align-middle mt-1"
  266. :id="'logisticNumbersBtn'+orderIssue.id" data-toggle="collapse" :data-target="'#logisticNumbers'+orderIssue.id"
  267. @click="toggleLogisticNumbers(orderIssue.id,orderIssue.order.logisticNumbers.length)">
  268. 分箱@{{ orderIssue.order.logisticNumbers.length }}件,点击展开
  269. </button>
  270. </td>
  271. {{--商品明细 开始--}}
  272. <td class="td-yellow p-0 m-0 child-layer-2" v-if="!isShowOrderInfo && index===0" style="width:50px" :rowspan="orderIssues.length">
  273. <span class="btn btn-outline-secondary " @click="showOrderInfo" :style="orderIssues.length>4 ?'{height: 200px;line-height: 100px':''" >展开运单列</span>
  274. </td>
  275. <td class="td-yellow child-layer-2-hide text-wrap text-letter" v-if="isShowOrderInfo" style="max-width: 320px">@{{ orderIssue.order.consignee_name }}</td>
  276. <td class="td-yellow child-layer-2-hide text-wrap text-letter" v-if="isShowOrderInfo" style="max-width: 320px">@{{ orderIssue.order.consignee_phone }}</td>
  277. <td class="td-yellow child-layer-2-hide" v-if="isShowOrderInfo">@{{ orderIssue.order.province }}</td>
  278. <td class="td-yellow child-layer-2-hide" v-if="isShowOrderInfo" >@{{ orderIssue.order.city }}</td>
  279. <td class="td-yellow child-layer-2-hide" v-if="isShowOrderInfo">@{{ orderIssue.order.district }}</td>
  280. <td class="td-yellow child-layer-2-hide" style="max-width: 400px" v-if="isShowOrderInfo" >
  281. <span class="text-wrap m-0 p-0 text-wrap text-letter" style="max-width: 550px">@{{ orderIssue.order.address }}</span>
  282. </td>
  283. <td class="td-yellow p-0 child-layer-2-hide" :id="orderIssue.id+'items'" colspan="3" v-if="isShowOrderInfo" :data-value="orderIssue.orderCount = 0" :data-value1='orderIssue.orderPackagecount = 0'>
  284. <div v-if="orderIssue.order">
  285. <table class="table table-sm m-0" v-if="orderIssue.order.packages"
  286. :class="orderIssue.order.commodityPackages > 1? 'collapse' : ''" :id="'order'+orderIssue.id">
  287. <template v-for="packages in orderIssue.order.packages">
  288. <tr v-for="item in packages.commodities" class="text-center" :data-value="orderIssue.orderCount += 1" align="center" v-if="item.commodity" @click="removeFocusing($event)">
  289. <td >@{{ item.commodity.sku }}</td>
  290. <td>
  291. <p class="text-truncate text-primary m-0 p-0 tooltipTarget" style="width: 100px;cursor:pointer;text-decoration: underline" title="双击展开" @dblclick="nowrapText($event)">@{{ item.commodity.name }}</p>
  292. <p class="text-nowrap m-0 p-0 tooltipTarget" style="display: none;cursor:pointer" @dblclick="truncateText($event)" title="双击收起">@{{ item.commodity.name }}</p>
  293. </td>
  294. <td >@{{ item.amount }}</td>
  295. </tr>
  296. </template>
  297. </table>
  298. <button v-if="orderIssue.order.commodityPackages > 1" type="button" class="btn btn-sm btn-outline-primary mt-1" :id="'orderBtn'+orderIssue.id" @click="toggleOrder(orderIssue.id,orderIssue.orderIssue.order.amount)" data-toggle="collapse" :data-target="'#order'+orderIssue.id">
  299. 商品@{{ orderIssue.order.amount }}件,点击展开
  300. </button>
  301. </div>
  302. </td>
  303. <td class="text-muted child-layer-3-hide" v-if="isShowRejectedBill">
  304. @can('订单管理-问题件-编辑')
  305. <input type="text" class="form-control form-control-sm" :value="orderIssue.logistic_number_return" @change="changeRejectedBill(orderIssue,$event)">
  306. @else
  307. @{{ orderIssue.logistic_number_return }}
  308. @endcan
  309. </td>
  310. <td class="p-0 m-0 child-layer-3" v-if="!isShowRejectedBill && index === 0 " style="width:50px;" :rowspan="orderIssues.length" >
  311. <span class="btn btn-outline-secondary " @click="showRejectedBill" :style="orderIssues.length>4 ?'{height: 200px;line-height: 100px':''" >展开退单列</span>
  312. </td>
  313. <td class="p-0 child-layer-3-hide" :id="orderIssue.id+'rejectedBill'" valign="middle" align="center" colspan="5" v-if="isShowRejectedBill">
  314. <div v-if="orderIssue.rejected_bill" class="m-0 p-0">
  315. <table v-if="orderIssue.rejected_bill.items" class="table table-sm m-0" :class="orderIssue.rejected_bill.items.length > 1 ? 'collapse' : '' " :id="'rejectedBill'+orderIssue.id"
  316. :data-value="orderIssue.rejectedCount = 0">
  317. <tr v-for="item in orderIssue.rejected_bill.items" @click="removeFocusing($event)"
  318. :data-value="orderIssue.rejected_bill.sum += item.amount" align="center">
  319. <td style="min-width: 75px" >@{{ item.barcode_goods }}</td>
  320. <td style="min-width: 100px" >
  321. <div class="text-truncate text-primary tooltipTarget" style="width: 100px;cursor:pointer;text-decoration: underline" title="双击展开" @dblclick="nowrapText($event)">@{{ item.name_goods }}</div>
  322. <div class="text-nowrap m-0 p-0 tooltipTarget" style="display: none;cursor:pointer" @dblclick="truncateText($event)" title="双击收起">@{{ item.name_goods }}</div>
  323. </td>
  324. <td style="min-width: 50px" :data-value="orderIssue.rejectedCount += item.amount">@{{ item.amount }}</td>
  325. <td style="min-width: 50px" >@{{ item.quality_label }}</td>
  326. <td style="min-width: 100px" >@{{ item.remark }}</td>
  327. </tr>
  328. </table>
  329. <button v-if="orderIssue.rejected_bill.items.length > 1" type="button" class="btn btn-sm btn-outline-primary align-middle mt-1" :id="'rejectedBillBtn'+orderIssue.id"
  330. data-toggle="collapse" :data-target="'#rejectedBill'+orderIssue.id" @click="toggleRejectedBill(orderIssue.id,orderIssue.rejectedCount)">
  331. 商品@{{ orderIssue.rejectedCount }}件,点击展开
  332. </button>
  333. </div>
  334. </td>
  335. <td class="child-layer-3">
  336. @can('订单管理-问题件-编辑')
  337. <textarea class="form-control form-control-sm" @change="updateOrderIssue(orderIssue,'result_explain',$event)"
  338. data-toggle="tooltip" data-placement="bottom" :title="orderIssue.result_explain"
  339. :cols="orderIssue.result_explain==null?'': (orderIssue.result_explain.length>10?10:orderIssue.result_explain.length)"
  340. :rows="orderIssue.result_explain==null?2: (orderIssue.result_explain.length>10?(Math.ceil(orderIssue.result_explain.length)/10)+1:2)"
  341. >@{{ orderIssue.result_explain }}</textarea>
  342. @else
  343. @{{ orderIssue.result_explain}}
  344. @endcan
  345. </td>
  346. <td class="child-layer-3">
  347. @can('订单管理-问题件-编辑')
  348. <select class="form-control form-control-sm" :value="orderIssue.order_issue_type_id" @change="updateOrderIssue(orderIssue,'order_issue_type_id',$event)">
  349. <option value></option>
  350. <option v-for="type in orderIssueType" :value="type.name" >@{{ type.value }}</option>
  351. <select>
  352. @else
  353. <span v-if="orderIssue.issue_type">@{{ orderIssue.issue_type.name}}</span>
  354. @endcan
  355. </td>
  356. <td class=" m-0 p-0 log-td child-layer-3" valign="middle" align="center" v-on:mouseover="showAddBtn($event)" v-on:mouseleave="hideAddBtn($event)" colspan="4">
  357. @can('订单管理-问题件-处理结果添加')
  358. <div class="addLogDiv row m-0 p-0 form-group" :id="'AddLog_'+orderIssue.id" style="display: none;">
  359. <input type="hidden" name="id" :value="orderIssue.id">
  360. <div style="width: 45px"></div>
  361. <div class="form-inline m-2">
  362. <input type="text" name="content" class="form-control" style="width: 300px" required >
  363. <button type="button" class="btn btn-primary ml-2" @click="addOrderIssueLog('AddLog_'+orderIssue.id,orderIssue)">添加</button>
  364. </div>
  365. </div>
  366. <div style="position: absolute;display: none;margin-top: -35px" class="add-btn" :id="'AddBtn'+orderIssue.id">
  367. <button type="button" class="btn btn-primary " @click="showAddDiv('AddLog_'+orderIssue.id)">新</button>
  368. </div>
  369. @endcan
  370. <template v-if="orderIssue.logs && orderIssue.logs.length > 0" class="p-0 m-0 ">
  371. <table class="table table-sm p-0 m-0 " :id="'logs'+orderIssue.id" :data-value="orderIssue.logShow = true">
  372. <tr style="position:static" align="center" v-for="(log,index) in orderIssue.logs"
  373. :class="(index > 1 && orderIssue.logShow) ? 'd-none':''"
  374. @click="removeFocusing($event)"
  375. v-on:mouseover="showDelBtn($event)" v-on:mouseleave="hideDelBtn($event)" >
  376. <td style="min-width: 200px">@{{ log.content }}</td>
  377. <td class="text-muted" style="min-width: 120px">@{{ log.user.name }}</td>
  378. <td class="text-muted" style="min-width: 170px">@{{ log.created_at }}</td>
  379. @can('订单管理-问题件-处理结果删除')
  380. <td style="" class="m-0 p-0 border-0">
  381. <button type="button" class="btn btn-sm btn-outline-danger m-0 del-btn invisible" @click="deleteOrderIssueLog(log.id,orderIssue.id)">删</button>
  382. </td>
  383. @endcan
  384. </tr>
  385. </table>
  386. <button type="button" class="btn btn-sm btn-outline-primary align-middle mt-1" v-if="orderIssue.logs.length > 2"
  387. @click="toggleLogs(orderIssue,$event)" :data-value="orderIssue.logs.length" :data-count="orderIssue.logShow" >
  388. 记录共@{{ orderIssue.logs.length }}条,点击展开
  389. </button>
  390. </template>
  391. <div v-else class="w-auto" style="height: 55px">
  392. </div>
  393. </td>
  394. @cannot('订单管理-问题件-客户不可见')
  395. <td class="p-0 m-0 h-100 child-layer-3" v-if="!isShowSecondOrderInfo && index === 0" style="width:50px;" :rowspan="orderIssues.length" >
  396. <span class="btn btn-outline-secondary " @click="showSecondeOrder" :style="orderIssues.length>4 ?'{height: 200px;line-height: 100px':''">展开运单列</span>
  397. </td>
  398. <td class="child-layer-3-hide" v-if="isShowSecondOrderInfo">
  399. @can('订单管理-问题件-编辑')
  400. <input class="form-control form-control-sm" @change="editSecondClientNo(orderIssue,$event)" :value="orderIssue.second_client_no">
  401. @else
  402. @{{ orderIssue.second_client_no }}
  403. @endcan
  404. </td>
  405. <td class="child-layer-3-hide" v-if="isShowSecondOrderInfo">
  406. <span v-if="orderIssue.second_order" class="p-0">
  407. <span v-if="orderIssue.second_order.logistic">
  408. @{{ orderIssue.second_order.logistic.name }}
  409. </span>
  410. </span>
  411. </td>
  412. <td class="log-td p-0 child-layer-3-hide" v-if="isShowSecondOrderInfo" v-on:mouseover="edit.orderIssue.id=orderIssue.id" v-on:mouseleave="edit.orderIssue.id = null">
  413. <div class="row position-absolute p-0 m-0" v-if="edit.orderIssue.id === orderIssue.id" :class="edit.orderIssue.id === orderIssue.id ? '':'d-none'">
  414. <button type="button" class="btn btn-primary " style="margin-top: -35px" @click="edit.orderIssue.showId === orderIssue.id ? edit.orderIssue.showId='':edit.orderIssue.showId=orderIssue.id">新</button>
  415. </div>
  416. <div class="row p-0 m-0" v-if="edit.orderIssue.showId === orderIssue.id ">
  417. <div class="form-inline">
  418. <input class="form-control" :id="'secondLogisticNumber-'+orderIssue.id">
  419. <button type="button" class="btn btn-sm btn-primary" @click="addSecondLogisticNumber(orderIssue)">添加</button>
  420. </div>
  421. </div>
  422. <div v-if="orderIssue.second_order !== null">
  423. <div class="text-center m-0" :id="'secondOrderNumbers'+orderIssue.id"
  424. :class="orderIssue.seconderCount > 1 ? 'collapse':''"
  425. :data-value="orderIssue.seconderCount = 0">
  426. <p class="m-0 p-0 text-muted " v-for="logisticNumber in orderIssue.second_order.logisticNumbers"
  427. :data-value="orderIssue.seconderCount +=1">@{{ logisticNumber }}</p>
  428. </div>
  429. <button v-if="orderIssue.seconderCount > 1" type="button"
  430. class="btn btn-sm btn-outline-primary align-middle mt-1"
  431. data-toggle="collapse"
  432. :id="'secondOrderNumbersBtn'+orderIssue.id"
  433. :data-target="'#secondOrderNumbers'+orderIssue.id"
  434. @click="toggleseCondOrderNumbers(orderIssue.id,orderIssue.second_order.logisticNumbers.length)">
  435. 分箱@{{ orderIssue.second_order.logisticNumbers.length }}件,点击展开
  436. </button>
  437. </div>
  438. <div v-else-if="orderIssue.second_order === null">
  439. @{{orderIssue.second_logistic_number}}
  440. </div>
  441. </td>
  442. <td class="child-layer-3-hide p-0" colspan="3" v-if="isShowSecondOrderInfo">
  443. <template v-if="orderIssue.second_order!==null" class=" p-0">
  444. <div class="m-0 p-0" :class="orderIssue.secondeOrderCount > 1 ? 'collapse':''"
  445. :id="'secondOrder'+orderIssue.id">
  446. <table class="table table-sm m-0 " :data-count="orderIssue.secondeOrderCount = 0" :data-value="orderIssue.secondeOrderItems = 0">
  447. <template v-for="packages in orderIssue.second_order.packages">
  448. <tr v-for="item in packages.commodities" :data-value="orderIssue.secondeOrderCount += 1" v-if="item.commodity" >
  449. <td >@{{ item.commodity.sku }}</td>
  450. <td >
  451. <div class="text-truncate text-primary tooltipTarget" style="width: 100px;cursor:pointer;text-decoration: underline" title="双击展开" @dblclick="nowrapText($event)">@{{ item.commodity.name }}</div>
  452. <div class="text-nowrap tooltipTarget" style="display: none;cursor:pointer" @dblclick="truncateText($event)" title="双击收起">@{{ item.commodity.name }}</div>
  453. </td>
  454. <td :data-value="orderIssue.secondeOrderItems+=item.amount">@{{ item.amount }}</td>
  455. </tr>
  456. </template>
  457. </table>
  458. </div>
  459. <button type="button" class="btn btn-sm btn-outline-primary align-middle mt-1" data-toggle="collapse"
  460. v-if="orderIssue.secondeOrderCount > 0"
  461. :id="'secondOrderBtn'+orderIssue.id"
  462. :data-target="'#secondOrder'+orderIssue.id"
  463. @click="toggleSecond(orderIssue.id,orderIssue.secondeOrderItems)">
  464. 商品@{{ orderIssue.secondeOrderItems }}件,点击展开
  465. </button>
  466. </template>
  467. </td>
  468. @endcannot
  469. @cannot('订单管理-问题件-客户自定义订单号')
  470. <td>
  471. <input class="form-control form-control-sm" :value="orderIssue.custom_code" @change="updateOrderIssue(orderIssue,'custom_code',$event)">
  472. </td>
  473. @endcan
  474. @cannot('订单管理-问题件-客户不可见')
  475. <td class="child-layer-3">
  476. @can('订单管理-问题件-编辑')
  477. <input type="number" class="form-control form-control-sm" :value="orderIssue.logistic_indemnity_money" @change="updateOrderIssue(orderIssue,'logistic_indemnity_money',$event)">
  478. @else
  479. @{{ orderIssue.logistic_indemnity_money }}
  480. @endcan
  481. </td>
  482. <td class="child-layer-3">
  483. @can('订单管理-问题件-编辑')
  484. <select class="form-control form-control-sm" :value="orderIssue.logistic_express_remission" @change="updateOrderIssue(orderIssue,'logistic_express_remission',$event)">
  485. <option value></option>
  486. <option v-for="item in expressRemission" :value="item">@{{ item }}</option>
  487. </select>
  488. @else
  489. @{{ orderIssue.logistic_express_remission }}
  490. @endcan
  491. </td>
  492. @endcannot
  493. <td class="child-layer-3">
  494. @can('订单管理-问题件-编辑')
  495. <input type="number" class="form-control form-control-sm" :value="orderIssue.baoshi_indemnity_money" @change="updateOrderIssue(orderIssue,'baoshi_indemnity_money',$event)">
  496. @else
  497. @{{ orderIssue.baoshi_indemnity_money }}
  498. @endcan
  499. </td>
  500. <td class="child-layer-3">
  501. @can('订单管理-问题件-编辑')
  502. <select class="form-control form-control-sm" :value="orderIssue.baoshi_express_remission" @change="updateOrderIssue(orderIssue,'baoshi_express_remission',$event)">
  503. <option value></option>
  504. <option v-for="item in expressRemission" :value="item">@{{ item }}</option>
  505. </select>
  506. @else
  507. @{{ orderIssue.baoshi_express_remission }}
  508. @endcan
  509. </td>
  510. @cannot('订单管理-问题件-客户不可见')
  511. <td class="child-layer-3">
  512. <select class="form-control form-control-sm" :value="orderIssue.user_workgroup_id" @change="updateOrderIssue(orderIssue,'user_workgroup_id',$event)">
  513. <option value></option>
  514. <option v-for="item in userWorkGroup" :value="item.name">@{{ item.value }}</option>
  515. </select>
  516. </td>
  517. <td>
  518. @can('订单管理-问题件-编辑')
  519. <a :href="'edit/'+orderIssue.id" class="btn btn-sm btn-outline-primary" target="_blank">改</a>
  520. @endcan
  521. @can('订单管理-问题件-删除')
  522. <button type="button" class="btn btn-sm btn-outline-danger" @click="deleteOrderIssue($event)" :data-value="orderIssue.id">
  523. </button>
  524. @endcan
  525. </td>
  526. @endcannot
  527. </tr>
  528. </table>
  529. <div class="text-info h5 btn btn">{{$orderIssues->count()}}/@{{ total }}</div>
  530. {{$orderIssues->withQueryString()->links()}}
  531. </div>
  532. </div>
  533. {{--batchStore logs--}}
  534. <div class="modal fade" id="batchStoreLogsModel" tabindex="-1" role="dialog" aria-labelledby="logsLabel" aria-hidden="true">
  535. <div class="modal-dialog modal-dialog-centered">
  536. <div class="modal-content">
  537. <div class="modal-header">
  538. <h5 class="modal-title" id="logsLabel">输入处理内容</h5>
  539. <button type="button" class="close" data-dismiss="modal" aria-label="Close" @click="edit.batchStoreLogs=''">
  540. <span aria-hidden="true">&times;</span>
  541. </button>
  542. </div>
  543. <div class="modal-body">
  544. <textarea id="logsContent" class="form-control" v-model="edit.batchStoreLogs"></textarea>
  545. </div>
  546. <div class="modal-footer">
  547. <button type="button" class="btn btn-secondary" data-dismiss="modal" @click="edit.batchStoreLogs=''">
  548. 取消
  549. </button>
  550. <button type="button" class="btn btn-primary" data-dismiss="modal" @click="batchStoreLogs">
  551. 确认
  552. </button>
  553. </div>
  554. </div>
  555. </div>
  556. </div>
  557. {{--delete OrderIssue--}}
  558. <div class="modal fade" id="alertModal" tabindex="-1" role="dialog" aria-labelledby="alertModalLabel"
  559. aria-hidden="true">
  560. <div class="modal-dialog modal-dialog-centered">
  561. <div class="modal-content">
  562. <div class="modal-header">
  563. <h5 class="modal-title" id="exampleModalLabel">提示</h5>
  564. <button type="button" class="close" data-dismiss="modal" aria-label="Close"
  565. @click="changeDeleteId">
  566. <span aria-hidden="true">&times;</span>
  567. </button>
  568. </div>
  569. <div class="modal-body">
  570. <p>是否删除当前订单问题件?</p>
  571. <input type="hidden" id="deleteId" class="form-control"/>
  572. </div>
  573. <div class="modal-footer">
  574. <button type="button" class="btn btn-secondary" data-dismiss="modal" @click="changeDeleteId">
  575. 取消
  576. </button>
  577. <button type="button" class="btn btn-primary" data-dismiss="modal"
  578. @click="deleteOrderIssueById">确认
  579. </button>
  580. </div>
  581. </div>
  582. </div>
  583. </div>
  584. {{--OrderIssue On Top--}}
  585. <div class="modal fade " id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
  586. aria-hidden="true">
  587. <div class="modal-dialog modal-dialog-centered">
  588. <div class="modal-content">
  589. <div class="modal-header">
  590. <h5 class="modal-title" id="exampleModalLabel">请输入置顶备注</h5>
  591. <button type="button" class="close" data-dismiss="modal" aria-label="Close"
  592. @click="changeRemark">
  593. <span aria-hidden="true">&times;</span>
  594. </button>
  595. </div>
  596. <div class="modal-body">
  597. <input type="hidden" class="form-control" id="onTopId">
  598. <textarea type="text" class="form-control" required id="remark" @change="changeRemark"></textarea>
  599. <div class="invalid-feedback">
  600. 备注信息不能为空
  601. </div>
  602. </div>
  603. <div class="modal-footer">
  604. <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal"
  605. @click="changeRemark">关闭
  606. </button>
  607. <button type="button" class="btn btn-sm btn-primary" @click="submitOnTop">提交</button>
  608. </div>
  609. </div>
  610. </div>
  611. </div>
  612. </div>
  613. @endsection
  614. @section('lastScript')
  615. <style type="text/css">
  616. @keyframes anima {
  617. from {
  618. opacity: 0.1;
  619. }
  620. to {
  621. opacity: 1;
  622. }
  623. }
  624. @-webkit-keyframes anima {
  625. from {
  626. opacity: 0.75;
  627. }
  628. to {
  629. opacity: 0.1;
  630. }
  631. }
  632. .tr_top {
  633. min-height: 75px;
  634. }
  635. .bg-light-yellow {
  636. background: #fffff8;
  637. }
  638. .top {
  639. padding-top: 0px;
  640. padding-left: 10px;
  641. margin-top: -4px;
  642. margin-left: -5px;
  643. line-height: 75px;
  644. position: absolute;
  645. animation: anima;
  646. animation-duration: 3s;
  647. animation-timing-function: cubic-bezier(0, 0, 1, 1);
  648. animation-direction: alternate;
  649. animation-play-state: running;
  650. -webkit-animation-name: anima;
  651. -webkit-animation-duration: 3s;
  652. -webkit-animation-timing-function: cubic-bezier(0, 0, 1, 1);
  653. -webkit-animation-iteration-count: infinite;
  654. -webkit-animation-direction: alternate;
  655. -webkit-animation-play-state: running;
  656. }
  657. </style>
  658. <script type="text/javascript" src="{{mix('js/queryForm/queryForm.js')}}"></script>
  659. <script type="text/javascript" src="{{mix('js/queryForm/export.js')}}"></script>
  660. <script>
  661. let listVue = new Vue({
  662. el: '#issue_div',
  663. data: {
  664. orderIssues: {!! $orderIssues->toJson() !!}['data'],
  665. owners: [@foreach($owners as $owner){name: '{{ $owner->id }}', value: '{{ $owner->name}}'},@endforeach],
  666. orderIssueType: [
  667. @foreach($orderIssueType as $type)
  668. {name: '{{$type->id}}', value: '{{$type->name}}' },
  669. @endforeach],
  670. qualityLabel: [
  671. @foreach($qualityLabel as $type)
  672. {name: '{{$type->id}}', value: '{{$type->name}}'},
  673. @endforeach],
  674. userWorkGroup: [
  675. @foreach($userWorkgroup as $item)
  676. {name:{{$item->id}},value:'{{$item->name}}'},
  677. @endforeach],
  678. rejectingStatus: [
  679. {name:'无',value:'无'},
  680. {name:'未退回',value:'未退回'},
  681. {name:'全部退回',value:'全部退回'},
  682. {name:'部分退回',value:'部分退回'},
  683. {name:'差异退回',value:'差异退回'},
  684. {name:'超量退回',value:'超量退回'},
  685. {name:'全部退回',value:'全部退回'},
  686. ],
  687. logistics:[
  688. @foreach($logistics as $logistic)
  689. {name:{{$logistic->id}},value:'{{$logistic->name}}'},
  690. @endforeach
  691. ],
  692. expressRemission:['原单减免', '补发减免', '全部减免'],
  693. checkData: [],
  694. from: '',
  695. finalStatus: [{value:'',name:""},{value:'已解决',name:"已解决"},{value:'待退回',name:"待退回"},{value:'退回中',name:"退回中"},{value:'已归档',name:"已归档"},],//['无','已解决', '待退回', '退回中','已归档'],
  696. selectedStyle: '',
  697. deleteId: '',
  698. total: {!! $orderIssues->toJson() !!}['total'],
  699. isShowOrderInfo:true,
  700. isShowRejectedBill: true,
  701. isShowSecondOrderInfo: true,
  702. message:{},
  703. edit:{
  704. batchStoreLogs:'',
  705. isShow:[],
  706. addSendOrderIssueID:'',
  707. orderIssue: {id: null,showId:''},
  708. },
  709. },
  710. mounted: function () {
  711. $(".tooltipTarget").tooltip({'trigger':'hover'});
  712. this.isShowOrderInfo = false;
  713. this.isShowRejectedBill= false;
  714. this.isShowSecondOrderInfo= false;
  715. let tr = $('.tr-yellow')[1];
  716. let countShow = $(tr).children('.one-layer').length;
  717. $('.header-1').attr('colspan',countShow);
  718. $('[data-toggle="tooltip"]').tooltip({'trigger': 'hover'})
  719. $('#list').removeClass("d-none");
  720. let _this = this;
  721. let log_content_range = [{name:'15',value:'15天内'},{name:'31',value:'近一月'},{name:'92',value:'近三月'},{name:'183',value:'近半年'},{name:'366',value:'近一年'},{name:'0',value:'不限'},];
  722. let final_status = [
  723. {name: 'null', value: '无'},
  724. {name: '已解决', value: '已解决'},
  725. {name: '待退回', value: '待退回'},
  726. {name: '退回中', value: '退回中'},
  727. {name: '已归档', value: '已归档'},
  728. ];
  729. let imported_status = [{name:'导入未处理',value:'导入未处理'},{name:'导入已梳理',value:'导入已处理'}]
  730. let data = [[
  731. {name: 'created_at_start', type: 'dateTime', tip: '登记开始日期'},
  732. {
  733. name: 'owner_id',
  734. type: 'select_multiple_select',
  735. tip: ['输入关键词快速定位下拉列表,回车确定', '选择要显示的客户'],
  736. placeholder: ['货主', '定位或多选货主'],
  737. data: _this.owners
  738. },
  739. {name: 'client_code', type: 'input', tip: '原始订单号:前或后加百分号为单个模糊搜索,否则为多条件精确搜索', placeholder: '原始订单号'},
  740. {name: 'logistic_number', type: 'input', tip: ['输入原始运单号:前或后加百分号为单个模糊搜索,否则为多条件精确搜索'], placeholder: '运单号'},
  741. {
  742. name: 'logistic_id',
  743. type: 'select_multiple_select',
  744. tip: ['输入关键词快速定位下拉列表,回车确定', '选择要显示的承运商'],
  745. placeholder: ['承运商', '定位或多选承运商'],
  746. data: this.logistics
  747. },
  748. {name: 'logistic_number_return', type: 'input', tip: '退回单号:前或后加百分号为单个模糊搜索,否则为多条件精确搜索', placeholder: '退回单号'},
  749. {name: 'send_client_code', type: 'input', tip: '二次订单号:前或后加百分号为单个模糊搜索,否则为多条件精确搜索', placeholder: '二次订单号'},
  750. ], [
  751. {name: 'created_at_end', type: 'dateTime', tip: '登记结束日期'},
  752. {name: 'consignee_name', type: 'input', tip: '收货人名称:前或后加百分号为单个模糊搜索,否则为多条件精确搜索', placeholder: '收货人名称'},
  753. {name: 'consignee_phone', type: 'input', tip: '收货人电话:前或后加百分号为单个模糊搜索,否则为多条件精确搜索', placeholder: '收货人电话'},
  754. {name: 'good_barcode', type: 'input', tip: '条码:前或后加 百分号为单个模糊搜索,否则为多条件精确搜索', placeholder: '条码'},
  755. {name: 'good_name', type: 'input', tip: '商品名:前或后加 百分号为单个模糊搜索,否则为多条件精确搜索', placeholder: '商品名'},
  756. {name: 'id_quality_label', type: 'select', tip: '是否正品', placeholder: '是否正品', data: this.qualityLabel},
  757. {name: 'is_imported', type: 'select', tip: '是否导入处理', placeholder: '是否导入处理', data: imported_status},
  758. ],[
  759. @cannot('订单管理-问题件-客户不可见')
  760. {name: 'logistic_indemnity_money', type: 'select', tip: '承运商赔偿金额', placeholder: '承运商赔偿金额',data:[{name: '是',value:'是'},{name: '否',value:'否'}]},
  761. @endcannot
  762. {name: 'baoshi_indemnity_money', type: 'select', tip: '宝时赔偿金额', placeholder: '宝时赔偿金额',data:[{name: '是',value:'是'},{name: '否',value:'否'}]},
  763. @cannot('订单管理-问题件-客户不可见')
  764. {name: 'final_status', type: 'select', tip: '问题件的最终状态', placeholder: '最终状态', data: final_status},
  765. {name: 'order_issue_type_id', type: 'select_multiple_select', tip: ['问题类别',''], placeholder: ['问题类别',''], data: this.orderIssueType},
  766. @endcannot
  767. {name: ['log_content','addtime'], type: 'input_select', tip: ['处理结果:前或后加 百分号为单个模糊搜索,否则为多条件精确搜索','查询范围越短,搜索速度越快'], placeholder: ['处理结果',''],
  768. data:log_content_range,
  769. rules:[{son:{addtime:{default:'31',required_without_all_if:['created_at_start','created_at_end']}}}]},
  770. // {date_relevance:{date:['orderdate_start','orderdate_end'],relevance:'addtime',killing:'date',default:[31,92,183,366]}}]},
  771. {name: 'custom_code', type: 'input', tip: '自定义订单号:自定义订单号', placeholder: '自定义订单号'},
  772. {name: 'is_handle', type: 'checkbox', tip: '是否已处理', data: [{name: 'ture', value: '已解决'}]},
  773. ],[
  774. {name: 'settlement_at_start', type: 'dateTime', tip: '完结起始日期'},
  775. {name: 'settlement_at_end', type: 'dateTime', tip: '完结结束日期' },
  776. {name: 'hiddenTag', type: 'input', tip: '隐藏标识',placeholder: '标识'},
  777. {name: 'is_new_rejecting', type: 'select', tip: '退件状态',placeholder: '退件状态',data:[{name:'无',value:'无'},{name:'有',value:'有'},{name:'已处理',value:'已处理'}]},
  778. {name: 'rejectingStatus', type: 'select', tip: '退单状态',placeholder: '退单状态',data:this.rejectingStatus},
  779. {name: 'sendOrderClientCode', type: 'input', tip: '二次客户订单号',placeholder: '二次客户订单号'},
  780. {name: 'sendOrderLogisticNumber', type: 'input', tip: '二次运单号',placeholder: '二次运单号'},
  781. ]];
  782. this.form = new query({
  783. el: '#form_div',
  784. condition: data,
  785. appendDom : "btn",
  786. })
  787. this.form.init();
  788. let order = $('.table-head-warning')[0];
  789. $('.top').css('min-width', $(order).outerWidth(true));
  790. },
  791. watch: {
  792. checkData: {
  793. handler() {
  794. if (this.checkData.length === this.orderIssues.length) {
  795. document.querySelector('#all').checked = true;
  796. } else {
  797. document.querySelector('#all').checked = false;
  798. }
  799. },
  800. deep: true
  801. },
  802. isShowOrderInfo(newValue){
  803. let tr = $('.tr-yellow')[1];
  804. setTimeout(function(){
  805. let countShow = $(tr).children('.tow-layer').length;
  806. $('.header-2').attr('colspan',countShow + (newValue ? 2:0));
  807. },2);
  808. },
  809. isShowRejectedBill(newValue){
  810. let tr = $('.tr-yellow')[1];
  811. let _this = this;
  812. setTimeout(function(){
  813. let countShow = $(tr).children('.three-layer').length;
  814. $('.header-3').attr('colspan',countShow +3+ (_this.isShowSecondOrderInfo ? 2:0) +(_this.isShowRejectedBill?4:0));
  815. },2);
  816. },
  817. isShowSecondOrderInfo(newValue){
  818. let tr = $('.tr-yellow')[1];
  819. let _this = this;
  820. setTimeout(function(){
  821. let countShow = $(tr).children('.three-layer').length;
  822. $('.header-3').attr('colspan',countShow +3+ (_this.isShowSecondOrderInfo ? 2:0) +(_this.isShowRejectedBill?4:0));
  823. },2);
  824. },
  825. },
  826. methods: {
  827. selectedColor(orderno,e) {
  828. $('.table-body').removeClass('focusing')
  829. if (orderno === this.selectedStyle) {
  830. this.selectedStyle = '';
  831. return;
  832. }
  833. this.selectedStyle = orderno;
  834. $(e.target).parent('tr').addClass('focusing')
  835. },
  836. editOrderIssue($event) {
  837. let id = $($event.target).attr('data-value');
  838. window.location.href = "{{url('order/issue/edit')}}" + '/' + id;
  839. },
  840. deleteOrderIssue($event) {
  841. let id = $($event.target).attr('data-value');
  842. $('#deleteId').val(id);
  843. $('#alertModal').modal('show');
  844. },
  845. deleteOrderIssueById() {
  846. let _this = this;
  847. tempTip.setDuration(99999)
  848. tempTip.waitingTip('删除中,请稍候')
  849. let id = $('#deleteId').val();
  850. let data = {id: id};
  851. axios.post('{{url('apiLocal/order/issue/destroy')}}', data).then(function (res) {
  852. tempTip.setDuration(5000)
  853. tempTip.cancelWaitingTip();
  854. if (res.data.success) {
  855. for (let i = 0; i < _this.orderIssues.length; i++) {
  856. let data = _this.orderIssues[i];
  857. if (data.id == id) {
  858. _this.orderIssues.splice(i, 1);
  859. _this.deleteId = 0;
  860. break;
  861. }
  862. }
  863. tempTip.setDuration(2000);
  864. tempTip.showSuccess('删除成功');
  865. } else {
  866. tempTip.setDuration(2500);
  867. tempTip.show('删除失败,错误:' + res.data.fail_info);
  868. }
  869. }).catch(function (err) {
  870. tempTip.setDuration(4000);
  871. tempTip.cancelWaitingTip();
  872. tempTip.show('网络错误:' + err);
  873. });
  874. },
  875. changeDeleteId() {
  876. $('#deleteId').val('');
  877. },
  878. cancelOnTop(event) {
  879. let id = $(event.target).attr('data-value')
  880. let data = {id: id};
  881. if (data === '' || data === null) {
  882. return;
  883. }
  884. axios.post('{{url('apiLocal/order/issue/onTop/cancelTop')}}', data).then(function (res) {
  885. if (res.data.success) {
  886. tempTip.setDuration(2000);
  887. tempTip.showSuccess('订单问题件取消置顶成功!');
  888. window.location.reload();
  889. } else {
  890. tempTip.setDuration(2500);
  891. tempTip.show(res.data.fail_info);
  892. }
  893. }).catch(function (err) {
  894. tempTip.setDuration(4000);
  895. tempTip.show('网络错误:' + err);
  896. });
  897. },
  898. changeRemark() {
  899. $('#remark').removeClass('is-invalid');
  900. },
  901. OrderIssueOnTop(event) {
  902. let id = $(event.target).attr('data-value');
  903. $("#onTopId").val(id);
  904. $("#exampleModal").modal('show');
  905. },
  906. submitOnTop() {
  907. let _this = this;
  908. let remark = $("#remark").val();
  909. let id = $("#onTopId").val();
  910. if (remark === '' || remark == null) {
  911. $("#remark").focus();
  912. $('#remark').addClass('is-invalid');
  913. } else {
  914. let data = {id: id, remark: remark};
  915. axios.post('{{url('apiLocal/order/issue/onTop/store')}}', data).then(function (res) {
  916. $("#exampleModal").modal('hide');
  917. if (res.data.success) {
  918. _this.orderIssues.forEach(function (orderIssue) {
  919. if (orderIssue.id == id) {
  920. if (orderIssue.top == null) {
  921. orderIssue.top = {};
  922. }
  923. orderIssue.top.remark = 'remark';
  924. }
  925. })
  926. tempTip.setDuration(2500);
  927. tempTip.showSuccess('置顶成功');
  928. window.location.href = window.location.href;
  929. } else {
  930. tempTip.setDuration(2500);
  931. tempTip.show(res.data.fail_info);
  932. }
  933. }).catch(function (err) {
  934. $("#exampleModal").modal('hide');
  935. tempTip.setDuration(4000);
  936. tempTip.show('网络错误:' + err);
  937. });
  938. }
  939. },
  940. orderIssueExport(sign) {
  941. let url = '{{url('order/issue/export')}}';
  942. let token = '{{ csrf_token() }}';
  943. if (sign) {
  944. excelExport(true, this.checkData, url, this.total, token);
  945. } else {
  946. excelExport(false, this.checkData, url, null, token);
  947. }
  948. },
  949. copyOrderNo() {
  950. try{
  951. let _this = this;
  952. if (this.checkData.length === 0) {
  953. tempTip.show('没有勾选订单');
  954. } else {
  955. let orderNos = [];
  956. this.orderIssues.forEach(function (item) {
  957. if (_this.checkData.includes(item.id)) {
  958. let logisticNumbers = item.order.logisticNumbers;
  959. if (logisticNumbers.length > 0) {
  960. orderNos = orderNos.concat(logisticNumbers);
  961. }
  962. }
  963. })
  964. if (orderNos.length === 0) {
  965. tempTip.setDuration(2200);
  966. tempTip.show('勾选的问题件没有对应的快递单号');
  967. return;
  968. }
  969. let p = $('<textarea id="copy" />'+orderNos.join('\n')+'</textarea>');
  970. p.attr('opacity', 0);
  971. $('body').append(p);
  972. let p_ele = document.getElementById('copy');
  973. p_ele.select();
  974. document.execCommand("Copy");
  975. p.remove();
  976. tempTip.setDuration(1200);
  977. tempTip.showSuccess('复制快递单号成功');
  978. }
  979. }catch(err){
  980. tempTip.setDuration(2000);
  981. tempTip.show('复制快递单号失败'+err);
  982. }
  983. },
  984. checkAll(e) {
  985. if (e.target.checked) {
  986. this.orderIssues.forEach((el, i) => {
  987. if (this.checkData.indexOf(el.id) == '-1') {
  988. this.checkData.push(el.id);
  989. }
  990. });
  991. } else {
  992. this.checkData = [];
  993. }
  994. },
  995. endOrderIssue() {
  996. if (this.checkData.length === 0) {
  997. tempTip.show('没有勾选订单');
  998. return;
  999. }
  1000. let _this = this;
  1001. let ids = _this.checkData;
  1002. this.endOrderIssues(ids)
  1003. },
  1004. disposeOrderIssue(e,orderIssue) {
  1005. let _this = this;
  1006. let id = $(e.target).attr('data-value');
  1007. let data = {id: id};
  1008. axios.post('{{url('apiLocal/order/issue/disposeOrderIssue')}}', data).then(function (res) {
  1009. if (res.data.success) {
  1010. orderIssue.is_new_rejecting = '已处理'
  1011. tempTip.setDuration(3000);
  1012. tempTip.showSuccess('订单已处理');
  1013. } else {
  1014. tempTip.setDuration(3000);
  1015. tempTip.show(res.data.fail_info);
  1016. }
  1017. }).catch(function (err) {
  1018. tempTip.setDuration(4000);
  1019. tempTip.show('网路链接异常' + err);
  1020. });
  1021. },
  1022. endOrderIssueById(id){
  1023. this.endOrderIssues([id]);
  1024. },
  1025. endOrderIssues(ids){
  1026. let data = {ids:ids}
  1027. let orderIssues = {};
  1028. for (let i = 0; i < this.orderIssues.length; i++) {
  1029. let id = this.orderIssues[i]['id']
  1030. if(ids.includes(id))orderIssues[id] = this.orderIssues[i];
  1031. }
  1032. axios.post('{{url('apiLocal/order/issue/endOrderIssues')}}',data).then(function(response){
  1033. if(response.data.success){
  1034. tempTip.setDuration(3000)
  1035. tempTip.showSuccess('订单已处理')
  1036. let logs = response.data.logs
  1037. for (let i = 0; i < logs.length; i++) {
  1038. let log = logs[i]
  1039. let orderIssue = orderIssues[log['order_issue_id']]
  1040. if(orderIssue){
  1041. orderIssue.logs.unshift(log)
  1042. orderIssue['final_status'] = '已解决'
  1043. }
  1044. }
  1045. }else{
  1046. tempTip.setDuration(3000)
  1047. tempTip.show(response.data.fail_info)
  1048. }
  1049. }).catch(function(error){
  1050. tempTip.setDuration(4000)
  1051. tempTip.show('网路链接异常' + error);
  1052. })
  1053. },
  1054. addOrderIssueLog(id,orderIssue) {
  1055. let idInput = $('#' + id + ' :input[name="id"]');
  1056. let contentInput = $('#' + id + ' :input[name="content"]');
  1057. if (!contentInput.val()) {
  1058. contentInput.addClass('is-invalid').focus();
  1059. return;
  1060. }
  1061. contentInput.removeClass('is-invalid')
  1062. let data = {id: idInput.val(), content: contentInput.val()};
  1063. axios.post('{{url('apiLocal/order/issue/log/store')}}', data).then(function (res) {
  1064. if (res.data.success) {
  1065. orderIssue.logs.unshift(res.data.data);
  1066. contentInput.val('');
  1067. $('#' + id).hide();
  1068. tempTip.setDuration(2000);
  1069. tempTip.showSuccess('添加成功');
  1070. } else {
  1071. tempTip.setDuration(3000);
  1072. tempTip.show(res.data.fail_info);
  1073. }
  1074. }).catch(function (err) {
  1075. tempTip.setDuration(4000);
  1076. tempTip.show('网络异常:' + err);
  1077. });
  1078. },
  1079. deleteOrderIssueLog(id, OrderIssueId) {
  1080. let _this = this;
  1081. if(!confirm('是否删除当前记录'))return;
  1082. axios.post("{{url('apiLocal/order/issue/log/destroy')}}", {id: id}).then(function (res) {
  1083. if (res.data.success) {
  1084. _this.orderIssues.forEach(function (orderIssue) {
  1085. if (orderIssue.id == OrderIssueId) {
  1086. let logs = orderIssue.logs;
  1087. logs.forEach(function (item, index) {
  1088. if (item.id == id) {
  1089. logs.splice(index, 1);
  1090. }
  1091. });
  1092. }
  1093. })
  1094. tempTip.setDuration(2000);
  1095. tempTip.showSuccess('删除成功');
  1096. } else {
  1097. tempTip.setDuration(2000);
  1098. tempTip.show('删除失败:' + res.data.fail_info);
  1099. }
  1100. }).catch(function (err) {
  1101. tempTip.setDuration(4000);
  1102. tempTip.show('网络异常:' + err);
  1103. });
  1104. },
  1105. hidetop: function (e) {
  1106. let target = $(e.target);
  1107. let top = target.parent().find('.top');
  1108. let tip = target.parent().find('.toptd');
  1109. top.hide();
  1110. tip.tooltip('show');
  1111. },
  1112. showtop: function (e) {
  1113. let target = $(e.target);
  1114. let top = target.parent().find('.top');
  1115. let tip = target.parent().find('.toptd');
  1116. top.show();
  1117. tip.tooltip('hide');
  1118. },
  1119. showDelBtn(e) {
  1120. let domObj = $(e.target).parent();
  1121. domObj.find('.del-btn').addClass('visible').removeClass('invisible');
  1122. },
  1123. hideDelBtn(e) {
  1124. let domObj = $(e.target);
  1125. domObj.find('.del-btn').addClass('invisible').removeClass('visible');
  1126. },
  1127. showAddBtn(e) {
  1128. let domObj = $(e.target).parents('.log-td');
  1129. if (domObj.hasClass('log-td')) {
  1130. domObj.find('.add-btn').show();
  1131. }
  1132. },
  1133. hideAddBtn(e) {
  1134. let domObj = $(e.target);
  1135. if (domObj.hasClass('log-td')) {
  1136. domObj.find('.add-btn').hide();
  1137. }
  1138. },
  1139. showAddDiv(id) {
  1140. let div = $('#' + id);
  1141. if (div.is(":hidden")) {
  1142. div.show();
  1143. div.find('input').focus();
  1144. } else {
  1145. div.hide();
  1146. }
  1147. },
  1148. toggleLogisticNumbers(id, length) {
  1149. let collapse = $('#logisticNumbers' + id);
  1150. let button = $("#logisticNumbersBtn" + id);
  1151. let isShow = button.attr('aria-expanded');
  1152. if (isShow === 'false') {
  1153. button.text('点击收起');
  1154. } else {
  1155. button.text("分箱" + length + "件,点击展开");
  1156. }
  1157. },
  1158. toggleLogs(orderIssue, e) {
  1159. if ( orderIssue.logShow === false) {
  1160. $(e.target).text("记录共" + $(e.target).attr('data-value') + "条,点击展开");
  1161. $('#logs'+orderIssue.id).find('tr:gt(1)').addClass('d-none');
  1162. } else {
  1163. $('#logs'+orderIssue.id).find('tr').removeClass('d-none');
  1164. $(e.target).text('点击收起');
  1165. }
  1166. orderIssue.logShow = !orderIssue.logShow;
  1167. },
  1168. toggleOrder(id, length) {
  1169. let button = $("#orderBtn" + id);
  1170. let isShow = button.attr('aria-expanded');
  1171. if (isShow === 'false') {
  1172. button.text('点击收起');
  1173. } else {
  1174. button.text("商品" + length + "件,点击展开");
  1175. }
  1176. },
  1177. toggleSecond(id, length) {
  1178. let button = $("#secondOrderBtn" + id);
  1179. let isShow = button.attr('aria-expanded');
  1180. if (isShow === 'false') {
  1181. button.text('点击收起');
  1182. } else {
  1183. button.text("商品" + length + "件,点击展开");
  1184. }
  1185. },
  1186. toggleRejectedBill(id, length) {
  1187. let button = $("#rejectedBillBtn" + id);
  1188. let isShow = button.attr('aria-expanded');
  1189. if (isShow === 'false') {
  1190. button.text('点击收起');
  1191. } else {
  1192. button.text("商品" + length + "件,点击展开");
  1193. }
  1194. },
  1195. toggleseCondOrderNumbers(id, length) {
  1196. let button = $("#secondOrderNumbersBtn" + id);
  1197. let isShow = button.attr('aria-expanded');
  1198. if (isShow === 'false') {
  1199. button.text('点击收起');
  1200. } else {
  1201. button.text("分箱" + length + "件,点击展开");
  1202. }
  1203. },
  1204. hideOrderInfo() {
  1205. this.isShowOrderInfo = false;
  1206. },
  1207. hideRejectedBill() {
  1208. this.isShowRejectedBill = false;
  1209. },
  1210. hideSecondOrder() {
  1211. this.isShowSecondOrderInfo = false;
  1212. },
  1213. showOrderInfo() {
  1214. this.isShowOrderInfo = true;
  1215. },
  1216. showRejectedBill() {
  1217. this.isShowRejectedBill = true;
  1218. },
  1219. showSecondeOrder() {
  1220. this.isShowSecondOrderInfo = true;
  1221. },
  1222. updateOrderIssue(orderIssue,column,e){
  1223. let value = $(e.target).val()
  1224. if(column==='imported_status'){
  1225. value = '导入已梳理'
  1226. }
  1227. if(column === 'final_status' && value === '已解决'){
  1228. this.endOrderIssueById(orderIssue['id'])
  1229. return ;
  1230. }
  1231. let data = {id:orderIssue['id'],column:column,value:value}
  1232. axios.post('{{url("apiLocal/order/issue/updateColumn")}}',data).then(function(response){
  1233. if(response.data.success){
  1234. orderIssue[column] = data.value
  1235. tempTip.setDuration(2000)
  1236. tempTip.showSuccess('修改成功')
  1237. }else{
  1238. tempTip.setDuration(3000)
  1239. tempTip.show('修改失败:'+response.data.fail_info)
  1240. }
  1241. }).catch(function(error){
  1242. tempTip.setDuration(3000)
  1243. tempTip.show('修改出现异常:'+error)
  1244. })
  1245. },
  1246. batchDeleteOrderIssue(){
  1247. if(this.checkData.length === 0){
  1248. tempTip.setDuration(2000)
  1249. tempTip.show('没有勾选内容')
  1250. return;
  1251. }
  1252. if(!confirm('是否删除当前问题件'))return;
  1253. let _this = this
  1254. let data = {ids:this.checkData}
  1255. axios.post('{{url('apiLocal/order/issue/batchDestroy')}}',data).then(function(response){
  1256. if(response.data.success){
  1257. for (let index = _this.orderIssues.length-1; index >= 0 ; index--) {
  1258. let item = _this.orderIssues[index]
  1259. if(_this.checkData.includes(item.id)){
  1260. _this.orderIssues.splice(index,1)
  1261. }
  1262. }
  1263. _this.checkData = []
  1264. tempTip.setDuration(2000)
  1265. tempTip.showSuccess('删除成功')
  1266. }else{
  1267. tempTip.setDuration('删除失败')
  1268. }
  1269. }).catch(function(error){
  1270. tempTip.setDuration(3000)
  1271. tempTip.show('删除异常:'+error)
  1272. })
  1273. },
  1274. batchStoreLogsModel(){
  1275. if(this.checkData.length === 0){
  1276. tempTip.setDuration(2000)
  1277. tempTip.show('没有勾选内容')
  1278. return;
  1279. }
  1280. $("#batchStoreLogsModel").modal('show');
  1281. },
  1282. batchStoreLogs(){
  1283. let _this = this;
  1284. let data = {orderIssueIds:this.checkData,content:this.edit.batchStoreLogs};
  1285. axios.post('{{url("apiLocal/order/issue/log/batchStore")}}',data).then(function(response){
  1286. if(response.data.success){
  1287. _this.edit.batchStoreLogs = ''
  1288. let logs = response.data.logs
  1289. _this.orderIssues.forEach(function(item){
  1290. let id = item['id']
  1291. if (_this.checkData.includes(id)) {
  1292. item['logs'].unshift(logs[id])
  1293. }
  1294. })
  1295. tempTip.setDuration(2000)
  1296. tempTip.setIndex(100)
  1297. tempTip.showSuccess('添加成功')
  1298. $("#batchStoreLogsModel").modal('hide')
  1299. }else{
  1300. tempTip.setIndex(100)
  1301. tempTip.show('添加失败'+response.data.fail_info)
  1302. }
  1303. }).catch(function(error){
  1304. tempTip.setDuration(3000)
  1305. tempTip.show('处理结果添加异常:'+error)
  1306. })
  1307. },
  1308. changeRejectedBill(orderIssue,e){
  1309. let logistic_number_return = $(e.target).val()
  1310. if(orderIssue['logistic_number_return'] === logistic_number_return){
  1311. return;
  1312. }
  1313. let data = {id:orderIssue['id'],logisticNumberReturn:logistic_number_return}
  1314. axios.post('{{url('apiLocal/order/issue/updateLogisticNumberReturn')}}',data).then(function(response){
  1315. if(response.data.success){
  1316. orderIssue['logistic_number_return'] = logistic_number_return
  1317. orderIssue['rejected_bill'] = response.data.rejectedBill
  1318. orderIssue['rejecting_status'] = response.data.rejectingStatus
  1319. orderIssue.is_new_rejecting = '有'
  1320. tempTip.setDuration(2000)
  1321. tempTip.showSuccess('修改成功')
  1322. }else{
  1323. if(response.data.message){
  1324. orderIssue['logistic_number_return'] = logistic_number_return
  1325. orderIssue.is_new_rejecting = '无'
  1326. orderIssue.rejected_bill = null
  1327. orderIssue.finalStatus = '未退回'
  1328. tempTip.okWindow(response.data.message,'确认')
  1329. }else{
  1330. tempTip.setDuration(3000)
  1331. tempTip.show('修改失败:'+response.data.fail_info)
  1332. }
  1333. }
  1334. }).catch(function(error){
  1335. tempTip.setDuration(3000)
  1336. tempTip.show('修改异常:'+error)
  1337. })
  1338. },
  1339. editSecondClientNo(orderIssue,e){
  1340. let value = $(e.target).val()
  1341. let data = {id:orderIssue.id,secondClientNo:value}
  1342. axios.post('{{url('apiLocal/order/issue/editSecondClientNo')}}',data).then(function(response){
  1343. if(response.data.success){
  1344. if(response.data.message){
  1345. orderIssue.second_client_no = value
  1346. orderIssue.second_order = null;
  1347. tempTip.okWindow(response.data.message,'确认')
  1348. }else{
  1349. orderIssue.second_client_no =value
  1350. if(response.data.order === null){
  1351. orderIssue.second_order = null;
  1352. }else{
  1353. orderIssue.second_order = response.data.order
  1354. }
  1355. tempTip.setDuration(2000)
  1356. tempTip.showSuccess('修改成功')
  1357. }
  1358. }else{
  1359. tempTip.setDuration(2000)
  1360. tempTip.show('修改失败:'+response.data.fail_info)
  1361. }
  1362. }).catch(function(error){
  1363. tempTip.setDuration(3000)
  1364. tempTip.show('修改异常:'+error)
  1365. });
  1366. },
  1367. truncateText(e){
  1368. let nowrapSpan = $(e.target);
  1369. nowrapSpan.hide();
  1370. nowrapSpan.siblings('.text-truncate').show();
  1371. },
  1372. nowrapText(e){
  1373. let truncateSpan = $(e.target);
  1374. truncateSpan.hide();
  1375. truncateSpan.siblings('.text-nowrap').show();
  1376. },
  1377. addShow(id){
  1378. this.edit.isShow.push(id)
  1379. },
  1380. removeShow(id){
  1381. let index = this.edit.isShow.indexOf(id)
  1382. if(index!==-1) this.edit.isShow.splice(index,1)
  1383. },
  1384. removeFocusing(e){
  1385. $(e.target).parent('tr').removeClass('focusing')
  1386. },
  1387. addSecondLogisticNumber(orderIssue){
  1388. let logisticNumber = $('#secondLogisticNumber-'+orderIssue.id).val()
  1389. let data = {id:orderIssue.id,logistic_number:logisticNumber,client_code:orderIssue.second_client_no}
  1390. let _this = this;
  1391. axios.post('{{url('apiLocal/order/issue/editSecondLogisticNumber')}}',data).then(function(response){
  1392. if(response.data.success){
  1393. tempTip.setDuration(2000)
  1394. tempTip.showSuccess('添加成功')
  1395. if(response.data.order != null){
  1396. orderIssue.second_order = response.data.order
  1397. orderIssue.second_client_no = response.data.order.client_code
  1398. }
  1399. if(response.data.second_logistic_number != null){
  1400. orderIssue.second_logistic_number = response.data.second_logistic_number
  1401. }
  1402. _this.edit.orderIssue.id = ''
  1403. _this.edit.orderIssue.showId = ''
  1404. }else{
  1405. tempTip.setDuration(2000)
  1406. tempTip.show(response.data.fail_info)
  1407. }
  1408. }).catch(function(error){
  1409. tempTip.setDuration(2000)
  1410. tempTip.show('添加失败'+error)
  1411. });
  1412. },
  1413. importdispose(){
  1414. let _this= this
  1415. if(this.checkData.length === 0){
  1416. tempTip.setDuration(2000)
  1417. tempTip.show('没有勾选内容')
  1418. return;
  1419. }
  1420. if(!confirm('是否对当前导入进行处理'))return;
  1421. let data = {ids:this.checkData};
  1422. tempTip.setDuration(9999)
  1423. tempTip.setIndex(2000)
  1424. tempTip.waitingTip('正在处理,请等待')
  1425. axios.post('{{url('apiLocal/order/issue/disposeImport')}}',data).then(function(response){
  1426. tempTip.cancelWaitingTip()
  1427. if(response.data.success){
  1428. tempTip.setDuration(2000)
  1429. tempTip.showSuccess('处理导入成功')
  1430. _this.orderIssues.forEach(function(item){
  1431. if(_this.checkData.includes(item.id)){
  1432. item.imported_status='导入已处理'
  1433. }
  1434. })
  1435. }else{
  1436. tempTip.setDuration(2000)
  1437. tempTip.show(response.data.fail_info)
  1438. }
  1439. }).catch(function(error){
  1440. tempTip.setDuration(2000)
  1441. tempTip.show('处理导入出现异常'+error)
  1442. })
  1443. },
  1444. financeConfirm(){
  1445. let _this= this
  1446. if(this.checkData.length === 0){
  1447. tempTip.setDuration(2000)
  1448. tempTip.show('没有勾选内容')
  1449. return;
  1450. }
  1451. if(!confirm('是否进行财务确认'))return;
  1452. let data = {ids:this.checkData};
  1453. tempTip.setDuration(9999);
  1454. tempTip.waitingTip('处理中.......');
  1455. axios.post('{{url('apiLocal/order/issue/financeConfirm')}}',data)
  1456. .then(function(response){
  1457. tempTip.cancelWaitingTip();
  1458. if(response.data.success){
  1459. tempTip.setDuration(2000);
  1460. tempTip.showSuccess('确认成功');
  1461. _this.orderIssuesEdit(data.ids,'finance_confirm','是');
  1462. }else{
  1463. tempTip.setDuration(2000);
  1464. tempTip.show(response.data.error);
  1465. }
  1466. }).catch(function(error){
  1467. tempTip.cancelWaitingTip();
  1468. tempTip.setDuration(2000);
  1469. tempTip.show(error);
  1470. });
  1471. },
  1472. orderIssuesEdit(ids,column,value){
  1473. this.orderIssues.forEach(function(item){
  1474. if(ids.includes(item.id)){
  1475. item[column] = value;
  1476. }
  1477. });
  1478. },
  1479. archiveOrderIssue(){
  1480. if (this.checkData.length === 0) {
  1481. tempTip.show('没有勾选订单');
  1482. return;
  1483. }
  1484. let _this = this;
  1485. let ids = _this.checkData;
  1486. let data = {ids:ids};
  1487. axios.post('{{url('apiLocal/order/issue/archiveOrderIssue')}}',data)
  1488. .then(function(response){
  1489. if(response.data.success){
  1490. tempTip.setDuration(2000);
  1491. tempTip.showSuccess('确认成功');
  1492. _this.orderIssuesEdit(data.ids,'final_status','已归档');
  1493. return;
  1494. }
  1495. tempTip.setDuration(2000);
  1496. tempTip.show(response.data.error);
  1497. })
  1498. .catch(function(error){
  1499. tempTip.cancelWaitingTip();
  1500. tempTip.setDuration(2000);
  1501. tempTip.show(error);
  1502. });
  1503. }
  1504. }
  1505. })
  1506. // modal 隐藏时修改 input 为空
  1507. $("#exampleModal").on('hide.bs.modal', function (e) {
  1508. $('#remark').val('');
  1509. });
  1510. </script>
  1511. @endsection