startCheck.vue 21 KB

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