startCheck.vue 21 KB

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