index.vue 41 KB

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