startCheck.vue 21 KB

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