startCheck.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881
  1. <template>
  2. <view class="content flex flex_column">
  3. <view class="searchBar">
  4. <view class="p-title flex align_center">
  5. <text></text>
  6. <view class="shelfName">
  7. <view>{{nowData.shelfName}}</view>
  8. </view>
  9. <view class="btns" @click="showTab = true">筛选<u-icon size="20" name="arrow-down"></u-icon></view>
  10. </view>
  11. <view class="search flex align_center">
  12. <view class="input">
  13. <u-search
  14. focus
  15. v-model="queryWord"
  16. @custom="getpartList"
  17. @search="getpartList"
  18. @clear="clearSearch"
  19. @input="$u.debounce(changeSearch, 800)"
  20. bg-color="#fff"
  21. :show-action="false"
  22. placeholder="请输入产品编码或名称搜索"></u-search>
  23. </view>
  24. <view class="icon" @click="toScan">
  25. <u-icon name="scan"></u-icon>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="check-list">
  30. <scroll-view scroll-y class="scroll-view" @scrolltolower="onreachBottom">
  31. <view class="partList-list-box" v-for="item in partList" :key="item.id">
  32. <view class="product" @click="toEdit(item)">
  33. <view class="flex align_center flex_1">
  34. <view class="pimgs">
  35. <text v-if="hasChecked(item)">已选</text>
  36. <u-image :src="item.productEntity&&item.productEntity.images?item.productEntity.images:`../../static/${$config('themePath')}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
  37. </view>
  38. <view class="pinfo">
  39. <view class="pname">
  40. <text>{{item.shelfPlaceCode}}</text>{{item.productEntity&&item.productEntity.code}}
  41. </view>
  42. <view class="ptxt flex align_center justify_between">
  43. <view>
  44. <text class="pcode">{{item.productEntity&&item.productEntity.productName}}</text>
  45. </view>
  46. </view>
  47. <view class="item-detail">
  48. <view>
  49. 可用库存:
  50. <text class="item-detail-text">{{item.currQty}}</text>
  51. {{item.productEntity&&item.productEntity.unit}}
  52. </view>
  53. <view>
  54. 冻结库存:
  55. <text class="item-detail-text">{{item.freezeQty}}</text>
  56. {{item.productEntity&&item.productEntity.unit}}
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. <view v-if="partList&&partList.length==0">
  64. <u-empty v-if="status!='loading'" :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="180" :text="noDataText" mode="list" :margin-top="50"></u-empty>
  65. </view>
  66. <view style="padding: 20upx;" v-if="total>pageSize || status=='loading'">
  67. <u-loadmore :status="status" />
  68. </view>
  69. </scroll-view>
  70. </view>
  71. <!-- 底部栏 -->
  72. <view class="footer-bar flex align_center">
  73. <view class="f-left" :style="{background:orderTotal?$config('primaryColor'):''}" @click="openCart">
  74. <u-icon name="order" size="45"></u-icon>
  75. <u-badge type="error" size="mini" :offset="[-10,-10]" :count="orderTotal"></u-badge>
  76. </view>
  77. <view class="f-mid">
  78. <view v-if="detail">
  79. 盘盈总数:<text>{{detail.totalProfitQty}}</text>
  80. 盘亏总数:<text>{{detail.totalLossQty}}</text>
  81. </view>
  82. </view>
  83. <view class="f-btns">
  84. <u-button size="medium" @click="submitOrder" :custom-style="customBtnStyle" shape="circle" type="primary" hover-class="none" >提交盘点单</u-button>
  85. </view>
  86. </view>
  87. <!-- 已选配件 购物车 -->
  88. <div class="cpb_cart-mask" v-if="showCart">
  89. <div class="cpb_cart-box">
  90. <div class="cpb_close flex align-center justify_center" @click="showCart=false">
  91. <u-icon name="close"></u-icon>
  92. </div>
  93. <div class="cpb_cart-tit">
  94. <view>已选配件</view>
  95. <view class="cpb_heji flex align_center justify_between">
  96. <text @click="clearDetail">清空列表</text>
  97. <view v-if="detail">
  98. 盈亏总数量:
  99. <text>
  100. {{detail.totalProfitLossQty}}
  101. </text>
  102. 盈亏总金额:
  103. <text>
  104. ¥{{detail.totalProfitLossCost}}
  105. </text>
  106. </view>
  107. </view>
  108. </div>
  109. <div class="cpb_cart-list">
  110. <u-swipe-action
  111. :show="item.show"
  112. :btn-width="120"
  113. :index="index"
  114. @click="delDetail"
  115. v-for="(item, index) in chooseList"
  116. :key="item.id"
  117. :options="options"
  118. >
  119. <view class="nav-right-item flex">
  120. <view class="uni-col-2">
  121. <u-image :src="item.product&&item.product.images?item.product.images:`../../static/${$config('themePath')}/def_img@2x.png`" width="100" height="100" border-radius="30"></u-image>
  122. </view>
  123. <view class="item-info uni-col-10">
  124. <view class="item-name">
  125. <text>{{item.productCode}}</text>
  126. {{item.product.productName}}
  127. </view>
  128. <view class="item-detail">
  129. <view class="item-detail-info">
  130. <view class="flex justify_end">
  131. <text class="item-detail-text">
  132. 可用:{{item.stockQty?item.stockQty:0}} {{item.product&&item.product.unit}}
  133. </text>
  134. <text class="item-detail-text">
  135. 冻结:{{item.freezeQty?item.freezeQty:0}} {{item.product&&item.product.unit}}
  136. </text>
  137. </view>
  138. </view>
  139. </view>
  140. <view class="item-detail">
  141. <view class="item-detail-info">
  142. <view class="flex justify_between">
  143. <view></view>
  144. <view class="item-detail-text">
  145. 实际可用:
  146. <u-number-box
  147. v-model="item.checkQty"
  148. @minus="cartChangeNums"
  149. @plus="cartChangeNums"
  150. @blur="cartChangeNums"
  151. :index="'cart_'+item.id"
  152. :min="0"
  153. :max="999999"></u-number-box>
  154. </view>
  155. </view>
  156. </view>
  157. </view>
  158. </view>
  159. </view>
  160. </u-swipe-action>
  161. </div>
  162. </div>
  163. </div>
  164. <!-- 编辑弹框 -->
  165. <editModal v-if="editModal" :openModal="editModal" :infoData="tempData" @close="editModal=false" @addProduct="addProduct"></editModal>
  166. <!-- 筛选项 -->
  167. <u-popup v-model="showTab" mode="right" width="70%">
  168. <view class="tabBox flex flex_column">
  169. <view class="tabs">
  170. <view>
  171. <view :class="'available'==curType?'active':''" @click="curType=curType=='available'?'':'available'">有可用库存的产品</view>
  172. <view :class="'blocked'==curType?'active':''" @click="curType=curType=='blocked'?'':'blocked'">有冻结库存的产品</view>
  173. </view>
  174. <view class="flex">
  175. <view :class="item==curTab?'active':''" v-for="item in placeTab" :key="item" @click="curTab=curTab==item?'':item">{{item}}层</view>
  176. </view>
  177. </view>
  178. <view class="btns">
  179. <u-button class="handle-btn" shape="circle" size="medium" hover-class="none" @click="handleClear">重置</u-button>
  180. <u-button class="handle-btn" shape="circle" size="medium" hover-class="none" :custom-style="customBtnStyle" @click="clearSearch">查询</u-button>
  181. </view>
  182. </view>
  183. </u-popup>
  184. </view>
  185. </template>
  186. <script>
  187. import { getShelfProductList,getProductPlace } from '@/api/shelf'
  188. import {
  189. stockCheckDetailQueryList,
  190. stockCheckDetailDelete,
  191. stockCheckSave,
  192. stockCheckBySn,
  193. stockCheckDetailSave,
  194. deleteByStockCheckSn
  195. } from '@/api/stockCheck'
  196. import editModal from './editModal'
  197. import { clzConfirm } from '@/libs/tools'
  198. export default {
  199. components: {
  200. editModal,
  201. },
  202. data() {
  203. return {
  204. queryWord: '',
  205. nowData:null,
  206. stockCheckSn: null,
  207. detail:null,
  208. pageNo:1,
  209. pageSize: 10,
  210. total: 0, // 列表总数
  211. noDataText: '暂无产品',
  212. status: 'loading',
  213. partList: [],
  214. showTab: false,
  215. placeTab: [],
  216. curTab: '',
  217. curType: '',
  218. customBtnStyle: { // 自定义按钮样式
  219. borderColor: this.$config('primaryColor'),
  220. backgroundColor: this.$config('primaryColor'),
  221. color: '#fff'
  222. },
  223. orderTotal: 0,
  224. showCart: false,
  225. chooseList: [],
  226. editModal: false,
  227. tempData: null,
  228. options: [
  229. {
  230. text: '删除',
  231. style: {
  232. backgroundColor: '#dd524d'
  233. }
  234. }
  235. ]
  236. }
  237. },
  238. onNavigationBarButtonTap(e) {
  239. if(e.index == 0){
  240. uni.navigateTo({
  241. url: '/pages/stockCheck/checkRecord'
  242. })
  243. }
  244. },
  245. onLoad(opts) {
  246. this.nowData = JSON.parse(decodeURIComponent(opts.data));
  247. this.stockCheckSn = this.nowData.stockCheckSn
  248. this.getpartList()
  249. this.getShelfPlace()
  250. if(this.stockCheckSn){
  251. // 获取盘点单明细
  252. this.getDetail()
  253. // 获取盘点明细列表
  254. this.getChooseList()
  255. }
  256. // 重置盘点单
  257. uni.$on("resetStockCheck",()=>{
  258. this.resetStockCheck()
  259. })
  260. },
  261. onUnload() {
  262. uni.$off("resetStockCheck")
  263. },
  264. methods: {
  265. // 重置盘点单
  266. resetStockCheck(){
  267. this.chooseList = []
  268. this.orderTotal = 0
  269. this.stockCheckSn = null
  270. this.detail = null
  271. this.tempData = null
  272. this.queryWord = ''
  273. this.showCart = false
  274. this.handleClear()
  275. },
  276. // 获取盘点明细列表
  277. getChooseList(){
  278. stockCheckDetailQueryList({
  279. stockCheckSn: this.stockCheckSn
  280. }).then(res => {
  281. this.chooseList = res.data || []
  282. this.orderTotal = this.chooseList.length
  283. })
  284. },
  285. // 详细
  286. getDetail(){
  287. stockCheckBySn({stockCheckSn: this.stockCheckSn}).then(res => {
  288. this.detail = res.data || null
  289. })
  290. },
  291. //添加产品
  292. toEdit(item){
  293. const data = this.hasChecked(item)
  294. console.log(data)
  295. // 修改
  296. if(data){
  297. data.productEntity = data.product
  298. data.currQty = data.stockQty
  299. this.tempData = data
  300. }else{
  301. // 添加
  302. item.checkQty = item.currQty
  303. this.tempData = item
  304. }
  305. this.editModal = true
  306. },
  307. // 添加产品明细
  308. addProduct(data){
  309. const _this = this
  310. this.editModal = false
  311. // 是否第一次添加产品
  312. if(this.orderTotal==0){
  313. clzConfirm({
  314. title: '提示',
  315. content: '开始盘点后,不能再使用与出入库有关的功能,确认开始盘点吗?',
  316. success (ret) {
  317. if (ret.confirm || ret.index == 0) {
  318. // 先创建盘点单
  319. _this.creatOrder(data)
  320. }
  321. }
  322. })
  323. }else{
  324. uni.showLoading({
  325. title:"正在保存.."
  326. })
  327. this.saveProduct(data)
  328. }
  329. },
  330. // 创建盘点单
  331. creatOrder(data){
  332. uni.showLoading({
  333. title:"正在保存.."
  334. })
  335. stockCheckSave({
  336. shelfSn: this.nowData.shelfSn,
  337. totalCategory: this.nowData.totalCategory,
  338. totalStockQty: this.nowData.totalStockQty,
  339. totalFreezeQty: this.nowData.totalFreezeQty
  340. }).then(res => {
  341. if(res.status == 200){
  342. this.detail = res.data || null
  343. this.stockCheckSn = res.data.stockCheckSn
  344. this.saveProduct(data)
  345. }else{
  346. uni.hideLoading()
  347. }
  348. })
  349. },
  350. // 添加产品
  351. saveProduct(data){
  352. stockCheckDetailSave({
  353. stockCheckSn: this.detail.stockCheckSn,
  354. stockCheckNo: this.detail.stockCheckNo,
  355. ...data
  356. }).then(res => {
  357. if(res.status == 200){
  358. this.getDetail()
  359. this.getChooseList()
  360. }
  361. uni.hideLoading()
  362. })
  363. },
  364. // 打开购物车
  365. openCart(){
  366. if(this.orderTotal){
  367. this.showCart = !this.showCart
  368. }else{
  369. uni.showToast({
  370. icon: 'none',
  371. title: '请先添加产品'
  372. })
  373. }
  374. },
  375. // 清空购物车
  376. clearDetail(){
  377. const _this = this
  378. clzConfirm({
  379. title: '提示',
  380. content: '确认将所有产品移出盘点单吗?',
  381. success (ret) {
  382. if (ret.confirm || ret.index == 0) {
  383. uni.showLoading({
  384. title:"正在删除.."
  385. })
  386. deleteByStockCheckSn({ stockCheckSn: _this.stockCheckSn }).then(res => {
  387. if (res.status == 200) {
  388. _this.showCart = false
  389. _this.getDetail()
  390. _this.getChooseList()
  391. }
  392. uni.hideLoading()
  393. })
  394. }
  395. }
  396. })
  397. },
  398. // 修改数量
  399. cartChangeNums(v){
  400. console.log(v,this.showCart)
  401. const data = this.chooseList.find(item => item.id == v.index.split('_')[1])
  402. uni.showLoading({
  403. title:"正在保存.."
  404. })
  405. this.saveProduct(data)
  406. },
  407. // 删除盘点详细
  408. delDetail(a,b){
  409. if(b==0){
  410. const data = this.chooseList[a]
  411. stockCheckDetailDelete({stockCheckDetailSn: data.stockCheckDetailSn}).then(res=>{
  412. if(res.status == 200){
  413. this.chooseList.splice(a,1)
  414. this.orderTotal = this.chooseList.length
  415. // 删除最后一个后刷新列表
  416. if(this.orderTotal == 0){
  417. this.showCart = false
  418. this.getChooseList()
  419. }
  420. this.getDetail()
  421. }
  422. })
  423. }
  424. },
  425. // 是否已选
  426. hasChecked(data){
  427. return this.chooseList.find(item => item.shelfPlaceCode == data.shelfPlaceCode && item.productSn == data.productSn)
  428. },
  429. // 获取货位号
  430. getShelfPlace(flag){
  431. getProductPlace({ shelfSn: this.nowData.shelfSn }).then(res => {
  432. if (res.status == 200) {
  433. for(let a in res.data){
  434. this.placeTab.push(a)
  435. }
  436. if(!flag){
  437. this.curTab = ''
  438. }
  439. } else {
  440. this.placeTab = []
  441. }
  442. })
  443. },
  444. handleClear(){
  445. this.curTab = ''
  446. this.curType = ''
  447. this.clearSearch()
  448. },
  449. clearSearch(){
  450. this.queryWord = ''
  451. this.changeSearch()
  452. },
  453. changeSearch(){
  454. this.pageNo = 1
  455. this.partList = []
  456. this.getpartList()
  457. },
  458. // 获取数字货架列表
  459. getpartList(){
  460. const _this = this
  461. let params = {
  462. pageNo: this.pageNo,
  463. pageSize: this.pageSize,
  464. shelfSn: this.nowData.shelfSn,
  465. queryWord: this.queryWord,
  466. shelfPlaceCodeHead: this.curTab,
  467. currQtyFlag: this.curType=='available' ? 1 : '',
  468. freezeQtyFlag: this.curType=='blocked' ? 1 : '',
  469. }
  470. _this.status = 'loading'
  471. getShelfProductList(params).then(res => {
  472. uni.hideLoading()
  473. if(res.status == 200){
  474. let list = res.data.list
  475. console.log(list)
  476. if (list && list.length){
  477. // 分页 拼接数据
  478. if (_this.pageNo != 1) {
  479. _this.partList = _this.partList ? _this.partList.concat(list) : list
  480. } else {
  481. _this.partList = list
  482. }
  483. this.total = res.data.count
  484. if (_this.partList.length == res.data.count) {
  485. _this.status = 'nomore'
  486. } else {
  487. _this.status = 'loadmore'
  488. }
  489. } else {
  490. _this.partList = list || []
  491. this.total = 0
  492. _this.status = 'nomore'
  493. }
  494. _this.noDataText = '暂无匹配产品'
  495. }else{
  496. _this.status = 'loadmore'
  497. _this.partList = []
  498. _this.total = 0
  499. _this.noDataText = res.message ? res.message : '网络似乎出错了,请稍后再试'
  500. }
  501. this.showTab = false
  502. })
  503. },
  504. // 加载更多
  505. onreachBottom () {
  506. if(this.partList.length < this.total ){
  507. this.pageNo++
  508. this.getpartList()
  509. }else{
  510. this.status = "nomore"
  511. }
  512. },
  513. // 提交盘点单
  514. submitOrder(){
  515. if(this.chooseList.length){
  516. uni.navigateTo({
  517. url: '/pages/stockCheck/submitStockCheck?stockCheckSn='+this.stockCheckSn+'&type=submit'
  518. })
  519. }else{
  520. uni.showToast({
  521. icon: 'none',
  522. title: '请先添加产品'
  523. })
  524. }
  525. },
  526. // 扫描
  527. toScan(){
  528. this.mpaasScanModule = uni.requireNativePlugin("wss-scan")
  529. this.mpaasScanModule.scan(
  530. {
  531. "scanMode":"Customized",
  532. "scanStyle":{
  533. "scanFrameSizePlus":{"width":250,"height":250},
  534. "scanFrameSize":200,
  535. "scanLight":"visible",
  536. "scanText":"对准条形码/二维码进行识别",
  537. "scanTitle":"扫码搜索货位产品",
  538. }
  539. },
  540. (result) => {
  541. if(result.scanStatus == 1){
  542. this.scanResult(result)
  543. }
  544. })
  545. },
  546. // 扫描结果
  547. scanResult(data){
  548. const params = {
  549. pageNo: 1,
  550. pageSize:1,
  551. shelfSn: this.nowData.shelfSn
  552. }
  553. // 二维码
  554. if(data.scanType == 'QRCODE'){
  555. const ret = data.scanValue.split("&")
  556. params.queryWord = ret[1] // 产品编码
  557. }else{
  558. params.qrCode = data.scanValue
  559. }
  560. getShelfProductList(params).then(res => {
  561. console.log(res)
  562. if(res.status == 200){
  563. if(res.data&&res.data.list.length){
  564. this.toEdit(res.data.list[0])
  565. }else{
  566. uni.showToast({
  567. icon: "none",
  568. title: "产品不属于此货架,请重新扫描",
  569. duration: 5000
  570. })
  571. }
  572. }
  573. })
  574. }
  575. }
  576. }
  577. </script>
  578. <style lang="less">
  579. .content{
  580. height: 100vh;
  581. width: 100%;
  582. background: #fff;
  583. .searchBar{
  584. padding: 0 0.8rem 0.3rem;
  585. .p-title{
  586. padding: 0 15rpx;
  587. display: flex;
  588. align-items: center;
  589. color: #222;
  590. font-size: 30rpx;
  591. > text{
  592. display: block;
  593. height: 30rpx;
  594. width: 6rpx;
  595. background: #0485F6;
  596. margin-right: 10rpx;
  597. border-radius: 10rpx;
  598. }
  599. .shelfName{
  600. flex-grow: 1;
  601. font-weight: bold;
  602. width: 80%;
  603. > view{
  604. overflow: hidden;
  605. white-space: nowrap;
  606. text-overflow: ellipsis;
  607. }
  608. }
  609. .btns{
  610. width:100rpx;
  611. text-align: right;
  612. font-size: 28rpx;
  613. color: #0485F6;
  614. }
  615. }
  616. .search{
  617. margin-top: 15upx;
  618. padding: 0.1rem;
  619. border-radius: 50rpx;
  620. border:0.1rpx solid #eee;
  621. .input{
  622. flex-grow: 1;
  623. padding: 0.1rpx;
  624. }
  625. .icon{
  626. width: 13%;
  627. text-align: center;
  628. font-size: 46rpx;
  629. color: #999;
  630. }
  631. }
  632. }
  633. .check-list{
  634. padding: 0 0.5rem;
  635. flex-grow: 1;
  636. .scroll-view{
  637. height: calc(100vh - 260rpx);
  638. box-sizing: border-box;
  639. }
  640. .partList-list-box{
  641. padding: 20rpx 30rpx;
  642. border-bottom: 2rpx solid #f5f5f5;
  643. &:last-child{
  644. border:0;
  645. }
  646. .product{
  647. flex-grow: 1;
  648. &:active{
  649. opacity: 0.6;
  650. background-color: #f8f8f8;
  651. }
  652. .pimgs{
  653. position: relative;
  654. border:2rpx solid #eee;
  655. border-radius: 15rpx;
  656. padding: 5rpx;
  657. > text{
  658. position: absolute;
  659. left: 0;
  660. bottom:0;
  661. z-index: 500;
  662. width: 100%;
  663. text-align: center;
  664. background: rgba(255, 0, 0, 0.3);
  665. color: #fff;
  666. font-size: 20upx;
  667. }
  668. }
  669. .item-detail{
  670. margin-top: 10rpx;
  671. display: flex;
  672. align-items: center;
  673. justify-content: space-between;
  674. color: #9DA8B5;
  675. font-size: 26upx;
  676. .item-detail-text{
  677. font-size: 26upx;
  678. color: #333;
  679. }
  680. }
  681. .pinfo{
  682. flex-grow: 1;
  683. padding-left: 20rpx;
  684. .pname{
  685. font-size: 28rpx;
  686. color: #191919;
  687. text{
  688. font-weight: normal;
  689. margin-right: 6rpx;
  690. padding: 0 10rpx;
  691. background: rgba(3, 54, 146, 0.15);
  692. border-radius: 100rpx;
  693. color: #033692;
  694. font-size: 24rpx;
  695. }
  696. }
  697. .ptxt{
  698. font-size: 28rpx;
  699. color: #333;
  700. font-weight: bold;
  701. margin-top: 10upx;
  702. .pnums{
  703. color: #222;
  704. }
  705. }
  706. }
  707. }
  708. }
  709. }
  710. .footer-bar{
  711. background-color: #f8f8f8;
  712. padding: 20upx;
  713. .f-left{
  714. background-color: #d8d8d8;
  715. padding: 15upx;
  716. border-radius: 100upx;
  717. color: #fff;
  718. position: relative;
  719. }
  720. .active{
  721. background-color: #0485F6;
  722. }
  723. .f-mid{
  724. flex-grow: 1;
  725. text{
  726. margin-right: 15upx;
  727. &:first-child{
  728. color: #00cb00;
  729. }
  730. &:last-child{
  731. color: red;
  732. }
  733. }
  734. padding: 0 15upx;
  735. font-size: 0.8rem;
  736. color: #666;
  737. }
  738. .f-btns{
  739. button{
  740. width: 200upx;
  741. }
  742. }
  743. }
  744. // 筛选
  745. .tabBox{
  746. height: 100vh;
  747. .tabs{
  748. flex-grow: 1;
  749. overflow: auto;
  750. padding: 20rpx;
  751. > view{
  752. flex-wrap: wrap;
  753. justify-content: space-between;
  754. > view{
  755. width: 45%;
  756. border: 0.1rpx solid #eee;
  757. padding: 15rpx;
  758. border-radius: 50rpx;
  759. text-align: center;
  760. margin-bottom: 15rpx;
  761. }
  762. .active{
  763. border:0;
  764. background-color: #0485F6;
  765. color: #fff;
  766. }
  767. &:first-child{
  768. > view{
  769. width: 100%;
  770. }
  771. }
  772. }
  773. }
  774. .btns{
  775. display: flex;
  776. padding: 20upx;
  777. justify-content: space-between;
  778. .handle-btn {
  779. font-size: 28upx;
  780. }
  781. }
  782. }
  783. // 购物车
  784. .cpb_cart-mask{
  785. position: fixed;
  786. width: 100%;
  787. background: rgba(0,0,0,0.5);
  788. z-index: 900;
  789. bottom: 100rpx;
  790. top: 0;
  791. }
  792. .cpb_cart-box{
  793. background-color: #fff;
  794. position: absolute;
  795. width: 100%;
  796. z-index: 1000;
  797. bottom: 0;
  798. border-radius: 30rpx 30rpx 0 0;
  799. max-height: 70vh;
  800. display: flex;
  801. flex-direction: column;
  802. .cpb_close{
  803. position: absolute;
  804. top: 10rpx;
  805. right: 20rpx;
  806. width: 70rpx;
  807. height: 70rpx;
  808. font-size: 32rpx;
  809. color: #999;
  810. }
  811. .cpb_cart-tit{
  812. text-align: center;
  813. padding: 20rpx;
  814. font-size: 32rpx;
  815. border-bottom: 2rpx solid #eee;
  816. .cpb_heji{
  817. padding-top: 20rpx;
  818. font-size: 26upx;
  819. > text{
  820. color: #00aaff;
  821. }
  822. > view{
  823. color: #999;
  824. > text{
  825. color: #333;
  826. &:first-child{
  827. margin-right: 20upx;
  828. }
  829. }
  830. }
  831. }
  832. }
  833. .cpb_cart-list{
  834. padding: 20rpx 0;
  835. overflow: auto;
  836. flex-grow: 1;
  837. > view{
  838. margin-bottom: 20rpx;
  839. }
  840. .nav-right-item{
  841. padding: 0 30upx;
  842. }
  843. .item-name{
  844. font-size: 30rpx;
  845. text{
  846. background: #eef6ff;
  847. color: #1c588a;
  848. border-radius: 1em;
  849. font-size: 0.8em;
  850. padding: 0 0.5em;
  851. margin-right: 10upx;
  852. }
  853. }
  854. .item-info{
  855. border-bottom:2rpx solid #eee;
  856. flex-grow: 1;
  857. padding-left: 0.2em;
  858. }
  859. .item-detail{
  860. .item-detail-info{
  861. padding: 10upx 0 4upx;
  862. font-size: 24upx;
  863. > view{
  864. padding-bottom: 20rpx;
  865. align-items: center;
  866. .item-detail-text{
  867. color: #999;
  868. margin-left: 20upx;
  869. }
  870. }
  871. }
  872. }
  873. }
  874. }
  875. }
  876. </style>