index.vue 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447
  1. <template>
  2. <div id="app" class="app-container">
  3. <el-drawer
  4. :withHeader="false"
  5. :visible.sync="isOpen"
  6. direction="ttb"
  7. size="100%"
  8. :before-close="handleClose"
  9. :show-close="false"
  10. >
  11. <div class="main">
  12. <div class="top-nav">欢迎使用{{ systemName }}</div>
  13. <div class="left-side">
  14. <div class="logo">
  15. <!-- <i class="logout el-icon-d-arrow-left" @click="logout"></i> -->
  16. <div class="title">收银台</div>
  17. <div class="store" v-if="storeInfo">({{ storeInfo.name }})</div>
  18. <div class="account">您好,{{ accountInfo.realName }}!</div>
  19. </div>
  20. <div class="cate">
  21. <ul class="nav">
  22. <li class="nav-item" v-for="menu in menuList">
  23. <a
  24. :class="'nav-link' + (activeMenu == menu.key ? ' active' : '')"
  25. href="javascript:;"
  26. @click="switchMenu(menu.key)"
  27. >
  28. <img class="cate-logo" :src="menu.logo" />
  29. <span>{{ menu.name }}</span>
  30. </a>
  31. </li>
  32. </ul>
  33. </div>
  34. </div>
  35. <div class="cart-container" v-if="activeMenu == 'cashier'">
  36. <div class="title">
  37. <div class="logo">
  38. <img
  39. class="avatar"
  40. v-if="!memberInfo || !memberInfo.avatar"
  41. src="@/assets/images/avatar.svg"
  42. />
  43. <img class="avatar" v-else :src="memberInfo.avatar" />
  44. </div>
  45. <div class="member-info">
  46. <span class="name" v-if="memberInfo">
  47. {{ memberInfo.mobile ? memberInfo.mobile : memberInfo.name }}
  48. </span>
  49. <span class="none" v-if="!memberInfo">当前为游客</span>
  50. <!-- <el-button
  51. size="mini"
  52. class="switch"
  53. type="danger"
  54. icon="el-icon-refresh"
  55. @click="switchMember()"
  56. >
  57. 关联会员
  58. </el-button> -->
  59. </div>
  60. </div>
  61. <div class="carts">
  62. <div>
  63. <div class="tab">
  64. <div class="cart-list" v-if="cartList.length > 0">
  65. <div class="cart-item" v-for="cartInfo in cartList">
  66. <img class="image" :src="cartInfo.logo" />
  67. <div class="info">
  68. <div class="name">{{ cartInfo.name }}</div>
  69. <div class="spec" v-if="cartInfo.specList && cartInfo.specList.length > 0">
  70. <span class="item" v-for="spec in cartInfo.specList" :title="spec.value">
  71. {{ spec.value }}
  72. </span>
  73. </div>
  74. <div class="num">
  75. <el-input-number
  76. class="input"
  77. @change="changeBuyNum(cartInfo)"
  78. v-model="cartInfo.buyNum"
  79. :min="1"
  80. :max="1000"
  81. />
  82. </div>
  83. </div>
  84. <div class="option">
  85. <div
  86. class="remove el-icon-delete"
  87. @click="removeFromCart(cartInfo.cartId)"
  88. ></div>
  89. <div class="total">¥{{ (cartInfo.price * cartInfo.buyNum).toFixed(2) }}</div>
  90. </div>
  91. </div>
  92. </div>
  93. <div class="empty" v-if="cartList.length < 1">
  94. <el-empty description="暂无结算商品" :image-size="40"></el-empty>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. <div class="footer">
  100. <div class="number">
  101. <div class="total-num">
  102. 总件数:
  103. <b class="num">{{ cartTotalNum }}</b>
  104. </div>
  105. <div class="total-price">
  106. 总金额:
  107. <b class="num">¥{{ cartTotalPrice ? cartTotalPrice.toFixed(2) : '0.00' }}</b>
  108. </div>
  109. </div>
  110. <div class="options">
  111. <div class="cash" @click="hangUp()">挂单 / 取单</div>
  112. <div class="submit" v-if="cartTotalNum > 0" @click="doSettlement()">提交结算</div>
  113. <div class="submit" v-if="cartTotalNum == 0" @click="doCashier()">无商品收款</div>
  114. </div>
  115. </div>
  116. </div>
  117. <div class="main-list" v-if="activeMenu == 'cashier'">
  118. <div class="title">
  119. <el-form class="search-form" ref="searchForm" :inline="true" :model="searchForm">
  120. <el-form-item class="form-item" label="" prop="keyword">
  121. <el-input
  122. v-model="searchForm.keyword"
  123. prefix-icon="el-icon-full-screen"
  124. @keyup.enter.native="doQueryGoods"
  125. class="input-item"
  126. placeholder="请输入商品关键字:商品名称、条码、商品ID..."
  127. clearable
  128. maxlength="100"
  129. />
  130. </el-form-item>
  131. <el-button class="search-goods" @click="doQueryGoods()" icon="el-icon-search">
  132. 查询商品
  133. </el-button>
  134. </el-form>
  135. <el-tabs class="tab-box" type="card" v-model="navTab" @tab-click="switchTab">
  136. <el-tab-pane label="全部" name="0"></el-tab-pane>
  137. <el-tab-pane
  138. v-for="tab in tabList"
  139. :label="tab.name"
  140. :key="tab.id + ''"
  141. :name="tab.id + ''"
  142. ></el-tab-pane>
  143. </el-tabs>
  144. </div>
  145. <div class="goods-list">
  146. <div class="goods-item" v-for="goodsInfo in goodsList">
  147. <div class="item" @click="clickGoods(goodsInfo)">
  148. <img class="image" lazy :src="imagePath + goodsInfo.logo" />
  149. <div class="goods-name">{{ goodsInfo.name }}</div>
  150. <div class="goods-price">¥{{ goodsInfo.price }}</div>
  151. </div>
  152. </div>
  153. <pagination
  154. v-show="totalGoods > 0"
  155. :total="totalGoods"
  156. class="pagination"
  157. :page.sync="page"
  158. :limit.sync="pageSize"
  159. @pagination="initCashier"
  160. />
  161. <el-empty v-if="goodsList.length == 0" description="暂无商品..."></el-empty>
  162. </div>
  163. </div>
  164. <!-- 订单列表组件 start-->
  165. <orderList v-if="activeMenu == 'order'" @doPayOrder="doPayOrder"></orderList>
  166. <!-- 订单列表组件 end-->
  167. <!-- 会员列表组件 start-->
  168. <memberList v-if="activeMenu == 'member'"></memberList>
  169. <!-- 会员列表组件 end-->
  170. <!-- 卡券核销组件 start-->
  171. <couponConfirm v-if="activeMenu == 'coupon'"></couponConfirm>
  172. <!-- 卡券核销组件 end-->
  173. </div>
  174. </el-drawer>
  175. <!-- 规格详情 start-->
  176. <el-dialog
  177. title="选择商品规格"
  178. :visible.sync="openGoodsDialog"
  179. class="common-dialog"
  180. append-to-body
  181. >
  182. <div class="goods-info">
  183. <div class="name">{{ goodsInfo.name }}</div>
  184. <div class="price">¥{{ goodsInfo.price }}</div>
  185. <div class="num">
  186. <el-input-number class="input" v-model="goodsNum" :min="1" :max="1000" />
  187. </div>
  188. <div class="spec-list" v-if="goodsInfo.isSingleSpec == 'N'">
  189. <div class="spec-item" v-for="specInfo in goodsInfo.specList">
  190. <div class="spec-name">{{ specInfo.name }}</div>
  191. <div class="values">
  192. <span
  193. v-for="value in specInfo.child"
  194. :class="goodsSpecIds.includes(value.id) ? 'value active' : 'value'"
  195. @click="selectGoodsSpec(value.id)"
  196. >
  197. {{ value.name }}
  198. </span>
  199. </div>
  200. </div>
  201. </div>
  202. </div>
  203. <div slot="footer" class="dialog-footer">
  204. <el-button type="primary" class="main-button" @click="addToCart()">加入结算</el-button>
  205. <el-button @click="closeGoodsDialog()">取 消</el-button>
  206. </div>
  207. </el-dialog>
  208. <!-- 规格详情 end-->
  209. <!--关联会员对话框 start-->
  210. <switchMemberDialog :show-dialog="openSwitchMemberDialog" @doSwitchMember="doSwitchMember" />
  211. <!--关联会员对话框 end-->
  212. <!--关联员工对话框 start-->
  213. <bindStaffDialog
  214. :show-dialog="openBindStaffDialog"
  215. @doBindStaff="doBindStaff"
  216. @closeDialog="closeDialog"
  217. />
  218. <!--关联员工对话框 end-->
  219. <!--结算对话框 start-->
  220. <settlementDialog
  221. :show-dialog="openSettlementDialog"
  222. :memberInfo="memberInfo"
  223. :staffInfo="staffInfo"
  224. :totalPrice="cartTotalPrice"
  225. :remarks="cartRemark"
  226. :orderInfo="orderInfo"
  227. :couponList="couponList"
  228. @submit="submitSettlement"
  229. @switchMember="switchMember"
  230. @bindStaff="bindStaff"
  231. @closeDialog="closeDialog"
  232. />
  233. <!--结算对话框 end-->
  234. <!--扫码付款对话框 start-->
  235. <scanPayCodeDialog
  236. ref="scanPayCodeDialog"
  237. :show-dialog="openScanPayCodeDialog"
  238. :memberInfo="memberInfo"
  239. :orderId="orderId"
  240. :payType="payType"
  241. :payAmount="payAmount"
  242. @closeDialog="closeDialog"
  243. @showPayResult="showPayResult"
  244. />
  245. <!--扫码付款对话框 end-->
  246. <!--支付结果对话框 start-->
  247. <payResultDialog
  248. :show-dialog="openPayResultDialog"
  249. :payResult="payResult"
  250. @showOrderPrint="showOrderPrint"
  251. @closeDialog="closeDialog"
  252. />
  253. <!--支付结果对话框 end-->
  254. <!--打印订单对话框 start-->
  255. <orderPrintDialog
  256. :show-dialog="openOrderPrintDialog"
  257. :storeInfo="storeInfo"
  258. :orderInfo="orderInfo"
  259. @closeDialog="closeDialog"
  260. />
  261. <!--打印订单对话框 end-->
  262. <!--挂单对话框 start-->
  263. <hangUpDialog
  264. :show-dialog="openHangUpDialog"
  265. :memberInfo="memberInfo"
  266. :cartList="cartList"
  267. @getHangNo="getHangNo"
  268. @doHangUp="doHangUp"
  269. @closeDialog="closeDialog"
  270. />
  271. <!--挂单对话框 end-->
  272. <!-- 无商品收款组件 start-->
  273. <noGoodsCashier
  274. :show-dialog="openNoGoodsCashierDialog"
  275. @submit="submitCashier"
  276. @closeDialog="closeDialog"
  277. ></noGoodsCashier>
  278. <!-- 无商品收款组件 end-->
  279. </div>
  280. </template>
  281. <script>
  282. import {
  283. init,
  284. getGoodsInfo,
  285. searchGoods,
  286. getCartList,
  287. saveCart,
  288. removeFromCart,
  289. submitSettlement,
  290. doPay,
  291. getMemberInfoById,
  292. } from '@/api/cashier'
  293. import { getOrderInfo } from '@/api/order'
  294. import { getUserId, setUserId, removeUserId } from '@/utils/auth'
  295. import switchMemberDialog from './components/switchMemberDialog'
  296. import settlementDialog from './components/settlementDialog'
  297. import scanPayCodeDialog from './components/scanPayCodeDialog'
  298. import payResultDialog from './components/payResultDialog'
  299. import orderPrintDialog from './components/orderPrintDialog'
  300. import hangUpDialog from './components/hangUpDialog'
  301. import orderList from './components/orderList'
  302. import memberList from './components/memberList'
  303. import couponConfirm from './components/couponConfirm'
  304. import noGoodsCashier from './components/noGoodsCashier'
  305. import bindStaffDialog from './components/bindStaffDialog'
  306. export default {
  307. name: 'Cashier',
  308. components: {
  309. switchMemberDialog,
  310. settlementDialog,
  311. scanPayCodeDialog,
  312. payResultDialog,
  313. orderPrintDialog,
  314. hangUpDialog,
  315. orderList,
  316. memberList,
  317. couponConfirm,
  318. noGoodsCashier,
  319. bindStaffDialog,
  320. },
  321. data() {
  322. return {
  323. // 系统名称
  324. systemName: process.env.userConfig.SYSTEM_NAME,
  325. // 导航tab
  326. navTab: '0',
  327. isOpen: true,
  328. page: 1,
  329. pageSize: 9,
  330. totalGoods: 0,
  331. openGoodsDialog: false,
  332. openSwitchMemberDialog: false,
  333. openBindStaffDialog: false,
  334. openSettlementDialog: false,
  335. openNoGoodsCashierDialog: false,
  336. openScanPayCodeDialog: false,
  337. openPayResultDialog: false,
  338. openOrderPrintDialog: false,
  339. openHangUpDialog: false,
  340. searchForm: { keyword: '' },
  341. payResult: { isSuccess: false, payAmount: 0, orderId: 0 },
  342. goodsForm: {},
  343. // 左侧菜单
  344. menuList: [
  345. { name: '收银主页', key: 'cashier', logo: require('../../assets/images/menu-cooker1.png') },
  346. { name: '订单管理', key: 'order', logo: require('../../assets/images/menu-cooker2.png') },
  347. { name: '退出', key: 'exit', logo: require('../../assets/images/menu-cooker3.png') },
  348. // { name: '会员管理', key: 'member', logo: require('../../assets/images/hot.png') },
  349. // { name: '卡券核销', key: 'coupon', logo: require('../../assets/images/life.png') }
  350. ],
  351. // 激活菜单
  352. activeMenu: 'cashier',
  353. // 导航栏tab
  354. tabList: [],
  355. // 当前操作会员
  356. memberInfo: null,
  357. // 当前登录用户
  358. accountInfo: {},
  359. // 绑定的员工
  360. staffInfo: null,
  361. // 当前门店信息
  362. storeInfo: {},
  363. // 当前操作商品
  364. goodsInfo: { num: 1, specList: [], skuList: [] },
  365. // 当前选择属性
  366. goodsSpecIds: [],
  367. // 商品数量
  368. goodsNum: 1,
  369. // 当前分类
  370. cateId: 0,
  371. // 图片目录
  372. imagePath: '',
  373. // 商品分类列表
  374. cateList: [],
  375. // 商品列表
  376. goodsList: [],
  377. // 购物车列表
  378. cartList: [],
  379. // 订单列表
  380. orderList: [],
  381. // 总金额
  382. cartTotalPrice: 0,
  383. // 购物车备注
  384. cartRemark: '',
  385. // 总件数
  386. cartTotalNum: 0,
  387. // 支付金额
  388. payAmount: 0,
  389. // 当前订单号
  390. orderId: 0,
  391. // 支付方式
  392. payType: '',
  393. // 当前订单
  394. orderInfo: {},
  395. // 可用卡券列表
  396. couponList: [],
  397. // 挂单序号
  398. hangNo: '',
  399. isSearch: false,
  400. }
  401. },
  402. mounted() {
  403. const app = this
  404. // 监听扫码枪按键
  405. let code = ''
  406. let lastTime, nextTime // 上次时间、最新时间
  407. let lastCode, nextCode // 上次按键、最新按键
  408. document.onkeypress = (e) => {
  409. // 获取按键
  410. if (window.event) {
  411. // IE
  412. nextCode = e.keyCode
  413. } else if (e.which) {
  414. // Netscape/Firefox/Opera
  415. nextCode = e.which
  416. }
  417. // 如果触发了回车事件(扫码结束时间)
  418. if (nextCode === 13) {
  419. if (code.length < 3) {
  420. return
  421. }
  422. if (app.openScanPayCodeDialog == true) {
  423. app.$refs.scanPayCodeDialog.submit(code)
  424. return false
  425. }
  426. if (app.openSwitchMemberDialog == true) {
  427. return false
  428. }
  429. if (app.openSettlementDialog == true) {
  430. app.$alert('请点击确定收款!')
  431. return false
  432. }
  433. if (app.activeMenu == 'cashier') {
  434. app.addToCart(code)
  435. }
  436. code = ''
  437. lastCode = ''
  438. lastTime = ''
  439. return true
  440. }
  441. nextTime = new Date().getTime() // 记录最新时间
  442. if (!lastTime && !lastCode) {
  443. // 如果上次时间和上次按键为空
  444. code += e.key // 执行叠加操作
  445. }
  446. // 如果有上次时间及上次按键
  447. if (lastCode && lastTime && nextTime - lastTime > 30) {
  448. code = e.key
  449. } else if (lastCode && lastTime) {
  450. code += e.key
  451. }
  452. lastCode = nextCode
  453. lastTime = nextTime
  454. return true
  455. }
  456. },
  457. created() {
  458. this.initCashier()
  459. this.getCartList()
  460. },
  461. methods: {
  462. // 初始化数据
  463. initCashier() {
  464. const app = this
  465. const userId = getUserId() > 0 ? getUserId() : 0
  466. init(userId, app.cateId, app.page, app.pageSize)
  467. .then((response) => {
  468. app.cateList = response.data.cateList
  469. app.tabList = response.data.cateList
  470. app.goodsList = response.data.goodsList
  471. app.imagePath = response.data.imagePath
  472. app.storeInfo = response.data.storeInfo
  473. app.accountInfo = response.data.accountInfo
  474. app.memberInfo = response.data.memberInfo
  475. app.totalGoods = response.data.totalGoods
  476. app.loading = false
  477. app.hangNo = ''
  478. app.staffInfo = null
  479. })
  480. .catch((err) => {
  481. app.loading = false
  482. console.log(err.toString())
  483. })
  484. },
  485. // 菜单切换
  486. switchMenu(menuKey) {
  487. this.activeMenu = menuKey
  488. return menuKey
  489. },
  490. // tab切换
  491. switchTab(el) {
  492. this.navTab = el.name
  493. this.filterCate(this.navTab)
  494. },
  495. // 过滤分类商品
  496. filterCate(cateId) {
  497. this.cateId = cateId
  498. this.initCashier()
  499. },
  500. // 购物车列表
  501. getCartList(cartIds) {
  502. const app = this
  503. if (app.loading) {
  504. return false
  505. }
  506. app.loading = true
  507. app.cartList = []
  508. const switchCartIds = cartIds ? cartIds.join(',') : ''
  509. getCartList({ userId: getUserId(), hangNo: app.hangNo, cartIds: switchCartIds })
  510. .then((response) => {
  511. const cartList = response.data.list
  512. if (cartList && cartList.length > 0) {
  513. cartList.forEach(function (item) {
  514. const specList = []
  515. if (item.specList && item.specList.length > 0) {
  516. item.specList.forEach(function (spec) {
  517. specList.push({ name: spec.specName, value: spec.specValue })
  518. })
  519. }
  520. const cartInfo = {
  521. cartId: item.id,
  522. skuId: item.skuId,
  523. goodsId: item.goodsInfo.id,
  524. name: item.goodsInfo.name,
  525. logo: item.goodsInfo.logo,
  526. price: item.goodsInfo.price,
  527. buyNum: item.num,
  528. specList: specList,
  529. }
  530. app.cartList.push(cartInfo)
  531. })
  532. }
  533. app.cartTotalPrice = response.data.payPrice
  534. app.cartTotalNum = response.data.totalNum
  535. app.couponList = response.data.couponList
  536. app.loading = false
  537. })
  538. .catch((err) => {
  539. app.loading = false
  540. console.log(err.toString())
  541. })
  542. },
  543. // 查询商品
  544. doQueryGoods() {
  545. const app = this
  546. if (!app.searchForm.keyword) {
  547. app.initCashier()
  548. return false
  549. }
  550. app.loading = true
  551. searchGoods({ keyword: app.searchForm.keyword })
  552. .then((response) => {
  553. app.loading = false
  554. if (response.data && response.data.length > 0) {
  555. app.goodsList = response.data
  556. } else {
  557. app.$alert('抱歉,未查询到商品信息!')
  558. return false
  559. }
  560. })
  561. .catch((err) => {
  562. app.loading = false
  563. console.log(err.toString())
  564. })
  565. },
  566. // 点击商品规格弹框
  567. clickGoods(goodsInfo) {
  568. const app = this
  569. if (app.loading) {
  570. return false
  571. }
  572. app.loading = true
  573. getGoodsInfo(goodsInfo.id)
  574. .then((response) => {
  575. app.goodsInfo = response.data.goodsInfo
  576. app.goodsInfo.specList = response.data.specList
  577. app.goodsInfo.skuList = response.data.skuList
  578. app.goodsNum = 1
  579. app.loading = false
  580. if (app.goodsInfo.isSingleSpec == 'N') {
  581. app.openGoodsDialog = true
  582. } else {
  583. app.addToCart(false)
  584. }
  585. })
  586. .catch((err) => {
  587. app.loading = false
  588. console.log(err.toString())
  589. })
  590. },
  591. // 关闭规格弹框
  592. closeGoodsDialog() {
  593. this.openGoodsDialog = false
  594. },
  595. // 选择商品属性
  596. selectGoodsSpec(specId) {
  597. const app = this
  598. let specIds = []
  599. app.goodsInfo.specList.forEach(function () {
  600. specIds.push(0)
  601. })
  602. app.goodsInfo.specList.forEach(function (specItem, index) {
  603. const children = []
  604. specItem.child.forEach(function (child) {
  605. children.push(child.id)
  606. })
  607. if (children.includes(specId)) {
  608. specIds[index] = specId
  609. } else {
  610. specIds[index] = app.goodsSpecIds[index] == undefined ? 0 : app.goodsSpecIds[index]
  611. }
  612. })
  613. app.goodsSpecIds = specIds
  614. },
  615. // 加入购物车
  616. addToCart(skuNo) {
  617. const app = this
  618. app.isSearch = false
  619. // 扫码枪扫描商品条码,直接加入购物车
  620. if (skuNo) {
  621. searchGoods({ keyword: skuNo })
  622. .then((response) => {
  623. app.loading = false
  624. if (response.data && response.data.length > 0) {
  625. app.clickGoods(response.data[0])
  626. app.isSearch = true
  627. return false
  628. } else {
  629. app.$alert('抱歉,未查询到商品信息!')
  630. return false
  631. }
  632. })
  633. .catch((err) => {
  634. app.loading = false
  635. console.log(err.toString())
  636. })
  637. }
  638. if (app.loading || app.isSearch || !app.goodsInfo.id || app.goodsNum <= 0) {
  639. return false
  640. }
  641. const specIds = app.goodsSpecIds.join('-')
  642. let skuId = 0
  643. app.goodsInfo.skuList.forEach(function (skuInfo) {
  644. if (skuInfo.specIds == specIds) {
  645. skuId = skuInfo.id
  646. }
  647. })
  648. if (app.goodsInfo.isSingleSpec == 'N' && skuId <= 0) {
  649. app.$alert('请先确认商品规格!')
  650. return false
  651. }
  652. // 添加到购物车
  653. const cartInfo = {
  654. goodsId: app.goodsInfo.id,
  655. name: app.goodsInfo.name,
  656. logo: app.goodsInfo.logo,
  657. price: app.goodsInfo.price,
  658. skuId: skuId,
  659. userId: getUserId(),
  660. hangNo: app.hangNo,
  661. buyNum: app.goodsNum,
  662. }
  663. app.loading = true
  664. saveCart(cartInfo)
  665. .then((response) => {
  666. app.loading = false
  667. if (response.data.cartId) {
  668. app.getCartList()
  669. app.openGoodsDialog = false
  670. app.goodsSpecIds = []
  671. app.goodsNum = 0
  672. }
  673. })
  674. .catch((err) => {
  675. app.loading = false
  676. console.log(err.toString())
  677. })
  678. },
  679. // 删除购物车
  680. removeFromCart(cartId) {
  681. const app = this
  682. removeFromCart({ cartId: [cartId], userId: getUserId() })
  683. .then((response) => {
  684. if (response.data) {
  685. app.getCartList()
  686. }
  687. })
  688. .catch((err) => {
  689. app.loading = false
  690. console.log(err.toString())
  691. })
  692. },
  693. // 购物车数量变化
  694. changeBuyNum(cartInfo) {
  695. const app = this
  696. const param = {
  697. goodsId: cartInfo.goodsId,
  698. skuId: cartInfo.skuId,
  699. cartId: cartInfo.cartId,
  700. action: '=',
  701. userId: app.memberInfo ? app.memberInfo.id : null,
  702. hangNo: app.hangNo,
  703. buyNum: cartInfo.buyNum,
  704. }
  705. app.loading = true
  706. saveCart(param)
  707. .then((response) => {
  708. app.loading = false
  709. if (response.data.cartId) {
  710. app.getCartList()
  711. app.openGoodsDialog = false
  712. app.goodsSpecIds = []
  713. }
  714. })
  715. .catch(() => {
  716. app.loading = false
  717. app.getCartList()
  718. })
  719. },
  720. // 弹出关联会员
  721. switchMember() {
  722. this.openSwitchMemberDialog = true
  723. },
  724. // 弹出关联员工
  725. bindStaff() {
  726. this.openBindStaffDialog = true
  727. },
  728. // 确认关联会员
  729. doSwitchMember(memberInfo) {
  730. this.openSwitchMemberDialog = false
  731. if (memberInfo != 0) {
  732. this.memberInfo = memberInfo
  733. if (memberInfo) {
  734. let cartIds = []
  735. if (this.cartList && this.cartList.length > 0) {
  736. this.cartList.forEach(function (cart) {
  737. cartIds.push(cart.cartId)
  738. })
  739. }
  740. setUserId(memberInfo.id)
  741. this.getCartList(cartIds)
  742. } else {
  743. removeUserId()
  744. this.getCartList()
  745. }
  746. }
  747. },
  748. // 确认绑定员工
  749. doBindStaff(staff) {
  750. this.openBindStaffDialog = false
  751. this.staffInfo = staff
  752. },
  753. // 退出登录
  754. logout() {
  755. this.$router.push('/')
  756. },
  757. // 发起结算
  758. doSettlement() {
  759. if (this.cartList.length < 1) {
  760. this.$alert('请先添加结算商品!')
  761. return false
  762. }
  763. this.getCartList()
  764. this.orderInfo = {}
  765. this.openSettlementDialog = true
  766. },
  767. // 无商品结算
  768. doCashier() {
  769. this.orderInfo = {}
  770. this.openNoGoodsCashierDialog = true
  771. },
  772. // 提交结算
  773. submitCashier(param) {
  774. this.orderInfo = {}
  775. this.openSettlementDialog = true
  776. this.cartTotalPrice = parseFloat(param.amount)
  777. this.cartRemark = param.remark
  778. this.openNoGoodsCashierDialog = false
  779. },
  780. // 确认结算
  781. submitSettlement(param) {
  782. const app = this
  783. // 已生成的订单支付
  784. if (app.orderInfo.id) {
  785. // 微信、支付宝支付
  786. if (param.payType == 'MICROPAY' || param.payType == 'ALISCAN') {
  787. app.payAmount = app.orderInfo.payAmount
  788. app.orderId = app.orderInfo.id
  789. app.openScanPayCodeDialog = true
  790. app.openSettlementDialog = false
  791. app.payType = param.payType
  792. }
  793. // 现金、余额支付
  794. if (param.payType == 'CASH' || param.payType == 'BALANCE') {
  795. doPay({
  796. orderId: app.orderId,
  797. payType: param.payType,
  798. cashierPayAmount: param.totalPrice,
  799. cashierDiscountAmount: param.discountPrice,
  800. userId: getUserId(),
  801. }).then((response) => {
  802. app.openSettlementDialog = false
  803. if (response.data.orderInfo.payStatus == 'B') {
  804. app.showPayResult({
  805. isSuccess: true,
  806. payAmount: response.data.orderInfo.payAmount,
  807. orderId: response.data.orderInfo.id,
  808. })
  809. } else {
  810. app.$alert(response.data.message ? response.data.message : '抱歉,订单操作异常!')
  811. }
  812. })
  813. }
  814. return false
  815. }
  816. // 购物车提交结算
  817. let cartIds = []
  818. app.cartList.forEach(function (cart) {
  819. cartIds.push(cart.cartId)
  820. })
  821. const data = {
  822. cashierPayAmount: param.totalPrice,
  823. cashierDiscountAmount: param.discountPrice,
  824. cartIds: cartIds.join(','),
  825. orderMode: 'oneself',
  826. payType: param.payType,
  827. remark: param.remark,
  828. type: app.cartList.length > 0 ? 'goods' : 'payment',
  829. couponId: param.userCouponId ? param.userCouponId : 0,
  830. userId: getUserId(),
  831. staffId: app.staffInfo ? app.staffInfo.id : 0,
  832. }
  833. if (app.loading) {
  834. return false
  835. }
  836. app.loading = true
  837. submitSettlement(data)
  838. .then((response) => {
  839. app.loading = false
  840. app.doSwitchMember(null)
  841. app.initCashier()
  842. app.getCartList()
  843. // 微信支付,弹出扫码框
  844. if (response.data.orderInfo.payType == 'MICROPAY' || param.payType == 'ALISCAN') {
  845. app.payAmount = response.data.orderInfo.payAmount
  846. app.orderId = response.data.orderInfo.id
  847. app.openScanPayCodeDialog = true
  848. app.openSettlementDialog = false
  849. app.payType = param.payType
  850. return false
  851. }
  852. // 现金、余额支付
  853. if (
  854. response.data.orderInfo.payType == 'CASH' ||
  855. response.data.orderInfo.payType == 'BALANCE'
  856. ) {
  857. app.openSettlementDialog = false
  858. if (response.data.orderInfo.payStatus == 'B') {
  859. app.showPayResult({
  860. isSuccess: true,
  861. payAmount: response.data.orderInfo.payAmount,
  862. orderId: response.data.orderInfo.id,
  863. })
  864. } else {
  865. app.$alert(response.data.message)
  866. }
  867. return false
  868. }
  869. if (response.code == '201') {
  870. app.$alert(response.data.message)
  871. }
  872. return false
  873. })
  874. .catch((err) => {
  875. app.loading = false
  876. console.log(err.toString())
  877. })
  878. },
  879. // 点击挂单/取单
  880. hangUp() {
  881. this.openHangUpDialog = true
  882. },
  883. // 取单
  884. getHangNo(data) {
  885. this.openHangUpDialog = false
  886. this.hangNo = data.hangNo
  887. this.getCartList()
  888. // 关联会员信息
  889. if (data.hangNo && data.hangNo.length > 0) {
  890. this.doSwitchMember(data.memberInfo)
  891. }
  892. },
  893. // 执行挂单
  894. doHangUp() {
  895. this.hangNo = ''
  896. this.getCartList()
  897. removeUserId()
  898. this.memberInfo = null
  899. },
  900. // 关闭对话框
  901. closeDialog(dialog) {
  902. if (dialog == 'settlementDialog') {
  903. this.openSettlementDialog = false
  904. } else if (dialog == 'switchMemberDialog') {
  905. this.openSwitchMemberDialog = false
  906. } else if (dialog == 'scanPayCodeDialog') {
  907. this.openScanPayCodeDialog = false
  908. } else if (dialog == 'payResultDialog') {
  909. this.openPayResultDialog = false
  910. } else if (dialog == 'printOrder') {
  911. this.openOrderPrintDialog = false
  912. } else if (dialog == 'hangUpDialog') {
  913. this.openHangUpDialog = false
  914. } else if (dialog == 'openNoGoodsCashierDialog') {
  915. this.openNoGoodsCashierDialog = false
  916. } else if (dialog == 'openBindStaffDialog') {
  917. this.openBindStaffDialog = false
  918. }
  919. },
  920. // 展示支付结果
  921. showPayResult(payResult) {
  922. this.payResult = payResult
  923. this.openPayResultDialog = true
  924. },
  925. // 订单支付
  926. doPayOrder(orderInfo) {
  927. const app = this
  928. app.navTab = 0
  929. app.payAmount = orderInfo.amount
  930. app.orderId = orderInfo.id
  931. app.orderInfo = orderInfo
  932. let userId = 0
  933. if (orderInfo.isVisitor !== 'Y') {
  934. userId = app.orderInfo.userInfo.id
  935. }
  936. getMemberInfoById(userId)
  937. .then((response) => {
  938. if (response.data.memberInfo) {
  939. app.memberInfo = response.data.memberInfo
  940. } else {
  941. app.memberInfo = null
  942. }
  943. })
  944. .catch((err) => {
  945. app.loading = false
  946. console.log(err.toString())
  947. })
  948. app.doSwitchMember(app.memberInfo)
  949. app.openSettlementDialog = true
  950. },
  951. // 打印小票
  952. showOrderPrint(orderId) {
  953. const app = this
  954. getOrderInfo(orderId)
  955. .then((response) => {
  956. if (response.data.orderInfo) {
  957. app.orderInfo = response.data.orderInfo
  958. app.openOrderPrintDialog = true
  959. }
  960. })
  961. .catch((err) => {
  962. app.loading = false
  963. console.log(err.toString())
  964. })
  965. },
  966. // 确认关闭
  967. handleClose() {
  968. return false
  969. },
  970. },
  971. }
  972. </script>
  973. <style lang="scss" scoped>
  974. .main {
  975. height: 100%;
  976. width: 100%;
  977. display: flex;
  978. flex-direction: row;
  979. .pagination {
  980. position: fixed;
  981. bottom: 10px;
  982. height: 50px;
  983. min-width: 750px;
  984. line-height: 50px;
  985. right: 10px;
  986. margin-top: 10px;
  987. display: block;
  988. background: #6c757d;
  989. color: #ffffff;
  990. border-radius: 5px;
  991. z-index: 99999;
  992. }
  993. .top-nav {
  994. display: block;
  995. clear: both;
  996. height: 45px;
  997. width: 100%;
  998. background: #f5f5f5;
  999. border-bottom: #cccccc solid 1px;
  1000. position: absolute;
  1001. padding: 10px 0px 0px 40px;
  1002. top: 0;
  1003. }
  1004. .left-side {
  1005. width: 160px;
  1006. height: 100%;
  1007. // background: #113a28;
  1008. border-right: #888888 solid 2px;
  1009. position: absolute;
  1010. left: 0;
  1011. top: 45px;
  1012. padding: 0px;
  1013. // color: #ffffff;
  1014. overflow-x: hidden;
  1015. overflow-y: auto;
  1016. display: block;
  1017. text-align: center;
  1018. .logo {
  1019. height: 90px;
  1020. padding: 20px 12px 10px 12px;
  1021. font-weight: bold;
  1022. .logout {
  1023. float: left;
  1024. height: 20px;
  1025. line-height: 20px;
  1026. text-align: left;
  1027. width: 100%;
  1028. cursor: pointer;
  1029. }
  1030. .store {
  1031. font-size: 12px;
  1032. }
  1033. .account {
  1034. font-size: 12px;
  1035. border: solid 2px #ffffff;
  1036. background: #6c757d;
  1037. cursor: pointer;
  1038. margin-top: 6px;
  1039. padding: 2px;
  1040. border-radius: 2px;
  1041. }
  1042. }
  1043. .cate {
  1044. text-align: center;
  1045. margin-left: 14px;
  1046. margin-top: 10px;
  1047. .nav {
  1048. list-style: none;
  1049. display: block;
  1050. margin: 0px;
  1051. padding: 5px;
  1052. text-align: center;
  1053. .nav-item {
  1054. margin-top: 20px;
  1055. font-size: 14px;
  1056. width: 120px;
  1057. text-align: center;
  1058. .nav-link {
  1059. position: relative;
  1060. padding: 0.5356875rem 0.9375rem;
  1061. white-space: nowrap;
  1062. text-align: center;
  1063. font-weight: 600;
  1064. color: #666666;
  1065. display: flex;
  1066. align-items: center;
  1067. flex-direction: column;
  1068. justify-content: center;
  1069. border-radius: 5px;
  1070. transition: color 0.2s linear;
  1071. background: #f5f5f5;
  1072. border: 2px solid #ffffff;
  1073. .cate-logo {
  1074. display: block;
  1075. width: 50px;
  1076. height: 50px;
  1077. }
  1078. }
  1079. .active {
  1080. font-weight: bold;
  1081. border: 4px #ff5b57 solid;
  1082. }
  1083. }
  1084. }
  1085. }
  1086. }
  1087. .cart-container {
  1088. width: 310px;
  1089. height: 100%;
  1090. background: #ffffff;
  1091. display: block;
  1092. position: absolute;
  1093. left: 165px;
  1094. top: 45px;
  1095. overflow-x: hidden;
  1096. overflow-y: auto;
  1097. border: #cccccc solid 1px;
  1098. .title {
  1099. height: 70px;
  1100. width: 310px;
  1101. // background: #6c757d;
  1102. border-bottom: #cccccc 1px solid;
  1103. // color: #ffffff;
  1104. padding-top: 16px;
  1105. padding-left: 1px;
  1106. display: block;
  1107. position: fixed;
  1108. top: 45px;
  1109. z-index: 999;
  1110. clear: both;
  1111. .logo {
  1112. float: left;
  1113. font-size: 24px;
  1114. .avatar {
  1115. width: 30px;
  1116. height: 30px;
  1117. border-radius: 40px;
  1118. margin: 5px 0px 5px 5px;
  1119. }
  1120. }
  1121. .member-info {
  1122. float: left;
  1123. margin-top: 5px;
  1124. .name {
  1125. margin-left: 2px;
  1126. margin-right: 3px;
  1127. }
  1128. .none {
  1129. margin-left: 2px;
  1130. margin-right: 5px;
  1131. font-size: 13px;
  1132. }
  1133. .switch {
  1134. padding: 8px 8px 8px 4px;
  1135. }
  1136. }
  1137. }
  1138. .carts {
  1139. display: block;
  1140. width: 100%;
  1141. color: #666666;
  1142. margin-bottom: 120px;
  1143. margin-top: 70px;
  1144. padding: 0px;
  1145. .tab {
  1146. width: 50%;
  1147. .cart-list {
  1148. margin-bottom: 60px;
  1149. .cart-item {
  1150. border-bottom: dashed 1px #cccccc;
  1151. height: 110px;
  1152. width: 310px;
  1153. padding-top: 5px;
  1154. .image {
  1155. width: 50px;
  1156. height: 50px;
  1157. margin-left: 5px;
  1158. border-radius: 5px;
  1159. border: solid 1px #ccc;
  1160. float: left;
  1161. margin-top: 20px;
  1162. }
  1163. .info {
  1164. float: left;
  1165. padding-left: 5px;
  1166. margin-top: 5px;
  1167. .name {
  1168. font-weight: bold;
  1169. font-size: 12px;
  1170. width: 160px;
  1171. max-height: 30px;
  1172. overflow: hidden;
  1173. display: -webkit-box;
  1174. -webkit-box-orient: vertical;
  1175. -webkit-line-clamp: 2;
  1176. }
  1177. .spec {
  1178. font-size: 12px;
  1179. width: 160px;
  1180. height: 20px;
  1181. margin-top: 2px;
  1182. .item {
  1183. margin-right: 2px;
  1184. border-radius: 5px;
  1185. text-align: center;
  1186. max-width: 50px;
  1187. height: 20px;
  1188. line-height: 20px;
  1189. float: left;
  1190. display: block;
  1191. overflow: hidden;
  1192. color: #606266;
  1193. cursor: pointer;
  1194. background: #cceeee;
  1195. padding: 0px 3px 0px 3px;
  1196. white-space: nowrap;
  1197. text-overflow: ellipsis;
  1198. }
  1199. }
  1200. .input {
  1201. width: 120px;
  1202. margin-top: 2px;
  1203. }
  1204. }
  1205. .option {
  1206. float: right;
  1207. text-align: right;
  1208. margin-right: 10px;
  1209. .remove {
  1210. font-size: 12px;
  1211. cursor: pointer;
  1212. }
  1213. .total {
  1214. margin-top: 10px;
  1215. font-size: 16px;
  1216. color: #ff5b57;
  1217. }
  1218. }
  1219. }
  1220. }
  1221. .empty {
  1222. margin-top: 200px;
  1223. width: 310px;
  1224. }
  1225. }
  1226. }
  1227. .footer {
  1228. position: fixed;
  1229. z-index: 999;
  1230. bottom: 0;
  1231. height: 120px;
  1232. width: 100%;
  1233. padding-top: 5px;
  1234. padding-right: 15px;
  1235. display: block;
  1236. width: 310px;
  1237. .number {
  1238. float: right;
  1239. margin: 5px;
  1240. font-size: 13px;
  1241. .total-price {
  1242. margin-top: 3px;
  1243. .num {
  1244. color: #ff5b57;
  1245. font-size: 20px;
  1246. }
  1247. }
  1248. }
  1249. .options {
  1250. text-align: center;
  1251. cursor: pointer;
  1252. float: right;
  1253. color: #ffffff;
  1254. .cash {
  1255. float: left;
  1256. height: 50px;
  1257. // border: solid 1px #113a28;
  1258. padding-top: 15px;
  1259. width: 135px;
  1260. border-radius: 5px;
  1261. // background: #113a28;
  1262. font-weight: bold;
  1263. }
  1264. .submit {
  1265. float: left;
  1266. height: 50px;
  1267. border: solid 1px #ff5b57;
  1268. margin-left: 10px;
  1269. padding-top: 15px;
  1270. width: 135px;
  1271. border-radius: 5px;
  1272. background: #ff5b57;
  1273. font-weight: bold;
  1274. }
  1275. }
  1276. }
  1277. }
  1278. .main-list {
  1279. height: 100%;
  1280. width: 100%;
  1281. min-width: 760px;
  1282. margin-left: 475px;
  1283. margin-right: 2px;
  1284. overflow: auto;
  1285. display: block;
  1286. background: #ffffff;
  1287. margin-bottom: 10px;
  1288. .title {
  1289. position: fixed;
  1290. height: 106px;
  1291. width: calc(100% - 465px);
  1292. min-width: 700px;
  1293. background: #ffffff;
  1294. padding: 5px;
  1295. color: red;
  1296. top: 45px;
  1297. .search-form {
  1298. height: 50px;
  1299. .form-item {
  1300. margin-right: -2px;
  1301. }
  1302. .input-item {
  1303. min-width: 456px;
  1304. }
  1305. .search-goods {
  1306. height: 50px;
  1307. background: #f67f20;
  1308. color: #fff;
  1309. }
  1310. }
  1311. .tab-box {
  1312. margin-top: 3px;
  1313. width: 100%;
  1314. }
  1315. }
  1316. .goods-list {
  1317. height: 100%;
  1318. width: 100%;
  1319. margin-top: 148px;
  1320. margin-left: 2px;
  1321. margin-bottom: 200px;
  1322. .goods-item {
  1323. width: 33.3%;
  1324. min-height: 300px;
  1325. min-width: 220px;
  1326. padding: 3px;
  1327. float: left;
  1328. background: #ffffff;
  1329. text-align: left;
  1330. cursor: pointer;
  1331. .item {
  1332. background: #ffffff;
  1333. padding: 5px;
  1334. border-radius: 5px;
  1335. border: solid 1px #cccccc;
  1336. margin: 0px;
  1337. .goods-name {
  1338. margin-top: 10px;
  1339. font-size: 18px;
  1340. color: #666666;
  1341. height: 30px;
  1342. overflow: hidden;
  1343. white-space: nowrap;
  1344. text-overflow: ellipsis;
  1345. }
  1346. .goods-price {
  1347. color: #ff5b57;
  1348. font-size: 18px;
  1349. font-weight: bold;
  1350. }
  1351. .image {
  1352. width: 100%;
  1353. height: 220px;
  1354. border-radius: 3px;
  1355. }
  1356. }
  1357. }
  1358. }
  1359. }
  1360. }
  1361. .goods-info {
  1362. border: solid 1px #ccc;
  1363. padding: 30px;
  1364. border-radius: 5px;
  1365. .name {
  1366. height: 40px;
  1367. font-weight: bold;
  1368. font-size: 20px;
  1369. }
  1370. .price {
  1371. height: 40px;
  1372. color: #ff5b57;
  1373. font-size: 16px;
  1374. }
  1375. .spec-list {
  1376. border: solid 1px #ccc;
  1377. padding: 20px;
  1378. margin-top: 10px;
  1379. border-radius: 6px;
  1380. .spec-item {
  1381. margin-bottom: 20px;
  1382. .spec-name {
  1383. font-weight: bold;
  1384. font-size: 16px;
  1385. }
  1386. .values {
  1387. display: block;
  1388. padding-top: 10px;
  1389. margin-left: 0px;
  1390. padding-left: 0px;
  1391. font-size: 12px;
  1392. .value {
  1393. border: solid 1px #cceeee;
  1394. margin-right: 10px;
  1395. padding: 8px 15px 5px 15px;
  1396. cursor: pointer;
  1397. border-radius: 4px;
  1398. background: rgba(0, 172, 172, 0.1);
  1399. color: #666666;
  1400. }
  1401. .active {
  1402. border: solid 1px #ff5891;
  1403. background: #ff5b57;
  1404. color: #ffffff;
  1405. }
  1406. }
  1407. }
  1408. }
  1409. }
  1410. </style>
  1411. <style scoped>
  1412. .input-item >>> .el-input__inner {
  1413. border: #e6e6e6 solid 1px;
  1414. line-height: 50px;
  1415. height: 50px;
  1416. }
  1417. .form-item >>> .el-form-item__label {
  1418. line-height: 50px;
  1419. height: 50px;
  1420. }
  1421. .el-tabs--border-card {
  1422. box-shadow: none;
  1423. border: none;
  1424. }
  1425. ::v-deep .el-tabs--border-card > .el-tabs__content {
  1426. padding: 0px;
  1427. }
  1428. ::v-deep .el-pagination.is-background span {
  1429. color: #fff;
  1430. }
  1431. </style>