酷炫直播运营系统小程序版本

auditList.vue 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <template>
  2. <view class="audit_box">
  3. <!--未审核-->
  4. <view>
  5. <view class="audit_title flex">
  6. <view class="f40 fWeight600">未审核</view>
  7. <view class="lable bcg-EC7266">未审核</view>
  8. <view class="lMarauto c-446EF6 f24" @click="goAll_list(0)">查看全部</view>
  9. </view>
  10. <swiper v-if="shenhewei&&shenhewei.length>0" class="swiper" :indicator-dots="true" indicator-color="rgba(181, 181, 181, 1)" indicator-active-color="rgba(66, 148, 235, 1)" style="background-color: #373E4E">
  11. <view v-for="(b,index) in shenhewei" :key="index+'q'+b.id">
  12. <swiper-item>
  13. <view class="unit_pad">
  14. <view class="smallTitle">{{b.staff_name?b.staff_name:'-'}}的报销</view>
  15. <view v-for="b_info in b.examine_detail" :key="b_info.node_idx" class="flex f28 tMar30">
  16. <view class="iconfont icon-shenpi_icon"></view>
  17. <view>{{b_info.node_idx == 1 ? '一' : (b_info.node_idx == 2 ? '二' : b_info.node_idx == 3 ? '三' : '')}}级审核</view>
  18. (<view>{{b_info.executors}}</view>)
  19. <view class="lMarauto shenheNow" v-if="b_info.support_opt == 1" @click="auditEvent(index)">立即审核</view>
  20. <view class="lMarauto" :style="{color : b_info.status == 2 ? '#589C54' : '#B8B8B8'}" v-if="b_info.support_opt == 0">
  21. {{b_info.status == 1 ? '待审核' :
  22. (b_info.status == 2 ? '已通过' :
  23. (b_info.status == 3 ? '驳回' :
  24. (b_info.status == 0 ? '保存' :
  25. '异常')))}}
  26. </view>
  27. </view>
  28. </view>
  29. </swiper-item>
  30. </view>
  31. </swiper>
  32. <no-data v-else></no-data>
  33. </view>
  34. <!--已审核-->
  35. <view>
  36. <view class="audit_title flex">
  37. <view class="f40 fWeight600">已审核</view>
  38. <view class="lable bcg-2DA36E">已审核</view>
  39. <view class="lMarauto c-446EF6 f24" @click="goAll_list(1)">查看全部</view>
  40. </view>
  41. <swiper v-if="shenheyi&&shenheyi.length>0" class="swiper" :indicator-dots="true" indicator-color="rgba(181, 181, 181, 1)" indicator-active-color="rgba(66, 148, 235, 1)" style="background-color: #373E4E">
  42. <view v-for="(b,index) in shenheyi" :key="index+'d'+b.id">
  43. <swiper-item>
  44. <view class="unit_pad">
  45. <view class="smallTitle">{{b.staff_name?b.staff_name:'-'}}的报销</view>
  46. <view v-for="b_info in b.examine_detail" :key="b_info.node_idx" class="flex f28 tMar30">
  47. <view class="iconfont icon-shenpi_icon"></view>
  48. <view>{{b_info.node_idx == 1 ? '一' : (b_info.node_idx == 2 ? '二' : b_info.node_idx == 3 ? '三' : '')}}级审核</view>
  49. (<view>{{b_info.executors}}</view>)
  50. <view class="lMarauto shenheNow" v-if="b_info.support_opt == 1" @click="auditEvent(index,'shenheyi')">立即审核</view>
  51. <view class="lMarauto" :style="{color : b_info.status == 2 ? '#589C54' : '#B8B8B8'}" v-if="b_info.support_opt == 0">
  52. {{b_info.status == 1 ? '待审核' :
  53. (b_info.status == 2 ? '已通过' :
  54. (b_info.status == 3 ? '驳回' :
  55. (b_info.status == 0 ? '保存' :
  56. '异常')))}}
  57. </view>
  58. </view>
  59. </view>
  60. </swiper-item>
  61. </view>
  62. </swiper>
  63. <no-data v-else></no-data>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. export default {
  69. data(){
  70. return{
  71. shenhewei: [],
  72. shenheyi: [],
  73. }
  74. },
  75. methods:{
  76. auditEvent (index, type) {
  77. let info = this.shenhewei[index]
  78. if (type == 'shenheyi') {
  79. info = this.shenheyi[index]
  80. }
  81. uni.navigateTo({
  82. url: '../reimbursementList/submitApply?p_id=' + info.p_id + '&apply_id=' + info.s_id + '&source=audit'
  83. })
  84. },
  85. goAll_list (num) {
  86. uni.navigateTo({
  87. url: '../reimbursementList/audit?num=' + num
  88. })
  89. },
  90. get_auditList_yi (cb) {
  91. this.$req(this.$api.auditList, 'get', {
  92. is_examine: 1,
  93. show_detail: 1,
  94. page: 1,
  95. page_size: 6
  96. }, (res) => {
  97. cb ? cb() : ''
  98. if (res && res.errno == 0) {
  99. this.shenheyi = res.rst.data
  100. }
  101. },(err)=>{
  102. cb ? cb() : ''
  103. })
  104. },
  105. init_uType_equal3(){
  106. // this.get_auditList()//审核别人的报销单列表,未审核
  107. // this.get_auditList_yi()//已审核
  108. let pro1 = new Promise((resolve, reject)=>{
  109. this.get_auditList(()=>{
  110. resolve()
  111. })
  112. })
  113. let pro2 = new Promise((resolve, reject)=>{
  114. this.get_auditList_yi(()=>{
  115. resolve()
  116. })
  117. })
  118. Promise.all([pro1,pro2]).then(()=>{
  119. this.$hide_init_loading()
  120. uni.stopPullDownRefresh()
  121. this.$emit('auditTimerEdit',
  122. setTimeout(()=>{
  123. this.init_uType_equal3()
  124. },10*1000)
  125. )
  126. })
  127. },
  128. get_auditList (cb) {
  129. this.$req(this.$api.auditList, 'get', {
  130. is_examine: 0,
  131. show_detail: 1,
  132. page: 1,
  133. page_size: 6
  134. }, (res) => {
  135. cb ? cb() : ''
  136. if (res && res.errno == 0) {
  137. this.shenhewei = res.rst.data
  138. }
  139. },(err)=>{
  140. cb ? cb() : ''
  141. })
  142. },
  143. }
  144. }
  145. </script>
  146. <style scoped lang="scss">
  147. .audit_box {
  148. background-color: #333947;
  149. .swiper {
  150. min-height: 160rpx;
  151. height: 340rpx;
  152. }
  153. .audit_title {
  154. padding: 40rpx 34rpx;
  155. .lable {
  156. font-size: 28rpx;
  157. padding: 4rpx 10rpx;
  158. border-radius: 4px;
  159. margin-left: 26rpx;
  160. }
  161. }
  162. .icon-shenpi_icon {
  163. color: #828282;
  164. font-size: 30rpx;
  165. margin-right: 10rpx;
  166. }
  167. .shenheNow {
  168. background: #2e67ff;
  169. border-radius: 6rpx;
  170. padding: 4rpx 12rpx;
  171. }
  172. .unit_pad {
  173. padding: 20 rpx 32 rpx;
  174. }
  175. .smallTitle {
  176. font-size: 28rpx;
  177. font-weight: 600;
  178. }
  179. }
  180. </style>