index.php 17 KB

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