startCheck.vue 21 KB

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