detail.blade.php 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810
  1. @extends('layouts.base')
  2. @section('title', '售后详情')
  3. @section('content')
  4. <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-goods1.css')}}"/>
  5. <script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=QXSZyPZk26shrYzAXjTkDLx5LbRCHECz"></script>
  6. <style>
  7. body{font-weight:500;color:#333;}
  8. .all{background:#eff3f6}
  9. .el-form-item__label{margin-right:30px}
  10. .vue-main-form .el-form-item__content{margin-left:calc(15% + 30px) !important}
  11. .order-sum-li{width:16.66%;line-height:28px}
  12. .list-con-goods-text{min-height:70px;overflow:hidden;flex:1;display: flex;flex-direction: column;justify-content: space-between;}
  13. .list-con-goods-price{border-right:1px solid #e9e9e9;border-left:1px solid #e9e9e9;min-width:150px;min-height:90px;text-align: left;padding:20px;display: flex;flex-direction: column;}
  14. .list-con-goods-title{font-size:14px;line-height:20px;text-overflow: -o-ellipsis-lastline;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;line-clamp: 2;-webkit-box-orient: vertical;}
  15. .list-con-goods-option{font-size:12px;color:#999}
  16. .list-con-goods-after-sales{font-size:12px;color:red}
  17. </style>
  18. <div class="all">
  19. <div id="app" v-cloak>
  20. <div class="vue-crumbs">
  21. <a>订单管理</a> > 售后详情
  22. </div>
  23. <el-form ref="form" :model="form" label-width="15%">
  24. <div class="vue-head">
  25. <div class="vue-main-title">
  26. <div class="vue-main-title-left"></div>
  27. <div class="vue-main-title-content">基本信息</div>
  28. </div>
  29. <div class="vue-main-form">
  30. <el-form-item label="购买会员" prop="store_name">
  31. <div v-if="refundDetail.has_one_member != null" style="display:flex">
  32. <div style="width:100px;height:100px">
  33. <img :src="refundDetail.has_one_member.avatar_image" alt="" style="width:100%;height:100%">
  34. </div>
  35. <div style="line-height:33px;margin-left:15px">
  36. <div>(会员ID:[[refundDetail.uid]]) [[refundDetail.has_one_member.nickname]]</div>
  37. <div>[[refundDetail.has_one_member.realname]]</div>
  38. <div>[[refundDetail.has_one_member.mobile]]</div>
  39. </div>
  40. </div>
  41. {{--<div v-if="" style="display:flex">--}}
  42. {{--<div>(会员ID:[[refundDetail.uid]]) 已被合并为会员ID [[yz_member.mark_member_id]]</div>--}}
  43. {{--</div>--}}
  44. </el-form-item>
  45. <el-form-item label="售后编号">
  46. <div>[[refundDetail.order_sn]]</div>
  47. </el-form-item>
  48. <el-form-item label="订单编号">
  49. <div>
  50. <a @click="gotoOrderDetail()" style="color:#29BA9C">[[refundDetail.order.order_sn]]</a>
  51. </div>
  52. </el-form-item>
  53. <el-form-item label="订单金额">
  54. <div>[[refundDetail.order.price]]</div>
  55. </el-form-item>
  56. <el-form-item label="支付方式" prop="">
  57. <div style="display:inline-block;margin-right:20px">[[refundDetail.order.pay_type_name]]</div>
  58. </el-form-item>
  59. <el-form-item label="订单状态" prop="">
  60. <div style="display:inline-block;margin-right:20px">[[refundDetail.order.status_name]]</div>
  61. </el-form-item>
  62. <el-form-item label="物流信息" prop="" v-if="refundDetail.order.dispatch != null && refundDetail.order.dispatch.length > 0">
  63. <el-button size="small" type="primary" @click="showDispatchInfo()">查看</el-button>
  64. </el-form-item>
  65. </div>
  66. </div>
  67. <!-- 售后商品 -->
  68. <div v-if="refundDetail.refund_order_goods !== undefined && refundDetail.refund_order_goods.length > 0" class="vue-head">
  69. <div class="vue-main-title">
  70. <div class="vue-main-title-left"></div>
  71. <div class="vue-main-title-content">售后商品</div>
  72. </div>
  73. <div class="vue-main-form">
  74. <el-form-item label="" prop="">
  75. <el-table :data="refundDetail.refund_order_goods" style="width: 100%">
  76. {{--<el-table-column prop="goods_id" label="商品ID" width="100" align="center"></el-table-column>--}}
  77. <el-table-column prop="" label="" width="100" align="center">
  78. <template slot-scope="scope">
  79. <img :src="scope.row.goods_thumb" style="width:50px;height:50px;">
  80. </template>
  81. </el-table-column>
  82. <el-table-column prop="down_time" label="" min-width="180" align="left">
  83. <template slot-scope="scope">
  84. <div class="list-con-goods-title"
  85. style="color:#29BA9C;cursor: pointer;"
  86. @click="gotoGoods(scope.row.goods_id)">
  87. [[scope.row.goods_title]]
  88. </div>
  89. <div class="list-con-goods-option">规格: [[scope.row.goods_option_title]]</div>
  90. <div class="list-con-goods-option">数量: [[scope.row.refund_total]]</div>
  91. </template>
  92. </el-table-column>
  93. </el-table>
  94. </el-form-item>
  95. </div>
  96. </div>
  97. <div class="vue-head">
  98. <div class="vue-main-title">
  99. <div class="vue-main-title-left"></div>
  100. <div class="vue-main-title-content">售后申请</div>
  101. </div>
  102. <div class="vue-main-form">
  103. <el-form-item label="售后状态" prop="">
  104. <div style="display:inline-block;margin-right:20px">[[refundDetail.status_name]]</div>
  105. <div style="display:inline-block;margin-right:10px" v-for="(button1,key1) in refundDetail.backend_button_models" :key="key1">
  106. <el-tooltip style="max-width: 150px" effect="dark"
  107. :disabled="!(button1.desc !== undefined && button1.desc.length > 0)"
  108. placement="top-start">
  109. <template slot="content">
  110. <div v-if="typeof(button1.desc) != 'string' && button1.desc.length > 0">
  111. <div v-for="(content1,k1) in button1.desc">[[content1]]<br/></div>
  112. </div>
  113. <div v-else>[[button1.desc]]</div>
  114. </template>
  115. <el-button @click="refundConfirm(button1.value)" size="small" plain :type="button1.type">
  116. [[button1.name]]
  117. </el-button>
  118. </el-tooltip>
  119. </div>
  120. </el-form-item>
  121. <el-form-item label="" prop="">
  122. <el-steps align-center style="width:80%">
  123. <el-step v-for="(process_item1,processIndex1) in refundDetail.refundSteps"
  124. :key="processIndex1"
  125. :icon="process_item1.icon"
  126. :status="process_item1.status"
  127. :title="process_item1.title">
  128. <template slot="description">
  129. <div>[[process_item1.desc]]</div>
  130. <template v-if="process_item1.value == 20 && refundDetail.return_express != null">
  131. <div>快递名称:[[refundDetail.return_express.express_company_name]]</div>
  132. <div>快递单号:[[refundDetail.return_express.express_sn]]</div>
  133. <el-button plain size="mini" type="primary" @click="selectRefundLogistics(process_item1.value)">查看物流</el-button>
  134. </template>
  135. <template v-if="process_item1.value == 30 && (refundDetail.has_many_resend_express != null && refundDetail.has_many_resend_express.length > 0)">
  136. <div v-if="refundDetail.has_many_resend_express.length == 1">
  137. <div>快递名称:[[refundDetail.has_many_resend_express[0].express_company_name]]</div>
  138. <div>快递单号:[[refundDetail.has_many_resend_express[0].express_sn]]</div>
  139. </div>
  140. <el-button plain size="mini" type="primary" @click="selectRefundLogistics(process_item1.value)">查看物流</el-button>
  141. </template>
  142. </template>
  143. </el-step>
  144. </el-steps>
  145. </el-form-item>
  146. <el-form-item label="售后类型" prop="">
  147. <div>[[refundDetail.refund_type_name]]</div>
  148. </el-form-item>
  149. <el-form-item label="收货状态" prop="">
  150. <div>[[refundDetail.receive_status_name]]</div>
  151. </el-form-item>
  152. <el-form-item label="退货方式" prop="" v-if="refundDetail.refund_type == 2">
  153. <div>[[refundDetail.refund_way_type_name]]</div>
  154. </el-form-item>
  155. <el-form-item v-if="refundDetail.refund_type != 2" label="退款金额" prop="">
  156. <div>
  157. ¥[[refundDetail.price]](包含运费¥[[refundDetail.freight_price]],其他费用¥[[refundDetail.other_price]])
  158. <el-tag v-if="refundDetail.change_log != null" size="small" type="danger">改价</el-tag>
  159. <template v-if="refundDetail.status < 6">
  160. <a style="color:#29BA9C;padding-left: 15px" @click="refundChangePriceShow()">修改金额</a>
  161. </template>
  162. </div>
  163. </el-form-item>
  164. <el-form-item label="退款原因" prop="">
  165. <div>[[refundDetail.reason]]</div>
  166. </el-form-item>
  167. <el-form-item label="说明" prop="">
  168. <div>[[refundDetail.content]]</div>
  169. </el-form-item>
  170. <el-form-item v-if="refundDetail.images != null && refundDetail.images.length > 0" label="图片凭证" prop="">
  171. <div>
  172. <el-image style="width: 150px" v-for="(refund_img,imgskey3) in refundDetail.images" :src="refund_img"></el-image>
  173. </div>
  174. </el-form-item>
  175. </div>
  176. {{--<div class="vue-main-form" v-if="!(refundDetail != null && Object.keys(refundDetail).length > 0)">--}}
  177. {{--<el-form-item label="协商记录" prop="">--}}
  178. {{--<a style="color:#29BA9C;" @click="showRefundProcessLog">查看</a>--}}
  179. {{--</el-form-item>--}}
  180. {{--</div>--}}
  181. </div>
  182. <div>
  183. <div class="vue-head">
  184. <div class="vue-main-title">
  185. <div class="vue-main-title-left"></div>
  186. <div class="vue-main-title-content">协商记录</div>
  187. </div>
  188. <div class="vue-main-form">
  189. <el-form-item label="" prop="">
  190. <a style="color:#29BA9C;" @click="showRefundProcessLog">查看</a>
  191. </el-form-item>
  192. </div>
  193. </div>
  194. </div>
  195. <!-- 手续费 -->
  196. {{--<div v-if="orderDetail.order_fees != null && orderDetail.order_fees.length > 0" class="vue-head">--}}
  197. {{--<div class="vue-main-title">--}}
  198. {{--<div class="vue-main-title-left"></div>--}}
  199. {{--<div class="vue-main-title-content">手续费信息</div>--}}
  200. {{--</div>--}}
  201. {{--<div class="vue-main-form">--}}
  202. {{--<el-form-item label="" prop="">--}}
  203. {{--<table class="el-table" style="width:70%;">--}}
  204. {{--<thead>--}}
  205. {{--<tr>--}}
  206. {{--<td class="is-center">手续费名称</td>--}}
  207. {{--<td class="is-center">手续费金额</td>--}}
  208. {{--</tr>--}}
  209. {{--</thead>--}}
  210. {{--<tbody>--}}
  211. {{--<template v-for="(order_fee,order_fee_key) in orderDetail.order_fees">--}}
  212. {{--<tr>--}}
  213. {{--<td class="is-center">[[order_fee.name]]</td>--}}
  214. {{--<td class="is-center">[[order_fee.amount]]</td>--}}
  215. {{--</tr>--}}
  216. {{--</template>--}}
  217. {{--</tbody>--}}
  218. {{--</table>--}}
  219. {{--</el-form-item>--}}
  220. {{--</div>--}}
  221. {{--</div>--}}
  222. {{--//todo 这来以后可以引入插件的售后信息--}}
  223. {{--@foreach(\app\common\modules\widget\Widget::current()->getItem('order_refund_detail') as $key1=>$value1)--}}
  224. {{--{!! widget($value1['class'], ['order_id'=> request()->input('id')])!!}--}}
  225. {{--@endforeach--}}
  226. <!-- 插件控制 -->
  227. <div v-if="false">
  228. <div class="vue-head">
  229. <div class="vue-main-title">
  230. <div class="vue-main-title-left"></div>
  231. <div class="vue-main-title-content">插件描述</div>
  232. </div>
  233. <div class="vue-main-form">
  234. 插件订单内容
  235. </div>
  236. </div>
  237. </div>
  238. </el-form>
  239. <!-- 查看退货、换货物流信息 -->
  240. <el-dialog :visible.sync="modal_refund_logistics" width="750px" center title="售后物流信息">
  241. <div style="height:400px;overflow:auto" v-for="(r_logistics,refund_key1) in refundLogistics">
  242. <el-form label-width="15%">
  243. <el-form-item label="物流公司" prop="">
  244. [[r_logistics.company_name]]
  245. </el-form-item>
  246. <el-form-item label="快递单号" prop="">
  247. <div style="display:inline-block;margin-right:20px">[[r_logistics.express_sn]]</div>
  248. </el-form-item>
  249. <el-form-item label="物流情况" prop="">
  250. <template v-if="r_logistics.data != null">
  251. <div v-for="(item3, k3) in r_logistics.data" :key="k3">[[item3.time]] [[item3.context]]</div>
  252. </template>
  253. </el-form-item>
  254. </el-form>
  255. </div>
  256. <span slot="footer" class="dialog-footer">
  257. <el-button @click="modal_refund_logistics = false">关 闭</el-button>
  258. {{--<el-button type="primary" @click="confirmRefundReject()">确 认</el-button>--}}
  259. </span>
  260. </el-dialog>
  261. <!-- 查看物流信息 -->
  262. <el-dialog :visible.sync="modal_dispatch_info" width="750px" center title="物流信息">
  263. <div style="height:400px;overflow:auto" id="dispatch-info">
  264. <!-- 多包裹 -->
  265. <div>
  266. <div style="display:flex;margin-bottom:15px;" v-for="(item3,index3) in refundDetail.order.dispatch">
  267. <div class="left" style="width:105px;margin-right:30px;text-align:right">
  268. 包裹[[index3 + 1]]信息
  269. </div>
  270. <div class="right" style="flex:1">
  271. <div>
  272. <div class="wl-img" style="width:70px;height:70px;position:relative;">
  273. <img :src="item3.thumb" style="width:100%;height:100%">
  274. <div style="line-height:18px;background:RGB(17, 9, 5,0.7);color:#fff;position:absolute;bottom:0;width:100%;text-align:center">
  275. 共[[item3.count]]件
  276. </div>
  277. <div @click="getGoodDetail(item3)" style="position:absolute;bottom:0;right:-80px;cursor: pointer;color:#ff9b19 ">
  278. 查看商品
  279. </div>
  280. </div>
  281. <div style="padding:5px 0">公司:[[item3.company_name]]</div>
  282. <div style="padding:5px 0">运单号:[[item3.express_sn]]</div>
  283. <template v-if="item3.data != null">
  284. <div style="padding:5px 0" v-for="(d1, k2) in item3.data" :key="k2">[[d1.time]] [[d1.context]]</div>
  285. </template>
  286. </div>
  287. </div>
  288. </div>
  289. </div>
  290. </div>
  291. <span slot="footer" class="dialog-footer">
  292. <el-button @click="modal_dispatch_info = false">关 闭</el-button>
  293. </span>
  294. </el-dialog>
  295. <!-- 查看商品 -->
  296. <el-dialog :visible.sync="get_goods_show" width="750px" title="商品列表">
  297. <div id="separate-send">
  298. <el-table ref="multipleTable1" :data="get_goods_list" tooltip-effect="dark" height="550" style="width: 100%">
  299. <el-table-column width="550">
  300. <template slot-scope="scope">
  301. <div style="display:flex;width: 88%;">
  302. <div style="width:50px;height:50px">
  303. <img :src="scope.row.thumb" alt="" style="width:50px;height:50px">
  304. </div>
  305. <div style="margin-left:20px;display: flex;flex-direction: column;justify-content: space-between;">
  306. <div style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[[scope.row.title]]</div>
  307. <div style="color:#999">[[scope.row.goods_id]]</div>
  308. </div>
  309. </div>
  310. </template>
  311. </el-table-column>
  312. <el-table-column>
  313. <template slot-scope="scope">
  314. <div style="color:#999">[[scope.row.goods_option_title]]</div>
  315. </template>
  316. </el-table-column>
  317. </el-table>
  318. </div>
  319. <span slot="footer" class="dialog-footer">
  320. <el-button @click="get_goods_show = false">取 消</el-button>
  321. </span>
  322. </el-dialog>
  323. <!-- 修改退款金额 -->
  324. <el-dialog :visible.sync="refund_change_show" center width="650px" title="修改退款金额">
  325. <div style="height:350px;overflow:auto" id="refund-change">
  326. <div class="tip" style="color:#f00;margin:10px 0;">提示:修改后退款金额不能小于0元</div>
  327. <el-form :inline="true" label-position="top" size="small" label-width="500px">
  328. <el-form-item style="width: 20%" label="商品金额">
  329. ¥[[parseFloat(refund_apply_goods_price)]]
  330. </el-form-item>
  331. <el-form-item style="width: 30%" label="商品金额加或减">
  332. <el-input @input="inputPrice('apply_price',refund_change_price)" v-model="refund_change_price" size="small"></el-input>
  333. </el-form-item>
  334. <el-form-item style="width: 15%" label="运费">
  335. <el-input @input="inputPrice('freight_price',refund_change_freight_price)" v-model="refund_change_freight_price" size="small"></el-input>
  336. </el-form-item>
  337. <el-form-item style="width: 15%" label="其他金额">
  338. <el-input @input="inputPrice('other_price',refund_change_other_price)" v-model="refund_change_other_price" size="small"></el-input>
  339. </el-form-item>
  340. </el-form>
  341. <div style="display:inline-block;color:#000;margin-left:20px;margin-top:50px;font-weight:500;">
  342. <div style="display:flex;text-align:center;line-height:28px;align-items: center;">
  343. <div style="margin-right:15px">
  344. 退款商品金额<br>
  345. ¥[[parseFloat(refund_apply_goods_price)]]
  346. </div>
  347. <div style="margin-right:15px">+</div>
  348. <div style="margin-right:15px">
  349. 运费<br>
  350. ¥[[(parseFloat(refund_change_freight_price))]]
  351. </div>
  352. <div style="margin-right:15px">+</div>
  353. <div style="margin-right:15px">
  354. 其他金额<br>
  355. ¥[[(parseFloat(refund_change_other_price))]]
  356. </div>
  357. <div style="margin-right:15px">+</div>
  358. <div style="margin-right:15px">
  359. 价格修改<br>
  360. ¥[[(parseFloat(refund_change_price))]]
  361. </div>
  362. <div style="margin-right:15px">=</div>
  363. <div style="margin-right:15px">
  364. 退款金额<br>
  365. <strong style="color:#f00">¥
  366. [[parseFloat(refund_price).toFixed(2)]]
  367. </strong>
  368. </div>
  369. </div>
  370. </div>
  371. </div>
  372. <span slot="footer" class="dialog-footer">
  373. <el-button @click="refund_change_show = false">取 消</el-button>
  374. <el-button type="primary" @click="refundChangePrice()">确认修改 </el-button>
  375. </span>
  376. </el-dialog>
  377. <!-- 查看售后商品 -->
  378. <el-dialog :visible.sync="refund_order_goods_show" center width="600px" title="售后商品">
  379. <div style="height:350px;overflow:auto">
  380. <el-table :data="refundOrderGoods" style="width: 100%">
  381. <el-table-column align="center">
  382. <template slot-scope="scope">
  383. <img :src="scope.row.goods_thumb" style="width:50px;height:50px;">
  384. </template>
  385. </el-table-column>
  386. <el-table-column min-width="180" align="left">
  387. <template slot-scope="scope">
  388. <div class="list-con-goods-title"
  389. style="color:#29BA9C;">
  390. [[scope.row.goods_title]]
  391. </div>
  392. <div class="list-con-goods-option">
  393. [[ scope.row.goods_option_title ? '规格:' + scope.row.goods_option_title : '单规格' ]]
  394. </div>
  395. <div class="list-con-goods-option">
  396. 数量: [[scope.row.refund_total]]
  397. </div>
  398. </template>
  399. </el-table-column>
  400. </el-table>
  401. </div>
  402. <span slot="footer" class="dialog-footer">
  403. <el-button @click="refund_order_goods_show = false">取 消</el-button>
  404. </span>
  405. </el-dialog>
  406. <!-- 查看订单协商记录 -->
  407. <el-dialog :visible.sync="order_refund_process_log_show" center width="700px" title="协商记录">
  408. <div style="height:380px;overflow:auto">
  409. <div v-for="(processLog, log1) in refundDetail.process_log">
  410. <div style="background-color: #f9f9f9;border-radius:5px;margin-top: 12px">
  411. <div style="padding:15px">
  412. <div style="float:right">[[processLog.created_at]]</div>
  413. <div>
  414. <i type="primary"
  415. :class="processLog.operator == 1 ? 'el-icon-user-solid':'el-icon-s-shop'"></i>
  416. [[processLog.operate_name]]
  417. </div>
  418. </div>
  419. <div style="border-bottom:1px solid #e9e9e9;;clear: both;"></div>
  420. <div style="padding:15px 20px">
  421. <div v-for="(logDetail, log2) in processLog.detail">
  422. <div v-if="logDetail">[[logDetail]]</div>
  423. </div>
  424. </div>
  425. </div>
  426. </div>
  427. </div>
  428. <span slot="footer" class="dialog-footer">
  429. <el-button @click="order_refund_process_log_show = false">取 消</el-button>
  430. </span>
  431. </el-dialog>
  432. {{--//售后操作组件--}}
  433. <refund-order-operation-base
  434. :refund-operation-type="refundOperationType"
  435. :operation-refund="refundDetail"
  436. :refund_dialog_show="refund_dialog_show"
  437. :refund-order="refundDetail.order">
  438. </refund-order-operation-base>
  439. <upload-img :upload-show="uploadShow" :name="chooseImgName" @replace="changeProp" @sure="sureImg"></upload-img>
  440. </div>
  441. </div>
  442. {{--引入售后组件--}}
  443. @include('refund.component.refundOrderOperationBase')
  444. @include('public.admin.uploadfile')
  445. <script>
  446. var app = new Vue({
  447. el:"#app",
  448. delimiters: ['[[', ']]'],
  449. name: 'test',
  450. data() {
  451. return{
  452. id:0,
  453. goodsEditUrl: '', //订单商品编辑页跳转链接
  454. orderDetailUrl: '',
  455. //图片文件上传组件
  456. uploadShow:false,
  457. chooseImgName:'',
  458. submit_url:'',
  459. showVisible:false,
  460. loading: false,
  461. uploadImg1:'',
  462. form:{},
  463. yz_member:{},
  464. total_discount_price:0,
  465. expressCompanies:[],//快递公司
  466. //退款
  467. refundDetail:{}, //退款信息
  468. refundOrderGoods:[],
  469. refund_change_price:0,
  470. refund_apply_goods_price:0,
  471. refund_change_other_price:0,
  472. refund_change_freight_price:0,
  473. refund_price:0,
  474. order_refund_process_log_show:false, //协商记录
  475. refund_order_goods_show: false, //售后商品列表
  476. refund_change_show:false, //修改退款金额
  477. modal_refund_logistics: false,
  478. modal_dispatch_info: false,//物流信息
  479. refundLogistics:[], //退货物流信息
  480. get_goods_show:false, //查看商品
  481. get_goods_list:[],
  482. //售后操作组件
  483. refundOperationType:'',
  484. operationRefund:{},
  485. refund_dialog_show:0,
  486. //换货确认发货
  487. refund_resend_show:false,
  488. refund_resend:{
  489. express_code:"",
  490. express_sn:"",
  491. },
  492. }
  493. },
  494. created() {
  495. let result = this.viewReturn();
  496. this.__initial(result);
  497. },
  498. mounted() {
  499. },
  500. methods: {
  501. //视图返回数据
  502. viewReturn() {
  503. return {!! $data?:'{}' !!};
  504. },
  505. //初始化页面数据,请求链接
  506. __initial(data) {
  507. this.refundDetail = data.refund;
  508. if (data.orderDetailUrl) {
  509. this.orderDetailUrl = data.orderDetailUrl;
  510. }
  511. if (data.goodsEditUrl) {
  512. this.goodsEditUrl = data.goodsEditUrl;
  513. }
  514. if (this.refundDetail) {
  515. this.refund_apply_goods_price = this.refundDetail.apply_price;
  516. this.refund_price = this.refundDetail.price;
  517. }
  518. console.log(data);
  519. },
  520. showRefundProcessLog() {
  521. this.order_refund_process_log_show = true;
  522. },
  523. selectRefundGoods(refundGoodsLog) {
  524. this.refund_order_goods_show = true;
  525. this.refundOrderGoods = refundGoodsLog;
  526. },
  527. //显示退款物流信息
  528. selectRefundLogistics(value) {
  529. console.log(value);
  530. this.modal_refund_logistics = true;
  531. let loading = this.$loading({target:document.querySelector("#update-list"),background: 'rgba(0, 0, 0, 0)'});
  532. this.$http.post('{!! yzWebFullUrl('refund.detail.express') !!}',{refund_id:this.refundDetail.id,refund_value:value}).then(function (response) {
  533. if (response.data.result){
  534. // console.log(response.data.data);
  535. this.refundLogistics = response.data.data;
  536. loading.close();
  537. } else {
  538. this.$message({message: response.data.msg,type: 'error'});
  539. }
  540. loading.close();
  541. },function (response) {
  542. this.$message({message: response.data.msg,type: 'error'});
  543. loading.close();
  544. }
  545. );
  546. },
  547. //查询商家发货物流信息
  548. selectResendLogistics(value) {
  549. this.modal_refund_logistics = true;
  550. let loading = this.$loading({
  551. target: document.querySelector("#update-list"),
  552. background: 'rgba(0, 0, 0, 0)'
  553. });
  554. this.$http.post('{!! yzWebFullUrl('refund.detail.express') !!}', {
  555. refund_id: this.refundDetail.id,
  556. refund_value: value
  557. }).then(function (response) {
  558. if (response.data.result) {
  559. // console.log(response.data.data);
  560. this.refundLogistics = response.data.data;
  561. loading.close();
  562. } else {
  563. this.$message({message: response.data.msg, type: 'error'});
  564. }
  565. loading.close();
  566. }, function (response) {
  567. this.$message({message: response.data.msg, type: 'error'});
  568. loading.close();
  569. }
  570. );
  571. },
  572. //退款操作
  573. refundConfirm(operationType) {
  574. this.refund_dialog_show++;
  575. this.operationRefund = this.refundDetail;
  576. this.refundOperationType = operationType;
  577. },
  578. //正则过滤掉除\-\.0-9以外的字符,不会写
  579. inputPrice(type,change_price) {
  580. if (this.judgeSign(change_price) == -1) {
  581. this.$message.error("请输入数字");
  582. if(type == 'freight_price') {
  583. this.refund_change_freight_price = 0;
  584. } else if (type == 'other_price') {
  585. this.refund_change_other_price = 0;
  586. } else {
  587. this.refund_change_price = 0;
  588. }
  589. return false;
  590. }
  591. let refund_goods_price = parseFloat(this.refund_apply_goods_price) + parseFloat(this.refund_change_price);
  592. this.refund_price = refund_goods_price + parseFloat(this.refund_change_freight_price) + parseFloat(this.refund_change_other_price);
  593. },
  594. judgeSign(num) {
  595. var reg = new RegExp("^-?[0-9]*.?[0-9]*$");
  596. if ( reg.test(num) ) {
  597. var absVal = Math.abs(num);
  598. return num==absVal?'是正数':'是负数';
  599. }
  600. else {
  601. return -1;
  602. }
  603. },
  604. refundChangePriceShow() {
  605. this.refund_change_freight_price = this.refundDetail.freight_price;
  606. this.refund_change_other_price = this.refundDetail.other_price;
  607. this.refund_change_show = true;
  608. },
  609. //确认修改退款金额
  610. refundChangePrice() {
  611. // if(this.refund_change_price === '') {
  612. // this.$message.error("修改金额不能为空!");
  613. // return false;
  614. // }
  615. let json = {
  616. 'order_id':this.id,
  617. 'refund_id':this.refundDetail.id,
  618. 'change_price':this.refund_change_price,
  619. 'change_freight_price':this.refund_change_freight_price,
  620. 'change_other_price':this.refund_change_other_price
  621. };
  622. let loading = this.$loading({target:document.querySelector("#refund-change"),background: 'rgba(0, 0, 0, 0)'});
  623. this.$http.post('{!! yzWebFullUrl('refund.vue-operation.change-price') !!}',json).then(function (response) {
  624. if (response.data.result) {
  625. this.$message({type: 'success',message: '操作成功!'});
  626. } else{
  627. this.$message({type: 'error',message: response.data.msg});
  628. }
  629. loading.close();
  630. this.refund_change_show = false;
  631. location.reload();//重新获取数据刷新页面
  632. },function (response) {
  633. this.$message({type: 'error',message: response.data.msg});
  634. loading.close();
  635. this.refund_change_show = false;
  636. });
  637. },
  638. gotoOrderDetail() {
  639. if (this.orderDetailUrl) {
  640. let link = this.orderDetailUrl + `&id=` + this.refundDetail.order.id;
  641. window.location.href = link;
  642. return;
  643. }
  644. let link = this.refundDetail.order.fixed_button.detail.api + `&id=` + this.refundDetail.order.id;
  645. window.open(link);
  646. },
  647. gotoGoods(id) {
  648. if (this.goodsEditUrl) {
  649. let link = this.goodsEditUrl + `&id=` + id;
  650. window.location.href = link;
  651. return;
  652. }
  653. if(!this.refundDetail.order.fixed_button.goods_detail.is_show) {
  654. return
  655. }
  656. let link = this.refundDetail.order.fixed_button.goods_detail.api;
  657. window.location.href = link+`&id=`+id;
  658. //window.open(this.goodsEditLink +`&id=`+id);
  659. },
  660. clearImg(str,type,index) {
  661. if(!type) {
  662. this.form[str] = "";
  663. this.form[str+'_url'] = "";
  664. }
  665. else {
  666. this.form[str].splice(index,1);
  667. this.form[str+'_url'].splice(index,1);
  668. }
  669. this.$forceUpdate();
  670. },
  671. openUpload(str) {
  672. this.chooseImgName = str;
  673. this.uploadShow = true;
  674. },
  675. changeProp(val) {
  676. if(val == true) {
  677. this.uploadShow = false;
  678. }
  679. else {
  680. this.uploadShow = true;
  681. }
  682. },
  683. sureImg(name,image,image_url) {
  684. this.form[name] = image;
  685. this.form[name+'_url'] = image_url;
  686. let url = image_url.split('.')
  687. console.log(url)
  688. if(url[url.length-1] == 'pdf') {
  689. this.is_pdf = true;
  690. }
  691. else {
  692. this.is_pdf = false;
  693. }
  694. },
  695. clearImg(str) {
  696. this.form[str] = "";
  697. this.form[str+'_url'] = "";
  698. this.$forceUpdate();
  699. },
  700. reloadList() {
  701. location.reload(); //刷新页面
  702. },
  703. reloadList() {
  704. location.reload(); //刷新页面
  705. },
  706. //查看物流信息
  707. showDispatchInfo() {
  708. this.modal_dispatch_info = true;
  709. },
  710. // 查看商品
  711. getGoodDetail(item) {
  712. console.log(item)
  713. this.get_goods_show = true;
  714. this.get_goods_list = [];
  715. this.get_goods_list = item.goods || [];
  716. },
  717. },
  718. })
  719. </script>
  720. @endsection