startCheck.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887
  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?shelfSn='+this.nowData.shelfSn
  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. uni.showToast({
  361. icon:'none',
  362. title: res.message
  363. })
  364. }
  365. setTimeout(()=>{
  366. uni.hideLoading()
  367. },1000)
  368. })
  369. },
  370. // 打开购物车
  371. openCart(){
  372. if(this.orderTotal){
  373. this.showCart = !this.showCart
  374. }else{
  375. uni.showToast({
  376. icon: 'none',
  377. title: '请先添加产品'
  378. })
  379. }
  380. },
  381. // 清空购物车
  382. clearDetail(){
  383. const _this = this
  384. clzConfirm({
  385. title: '提示',
  386. content: '确认将所有产品移出盘点单吗?',
  387. success (ret) {
  388. if (ret.confirm || ret.index == 0) {
  389. uni.showLoading({
  390. title:"正在删除.."
  391. })
  392. deleteByStockCheckSn({ stockCheckSn: _this.stockCheckSn }).then(res => {
  393. if (res.status == 200) {
  394. _this.showCart = false
  395. _this.getDetail()
  396. _this.getChooseList()
  397. }
  398. uni.hideLoading()
  399. })
  400. }
  401. }
  402. })
  403. },
  404. // 修改数量
  405. cartChangeNums(v){
  406. console.log(v,this.showCart)
  407. const data = this.chooseList.find(item => item.id == v.index.split('_')[1])
  408. uni.showLoading({
  409. title:"正在保存.."
  410. })
  411. this.saveProduct(data)
  412. },
  413. // 删除盘点详细
  414. delDetail(a,b){
  415. if(b==0){
  416. const data = this.chooseList[a]
  417. stockCheckDetailDelete({stockCheckDetailSn: data.stockCheckDetailSn}).then(res=>{
  418. if(res.status == 200){
  419. this.chooseList.splice(a,1)
  420. this.orderTotal = this.chooseList.length
  421. // 删除最后一个后刷新列表
  422. if(this.orderTotal == 0){
  423. this.showCart = false
  424. this.getChooseList()
  425. }
  426. this.getDetail()
  427. }
  428. })
  429. }
  430. },
  431. // 是否已选
  432. hasChecked(data){
  433. return this.chooseList.find(item => item.shelfPlaceCode == data.shelfPlaceCode && item.productSn == data.productSn)
  434. },
  435. // 获取货位号
  436. getShelfPlace(flag){
  437. getProductPlace({ shelfSn: this.nowData.shelfSn }).then(res => {
  438. if (res.status == 200) {
  439. for(let a in res.data){
  440. this.placeTab.push(a)
  441. }
  442. if(!flag){
  443. this.curTab = ''
  444. }
  445. } else {
  446. this.placeTab = []
  447. }
  448. })
  449. },
  450. handleClear(){
  451. this.curTab = ''
  452. this.curType = ''
  453. this.clearSearch()
  454. },
  455. clearSearch(){
  456. this.queryWord = ''
  457. this.changeSearch()
  458. },
  459. changeSearch(){
  460. this.pageNo = 1
  461. this.partList = []
  462. this.getpartList()
  463. },
  464. // 获取数字货架列表
  465. getpartList(){
  466. const _this = this
  467. let params = {
  468. pageNo: this.pageNo,
  469. pageSize: this.pageSize,
  470. shelfSn: this.nowData.shelfSn,
  471. queryWord: this.queryWord,
  472. shelfPlaceCodeHead: this.curTab,
  473. currQtyFlag: this.curType=='available' ? 1 : '',
  474. freezeQtyFlag: this.curType=='blocked' ? 1 : '',
  475. }
  476. _this.status = 'loading'
  477. getShelfProductList(params).then(res => {
  478. uni.hideLoading()
  479. if(res.status == 200){
  480. let list = res.data.list
  481. console.log(list)
  482. if (list && list.length){
  483. // 分页 拼接数据
  484. if (_this.pageNo != 1) {
  485. _this.partList = _this.partList ? _this.partList.concat(list) : list
  486. } else {
  487. _this.partList = list
  488. }
  489. this.total = res.data.count
  490. if (_this.partList.length == res.data.count) {
  491. _this.status = 'nomore'
  492. } else {
  493. _this.status = 'loadmore'
  494. }
  495. } else {
  496. _this.partList = list || []
  497. this.total = 0
  498. _this.status = 'nomore'
  499. }
  500. _this.noDataText = '暂无匹配产品'
  501. }else{
  502. _this.status = 'loadmore'
  503. _this.partList = []
  504. _this.total = 0
  505. _this.noDataText = res.message ? res.message : '网络似乎出错了,请稍后再试'
  506. }
  507. this.showTab = false
  508. })
  509. },
  510. // 加载更多
  511. onreachBottom () {
  512. if(this.partList.length < this.total ){
  513. this.pageNo++
  514. this.getpartList()
  515. }else{
  516. this.status = "nomore"
  517. }
  518. },
  519. // 提交盘点单
  520. submitOrder(){
  521. if(this.chooseList.length){
  522. uni.navigateTo({
  523. url: '/pages/stockCheck/submitStockCheck?stockCheckSn='+this.stockCheckSn+'&type=submit'
  524. })
  525. }else{
  526. uni.showToast({
  527. icon: 'none',
  528. title: '请先添加产品'
  529. })
  530. }
  531. },
  532. // 扫描
  533. toScan(){
  534. this.mpaasScanModule = uni.requireNativePlugin("wss-scan")
  535. this.mpaasScanModule.scan(
  536. {
  537. "scanMode":"Customized",
  538. "scanStyle":{
  539. "scanFrameSizePlus":{"width":250,"height":250},
  540. "scanFrameSize":200,
  541. "scanLight":"visible",
  542. "scanText":"对准条形码/二维码进行识别",
  543. "scanTitle":"扫码搜索货位产品",
  544. }
  545. },
  546. (result) => {
  547. if(result.scanStatus == 1){
  548. this.scanResult(result)
  549. }
  550. })
  551. },
  552. // 扫描结果
  553. scanResult(data){
  554. const params = {
  555. pageNo: 1,
  556. pageSize:1,
  557. shelfSn: this.nowData.shelfSn
  558. }
  559. // 二维码
  560. if(data.scanType == 'QRCODE'){
  561. const ret = data.scanValue.split("&")
  562. params.queryWord = ret[1] // 产品编码
  563. }else{
  564. params.qrCode = data.scanValue
  565. }
  566. getShelfProductList(params).then(res => {
  567. console.log(res)
  568. if(res.status == 200){
  569. if(res.data&&res.data.list.length){
  570. this.toEdit(res.data.list[0])
  571. }else{
  572. uni.showToast({
  573. icon: "none",
  574. title: "产品不属于此货架,请重新扫描",
  575. duration: 5000
  576. })
  577. }
  578. }
  579. })
  580. }
  581. }
  582. }
  583. </script>
  584. <style lang="less">
  585. .content{
  586. height: 100vh;
  587. width: 100%;
  588. background: #fff;
  589. .searchBar{
  590. padding: 0 0.8rem 0.3rem;
  591. .p-title{
  592. padding: 0 15rpx;
  593. display: flex;
  594. align-items: center;
  595. color: #222;
  596. font-size: 30rpx;
  597. > text{
  598. display: block;
  599. height: 30rpx;
  600. width: 6rpx;
  601. background: #0485F6;
  602. margin-right: 10rpx;
  603. border-radius: 10rpx;
  604. }
  605. .shelfName{
  606. flex-grow: 1;
  607. font-weight: bold;
  608. width: 80%;
  609. > view{
  610. overflow: hidden;
  611. white-space: nowrap;
  612. text-overflow: ellipsis;
  613. }
  614. }
  615. .btns{
  616. width:100rpx;
  617. text-align: right;
  618. font-size: 28rpx;
  619. color: #0485F6;
  620. }
  621. }
  622. .search{
  623. margin-top: 15upx;
  624. padding: 0.1rem;
  625. border-radius: 50rpx;
  626. border:0.1rpx solid #eee;
  627. .input{
  628. flex-grow: 1;
  629. padding: 0.1rpx;
  630. }
  631. .icon{
  632. width: 13%;
  633. text-align: center;
  634. font-size: 46rpx;
  635. color: #999;
  636. }
  637. }
  638. }
  639. .check-list{
  640. padding: 0 0.5rem;
  641. flex-grow: 1;
  642. .scroll-view{
  643. height: calc(100vh - 260rpx);
  644. box-sizing: border-box;
  645. }
  646. .partList-list-box{
  647. padding: 20rpx 30rpx;
  648. border-bottom: 2rpx solid #f5f5f5;
  649. &:last-child{
  650. border:0;
  651. }
  652. .product{
  653. flex-grow: 1;
  654. &:active{
  655. opacity: 0.6;
  656. background-color: #f8f8f8;
  657. }
  658. .pimgs{
  659. position: relative;
  660. border:2rpx solid #eee;
  661. border-radius: 15rpx;
  662. padding: 5rpx;
  663. > text{
  664. position: absolute;
  665. left: 0;
  666. bottom:0;
  667. z-index: 500;
  668. width: 100%;
  669. text-align: center;
  670. background: rgba(255, 0, 0, 0.3);
  671. color: #fff;
  672. font-size: 20upx;
  673. }
  674. }
  675. .item-detail{
  676. margin-top: 10rpx;
  677. display: flex;
  678. align-items: center;
  679. justify-content: space-between;
  680. color: #9DA8B5;
  681. font-size: 26upx;
  682. .item-detail-text{
  683. font-size: 26upx;
  684. color: #333;
  685. }
  686. }
  687. .pinfo{
  688. flex-grow: 1;
  689. padding-left: 20rpx;
  690. .pname{
  691. font-size: 28rpx;
  692. color: #191919;
  693. text{
  694. font-weight: normal;
  695. margin-right: 6rpx;
  696. padding: 0 10rpx;
  697. background: rgba(3, 54, 146, 0.15);
  698. border-radius: 100rpx;
  699. color: #033692;
  700. font-size: 24rpx;
  701. }
  702. }
  703. .ptxt{
  704. font-size: 28rpx;
  705. color: #333;
  706. font-weight: bold;
  707. margin-top: 10upx;
  708. .pnums{
  709. color: #222;
  710. }
  711. }
  712. }
  713. }
  714. }
  715. }
  716. .footer-bar{
  717. background-color: #f8f8f8;
  718. padding: 20upx;
  719. .f-left{
  720. background-color: #d8d8d8;
  721. padding: 15upx;
  722. border-radius: 100upx;
  723. color: #fff;
  724. position: relative;
  725. }
  726. .active{
  727. background-color: #0485F6;
  728. }
  729. .f-mid{
  730. flex-grow: 1;
  731. text{
  732. margin-right: 15upx;
  733. &:first-child{
  734. color: #00cb00;
  735. }
  736. &:last-child{
  737. color: red;
  738. }
  739. }
  740. padding: 0 15upx;
  741. font-size: 0.8rem;
  742. color: #666;
  743. }
  744. .f-btns{
  745. button{
  746. width: 200upx;
  747. }
  748. }
  749. }
  750. // 筛选
  751. .tabBox{
  752. height: 100vh;
  753. .tabs{
  754. flex-grow: 1;
  755. overflow: auto;
  756. padding: 20rpx;
  757. > view{
  758. flex-wrap: wrap;
  759. justify-content: space-between;
  760. > view{
  761. width: 45%;
  762. border: 0.1rpx solid #eee;
  763. padding: 15rpx;
  764. border-radius: 50rpx;
  765. text-align: center;
  766. margin-bottom: 15rpx;
  767. }
  768. .active{
  769. border:0;
  770. background-color: #0485F6;
  771. color: #fff;
  772. }
  773. &:first-child{
  774. > view{
  775. width: 100%;
  776. }
  777. }
  778. }
  779. }
  780. .btns{
  781. display: flex;
  782. padding: 20upx;
  783. justify-content: space-between;
  784. .handle-btn {
  785. font-size: 28upx;
  786. }
  787. }
  788. }
  789. // 购物车
  790. .cpb_cart-mask{
  791. position: fixed;
  792. width: 100%;
  793. background: rgba(0,0,0,0.5);
  794. z-index: 900;
  795. bottom: 100rpx;
  796. top: 0;
  797. }
  798. .cpb_cart-box{
  799. background-color: #fff;
  800. position: absolute;
  801. width: 100%;
  802. z-index: 1000;
  803. bottom: 0;
  804. border-radius: 30rpx 30rpx 0 0;
  805. max-height: 70vh;
  806. display: flex;
  807. flex-direction: column;
  808. .cpb_close{
  809. position: absolute;
  810. top: 10rpx;
  811. right: 20rpx;
  812. width: 70rpx;
  813. height: 70rpx;
  814. font-size: 32rpx;
  815. color: #999;
  816. }
  817. .cpb_cart-tit{
  818. text-align: center;
  819. padding: 20rpx;
  820. font-size: 32rpx;
  821. border-bottom: 2rpx solid #eee;
  822. .cpb_heji{
  823. padding-top: 20rpx;
  824. font-size: 26upx;
  825. > text{
  826. color: #00aaff;
  827. }
  828. > view{
  829. color: #999;
  830. > text{
  831. color: #333;
  832. &:first-child{
  833. margin-right: 20upx;
  834. }
  835. }
  836. }
  837. }
  838. }
  839. .cpb_cart-list{
  840. padding: 20rpx 0;
  841. overflow: auto;
  842. flex-grow: 1;
  843. > view{
  844. margin-bottom: 20rpx;
  845. }
  846. .nav-right-item{
  847. padding: 0 30upx;
  848. }
  849. .item-name{
  850. font-size: 30rpx;
  851. text{
  852. background: #eef6ff;
  853. color: #1c588a;
  854. border-radius: 1em;
  855. font-size: 0.8em;
  856. padding: 0 0.5em;
  857. margin-right: 10upx;
  858. }
  859. }
  860. .item-info{
  861. border-bottom:2rpx solid #eee;
  862. flex-grow: 1;
  863. padding-left: 0.2em;
  864. }
  865. .item-detail{
  866. .item-detail-info{
  867. padding: 10upx 0 4upx;
  868. font-size: 24upx;
  869. > view{
  870. padding-bottom: 20rpx;
  871. align-items: center;
  872. .item-detail-text{
  873. color: #999;
  874. margin-left: 20upx;
  875. }
  876. }
  877. }
  878. }
  879. }
  880. }
  881. }
  882. </style>