lhypbCom.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <view>
  3. <u-card :title="'样品编号:'+ item.yangPinBianHao" :subTitle="'样品'+(index+1)">
  4. <view class="" slot="body">
  5. <view class="u-body-item u-flex u-border-bottom u-col-between u-p-t-0">
  6. <view class="u-body-item-title ">
  7. 样品名称:
  8. </view>
  9. <view class="u-body-item-title u-line-2 u-body-item-title-color">
  10. {{item.yangPinMingCheng}}
  11. </view>
  12. </view>
  13. <view class="u-body-item u-flex u-border-bottom u-col-between u-p-t-0 u-m-t-20">
  14. <view class="u-body-item-title">
  15. 送检批号/编号:
  16. </view>
  17. <view class="u-body-item-title u-line-2 u-body-item-title-color">
  18. {{item.songJianPiHao}}
  19. </view>
  20. </view>
  21. <view class="u-body-item u-flex u-border-bottom u-col-between u-p-t-0 u-m-t-20">
  22. <view class="u-body-item-title">
  23. 样品状态:
  24. </view>
  25. <view class="u-body-item-title u-line-2 u-body-item-title-color">
  26. {{item.yangPinZhuangTai}}
  27. </view>
  28. </view>
  29. <view class="u-body-item u-flex u-p-t-0 u-m-t-20">
  30. <view class="u-body-item-title">
  31. 送检时间:
  32. </view>
  33. <view class="u-body-item-title u-line-2 u-body-item-title-color">
  34. {{item.songJianShiJian}}
  35. </view>
  36. </view>
  37. </view>
  38. <view class="u-body-footer" slot="foot">
  39. <u-icon name="setting" size="34" color="#3396d1" label="详情" class="u-m-r-20"
  40. @click="updateClick(index,'detail')"></u-icon>
  41. <u-icon name="edit-pen" size="34" color="#99cc66" label="编辑" class="u-m-r-20"
  42. @click="updateClick(index,'edit')" v-if="type != 'detail'">
  43. </u-icon>
  44. <u-icon name="trash" size="34" color="red" label="删除" @click="deleteClick(index)"
  45. v-if="type != 'detail'">
  46. </u-icon>
  47. </view>
  48. </u-card>
  49. </view>
  50. </template>
  51. <script>
  52. export default {
  53. props: {
  54. item: {
  55. type: Object,
  56. default: () => {}
  57. },
  58. index: {
  59. type: Number,
  60. default: 0
  61. },
  62. type: {
  63. type: String,
  64. default: 'add'
  65. }
  66. },
  67. data() {
  68. return {
  69. title: 'S2023012155',
  70. }
  71. },
  72. methods: {
  73. deleteClick(index) {
  74. this.$emit("deleteClick", index)
  75. },
  76. updateClick(index, type) {
  77. this.$emit("updateClick", index, type)
  78. }
  79. },
  80. }
  81. </script>
  82. <style lang="scss" scoped>
  83. .u-card-wrap {
  84. background-color: $u-bg-color;
  85. padding: 1px;
  86. }
  87. .u-body-item-title-color {
  88. color: #909399;
  89. }
  90. .u-body-item {
  91. font-size: 28rpx;
  92. color: #333;
  93. padding: 20rpx 10rpx;
  94. }
  95. .u-body-item image {
  96. width: 120rpx;
  97. flex: 0 0 120rpx;
  98. height: 120rpx;
  99. border-radius: 8rpx;
  100. margin-left: 12rpx;
  101. }
  102. .u-body-footer {
  103. display: flex;
  104. justify-content: flex-end;
  105. }
  106. </style>