index.blade.php 93 KB

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