截流自动化的商城平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  1. {layout name="layout2" /}
  2. <style>
  3. .div-flex {
  4. display: flex;
  5. align-items: center;
  6. justify-content: left;
  7. }
  8. .width-160 {
  9. width: 200px;
  10. }
  11. .layui-table th {
  12. text-align: center;
  13. }
  14. .table-margin{
  15. margin-left: 50px;
  16. margin-right: 50px;
  17. text-align: center;
  18. }
  19. .image{
  20. height:80px;
  21. width: 80px;
  22. }
  23. .mt50{
  24. margin-left: 50px;
  25. }
  26. </style>
  27. <div class="layui-card-body" >
  28. <!--基本信息-->
  29. <div class="layui-form" lay-filter="layuiadmin-form-after-sale" id="layuiadmin-form-after-sale" >
  30. <input type="hidden" class="after_sale_id" name="after_sale_id" value="{$detail.id}">
  31. <div class="layui-form-item">
  32. <fieldset class="layui-elem-field layui-field-title">
  33. <legend>售后信息</legend>
  34. </fieldset>
  35. </div>
  36. <div class="layui-form-item div-flex">
  37. <label class="layui-form-label ">售后单号:</label>
  38. <div class="width-160">{$detail.sn}</div>
  39. <label class="layui-form-label ">申请时间:</label>
  40. <div class="width-160">{$detail.create_time}</div>
  41. <label class="layui-form-label ">退款方式:</label>
  42. <div class="width-160 refund_type_text">{$detail.refund_type_text}</div>
  43. </div>
  44. <div class="layui-form-item div-flex">
  45. <label class="layui-form-label ">退款金额:</label>
  46. <div class="width-160 refund_price_text">¥{$detail.refund_price}</div>
  47. <label class="layui-form-label ">退款原因:</label>
  48. <div class="width-160 ">{$detail.refund_reason}</div>
  49. <label class="layui-form-label ">退款说明:</label>
  50. <div class="width-160">{$detail.refund_remark}</div>
  51. </div>
  52. <div class="layui-form-item div-flex">
  53. <label class="layui-form-label ">申请状态:</label>
  54. <div class="width-160">{$detail.status_text}</div>
  55. <label class="layui-form-label ">售后说明:</label>
  56. <div class="width-160">{$detail.admin_remark}</div>
  57. </div>
  58. <div class="layui-form-item">
  59. <fieldset class="layui-elem-field layui-field-title">
  60. <legend>订单信息</legend>
  61. </fieldset>
  62. </div>
  63. <div class="layui-form-item div-flex">
  64. <label class="layui-form-label ">订单编号:</label>
  65. <div class="width-160">{$detail.order.order_sn}</div>
  66. <label class="layui-form-label ">订单金额:</label>
  67. <div class="width-160">¥{$detail.order.order_amount}</div>
  68. <label class="layui-form-label ">付款方式:</label>
  69. <div class="width-160 pay_way_text">{$detail.order.pay_way}</div>
  70. </div>
  71. <div class="layui-form-item div-flex">
  72. <label class="layui-form-label ">配送方式:</label>
  73. <div class="width-160">{$detail.order.delivery_type_text}</div>
  74. <label class="layui-form-label ">订单状态:</label>
  75. <div class="width-160">{$detail.order.order_status}</div>
  76. </div>
  77. <div class="layui-form-item">
  78. <fieldset class="layui-elem-field layui-field-title">
  79. <legend>会员信息</legend>
  80. </fieldset>
  81. </div>
  82. <div class="layui-form-item div-flex">
  83. <label class="layui-form-label ">会员编号:</label>
  84. <div class="width-160">{$detail.user.sn}</div>
  85. <label class="layui-form-label ">会员昵称:</label>
  86. <div class="width-160">{$detail.user.nickname}</div>
  87. <label class="layui-form-label ">手机号码:</label>
  88. <div class="width-160">{$detail.user.mobile}</div>
  89. </div>
  90. <div class="layui-form-item div-flex">
  91. <label class="layui-form-label ">性别:</label>
  92. <div class="width-160">{$detail.user.sex}</div>
  93. <label class="layui-form-label ">注册时间:</label>
  94. <div class="width-160">{$detail.user.create_time}</div>
  95. </div>
  96. <div class="layui-form-item">
  97. <fieldset class="layui-elem-field layui-field-title">
  98. <legend>退款商品</legend>
  99. </fieldset>
  100. </div>
  101. <div class="layui-form-item table-margin">
  102. <table class="layui-table">
  103. <colgroup>
  104. <col width="250">
  105. <col width="100">
  106. <col width="100">
  107. <col width="100">
  108. </colgroup>
  109. <thead>
  110. <tr>
  111. <th>商品信息</th>
  112. <th>价格(元)</th>
  113. <th>数量</th>
  114. <th>小计(元)</th>
  115. </tr>
  116. </thead>
  117. <tbody>
  118. {foreach $detail.order_goods as $k => $goods}
  119. <tr>
  120. <td>
  121. <div style="text-align: left">
  122. <div class="layui-col-md3">
  123. <img src="{$goods.image}" class="image-show image" >
  124. </div>
  125. <div class="layui-col-md9">
  126. <p style="margin-top: 10px">{$goods.goods_name}</p>
  127. <br>
  128. <p>{$goods.spec_value}</p>
  129. </div>
  130. </div>
  131. </td>
  132. <td>¥{$goods.goods_price}</td>
  133. <td>{$goods.goods_num}</td>
  134. <td>{$goods.total_price}</td>
  135. </tr>
  136. {/foreach}
  137. <tr>
  138. <td colspan="3"></td>
  139. <td style="text-align: left;">
  140. <div>退款金额:<span style="color: red">¥{$detail.refund_price}</span> </div>
  141. </td>
  142. </tr>
  143. </tbody>
  144. </table>
  145. </div>
  146. {if condition = "$detail.status egt 3 && $detail.invoice_no neq null && $detail.refund_type eq 1"}
  147. <div class="layui-form-item">
  148. <fieldset class="layui-elem-field layui-field-title">
  149. <legend>收货信息</legend>
  150. </fieldset>
  151. </div>
  152. <div class="layui-form-item div-flex">
  153. <label class="layui-form-label ">快递公司:</label>
  154. <div class="width-160">{$detail.express_name}</div>
  155. <label class="layui-form-label ">快递单号:</label>
  156. <div class="width-160">{$detail.invoice_no}</div>
  157. <label class="layui-form-label ">快递说明:</label>
  158. <div class="width-160">{$detail.express_remark}</div>
  159. </div>
  160. <div class="layui-form-item div-flex">
  161. <label class="layui-form-label ">退货地址:</label>
  162. <div class="width-160 refund_address_text">{$detail.shop_address}</div>
  163. <label class="layui-form-label ">入库方式:</label>
  164. <div class="width-160"></div>
  165. <label class="layui-form-label ">收货时间:</label>
  166. <div class="width-160">{$detail.confirm_take_time}</div>
  167. </div>
  168. {/if}
  169. <div class="layui-form-item">
  170. <fieldset class="layui-elem-field layui-field-title">
  171. <legend>售后操作</legend>
  172. <br>
  173. <div>温馨提醒</div>
  174. <div>订单整体退款后,优惠券会退还给会员。</div>
  175. </fieldset>
  176. </div>
  177. <div class="layui-form-item">
  178. <fieldset class="layui-elem-field layui-field-title">
  179. <legend>售后日志</legend>
  180. </fieldset>
  181. </div>
  182. <div class="layui-form-item div-flex">
  183. <div class="layui-input-block ">
  184. <ul class="layui-timeline">
  185. {volist name="$detail.logs" id="vo"}
  186. <li class="layui-timeline-item">
  187. <i class="layui-icon layui-timeline-axis"></i>
  188. <div class="layui-timeline-content layui-text">
  189. <h3 class="layui-timeline-title">{$vo.content}({$vo.create_time})</h3>
  190. <!--日志备注-->
  191. {notempty name="$vo.log_remark"}
  192. <h4>{$vo.log_remark}</h4>
  193. {/notempty}
  194. <!--日志图片-->
  195. {notempty name="$vo.log_img"}
  196. <img src="{$vo.log_img}" alt="" width="80" height="80" class="image-show">
  197. {/notempty}
  198. </div>
  199. </li>
  200. {/volist}
  201. </ul>
  202. </div>
  203. </div>
  204. </div>
  205. </div>
  206. <script type="text/javascript">
  207. //注意:选项卡 依赖 element 模块,否则无法进行功能性操作
  208. layui.config({
  209. version:"{$front_version}",
  210. base: '/static/plug/layui-admin/dist/layuiadmin/' //静态资源所在路径
  211. }).extend({
  212. index: 'lib/index' //主入口模块
  213. }).use(['index', 'element', 'jquery', 'like'], function () {
  214. var $ = layui.$;
  215. var like = layui.like;
  216. //主图放大
  217. $(document).on('click', '.image-show', function () {
  218. var src = $(this).attr('src');
  219. like.showImg(src,400);
  220. });
  221. var id = $('.after_sale_id').val();
  222. var pay_way = $('.pay_way_text').text();
  223. var refund_type = $('.refund_type_text').text();
  224. var refund_price = $('.refund_price_text').text();
  225. var refund_address = $('.refund_address_text').text();
  226. //商家同意
  227. $('#agree').click(function () {
  228. layer.confirm(
  229. "提示:该笔订单通过" + pay_way + "付款,商家同意后,退款将自动原路退回会员账户。"+"<br/>"+
  230. "退款方式:"+ refund_type + "<br/>"+
  231. "退款金额:"+ "<span style='color: red'>"+refund_price+"</span>", {
  232. btn: ['确认','取消'] //按钮
  233. }, function(){
  234. like.ajax({
  235. url: '{:url("after_sale/agree")}'
  236. , data: {'id': id}
  237. , type: 'post'
  238. , success: function (res) {
  239. if (res.code == 1) {
  240. layui.layer.msg(res.msg, {
  241. offset: '15px'
  242. , icon: 1
  243. , time: 1000
  244. },function () {
  245. location.reload();
  246. });
  247. }
  248. }
  249. });
  250. });
  251. });
  252. //商家拒绝
  253. $('#refuse').click(function () {
  254. layer.confirm(
  255. "提示:请与会员协商后确认拒绝申请,会员可再次发起退款。"+"<br/>"+
  256. "退款方式:"+ refund_type + "<br/>"+
  257. "退款金额:"+ "<span style='color: red'>"+refund_price+"</span>"+ "<br/>"+
  258. "拒绝原因:"+"<textarea id='remark' name='remark' class='layui-textarea' type='text' style='height:100px'></textarea>", {
  259. btn: ['确认','取消'] //按钮
  260. }, function(){
  261. var remark = $('#remark').val();
  262. if (remark == null || remark == undefined || remark == ''){
  263. layer.msg('请填写拒绝原因!');
  264. return false;
  265. }
  266. like.ajax({
  267. url: '{:url("after_sale/refuse")}'
  268. , data: {'id': id,'remark':remark}
  269. , type: 'post'
  270. , success: function (res) {
  271. if (res.code == 1) {
  272. layui.layer.msg(res.msg, {
  273. offset: '15px'
  274. , icon: 1
  275. , time: 1000
  276. },function () {
  277. location.reload();
  278. });
  279. }
  280. }
  281. });
  282. return false;
  283. });
  284. });
  285. //商家收货
  286. $('#take_goods').click(function () {
  287. layer.confirm(
  288. "提示:该笔订单通过" + pay_way + "付款,商家同意后,退款将自动原路退回会员账户。"+"<br/>"+
  289. "退款方式:"+ refund_type + "<br/>"+
  290. "退款金额:"+ "<span style='color: red'>"+refund_price+"</span>"+ "<br/>"+
  291. "退货地址:"+ refund_address, {
  292. btn: ['确认','取消'] //按钮
  293. }, function(){
  294. like.ajax({
  295. url: '{:url("after_sale/take")}'
  296. , data: {'id': id}
  297. , type: 'post'
  298. , success: function (res) {
  299. if (res.code == 1) {
  300. layui.layer.msg(res.msg, {
  301. offset: '15px'
  302. , icon: 1
  303. , time: 1000
  304. },function () {
  305. location.reload();
  306. });
  307. }
  308. }
  309. });
  310. });
  311. });
  312. //商家拒绝收货
  313. $('#refuse_goods').click(function () {
  314. layer.confirm(
  315. "提示:请与会员协商后确认拒绝申请,会员可再次发起退款。"+"<br/>"+
  316. "退款方式:"+ refund_type + "<br/>"+
  317. "退款金额:"+ "<span style='color: red'>"+refund_price+"</span>"+ "<br/>"+
  318. "拒绝原因:"+"<textarea id='remark' name='remark' class='layui-textarea' type='text' style='height:100px'></textarea>", {
  319. btn: ['确认','取消'] //按钮
  320. }, function(){
  321. var remark = $('#remark').val();
  322. if (remark == null || remark == undefined || remark == ''){
  323. layer.msg('请填写拒绝原因!');
  324. return false;
  325. }
  326. like.ajax({
  327. url: '{:url("after_sale/refuseGoods")}'
  328. , data: {'id': id,'remark':remark}
  329. , type: 'post'
  330. , success: function (res) {
  331. if (res.code == 1) {
  332. layui.layer.msg(res.msg, {
  333. offset: '15px'
  334. , icon: 1
  335. , time: 1000
  336. },function () {
  337. location.reload();
  338. });
  339. }
  340. }
  341. });
  342. return false;
  343. });
  344. });
  345. //确认退款
  346. $('#confirm').click(function () {
  347. layer.confirm(
  348. "提示:该笔订单通过" + pay_way + "付款,商家确认退款后,退款将自动原路退回会员账户。"+"<br/>"+
  349. "退款方式:"+ refund_type + "<br/>"+
  350. "退款金额:"+ "<span style='color: red'>"+refund_price+"</span>", {
  351. btn: ['确认','取消'] //按钮
  352. }, function(){
  353. like.ajax({
  354. url: '{:url("after_sale/confirm")}'
  355. , data: {'id': id}
  356. , type: 'post'
  357. , success: function (res) {
  358. if (res.code == 1) {
  359. layui.layer.msg(res.msg, {
  360. offset: '15px'
  361. , icon: 1
  362. , time: 1000
  363. },function () {
  364. location.reload();
  365. });
  366. }
  367. }
  368. });
  369. });
  370. });
  371. });
  372. </script>