cylinderDetails.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. <!-- 气瓶详情 -->
  2. <template>
  3. <view id="gasCylinderDetails">
  4. <view class="text-max-big-box">
  5. <view class="for-title-box">
  6. <view>气瓶状态:</view>
  7. <view :class="newData.data7==1?'colorA':'colorB'">{{newData.data7==1?'已入库':'已出库'}}</view>
  8. </view>
  9. </view>
  10. <view class="title-p" v-if="newData.data7 == 1">气瓶信息</view>
  11. <view class="text-max-big-box">
  12. <view class="for-text-box" v-if="newData.data6 == 1">
  13. <view>气瓶编码:</view>
  14. <view>{{newData.data1}}</view>
  15. </view>
  16. <view class="for-text-box">
  17. <view>气体:</view>
  18. <view>{{newData.data2}}</view>
  19. </view>
  20. <view class="for-text-box">
  21. <view>气瓶规格:</view>
  22. <view>{{newData.data3}}</view>
  23. </view>
  24. <view class="for-text-box">
  25. <view>气体类别:</view>
  26. <view>{{newData.data4}}</view>
  27. </view>
  28. <view class="for-text-box">
  29. <view>纯度:</view>
  30. <view>{{newData.data5}}</view>
  31. </view>
  32. <view class="for-text-box" v-if="newData.data6 == 1">
  33. <view>压力:</view>
  34. <view>{{newData.data8}}</view>
  35. </view>
  36. <view class="for-text-box" v-if="newData.data7 == 2">
  37. <view>实验室名称:</view>
  38. <view>{{newData.data9}}</view>
  39. </view>
  40. <view class="for-text-box" v-if="newData.data7 == 2">
  41. <view>楼栋:</view>
  42. <view>{{newData.data10}}</view>
  43. </view>
  44. <view class="for-text-box" v-if="newData.data7 == 2">
  45. <view>楼层:</view>
  46. <view>{{newData.data11}}</view>
  47. </view>
  48. <view class="for-text-box" v-if="newData.data7 == 2">
  49. <view>房间:</view>
  50. <view>{{newData.data12}}</view>
  51. </view>
  52. </view>
  53. <view class="title-p" v-if="newData.data7 == 1">实验室信息</view>
  54. <view class="text-max-big-box" v-if="newData.data7 == 1">
  55. <view class="for-text-box">
  56. <view>实验室名称:</view>
  57. <view>{{newData.data9}}</view>
  58. </view>
  59. <view class="for-text-box">
  60. <view>楼栋:</view>
  61. <view>{{newData.data10}}</view>
  62. </view>
  63. <view class="for-text-box">
  64. <view>楼层:</view>
  65. <view>{{newData.data11}}</view>
  66. </view>
  67. <view class="for-text-box">
  68. <view>房间:</view>
  69. <view>{{newData.data12}}</view>
  70. </view>
  71. </view>
  72. <view class="text-max-big-box" v-if="newData.data7 == 1">
  73. <view class="for-text-box">
  74. <view>签收人:</view>
  75. <view>{{newData.data13}}</view>
  76. </view>
  77. </view>
  78. <view class="text-max-big-box">
  79. <view class="for-border-box" v-if="newData.data7 == 2">
  80. <view>出库类型:</view>
  81. <view>{{newData.data14==1?'空瓶出库':'满瓶出库'}}</view>
  82. </view>
  83. <view class="for-text-box">
  84. <view>费用:</view>
  85. <view>{{newData.data15}}</view>
  86. </view>
  87. </view>
  88. <view class="text-max-big-box" v-if="newData.data7 == 2">
  89. <view class="for-text-box">
  90. <view>签出人:</view>
  91. <view>{{newData.data21}}</view>
  92. </view>
  93. </view>
  94. <view class="text-max-big-box">
  95. <view class="for-img-box">
  96. <view>{{newData.data7==1?'入库单':'出库单'}}:</view>
  97. <img class="img-box" @click="previewSingleImage(baseUrl+item)" :src="baseUrl+newData.data16">
  98. </view>
  99. <view class="for-text-box">
  100. <view>{{newData.data7==1?'入库时间':'出库时间'}}:</view>
  101. <view>{{newData.data17}}</view>
  102. </view>
  103. <view class="for-text-box">
  104. <view>{{newData.data7==1?'入库人':'出库人'}}:</view>
  105. <view>{{newData.data18}}</view>
  106. </view>
  107. <view class="for-text-box">
  108. <view>联系电话</view>
  109. <view>{{newData.data19}}</view>
  110. </view>
  111. </view>
  112. <view class="text-max-big-box">
  113. <view class="for-text-one-box">
  114. <view>备注:</view>
  115. <view>{{newData.data20}}</view>
  116. </view>
  117. </view>
  118. <view v-if="newData.data7 == 1" class="bottom-button-box">
  119. <view @click="submitButton()">撤回入库</view>
  120. <view @click="goPage()">气瓶出库</view>
  121. </view>
  122. </view>
  123. </template>
  124. <script>
  125. import {
  126. config
  127. } from '@/api/request/config.js'
  128. export default {
  129. data() {
  130. return {
  131. baseUrl: config.base_url,
  132. newData: {
  133. data1: '1231315',
  134. data2: '氢气',
  135. data3: '8L',
  136. data4: '易燃气体',
  137. data5: '99%',
  138. data6: '1',
  139. data7: '1',
  140. data8: '15Mpa',
  141. data9: '实验室-11',
  142. data10: '名义楼',
  143. data11: '10层',
  144. data12: '302',
  145. data13: '张签收',
  146. data14: '1',
  147. data15: '5000',
  148. data16: 'statics/2026/08/24/b8877900-a4b7-44c3-949c-3d652d54063f.jpg',
  149. data17: '2022-0202 16:42',
  150. data18: '张出库',
  151. data19: '13333333333',
  152. data20: '我是备注信息,我是备注信息,我是备注信息,我是备注信息,我是备注信息,我是备注信息',
  153. data21: '张签出',
  154. }
  155. }
  156. },
  157. onLoad(options) {
  158. console.log(options.id)
  159. },
  160. onShow() {
  161. },
  162. methods: {
  163. //气瓶出库
  164. goPage(){
  165. let obj = {
  166. }
  167. uni.navigateTo({
  168. url: '/pages_supplierCylinderManagement/views/gasCylinderManagement/outbound?form='+encodeURIComponent(JSON.stringify(obj))+'&pageType=3'
  169. });
  170. },
  171. //撤回入库
  172. submitButton(){
  173. uni.showModal({
  174. title: '撤回入库',
  175. content: '撤回后,该气体气瓶的当前状态将被强制回退至待入库。',
  176. showCancel: true,
  177. cancelText: '关闭',
  178. confirmText: '确认撤回',
  179. confirmColor:'#FF0000',
  180. success: (res) => {
  181. if (res.confirm) {
  182. uni.showToast({
  183. title:'入库完成',
  184. icon:"success",
  185. mask:true,
  186. duration: 2000
  187. });
  188. setTimeout(function(){
  189. uni.navigateBack();
  190. },2000);
  191. }
  192. }
  193. });
  194. },
  195. //预览图片
  196. previewSingleImage(imageUrl) {
  197. uni.previewImage({
  198. urls: [imageUrl] // 必须包裹成数组
  199. });
  200. },
  201. }
  202. }
  203. </script>
  204. <style lang="stylus" scoped>
  205. #gasCylinderDetails {
  206. height: 100%;
  207. width: 100%;
  208. display flex;
  209. flex-direction column;
  210. overflow-y: scroll;
  211. .title-p{
  212. margin: 25rpx 25rpx 0 50rpx;
  213. font-size:28rpx;
  214. }
  215. .text-max-big-box {
  216. padding: 20rpx 30rpx;
  217. background-color: #fff;
  218. border-radius: 10rpx;
  219. margin: 25rpx 25rpx 0;
  220. .for-title-box {
  221. display: flex;
  222. view {
  223. line-height: 60rpx ;
  224. font-weight: 700;
  225. }
  226. view:nth-child(1) {}
  227. view:nth-child(2) {
  228. flex: 1;
  229. text-align: right;
  230. }
  231. .colorA {
  232. color: #FF6B00;
  233. }
  234. .colorB {
  235. color: #0075FF;
  236. }
  237. }
  238. .for-text-box{
  239. display: flex;
  240. view{
  241. line-height: 60rpx
  242. font-weight: 700;
  243. }
  244. view:nth-child(1){
  245. }
  246. view:nth-child(2){
  247. flex:1;
  248. text-align: right;
  249. }
  250. }
  251. .for-border-box{
  252. }
  253. .for-img-box{
  254. view{
  255. line-height: 60rpx
  256. font-weight: 700;
  257. }
  258. .img-box{
  259. width:160rpx;
  260. height:160rpx;
  261. border-radius:12rpx;
  262. margin:15rpx 0;
  263. }
  264. }
  265. .for-text-one-box{
  266. view{
  267. line-height: 60rpx
  268. font-weight: 700;
  269. }
  270. view:nth-child(1){
  271. }
  272. view:nth-child(2){
  273. padding:10rpx 0 20rpx;
  274. font-size:24rpx;
  275. line-height:30rpx;
  276. }
  277. }
  278. }
  279. .bottom-button-box{
  280. display: flex;
  281. margin:40rpx 30rpx 60rpx;
  282. view:nth-child(1){
  283. border:1rpx solid #0183FA;
  284. color:#0183FA;
  285. text-align: center;
  286. border-radius:12rpx;
  287. line-height:80rpx;
  288. width:200rpx;
  289. }
  290. view:nth-child(2){
  291. margin-left:30rpx;
  292. border:1rpx solid #0183FA;
  293. color:#fff;
  294. background-color: #0183fa;
  295. text-align: center;
  296. border-radius:12rpx;
  297. line-height:80rpx;
  298. flex:1;
  299. }
  300. }
  301. }
  302. </style>