exportApplication.vue 4.9 KB

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