index.php 17 KB

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