index.php 17 KB

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