gasApplyList.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <!--申请详情-->
  2. <template>
  3. <view id="transportPerson">
  4. <view class="title">
  5. <viwe class="title_l">申请时间:</viwe>
  6. <viwe class="title_r">{{createTime}}</viwe>
  7. </view>
  8. <view class="tabTitle">
  9. <view class="tabTitle_li" @tap="tabClick(index)" :key="index" v-for="(item,index) in tabText">
  10. <view :class="{on:curTab==index}" class="tabTitle_text">{{item}}</view>
  11. <view :class="{on:curTab==index}" class="tabTitle_across"></view>
  12. </view>
  13. </view>
  14. <scroll-view scroll-y @scrolltolower="scrollGet" class="scroll-box">
  15. <view class="list">
  16. <view class="list_li" v-for="(item,index) in dataList">
  17. <view class="list_li_l" >
  18. <view class="list_li_l_t">{{item.airName}}-{{item.configName}}</view>
  19. <view class="list_li_l_b">
  20. <img src="@/images/basicsModules/icon_14.png">
  21. <text>{{item.companyName}}</text>
  22. </view>
  23. <view v-if="pageType==2 || pageType==3" class="list_li_l_b">
  24. <img src="@/images/basicsModules/icon_aqbj_sj.png">
  25. <text v-if="pageType==2">入库时间:{{item.createTime}}</text>
  26. <text v-if="pageType==3">拒收时间:{{item.rejectionApplyTime}}</text>
  27. </view>
  28. <view v-if="pageType==3" class="list_li_l_b">
  29. <img src="@/pages_student/images/icon_sqxq_jsyy.png">
  30. <view class="cause"><text>拒收原因:</text><text>{{item.rejectionApplyRemark}}</text></view>
  31. </view>
  32. </view>
  33. <view v-if="pageType==0" class="list_li_r" @click="enterStockFun(item)">入库</view>
  34. </view>
  35. </view>
  36. </scroll-view>
  37. <view class="empty" v-if="pageType==4">
  38. <img class="for-back-img" src="@/pages_student/images/img_ysrygl_zwsj.png">
  39. <view>暂无数据</view>
  40. </view>
  41. </view>
  42. </template>
  43. <script>
  44. import { gasApplyDetailDrk,gasApplyDetailWps,gasApplyDetailYrk,gasApplyDetailYjs} from '@/api/apiDemo/index.js'
  45. export default {
  46. name: "transportPerson",
  47. data() {
  48. return {
  49. pageType:0,
  50. //列表请求参数
  51. getData:{
  52. pageNum:1,
  53. pageSize:20,
  54. },
  55. userType:uni.getStorageSync('userType'),
  56. pageType:0,
  57. curTab:0,
  58. tabText:['待入库','未派送','已入库','已拒收'],
  59. dataList:[],
  60. status:null,//0添加1编辑
  61. id:null,
  62. createTime:'',
  63. }
  64. },
  65. onLoad(option) {
  66. let item=JSON.parse(decodeURIComponent(option.item));
  67. this.createTime=item.createTime;
  68. this.id=item.id;
  69. },
  70. onShow() {
  71. },
  72. mounted(){
  73. this.getList()
  74. },
  75. methods: {
  76. //顶部tab点击
  77. tabClick(index) {
  78. this.curTab = index;
  79. this.pageType=index;
  80. this.dataList=[];
  81. if(this.pageType==0){
  82. this.getList()
  83. }else if(this.pageType==1){
  84. this.getList2()
  85. }else if(this.pageType==2){
  86. this.getList3()
  87. }else if(this.pageType==3){
  88. this.getList4()
  89. }
  90. },
  91. //待审核入库按钮
  92. enterStockFun(d){
  93. uni.redirectTo({
  94. url:'/pages_student/gasApply/awaitStorage?item='+encodeURIComponent(JSON.stringify(d))
  95. });
  96. },
  97. //滚动加载事件
  98. scrollGet(){
  99. },
  100. //待入库
  101. async getList(){
  102. let _this = this;
  103. const {data} = await gasApplyDetailDrk({id:_this.id});
  104. if(data.code==200){
  105. if(data.code==200){
  106. let res = data.data.list;
  107. _this.dataList=res
  108. }
  109. }
  110. },
  111. //未派送
  112. async getList2(){
  113. let _this = this;
  114. const {data} = await gasApplyDetailWps({id:_this.id});
  115. if(data.code==200){
  116. if(data.code==200){
  117. let res = data.data.list;
  118. _this.dataList=res
  119. }
  120. }
  121. },
  122. //已入库
  123. async getList3(){
  124. let _this = this;
  125. const {data} = await gasApplyDetailYrk({id:_this.id});
  126. if(data.code==200){
  127. if(data.code==200){
  128. let res = data.rows;
  129. _this.dataList=res
  130. }
  131. }
  132. },
  133. //已拒收
  134. async getList4(){
  135. let _this = this;
  136. const {data} = await gasApplyDetailYjs({id:_this.id});
  137. if(data.code==200){
  138. if(data.code==200){
  139. let res = data.rows;
  140. _this.dataList=res
  141. }
  142. }
  143. },
  144. }
  145. }
  146. </script>
  147. <style lang="stylus" scoped>
  148. #transportPerson {
  149. height: 100%;
  150. width: 100%;
  151. flex :1;
  152. display flex;
  153. flex-direction column
  154. overflow hidden;
  155. .title{
  156. width: 750rpx;
  157. height: 118rpx;
  158. background: #FFFFFF;
  159. padding: 0 40rpx;
  160. box-sizing: border-box;
  161. display: flex;
  162. justify-content: space-between;
  163. .title_l{
  164. font-size: 28rpx;
  165. font-family: PingFang SC;
  166. font-weight: 500;
  167. color: #999999;
  168. line-height: 118rpx;
  169. }
  170. .title_r{
  171. font-size: 28rpx;
  172. font-family: PingFang SC;
  173. font-weight: 500;
  174. color: #333333;
  175. line-height: 118rpx;
  176. }
  177. }
  178. .tabTitle{
  179. display flex;
  180. width:100%;
  181. height: 100rpx;
  182. .tabTitle_li{
  183. width:146rpx;
  184. text-align center;
  185. .tabTitle_text{
  186. display: inline-block;
  187. font-size: 28rpx;
  188. font-family: PingFang SC;
  189. font-weight: 500;
  190. color: #333333;
  191. line-height: 70rpx;
  192. &.on{
  193. color:#0183FA;
  194. }
  195. }
  196. .tabTitle_across{
  197. width: 50rpx;
  198. height: 6rpx;
  199. background: #0183FA;
  200. border-radius: 3rpx;
  201. margin-left 50rpx;
  202. display none;
  203. &.on{
  204. display block;
  205. }
  206. }
  207. }
  208. }
  209. .scroll-box{
  210. // flex:1;
  211. overflow-y scroll;
  212. .list{
  213. background: #FFFFFF;
  214. border-radius: 20rpx;
  215. margin: 0 20rpx;
  216. padding: 0 20rpx;
  217. box-sizing: border-box;
  218. .list_li{
  219. display: flex;
  220. justify-content: space-between;
  221. padding: 44rpx 0 28rpx 0;
  222. box-sizing: border-box;
  223. border-bottom:1px solid #f5f5f5;
  224. .list_li_l{
  225. flex: 1;
  226. .list_li_l_t{
  227. font-size: 28rpx;
  228. font-family: PingFang SC;
  229. font-weight: 500;
  230. color: #333333;
  231. line-height: 28rpx;
  232. }
  233. .list_li_l_b{
  234. display: flex;
  235. justify-content: flex-start;
  236. margin-top:38rpx;
  237. >img{
  238. width: 28rpx;
  239. height: 30rpx;
  240. margin-right: 18rpx;
  241. }
  242. >text{
  243. font-size: 24rpx;
  244. font-family: PingFang SC;
  245. font-weight: 400;
  246. color: #666666;
  247. line-height: 30rpx;
  248. }
  249. .cause{
  250. display: flex;
  251. flex: 1;
  252. >text{
  253. font-size: 24rpx;
  254. font-family: PingFang SC;
  255. font-weight: 400;
  256. color: #666666;
  257. line-height: 30rpx;
  258. }
  259. >text:nth-of-type(1){
  260. width: 200rpx;
  261. }
  262. >text:nth-of-type(2){
  263. display: block;
  264. }
  265. }
  266. }
  267. }
  268. .list_li_r{
  269. font-size: 28rpx;
  270. font-family: PingFang SC;
  271. font-weight: 500;
  272. color: #0183FA;
  273. line-height: 28rpx;
  274. margin-top: 26rpx;
  275. }
  276. }
  277. }
  278. }
  279. .empty{
  280. text-align: center;
  281. margin-top: 316rpx;
  282. >img{
  283. width: 336rpx;
  284. height: 222rpx;
  285. margin-left: 208rpx;
  286. }
  287. >view{
  288. font-size: 30rpx;
  289. font-family: PingFang SC;
  290. font-weight: 500;
  291. color: #E0E0E0;
  292. line-height: 30rpx;
  293. margin-top: 48rpx;
  294. }
  295. }
  296. }
  297. </style>