gasListDetail.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  1. <!--气瓶列表-->
  2. <template>
  3. <view id="gasRecycle">
  4. <view class="title">{{specificationName.airName}}-{{specificationName.gasLevel}}</view>
  5. <view class="register_li">
  6. <view class="register_li_min">
  7. <view>实验地点:</view>
  8. <input v-model="form.location" disabled type="text" >
  9. </view>
  10. <view class="register_li_min">
  11. <view>编号:</view>
  12. <input v-model="form.airNumber" disabled type="text" >
  13. </view>
  14. <view class="register_li_min" v-if="form.electronicTag" style="border: none;">
  15. <view>电子标签:</view>
  16. <input v-model="form.electronicTag" disabled type="text" >
  17. <view class="binding" @click="binding()">更换</view>
  18. </view>
  19. <view class="register_li_min" v-if="!form.electronicTag" style="border: none;">
  20. <view>电子标签:</view>
  21. <input v-model="form.electronicTag" disabled type="text" placeholder="暂未绑定电子标签">
  22. <view class="binding" @click="binding()">去绑定</view>
  23. </view>
  24. </view>
  25. <scroll-view scroll-y @scrolltolower="scrollGet" class="scroll-box">
  26. <view class="small_title" @click="handleClick('useRecord')">使用记录</view>
  27. <view class="register_li2" >
  28. <viwe class="register_li2_min" @tap="useRecordInfo(item)" v-for="(item,index) in dataList">
  29. <view class="register_li2_t">{{item.contacts}}</view>
  30. <view class="register_li2_b">
  31. <img src="@/pages_manage/images/icon_qpgl_syl.png">
  32. <view>使用量: {{item.amount}}Mpa</view>
  33. </view>
  34. <view class="register_li2_b2">
  35. <img src="@/images/basicsModules/icon_wtzg_sj.png">
  36. <view>使用时间: {{item.useTimeApp==null?'':item.useTimeApp}}-{{item.backTimeApp==null?'':item.backTimeApp}}</view>
  37. </view>
  38. </viwe>
  39. </view>
  40. </scroll-view>
  41. <view class="empty" v-if="pageType==4">
  42. <img class="for-back-img" src="@/pages_manage/images/img_ysrygl_zwsj.png">
  43. <view>暂无数据</view>
  44. </view>
  45. <view class="sub_btn" @click="outStock()"> 申请出库</view>
  46. </view>
  47. </template>
  48. <script>
  49. import {gasDetail,gasDetailRecord } from '@/api/apiDemo/index.js'
  50. export default {
  51. name: "gasRecycle",
  52. data() {
  53. return {
  54. pageType:0,
  55. //列表请求参数
  56. getData:{
  57. pageNum:1,
  58. pageSize:10,
  59. storageId:'',
  60. },
  61. form:{
  62. },
  63. dataList:[],
  64. id:'',
  65. item:{},
  66. specificationName:{},
  67. }
  68. },
  69. onLoad(option) {
  70. this.item=JSON.parse(decodeURIComponent(option.item));
  71. this.id=this.item.bottleStorageId;
  72. this.getData.storageId=this.item.bottleStorageId;
  73. },
  74. onShow() {
  75. },
  76. mounted(){
  77. this.getInfo();
  78. this.getList();
  79. },
  80. methods: {
  81. //滚动加载事件
  82. scrollGet(){
  83. if(this.getData.getType){
  84. this.getData.pageNum += 1;
  85. this.getList();
  86. }
  87. },
  88. //使用记录详情
  89. useRecordInfo(d){
  90. uni.navigateTo({
  91. url:'/pages_manage/gasBottle/gasList/gasUseDetail?item='+encodeURIComponent(JSON.stringify(d))
  92. });
  93. },
  94. //标签绑定
  95. binding(){
  96. uni.navigateTo({
  97. url:'/pages_manage/gasBottle/gasList/gasListBinding?item='+encodeURIComponent(JSON.stringify(this.item))
  98. });
  99. },
  100. //出库申请
  101. outStock(){
  102. uni.navigateTo({
  103. url:'/pages_manage/gasBottle/leaveConfirm/leaveConfirm?item='+encodeURIComponent(JSON.stringify(this.item))
  104. });
  105. },
  106. async getInfo(){
  107. let _this=this;
  108. const {data} = await gasDetail({id:_this.id});
  109. if(data.code==200){
  110. let res = data.data;
  111. _this.form=res;
  112. _this.specificationName=JSON.parse(res.specificationName)
  113. }
  114. },
  115. //获取列表数据
  116. async getList(){
  117. let _this = this;
  118. const {data} = await gasDetailRecord(this.getData);
  119. if(data.code==200){
  120. let res=data.rows
  121. _this.dataList=res
  122. if(_this.dataList.length<=0){
  123. _this.pageType=4
  124. }
  125. }
  126. },
  127. }
  128. }
  129. </script>
  130. <style lang="stylus" scoped>
  131. #gasRecycle {
  132. height: auto;
  133. width: 100%;
  134. flex :1;
  135. display flex;
  136. flex-direction column
  137. overflow hidden;
  138. padding-bottom: 220rpx;
  139. .empty{
  140. text-align: center;
  141. margin-top: 46rpx;
  142. >img{
  143. width: 336rpx;
  144. height: 222rpx;
  145. margin-left: 208rpx;
  146. }
  147. >view{
  148. font-size: 30rpx;
  149. font-family: PingFang SC;
  150. font-weight: 500;
  151. color: #E0E0E0;
  152. line-height: 30rpx;
  153. margin-top: 48rpx;
  154. }
  155. }
  156. .title{
  157. width: 750rpx;
  158. height: 100rpx;
  159. background: #FFFFFF;
  160. font-size: 28rpx;
  161. font-family: PingFang SC;
  162. font-weight: 500;
  163. color: #333333;
  164. line-height: 100rpx;
  165. padding-left: 40rpx;
  166. }
  167. .register_li{
  168. background #fff;
  169. border-radius:20rpx;
  170. margin:20rpx 20rpx 0;
  171. padding:20rpx 0;
  172. box-sizing: border-box;
  173. .register_li_min{
  174. height: 100rpx;
  175. margin:0 26rpx;
  176. display flex;
  177. align-items center;
  178. border-bottom: 1px solid #F5F5F5;
  179. .icon_img{
  180. width: 30rpx;
  181. height: 30rpx;
  182. margin-right: 12rpx;
  183. }
  184. view{
  185. //width:140rpx;
  186. font-size: 28rpx;
  187. font-family: PingFang SC;
  188. font-weight: 500;
  189. color: #999999;
  190. }
  191. >input{
  192. flex:1;
  193. text-align: right;
  194. font-size: 24rpx;
  195. font-family: PingFang SC;
  196. font-weight: 500;
  197. color: #333333;
  198. }
  199. .binding{
  200. font-size: 24rpx;
  201. font-family: PingFang SC;
  202. font-weight: 500;
  203. color: #0183FA;
  204. line-height: 24rpx;
  205. margin-left: 24rpx;
  206. }
  207. }
  208. .issue_li{
  209. margin:34rpx 26rpx 0;
  210. display flex;
  211. border-bottom: 1px solid #F5F5F5;
  212. view:nth-child(1){
  213. color:red;
  214. line-height:28rpx;
  215. margin-right: 12rpx;
  216. }
  217. view:nth-child(2){
  218. //width:140rpx;
  219. font-size: 28rpx;
  220. font-family: PingFang SC;
  221. font-weight: 500;
  222. color: #999999;
  223. }
  224. .issue_img{
  225. width: 210rpx;
  226. height: 210rpx;
  227. border-radius: 10rpx;
  228. margin-left:250rpx;
  229. }
  230. }
  231. }
  232. .scroll-box{
  233. // flex:1;
  234. overflow-y scroll;
  235. margin-top: 20rpx;
  236. .small_title{
  237. font-size: 30rpx;
  238. font-family: PingFang SC;
  239. font-weight: 500;
  240. color: #333333;
  241. line-height: 80rpx;
  242. margin: 0 40rpx;
  243. display: flex;
  244. justify-content: space-between;
  245. align-items: center;
  246. >img{
  247. width: 24rpx;
  248. height: 24rpx;
  249. }
  250. }
  251. .register_li2{
  252. overflow: hidden
  253. background #fff;
  254. border-radius:20rpx;
  255. margin:0 20rpx 0;
  256. padding:0 20rpx;
  257. box-sizing: border-box;
  258. .register_li2_min{
  259. .register_li2_t{
  260. font-size: 28rpx;
  261. font-family: PingFang SC;
  262. font-weight: 500;
  263. color: #333333;
  264. line-height: 28rpx;
  265. margin-top: 28rpx;
  266. }
  267. .register_li2_b{
  268. display: flex;
  269. justify-content: flex-start;
  270. align-items: center;
  271. margin-top: 42rpx;
  272. padding-bottom: 28rpx;
  273. >img{
  274. width: 28rpx;
  275. height: 28rpx;
  276. margin-right: 10rpx;
  277. }
  278. >view{
  279. font-size: 26rpx;
  280. font-family: PingFang SC;
  281. font-weight: 500;
  282. color: #666666;
  283. line-height: 26rpx;
  284. }
  285. >view:nth-child(1){
  286. width: 200rpx;
  287. }
  288. >view:nth-child(2){
  289. flex: 1;
  290. }
  291. }
  292. .register_li2_b2{
  293. display: flex;
  294. justify-content: flex-start;
  295. align-items: center;
  296. padding-bottom: 28rpx;
  297. border-bottom: 1rpx solid #f5f5f5;
  298. >img{
  299. width: 28rpx;
  300. height: 28rpx;
  301. margin-right: 10rpx;
  302. }
  303. >view{
  304. font-size: 26rpx;
  305. font-family: PingFang SC;
  306. font-weight: 500;
  307. color: #666666;
  308. line-height: 26rpx;
  309. }
  310. >view:nth-child(1){
  311. width: 200rpx;
  312. }
  313. >view:nth-child(2){
  314. flex: 1;
  315. }
  316. }
  317. }
  318. }
  319. }
  320. /* 按钮 */
  321. .sub_btn{
  322. width: 650rpx;
  323. height: 100rpx;
  324. background: #0183FA;
  325. border-radius: 20rpx;
  326. font-size: 28rpx;
  327. font-family: PingFang SC;
  328. font-weight: 500;
  329. color: #FFFFFF;
  330. line-height: 100rpx;
  331. text-align: center;
  332. margin-left: 50rpx;
  333. position: fixed;
  334. bottom:30rpx;
  335. }
  336. }
  337. </style>