orderDetail.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <template>
  2. <view class="client-detail detail" v-if="detail.id">
  3. <view class="detail-box">
  4. <view class="title-box">
  5. <view class="title">{{detail.name}}</view>
  6. <view class="date">{{detail.date}}</view>
  7. <view class="title-icon">
  8. <uni-icons type="wallet-filled" color="#fff" size="20"></uni-icons>
  9. </view>
  10. </view>
  11. <view class="other">
  12. <div class="item" v-if="detail.type !== 3">
  13. <div class="label">关联租客</div>
  14. <div class="value"> {{detail.tenantType === 1 ? detail.merchantName: detail.clientName}}</div>
  15. </div>
  16. <view class="item" v-if="detail.type === 3">
  17. <view class="label">合同编码</view>
  18. <view class="value">{{detail.contractCode}}</view>
  19. </view>
  20. <div class="item">
  21. <div class="label">跟进人</div>
  22. <div class="value">{{detail.followUpPersonName}}</div>
  23. </div>
  24. <div class="item">
  25. <div class="label">联系电话</div>
  26. <div class="value">{{detail.followUpPersonPhone}}</div>
  27. </div>
  28. <div class="item" v-if="detail.type !== 3">
  29. <div class="label">服务方式</div>
  30. <div class="value">
  31. {{detail.type === 1?$field.findTypeName('serviceWorkWay',detail.workWay):$field.findTypeName('clearWorkWay',detail.workWay)}}
  32. </div>
  33. </div>
  34. <div class="item">
  35. <div class="label">摘要</div>
  36. <div class="value">{{detail.compendious}}</div>
  37. </div>
  38. </view>
  39. <view class="state">
  40. <view class="create">
  41. <uni-icons class="inherit-icons" type="staff-filled" color="#08979c" size="18"></uni-icons>
  42. <text class="name hui-ellipsis">{{detail.followUpPersonName || '-'}}</text>
  43. </view>
  44. <view class="tag">
  45. <div class="status-tag info" v-if="!detail.status">待提交</div>
  46. <div class="status-tag primary" v-else-if="detail.status === 1">待处理</div>
  47. <div class="status-tag warning" v-else-if="detail.status === 2">处理中</div>
  48. <div class="status-tag success" v-else>已处理</div>
  49. </view>
  50. </view>
  51. </view>
  52. <view class="detail-box file-box">
  53. <view class="sub-title">
  54. <uni-icons type="images-filled" class="inherit-icons" size="26" color="#08979c"></uni-icons>
  55. <text class="sub-label">工单附件</text>
  56. </view>
  57. <view class="other">
  58. <upload ref="upload" :list="detail.attachment ? JSON.parse(detail.attachment) : []" type="preview">
  59. </upload>
  60. </view>
  61. </view>
  62. <view class="detail-box" v-if="detail.data && detail.data != '[]'">
  63. <view class="sub-title">
  64. <uni-icons type="calendar-filled" class="inherit-icons" size="26" color="#08979c"></uni-icons>
  65. <text class="sub-label">自定义信息</text>
  66. </view>
  67. <view class="other">
  68. <div class="item" v-for="(item,index) in JSON.parse(detail.data)" :key="index">
  69. <div class="label">{{item.keyName}}</div>
  70. <div class="value">{{item.value}}</div>
  71. </div>
  72. </view>
  73. </view>
  74. <view class="detail-box" v-if="detail.workOrderProcessList.length > 0">
  75. <view class="sub-title">
  76. <uni-icons type="map-filled" class="inherit-icons" size="24" color="#08979c"></uni-icons>
  77. <text class="sub-label">工单过程</text>
  78. </view>
  79. <process :process="detail.workOrderProcessList" v-if="detail.workOrderProcessList.length > 0">
  80. </process>
  81. </view>
  82. </view>
  83. </template>
  84. <script>
  85. import {
  86. getOrderDetailById
  87. } from '@/request/api/order.js'
  88. import upload from '@/components/common/upload.vue';
  89. import process from '@/components/common/process.vue';
  90. export default {
  91. data() {
  92. return {
  93. orderId: 3,
  94. detail: {},
  95. user: {}
  96. }
  97. },
  98. onLoad(body) {
  99. if (body.orderId) this.orderId = body.orderId;
  100. this.init();
  101. this.user = this.$store.getters.user;
  102. },
  103. methods: {
  104. init() {
  105. if (!this.orderId) return;
  106. getOrderDetailById(this.orderId).then(res => {
  107. if (res.code === 200) {
  108. this.detail = res.data;
  109. }
  110. })
  111. }
  112. },
  113. components: {
  114. upload,
  115. process
  116. },
  117. }
  118. </script>
  119. <style lang="scss">
  120. </style>