index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857
  1. <template>
  2. <view class="index-page">
  3. <u-sticky bgColor="#fff" class="tabs-wrap">
  4. <u-tabs
  5. class="tabs"
  6. :list="tabs"
  7. :itemStyle="itemStyle"
  8. :is-scroll="false"
  9. :current="params.active"
  10. @change="handTabhange">
  11. </u-tabs>
  12. </u-sticky>
  13. <view class="content-wrap" v-if="params.active == 0" style="padding-top: 20rpx;">
  14. <view class="list-scroll-wrap">
  15. <item v-for="item in orderList" @loadOrder="loadOrder" :item="item" :key="item.id"/>
  16. </view>
  17. </view>
  18. <view class="content-wrap" v-if="params.active == 1">
  19. <view class="auto-taking-order">
  20. <view class="label">自动接单</view>
  21. <switch :checked="autoTaking" @change="handAutoTakingChange" color="#007AFF" class="switch" style="transform:scale(0.7)"></switch>
  22. </view>
  23. <view class="list-scroll-wrap">
  24. <item v-for="item in orderList" @loadOrder="loadOrder" :item="item" :key="item.id"/>
  25. </view>
  26. </view>
  27. <view class="content-wrap color-white" v-if="params.active == 2">
  28. <view class="scan-code" @click="saoma">
  29. <view class="label">扫码完成快速出餐</view>
  30. <u-icon name="scan" size="24" color="#666"></u-icon>
  31. </view>
  32. <view class="take-food-wrap">
  33. <view class="item" v-for="item in takeFoods" :key="item.date">
  34. <view class="item-date">
  35. {{ item.date }} ({{ item.list && item.list.length }})
  36. </view>
  37. <view class="item-food-no" v-for="no in item.list" :key="no.orderId">
  38. <view class="label">
  39. 取餐号: {{ no.takeupCode }}
  40. </view>
  41. <view class="btn" @click="handComfirmTakeFoodOut(no)">确认出餐</view>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <view class="content-wrap color-white h70" v-if="params.active == 3">
  47. <view class="scan-code">
  48. <input placeholder="请扫码或者输入取餐号" placeholder-class="input-placeholder" @input="inputChange" :value="searchValue" @blur="loadData" class="label"/>
  49. <u-icon name="scan" size="24" color="#666" @click="saoma"></u-icon>
  50. </view>
  51. <view class="take-food-wrap">
  52. <view class="item" v-for="item in takeFoods" :key="item.date">
  53. <view class="item-date">
  54. {{ item.date }} ({{ item.list && item.list.length }})
  55. </view>
  56. <view class="item-food-no" :style="{ backgroundImage: no.orderType == 4 ? 'linear-gradient(90.69deg, rgba(255,136,5,0.91) 0.28%,rgba(249,214,176,0.52) 0.28%,rgba(255,255,255,1) 98.81%);' : '' }" v-for="no in item.list" :key="no.orderId">
  57. <view class="label">
  58. <view class="top">
  59. {{ no.orderType == 3 ? '自取餐号' : '堂吃餐号' }}: {{ no.takeupCode }}
  60. </view>
  61. <view class="btm">
  62. {{ no.orderName }} {{ no.orderTel }}
  63. </view>
  64. </view>
  65. <view class="btn" @click="handComfirmPickOut(no)">确认自取</view>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. <view class="content">
  71. <ithui-bullet-two v-if="notice.redirect === 1" v-model="show" :content="notice.content" :title="notice.title"
  72. buttonText="去参加" :closeOnClickOverlay="true"
  73. @confirm="e=>{goToActivity()}" @cancel="e=>{confirm()}" @close="e=>{confirm()}" />
  74. <ithui-bullet-two v-else v-model="show" :content="notice.content" :title="notice.title" :showButton="false"
  75. :closeOnClickOverlay="true"
  76. @cancel="e=>{confirm()}" @close="e=>{confirm()}" />
  77. </view>
  78. <view v-if="bindFlag">
  79. <button class="float-button" hover-class="hover-btn-bg" @click="navToBind()">
  80. <!-- <uni-icons type="mic" size="40px" color="#fff" /> -->
  81. <span style="color: #fff;">绑定</span>
  82. </button>
  83. </view>
  84. </view>
  85. </template>
  86. <script>
  87. import item from '@/pages/components/order.vue'
  88. import ithuiBulletTwo from '@/components/ithui-bullet/ithui-bullet-two';
  89. import {mapState} from 'vuex';
  90. export default {
  91. name: 'Home',
  92. components: {
  93. item,
  94. ithuiBulletTwo
  95. },
  96. data () {
  97. return {
  98. listUrl: '/storeOrderApi/getOrderListForStore',
  99. updateUrl: '/storeOrderApi/updateStoreAutoGo',
  100. autoGoUrl: '/storeOrderApi/getStoreAutoGo',
  101. confirmUrl: '/storeOrderApi/confirmOrder',
  102. pickUrl: '/storeOrderApi/selfPickUp',
  103. checkCodeUrl: '/storeOrderApi/checkCode',
  104. noticeUrl: '/storeNoticeApi/getNotice',
  105. checkBindGzhUrl: '/storeUserLoginApi/checkWxBind',
  106. params: {
  107. active: 1,
  108. },
  109. autoTaking: false,
  110. itemStyle: {
  111. width: '25vw',
  112. height: '80rpx',
  113. fontSize: '28rpx',
  114. },
  115. tabs: [
  116. {
  117. name: '预约单',
  118. value: 0,
  119. badge: {
  120. value: 0,
  121. }
  122. },
  123. {
  124. name: '待接单',
  125. value: 10,
  126. badge: {
  127. value: 0,
  128. }
  129. },
  130. {
  131. name: '待出餐',
  132. value: 20,
  133. badge: {
  134. value: 0,
  135. }
  136. },
  137. {
  138. name: '待自取',
  139. value: 50,
  140. badge: {
  141. value: 0,
  142. }
  143. }
  144. ],
  145. orderList: [],
  146. takeFoods: [],
  147. searchValue: '',
  148. intervalId: null,
  149. bindIntervalId: null,
  150. handle: false,
  151. show: false,
  152. notice: {},
  153. errorMsg: '',
  154. bindFlag: true
  155. }
  156. },
  157. computed: {
  158. ...mapState(['storeInfo'])
  159. },
  160. created(){
  161. this.bindDataRefreh();
  162. this.dataRefreh();
  163. },
  164. onHide() {
  165. // 销毁组件之前,清除计时器
  166. this.clear();
  167. this.bindClear();
  168. },
  169. methods: {
  170. navToBind(url) {
  171. uni.navigateTo({
  172. url: `/pages/tools/bind`
  173. })
  174. },
  175. // bindload (detail) {
  176. // console.log(detail);
  177. // },
  178. // binderror (detail) {
  179. // console.log(detail);
  180. // },
  181. // tab切换
  182. handTabhange (e) {
  183. this.params.active = e.index
  184. this.orderList = [];
  185. this.takeFoods = [];
  186. this.loadData()
  187. },
  188. handSwiperChange (e) {
  189. this.params.active = e.detail.current
  190. },
  191. loadOrder (msg) {
  192. this.loadData(msg)
  193. },
  194. // 自动接单切换
  195. handAutoTakingChange (e) {
  196. if (this.handle) {
  197. return;
  198. }
  199. this.handle = true;
  200. this.autoTaking = e.detail.value
  201. var dateStr = (new Date()).getTime();
  202. var sign = this.getSign(dateStr);
  203. this.requst({
  204. url: this.updateUrl,
  205. data: {
  206. timestamp: dateStr,
  207. sign: sign,
  208. storeId: this.storeInfo.storeId,
  209. autoGo: this.autoTaking ? 1 : 0
  210. },
  211. success: res => {
  212. this.handle = false;
  213. this.loadData()
  214. },
  215. fail: (e) => {
  216. console.log("接口调用失败:" + JSON.stringify(e));
  217. this.handle = false;
  218. },
  219. });
  220. },
  221. inputChange(e) {
  222. this.searchValue = e.detail.value
  223. },
  224. // 定时刷新数据函数
  225. dataRefreh() {
  226. // 计时器正在进行中,退出函数
  227. if (this.intervalId != null) {
  228. return;
  229. }
  230. // 计时器为空,操作
  231. this.intervalId = setInterval(() => {
  232. this.loadData();
  233. }, 60000);
  234. },
  235. // 停止定时器
  236. clear() {
  237. if (this.intervalId) {
  238. clearInterval(this.intervalId);//清除计时器
  239. this.intervalId = null; //设置为null
  240. }
  241. },
  242. // 定时刷新数据函数
  243. bindDataRefreh() {
  244. // 计时器正在进行中,退出函数
  245. if (this.bindIntervalId != null) {
  246. return;
  247. }
  248. // 计时器为空,操作
  249. this.bindIntervalId = setInterval(() => {
  250. this.checkBindGzh();
  251. }, 30000);
  252. },
  253. // 停止定时器
  254. bindClear() {
  255. if (this.bindIntervalId) {
  256. clearInterval(this.bindIntervalId);//清除计时器
  257. this.bindIntervalId = null; //设置为null
  258. }
  259. },
  260. handComfirmTakeFoodOut (e) {
  261. let that = this
  262. uni.showModal({
  263. title: '提示',
  264. content: '是否将该订单标记为已出餐?',
  265. success: function (r) {
  266. if (r.confirm) {
  267. that.handComfirmTakeFood(e);
  268. } else if (r.cancel) {
  269. }
  270. }
  271. })
  272. },
  273. // 确认出餐
  274. handComfirmTakeFood (e) {
  275. if (this.handle) {
  276. return;
  277. }
  278. this.handle = true;
  279. uni.showLoading({
  280. title: '加载中'
  281. })
  282. var dateStr = (new Date()).getTime();
  283. var sign = this.getSign(dateStr);
  284. this.requst({
  285. url: this.confirmUrl,
  286. data: {
  287. timestamp: dateStr,
  288. sign: sign,
  289. orderId: e.orderId,
  290. },
  291. success: res => {
  292. this.handle = false;
  293. if (res.data.rtnBean.rtnCode == 0) {
  294. uni.hideLoading();
  295. if (res.data.rtnBean.rtnMsg != '') {
  296. this.loadData(res.data.rtnBean.rtnMsg);
  297. } else {
  298. this.loadData('出餐成功');
  299. }
  300. } else {
  301. uni.hideLoading();
  302. if (res.data.rtnBean.rtnMsg != '') {
  303. this.$api.msg(res.data.rtnBean.rtnMsg);
  304. }
  305. }
  306. },
  307. fail: (e) => {
  308. uni.hideLoading()
  309. console.log("接口调用失败:" + JSON.stringify(e));
  310. this.handle = false;
  311. },
  312. });
  313. },
  314. handComfirmPickOut (e) {
  315. let that = this
  316. uni.showModal({
  317. title: '提示',
  318. content: '是否将该订单标记为已自取?',
  319. success: function (r) {
  320. if (r.confirm) {
  321. that.handComfirmPick(e);
  322. } else if (r.cancel) {
  323. }
  324. }
  325. })
  326. },
  327. handComfirmPick (e) {
  328. if (this.handle) {
  329. return;
  330. }
  331. this.handle = true;
  332. uni.showLoading({
  333. title: '加载中'
  334. })
  335. var dateStr = (new Date()).getTime();
  336. var sign = this.getSign(dateStr);
  337. this.requst({
  338. url: this.pickUrl,
  339. data: {
  340. timestamp: dateStr,
  341. sign: sign,
  342. orderId: e.orderId,
  343. },
  344. success: res => {
  345. this.handle = false;
  346. if (res.data.rtnBean.rtnCode == 0) {
  347. uni.hideLoading()
  348. if (res.data.rtnBean.rtnMsg != '') {
  349. this.loadData(res.data.rtnBean.rtnMsg);
  350. } else {
  351. this.loadData('自取成功');
  352. }
  353. } else {
  354. uni.hideLoading()
  355. if (res.data.rtnBean.rtnMsg != '') {
  356. this.$api.msg(res.data.rtnBean.rtnMsg);
  357. }
  358. }
  359. },
  360. fail: (e) => {
  361. console.log("接口调用失败:" + JSON.stringify(e));
  362. this.handle = false;
  363. uni.hideLoading()
  364. },
  365. });
  366. },
  367. splitOrderList(list) {
  368. if (!list || list.length == 0) {
  369. return [];
  370. }
  371. let orderList = [];
  372. list.map(item => {
  373. const date = item.requireDateStr.slice(5,10);
  374. if (orderList.length == 0) {
  375. let arr = [];
  376. arr.push(item)
  377. const obj = {
  378. date: date,
  379. requireDate: item.requireDate,
  380. list: arr
  381. }
  382. orderList.push(obj)
  383. } else {
  384. let obj = orderList.find(w => w.date == date);
  385. if (obj) {
  386. obj.list.push(item)
  387. } else {
  388. let arr = [];
  389. arr.push(item)
  390. const obj = {
  391. date: date,
  392. requireDate: item.requireDate,
  393. list: arr
  394. }
  395. orderList.push(obj)
  396. }
  397. }
  398. })
  399. if (orderList.length > 0) {
  400. orderList.sort((a, b) => {
  401. return new Date(a.requireDate).getTime() - new Date(b.requireDate).getTime()
  402. })
  403. orderList.reverse()
  404. }
  405. return orderList;
  406. },
  407. loadData(msg) {
  408. if (this.handle) {
  409. return;
  410. }
  411. this.handle = true;
  412. uni.showLoading({
  413. title: '加载中'
  414. })
  415. var dateStr = (new Date()).getTime();
  416. var sign = this.getSign(dateStr);
  417. let status = 0;
  418. let value = ""
  419. if (this.params.active == 1) {
  420. status = 10;
  421. } else if (this.params.active == 2) {
  422. status = 20;
  423. } else if (this.params.active == 3) {
  424. status = 50;
  425. value = this.searchValue
  426. } else {
  427. status = 0;
  428. }
  429. this.requst({
  430. url: this.listUrl,
  431. data: {
  432. timestamp: dateStr,
  433. sign: sign,
  434. storeId: this.storeInfo.storeId,
  435. status: status,
  436. searchValue: value
  437. },
  438. success: res => {
  439. this.handle = false;
  440. if (res.data.rtnBean.rtnCode == 0) {
  441. if (this.params.active == 1 || this.params.active == 0) {
  442. this.orderList = res.data.list;
  443. } else{
  444. this.takeFoods = this.splitOrderList(res.data.list);
  445. }
  446. const obj = res.data.obj;
  447. if (obj.reserveNum > 99) {
  448. this.tabs[0].badge.value = '...';
  449. } else {
  450. this.tabs[0].badge.value = obj.reserveNum;
  451. }
  452. if (obj.confirmedNum > 99) {
  453. this.tabs[1].badge.value = '...';
  454. } else {
  455. this.tabs[1].badge.value = obj.confirmedNum;
  456. }
  457. if (obj.receivedNum > 99) {
  458. this.tabs[2].badge.value = '...';
  459. } else {
  460. this.tabs[2].badge.value = obj.receivedNum;
  461. }
  462. if (obj.dinedNum > 99) {
  463. this.tabs[3].badge.value = '...';
  464. } else {
  465. this.tabs[3].badge.value = obj.dinedNum;
  466. }
  467. } else {
  468. if (res.data.rtnBean.rtnMsg != '') {
  469. this.$api.msg(res.data.rtnBean.rtnMsg);
  470. }
  471. }
  472. uni.stopPullDownRefresh()
  473. uni.hideLoading()
  474. if (msg != '' && msg != undefined && msg != null) {
  475. uni.showToast({
  476. icon: 'none',
  477. title: msg,
  478. duration: 1500
  479. })
  480. }
  481. this.errorMsg = '';
  482. },
  483. fail: (e) => {
  484. console.log("接口调用失败:" + JSON.stringify(e));
  485. uni.stopPullDownRefresh()
  486. this.handle = false;
  487. uni.hideLoading();
  488. },
  489. });
  490. },
  491. getStoreAutoGo() {
  492. uni.showLoading({
  493. title: '加载中'
  494. });
  495. var dateStr = (new Date()).getTime();
  496. var sign = this.getSign(dateStr);
  497. this.requst({
  498. url: this.autoGoUrl,
  499. data: {
  500. timestamp: dateStr,
  501. sign: sign,
  502. storeId: this.storeInfo.storeId
  503. },
  504. success: res => {
  505. if (res.data.rtnBean.rtnCode == 0) {
  506. uni.hideLoading();
  507. this.autoTaking = res.data.obj.autoGo == 1;
  508. } else {
  509. uni.hideLoading();
  510. if (res.data.rtnBean.rtnMsg != '') {
  511. this.$api.msg(res.data.rtnBean.rtnMsg);
  512. }
  513. }
  514. },
  515. fail: (e) => {
  516. console.log("接口调用失败:" + JSON.stringify(e));
  517. uni.hideLoading();
  518. },
  519. });
  520. },
  521. saoma() {
  522. var that = this;
  523. // 只允许从相机扫码
  524. wx.scanCode({
  525. onlyFromCamera: true,
  526. scanType: 'qrCode',
  527. success(res) {
  528. that.checkDoneMealCode(encodeURIComponent(res.result));
  529. },fail(res) {
  530. }
  531. })
  532. },
  533. // 判断是不是核销码类型
  534. checkDoneMealCode(orderCode) {
  535. if (this.handle) {
  536. return;
  537. }
  538. this.handle = true;
  539. uni.showLoading({
  540. title: '加载中'
  541. })
  542. var dateStr = (new Date()).getTime();
  543. var sign = this.getSign(decodeURIComponent(orderCode) + this.storeInfo.storeId + dateStr);
  544. let status = 0;
  545. if (this.params.active == 1) {
  546. status = 10;
  547. } else if (this.params.active == 2) {
  548. status = 20;
  549. } else if (this.params.active == 3) {
  550. status = 30;
  551. } else {
  552. status = 0;
  553. }
  554. let that = this;
  555. this.requst({
  556. url: this.checkCodeUrl,
  557. data: {
  558. orderCode: decodeURIComponent(orderCode),
  559. storeId: this.storeInfo.storeId,
  560. status: status,
  561. timestamp: dateStr,
  562. sign: sign
  563. },
  564. success: res => {
  565. this.handle = false;
  566. uni.hideLoading()
  567. if (res.data.rtnBean.rtnCode == 0) {
  568. if (this.params.active == 1) {
  569. uni.showModal({
  570. title: '提示',
  571. content: '是否将取餐号为' + res.data.obj.takeupCode + '的订单标记为已出餐?',
  572. success: function (r) {
  573. if (r.confirm) {
  574. that.handComfirmTakeFood(res.data.obj)
  575. } else if (r.cancel) {
  576. }
  577. }
  578. });
  579. } else if (this.params.active == 2) {
  580. uni.showModal({
  581. title: '提示',
  582. content: '是否将取餐号为' + res.data.obj.takeupCode + '的订单标记为已自取?',
  583. success: function (r) {
  584. if (r.confirm) {
  585. that.handComfirmPick(res.data.obj)
  586. } else if (r.cancel) {
  587. }
  588. }
  589. });
  590. }
  591. } else {
  592. if (res.data.rtnBean.rtnMsg != '') {
  593. // setTimeout(() => {
  594. // uni.showToast({
  595. // icon: 'none',
  596. // title: res.data.rtnBean.rtnMsg,
  597. // duration: 2000
  598. // })
  599. // }, 1000)
  600. this.errorMsg = res.data.rtnBean.rtnMsg;
  601. }
  602. }
  603. },
  604. fail: (e) => {
  605. uni.hideLoading()
  606. console.log("接口调用失败:" + JSON.stringify(e));
  607. this.handle = false;
  608. },
  609. })
  610. },
  611. getNotice() {
  612. uni.showLoading({
  613. title: '加载中'
  614. });
  615. var dateStr = (new Date()).getTime();
  616. var sign = this.getSign('' + this.storeInfo.storeUserId + dateStr);
  617. this.requst({
  618. url: this.noticeUrl,
  619. data: {
  620. timestamp: dateStr,
  621. sign: sign,
  622. storeId: this.storeInfo.storeId,
  623. storeUserId: this.storeInfo.storeUserId
  624. },
  625. success:res => {
  626. if (res.data.rtnBean.rtnCode == 0) {
  627. this.notice = res.data.obj
  628. if (this.notice != '' && this.notice != null && this.notice != undefined){
  629. this.show = true
  630. }
  631. }
  632. uni.hideLoading();
  633. },
  634. fail: (e) => {
  635. console.log("接口调用失败:" + JSON.stringify(e));
  636. uni.hideLoading();
  637. },
  638. });
  639. },
  640. goToActivity() {
  641. this.show = false
  642. uni.navigateTo({
  643. url: this.notice.url
  644. })
  645. },
  646. confirm() {
  647. this.show = false
  648. },
  649. // 判断用户是否绑定微信公众号
  650. checkBindGzh() {
  651. var dateStr = (new Date()).getTime();
  652. var sign = this.getSign('' + this.storeInfo.storeUserId + dateStr);
  653. this.requst({
  654. url: this.checkBindGzhUrl,
  655. data: {
  656. timestamp: dateStr,
  657. sign: sign,
  658. openid2: this.storeInfo.openid2 || '',
  659. storeUserId: this.storeInfo.storeUserId || ''
  660. },
  661. success:res => {
  662. if (res.data.rtnBean.rtnCode == 0) {
  663. this.bindFlag = res.data.obj
  664. // if (!this.bindFlag) {
  665. // this.bindClear();
  666. // }
  667. }
  668. },
  669. fail: (e) => {
  670. console.log("接口调用失败:" + JSON.stringify(e));
  671. },
  672. });
  673. }
  674. },
  675. onShow () {
  676. this.getStoreAutoGo();
  677. this.loadData(this.errorMsg);
  678. this.checkBindGzh();
  679. },
  680. onLoad () {
  681. this.getNotice();
  682. },
  683. onPullDownRefresh() {
  684. this.loadData();
  685. },
  686. onReachBottom: function() {
  687. }
  688. }
  689. </script>
  690. <style lang="scss" scoped>
  691. .fs14 {
  692. font-size: $font-base;
  693. }
  694. .pd24 {
  695. padding: 0 24rpx;
  696. box-sizing: border-box;
  697. }
  698. .mlr24 {
  699. margin: 0 24rpx;
  700. }
  701. .ptb10 {
  702. padding: 10rpx 0;
  703. box-sizing: border-box;
  704. }
  705. .mt10 {
  706. margin-top: 10rpx;
  707. }
  708. .mt20 {
  709. margin-top: 20rpx;
  710. }
  711. .mb10 {
  712. margin-bottom: 10rpx;
  713. }
  714. .w100 {
  715. width: 100%;
  716. }
  717. .borbtm {
  718. border-bottom: 2rpx solid #ececec;
  719. }
  720. .text {
  721. color: $text-color;
  722. }
  723. .desc {
  724. color: $desc-color;
  725. }
  726. .index-page {
  727. width: 100vw;
  728. height: 100vh;
  729. background-color: #f5f5f5;
  730. ::-webkit-scrollbar {
  731. display: none;
  732. }
  733. }
  734. /deep/ .input-placeholder {
  735. color: #666666
  736. }
  737. /deep/ .u-tabs__wrapper__nav__item__text.data-v-48634e29 {
  738. font-size: 28rpx;
  739. color: #606266;
  740. }
  741. .tabs-wrap {
  742. padding-left: 5vw;
  743. box-sizing: border-box;
  744. background-color: #fff;
  745. position: fixed;
  746. .tabs {
  747. margin-bottom: 20rpx;
  748. }
  749. }
  750. .content-wrap {
  751. height: calc(100vh - 80rpx);
  752. .take-food-wrap {
  753. background-color: #f5f5f5;
  754. }
  755. .scan-code {
  756. @include between;
  757. height: 60rpx;
  758. margin: 0 20rpx 20rpx;
  759. padding: 0 20rpx;
  760. box-sizing: border-box;
  761. background-color: #f5f5f5;
  762. .label {
  763. font-size: $font-base;
  764. color: $icon-color;
  765. }
  766. }
  767. .item-date {
  768. height: 60rpx;
  769. background-color: #f5f5f5;
  770. @include flexStart;
  771. font-size: $font-base;
  772. padding: 0 20rpx;
  773. box-sizing: border-box;
  774. }
  775. .take-food-wrap {
  776. background-color: #fff;
  777. }
  778. .item-food-no {
  779. padding: 0 20rpx;
  780. box-sizing: border-box;
  781. border-bottom: 2rpx solid #ececec;
  782. height: 100rpx;
  783. @include between;
  784. font-size: $font-base;
  785. color: $title-color;
  786. font-weight: bold;
  787. .btn {
  788. font-weight: normal;
  789. width: 140rpx;
  790. height: 52rpx;
  791. background-color: $base-color;
  792. color: #fff;
  793. border-radius: 26rpx;
  794. @include flexCenter;
  795. font-size: $font-sm;
  796. }
  797. }
  798. .btm {
  799. font-size: $font-sm;
  800. color: #6c6c6c;
  801. }
  802. }
  803. .auto-taking-order {
  804. width: 100vw;
  805. height: 80rpx;
  806. @include between;
  807. padding: 0 20rpx;
  808. box-sizing: border-box;
  809. /deep/ .u-switch {
  810. transform: scale(.75) translateX(12rpx);
  811. }
  812. }
  813. .list-scroll-wrap {
  814. width: calc(100vw - 40rpx);
  815. margin-left: 20rpx;
  816. padding-bottom: 20rpx;
  817. }
  818. .color-white {
  819. background-color: #fff;
  820. padding-top: 20rpx;
  821. box-sizing: border-box;
  822. }
  823. .h70 {
  824. .item-food-no {
  825. height: 140rpx;
  826. }
  827. .top {
  828. margin-bottom: 10rpx;
  829. }
  830. }
  831. .float-button {
  832. position: fixed;
  833. right: 15px;
  834. bottom: 15px;
  835. width: 130rpx;
  836. height: 130rpx;
  837. border-radius: 50%;
  838. background: #1A78F6;
  839. text-align: center;
  840. display: flex;
  841. align-items:center;
  842. justify-content: center;
  843. box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.4);
  844. z-index: 999;
  845. }
  846. .hover-btn-bg{
  847. background-color: #1A78F6;
  848. color: #fff;
  849. }
  850. </style>