declareDetail.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. <template>
  2. <div class="app-container">
  3. <div class="title-container">
  4. <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
  5. </div>
  6. <el-collapse v-model="activeNames" style="margin-top: 30px;">
  7. <el-collapse-item name="board">
  8. <template slot="title">
  9. <span style="font-size:15px; margin-left:15px;letter-spacing:2px; color:RGB(168,168,168)">
  10. 点击展开查看实时流程图
  11. </span>
  12. </template>
  13. <WorkflowBoard ref='board' :nodeBusinessInfo="nodeBusinessInfo" />
  14. </el-collapse-item>
  15. </el-collapse>
  16. <div class="button-area">
  17. <el-button v-if="nodeBusinessInfo.currentNodePermission.commit && doWorkflow" class="y-save" type="success" round
  18. @click="commit('PASS')">通过</el-button>
  19. <el-button v-if="nodeBusinessInfo.currentNodePermission.terminable && doWorkflow" class="y-save" type="danger" round
  20. @click="commit('TERMINATE')">拒绝</el-button>
  21. <el-button class="y-save" round type="info" @click="goBack">返回</el-button>
  22. </div>
  23. <el-card>
  24. <el-divider content-position="left">
  25. <span style="color:red;font-weight: bold;">
  26. 【{{ this.nodeBusinessInfo.mainBusiness==='COMMISSION_DECLARE_MAJOR_EVALUATE'?'评估人员':'市场人员' }}】
  27. </span>大中型业务提成申报详情</el-divider>
  28. <el-form :model="declareForm" ref="declareForm">
  29. <el-row>
  30. <el-col :xs="24" :sm="12" :lg="24" :span="6">
  31. <el-form-item label="项目名称:" prop="name" label-width="140px" class="postInfo-container-item">
  32. <el-input :value="declareForm.name" :step="1" :max="100" style="width: 100%;" readonly disabled></el-input>
  33. </el-form-item>
  34. </el-col>
  35. </el-row>
  36. <el-row>
  37. <el-col :xs="24" :sm="12" :lg="12" :span="6">
  38. <el-form-item label="订单号:" prop="orderId" label-width="140px" class="postInfo-container-item">
  39. <el-input :value="declareForm.orderId" :step="1" :max="100" style="width: 100%;" readonly
  40. disabled></el-input>
  41. </el-form-item>
  42. </el-col>
  43. <el-col :xs="24" :sm="12" :lg="12" :span="6">
  44. <el-form-item label="报告号:" prop="reportNo" label-width="140px" class="postInfo-container-item">
  45. <el-input :value="declareForm.reportNo" :step="1" :max="100" style="width: 100%;" readonly
  46. disabled></el-input>
  47. </el-form-item>
  48. </el-col>
  49. </el-row>
  50. <el-row>
  51. <el-col :xs="24" :sm="12" :lg="12" :span="6">
  52. <el-form-item label="业务分类:" prop="businessCate" label-width="140px" class="postInfo-container-item">
  53. <el-input :value="declareForm.businessCate" :step="1" :max="100" style="width: 100%;" readonly
  54. disabled></el-input>
  55. </el-form-item>
  56. </el-col>
  57. <el-col :xs="24" :sm="12" :lg="12" :span="6">
  58. <el-form-item label="产品类型:" prop="production" label-width="140px" class="postInfo-container-item">
  59. <el-input :value="prod" :step="1" :max="100" style="width: 100%;" readonly
  60. disabled></el-input>
  61. </el-form-item>
  62. </el-col>
  63. </el-row>
  64. <el-row>
  65. <el-col :xs="24" :sm="12" :lg="12" :span="6">
  66. <el-form-item label="申报人:" prop="declareUser" label-width="140px" class="postInfo-container-item">
  67. <el-input :value="declareForm.declareUser" style="width: 100%;" readonly disabled>
  68. </el-input>
  69. </el-form-item>
  70. </el-col>
  71. <el-col :xs="24" :sm="12" :lg="12" :span="6">
  72. <el-form-item label="申报日期:" prop="created" label-width="140px" class="postInfo-container-item">
  73. <el-input :value="declareForm.created" style="width: 100%;" readonly
  74. disabled></el-input>
  75. </el-form-item>
  76. </el-col>
  77. </el-row>
  78. <el-row>
  79. <el-col :xs="24" :sm="12" :lg="12" :span="6">
  80. <el-form-item label="审核状态:" prop="declareResult" label-width="140px" class="postInfo-container-item">
  81. <el-input :value="declareForm.declareResult" :class="['filter-item','resaon_input']" readonly disabled>
  82. </el-input>
  83. </el-form-item>
  84. </el-col>
  85. <el-col :xs="24" :sm="12" :lg="12" :span="6">
  86. <el-form-item label="审核备注:" prop="remarks" label-width="140px" class="postInfo-container-item">
  87. <el-input :value="declareForm.remarks+''" style="width: 100%; color: red;" readonly
  88. disabled></el-input>
  89. </el-form-item>
  90. </el-col>
  91. </el-row>
  92. <el-table :data="declareForm.userShareRates" border style="width: 100%; margin-top: 10px; margin-bottom: 10px;">
  93. <el-table-column prop="userId" :label="this.nodeBusinessInfo.mainBusiness==='COMMISSION_DECLARE_MAJOR_EVALUATE'?'评估人员':'市场人员'" align="center">
  94. <template slot-scope="{row}">
  95. <span>{{ row.name }}</span>
  96. </template>
  97. </el-table-column>
  98. <el-table-column prop="rate" label="提成比例" align="center">
  99. <template slot-scope="{row}">
  100. <span style="color: red;">{{ row.rate*100 }}%</span>
  101. </template>
  102. </el-table-column>
  103. </el-table>
  104. </el-form>
  105. </el-card>
  106. </div>
  107. </template>
  108. <script>
  109. import Breadcrumb from '@/components/Breadcrumb'
  110. import WorkflowBoard from '@/components/workflowBoard'
  111. export default {
  112. name: 'declareDetail',
  113. components: {
  114. Breadcrumb,
  115. WorkflowBoard
  116. },
  117. filters: {
  118. },
  119. computed: {
  120. prod(){
  121. if (this.declareForm.production==='REPORT'){
  122. return "报告";
  123. }
  124. if (this.declareForm.production==='LETTER'){
  125. return "复评函";
  126. }
  127. if (this.declareForm.production==='STATEMENT'){
  128. return "价值意见书";
  129. }
  130. }
  131. },
  132. data() {
  133. return {
  134. activeNames: ['board'],
  135. nodeBusinessInfo: {
  136. currentNodePermission: {
  137. commit: true,
  138. reversible: true,
  139. restartable: true,
  140. terminable: true,
  141. skippable: true,
  142. },
  143. mainBusiness: null,
  144. doWorkflow: null,
  145. businessSubId: null,
  146. businessId: null,
  147. currentInstanceNodeId: null,
  148. production: []
  149. },
  150. doWorkflow: false,
  151. declareForm: {
  152. orderId: null,
  153. name: null,
  154. reportNo: null,
  155. businessId: null,
  156. productionId: null,
  157. businessType: null,
  158. commissionRateId: null,
  159. userShareRates: [
  160. {
  161. userId: this.$store.getters.userInfo.id,
  162. rate: 100
  163. }
  164. ],
  165. production:null,
  166. remarks:[]
  167. },
  168. users: [],
  169. cates: []
  170. }
  171. },
  172. created() {
  173. this.nodeBusinessInfo.businessId = this.$route.query.businessId;
  174. this.nodeBusinessInfo.mainBusiness = this.$route.query.businessType;
  175. this.declareForm.businessType = this.$route.query.businessType;
  176. this.doWorkflow = this.$route.query.doWorkflow === 'true';
  177. this.getCurrentNodeInfo();
  178. this.businessId = this.$route.query.businessId;
  179. this.getDeclareDetail();
  180. },
  181. methods: {
  182. getCurrentNodeInfo() {
  183. if (this.nodeBusinessInfo.businessId) {
  184. this.$api.workNodeInstance.currentNode({
  185. "mainBusiness": this.nodeBusinessInfo.mainBusiness,
  186. "businessId": this.nodeBusinessInfo.businessId
  187. }).then(res => {
  188. if (res.code === 200 && res.data!=null) {
  189. this.nodeBusinessInfo.currentInstanceNodeId = res.data.instanceId;
  190. }
  191. this.$refs.board.getInstanceArray(this.nodeBusinessInfo.mainBusiness,this.nodeBusinessInfo.businessId);
  192. })
  193. }
  194. },
  195. goBack() {
  196. const back = this.$route.query.back
  197. if (back) {
  198. this.$router.push(back)
  199. }
  200. },
  201. getSimpleAllUser() {
  202. this.$api.user.simpleAll().then(res => {
  203. if (res.code === 200) {
  204. this.users = res.data;
  205. }
  206. })
  207. },
  208. getMajorMarketCate() {
  209. this.$api.businessCommissionRate.cateList("BUSINESS_MAJOR", "MARKETER").then(res => {
  210. if (res.code === 200) {
  211. this.cates = res.data;
  212. }
  213. })
  214. },
  215. getDeclareDetail() {
  216. this.$api.commissonDeclare.detail(this.businessId).then(res => {
  217. if (res.code === 200) {
  218. this.declareForm = res.data;
  219. }
  220. })
  221. },
  222. //提交节点
  223. commit(state){
  224. this.$refs.board.commit(state);
  225. },
  226. },
  227. }
  228. </script>
  229. <style lang="scss" scoped>
  230. .button-area {
  231. position: absolute;
  232. top: 70px;
  233. right: 50px;
  234. }
  235. .resaon_input{
  236. /deep/ .el-input__inner{
  237. color: red !important;
  238. font-weight: bold;
  239. }
  240. }
  241. </style>