index.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. <?php
  2. use common\helpers\ComponentHelper;
  3. ComponentHelper::loadComponentView('com-share-pop');
  4. ?>
  5. <div id="app" v-cloak>
  6. <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  7. <div class="table-body">
  8. <div style="padding-bottom: 20px;">
  9. <div class="flex">
  10. <div class="flex" style="margin-right: 20px;">
  11. <div class="input-title" style="flex-shrink: 0;">小店名称</div>
  12. <el-input size="small" style="width: 130px;" placeholder="请输入小店名称" v-model="searchData.store_name"> </el-input>
  13. </div>
  14. <div class="flex" style="margin-right: 20px;">
  15. <div class="input-title" style="flex-shrink: 0;">店长</div>
  16. <el-input size="small" style="width: 130px;" placeholder="请输入店长姓名" v-model="searchData.storeowner">
  17. </el-input>
  18. </div>
  19. <div class="flex" style="margin-right: 20px;">
  20. <div class="input-title" style="flex-shrink: 0;">绑定会员</div>
  21. <el-input size="small" style="width: 130px;" placeholder="请输入会员名称" v-model="searchData.nickname">
  22. </el-input>
  23. </div>
  24. <el-button style="padding: 9px 15px !important;" size="small" type="primary" @click="searchs">搜索</el-button>
  25. <el-button type="warning" @click="clereSearch" v-if="searchData.store_name || searchData.storeowner || searchData.nickname || searchData.cate_id || searchData.status" style="padding: 9px 15px !important;">清除搜索条件</el-button>
  26. </div>
  27. </div>
  28. <el-tabs type="card" v-model="activityTab" @tab-click="handleTabClick">
  29. <el-tab-pane label="待审核" name="waiting-audit"> </el-tab-pane>
  30. <el-tab-pane label="未通过" name="reject"> </el-tab-pane>
  31. </el-tabs>
  32. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px; width: 100%">
  33. <el-table-column label="小店名称" width="200" prop="store_name">
  34. <template slot-scope="scope">
  35. <com-image style="float: left;margin-right: 10px;" mode="aspectFill" :src="scope.row.logo_img"></com-image>
  36. <div>{{scope.row.store_name}}</div>
  37. </template>
  38. </el-table-column>
  39. <el-table-column label="会员" width="170" align="center">
  40. <template slot-scope="scope">
  41. <com-image style="float: left;margin-right: 5px;" mode="aspectFill" :src="scope.row.avatar_url"></com-image>
  42. <div>{{scope.row.nickname}}</div>
  43. <div>{{scope.row.user_mobile}}</div>
  44. </template>
  45. </el-table-column>
  46. <el-table-column label="店长姓名" prop="shop_owner" width="150" align="center">
  47. <template slot-scope="scope">
  48. <div>{{scope.row.shop_owner}}</div>
  49. </template>
  50. </el-table-column>
  51. <el-table-column label="小店地址" prop="store_address" width="280" align="center">
  52. <template slot-scope="scope">
  53. <div>{{scope.row.store_address}}</div>
  54. </template>
  55. </el-table-column>
  56. <el-table-column label="营业执照" prop="license_img" width="150" align="center" v-if="upload_license_image==1">
  57. <template slot-scope="scope">
  58. <el-popover placement="right" trigger="hover">
  59. <div class="from_img2">
  60. <img style="width: 100%;" :src="scope.row.license_img" alt="">
  61. </div>
  62. <div class="preview_img" slot="reference">
  63. <img style="width: 100%;" :src="scope.row.license_img" alt="">
  64. </div>
  65. </el-popover>
  66. </template>
  67. </el-table-column>
  68. <el-table-column label="营业执照" prop="license_img" width="150" align="center" v-else>
  69. <template slot-scope="scope">
  70. <el-image class="elImages" style="width: 80px; height: 80px;" :src="scope.row
  71. .license_img" :preview-src-list="[scope.row.license_img]"></el-image>
  72. </template>
  73. </el-table-column>
  74. <el-table-column label="所属业务" width="170" align="center">
  75. <template slot-scope="scope">
  76. <div v-if="scope.row.business">
  77. <com-image style="float: left;margin-right: 5px;" mode="aspectFill" :src="scope.row
  78. .business.avatar_url"></com-image>
  79. <div>{{scope.row.business.nickname}}</div>
  80. <div>{{scope.row.business.mobile}}</div>
  81. </div>
  82. </template>
  83. </el-table-column>
  84. <el-table-column label="业务等级" prop="shop_owner" width="150" align="center">
  85. <template slot-scope="scope">
  86. <div>{{scope.row.business_level}}</div>
  87. </template>
  88. </el-table-column>
  89. <el-table-column label="审核状态" prop="check_status" width="100" align="center">
  90. <template slot-scope="scope">
  91. <div>
  92. <span>{{auditStatus[scope.row.check_status]}}</span>
  93. </div>
  94. </template>
  95. </el-table-column>
  96. <el-table-column label="创建时间" prop="user_count" width="200" align="center">
  97. <template slot-scope="scope">
  98. <div>
  99. {{scope.row.created_at | dateTimeFormat('Y-m-d H:i:s')}}
  100. </div>
  101. </template>
  102. </el-table-column>
  103. <el-table-column label="操作" style="width: 180px;" fixed="right" align="center">
  104. <template slot-scope="scope">
  105. <template v-if="scope.row.check_status==1">
  106. <el-button type="text" size="small" @click="switchStatus(scope.$index, 'adopt')">通过</el-button>
  107. <el-button type="text" size="small" @click="switchStatus(scope.$index, 'reject')">不通过</el-button>
  108. </template>
  109. <template v-if="scope.row.check_status==2">
  110. <el-button type="text" size="small" @click="switchStatus(scope.$index, 'adopt')">通过</el-button>
  111. </template>
  112. </template>
  113. </el-table-column>
  114. </el-table>
  115. <div style="text-align: right;margin: 20px 0;">
  116. <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
  117. </div>
  118. </div>
  119. </el-card>
  120. </div>
  121. <script>
  122. const app = new Vue({
  123. el: '#app',
  124. data: {
  125. searchData: {
  126. cate_id: 0,
  127. nickname: '',
  128. storeowner: '',
  129. store_name: '',
  130. },
  131. activityTab: 'waiting-audit',
  132. currPage: 1,
  133. pageCount: 0,
  134. loading: false,
  135. list: [],
  136. dialogLoading: false,
  137. categorys: [],
  138. auditStatus: {
  139. 1: '待审核',
  140. 2: '未通过',
  141. },
  142. store_login_url: '', // 商户登录 url
  143. shareData: {
  144. url: "", //链接
  145. img: "", //二维码
  146. qrcode_filename: '', // 二维码文件名
  147. },
  148. upload_license_image:<?= $upload_license_image ?>
  149. },
  150. mounted() {
  151. this.loadData();
  152. },
  153. methods: {
  154. searchs() {
  155. this.currPage = 1;
  156. this.loadData();
  157. },
  158. clereSearch() {
  159. this.searchData.cate_id = 0;
  160. this.searchData.nickname = '';
  161. this.searchData.storeowner = '';
  162. this.searchData.store_name = '';
  163. // this.searchData.status = 0;
  164. this.currPage = 1;
  165. this.loadData();
  166. },
  167. // 标签页切换
  168. handleTabClick(e) {
  169. this.loadData();
  170. },
  171. loadData() {
  172. this.loading = true;
  173. request({
  174. params: {
  175. r: 'happiness/store-audit/index',
  176. page: this.currPage,
  177. tabname: this.activityTab,
  178. ...this.searchData,
  179. },
  180. method: 'get',
  181. }).then(e => {
  182. this.loading = false;
  183. if (e.data.code == 0) {
  184. this.list = e.data.data.list;
  185. this.pageCount = e.data.data.page_count;
  186. // this.exportList = e.data.data.export_list;
  187. // this.edit_status = e.data.data.edit_status;
  188. this.categorys = e.data.data.cate_list;
  189. } else {
  190. this.$message.error(e.data.msg);
  191. }
  192. }).catch(e => {
  193. this.loading = false;
  194. });
  195. },
  196. pagination(currentPage) {
  197. let self = this;
  198. self.currPage = currentPage;
  199. self.loadData();
  200. },
  201. // 操作
  202. switchStatus(index, action) {
  203. let self = this;
  204. self.loading = true;
  205. if ('adopt' == action) {
  206. let params = {
  207. id: self.list[index].id,
  208. action: action,
  209. };
  210. this.switchRequest(index, params);
  211. } else {
  212. self.$prompt('不通过原因', '审核', {
  213. confirmButtonText: '确定',
  214. cancelButtonText: '取消',
  215. }).then(({
  216. value
  217. }) => {
  218. if (!value) {
  219. self.loading = false;
  220. self.$message.error('驳回原因不能为空');
  221. return false;
  222. }
  223. let params = {
  224. id: self.list[index].id,
  225. action: action,
  226. check_remark: value,
  227. };
  228. this.switchRequest(index, params);
  229. }).catch(() => {
  230. self.loading = false;
  231. console.log('取消驳回审核');
  232. });
  233. }
  234. },
  235. switchRequest(index, params) {
  236. let self = this;
  237. request({
  238. params: {
  239. r: 'happiness/store-audit/audit'
  240. },
  241. method: 'post',
  242. data: params,
  243. }).then(e => {
  244. self.loading = false;
  245. if (e.data.code == 0) {
  246. self.list.splice(index, 1);
  247. } else {
  248. self.$message.error(e.data.msg);
  249. return false;
  250. }
  251. }).catch(e => {
  252. self.loading = false;
  253. console.log(e);
  254. self.$message.error('网络错误');
  255. });
  256. },
  257. }
  258. });
  259. </script>
  260. <style>
  261. .el-tabs__header {
  262. font-size: 16px;
  263. }
  264. .table-body {
  265. padding: 20px;
  266. background-color: #fff;
  267. }
  268. .input-item {
  269. width: 250px;
  270. margin-right: 40px;
  271. }
  272. .input-item .el-input__inner {
  273. border-right: 0;
  274. }
  275. .input-item .el-input__inner:hover {
  276. border: 1px solid #dcdfe6;
  277. border-right: 0;
  278. outline: 0;
  279. }
  280. .input-item .el-input__inner:focus {
  281. border: 1px solid #dcdfe6;
  282. border-right: 0;
  283. outline: 0;
  284. }
  285. .input-item .el-input-group__append {
  286. background-color: #fff;
  287. border-left: 0;
  288. width: 10%;
  289. padding: 0;
  290. }
  291. .input-item .el-input-group__append .el-button {
  292. padding: 0;
  293. }
  294. .input-item .el-input-group__append .el-button {
  295. margin: 0;
  296. }
  297. .table-body {
  298. padding: 20px;
  299. background-color: #fff;
  300. }
  301. .table-body .el-button {
  302. padding: 0 !important;
  303. border: 0;
  304. margin: 0 5px;
  305. }
  306. .input-item {
  307. width: 250px;
  308. margin: 0 0 20px;
  309. display: inline-block;
  310. }
  311. .input-item .el-input__inner {
  312. border-right: 0;
  313. }
  314. .input-item .el-input__inner:hover {
  315. border: 1px solid #dcdfe6;
  316. border-right: 0;
  317. outline: 0;
  318. }
  319. .input-item .el-input__inner:focus {
  320. border: 1px solid #dcdfe6;
  321. border-right: 0;
  322. outline: 0;
  323. }
  324. .input-item .el-input-group__append {
  325. background-color: #fff;
  326. border-left: 0;
  327. width: 10%;
  328. padding: 0;
  329. }
  330. .input-item .el-input-group__append .el-button {
  331. padding: 0;
  332. }
  333. .input-item .el-input-group__append .el-button {
  334. margin: 0;
  335. }
  336. .batch {
  337. margin: 0 0 20px;
  338. display: inline-block;
  339. }
  340. .batch .el-button {
  341. padding: 9px 15px !important;
  342. }
  343. .el-table th>.cell {
  344. color: #333;
  345. font-weight: bold;
  346. font-size: 14px;
  347. }
  348. .el-table__footer-wrapper,
  349. .el-table__header-wrapper {
  350. border-bottom: 1.4px solid #D6D6D6;
  351. }
  352. .el-table .el-button {
  353. padding: 0 !important;
  354. border: 0;
  355. margin: 0 5px;
  356. }
  357. #app .copy .el-input-group__append {
  358. background-color: #409EFF;
  359. border-color: #409EFF;
  360. padding: 0 10px;
  361. }
  362. #app .table-body .copybtn {
  363. color: #fff;
  364. padding: 0 30px;
  365. }
  366. .el-alert {
  367. padding: 0;
  368. padding-left: 5px;
  369. padding-bottom: 5px;
  370. }
  371. .el-alert--info .el-alert__description {
  372. color: #606266;
  373. }
  374. .el-alert .el-button {
  375. margin-left: 20px;
  376. }
  377. .el-alert__content {
  378. display: flex;
  379. align-items: center;
  380. }
  381. .table-body .el-alert__title {
  382. margin-top: 5px;
  383. font-weight: 400;
  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. .item-box {
  395. margin-right: 20px;
  396. }
  397. .flex {
  398. display: flex;
  399. align-items: center;
  400. }
  401. .input-title {
  402. margin-right: 15px;
  403. }
  404. .item-box .label {
  405. margin-right: 8px;
  406. }
  407. .com-share-pop {
  408. display: inline-block;
  409. }
  410. </style>