gasOutstock.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <!--出库确认-->
  2. <template>
  3. <view id="gasRecycle">
  4. <view class="title">{{form.gasName}}-{{form.levelName}}({{form.sizeName}})</view>
  5. <view class="register_li">
  6. <view class="register_li_min">
  7. <view>学院:</view>
  8. <input v-model="form.collegeName" disabled type="text" >
  9. </view>
  10. <view class="register_li_min">
  11. <view>实验地点:</view>
  12. <input v-model="form.subjectName" disabled type="text" >
  13. </view>
  14. <view class="register_li_min">
  15. <view>实际气压值:</view>
  16. <input v-model="form.gasPressure" placeholder="请输入实际气压值" type="text" >
  17. </view>
  18. <view class="register_li_min">
  19. <view>最后使用人:</view>
  20. <input v-model="form2.user" disabled type="text" >
  21. </view>
  22. <!-- 使用时间 -->
  23. <view class="register_li_min" style="border:none;">
  24. <view>最后使用时间:</view>
  25. <input v-model="form2.lastUseTime" disabled type="text" >
  26. </view>
  27. </view>
  28. <view class="sub_btn" @click="submitForm()">确认出库</view>
  29. </view>
  30. </template>
  31. <script>
  32. import { gasDetail,gasDetailRecord,gasBottleErrorList,gasStorageOut,airbottleStockFindById,airbottleStockOut} from '@/api/index.js'
  33. import { config } from '@/api/request/config.js'
  34. export default {
  35. name: "gasRecycle",
  36. data() {
  37. return {
  38. baseUrl:config.base_url,
  39. pageType:0,
  40. //列表请求参数
  41. getData:{
  42. pageNum:1,
  43. pageSize:1,
  44. storageId:'',
  45. },
  46. gasBottleLevel:uni.getStorageSync('gasBottleLevel'),// 气瓶级别
  47. gasBottleSpecification:uni.getStorageSync('gasBottleSpecification'), // 气瓶规格
  48. form:{},
  49. id:'',
  50. }
  51. },
  52. onLoad(option) {
  53. if(option.id){
  54. this.id=option.id;
  55. }
  56. },
  57. onShow() {
  58. },
  59. mounted(){
  60. this.getInfo();
  61. },
  62. methods: {
  63. //查询详情
  64. async getInfo(){
  65. let self = this;
  66. const {data} = await airbottleStockFindById({id:this.id});
  67. if(data.code == 200){
  68. for(let b=0;b<this.gasBottleSpecification.length;b++){
  69. if(this.gasBottleSpecification[b].dictValue==data.data.size){
  70. data.data.sizeName=this.gasBottleSpecification[b].dictLabel
  71. }
  72. }
  73. for(let t=0;t<this.gasBottleLevel.length;t++){
  74. if(this.gasBottleLevel[t].dictValue==data.data.level){
  75. data.data.levelName=this.gasBottleLevel[t].dictLabel
  76. }
  77. }
  78. this.form=data.data;
  79. }
  80. },
  81. //提交
  82. async submitForm(){
  83. let _this = this;
  84. let obj={
  85. id:this.form.id,
  86. gasPressure:this.form.gasPressure,
  87. }
  88. const {data} = await airbottleStockOut(obj);
  89. if(data.code == 200){
  90. uni.showToast({
  91. title: '出库成功!',
  92. icon:"none",
  93. mask:true,
  94. duration: 2000
  95. });
  96. setTimeout(function(){
  97. uni.redirectTo({
  98. url: '/pages/gasBottle/gasManage/gasManage'
  99. });
  100. },2000);
  101. }
  102. },
  103. }
  104. }
  105. </script>
  106. <style lang="stylus" scoped>
  107. #gasRecycle {
  108. height: auto;
  109. width: 100%;
  110. flex :1;
  111. display flex;
  112. flex-direction column
  113. overflow hidden;
  114. padding-bottom: 300rpx;
  115. .title{
  116. width: 750rpx;
  117. height: 100rpx;
  118. background: #FFFFFF;
  119. font-size: 28rpx;
  120. font-family: PingFang SC;
  121. font-weight: 500;
  122. color: #333333;
  123. line-height: 100rpx;
  124. padding-left: 40rpx;
  125. }
  126. .register_li{
  127. background #fff;
  128. border-radius:20rpx;
  129. margin:20rpx 20rpx 0;
  130. padding:20rpx 0;
  131. box-sizing: border-box;
  132. .register_li_min{
  133. margin:0 26rpx;
  134. display flex;
  135. align-items center;
  136. border-bottom: 1px solid #F5F5F5;
  137. .icon_img{
  138. width: 30rpx;
  139. height: 30rpx;
  140. margin-right: 12rpx;
  141. }
  142. view{
  143. //width:140rpx;
  144. font-size: 28rpx;
  145. font-family: PingFang SC;
  146. font-weight: 500;
  147. color: #999999;
  148. line-height: 100rpx;
  149. }
  150. >view:nth-child(2){
  151. flex: 1;
  152. text-align: right;
  153. font-size: 24rpx;
  154. font-family: PingFang SC;
  155. font-weight: 500;
  156. color: #333333;
  157. }
  158. >input{
  159. flex:1;
  160. text-align: right;
  161. font-size: 24rpx;
  162. font-family: PingFang SC;
  163. font-weight: 500;
  164. color: #333333;
  165. }
  166. .mistake{
  167. font-size: 24rpx;
  168. font-family: PingFang SC;
  169. font-weight: 500;
  170. color: #D60000;
  171. margin-left: 40rpx;
  172. }
  173. }
  174. /* 时间 */
  175. .register_li_min2{
  176. margin:0 26rpx;
  177. border-bottom: 1px solid #f5f5f5;
  178. height: 100rpx;
  179. display: flex;
  180. justify-content: flex-start;
  181. align-items: center;
  182. >view:nth-child(1){
  183. font-size: 28rpx;
  184. font-family: PingFang SC;
  185. font-weight: 500;
  186. color: #999999;
  187. line-height: 100rpx;
  188. margin-right: 46rpx;
  189. }
  190. .picker-text{
  191. font-size: 24rpx;
  192. font-family: PingFang SC;
  193. font-weight: 500;
  194. color: #333333;
  195. line-height: 100rpx;
  196. width: 210rpx;
  197. }
  198. >view:nth-child(2){
  199. font-size: 24rpx;
  200. font-family: PingFang SC;
  201. font-weight: 500;
  202. color: #333333;
  203. line-height: 100rpx;
  204. }
  205. .picker-text2{
  206. font-size: 24rpx;
  207. font-family: PingFang SC;
  208. font-weight: 500;
  209. color: #333333;
  210. line-height: 100rpx;
  211. width: 210rpx;
  212. text-align: right;
  213. }
  214. }
  215. .meter_img{
  216. margin:0 26rpx;
  217. display flex;
  218. justify-content: space-between;
  219. view{
  220. //width:140rpx;
  221. font-size: 28rpx;
  222. font-family: PingFang SC;
  223. font-weight: 500;
  224. color: #999999;
  225. line-height: 100rpx;
  226. }
  227. >img{
  228. width: 150rpx;
  229. height: 150rpx;
  230. border-radius: 10rpx;
  231. margin:42rpx 0 20rpx 0;
  232. }
  233. }
  234. }
  235. /* 按钮 */
  236. .sub_btn{
  237. width: 650rpx;
  238. height: 100rpx;
  239. background: #0183FA;
  240. border-radius: 20rpx;
  241. font-size: 28rpx;
  242. font-family: PingFang SC;
  243. font-weight: 500;
  244. color: #FFFFFF;
  245. line-height: 100rpx;
  246. text-align: center;
  247. margin-left: 50rpx;
  248. position: fixed;
  249. bottom:30rpx;
  250. z-index: 1000;
  251. }
  252. .sub_btn2{
  253. width: 650rpx;
  254. height: 100rpx;
  255. border: 2rpx solid #0072DB;
  256. border-radius: 20rpx;
  257. font-size: 28rpx;
  258. font-family: PingFang SC;
  259. font-weight: 500;
  260. color: #0183FA;
  261. line-height: 100rpx;
  262. text-align: center;
  263. margin-left: 50rpx;
  264. position: fixed;
  265. bottom:158rpx;
  266. z-index: 1000;
  267. }
  268. }
  269. </style>