detail.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <template>
  2. <view class="content">
  3. <view class="title"> 项目详情 </view>
  4. <view class="list">
  5. <view class="detail">
  6. <span class="subTitle">项目名称:</span>
  7. <span class="detailContent">{{ currentProject.project_name }}</span>
  8. </view>
  9. <view class="detail" v-if="currentProject.TypeInfo">
  10. <span class="subTitle">项目类别:</span>
  11. <span class="detailContent">{{ currentProject.TypeInfo.name }}</span>
  12. </view>
  13. <view class="detail" v-if="currentProject.IndustryInfo">
  14. <span class="subTitle">行业名称:</span>
  15. <span class="detailContent">
  16. {{ currentProject.IndustryInfo.name }}
  17. </span>
  18. </view>
  19. <view class="detail">
  20. <span class="subTitle">流程:</span>
  21. <span class="detailContent">{{ currentProject.FlowInfo.name }}</span>
  22. </view>
  23. <view class="detail">
  24. <span class="subTitle">状态:</span>
  25. <span class="detailContent">
  26. {{ status[currentProject.project_status] }}
  27. </span>
  28. </view>
  29. <view class="detail">
  30. <span class="subTitle">节点:</span>
  31. <span class="detailContent">
  32. {{ `${currentProject.NodeInfo.node}(` }}
  33. <span v-if="currentProject.audit_status == 0">待提交</span>
  34. <span
  35. v-if="currentProject.audit_status == 1"
  36. :style="{ color: '#1890ff' }"
  37. >
  38. 审核中
  39. </span>
  40. <span
  41. v-if="currentProject.audit_status == 2"
  42. :style="{ color: '#f5222d' }"
  43. >
  44. 审核拒绝
  45. </span>
  46. <span
  47. v-if="currentProject.audit_status == 3"
  48. :style="{ color: '#a0d911' }"
  49. >
  50. 审核通过
  51. </span>
  52. <span>)</span>
  53. </span>
  54. </view>
  55. <view class="detail" v-if="currentProject.audit_status == 2">
  56. <span class="subTitle">拒绝原因:</span>
  57. <span class="detailContent">
  58. {{ currentProject.audit_comment }}
  59. </span>
  60. </view>
  61. <view class="detail" v-if="currentProject.location">
  62. <span class="subTitle">项目地区:</span>
  63. <span class="detailContent">
  64. {{ `${currentProject.location}(${currentProject.location_code})` }}
  65. </span>
  66. </view>
  67. <view class="detail" v-if="currentProject.name">
  68. <span class="subTitle">项目简称:</span>
  69. <span class="detailContent">{{ currentProject.name }}</span>
  70. </view>
  71. <view class="detail" v-if="currentProject.version">
  72. <span class="subTitle">项目批次:</span>
  73. <span class="detailContent">{{ currentProject.version }}期</span>
  74. </view>
  75. <view class="detail" v-if="currentProject.AuthorUser">
  76. <span class="subTitle">创建人:</span>
  77. <span class="detailContent">{{ currentProject.AuthorUser.CName }}</span>
  78. </view>
  79. <view class="detail" v-if="currentProject.AuthorDepInfo">
  80. <span class="subTitle">所属部门:</span>
  81. <span class="detailContent">
  82. {{ currentProject.AuthorDepInfo.Name }}
  83. </span>
  84. </view>
  85. <view class="detail">
  86. <span class="subTitle">项目编号:</span>
  87. <span class="detailContent">
  88. {{ currentProject.project_full_code }}
  89. </span>
  90. </view>
  91. </view>
  92. <view class="title">审核详情</view>
  93. <view class="group">
  94. <button v-if="canAuth()" @click="onHandleAudit(0)" class="commit">
  95. 审核拒绝
  96. </button>
  97. <button
  98. v-if="canAuth()"
  99. @click="onHandleAudit(1)"
  100. type="primary"
  101. class="commit"
  102. >
  103. 审核通过
  104. </button>
  105. </view>
  106. </view>
  107. </template>
  108. <script>
  109. import { mapState } from "vuex";
  110. export default {
  111. data() {
  112. return {
  113. auth: false,
  114. status: ["售前", "转执行", "转运营", "转质保"],
  115. };
  116. },
  117. computed: {
  118. ...mapState(["currentProject"]),
  119. },
  120. onLoad(options) {
  121. this.auth = Boolean(options.auth);
  122. },
  123. methods: {
  124. canAuth() {
  125. return this.auth;
  126. },
  127. onHandleAudit(value) {
  128. if (value) console.log("审核通过");
  129. else console.log("审核拒绝");
  130. },
  131. },
  132. };
  133. </script>
  134. <style lang="less" scoped>
  135. .content {
  136. display: flex;
  137. flex-wrap: wrap;
  138. }
  139. .title {
  140. width: 100%;
  141. padding: 0 20px 20px 20px;
  142. background: #f8f8f8;
  143. font: 24px bold;
  144. }
  145. .list {
  146. margin: 0 10% 20px 10%;
  147. width: 100%;
  148. }
  149. .detail {
  150. width: 100%;
  151. padding: 15px 0;
  152. font-size: 18px;
  153. display: flex;
  154. justify-items: space-between;
  155. .subTitle {
  156. width: 30%;
  157. }
  158. .detailContent {
  159. width: 70%;
  160. }
  161. }
  162. .group {
  163. width: 100%;
  164. display: flex;
  165. position: fixed;
  166. flex-wrap: wrap;
  167. justify-content: flex-start;
  168. bottom: 0;
  169. left: 0;
  170. .commit {
  171. width: 50%;
  172. border-radius: 0;
  173. margin: inherit;
  174. }
  175. }
  176. </style>