coupon.vue 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480
  1. <template>
  2. <div>
  3. <el-tabs v-model="activeName" @tab-click="handleClick">
  4. <el-tab-pane label="平台优惠券" name="seventh">
  5. <div style="display: flex;justify-content: space-between;">
  6. <div>
  7. <span>优惠券状态:</span>
  8. <el-select
  9. :clearable="true"
  10. @change="refreshShop"
  11. v-model="selectState"
  12. placeholder="请选择状态"
  13. >
  14. <el-option label="待审核" :value="0"></el-option>
  15. <el-option label="已发布" :value="1"></el-option>
  16. <el-option label="已撤销" :value="2"></el-option>
  17. </el-select>
  18. </div>
  19. <div>
  20. <el-button
  21. size="mini"
  22. type="primary"
  23. icon="document"
  24. @click="refresh"
  25. >刷新</el-button
  26. >
  27. <el-button
  28. style="margin:0 0 20px 10px;"
  29. :disabled="!isAuth('coupon:add')"
  30. size="mini"
  31. type="primary"
  32. icon="document"
  33. @click="classifyStair()"
  34. >添加优惠券</el-button
  35. >
  36. <el-button
  37. style="margin:0 0 20px 10px;"
  38. :disabled="!isAuth('coupon:log')"
  39. size="mini"
  40. type="primary"
  41. icon="document"
  42. @click="couponLog()"
  43. >查看优惠券日志</el-button
  44. >
  45. </div>
  46. </div>
  47. <el-table v-loading="tableDataLoading" :data="tableData.list">
  48. <el-table-column prop="couponId" label="编号" width="80">
  49. </el-table-column>
  50. <el-table-column prop="couponName" label="优惠券名称">
  51. </el-table-column>
  52. <el-table-column prop="couponPicture" label="图片">
  53. <template slot-scope="scope">
  54. <img
  55. :src="scope.row.couponPicture"
  56. alt=""
  57. width="40"
  58. height="40"
  59. />
  60. </template>
  61. </el-table-column>
  62. <el-table-column prop="money" label="优惠券金额"> </el-table-column>
  63. <el-table-column prop="minMoney" label="最低消费"> </el-table-column>
  64. <el-table-column prop="endDate" label="有效天数"> </el-table-column>
  65. <el-table-column prop="needIntegral" label="兑换积分">
  66. </el-table-column>
  67. <el-table-column prop="state" label="状态">
  68. <template slot-scope="scope">
  69. <span v-if="scope.row.state == 0">待审核</span>
  70. <span v-if="scope.row.state == 1">已发布</span>
  71. <span v-if="scope.row.state == 2">已撤销</span>
  72. </template>
  73. </el-table-column>
  74. <el-table-column label="操作" width="250">
  75. <template slot-scope="scope">
  76. <el-button
  77. v-if="scope.row.state == 1"
  78. :disabled="!isAuth('coupon:update')"
  79. size="mini"
  80. type="primary"
  81. icon="document"
  82. @click="songCoupon(scope.row)"
  83. >赠送
  84. </el-button>
  85. <el-button
  86. v-if="superAdmin == 1 && scope.row.state == 1"
  87. size="mini"
  88. type="primary"
  89. :disabled="!isAuth('coupon:update')"
  90. @click="compile(scope.$index, scope.row)"
  91. >编辑
  92. </el-button>
  93. <el-button
  94. v-if="scope.row.state == 1"
  95. size="mini"
  96. type="danger"
  97. :disabled="!isAuth('coupon:delete')"
  98. @click="deleteStair(scope.row)"
  99. >删除
  100. </el-button>
  101. <el-button
  102. v-if="superAdmin == 1 && scope.row.state == 0"
  103. size="mini"
  104. type="primary"
  105. @click="announceStair(scope.row, 1)"
  106. >发布
  107. </el-button>
  108. <el-button
  109. v-if="superAdmin == 1 && scope.row.state == 0"
  110. size="mini"
  111. type="danger"
  112. @click="announceStair(scope.row, 2)"
  113. >撤销
  114. </el-button>
  115. </template>
  116. </el-table-column>
  117. </el-table>
  118. <div style="text-align: center;margin-top: 10px;">
  119. <el-pagination
  120. @size-change="handleSizeChange"
  121. @current-change="handleCurrentChange"
  122. :page-sizes="[10, 20, 30, 40]"
  123. :page-size="limit"
  124. :current-page="page"
  125. layout="total,sizes, prev, pager, next"
  126. :total="tableData.totalCount"
  127. >
  128. </el-pagination>
  129. </div>
  130. </el-tab-pane>
  131. <el-tab-pane label="商家优惠券" name="youhuiquan">
  132. <div style="position: relative;display: inline-block;margin: 10px 0px;">
  133. <span>商户名称:</span>
  134. <el-input
  135. style="width: 200px;"
  136. @keydown.enter.native="animeDat"
  137. placeholder="请输入商户名称"
  138. v-model="shopName"
  139. >
  140. </el-input
  141. >&nbsp;&nbsp;
  142. <el-button
  143. size="mini"
  144. type="primary"
  145. icon="document"
  146. @click="refreshShop"
  147. >查询</el-button
  148. >
  149. <el-button
  150. style="margin:0 0 20px 10px;"
  151. :disabled="!isAuth('coupon:add')"
  152. size="mini"
  153. type="primary"
  154. icon="document"
  155. @click="classifyStair()"
  156. >添加优惠券</el-button
  157. >
  158. </div>
  159. <el-table v-loading="tableDataLoading" :data="tableData.list">
  160. <el-table-column prop="couponId" label="编号" width="80">
  161. </el-table-column>
  162. <el-table-column prop="shopName" label="商户名称"> </el-table-column>
  163. <el-table-column prop="couponName" label="优惠券名称">
  164. </el-table-column>
  165. <el-table-column prop="couponPicture" label="图片">
  166. <template slot-scope="scope">
  167. <img
  168. :src="scope.row.couponPicture"
  169. alt=""
  170. width="40"
  171. height="40"
  172. />
  173. </template>
  174. </el-table-column>
  175. <el-table-column prop="money" label="优惠券金额"> </el-table-column>
  176. <el-table-column prop="minMoney" label="最低消费"> </el-table-column>
  177. <el-table-column prop="endDate" label="有效天数"> </el-table-column>
  178. <!-- <el-table-column prop="needIntegral" label="兑换积分">
  179. </el-table-column> -->
  180. <el-table-column label="操作" width="250">
  181. <template slot-scope="scope">
  182. <el-button
  183. style="margin-left:15px;"
  184. :disabled="!isAuth('coupon:update')"
  185. size="mini"
  186. type="primary"
  187. icon="document"
  188. @click="songCoupon(scope.row)"
  189. >赠送</el-button
  190. >
  191. <el-button
  192. size="mini"
  193. type="primary"
  194. :disabled="!isAuth('coupon:update')"
  195. @click="compile(scope.$index, scope.row)"
  196. >编辑
  197. </el-button>
  198. <el-button
  199. size="mini"
  200. type="danger"
  201. :disabled="!isAuth('coupon:delete')"
  202. @click="deleteStair(scope.row)"
  203. >删除
  204. </el-button>
  205. </template>
  206. </el-table-column>
  207. </el-table>
  208. <div style="text-align: center;margin-top: 10px;">
  209. <el-pagination
  210. @size-change="handleSizeChange"
  211. @current-change="handleCurrentChange"
  212. :page-sizes="[10, 20, 30, 40]"
  213. :page-size="limit"
  214. :current-page="page"
  215. layout="total,sizes, prev, pager, next"
  216. :total="tableData.totalCount"
  217. >
  218. </el-pagination>
  219. </div>
  220. </el-tab-pane>
  221. </el-tabs>
  222. <!-- 添加优惠券 -->
  223. <el-dialog
  224. title="查看优惠券日志"
  225. custom-class="couponLog"
  226. :visible.sync="couponLogVisible"
  227. center
  228. >
  229. <el-table v-loading="couponLogLoading" :data="couponLogTable">
  230. <el-table-column prop="couponId" label="编号" width="80">
  231. </el-table-column>
  232. <el-table-column prop="couponName" label="优惠券名称">
  233. </el-table-column>
  234. <el-table-column prop="couponPicture" label="图片">
  235. <template slot-scope="scope">
  236. <img :src="scope.row.couponPicture" alt="" width="40" height="40" />
  237. </template>
  238. </el-table-column>
  239. <el-table-column prop="money" label="优惠券金额"> </el-table-column>
  240. <el-table-column prop="minMoney" label="最低消费"> </el-table-column>
  241. <el-table-column prop="endDate" label="有效天数"> </el-table-column>
  242. <el-table-column prop="needIntegral" label="兑换积分">
  243. </el-table-column>
  244. <el-table-column prop="state" label="状态">
  245. <template slot-scope="scope">
  246. <span v-if="scope.row.state == 0">待审核</span>
  247. <span v-if="scope.row.state == 1">已发布</span>
  248. <span v-if="scope.row.state == 2">已撤销</span>
  249. </template>
  250. </el-table-column>
  251. <el-table-column prop="content" label="操作内容"> </el-table-column>
  252. <el-table-column prop="username" label="操作人"> </el-table-column>
  253. <el-table-column prop="createTime" label="操作时间"> </el-table-column>
  254. </el-table>
  255. <div style="text-align: center;margin-top: 10px;">
  256. <el-pagination
  257. @size-change="couponLogSize"
  258. @current-change="couponLogCurrent"
  259. :page-sizes="[10, 20, 30, 40]"
  260. :page-size="couponLogLimit"
  261. :current-page="couponLogPage"
  262. layout="total,sizes, prev, pager, next"
  263. :total="couponLogTotal"
  264. >
  265. </el-pagination>
  266. </div>
  267. <!-- <div slot="footer" class="dialog-footer">
  268. <el-button @click="couponLogVisible = false">取 消</el-button>
  269. <el-button type="primary" @click="startCouponLog()">确 定</el-button>
  270. </div> -->
  271. </el-dialog>
  272. <!-- 添加优惠券 -->
  273. <el-dialog title="添加优惠券" :visible.sync="dialogFormVisible" center>
  274. <div style="margin-bottom: 10px;" v-if="this.shopId == -1">
  275. <span style="width: 200px;display: inline-block;text-align: right;"
  276. >商铺名称:</span
  277. >
  278. <el-input
  279. v-model="shopNames"
  280. placeholder="请选择商铺"
  281. style="width:50%;"
  282. @focus="selectUserId"
  283. ></el-input>
  284. </div>
  285. <div style="margin-bottom: 10px;">
  286. <span style="width: 200px;display: inline-block;text-align: right;"
  287. >优惠券名称:</span
  288. >
  289. <el-input
  290. style="width:50%;"
  291. v-model="couponName"
  292. type="text"
  293. placeholder="请输入优惠券名称"
  294. ></el-input>
  295. </div>
  296. <div style="margin-bottom: 10px;">
  297. <span style="width: 200px;display: inline-block;text-align: right;"
  298. >图片:</span
  299. >
  300. <!-- <el-input style="width:50%;" v-model="couponPicture" type="text" placeholder="请输入图片"></el-input> -->
  301. <div
  302. style=" width:148px;height:148px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;display: inline-block;"
  303. >
  304. <el-upload
  305. class="avatar-uploader"
  306. v-model="couponPicture"
  307. :action="Tupiantou"
  308. :show-file-list="false"
  309. :on-success="handleAvatarSuccess1"
  310. :before-upload="beforeAvatarUpload"
  311. >
  312. <img
  313. v-if="couponPicture"
  314. :src="couponPicture"
  315. class="avatar"
  316. style="width: 148px;height: 148px;"
  317. />
  318. <i
  319. v-else
  320. class="el-icon-plus avatar-uploader-icon"
  321. style="font-size: 28px;color: #8c939d"
  322. ></i>
  323. </el-upload>
  324. </div>
  325. </div>
  326. <div style="margin-bottom: 10px;">
  327. <span style="width: 200px;display: inline-block;text-align: right;"
  328. >优惠券金额:</span
  329. >
  330. <el-input
  331. style="width:50%;"
  332. v-model="money"
  333. type="text"
  334. placeholder="请输入优惠券金额"
  335. ></el-input>
  336. </div>
  337. <div style="margin-bottom: 10px;">
  338. <span style="width: 200px;display: inline-block;text-align: right;"
  339. >最低消费:</span
  340. >
  341. <el-input
  342. style="width:50%;"
  343. v-model="minMoney"
  344. type="text"
  345. placeholder="请输入最低消费"
  346. ></el-input>
  347. </div>
  348. <div style="margin-bottom: 10px;">
  349. <span style="width: 200px;display: inline-block;text-align: right;"
  350. >有效天数:</span
  351. >
  352. <el-input
  353. style="width:50%;"
  354. v-model="endDate"
  355. type="text"
  356. placeholder="请输入有效天数"
  357. ></el-input>
  358. </div>
  359. <div style="margin-bottom: 10px;" v-if="this.shopId == 0">
  360. <span style="width: 200px;display: inline-block;text-align: right;"
  361. >兑换积分:</span
  362. >
  363. <el-input
  364. style="width:50%;"
  365. v-model="needIntegral"
  366. type="text"
  367. placeholder="请输入兑换积分"
  368. ></el-input>
  369. </div>
  370. <span style="color: red;margin-left: 142px;"
  371. >兑换积分初始值为100,是必填项,不填则默认向所有用户发券</span
  372. >
  373. <div slot="footer" class="dialog-footer">
  374. <el-button @click="dialogFormVisible = false">取 消</el-button>
  375. <el-button type="primary" @click="StairNoticeTo()">确 定</el-button>
  376. </div>
  377. </el-dialog>
  378. <!-- 修改优惠券 -->
  379. <el-dialog title="修改优惠券" :visible.sync="dialogFormVisible1" center>
  380. <el-form :model="form">
  381. <el-form-item
  382. label="商铺名称:"
  383. :label-width="formLabelWidth"
  384. v-if="this.shopId == -1"
  385. >
  386. <el-input
  387. v-model="shopNames"
  388. placeholder="请选择商铺"
  389. style="width:50%;"
  390. @focus="selectUserId"
  391. >
  392. </el-input>
  393. </el-form-item>
  394. <el-form-item label="优惠券名称:" :label-width="formLabelWidth">
  395. <el-input v-model="form.couponName" style="width:65%;"></el-input>
  396. </el-form-item>
  397. <el-form-item label="图片:" :label-width="formLabelWidth">
  398. <!-- <el-input v-model="form.campusDetails" style="width:65%;"></el-input> -->
  399. <div
  400. style=" width:148px;height:148px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;display: inline-block;"
  401. >
  402. <el-upload
  403. class="avatar-uploader"
  404. v-model="form.couponPicture"
  405. :action="Tupiantou"
  406. :show-file-list="false"
  407. :on-success="handleAvatarSuccess2"
  408. :before-upload="beforeAvatarUpload"
  409. >
  410. <img
  411. v-if="form.couponPicture"
  412. :src="form.couponPicture"
  413. class="avatar"
  414. style="width: 148px;height: 148px;"
  415. />
  416. <i
  417. v-else
  418. class="el-icon-plus avatar-uploader-icon"
  419. style="font-size: 28px;color: #8c939d"
  420. ></i>
  421. </el-upload>
  422. </div>
  423. </el-form-item>
  424. <el-form-item label="优惠券金额:" :label-width="formLabelWidth">
  425. <el-input v-model="form.money" style="width:65%;"></el-input>
  426. </el-form-item>
  427. <el-form-item label="最低消费:" :label-width="formLabelWidth">
  428. <el-input v-model="form.minMoney" style="width:65%;"></el-input>
  429. </el-form-item>
  430. <el-form-item label="有效天数:" :label-width="formLabelWidth">
  431. <el-input v-model="form.endDate" style="width:65%;"></el-input>
  432. </el-form-item>
  433. <el-form-item
  434. label="兑换积分:"
  435. :label-width="formLabelWidth"
  436. v-if="this.shopId == 0"
  437. >
  438. <el-input v-model="form.needIntegral" style="width:65%;"></el-input>
  439. </el-form-item>
  440. <span style="color: red;margin-left: 120px;"
  441. >兑换积分初始值为100,是必填项,不填则默认向所有用户发券</span
  442. >
  443. </el-form>
  444. <div slot="footer" class="dialog-footer">
  445. <el-button @click="dialogFormVisible1 = false">取 消</el-button>
  446. <el-button type="primary" @click="CompileNoticeTo()">确 定</el-button>
  447. </div>
  448. </el-dialog>
  449. <!-- 赠送优惠券-->
  450. <el-dialog title="赠送优惠券" :visible.sync="dialogFormVisible0" center>
  451. <div style="margin: 10px 0;">
  452. <span style="width: 200px;display: inline-block;text-align: right;"
  453. >选择用户:</span
  454. >
  455. <el-tag
  456. :key="tag"
  457. v-for="(tag, j) in userNameList"
  458. closable
  459. :disable-transitions="false"
  460. @close="couponIdClose1(tag, j)"
  461. >
  462. {{ tag }}
  463. </el-tag>
  464. <el-button class="button-new-tag" size="small" @click="couponIdBtn1()"
  465. >添加</el-button
  466. >
  467. </div>
  468. <div slot="footer" class="dialog-footer">
  469. <el-button @click="dialogFormVisible0 = false">取 消</el-button>
  470. <el-button type="primary" @click="songNoticeTo()">确 定</el-button>
  471. </div>
  472. </el-dialog>
  473. <!-- 用户列表 -->
  474. <el-dialog
  475. title="用户列表"
  476. :visible.sync="dialogFormVisible5"
  477. center
  478. width="80%"
  479. >
  480. <el-input
  481. style="width: 150px;"
  482. @keydown.enter.native="select1"
  483. clearable
  484. placeholder="请输入手机号"
  485. v-model="phone"
  486. >
  487. </el-input
  488. >&nbsp;&nbsp;&nbsp;&nbsp;
  489. <el-input
  490. style="width: 150px;"
  491. @keydown.enter.native="select1"
  492. clearable
  493. placeholder="请输入昵称"
  494. v-model="nickName"
  495. >
  496. </el-input>
  497. <div style="display: inline-block;">
  498. <el-button
  499. style="margin-left:15px;"
  500. size="mini"
  501. type="primary"
  502. icon="document"
  503. @click="select1"
  504. >查询
  505. </el-button>
  506. <el-button
  507. style="margin-left:15px;"
  508. size="mini"
  509. type="primary"
  510. icon="document"
  511. @click="cleans1"
  512. >重置
  513. </el-button>
  514. </div>
  515. <el-button
  516. style="margin-left:15px;"
  517. :disabled="userIdList.length <= 0"
  518. size="mini"
  519. type="primary"
  520. icon="document"
  521. @click="closes2()"
  522. >确定</el-button
  523. >
  524. <el-table
  525. v-loading="tableDataLoading1"
  526. @selection-change="changeFun1"
  527. :data="userData.list"
  528. :row-key="
  529. row => {
  530. return row.userId;
  531. }
  532. "
  533. ref="multipleTable"
  534. >
  535. <el-table-column :reserve-selection="true" type="selection" fixed>
  536. </el-table-column>
  537. <el-table-column prop="userId" label="编号"> </el-table-column>
  538. <el-table-column fixed prop="nickName" label="昵称">
  539. <template slot-scope="scope">
  540. <span style="color: #f56c6c;">{{
  541. scope.row.nickName ? scope.row.nickName : "未设置"
  542. }}</span>
  543. </template>
  544. </el-table-column>
  545. <el-table-column label="图像">
  546. <template slot-scope="scope">
  547. <img
  548. v-if="scope.row.avatar == null"
  549. src="~@/assets/img/avatar.png"
  550. alt=""
  551. width="40"
  552. height="40"
  553. />
  554. <img v-else :src="scope.row.avatar" alt="" width="40" height="40" />
  555. </template>
  556. </el-table-column>
  557. <el-table-column prop="phone" label="手机号" width="120">
  558. <template slot-scope="scope">
  559. <span
  560. style="color: #4f9dec;cursor: pointer;"
  561. @click="updates(scope.row)"
  562. >{{ scope.row.phone ? scope.row.phone : "未绑定" }}</span
  563. >
  564. </template>
  565. </el-table-column>
  566. <el-table-column prop="platform" label="来源"> </el-table-column>
  567. <el-table-column prop="createTime" label="创建时间"> </el-table-column>
  568. </el-table>
  569. <div style="text-align: center;margin-top: 10px;">
  570. <el-pagination
  571. @size-change="handleSizeChange2"
  572. @current-change="handleCurrentChange2"
  573. :page-sizes="[5, 10, 15, 20]"
  574. :page-size="size1"
  575. :current-page="page1"
  576. layout="total,sizes, prev, pager, next,jumper"
  577. :total="userData.totalCount"
  578. >
  579. </el-pagination>
  580. </div>
  581. </el-dialog>
  582. <!-- 商户列表 -->
  583. <el-dialog
  584. title="商户列表"
  585. :visible.sync="dialogFormVisible11"
  586. center
  587. width="80%"
  588. >
  589. <el-input
  590. style="width: 150px;"
  591. @keydown.enter.native="select11"
  592. clearable
  593. placeholder="请输入商户名称"
  594. v-model="shopName1"
  595. >
  596. </el-input
  597. >&nbsp;&nbsp;&nbsp;&nbsp;
  598. <div style="display: inline-block;">
  599. <el-button
  600. style="margin-left:15px;"
  601. size="mini"
  602. type="primary"
  603. icon="document"
  604. @click="select11"
  605. >查询
  606. </el-button>
  607. <el-button
  608. style="margin-left:15px;"
  609. size="mini"
  610. type="primary"
  611. icon="document"
  612. @click="cleans11"
  613. >重置
  614. </el-button>
  615. </div>
  616. <el-table v-loading="tableDataLoading11" :data="shopData.list">
  617. <el-table-column label="编号" prop="shopId" width="80" fixed="left">
  618. </el-table-column>
  619. <el-table-column label="名称" prop="shopName" fixed="left">
  620. </el-table-column>
  621. <el-table-column label="店铺手机号" prop="phone" width="120">
  622. </el-table-column>
  623. <el-table-column label="商铺类型" prop="shopTypeName">
  624. </el-table-column>
  625. <el-table-column prop="shopCover" label="封面图" width="150">
  626. <template slot-scope="scope">
  627. <div style="display: inline-block; margin: 3px;">
  628. <el-popover placement="top-start" title="" trigger="hover">
  629. <img
  630. style="width: 50px; height: 50px"
  631. :src="scope.row.shopCover"
  632. alt=""
  633. slot="reference"
  634. />
  635. <img
  636. style="width: 300px; height: auto"
  637. :src="scope.row.shopCover"
  638. alt=""
  639. />
  640. </el-popover>
  641. </div>
  642. </template>
  643. </el-table-column>
  644. <el-table-column label="营业状态" prop="putawayFlag">
  645. <template slot-scope="scope">
  646. <span>{{ scope.row.putawayFlag == 0 ? "上班啦" : "打烊啦" }}</span>
  647. </template>
  648. </el-table-column>
  649. <el-table-column label="配送费" prop="errandMoney" width="150">
  650. <template slot-scope="scope">
  651. <span>{{ scope.row.errandMoney ? scope.row.errandMoney : 0 }}</span>
  652. <el-button
  653. size="mini"
  654. type="danger"
  655. style="color: #4f9dec;background: #fff;border: none;"
  656. :disabled="!isAuth('userList:updateMoney')"
  657. @click="rechargenone(scope.row, 1)"
  658. >修改配送费
  659. </el-button>
  660. </template>
  661. </el-table-column>
  662. <el-table-column
  663. label="配送距离"
  664. prop="distributionDistance"
  665. width="150"
  666. >
  667. <template slot-scope="scope">
  668. <span>{{
  669. scope.row.distributionDistance
  670. ? scope.row.distributionDistance
  671. : 0
  672. }}</span>
  673. </template>
  674. </el-table-column>
  675. <el-table-column label="商铺标签" prop="shopLable"> </el-table-column>
  676. <el-table-column label="开店时间" prop="businessHours">
  677. </el-table-column>
  678. <el-table-column label="闭店时间" prop="lockHours"> </el-table-column>
  679. <el-table-column label="商铺评分" prop="shopScore"> </el-table-column>
  680. <el-table-column label="商铺销量" prop="shopSales"> </el-table-column>
  681. <el-table-column label="商家公告" prop="shopNotice" width="150">
  682. </el-table-column>
  683. <el-table-column fixed="right" label="操作">
  684. <template slot-scope="scope">
  685. <el-button
  686. style="margin-left:15px;"
  687. size="mini"
  688. type="primary"
  689. icon="document"
  690. @click="closes3(scope.row)"
  691. >
  692. 确定</el-button
  693. >
  694. </template>
  695. </el-table-column>
  696. </el-table>
  697. <div style="text-align: center;margin-top: 10px;">
  698. <el-pagination
  699. @size-change="handleSizeChangeS"
  700. @current-change="handleCurrentChangeS"
  701. :page-sizes="[10, 20, 30, 50]"
  702. :page-size="size1"
  703. :current-page="page1"
  704. layout="total,sizes, prev, pager, next,jumper"
  705. :total="shopData.totalCount"
  706. >
  707. </el-pagination>
  708. </div>
  709. </el-dialog>
  710. </div>
  711. </template>
  712. <script>
  713. export default {
  714. data() {
  715. return {
  716. userId: "",
  717. superAdmin: "", // 判断是否为超级管理员 1是超级管理员 0不是超级管理员
  718. selectState: "",
  719. limit: 10,
  720. page: 1,
  721. size1: 10,
  722. page1: 1,
  723. checkBoxData: [], //多选框选择的值
  724. formLabelWidth: "200px",
  725. tableDataLoading: false,
  726. dialogFormVisible: false,
  727. dialogFormVisible1: false,
  728. dialogFormVisible0: false,
  729. dialogFormVisible5: false,
  730. tableDataLoading1: false,
  731. tableData: [],
  732. couponName: "",
  733. couponPicture: "",
  734. endDate: "",
  735. minMoney: "",
  736. money: "",
  737. needIntegral: "100",
  738. form: {
  739. couponId: "",
  740. couponName: "",
  741. couponPicture: "",
  742. endDate: "",
  743. minMoney: "",
  744. money: "",
  745. needIntegral: ""
  746. },
  747. userNameList: [],
  748. userIdList: [],
  749. userData: [],
  750. phone: "",
  751. nickName: "",
  752. couponId: "",
  753. activeName: "seventh",
  754. shopName: "",
  755. shopId: 0,
  756. tableDataLoading11: false,
  757. dialogFormVisible11: false,
  758. shopIds: "",
  759. shopNames: "",
  760. shopName1: "",
  761. shopData: {},
  762. shopIds2: "",
  763. content: "",
  764. couponLogVisible: false, // 查看优惠券日志
  765. couponLogLoading: false,
  766. couponLogTable: [],
  767. couponLogLimit: 10,
  768. couponLogPage: 1,
  769. couponLogTotal: 1
  770. };
  771. },
  772. methods: {
  773. handleClick(tab, event) {
  774. if (tab._props.label == "平台优惠券") {
  775. this.page = 1;
  776. this.limit = 10;
  777. this.shopName = "";
  778. this.shopId = 0;
  779. this.dataSelect();
  780. }
  781. if (tab._props.label == "商家优惠券") {
  782. this.page = 1;
  783. this.limit = 10;
  784. this.shopName = "";
  785. this.shopId = -1;
  786. this.dataSelect();
  787. }
  788. },
  789. // 多选
  790. changeFun(val) {
  791. this.checkBoxData = val;
  792. },
  793. handleSizeChange(val) {
  794. this.limit = val;
  795. this.dataSelect();
  796. },
  797. handleCurrentChange(val) {
  798. this.page = val;
  799. this.dataSelect();
  800. },
  801. handleSizeChange2(val) {
  802. this.size1 = val;
  803. this.dataSelect1();
  804. },
  805. handleCurrentChange2(val) {
  806. this.page1 = val;
  807. this.dataSelect1();
  808. },
  809. handleSizeChangeS(val) {
  810. this.size1 = val;
  811. this.dataSelect11();
  812. },
  813. handleCurrentChangeS(val) {
  814. this.page1 = val;
  815. this.dataSelect11();
  816. },
  817. beforeAvatarUpload(file) {
  818. return this.$processImage(this, file, false);
  819. },
  820. handleAvatarSuccess1(file, fileList) {
  821. this.couponPicture = file.data;
  822. },
  823. handleAvatarSuccess2(file, fileList) {
  824. this.form.couponPicture = file.data;
  825. },
  826. // 刷新
  827. refresh() {
  828. this.page = 1;
  829. this.dataSelect();
  830. },
  831. // 查看优惠券日志
  832. couponLog() {
  833. this.couponLogVisible = true;
  834. this.couponLogList();
  835. },
  836. couponLogList() {
  837. this.couponLogLoading = true;
  838. this.$http({
  839. url: this.$http.adornUrl("admin/couponLog/selectCouponLog"),
  840. method: "get",
  841. params: this.$http.adornParams({
  842. page: this.couponLogPage,
  843. limit: this.couponLogLimit
  844. })
  845. }).then(({ data }) => {
  846. console.log(data, "查看优惠券日志");
  847. this.couponLogLoading = false;
  848. let returnData = data.data;
  849. this.couponLogTable = returnData.list;
  850. this.couponLogTotal = returnData.totalCount;
  851. });
  852. },
  853. couponLogSize(val) {
  854. this.couponLogLimit = val;
  855. this.couponLogList();
  856. },
  857. couponLogCurrent(val) {
  858. this.couponLogPage = val;
  859. this.couponLogList();
  860. },
  861. // 添加优惠券弹框
  862. classifyStair() {
  863. this.couponName = "";
  864. this.couponPicture = "";
  865. this.endDate = "";
  866. this.minMoney = "";
  867. this.money = "";
  868. this.needIntegral = "100";
  869. this.shopNames = "";
  870. if (this.shopId === 0) {
  871. this.shopIds = 0;
  872. } else {
  873. this.shopIds = "";
  874. }
  875. this.dialogFormVisible = true;
  876. },
  877. // 添加优惠券
  878. StairNoticeTo() {
  879. if (this.couponName == "") {
  880. this.$notify({
  881. title: "提示",
  882. duration: 1800,
  883. message: "请输入优惠券名称",
  884. type: "warning"
  885. });
  886. return;
  887. }
  888. if (this.couponPicture == "") {
  889. this.$notify({
  890. title: "提示",
  891. duration: 1800,
  892. message: "请上传图片",
  893. type: "warning"
  894. });
  895. return;
  896. }
  897. if (this.money == "") {
  898. this.$notify({
  899. title: "提示",
  900. duration: 1800,
  901. message: "请输入优惠券金额",
  902. type: "warning"
  903. });
  904. return;
  905. }
  906. if (this.minMoney == "") {
  907. this.$notify({
  908. title: "提示",
  909. duration: 1800,
  910. message: "请输入最低消费",
  911. type: "warning"
  912. });
  913. return;
  914. }
  915. if (this.endDate == "") {
  916. this.$notify({
  917. title: "提示",
  918. duration: 1800,
  919. message: "请输入有效天数",
  920. type: "warning"
  921. });
  922. return;
  923. }
  924. if (this.shopId === 0) {
  925. if (this.needIntegral == "") {
  926. this.$notify({
  927. title: "提示",
  928. duration: 1800,
  929. message: "请输入兑换积分",
  930. type: "warning"
  931. });
  932. return;
  933. }
  934. }
  935. this.$http({
  936. url: this.$http.adornUrl("admin/coupon/issueCoupon"),
  937. method: "post",
  938. data: this.$http.adornData({
  939. couponName: this.couponName,
  940. couponPicture: this.couponPicture,
  941. endDate: this.endDate,
  942. minMoney: this.minMoney,
  943. money: this.money,
  944. needIntegral: this.needIntegral,
  945. shopId: this.shopIds,
  946. sysUserId: this.userId
  947. })
  948. }).then(({ data }) => {
  949. if (data.code == 0) {
  950. this.dialogFormVisible = false;
  951. this.$message({
  952. message: "添加成功",
  953. type: "success",
  954. duration: 1500,
  955. onClose: () => {
  956. this.dataSelect();
  957. }
  958. });
  959. } else {
  960. this.$message({
  961. message: data.msg,
  962. type: "warning",
  963. duration: 1500,
  964. onClose: () => {}
  965. });
  966. }
  967. });
  968. },
  969. // 修改优惠券
  970. compile(index, rows) {
  971. this.form.couponName = rows.couponName;
  972. this.form.couponPicture = rows.couponPicture;
  973. this.form.endDate = rows.endDate;
  974. this.form.minMoney = rows.minMoney;
  975. this.form.money = rows.money;
  976. this.form.needIntegral = rows.needIntegral;
  977. this.form.couponId = rows.couponId;
  978. this.shopNames = rows.shopName;
  979. this.shopIds = rows.shopId;
  980. this.dialogFormVisible1 = true;
  981. },
  982. // 修改优惠券
  983. CompileNoticeTo() {
  984. if (this.form.campusName == "") {
  985. this.$notify({
  986. title: "提示",
  987. duration: 1800,
  988. message: "请输入优惠券名称",
  989. type: "warning"
  990. });
  991. return;
  992. }
  993. if (this.form.couponPicture == "") {
  994. this.$notify({
  995. title: "提示",
  996. duration: 1800,
  997. message: "请上传图片",
  998. type: "warning"
  999. });
  1000. return;
  1001. }
  1002. if (this.form.money == "") {
  1003. this.$notify({
  1004. title: "提示",
  1005. duration: 1800,
  1006. message: "请输入优惠券金额",
  1007. type: "warning"
  1008. });
  1009. return;
  1010. }
  1011. if (this.form.minMoney == "") {
  1012. this.$notify({
  1013. title: "提示",
  1014. duration: 1800,
  1015. message: "请输入最低消费",
  1016. type: "warning"
  1017. });
  1018. return;
  1019. }
  1020. if (this.form.endDate == "") {
  1021. this.$notify({
  1022. title: "提示",
  1023. duration: 1800,
  1024. message: "请输入有效天数",
  1025. type: "warning"
  1026. });
  1027. return;
  1028. }
  1029. if (this.shopId === 0) {
  1030. if (this.form.needIntegral == "") {
  1031. this.$notify({
  1032. title: "提示",
  1033. duration: 1800,
  1034. message: "请输入兑换积分",
  1035. type: "warning"
  1036. });
  1037. return;
  1038. }
  1039. }
  1040. this.$http({
  1041. url: this.$http.adornUrl("admin/coupon/updateCoupon"),
  1042. method: "post",
  1043. data: this.$http.adornData({
  1044. couponId: this.form.couponId,
  1045. couponName: this.form.couponName,
  1046. couponPicture: this.form.couponPicture,
  1047. endDate: this.form.endDate,
  1048. minMoney: this.form.minMoney,
  1049. money: this.form.money,
  1050. needIntegral: this.form.needIntegral,
  1051. shopId: this.shopIds,
  1052. sysUserId: this.userId
  1053. })
  1054. }).then(({ data }) => {
  1055. if (data.code == 0) {
  1056. this.$message({
  1057. message: "操作成功",
  1058. type: "success",
  1059. duration: 1500,
  1060. onClose: () => {
  1061. this.dialogFormVisible1 = false;
  1062. this.dataSelect();
  1063. }
  1064. });
  1065. } else {
  1066. this.$message({
  1067. message: data.msg,
  1068. type: "error",
  1069. duration: 1500,
  1070. onClose: () => {
  1071. this.dialogFormVisible1 = false;
  1072. this.dataSelect();
  1073. }
  1074. });
  1075. }
  1076. });
  1077. },
  1078. // 发布审核优惠券
  1079. announceStair(rows, index) {
  1080. let title = "";
  1081. if (index == 1) {
  1082. title = "确定发布此条优惠券?";
  1083. } else if (title == 2) {
  1084. title = "确定撤销此条优惠券?";
  1085. }
  1086. this.$confirm(`${title}`, "提示", {
  1087. confirmButtonText: "确定",
  1088. cancelButtonText: "取消",
  1089. type: "warning"
  1090. })
  1091. .then(() => {
  1092. this.$http({
  1093. url: this.$http.adornUrl("admin/coupon/checkCoupon"),
  1094. method: "get",
  1095. params: this.$http.adornParams({
  1096. couponId: rows.couponId,
  1097. sysUserId: this.userId,
  1098. state: index
  1099. })
  1100. }).then(({ data }) => {
  1101. console.log(data);
  1102. if (data.code == 0) {
  1103. this.$message({
  1104. message: "操作成功",
  1105. type: "success",
  1106. duration: 1500,
  1107. onClose: () => {
  1108. this.dataSelect();
  1109. }
  1110. });
  1111. } else {
  1112. this.$message({
  1113. message: data.msg,
  1114. type: "error",
  1115. duration: 1500,
  1116. onClose: () => {
  1117. this.dataSelect();
  1118. }
  1119. });
  1120. }
  1121. });
  1122. })
  1123. .catch(() => {});
  1124. },
  1125. // 删除
  1126. deleteStair(row) {
  1127. this.$confirm(`确定删除此条信息?`, "提示", {
  1128. confirmButtonText: "确定",
  1129. cancelButtonText: "取消",
  1130. type: "warning"
  1131. })
  1132. .then(() => {
  1133. this.$http({
  1134. url: this.$http.adornUrl("admin/coupon/deleteCoupon"),
  1135. method: "post",
  1136. params: this.$http.adornParams({
  1137. couponId: row.couponId,
  1138. sysUserId: this.userId
  1139. })
  1140. }).then(({ data }) => {
  1141. if (data.code == 0) {
  1142. this.$message({
  1143. message: "删除成功",
  1144. type: "success",
  1145. duration: 1500,
  1146. onClose: () => {
  1147. this.dataSelect();
  1148. }
  1149. });
  1150. } else {
  1151. this.$message({
  1152. message: data.msg,
  1153. type: "error",
  1154. duration: 1500,
  1155. onClose: () => {
  1156. this.dataSelect();
  1157. }
  1158. });
  1159. }
  1160. });
  1161. })
  1162. .catch(() => {});
  1163. },
  1164. // 重置
  1165. cleans() {
  1166. this.phone = "";
  1167. this.status = 0;
  1168. this.dataSelect();
  1169. },
  1170. // 获取派单数据列表
  1171. dataSelect() {
  1172. this.tableDataLoading = true;
  1173. if (this.shopId == 0) {
  1174. this.$http({
  1175. url: this.$http.adornUrl("admin/coupon/selectAdminCoupon"),
  1176. method: "get",
  1177. params: this.$http.adornParams({
  1178. page: this.page,
  1179. limit: this.limit,
  1180. state: this.selectState
  1181. })
  1182. }).then(({ data }) => {
  1183. console.log(data, "平台优惠券");
  1184. this.tableDataLoading = false;
  1185. let returnData = data.data;
  1186. this.tableData = returnData;
  1187. // if(data.data.list.length==0){
  1188. // this.page = this.page-1
  1189. // this.dataSelect()
  1190. // }
  1191. });
  1192. } else if (this.shopId == -1) {
  1193. this.$http({
  1194. url: this.$http.adornUrl("admin/coupon/seleteAllCoupon"),
  1195. method: "get",
  1196. params: this.$http.adornParams({
  1197. page: this.page,
  1198. limit: this.limit,
  1199. content: this.content,
  1200. shopId: this.shopId,
  1201. shopName: this.shopName
  1202. })
  1203. }).then(({ data }) => {
  1204. console.log(data, "商家优惠券");
  1205. this.tableDataLoading = false;
  1206. let returnData = data.data;
  1207. this.tableData = returnData;
  1208. // if(data.data.list.length==0){
  1209. // this.page = this.page-1
  1210. // this.dataSelect()
  1211. // }
  1212. });
  1213. }
  1214. },
  1215. // 赠送优惠券
  1216. songCoupon(row) {
  1217. this.couponId = row.couponId;
  1218. this.shopIds2 = row.shopId;
  1219. this.userIdList = [];
  1220. this.userNameList = [];
  1221. this.dialogFormVisible0 = true;
  1222. },
  1223. // 打开用户列表
  1224. couponIdBtn1() {
  1225. this.page1 = 1;
  1226. this.dataSelect1();
  1227. this.dialogFormVisible5 = true;
  1228. if (this.userIdList.length == 0) {
  1229. this.cleansHc();
  1230. }
  1231. },
  1232. // 清空选中缓存
  1233. cleansHc(rows) {
  1234. console.log("---", this.$refs.multipleTable);
  1235. if (this.$refs.multipleTable) {
  1236. this.$refs.multipleTable.clearSelection();
  1237. }
  1238. },
  1239. // 多选用户
  1240. changeFun1(val) {
  1241. console.log("多选", val);
  1242. var userIdList = [];
  1243. var userNameList = [];
  1244. for (var i in val) {
  1245. userIdList.push(val[i].userId);
  1246. userNameList.push(val[i].nickName);
  1247. }
  1248. this.userIdList = userIdList;
  1249. this.userNameList = userNameList;
  1250. console.log(JSON.stringify(this.userIdList));
  1251. },
  1252. // 赠送优惠券
  1253. songNoticeTo() {
  1254. if (this.userIdList.length == 0) {
  1255. this.$notify({
  1256. title: "提示",
  1257. duration: 1800,
  1258. message: "请选择用户",
  1259. type: "warning"
  1260. });
  1261. return;
  1262. }
  1263. if (this.shopId == -1) {
  1264. var shopIds1 = this.shopIds2;
  1265. } else {
  1266. var shopIds1 = this.shopId;
  1267. }
  1268. var userIdList = this.userIdList.toString();
  1269. this.$http({
  1270. url: this.$http.adornUrl("admin/coupon/giveCoupon"),
  1271. method: "get",
  1272. params: this.$http.adornParams({
  1273. userIds: userIdList,
  1274. shopId: shopIds1,
  1275. couponId: this.couponId
  1276. })
  1277. }).then(({ data }) => {
  1278. this.$message({
  1279. message: "操作成功",
  1280. type: "success",
  1281. duration: 1500,
  1282. onClose: () => {
  1283. this.userIdList = [];
  1284. this.userNameList = [];
  1285. this.shopIds2 = "";
  1286. this.dataSelect();
  1287. }
  1288. });
  1289. this.dialogFormVisible0 = false;
  1290. });
  1291. },
  1292. // 获取用户数据列表
  1293. dataSelect1() {
  1294. let phone = -1;
  1295. if (this.phone) {
  1296. phone = this.phone;
  1297. }
  1298. this.tableDataLoading1 = true;
  1299. this.$http({
  1300. url: this.$http.adornUrl("user/selectUserList"),
  1301. method: "get",
  1302. params: this.$http.adornParams({
  1303. page: this.page1,
  1304. limit: this.size1,
  1305. shopAdminFlag: "",
  1306. phone: this.phone,
  1307. userName: this.nickName,
  1308. type: ""
  1309. })
  1310. }).then(({ data }) => {
  1311. this.tableDataLoading1 = false;
  1312. let returnData = data.data;
  1313. this.userData = returnData;
  1314. });
  1315. },
  1316. // 查询
  1317. select1() {
  1318. this.page = 1;
  1319. this.dataSelect1();
  1320. },
  1321. // 重置
  1322. cleans1() {
  1323. this.page = 1;
  1324. this.phone = "";
  1325. this.nickName = "";
  1326. this.dataSelect1();
  1327. },
  1328. couponIdClose1(ietm, index) {
  1329. console.log("index", index, "ietm", ietm, this.userIdList.length);
  1330. if (this.userIdList.length < 2) {
  1331. this.$message({
  1332. title: "提示",
  1333. type: "error",
  1334. duration: 1800,
  1335. message: "最少需要选中一位用户",
  1336. type: "warning"
  1337. });
  1338. return;
  1339. } else {
  1340. this.userIdList.splice(index, 1);
  1341. this.userNameList.splice(index, 1);
  1342. }
  1343. },
  1344. // 批量开启
  1345. closes2(id) {
  1346. this.isCoupon = 1;
  1347. this.dialogFormVisible5 = false;
  1348. },
  1349. // 获取派单数据列表
  1350. dataSelectShop() {
  1351. this.tableDataLoading = true;
  1352. this.$http({
  1353. url: this.$http.adornUrl("coupon/seleteAllCoupon"),
  1354. method: "get",
  1355. params: this.$http.adornParams({
  1356. page: this.page,
  1357. limit: this.limit,
  1358. shopName: this.shopName,
  1359. shopId: this.shopId
  1360. })
  1361. }).then(({ data }) => {
  1362. this.tableDataLoading = false;
  1363. let returnData = data.data;
  1364. this.tableData = returnData;
  1365. // if(data.data.list.length==0){
  1366. // this.page = this.page-1
  1367. // this.dataSelect()
  1368. // }
  1369. });
  1370. },
  1371. // 获取用户数据列表
  1372. dataSelect11() {
  1373. this.tableDataLoading = true;
  1374. this.$http({
  1375. url: this.$http.adornUrl("admin/goods/selectAllShop"),
  1376. method: "get",
  1377. params: this.$http.adornParams({
  1378. page: this.page1,
  1379. limit: this.size1,
  1380. shopName: this.shopName1,
  1381. region: "",
  1382. isActivity: ""
  1383. })
  1384. }).then(({ data }) => {
  1385. this.tableDataLoading = false;
  1386. for (var i in data.data.list) {
  1387. if (data.data.list[i].shopBanner) {
  1388. data.data.list[i].shopBanner = data.data.list[i].shopBanner.split(
  1389. ","
  1390. );
  1391. }
  1392. }
  1393. let returnData = data.data;
  1394. this.shopData = returnData;
  1395. });
  1396. },
  1397. // 查询
  1398. select11() {
  1399. this.page1 = 1;
  1400. this.dataSelect11();
  1401. },
  1402. // 查看用户
  1403. selectUserId() {
  1404. this.dialogFormVisible11 = true;
  1405. this.page1 = 1;
  1406. this.shopName1 = "";
  1407. this.dataSelect11();
  1408. },
  1409. // 重置
  1410. cleans11() {
  1411. this.page1 = 1;
  1412. this.shopName1 = "";
  1413. this.dataSelect11();
  1414. },
  1415. closes3(row) {
  1416. this.shopIds = row.shopId;
  1417. this.shopNames = row.shopName;
  1418. this.dialogFormVisible11 = false;
  1419. },
  1420. refreshShop() {
  1421. this.page = 1;
  1422. this.dataSelect();
  1423. }
  1424. },
  1425. mounted() {
  1426. this.dataSelect();
  1427. },
  1428. created() {
  1429. var userId = this.$cookie.get("userId");
  1430. this.userId = userId;
  1431. this.$http({
  1432. url: this.$http.adornUrl("sys/user/isSuperAdmin"),
  1433. method: "get",
  1434. params: this.$http.adornParams({
  1435. sysUserId: userId
  1436. })
  1437. }).then(({ data }) => {
  1438. console.log(data);
  1439. if (data.code == 0) {
  1440. this.superAdmin = data.superAdmin;
  1441. } else {
  1442. this.$message({
  1443. message: data.msg,
  1444. type: "warning",
  1445. duration: 1500,
  1446. onClose: () => {}
  1447. });
  1448. }
  1449. });
  1450. // 超级管理员 审核中 发布 撤销
  1451. // 已发布 赠送 编辑 删除
  1452. // 已撤销
  1453. // 普通用户 审核中
  1454. // 已发布 赠送 删除
  1455. // 已撤销
  1456. }
  1457. };
  1458. </script>
  1459. <style lang="scss">
  1460. .couponLog {
  1461. width: 60%;
  1462. }
  1463. </style>