moreInfo.vue 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <view class="more-info-wrapper">
  3. <u-modal :show="show" @confirm="closeModal">
  4. <div class="more-info">
  5. <view class="modal-item">
  6. <text>品牌:</text>
  7. <text>{{ moreOptions.dictLabel || '-' }}</text>
  8. </view>
  9. <view class="modal-item">
  10. <text>来源:</text>
  11. <text>{{ moreOptions.origin || '-' }}</text>
  12. </view>
  13. <view class="modal-item">
  14. <text>实价:</text>
  15. <text>¥{{ moreOptions.costPrice || '-' }}</text>
  16. </view>
  17. <view class="modal-item">
  18. <text>型号:</text>
  19. <text>{{ moreOptions.model || '-' }}</text>
  20. </view>
  21. <view class="modal-item">
  22. <text>编码:</text>
  23. <text>{{ moreOptions.indentifyCode || '-' }}</text>
  24. </view>
  25. <view class="modal-item">
  26. <text>日期:</text>
  27. <text>{{ recycleTimeFormatter(moreOptions.recycleTime) || '-' }}</text>
  28. </view>
  29. <view class="modal-item">
  30. <text>备注:</text>
  31. <text>{{ moreOptions.productDesc || '-' }}</text>
  32. </view>
  33. </div>
  34. </u-modal>
  35. </view>
  36. </template>
  37. <script>
  38. export default {
  39. name: 'MoreInfo',
  40. props: {
  41. moreOptions: {
  42. type: Object,
  43. default: () => { }
  44. }
  45. },
  46. data() {
  47. return {
  48. show: false,
  49. }
  50. },
  51. methods: {
  52. showMoreInfo() {
  53. this.show = true;
  54. },
  55. closeModal() {
  56. this.show = false;
  57. },
  58. recycleTimeFormatter(val) {
  59. if (val) {
  60. return this.$dayjs(val).format('YYYY-MM-DD HH:mm:ss')
  61. }
  62. return '-'
  63. }
  64. }
  65. }
  66. </script>
  67. <style lang="scss" scoped>
  68. .more-info-wrapper {
  69. position: absolute;
  70. width: 0;
  71. height: 0;
  72. overflow: hidden;
  73. }
  74. </style>