moreInfo.vue 1.8 KB

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