modify.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <view>
  3. <view class="app-casher-area">
  4. <view class="nav-left"> </view>
  5. <!-- 已选花材列表 -->
  6. <view class="itemList-box">
  7. <leftItem></leftItem>
  8. </view>
  9. <!-- 分类和花材图片 -->
  10. <view class="all-item-area">
  11. <rightItemArea> </rightItemArea>
  12. </view>
  13. <!-- 按钮操作 -->
  14. <view class="open-box">
  15. <view class="button-area">
  16. <view @click="clearItemFn">清空</view>
  17. <view @click="confirmModify">确认</view>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. import { mapGetters } from "vuex";
  25. import rightItemArea from './components/rightItemArea.vue'
  26. import leftItem from './components/leftItem.vue'
  27. import productMins from "@/mixins/product";
  28. export default {
  29. name: "modify",
  30. components: { rightItemArea,leftItem},
  31. mixins: [productMins],
  32. data() {
  33. return {
  34. //0成品 1花材
  35. currentProperty:0,
  36. itemList:[],
  37. currenSelectShop:{},
  38. selectItem: {},
  39. selectItemUser:{},
  40. isLogin:2,
  41. customId:0,
  42. selectJobType:'bill',
  43. selectJobId:0,
  44. chooseCustomer:false
  45. }
  46. },
  47. computed: {
  48. ...mapGetters(["getLoginInfo"])
  49. },
  50. onLoad() {
  51. this.initDataFromStorage()
  52. },
  53. onPullDownRefresh() {
  54. },
  55. onShow() {
  56. },
  57. mounted() {
  58. if(this.$util.isEmpty(this.getLoginInfo.admin) || this.getLoginInfo.admin.currentShopId == 0){
  59. this.isLogin = 0
  60. }else{
  61. this.isLogin = 1
  62. }
  63. },
  64. watch:{
  65. getLoginInfo: {
  66. handler(newValue) {
  67. if(this.$util.isEmpty(newValue.admin) == false && newValue.admin.currentShopId > 0){
  68. this.isLogin = 1
  69. }else{
  70. this.isLogin = 0
  71. }
  72. }
  73. }
  74. },
  75. methods: {
  76. confirmModify(){
  77. uni.navigateBack({delta: 1})
  78. },
  79. changeProperty(property){
  80. this.currentProperty = property
  81. },
  82. resetCustomer(){
  83. this.chooseCustomer = true
  84. },
  85. selectCustomer(info){
  86. this.customId = info.id ? parseInt(info.id) : 0
  87. this.selectJobId = this.customId
  88. },
  89. init() {
  90. },
  91. }
  92. };
  93. </script>
  94. <style lang="scss" scoped>
  95. .app-casher-area {
  96. display: flex;
  97. height: 100vh;
  98. & .all-item-area {
  99. flex: 76;
  100. }
  101. & .nav-left {
  102. flex: 5;
  103. background-color: rgba(72, 91, 107, 1);
  104. }
  105. & .itemList-box {
  106. flex: 30;
  107. }
  108. & .open-box {
  109. flex: 8;
  110. .button-area {
  111. height: 100vh;
  112. display: flex;
  113. flex-direction: column;
  114. justify-content: space-around;
  115. padding: 5upx;
  116. padding-top: 12upx;
  117. & > view {
  118. border: 1upx solid #CCCCCC;
  119. border-radius: 5upx;
  120. text-align: center;
  121. padding: 10upx 0;
  122. color: #666666;
  123. margin-bottom: 10upx;
  124. font-size: 10upx;
  125. text-align: center;
  126. &.active {
  127. color: #008000;
  128. border-color: #008000;
  129. border-radius: 2upx;
  130. }
  131. }
  132. }
  133. }
  134. }
  135. </style>