startCheck.vue 21 KB

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