recordDialog.vue 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <u-popup
  3. :show="show"
  4. mode="center"
  5. :round="10"
  6. closeable
  7. @close="cancel"
  8. bgColor="#fff"
  9. :customStyle="{ width: '88vw', maxHeight: '80vh', overflow: 'auto' }"
  10. >
  11. <view class="record_wrap">
  12. <view class="title">报工记录</view>
  13. <view v-if="!list.length" class="empty">暂无修改历史记录数据</view>
  14. <view v-for="(rec, idx) in list" :key="idx" class="record_item">
  15. <view class="rec_index">第 {{ idx + 1 }} 次</view>
  16. <view class="rec_row"><text class="rec_label">实际开始:</text>{{ rec.realStartTime || '-' }}</view>
  17. <view class="rec_row"><text class="rec_label">实际结束:</text>{{ rec.realEndTime || '-' }}</view>
  18. <view class="rec_row"><text class="rec_label">工时:</text>{{ rec.durationText || '-' }}</view>
  19. <view class="rec_row"><text class="rec_label">报工数:</text>{{ rec.reportQuantity || 0 }}</view>
  20. <view class="rec_row"><text class="rec_label">损耗数:</text>{{ rec.lossQuantity || 0 }}</view>
  21. <view class="rec_row"><text class="rec_label">备注:</text>{{ rec.remark || '-' }}</view>
  22. </view>
  23. <button class="btn" @click="cancel">返回</button>
  24. </view>
  25. </u-popup>
  26. </template>
  27. <script>
  28. export default {
  29. data() {
  30. return { show: false, list: [] };
  31. },
  32. methods: {
  33. open(list = []) {
  34. this.list = list;
  35. this.show = true;
  36. },
  37. cancel() {
  38. this.show = false;
  39. this.list = [];
  40. },
  41. },
  42. };
  43. </script>
  44. <style lang="scss" scoped>
  45. .record_wrap {
  46. padding: 30rpx;
  47. .title {
  48. font-size: 32rpx;
  49. font-weight: 600;
  50. text-align: center;
  51. margin-bottom: 20rpx;
  52. }
  53. .empty {
  54. text-align: center;
  55. color: #999;
  56. padding: 40rpx 0;
  57. font-size: 26rpx;
  58. }
  59. .record_item {
  60. background: #f7f9fa;
  61. padding: 16rpx;
  62. border-radius: 8rpx;
  63. margin-bottom: 14rpx;
  64. .rec_index {
  65. font-size: 24rpx;
  66. color: $theme-color;
  67. font-weight: 600;
  68. margin-bottom: 6rpx;
  69. }
  70. .rec_row {
  71. font-size: 24rpx;
  72. color: #333;
  73. line-height: 40rpx;
  74. .rec_label { color: #999; }
  75. }
  76. }
  77. .btn {
  78. margin-top: 20rpx;
  79. height: 76rpx;
  80. line-height: 76rpx;
  81. background: $theme-color;
  82. color: #fff;
  83. border-radius: 8rpx;
  84. font-size: 28rpx;
  85. }
  86. }
  87. </style>