my-oiling-detail.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <view class="max-view">
  3. <view class="mx3 my2 p3 bg-color-white border-radius-view">
  4. <view class="d-flex py3 border-bottom">
  5. <view class="f-size-26 text-color-9 w200">设备名称</view>
  6. <view class="f-size-26 text-color-3">{{ model.sbName }}</view>
  7. </view>
  8. <view class="d-flex py3 border-bottom">
  9. <view class="f-size-26 text-color-9 w200">设备编号</view>
  10. <view class="f-size-26 text-color-3">{{ model.sbNo || '' }}</view>
  11. </view>
  12. <view class="d-flex py3 border-bottom">
  13. <view class="f-size-26 text-color-9 w200">仓库名称</view>
  14. <view class="f-size-26 text-color-3">{{ model.storeName || '' }}</view>
  15. </view>
  16. <view class="d-flex py3 border-bottom">
  17. <view class="f-size-26 text-color-9 w200">燃油类型</view>
  18. <view class="f-size-26 text-color-3">{{ model.spareName || '' }}</view>
  19. </view>
  20. <view class="d-flex py3 border-bottom">
  21. <view class="f-size-26 text-color-9 w200">用途</view>
  22. <view class="f-size-26 text-color-3">{{ model.reason || '' }}</view>
  23. </view>
  24. <view class="d-flex py3 border-bottom">
  25. <view class="f-size-26 text-color-9 w200">申请人</view>
  26. <view class="f-size-26 text-color-3">{{ model.userName || '' }}</view>
  27. </view>
  28. <view class="d-flex py3 border-bottom">
  29. <view class="f-size-26 text-color-9 w200">申请油量</view>
  30. <view class="f-size-26 text-color-3">{{ $BaseTool.Amount.formatter(model.applyOil) }} L</view>
  31. </view>
  32. <view class="d-flex py3 border-bottom">
  33. <view class="f-size-26 text-color-9 w200">审批人</view>
  34. <view class="f-size-26 text-color-3">{{ model.auditUserName || '系统' }}</view>
  35. </view>
  36. <view class="d-flex py3 border-bottom">
  37. <view class="f-size-26 text-color-9 w200">审批状态</view>
  38. <view class="f-size-26 text-color-3">{{ auditTypeMap[model.auditType] }}</view>
  39. </view>
  40. <view class="d-flex py3 border-bottom" v-if="model.storeUserName">
  41. <view class="f-size-26 text-color-9 w200">仓库管理员</view>
  42. <view class="f-size-26 text-color-3">{{ model.storeUserName || '' }}</view>
  43. </view>
  44. <view class="d-flex py3 border-bottom" v-if="model.realOil">
  45. <view class="f-size-26 text-color-9 w200">实际加油油量</view>
  46. <view class="f-size-26 text-color-3">{{ $BaseTool.Amount.formatter(model.realOil) }} L</view>
  47. </view>
  48. <view class="d-flex py3 border-bottom">
  49. <view class="f-size-26 text-color-9 w200">状态</view>
  50. <view class="f-size-26 text-color-3">{{ statusMap[model.status] }}</view>
  51. </view>
  52. <view class="d-flex py3">
  53. <view class="f-size-26 text-color-9 w200">申请说明</view>
  54. <view class="f-size-26 text-color-3">{{ model.applyRemark || '' }}</view>
  55. </view>
  56. <view class="d-flex py3">
  57. <view class="f-size-26 text-color-9 w200">审批说明</view>
  58. <view class="f-size-26 text-color-3">{{ model.remark || '' }}</view>
  59. </view>
  60. <view class="d-flex py3" v-if="model.storeUserName">
  61. <view class="f-size-26 text-color-9 w200">加油说明</view>
  62. <view class="f-size-26 text-color-3">{{ model.handleRemark || '' }}</view>
  63. </view>
  64. </view>
  65. <view class="m3" v-if="isConfirm">
  66. <u-button @click="submit" type="primary" shape="circle">确认</u-button>
  67. </view>
  68. </view>
  69. </template>
  70. <script>
  71. export default {
  72. data() {
  73. return {
  74. model: {
  75. sbId: null,
  76. storeId: null,
  77. userId: null,
  78. userName: null,
  79. storeUserId: null,
  80. storeUserName: null,
  81. status: null,
  82. applyOil: null,
  83. realOil: null,
  84. applyRemark: null,
  85. handleRemark: null,
  86. remark: null,
  87. createdUserId: null,
  88. updateUserId: null,
  89. updateUserName: null,
  90. updateTime: null,
  91. isOiL: null,
  92. isAudit: null,
  93. isUpdate: null,
  94. auditType: null,
  95. auditUserName: null
  96. },
  97. isConfirm: false,
  98. statusMap: {},
  99. auditTypeMap: {}
  100. };
  101. },
  102. created () {
  103. this.statusMap = this.$DictCache.getLabelByValueMapByType(this.$DictCache.TYPE.SB_OIL_STATUS)
  104. this.auditTypeMap = this.$DictCache.getLabelByValueMapByType(this.$DictCache.TYPE.SB_OIL_AUDIT_TYPE)
  105. },
  106. onLoad(options) {
  107. this.isConfirm = options.confirm === 1 || options.confirm === '1';
  108. this.$Http.fetchSbOil({ id: options.id }).then(res => {
  109. this.model = res.data;
  110. });
  111. },
  112. methods: {
  113. submit() {
  114. this.$Http.updateConfirmSbOil({ id: this.model.id })
  115. .then(() => {
  116. uni.redirectTo({
  117. url: '/pages/oiling/my-oiling'
  118. });
  119. }).catch(() => {
  120. })
  121. }
  122. }
  123. };
  124. </script>
  125. <style lang="less">
  126. page {
  127. background-color: #f4f4f4;
  128. }
  129. .max-view {
  130. padding-top: unit(50, rpx);
  131. .border-radius-view {
  132. border-radius: unit(16, rpx);
  133. }
  134. }
  135. </style>