index.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  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-select v-model="search.type" placeholder="通知类型" clearable size="small">
  10. <el-option v-for="(name, index) in notice_type" :key="index" :label="name" :value="index"></el-option>
  11. </el-select>
  12. </div>
  13. <div class="item-box" style="margin-right: 15px">
  14. <el-input clearable size="small" style="width: 200px" v-model="search.keyword" placeholder="请输入推送数据关键字"></el-input>
  15. </div>
  16. <div class="item-box" flex="dir:left cross:center">
  17. <el-button size="small" type="primary" style="padding: 9px 15px !important;" @click="searchs">搜索</el-button>
  18. </div>
  19. </el-form>
  20. <el-tabs v-model="activeName" @tab-click="handleClick" v-="loading">
  21. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;">
  22. <el-table-column prop="id" label="ID" align="center" width="150px"></el-table-column>
  23. <el-table-column label="通知类型" align="center" width="150">
  24. <template slot-scope="scope">
  25. {{notice_type[scope.row.type]}}
  26. </template>
  27. </el-table-column>
  28. <el-table-column label="推送数据">
  29. <template slot-scope="scope">
  30. {{scope.row.post}}
  31. </template>
  32. </el-table-column>
  33. <el-table-column label="错误信息" width="150" align="center">
  34. <template slot-scope="scope">
  35. {{scope.row.err_message}}
  36. </template>
  37. </el-table-column>
  38. <el-table-column label="推送时间" width="160" align="center" width="150px">
  39. <template slot-scope="scope">
  40. <div>{{scope.row.updated_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
  41. </template>
  42. </el-table-column>
  43. <el-table-column label="操作" align="center" width="150">
  44. <template slot-scope="scope">
  45. <!-- 更新库存, 修改商品, 提交审核,上架,下架,删除,取消审核 -->
  46. <template v-if="scope.row.err_message != '无错误信息'">
  47. <el-popconfirm @confirm="onCompensate(scope.row, scope.$index)" title="您真的补偿当前记录吗?">
  48. <el-button type="text" slot="reference" style="color: #67C23A">补偿</el-button>
  49. </el-popconfirm>
  50. </template>
  51. </template>
  52. </el-table-column>
  53. </el-table>
  54. </el-tabs>
  55. <!-- 分页器 -->
  56. <div flex="box:last cross:center">
  57. <div></div>
  58. <div>
  59. <el-pagination v-if="pagination" :page-size="pagination.defaultPageSize" style="display: inline-block;" background @current-change="pageChange" layout="prev, pager, next" :total="pagination.totalCount">
  60. </el-pagination>
  61. </div>
  62. </div>
  63. </div>
  64. <!-- 这个是复制用的容器,已隐藏 -->
  65. <textarea id="inputs" style="opacity: 0;width: 0;height: 0;">这是幕后黑手</textarea>
  66. </el-card>
  67. </div>
  68. <script>
  69. const app = new Vue({
  70. el: '#app',
  71. data: {
  72. page: 1,
  73. time: [], //本地存时间,请求时不发送
  74. loading: false,
  75. activeName: '-1',
  76. list: [], //列表数据
  77. pagination: null,
  78. types: {
  79. 0: {
  80. title: '待提审',
  81. type: 'default'
  82. },
  83. 2: {
  84. title: '审核未通过',
  85. type: 'danger'
  86. },
  87. 3: {
  88. title: '审核通过',
  89. type: 'success'
  90. },
  91. },
  92. notice_type: {
  93. delivery: '发货',
  94. ready: '备货',
  95. goods: '商品',
  96. refund: '售后',
  97. },
  98. search: {
  99. type: ''
  100. },
  101. },
  102. mounted() {
  103. // 获取列表首页数据
  104. this.loadData(this.page, this.search); //获取列表数据
  105. },
  106. methods: {
  107. // 1.0 获取视频列表
  108. loadData(page, others) {
  109. this.loading = true;
  110. request({
  111. method: 'get',
  112. params: {
  113. r: 'qi-shang-tong/notice/index',
  114. page: page,
  115. limit: 10,
  116. ...others, //其他搜索字段
  117. },
  118. }).then(e => {
  119. this.loading = false;
  120. if (e.data.code === 0) {
  121. this.list = e.data.data.list;
  122. this.pagination = e.data.data.pagination;
  123. } else {
  124. this.$message.error(e.data.msg);
  125. }
  126. }).catch(e => {});
  127. },
  128. onCompensate(item, index) {
  129. request({
  130. method: 'get',
  131. params: {
  132. r: 'qi-shang-tong/notice/compensate',
  133. id: item.id
  134. },
  135. }).then(e => {
  136. if (e.data.code === 0) {
  137. this.loadData(this.page, this.search);
  138. this.$message.success(e.data.msg);
  139. } else {
  140. this.$message.error(e.data.msg);
  141. }
  142. }).catch(e => {});
  143. },
  144. pageChange(page) {
  145. this.page = page;
  146. this.loadData(this.page, this.search);
  147. },
  148. handleClick(tab, event) {
  149. this.page = 1;
  150. this.search.status = this.activeName;
  151. this.loadData(this.page, this.search)
  152. },
  153. searchs() {
  154. this.page = 1;
  155. this.loadData(this.page, this.search);
  156. },
  157. },
  158. });
  159. </script>
  160. <style>
  161. .set-el-button {
  162. padding: 0 !important;
  163. border: 0;
  164. margin: 0 5px;
  165. }
  166. .sort-input {
  167. width: 100%;
  168. background-color: #F3F5F6;
  169. height: 32px;
  170. }
  171. .sort-input span {
  172. height: 32px;
  173. width: 100%;
  174. line-height: 32px;
  175. display: inline-block;
  176. padding: 0 10px;
  177. font-size: 13px;
  178. }
  179. .sort-input .el-input__inner {
  180. height: 32px;
  181. line-height: 32px;
  182. background-color: #F3F5F6;
  183. float: left;
  184. padding: 0 10px;
  185. border: 0;
  186. }
  187. .table-body {
  188. padding: 20px;
  189. background-color: #fff;
  190. }
  191. .table-info .el-button {
  192. padding: 0 !important;
  193. border: 0;
  194. margin: 0 5px;
  195. }
  196. .input-item {
  197. margin: 0 0 20px;
  198. }
  199. .input-item-name {
  200. margin-right: 5px;
  201. }
  202. .input-search {
  203. margin-right: 30px;
  204. }
  205. .input-item .el-input-group__append {
  206. background-color: #fff;
  207. border-left: 0;
  208. width: 10%;
  209. padding: 0;
  210. }
  211. .input-item .el-input-group__append .el-button {
  212. padding: 0;
  213. }
  214. .input-item .el-input-group__append .el-button {
  215. margin: 0;
  216. }
  217. .data-pop-info {
  218. /* padding: 18px 15px 30px; */
  219. color: #333;
  220. }
  221. .data-pop-mode {
  222. background: #F8F8F8;
  223. border-radius: 4px;
  224. margin-bottom: 10px;
  225. }
  226. .data-pop-top {
  227. height: 90px;
  228. }
  229. .data-price {
  230. width: 200px;
  231. flex-direction: column;
  232. border-right: 1px solid #E5E5E5;
  233. }
  234. .data-info {
  235. flex: 1;
  236. padding: 22px 15px;
  237. font-size: 16px;
  238. }
  239. .data-info-name {
  240. display: inline-block;
  241. text-align: end;
  242. }
  243. .data-pop-detail {
  244. padding: 15px 18px;
  245. }
  246. .data-detail-mode {
  247. min-width: 33%;
  248. flex-shrink: 0;
  249. text-align: center;
  250. margin-top: 16px;
  251. line-height: 26px;
  252. font-size: 16px;
  253. }
  254. .share-pop-model {
  255. margin-top: 20px;
  256. }
  257. .share-name {
  258. width: 90px;
  259. display: inline-block;
  260. margin-right: 18px;
  261. text-align: end;
  262. }
  263. .flex-y-center {
  264. display: -webkit-box;
  265. display: -webkit-flex;
  266. display: flex;
  267. -webkit-box-align: center;
  268. -webkit-align-items: center;
  269. -ms-flex-align: center;
  270. -ms-grid-row-align: center;
  271. align-items: center;
  272. }
  273. </style>
  274. <style>
  275. .el-tabs__header {
  276. font-size: 16px;
  277. }
  278. .table-body {
  279. padding: 20px;
  280. background-color: #fff;
  281. }
  282. .table-body .el-button {
  283. padding: 0 !important;
  284. border: 0;
  285. margin: 0 5px;
  286. }
  287. .input-item {
  288. width: 250px;
  289. margin: 0 0 20px;
  290. display: inline-block;
  291. }
  292. .input-item .el-input__inner {
  293. border-right: 0;
  294. }
  295. .input-item .el-input__inner:hover {
  296. border: 1px solid #dcdfe6;
  297. border-right: 0;
  298. outline: 0;
  299. }
  300. .input-item .el-input__inner:focus {
  301. border: 1px solid #dcdfe6;
  302. border-right: 0;
  303. outline: 0;
  304. }
  305. .input-item .el-input-group__append {
  306. background-color: #fff;
  307. border-left: 0;
  308. width: 10%;
  309. padding: 0;
  310. }
  311. .input-item .el-input-group__append .el-button {
  312. padding: 0;
  313. }
  314. .input-item .el-input-group__append .el-button {
  315. margin: 0;
  316. }
  317. .batch {
  318. margin: 0 0 20px;
  319. display: inline-block;
  320. }
  321. .batch .el-button {
  322. padding: 9px 15px !important;
  323. }
  324. .item-box {
  325. margin-right: 20px;
  326. }
  327. .item-box .label {
  328. margin-right: 8px;
  329. }
  330. .item-box .symbol {
  331. margin: 0 6px;
  332. }
  333. .form-nickname {
  334. width: 180px;
  335. white-space: nowrap;
  336. overflow: hidden;
  337. text-overflow: ellipsis;
  338. }
  339. .index-video-url {
  340. width: 300px;
  341. }
  342. .index-video-url video {
  343. width: 100%;
  344. }
  345. .index-related-info {
  346. width: 500px;
  347. }
  348. .video-top {
  349. width: 100%;
  350. display: flex;
  351. align-items: flex-start;
  352. box-sizing: border-box;
  353. padding: 20px;
  354. /* opacity: .5; */
  355. background-color: #FFFFFF;
  356. }
  357. .video-top .top-right {
  358. line-height: 26px;
  359. }
  360. .video-top .top-right .top-title {
  361. font-size: 18px;
  362. white-space: nowrap;
  363. overflow: hidden;
  364. text-overflow: ellipsis;
  365. width: 360px;
  366. }
  367. .video-top .top-right .wrapper {
  368. display: flex;
  369. /* align-items: flex-start; */
  370. }
  371. .video-top .top-right .wrapper .to-copy {
  372. /* color: #03C5FF; */
  373. margin-left: 20px;
  374. }
  375. .video-top .top-right .detail-price {
  376. color: #BC0100;
  377. font-size: 18px;
  378. font-family: Microsoft YaHei;
  379. font-weight: bold;
  380. }
  381. /* .atooltip {
  382. background: #FFFFFF !important;
  383. border: none !important;
  384. } */
  385. .el-table th>.cell {
  386. color: #333;
  387. font-weight: bold;
  388. font-size: 14px;
  389. }
  390. .el-table__footer-wrapper,
  391. .el-table__header-wrapper {
  392. border-bottom: 1.4px solid #D6D6D6;
  393. }
  394. .price_col {
  395. color: #FF5D05;
  396. }
  397. </style>