index.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. <div id="app" v-cloak>
  2. <el-card shadow="never" style="border:0;min-width: 1200px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  3. <div slot="header">
  4. <span>售后管理</span>
  5. </div>
  6. <div class="table-body">
  7. <el-form size="small" :inline="true" flex="dir:left cross:center">
  8. <div class="item-box">
  9. <el-input clearable size="small" style="width: 200px" v-model="search.order_no" placeholder="请输入订单编号"></el-input>
  10. </div>
  11. <div class="item-box">
  12. <el-input clearable size="small" style="width: 200px" v-model="search.refund_no" placeholder="请输入退款单号"></el-input>
  13. </div>
  14. <div class="item-box">
  15. <el-input clearable size="small" style="width: 200px" v-model="search.third_refund_no" placeholder="请输入第三方订单号"></el-input>
  16. </div>
  17. <div class="item-box">
  18. <el-input clearable size="small" style="width: 200px" v-model="search.third_refund_id" placeholder="请输入第三方退款ID"></el-input>
  19. </div>
  20. <div class="item-box" flex="dir:left cross:center">
  21. <el-button size="small" type="primary" style="padding: 9px 15px !important;" @click="searchs">搜索</el-button>
  22. </div>
  23. </el-form>
  24. <el-tabs v-model="activeName" @tab-click="handleClick" v-="loading">
  25. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;" @selection-change="handleSelectionChange">
  26. <el-table-column label="订单编号" align="center" width="150px">
  27. <template slot-scope="scope">
  28. {{scope.row.refund_no}}
  29. </template>
  30. </el-table-column>
  31. <el-table-column label="商品信息" align="left">
  32. <template slot-scope="scope">
  33. <div class="table-info-img-text">
  34. <el-image class="table-info-img circle" :src="scope.row.refund.orderDetail.pic_url">
  35. <div slot="error" class="image-slot">
  36. <com-image src="/resources/img/common/default-avatar.png"></com-image>
  37. </div>
  38. </el-image>
  39. <div class="table-info-text">
  40. <div style="color:#000; text-align: left">{{scope.row.refund.orderDetail.goods_name}}</div>
  41. <div style="font-size: 12px; text-align: left">{{scope.row.refund.orderDetail.goods_attr_name}}</div>
  42. </div>
  43. </div>
  44. </template>
  45. </el-table-column>
  46. <el-table-column label="第三方订单号" align="center">
  47. <template slot-scope="scope">{{scope.row.third_order_no + ''}}</template>
  48. </el-table-column>
  49. <el-table-column label="第三方退款ID" align="center">
  50. <template slot-scope="scope">{{scope.row.third_refund_id + ''}}</template>
  51. </el-table-column>
  52. <el-table-column label="申请退款" align="center" width="120px">
  53. <template slot-scope="scope">
  54. {{scope.row.refund.refund_price}}
  55. </template>
  56. </el-table-column>
  57. <el-table-column label="推单状态" align="center" width="100">
  58. <template slot-scope="scope">
  59. <el-tag size="mini" :type="scope.row.req_success == 100 ? 'success' : 'danger'">
  60. {{scope.row.req_success == 100 ? '成功' : '失败'}}
  61. </el-tag>
  62. <!-- {{scope.row.content}}-->
  63. <!-- <el-button size="small" type="primary" style="padding: 9px 15px !important;" @click="copyLink(scope.row.content ? scope.row.content : '无数据')" class="copy_btn">复制</el-button>-->
  64. </template>
  65. </el-table-column>
  66. <!-- <el-table-column label="退款状态" width="160" align="center" width="150px">-->
  67. <!-- <template slot-scope="scope">-->
  68. <!-- <div>{{scope.row.refund.refund_status}}</div>-->
  69. <!-- </template>-->
  70. <!-- </el-table-column>-->
  71. <el-table-column label="申请时间" width="160" align="center" width="150px">
  72. <template slot-scope="scope">
  73. <div>{{scope.row.updated_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
  74. </template>
  75. </el-table-column>
  76. <el-table-column label="推单详情" align="center">
  77. <template slot-scope="scope">
  78. <div>{{scope.row.last_resp}}</div>
  79. </template>
  80. </el-table-column>
  81. <el-table-column label="操作" align="center">
  82. <template slot-scope="scope">
  83. <!-- 驳回售后/推送售后 -->
  84. <div>
  85. <el-button size="mini" type="text" @click="$navigate({r: 'mall/order/refund-detail', id: scope.row.refund_id})">详情</el-button>
  86. <template v-if="scope.row.refund.refund_status == 0 && scope.row.third_refund_id == 0">
  87. <el-popconfirm @confirm="onHandle(scope.row, 'reject')" title="您真的要驳回当前售后订单吗?">
  88. <el-button type="text" slot="reference" style="color: #F56C6C">驳回售后</el-button>
  89. </el-popconfirm>
  90. <el-popconfirm @confirm="onHandle(scope.row, 'agree')" title="您真的要推送当前售后订单吗?">
  91. <el-button type="text" slot="reference" style="color: #F56C6C">推送售后</el-button>
  92. </el-popconfirm>
  93. </template>
  94. <el-popconfirm v-else-if="scope.row.req_success != 100 && cope.row.refund.refund_status > 0" @confirm="onHandle(scope.row, 'compensate')" title="您真的要对当前售后订单进行补单操作吗?">
  95. <el-button type="text" slot="reference" style="color: #F56C6C">补单</el-button>
  96. </el-popconfirm>
  97. </div>
  98. </template>
  99. </el-table-column>
  100. </el-table>
  101. </el-tabs>
  102. <!-- 分页器 -->
  103. <div flex="box:last cross:center">
  104. <div></div>
  105. <div>
  106. <el-pagination v-if="pagination" :page-size="pagination.defaultPageSize" style="display: inline-block;" background @current-change="pageChange" layout="prev, pager, next" :total="pagination.totalCount">
  107. </el-pagination>
  108. </div>
  109. </div>
  110. </div>
  111. <!-- 这个是复制用的容器,已隐藏 -->
  112. <textarea id="inputs" style="opacity: 0;width: 0;height: 0;">这是幕后黑手</textarea>
  113. </el-card>
  114. </div>
  115. <script>
  116. const app = new Vue({
  117. el: '#app',
  118. data: {
  119. page: 1,
  120. time: [], //本地存时间,请求时不发送
  121. search: {
  122. refund_no: '',
  123. third_refund_no: '',
  124. order_no: '',
  125. third_refund_id: '',
  126. },
  127. loading: false,
  128. activeName: '-1',
  129. list: [], //列表数据
  130. pagination: null,
  131. status_map: {
  132. 0: '全部',
  133. 2: '审核拒绝',
  134. 3: '审核通过'
  135. },
  136. audit_status_map: {
  137. 0: {
  138. title: '待提审',
  139. type: 'default'
  140. },
  141. 2: {
  142. title: '审核未通过',
  143. type: 'danger'
  144. },
  145. 3: {
  146. title: '审核通过',
  147. type: 'success'
  148. },
  149. },
  150. },
  151. mounted() {
  152. // 获取列表首页数据
  153. this.loadData(this.page, this.search); //获取列表数据
  154. },
  155. methods: {
  156. // 1.0 获取视频列表
  157. loadData(page, others) {
  158. this.loading = true;
  159. request({
  160. method: 'get',
  161. params: {
  162. r: 'qi-shang-tong/refund/index',
  163. page: page,
  164. limit: 10,
  165. ...others, //其他搜索字段
  166. },
  167. }).then(e => {
  168. this.loading = false;
  169. if (e.data.code === 0) {
  170. this.list = e.data.data.list;
  171. this.pagination = e.data.data.pagination;
  172. } else {
  173. this.$message.error(e.data.msg);
  174. }
  175. }).catch(e => {});
  176. },
  177. pageChange(page) {
  178. this.page = page;
  179. this.loadData(this.page, this.search);
  180. },
  181. handleClick(tab, event) {
  182. this.page = 1;
  183. this.search.status = this.activeName;
  184. this.loadData(this.page, this.search)
  185. },
  186. handleSelectionChange(val) {
  187. let self = this;
  188. self.choose_list = [];
  189. val.forEach(function(item) {
  190. self.choose_list.push(item.id);
  191. })
  192. },
  193. searchs() {
  194. this.page = 1;
  195. this.loadData(this.page, this.search);
  196. },
  197. onHandle(item, type) {
  198. this.btnLoading = true
  199. request({
  200. method: 'post',
  201. params: {
  202. r: 'qi-shang-tong/refund/' + type,
  203. },
  204. data: {
  205. id: item.id
  206. }
  207. }).then(e => {
  208. this.btnLoading = false;
  209. if (e.data.code === 0) {
  210. this.loadData(this.page, this.search);
  211. this.$message.success(e.data.msg);
  212. } else {
  213. this.$message.error(e.data.msg);
  214. }
  215. }).catch(e => {
  216. this.btnLoading = false;
  217. });
  218. },
  219. copyLink(url) { //复制链接
  220. var clipboard = new ClipboardJS('.copy_btn', {
  221. text: function() {
  222. return url;
  223. }
  224. });
  225. clipboard.on('success', (e) => {
  226. this.$message.success('复制成功!');
  227. clipboard.destroy()
  228. });
  229. clipboard.on('error', (e) => {
  230. this.$message.error('复制失败!');
  231. this.clipboard.destroy()
  232. });
  233. },
  234. },
  235. });
  236. </script>
  237. <style>
  238. .set-el-button {
  239. padding: 0 !important;
  240. border: 0;
  241. margin: 0 5px;
  242. }
  243. .sort-input {
  244. width: 100%;
  245. background-color: #F3F5F6;
  246. height: 32px;
  247. }
  248. .sort-input span {
  249. height: 32px;
  250. width: 100%;
  251. line-height: 32px;
  252. display: inline-block;
  253. padding: 0 10px;
  254. font-size: 13px;
  255. }
  256. .sort-input .el-input__inner {
  257. height: 32px;
  258. line-height: 32px;
  259. background-color: #F3F5F6;
  260. float: left;
  261. padding: 0 10px;
  262. border: 0;
  263. }
  264. .table-body {
  265. padding: 20px;
  266. background-color: #fff;
  267. }
  268. .table-info .el-button {
  269. padding: 0 !important;
  270. border: 0;
  271. margin: 0 5px;
  272. }
  273. .input-item {
  274. margin: 0 0 20px;
  275. }
  276. .input-item-name {
  277. margin-right: 5px;
  278. }
  279. .input-search {
  280. margin-right: 30px;
  281. }
  282. .input-item .el-input-group__append {
  283. background-color: #fff;
  284. border-left: 0;
  285. width: 10%;
  286. padding: 0;
  287. }
  288. .input-item .el-input-group__append .el-button {
  289. padding: 0;
  290. }
  291. .input-item .el-input-group__append .el-button {
  292. margin: 0;
  293. }
  294. .data-pop-info {
  295. /* padding: 18px 15px 30px; */
  296. color: #333;
  297. }
  298. .data-pop-mode {
  299. background: #F8F8F8;
  300. border-radius: 4px;
  301. margin-bottom: 10px;
  302. }
  303. .data-pop-top {
  304. height: 90px;
  305. }
  306. .data-price {
  307. width: 200px;
  308. flex-direction: column;
  309. border-right: 1px solid #E5E5E5;
  310. }
  311. .data-info {
  312. flex: 1;
  313. padding: 22px 15px;
  314. font-size: 16px;
  315. }
  316. .data-info-name {
  317. display: inline-block;
  318. text-align: end;
  319. }
  320. .data-pop-detail {
  321. padding: 15px 18px;
  322. }
  323. .data-detail-mode {
  324. min-width: 33%;
  325. flex-shrink: 0;
  326. text-align: center;
  327. margin-top: 16px;
  328. line-height: 26px;
  329. font-size: 16px;
  330. }
  331. .share-pop-model {
  332. margin-top: 20px;
  333. }
  334. .share-name {
  335. width: 90px;
  336. display: inline-block;
  337. margin-right: 18px;
  338. text-align: end;
  339. }
  340. .flex-y-center {
  341. display: -webkit-box;
  342. display: -webkit-flex;
  343. display: flex;
  344. -webkit-box-align: center;
  345. -webkit-align-items: center;
  346. -ms-flex-align: center;
  347. -ms-grid-row-align: center;
  348. align-items: center;
  349. }
  350. </style>
  351. <style>
  352. .el-tabs__header {
  353. font-size: 16px;
  354. }
  355. .table-body {
  356. padding: 20px;
  357. background-color: #fff;
  358. }
  359. .table-body .el-button {
  360. padding: 0 !important;
  361. border: 0;
  362. margin: 0 5px;
  363. }
  364. .input-item {
  365. width: 250px;
  366. margin: 0 0 20px;
  367. display: inline-block;
  368. }
  369. .input-item .el-input__inner {
  370. border-right: 0;
  371. }
  372. .input-item .el-input__inner:hover {
  373. border: 1px solid #dcdfe6;
  374. border-right: 0;
  375. outline: 0;
  376. }
  377. .input-item .el-input__inner:focus {
  378. border: 1px solid #dcdfe6;
  379. border-right: 0;
  380. outline: 0;
  381. }
  382. .input-item .el-input-group__append {
  383. background-color: #fff;
  384. border-left: 0;
  385. width: 10%;
  386. padding: 0;
  387. }
  388. .input-item .el-input-group__append .el-button {
  389. padding: 0;
  390. }
  391. .input-item .el-input-group__append .el-button {
  392. margin: 0;
  393. }
  394. .batch {
  395. margin: 0 0 20px;
  396. display: inline-block;
  397. }
  398. .batch .el-button {
  399. padding: 9px 15px !important;
  400. }
  401. .item-box {
  402. margin-right: 20px;
  403. }
  404. .item-box .label {
  405. margin-right: 8px;
  406. }
  407. .item-box .symbol {
  408. margin: 0 6px;
  409. }
  410. .form-nickname {
  411. width: 180px;
  412. white-space: nowrap;
  413. overflow: hidden;
  414. text-overflow: ellipsis;
  415. }
  416. .index-video-url {
  417. width: 300px;
  418. }
  419. .index-video-url video {
  420. width: 100%;
  421. }
  422. .index-related-info {
  423. width: 500px;
  424. }
  425. .video-top {
  426. width: 100%;
  427. display: flex;
  428. align-items: flex-start;
  429. box-sizing: border-box;
  430. padding: 20px;
  431. /* opacity: .5; */
  432. background-color: #FFFFFF;
  433. }
  434. .video-top .top-right {
  435. line-height: 26px;
  436. }
  437. .video-top .top-right .top-title {
  438. font-size: 18px;
  439. white-space: nowrap;
  440. overflow: hidden;
  441. text-overflow: ellipsis;
  442. width: 360px;
  443. }
  444. .video-top .top-right .wrapper {
  445. display: flex;
  446. /* align-items: flex-start; */
  447. }
  448. .video-top .top-right .wrapper .to-copy {
  449. /* color: #03C5FF; */
  450. margin-left: 20px;
  451. }
  452. .video-top .top-right .detail-price {
  453. color: #BC0100;
  454. font-size: 18px;
  455. font-family: Microsoft YaHei;
  456. font-weight: bold;
  457. }
  458. /* .atooltip {
  459. background: #FFFFFF !important;
  460. border: none !important;
  461. } */
  462. .el-table th>.cell {
  463. color: #333;
  464. font-weight: bold;
  465. font-size: 14px;
  466. }
  467. .el-table__footer-wrapper,
  468. .el-table__header-wrapper {
  469. border-bottom: 1.4px solid #D6D6D6;
  470. }
  471. .price_col {
  472. color: #FF5D05;
  473. }
  474. </style>