business-audit.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <template>
  2. <view class="content">
  3. <view class="title">
  4. <view class="item" :class="active_item == 0?'active':''" @click="click_btn(0)">待审核</view>
  5. <view class="item" :class="active_item == 1?'active':''" @click="click_btn(1)">已审核</view>
  6. </view>
  7. <view class="list" v-if="active_item == 0">
  8. <view class="item" v-for="(item,index) in list" :key="index" v-if="item.staff_state == 0">
  9. <view class="top">
  10. <view class="user">
  11. <!-- <view class="img">
  12. <image :src="item.staff_avatar" mode="aspectFill"></image>
  13. </view> -->
  14. <view class="info">
  15. <view class="text">{{item.name}}</view>
  16. <view class="text">编号:#{{item.id}} {{item.created_at}}</view>
  17. </view>
  18. </view>
  19. <view class="state" v-if="item.staff_state == 0">待审核</view>
  20. </view>
  21. <view class="inner">
  22. <view class="class_name">{{item.classify}}</view>
  23. <view class="name">{{item.title}}</view>
  24. <view class="tip">{{item.introduce}}</view>
  25. </view>
  26. <view class="bottom">
  27. <view class="btn" @click="go_shenhe(item.id,item.title)">审核</view>
  28. </view>
  29. </view>
  30. </view>
  31. <view class="list" v-if="active_item == 1">
  32. <view class="item" v-for="(item,index) in list" :key="index" v-if="item.staff_state == 1" :style="item.state == 3?'border-top: 2px solid red;':''">
  33. <view class="top">
  34. <view class="user">
  35. <!-- <view class="img">
  36. <image :src="item.staff_avatar" mode="aspectFill"></image>
  37. </view> -->
  38. <view class="info">
  39. <view class="text">{{item.name}}</view>
  40. <view class="text">编号:#{{item.id}} {{item.created_at}}</view>
  41. </view>
  42. </view>
  43. <view class="state" v-if="item.state == 1 && item.staff_state == 1" style="color: #00D983;">已审核</view>
  44. <view class="state" v-if="item.state == 2" style="color: #00D983;">{{item.status}}</view>
  45. <view class="state" v-if="item.state == 3" style="color: red;">{{item.status}}</view>
  46. </view>
  47. <view class="inner">
  48. <view class="class_name">{{item.classify}}</view>
  49. <view class="name">{{item.title}}</view>
  50. <view class="tip">{{item.introduce}}</view>
  51. </view>
  52. <view class="bottom" v-if="active_item == 1">
  53. <view class="btn" @click="go_shenhe(item.id,item.title)">审核</view>
  54. </view>
  55. <view class="bottom" v-if="active_item == 2">
  56. <view class="btn" style="background-color: #009FE8;" @click="go_chakan(item.id,item.title)">查看</view>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </template>
  62. <script>
  63. export default {
  64. data() {
  65. return {
  66. active_item:0,
  67. list:[],
  68. page:1,
  69. page_size:10,
  70. state:0
  71. };
  72. },
  73. onLoad() {
  74. // this.get_worksheet_check_listmei()
  75. },
  76. onShow() {
  77. this.get_worksheet_check_listmei()
  78. },
  79. onReachBottom(){
  80. console.log("++")
  81. this.page++
  82. this.get_worksheet_check_listmei()
  83. },
  84. methods:{
  85. // 切换列表
  86. click_btn(item){
  87. this.active_item = item
  88. this.state = item
  89. this.page = 1
  90. this.list = []
  91. // 刷新数据
  92. if(item == 0){
  93. this.get_worksheet_check_listmei()
  94. }else if(item == 1){
  95. this.get_worksheet_check_listmei()
  96. }
  97. },
  98. go_shenhe(id,title){
  99. uni.navigateTo({
  100. url:"shenhe/shenhe?id=" + id + "&title=" + title
  101. })
  102. },
  103. go_chakan(id,title){
  104. uni.navigateTo({
  105. url:"chakan/chakan?id=" + id + "&title=" + title
  106. })
  107. },
  108. get_worksheet_check_listmei(){
  109. uni.showLoading()
  110. this.$api.worksheet_check_listmei({
  111. page:this.page,
  112. size:this.page_size,
  113. state:this.state,
  114. }).then((res)=>{
  115. console.log(res)
  116. console.log(res.data.data)
  117. this.list = this.list.concat(res.data.data)
  118. uni.hideLoading()
  119. })
  120. },
  121. }
  122. }
  123. </script>
  124. <style lang="scss">
  125. .content{
  126. width: 749rpx;
  127. }
  128. .title{
  129. position: fixed;
  130. top: 1;
  131. left: 0rpx;
  132. z-index: 999;
  133. background-color: #FFFFFF;
  134. height: 43px;
  135. display: flex;
  136. border-bottom: 1px solid #E4E4E4;
  137. .item{
  138. width: 374rpx;
  139. line-height: 43px;
  140. text-align: center;
  141. font-size: 16px;
  142. color: #BDC3C7;
  143. }
  144. .active{
  145. border-bottom: 2px solid #16A085;
  146. color: #16A085;
  147. }
  148. }
  149. .list{
  150. box-sizing: border-box;
  151. padding: 24rpx;
  152. padding-top: 53px;
  153. .item{
  154. width: 700rpx;
  155. border-radius: 6px;
  156. border: 1px solid #EDEFF9;
  157. border-top: 2px solid #00D983;
  158. box-sizing: border-box;
  159. padding: 10px 25rpx;
  160. margin-bottom: 15px;
  161. .top{
  162. display: flex;
  163. justify-content: space-between;
  164. .user{
  165. display: flex;
  166. .img{
  167. width: 60px;
  168. height: 60px;
  169. border-radius: 50%;
  170. overflow: hidden;
  171. image{
  172. width: 60px;
  173. height: 60px;
  174. }
  175. }
  176. .info{
  177. margin-left: 10rpx;
  178. height: 60px;
  179. .text{
  180. line-height: 25px;
  181. font-size: 12px;
  182. }
  183. }
  184. }
  185. .state{
  186. width: 150rpx;
  187. text-align: right;
  188. line-height: 25px;
  189. font-size: 12px;
  190. color: #2ECC71;
  191. }
  192. }
  193. .inner{
  194. margin: 10px auto;
  195. width: 650rpx;
  196. border: 1px solid #EDEFF9;
  197. border-radius: 6px;
  198. box-sizing: border-box;
  199. padding: 10px;
  200. font-size: 12px;
  201. .class_name{
  202. line-height: 20px;
  203. color: #3498DB;
  204. }
  205. .name{
  206. line-height: 20px;
  207. }
  208. .tip{
  209. line-height: 20px;
  210. text-indent: 2em;
  211. }
  212. }
  213. .bottom{
  214. text-align: right;
  215. .btn{
  216. display: inline-block;
  217. width: 80px;
  218. text-align: center;
  219. line-height: 30px;
  220. font-size: 12px;
  221. color: #FFFFFF;
  222. background-color: #16A085;
  223. }
  224. }
  225. }
  226. }
  227. </style>