priceSetting.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <view class="content">
  3. <u-cell-group>
  4. <u-cell-item title="显示价格">
  5. <u-switch slot="right-icon" v-model="showPrice"></u-switch>
  6. </u-cell-item>
  7. <u-cell-item title="显示价格类型" value="请选择" @click="showPriceType=true"></u-cell-item>
  8. <u-cell-item title="员工是否可见进货价">
  9. <u-switch slot="right-icon" v-model="showJhPrice"></u-switch>
  10. </u-cell-item>
  11. </u-cell-group>
  12. <u-action-sheet :list="priceTypeList" v-model="showPriceType"></u-action-sheet>
  13. </view>
  14. </template>
  15. <script>
  16. import { findPriceShow } from '@/api/shelf'
  17. export default {
  18. data() {
  19. return {
  20. showPrice: false,
  21. showJhPrice: false,
  22. showPriceType: false,
  23. priceTypeList:[]
  24. }
  25. },
  26. onLoad() {
  27. this.getPrice('PRICE_SHOW')
  28. },
  29. onReady() {
  30. this.priceTypeList = this.$store.state.vuex_priceTypeList
  31. this.priceTypeList.map(item => {
  32. item.text = item.dispName
  33. item.fontSize = 30
  34. })
  35. console.log(this.$store.state)
  36. },
  37. methods: {
  38. getPrice(data){
  39. findPriceShow({paramCode:data}).then(res => {
  40. console.log(res)
  41. })
  42. }
  43. }
  44. }
  45. </script>
  46. <style lang="less">
  47. .content{
  48. width: 100%;
  49. height: 100vh;
  50. }
  51. </style>