index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808
  1. <template>
  2. <view class="pages" :style="{'min-height':h+'px','padding-top':(mt)+'px'}">
  3. <c-nav-bar title="商品管理"></c-nav-bar>
  4. <view class="tb">
  5. <view class="tabs">
  6. <view v-for="(item,index) in tabList" :key="index" @tap="changeTab1(index)">
  7. <text :class="index==current?'active':''">{{item.name}}</text>
  8. </view>
  9. </view>
  10. </view>
  11. <!-- 房型数量 -->
  12. <view class="">
  13. <view class="typeNum">
  14. <view class="left" style="font-size: 24rpx; color: #777;" @click="areaShowed()">
  15. <text :class="areaShow==true?'active':''" style="margin-right: 20rpx;">上架时间</text>
  16. <u-icon name="arrow-down-fill" bold='true' v-if="areaShow==false" size="20" labelPos="left"
  17. labelSize="26"></u-icon>
  18. <u-icon name="arrow-up-fill" bold='true' v-else color="#007a68" labelColor='#007a68' size="20"
  19. labelPos="left" labelSize="26"></u-icon>
  20. </view>
  21. <view class="right" @click="showList">
  22. <view class="image">
  23. <image src="https://i.ringzle.com/file/20240313/f3d301b3bc4544ffaf5a0d96a761dd00.png" mode="">
  24. </image>
  25. </view>
  26. <view class="text">
  27. 批量操作
  28. </view>
  29. </view>
  30. </view>
  31. <!-- 区域筛选 -->
  32. <view class="contented" :style="{'height':(h-mt)+'px'}" v-show="areaShow">
  33. <view class="custom_popup">
  34. <view class="types">
  35. <view class="pricequjian" style="height: 240rpx;">
  36. <view class="jiage" v-for="(item, index) in list1" :key="index"
  37. @click="clickareaShow(item, index)">
  38. <view class="contentpeice">
  39. <view class="title" :class="{'Doublactive': areaShowIndex == index}">
  40. {{item.name}}
  41. </view>
  42. <view class="image" v-if="areaShowIndex == index">
  43. <image
  44. src="https://i.ringzle.com/file/20240316/16dd69efb40242de83da8207539ec73e.png"
  45. mode=""></image>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. <!-- 房型选择 -->
  55. <view class="type" v-for="item,index in roomType" :key="index">
  56. <view class="left" v-if="Selected==true">
  57. <view class="image">
  58. <image @tap="selectPerson()"
  59. :src="isSelect?'https://i.ringzle.com/file/20240228/c741a340e19642c59473e6f4a6d2f4be.png':'https://i.ringzle.com/file/20231027/db588133d67548fc82dfb0d128eac9a8.png'">
  60. </image>
  61. </view>
  62. </view>
  63. <view @click="goEditTypeInfo(item.houseBaseId)" style="width: 100%;">
  64. <view class="right">
  65. <view class="right-left">
  66. <image :src="item.image" mode=""></image>
  67. </view>
  68. <view class="right-right">
  69. <view class="top">
  70. <text style="font-size: 30rpx; color: #333;">{{item.name}}</text>
  71. </view>
  72. <view class="under">
  73. <view style="font-size: 24rpx; color: #777;">销量:300</view>
  74. <view style="font-size: 36rpx; color: #FF4141; font-weight: Bold; margin-top: 16rpx;">
  75. ¥{{item.price}}</view>
  76. </view>
  77. </view>
  78. </view>
  79. <view class="type-btn">
  80. <view class="type-btn-left">
  81. </view>
  82. <view class="type-btn-right">
  83. <view class="">
  84. 删除
  85. </view>
  86. <view class="">
  87. 改价格
  88. </view>
  89. <view class="">
  90. 下架
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. <!-- 批量按钮 -->
  97. <view class="btn-btn" v-if="Selected==true">
  98. <view class="bottom-btn">
  99. <view class="left">
  100. <view class="image">
  101. <image @tap="selectPerson()"
  102. :src="isSelect?'https://i.ringzle.com/file/20240228/c741a340e19642c59473e6f4a6d2f4be.png':'https://i.ringzle.com/file/20231027/db588133d67548fc82dfb0d128eac9a8.png'">
  103. </image>
  104. </view>
  105. <view class="text">
  106. 已选:1
  107. </view>
  108. </view>
  109. <view class="right">
  110. <view class="right-btn">
  111. 批量下架
  112. </view>
  113. <view class="right-btn" @click="Pricing()">
  114. 批量定价
  115. </view>
  116. </view>
  117. </view>
  118. </view>
  119. <u-popup :show="showPricing" @close="close" @open="open">
  120. <view class="pop-pop">
  121. </view>
  122. </u-popup>
  123. <view class="mainContain">
  124. <!-- <view class="nodata" v-if='dataList.length==0'>
  125. <NoData></NoData>
  126. </view> -->
  127. </view>
  128. </view>
  129. </template>
  130. <script>
  131. import TopTabs from '@/components/TopTabs/topTabs.vue';
  132. // import NoData from '../../components/NoData/index.vue';
  133. export default {
  134. components: {
  135. TopTabs,
  136. // NoData
  137. },
  138. data() {
  139. return {
  140. h: uni.getSystemInfoSync().windowHeight,
  141. mt: uni.getSystemInfoSync().statusBarHeight + 44,
  142. current: 0,
  143. tabList: [{
  144. name: '出售中'
  145. },
  146. {
  147. name: '待上架'
  148. },
  149. ],
  150. homestayId: uni.getStorageSync('homestayId') || 0,
  151. roomType: [{
  152. image: 'https://i.ringzle.com/file/20240316/03eec514efd64b528c183804124961e0.png',
  153. name: '4人套餐',
  154. price: '126'
  155. }],
  156. isSelect: false,
  157. Selected: false,
  158. showPricing: false,
  159. areaShow: false,
  160. list1: [{
  161. name: '创建时间'
  162. },
  163. {
  164. name: '上架时间'
  165. },
  166. {
  167. name: '价格从高到低'
  168. },
  169. {
  170. name: '价格从低到高'
  171. },
  172. // {
  173. // name: '销量从高到低'
  174. // },
  175. ],
  176. areaShowIndex: null,
  177. fromData: {
  178. homestayId: uni.getStorageSync('homestayId'),
  179. limit: 10,
  180. page: 1,
  181. order: '',
  182. orderField: "",
  183. status: 1
  184. }
  185. }
  186. },
  187. onLoad(option) {
  188. console.log(option);
  189. // if (uni.getStorageSync('merchantType') == 4) {
  190. this.getRepast()
  191. // } else {
  192. // }
  193. },
  194. methods: {
  195. getRepast() {
  196. this.$api.get('/merchant/hotel/repast/page', this.fromData).then(res => {
  197. console.log(res);
  198. })
  199. },
  200. // 区域筛选
  201. clickareaShow(e, i) {
  202. console.log('111111111111111111', e, i)
  203. this.areaShowIndex = i
  204. },
  205. // 上架时间
  206. areaShowed() {
  207. console.log(123);
  208. this.areaShow = !this.areaShow
  209. },
  210. changeTab1(index) {
  211. console.log(index);
  212. this.current = index;
  213. },
  214. // 批量显示
  215. showList() {
  216. this.Selected = !this.Selected
  217. },
  218. }
  219. }
  220. </script>
  221. <style lang="scss" scoped>
  222. .Doublactive {
  223. // background-color: #F0F7F6 !important;
  224. color: #007A69 !important;
  225. // border: 1px solid #007A69 !important;
  226. }
  227. .contented {
  228. width: 100%;
  229. padding: 0 24rpx;
  230. box-sizing: border-box;
  231. position: relative;
  232. }
  233. .custom_popup {
  234. width: 100%;
  235. height: 100%;
  236. background: rgba(0, 0, 0, .4);
  237. top: 0;
  238. left: 0;
  239. position: absolute;
  240. z-index: 999;
  241. .types {
  242. width: 100%;
  243. padding: 30rpx 30rpx 56rpx;
  244. box-sizing: border-box;
  245. background: #FFFFFF;
  246. .pricequjian {
  247. width: 100%;
  248. .contentpeice {
  249. width: 100%;
  250. display: flex;
  251. justify-content: space-between;
  252. margin: 15rpx 0;
  253. .title {
  254. font-weight: Regular;
  255. font-size: 28rpx;
  256. color: #333333;
  257. }
  258. .image {
  259. width: 28rpx;
  260. height: 20rpx;
  261. image {
  262. width: 100%;
  263. height: 100%;
  264. }
  265. }
  266. }
  267. }
  268. }
  269. }
  270. .pages {
  271. background: #F5F8FA;
  272. box-sizing: border-box;
  273. .tb {
  274. width: 100%;
  275. top: 0;
  276. left: 0;
  277. z-index: 999;
  278. .searchBoxParent {
  279. width: 100%;
  280. background: #fff;
  281. padding: 20rpx 24rpx 6rpx;
  282. box-sizing: border-box;
  283. .searchBox {
  284. width: 100%;
  285. background-color: #fff;
  286. }
  287. }
  288. .tabs {
  289. background: #fff;
  290. padding: 26rpx 0;
  291. display: flex;
  292. align-items: center;
  293. width: 100%;
  294. &>view {
  295. width: 25%;
  296. font-size: 28rpx;
  297. font-family: PingFangSC-Regular, PingFang SC;
  298. font-weight: 400;
  299. color: black;
  300. line-height: 40rpx;
  301. position: relative;
  302. text-align: center;
  303. }
  304. .active {
  305. font-size: 32rpx;
  306. font-family: PingFang-SC-Bold, PingFang-SC;
  307. font-weight: bold;
  308. color: black;
  309. line-height: 45rpx;
  310. }
  311. .active::after {
  312. position: absolute;
  313. content: '';
  314. width: 50rpx;
  315. height: 8rpx;
  316. background: #007A69;
  317. bottom: -26rpx;
  318. left: 60%;
  319. margin-left: -42rpx;
  320. }
  321. }
  322. }
  323. .green {}
  324. .mainContain {
  325. display: flex;
  326. flex-direction: column;
  327. padding: 0 20rpx;
  328. .nodata {
  329. background: white;
  330. }
  331. .card {
  332. background: #fff;
  333. border-radius: 16rpx;
  334. margin: 20rpx 0;
  335. padding: 20rpx;
  336. .header {
  337. display: flex;
  338. justify-content: space-between;
  339. border-bottom: 1px #f3f3f3 solid;
  340. padding: 20rpx;
  341. .red {
  342. color: indianred;
  343. }
  344. .green {
  345. color: #999999;
  346. }
  347. .blue {
  348. color: #1372FF;
  349. }
  350. .grey {
  351. color: #4C5F76;
  352. }
  353. .orange {
  354. color: #FF9100;
  355. }
  356. }
  357. .mainContent {
  358. // border-bottom: 1px #f3f3f3 solid;
  359. display: flex;
  360. padding: 20rpx 0;
  361. // justify-content: space-evenly;
  362. .image {
  363. background-repeat: no-repeat;
  364. background-size: cover;
  365. width: 198rpx;
  366. height: 180rpx;
  367. border-radius: 16rpx;
  368. }
  369. .middle {
  370. padding-top: 16rpx;
  371. color: #777777;
  372. // display: flex;
  373. // flex-direction: column;
  374. // justify-content: space-between;
  375. margin-left: 25rpx;
  376. width: 100%;
  377. .title {
  378. font-weight: 700;
  379. font-size: 32rpx;
  380. color: black;
  381. }
  382. .info {
  383. padding-top: 30rpx;
  384. color: #777777;
  385. // display: flex;
  386. // flex-direction: column;
  387. &>span {
  388. margin-top: 10rpx;
  389. }
  390. }
  391. }
  392. .price {
  393. color: red;
  394. text-align: center;
  395. height: 100%;
  396. align-items: center;
  397. align-self: center;
  398. font-size: 29rpx;
  399. font-weight: 700;
  400. }
  401. }
  402. .bottom {
  403. // padding: 30rpx 20rpx;
  404. display: flex;
  405. justify-content: flex-end;
  406. .detail {
  407. // border: 1rpx solid darkgrey;
  408. border-radius: 16rpx;
  409. color: darkgrey;
  410. padding: 13rpx 34rpx;
  411. background-color: #F6F6F6;
  412. font-size: 26rpx;
  413. color: #333333;
  414. font-weight: Regular;
  415. }
  416. .del {
  417. border-radius: 16rpx;
  418. color: darkgrey;
  419. padding: 13rpx 34rpx;
  420. background-color: #007A69;
  421. font-size: 26rpx;
  422. color: #fff;
  423. font-weight: Regular;
  424. }
  425. }
  426. }
  427. }
  428. }
  429. .u-input__content {
  430. margin-top: 22rpx !important;
  431. }
  432. .uicon-arrow-right,
  433. .uicon-close-circle-fill {
  434. margin-top: 32rpx !important;
  435. margin-right: 20rpx !important;
  436. }
  437. .pop-pop {
  438. height: 65vh;
  439. padding: 46rpx 20rpx 0;
  440. .hander-one {
  441. display: flex;
  442. justify-content: space-between;
  443. .text {
  444. font-size: 36rpx;
  445. color: #333333;
  446. font-weight: bold;
  447. }
  448. .del {}
  449. }
  450. .hander-two {
  451. display: flex;
  452. align-items: center;
  453. margin: 30rpx 0;
  454. .hander-two-text {
  455. font-size: 30rpx;
  456. color: #333333;
  457. font-weight: Regular;
  458. }
  459. .hander-two-image {
  460. display: flex;
  461. align-items: center;
  462. .image {
  463. margin: 0 10rpx;
  464. width: 30rpx;
  465. height: 30rpx;
  466. image {
  467. width: 100%;
  468. height: 100%;
  469. }
  470. }
  471. }
  472. }
  473. .hander-three {
  474. display: flex;
  475. border: 1rpx solid #CCCCCC;
  476. border-radius: 16rpx;
  477. justify-content: space-between;
  478. height: 102rpx;
  479. line-height: 102rpx;
  480. .hander-three-text {
  481. width: 200rpx;
  482. text-align: left;
  483. display: flex;
  484. justify-content: space-between;
  485. margin: 0 20rpx;
  486. }
  487. .hander-three-input {
  488. width: 55%;
  489. }
  490. .hander-three-icon {
  491. height: 102rpx;
  492. line-height: 102rpx;
  493. }
  494. }
  495. .hander-four {
  496. margin-top: 30rpx;
  497. display: flex;
  498. border-radius: 16rpx;
  499. justify-content: space-between;
  500. border: 1rpx solid #CCCCCC;
  501. height: 102rpx;
  502. line-height: 102rpx;
  503. .hander-three-text {
  504. width: 200rpx;
  505. text-align: center;
  506. display: flex;
  507. justify-content: space-between;
  508. margin: 0 20rpx;
  509. }
  510. .hander-three-input {
  511. width: 55%;
  512. }
  513. .hander-three-icon {
  514. height: 102rpx;
  515. line-height: 102rpx;
  516. }
  517. }
  518. }
  519. .page {
  520. background: #F3F4F4;
  521. padding-bottom: 260rpx;
  522. box-sizing: border-box;
  523. overflow-y: auto;
  524. overflow-x: auto;
  525. }
  526. .typeNum {
  527. // width: 100%;
  528. height: 73rpx;
  529. display: flex;
  530. justify-content: space-between;
  531. padding: 23rpx 24rpx;
  532. align-items: center;
  533. .left {
  534. display: flex;
  535. align-items: center;
  536. .active {
  537. color: #007A69;
  538. }
  539. }
  540. .right {
  541. display: flex;
  542. align-items: center;
  543. .image {
  544. margin: 0 10rpx;
  545. width: 30rpx;
  546. height: 30rpx;
  547. image {
  548. width: 100%;
  549. height: 100%;
  550. }
  551. }
  552. .text {
  553. font-size: 28rpx;
  554. font-weight: Regular;
  555. color: #333333;
  556. }
  557. }
  558. }
  559. .type {
  560. margin: 0 auto;
  561. border-radius: 10rpx 10rpx 10rpx 10rpx;
  562. width: 86%;
  563. // height: 114rpx;
  564. background-color: #fff;
  565. padding: 30rpx;
  566. margin-bottom: 20rpx;
  567. display: flex;
  568. .left {
  569. height: 114rpx;
  570. line-height: 200rpx;
  571. margin-right: 20rpx;
  572. .image {
  573. margin: 0 10rpx;
  574. width: 30rpx;
  575. height: 30rpx;
  576. image {
  577. width: 100%;
  578. height: 100%;
  579. }
  580. }
  581. }
  582. .right {
  583. width: 100%;
  584. display: flex;
  585. .right-left {
  586. width: 172rpx;
  587. height: 172rpx;
  588. border-radius: 16rpx;
  589. margin-right: 22rpx;
  590. image {
  591. width: 100%;
  592. height: 100%;
  593. border-radius: 16rpx;
  594. }
  595. }
  596. .right-right {}
  597. }
  598. .type-btn {
  599. width: 100%;
  600. display: flex;
  601. justify-content: space-between;
  602. .type-btn-left {
  603. width: 50rpx;
  604. }
  605. .type-btn-right {
  606. display: flex;
  607. view {
  608. padding: 15rpx 23rpx;
  609. background-color: #F6F6F6;
  610. font-size: 24rpx;
  611. color: #333;
  612. font-weight: Regular;
  613. margin-right: 20rpx;
  614. border-radius: 50rpx;
  615. }
  616. }
  617. }
  618. }
  619. .top {
  620. display: flex;
  621. justify-content: space-between;
  622. }
  623. .under {
  624. margin-top: 20rpx;
  625. // display: flex;
  626. // justify-content: space-between;
  627. }
  628. .btn-btn {
  629. width: 100%;
  630. height: 136rpx;
  631. background-color: #fff;
  632. position: fixed;
  633. bottom: 0;
  634. padding: 30rpx 0 0;
  635. // margin: 0 auto;
  636. z-index: 9;
  637. // margin-top: 30rpx;
  638. // margin-left: 30rpx;
  639. .bottom-btn {
  640. display: flex;
  641. justify-content: space-between;
  642. margin: 0 24rpx;
  643. .left {
  644. width: 25%;
  645. display: flex;
  646. align-items: center;
  647. .image {
  648. width: 38rpx;
  649. height: 38rpx;
  650. margin: 0 10rpx;
  651. image {
  652. width: 100%;
  653. height: 100%;
  654. }
  655. }
  656. }
  657. .right {
  658. width: 75%;
  659. display: flex;
  660. justify-content: space-evenly;
  661. .right-btn {
  662. width: 148rpx;
  663. height: 80rpx;
  664. line-height: 80rpx;
  665. background-color: #1372FF;
  666. border-radius: 16rpx;
  667. font-size: 26rpx;
  668. color: #fff;
  669. font-weight: Regular;
  670. text-align: center;
  671. }
  672. }
  673. }
  674. }
  675. .btn {
  676. margin: 0 auto;
  677. width: 690rpx;
  678. height: 96rpx;
  679. background-color: #1372FF;
  680. color: #fff;
  681. display: flex;
  682. justify-content: center;
  683. align-items: center;
  684. font-size: 34rpx;
  685. border-radius: 48rpx;
  686. }
  687. </style>