exportProcess.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <template>
  2. <view>
  3. <view class="head">
  4. <u-navbar title="出库审批"></u-navbar>
  5. <view class="tabs">
  6. <u-tabs bar-width="80" inactive-color="#777777" active-color="#101010":list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
  7. <view class="screen" @click="changeShow()">
  8. 筛选<u-icon size="24" name="arrow-down" color="#777777"></u-icon>
  9. </view>
  10. <view class="options" v-if="this.show==true" @click="changeShow()">
  11. 选项3
  12. </view>
  13. </view>
  14. </view>
  15. <view class="list1" >
  16. <view class="item" v-for="(item,i) in list[current].list" @click="ckInfo(item.id,current)" :key="i">
  17. <view class="title">
  18. {{item.projectName}}
  19. </view>
  20. <view class="group">
  21. <view class="name">
  22. 申请人:
  23. </view>
  24. <view class="value">
  25. {{item.createByName}}
  26. </view>
  27. </view>
  28. <view class="group">
  29. <view class="name">
  30. 申请时间:
  31. </view>
  32. <view class="value">
  33. {{item.createTime}}
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. import * as API from '@/apis/pagejs/approve.js'
  42. export default {
  43. data() {
  44. return {
  45. list: [{
  46. name: '审批中',
  47. pageIndex: 1,
  48. pageSize: 20,
  49. recordsTotal: 1,
  50. status:"0",
  51. list:[]
  52. }, {
  53. name: '已审批',
  54. pageIndex: 1,
  55. pageSize: 20,
  56. recordsTotal: 1,
  57. status:"1",
  58. list:[]
  59. }],
  60. current: 0,
  61. show:false
  62. }
  63. },
  64. onReachBottom() {
  65. var obj=this.menuList[this.current]
  66. if (obj.list.length < obj.recordsTotal) {
  67. this.myLoadmore();
  68. }
  69. },
  70. onReady(){
  71. this.getList()
  72. },
  73. methods: {
  74. getList(){
  75. uni.showLoading({
  76. title: "加载中",
  77. mask: true,
  78. })
  79. var list=this.list[this.current].list
  80. var obj=this.list[this.current]
  81. var listForm={...obj}
  82. delete listForm.list
  83. API.outApproveList(listForm).then((res) => {
  84. if(listForm.pageIndex==1){
  85. list = res.data.data;
  86. }else{
  87. list = [
  88. ...list,
  89. ...res.data.data
  90. ];
  91. }
  92. this.list[this.current].list=list
  93. this.list[this.current].recordsTotal = res.data.recordsTotal;
  94. uni.hideLoading();
  95. }).catch(error => {
  96. uni.showToast({
  97. title: error,
  98. icon: "none"
  99. })
  100. })
  101. },
  102. myLoadmore(){
  103. this.list[this.current].pageIndex += 1;
  104. this.getList();
  105. },
  106. init(){
  107. this.current=0
  108. this.list[0].pageIndex=1
  109. this.list[1].pageIndex=1
  110. this.getList()
  111. },
  112. ckInfo(id,status){
  113. var url="./deliveryDetails?id="+id;
  114. if(status!=0){
  115. url="./deliveryInfo?id="+id;
  116. }
  117. uni.navigateTo({
  118. url:url,
  119. events: {
  120. refreshData: () => {
  121. this.init()
  122. }
  123. }
  124. })
  125. },
  126. change(index) {
  127. this.current = index;
  128. var list=this.list[this.current].list
  129. if(list.length==0){
  130. this.getList();
  131. }
  132. },
  133. }
  134. }
  135. </script>
  136. <style lang="scss" scoped>
  137. page{
  138. padding-bottom: 100rpx;
  139. }
  140. .head{
  141. background: linear-gradient(180deg, rgba(190,211,240,1) 0%,rgba(244,244,246,1) 100%) ;
  142. height: 590rpx;
  143. padding: 0 32rpx;
  144. /deep/.u-navbar{
  145. background: 0!important;
  146. }
  147. /deep/.u-border-bottom:after{
  148. height: 0;
  149. }
  150. }
  151. .tabs{
  152. display: flex;
  153. justify-content: space-between;
  154. align-items: center;
  155. /deep/.u-tabs{
  156. background: 0 !important;
  157. width: 250rpx;
  158. }
  159. /deep/.u-tab-bar{
  160. background-color: #2A8EFB !important;
  161. }
  162. .screen{
  163. color: #415058;
  164. position: relative;
  165. font-family: Microsoft Yahei;
  166. /deep/.uicon-arrow-down{
  167. margin-left: 4rpx;
  168. }
  169. }
  170. .options{
  171. width: 120rpx;
  172. height: 60rpx;
  173. line-height: 60rpx;
  174. text-align: center;
  175. background-color: #fff;
  176. color: rgba(65, 80, 88, 1);
  177. font-family: Microsoft Yahei;
  178. position: absolute;
  179. top: 160rpx;
  180. right: 24rpx;
  181. box-shadow:5px 5px 10px gray;
  182. }
  183. }
  184. .list1,.list2{
  185. padding: 0 32rpx;
  186. margin-top: -400rpx;
  187. .item{
  188. border-radius: 8px;
  189. background-color: rgba(255, 255, 255, 1);
  190. padding: 32rpx;
  191. margin-bottom: 24rpx;
  192. .title{
  193. color: rgba(51, 51, 51, 1);
  194. font-size: 36rpx;
  195. margin-bottom: 16rpx;
  196. }
  197. .group{
  198. display: flex;
  199. color: rgba(119, 119, 119, 1);
  200. margin-top: 16rpx;
  201. font-weight: bold;
  202. }
  203. }
  204. }
  205. .bottom{
  206. position: fixed;
  207. bottom: 0;
  208. left: 0;
  209. right: 0;
  210. background-color: #fff;
  211. padding: 16rpx 32rpx;
  212. uni-button{
  213. height: 88rpx;
  214. line-height: 88rpx;
  215. border-radius: 8px;
  216. background: linear-gradient(180deg, rgba(22,119,255,1) 0%,rgba(16,98,213,1) 100%);
  217. color: rgba(255, 255, 255, 1);
  218. font-size: 32rpx;
  219. font-family: Microsoft Yahei;
  220. }
  221. }
  222. </style>