return.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <view class="home">
  3. <view class="detail-area">
  4. <layout-row rowTitle="条形码" :rowValue="form.assetBarCode"></layout-row>
  5. <layout-row rowTitle="资产编号" :rowValue="tbAsset.number"></layout-row>
  6. <layout-row rowTitle="资产名称" :rowValue="tbAsset.name"></layout-row>
  7. <layout-row rowTitle="借用人" :rowValue="form.userId"></layout-row>
  8. <layout-row rowTitle="借用人电话" :rowValue="form.tel"></layout-row>
  9. <layout-row rowTitle="借用状态" :rowValue="form.isreturn==='1'?'已归还':''"></layout-row>
  10. <layout-row rowTitle="借用地点" :rowValue="form.borrowPlaceName"></layout-row>
  11. <layout-row rowTitle="借用时间" :rowValue="form.borrowDate"></layout-row>
  12. <layout-row rowTitle="归还时间" :rowValue="form.actualReturnDate"></layout-row>
  13. <layout-row rowTitle="备注" :rowValue="form.remark==''?'无':form.remark"></layout-row>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. import { getReturnDetail } from '@/api/asset.js'
  19. import LayoutRow from '@/component/LayoutRow.vue'
  20. export default {
  21. data() {
  22. return {
  23. id:"",
  24. form:{},
  25. tbAsset:{}
  26. };
  27. },
  28. methods:{
  29. init(id){
  30. const that = this
  31. getReturnDetail(id).then(res=>{
  32. if(res){
  33. that.form = res
  34. if(that.form.tbAsset){
  35. that.tbAsset = that.form.tbAsset
  36. }
  37. }
  38. })
  39. }
  40. },
  41. onLoad:function(option){
  42. this.id = option.id
  43. this.init(this.id)
  44. },
  45. components:{
  46. LayoutRow
  47. }
  48. }
  49. </script>
  50. <style lang="scss">
  51. .home{
  52. padding: 20rpx;
  53. display: flex;
  54. flex-direction: column;
  55. // height: 100vh;
  56. box-sizing: border-box;
  57. .detail-area{
  58. // border: 2rpx solid #000;
  59. padding: 0 20rpx;
  60. box-shadow: 0 2rpx 8rpx 0 rgba(0, 0, 0, 0.2);
  61. }
  62. }
  63. </style>