detail.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <template>
  2. <u-modal
  3. :show.sync="visible"
  4. class="maintenance-order"
  5. :showCancelButton="true"
  6. :showConfirmButton="false"
  7. @cancel="visible = false"
  8. :closeOnClickOverlay="true"
  9. cancelText="关闭"
  10. >
  11. <view class="" style="flex: 1">
  12. <view class="title">明细清单</view>
  13. <view class="register-content">
  14. <view class="inner">
  15. <view class="col" v-for="item in list" :key="item.id">
  16. {{ item.name }}({{ item.code }}/{{ item.model }})
  17. <view style="min-width: 100rpx">
  18. <text class="num">{{ item[numKey] }}</text>
  19. {{ item.unit }}
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </u-modal>
  26. </template>
  27. <script>
  28. export default {
  29. props: {
  30. list: {
  31. type: Array,
  32. default: () => []
  33. },
  34. numKey: {
  35. type: String,
  36. default: 'num'
  37. }
  38. },
  39. data () {
  40. return {
  41. visible: false
  42. }
  43. },
  44. methods: {
  45. open () {
  46. this.visible = true
  47. }
  48. }
  49. }
  50. </script>
  51. <style lang="scss" scoped>
  52. .maintenance-order {
  53. /deep/ .u-modal__content {
  54. padding: 0 !important;
  55. .u-number-box__minus,
  56. .u-number-box__plus,
  57. .u-number-box__input {
  58. font-size: 30rpx;
  59. height: 1.4em !important;
  60. }
  61. }
  62. .title {
  63. background-color: rgba(51, 51, 51, 1);
  64. line-height: 60rpx;
  65. text-align: center;
  66. color: #fff;
  67. }
  68. .register-content {
  69. padding: 20rpx;
  70. min-height: 180rpx;
  71. .inner {
  72. border: 1rpx solid rgba(242, 242, 242, 1);
  73. .col {
  74. font-size: 28rpx;
  75. border-bottom: 1rpx solid rgba(242, 242, 242, 1);
  76. display: flex;
  77. padding: 10rpx;
  78. justify-content: space-between;
  79. .num {
  80. display: inline-block;
  81. width: 3em;
  82. text-align: center;
  83. margin-right: 4rpx;
  84. background-color: rgba(215, 215, 215, 1);
  85. }
  86. }
  87. }
  88. }
  89. }
  90. </style>