index.php 18 KB

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