flowStep.vue 3.8 KB

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