borrow.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. <template>
  2. <view class="home">
  3. <view class="detail-area">
  4. <view class="layout-row">
  5. <u-row
  6. justify="space-between"
  7. gutter="10">
  8. <u-col span="4">
  9. <view class="demo-layout">
  10. 资产编号
  11. </view>
  12. </u-col>
  13. <u-col span="8" >
  14. <view class="demo-layout">001077-00007335</view>
  15. </u-col>
  16. </u-row>
  17. </view>
  18. <view class="layout-row">
  19. <u-row
  20. justify="space-between"
  21. gutter="10">
  22. <u-col span="4">
  23. <view class="demo-layout">资产名称</view>
  24. </u-col>
  25. <u-col span="8">
  26. <view class="demo-layout">放免防护屏</view>
  27. </u-col>
  28. </u-row>
  29. </view>
  30. <view class="layout-row">
  31. <u-row
  32. justify="space-between"
  33. gutter="10">
  34. <u-col span="4">
  35. <view class="demo-layout">资产种类</view>
  36. </u-col>
  37. <u-col span="8">
  38. <view class="demo-layout">固定资产</view>
  39. </u-col>
  40. </u-row>
  41. </view>
  42. <view class="layout-row">
  43. <u-row
  44. justify="space-between"
  45. gutter="10">
  46. <u-col span="4">
  47. <view class="demo-layout">资产分类</view>
  48. </u-col>
  49. <u-col span="8">
  50. <view class="demo-layout">[3220399]其他医用电子仪器</view>
  51. </u-col>
  52. </u-row>
  53. </view>
  54. <view class="layout-row">
  55. <u-row
  56. justify="space-between"
  57. gutter="10">
  58. <u-col span="4">
  59. <view class="demo-layout">使用部门</view>
  60. </u-col>
  61. <u-col span="8">
  62. <view class="demo-layout">生物医学工程系实验中心</view>
  63. </u-col>
  64. </u-row>
  65. </view>
  66. <view class="layout-row">
  67. <u-row
  68. justify="space-between"
  69. gutter="10">
  70. <u-col span="4">
  71. <view class="demo-layout">资产原值(元)</view>
  72. </u-col>
  73. <u-col span="8">
  74. <view class="demo-layout">1820.00</view>
  75. </u-col>
  76. </u-row>
  77. </view>
  78. <view class="layout-row">
  79. <u-row
  80. justify="space-between"
  81. gutter="10">
  82. <u-col span="4">
  83. <view class="demo-layout">数量</view>
  84. </u-col>
  85. <u-col span="8">
  86. <view class="demo-layout">1</view>
  87. </u-col>
  88. </u-row>
  89. </view>
  90. <view class="layout-row">
  91. <u-row
  92. justify="space-between"
  93. gutter="10">
  94. <u-col span="4">
  95. <view class="demo-layout">存放地点</view>
  96. </u-col>
  97. <u-col span="8">
  98. <view class="demo-layout">番禺A1-512</view>
  99. </u-col>
  100. </u-row>
  101. </view>
  102. <view class="layout-row">
  103. <u-row
  104. justify="space-between"
  105. gutter="10">
  106. <u-col span="4">
  107. <view class="demo-layout">登记人</view>
  108. </u-col>
  109. <u-col span="8">
  110. <view class="demo-layout">超级用户</view>
  111. </u-col>
  112. </u-row>
  113. </view>
  114. <view class="layout-row">
  115. <u-row
  116. justify="space-between"
  117. gutter="10">
  118. <u-col span="4">
  119. <view class="demo-layout">取得日期</view>
  120. </u-col>
  121. <u-col span="8">
  122. <view class="demo-layout">2022-12-14</view>
  123. </u-col>
  124. </u-row>
  125. </view>
  126. <view class="layout-row">
  127. <u-row
  128. justify="space-between"
  129. gutter="10">
  130. <u-col span="4">
  131. <view class="demo-layout">资产用途</view>
  132. </u-col>
  133. <u-col span="8">
  134. <view class="demo-layout">培训教学</view>
  135. </u-col>
  136. </u-row>
  137. </view>
  138. <view class="layout-row">
  139. <u-row
  140. justify="space-between"
  141. gutter="10">
  142. <u-col span="4">
  143. <view class="demo-layout">规格型号</view>
  144. </u-col>
  145. <u-col span="8">
  146. <view class="demo-layout">RKD-01</view>
  147. </u-col>
  148. </u-row>
  149. </view>
  150. </view>
  151. <view class="borrow-date" v-if="status==1">
  152. <view class="layout-row">
  153. <u-row
  154. justify="space-between"
  155. gutter="10">
  156. <u-col span="4">
  157. <view class="demo-layout">借用日期</view>
  158. </u-col>
  159. <u-col span="8">
  160. <view class="demo-layout">
  161. <u--input
  162. placeholder="请输入内容"
  163. border="none"
  164. v-model="borrowDate"
  165. @focus="borrowShow = true"
  166. ></u--input>
  167. <u-datetime-picker
  168. :show="borrowShow"
  169. v-model="borrowValue"
  170. mode="datetime"
  171. @confirm="changeDate"
  172. @cancel="borrowShow = false"
  173. ></u-datetime-picker>
  174. </view>
  175. </u-col>
  176. </u-row>
  177. </view>
  178. <view class="layout-row">
  179. <u-row
  180. justify="space-between"
  181. gutter="10">
  182. <u-col span="4">
  183. <view class="demo-layout">归还日期</view>
  184. </u-col>
  185. <u-col span="8">
  186. <view class="demo-layout">
  187. <u--input
  188. placeholder="请输入内容"
  189. border="none"
  190. v-model="returnDate"
  191. @focus="returnShow = true"
  192. ></u--input>
  193. <u-datetime-picker
  194. :show="returnShow"
  195. v-model="returnValue"
  196. mode="datetime"
  197. @confirm="returnChange"
  198. @cancel="returnShow = false"
  199. ></u-datetime-picker>
  200. </view>
  201. </u-col>
  202. </u-row>
  203. </view>
  204. </view>
  205. <view class="btn-area">
  206. <u-button text="借用" color="#000" v-if="status==1">借用</u-button>
  207. <u-button text="归还" color="#000" v-else-if="status==2">归还</u-button>
  208. </view>
  209. <view class="repair-btn">
  210. <i class="iconfont icon-a-shezhi2"></i>
  211. </view>
  212. </view>
  213. </template>
  214. <script>
  215. export default {
  216. data() {
  217. return {
  218. borrowDate:this.$core.dateToString(new Date()),
  219. returnDate:this.$core.dateToString(new Date()),
  220. borrowShow:false,
  221. borrowValue:Number(new Date()),
  222. returnShow:false,
  223. returnValue:Number(new Date()),
  224. status:1
  225. };
  226. },
  227. onLoad:function(option){
  228. console.log(option.number)
  229. },
  230. methods:{
  231. changeDate(val){
  232. let date = this.$core.dateToString(val.value);
  233. this.borrowDate = date
  234. this.borrowShow = false
  235. },
  236. returnChange(val){
  237. let date = this.$core.dateToString(val.value);
  238. this.returnDate = date
  239. this.returnShow = false
  240. }
  241. }
  242. }
  243. </script>
  244. <style lang="scss" scoped>
  245. .home{
  246. padding: 20rpx;
  247. display: flex;
  248. flex-direction: column;
  249. height: 100vh;
  250. box-sizing: border-box;
  251. }
  252. .detail-area{
  253. height: 72%;
  254. border: 1px solid $uni-border-black;
  255. padding: 0 20rpx;
  256. overflow-y: scroll;
  257. }
  258. .borrow-date{
  259. border: 1px solid $uni-border-black;
  260. padding: 0 20rpx;
  261. margin-top: 20rpx;
  262. }
  263. .layout-row{
  264. border-top: 2rpx solid #999999;
  265. padding: 20rpx 0 ;
  266. }
  267. .demo-layout {
  268. height: 25px;
  269. }
  270. .btn-area{
  271. margin-top: 20rpx;
  272. padding: 0 250rpx;
  273. }
  274. .repair-btn{
  275. width: 80rpx;
  276. height: 80rpx;
  277. color: rgba(80, 80, 80, 1);
  278. border-radius: 21px;
  279. line-height: 150%;
  280. box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.5);
  281. display: flex;
  282. align-items: center;
  283. justify-content: center;
  284. text-align: center;
  285. flex-direction: column;
  286. font-size: 36rpx;
  287. position: fixed;
  288. bottom: 20rpx;
  289. right: 20rpx;
  290. .iconfont{
  291. font-size: 42rpx;
  292. }
  293. }
  294. </style>