amendAir.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  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="item.location" disabled type="text" >
  9. </view>
  10. <view class="register_li_min">
  11. <view>学院:</view>
  12. <input v-model="item.location" disabled type="text" >
  13. </view>
  14. <view class="register_li_min" style="border: none;">
  15. <view>实验地点:</view>
  16. <input v-model="item.location" disabled type="text" >
  17. </view>
  18. </view>
  19. <view class="register_li2">
  20. <view class="register_li_min">
  21. <view></view>
  22. <view>实际气压:</view>
  23. <input v-model="form.afterEdit" type="text" placeholder="请输入实际气压">
  24. </view>
  25. </view>
  26. <view class="sub_btn" @click="submitForm()">提交</view>
  27. </view>
  28. </template>
  29. <script>
  30. import { gasBottleError } from '@/api/index.js'
  31. import { config } from '@/api/request/config.js'
  32. export default {
  33. name: "gasRecycle",
  34. data() {
  35. return {
  36. baseUrl:config.base_url,
  37. pageType:0,
  38. //列表请求参数
  39. getData:{
  40. pageNum:1,
  41. pageSize:20,
  42. },
  43. userType:uni.getStorageSync('userType'),
  44. form:{
  45. },
  46. dataList:[],
  47. imgList:[],
  48. item:{},
  49. item2:{},
  50. specificationName:{},
  51. }
  52. },
  53. onLoad(option) {
  54. if(option.item){
  55. this.item=JSON.parse(decodeURIComponent(option.item));
  56. this.item2=JSON.parse(decodeURIComponent(option.item2));
  57. this.specificationName=JSON.parse(decodeURIComponent(option.specificationName));
  58. }
  59. },
  60. onShow() {
  61. },
  62. mounted(){
  63. },
  64. methods: {
  65. //提交
  66. async submitForm(){
  67. let _this = this;
  68. _this.form.storageId=_this.item.id
  69. _this.form.location=_this.item.location
  70. _this.form.locationId=_this.item.locationId
  71. _this.form.beforeEdit=_this.item2.beforeUse
  72. const {data} = await gasBottleError(_this.form);
  73. if(data.code == 200){
  74. uni.showToast({
  75. title: '修改气压成功!',
  76. icon:"none",
  77. mask:true,
  78. duration: 2000
  79. });
  80. setTimeout(function(){
  81. uni.redirectTo({
  82. url: '/pages_manage/gasManage/gasManage'
  83. });
  84. },2000);
  85. }
  86. },
  87. }
  88. }
  89. </script>
  90. <style lang="stylus" scoped>
  91. #gasRecycle {
  92. height: auto;
  93. width: 100%;
  94. flex :1;
  95. display flex;
  96. flex-direction column;
  97. overflow hidden;
  98. padding-bottom: 400rpx;
  99. .title{
  100. width: 750rpx;
  101. height: 100rpx;
  102. background: #FFFFFF;
  103. font-size: 28rpx;
  104. font-family: PingFang SC;
  105. font-weight: 500;
  106. color: #333333;
  107. line-height: 100rpx;
  108. padding-left: 40rpx;
  109. }
  110. .register_li{
  111. background #fff;
  112. border-radius:20rpx;
  113. margin:20rpx 20rpx 0;
  114. padding:20rpx 0;
  115. box-sizing: border-box;
  116. .register_li_min{
  117. margin:0 26rpx;
  118. display flex;
  119. align-items center;
  120. border-bottom: 1px solid #F5F5F5;
  121. .icon_img{
  122. width: 30rpx;
  123. height: 30rpx;
  124. margin-right: 12rpx;
  125. }
  126. view{
  127. //width:140rpx;
  128. font-size: 28rpx;
  129. font-family: PingFang SC;
  130. font-weight: 500;
  131. color: #999999;
  132. line-height: 100rpx;
  133. }
  134. >input{
  135. flex:1;
  136. text-align: right;
  137. font-size: 24rpx;
  138. font-family: PingFang SC;
  139. font-weight: 500;
  140. color: #333333;
  141. }
  142. }
  143. }
  144. .register_li2{
  145. background #fff;
  146. border-radius:20rpx;
  147. margin:20rpx 20rpx 0;
  148. padding:20rpx 0;
  149. box-sizing: border-box;
  150. .register_li_min{
  151. margin:0 26rpx;
  152. display flex;
  153. align-items center;
  154. .icon_img{
  155. width: 30rpx;
  156. height: 30rpx;
  157. margin-right: 12rpx;
  158. }
  159. view:nth-child(1){
  160. color:red;
  161. line-height:28rpx;
  162. margin-right: 12rpx;
  163. }
  164. view{
  165. //width:140rpx;
  166. font-size: 28rpx;
  167. font-family: PingFang SC;
  168. font-weight: 500;
  169. color: #333333;
  170. line-height: 100rpx;
  171. }
  172. >input{
  173. flex:1;
  174. text-align: right;
  175. font-size: 24rpx;
  176. font-family: PingFang SC;
  177. font-weight: 500;
  178. color: #999999;
  179. }
  180. .issue_img{
  181. width: 210rpx;
  182. height: 210rpx;
  183. border-radius: 10rpx;
  184. margin:36rpx 0 20rpx 280rpx;
  185. }
  186. }
  187. }
  188. /* 按钮 */
  189. .sub_btn{
  190. width: 650rpx;
  191. height: 100rpx;
  192. background: #0183FA;
  193. border-radius: 20rpx;
  194. font-size: 28rpx;
  195. font-family: PingFang SC;
  196. font-weight: 500;
  197. color: #FFFFFF;
  198. line-height: 100rpx;
  199. text-align: center;
  200. margin-left: 50rpx;
  201. position: fixed;
  202. bottom:30rpx;
  203. }
  204. }
  205. </style>