flowStep.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <template>
  2. <!-- 选择流转步骤 -->
  3. <view>
  4. <u-navbar title="选择流转步骤" autoBack placeholder></u-navbar>
  5. <view style="display: flex;flex-direction: column;">
  6. <view class="step_title_item frame" v-for="(item,index) in columns" :key="index" @click="selectStep(item)">
  7. <span>{{item}}</span>
  8. <u-icon name="arrow-right"></u-icon>
  9. </view>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. data() {
  16. return {
  17. columns: [],
  18. current: '',
  19. }
  20. },
  21. onLoad(value) {
  22. this.current = value.current
  23. },
  24. mounted() {
  25. var userInfo = this.$cache.getCache('userInfo')
  26. let arrData = []
  27. if (userInfo.provUser) {
  28. if (userInfo.provUser.isorders == 0 && userInfo.provUser.userType == 3) {
  29. // 送气员端
  30. if (this.current == '1') {
  31. arrData.push('门店确认未配送重瓶返库')
  32. } else if (this.current == '2') {
  33. arrData.push('门店回收空瓶')
  34. } else {
  35. arrData.push('门店回收不合格瓶')
  36. }
  37. } else if (userInfo.provUser.userType == 3) {
  38. // 门店端
  39. if (this.current == '1') {
  40. let arrmd = ['送气员领重瓶出库', '司机确认重瓶从门店出库']
  41. arrData = arrmd
  42. } else if (this.current == '2') {
  43. arrData.push('司机确认空瓶装车')
  44. } else {
  45. arrData.push('司机回收不合格瓶')
  46. }
  47. } else if (userInfo.provUser.userType == 4) {
  48. // 司机端
  49. if (this.current == '1') {
  50. let arrsj = ['门店确认重瓶卸货入库', '气站确认重瓶到达气站']
  51. arrData = arrsj
  52. } else if (this.current == '2') {
  53. arrData.push('气站确认空瓶到达气站')
  54. } else {
  55. let arrsjbhg = ['门店回收不合格瓶', '气站回收不合格瓶']
  56. arrData = arrsjbhg
  57. }
  58. } else if (userInfo.provUser.userType == 5) {
  59. // 气站端
  60. if (this.current == '1') {
  61. arrData.push('司机确定重瓶从气站出库')
  62. } else if (this.current == '2') {
  63. arrData.push('')
  64. } else {
  65. arrData.push('司机回收不合格瓶')
  66. }
  67. }
  68. } else {
  69. // 送气员端
  70. if (this.current == '1') {
  71. arrData.push('门店确认未配送重瓶返库')
  72. } else if (this.current == '2') {
  73. arrData.push('门店回收空瓶')
  74. } else {
  75. arrData.push('门店回收不合格瓶')
  76. }
  77. }
  78. this.columns = arrData
  79. },
  80. methods: {
  81. selectStep(value) {
  82. let flowId = ''
  83. if (value == '门店确认未配送重瓶返库') {
  84. flowId = '35'
  85. } else if (value == '门店回收空瓶') {
  86. flowId = '21'
  87. } else if (value == '门店回收不合格瓶') {
  88. flowId = 'md' + this.current
  89. } else if (value == '送气员领重瓶出库') {
  90. flowId = '25'
  91. } else if (value == '司机确认重瓶从门店出库') {
  92. flowId = '033'
  93. } else if (value == '司机确定重瓶从气站出库') {
  94. flowId = '17'
  95. } else if (value == '司机确认空瓶装车') {
  96. flowId = '11'
  97. } else if (value == '司机回收不合格瓶') {
  98. flowId = 'sj' + this.current
  99. } else if (value == '门店确认重瓶卸货入库') {
  100. flowId = '31'
  101. } else if (value == '气站确认重瓶到达气站') {
  102. flowId = '016'
  103. } else if (value == '气站确认空瓶到达气站') {
  104. flowId = '13'
  105. } else if (value == '门店回收不合格瓶') {
  106. flowId = 'md' + this.current
  107. } else if (value == '气站回收不合格瓶') {
  108. flowId = 'qz' + this.current
  109. }
  110. uni.navigateTo({
  111. url: '/pages/information/storePersonnel?flowId=' + flowId + '&flowName=' + value
  112. });
  113. }
  114. }
  115. }
  116. </script>
  117. <style lang="scss" scoped>
  118. .step_title_item {
  119. display: flex;
  120. justify-content: space-between;
  121. align-items: center;
  122. padding: 30rpx;
  123. }
  124. </style>