intelligentDockingFollowDetail.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <template>
  2. <div id="intelligentDockingFollowDetail">
  3. <el-row>
  4. <el-col :span="24">
  5. <el-col :span="24">
  6. <topInfo :topTitle="topTitle" :display="display"></topInfo>
  7. </el-col>
  8. <el-col :span="24" class="main">
  9. <el-col :span="24">
  10. <detailTop @goBack="goBack"></detailTop>
  11. </el-col>
  12. <el-col :span="24">
  13. <intelligentDockingFollowDetails
  14. :form="form"
  15. :shenheForm="shenheForm"
  16. @shenheBtns="shenheBtns"
  17. @shenheOut="shenheOut"
  18. @shenheBtn="shenheBtn"
  19. :shouxinForm="shouxinForm"
  20. :shouxinDialog="shouxinDialog"
  21. @shouxinBtns="shouxinBtns"
  22. @shouxinOut="shouxinOut"
  23. @shouxinBtn="shouxinBtn"
  24. ></intelligentDockingFollowDetails>
  25. </el-col>
  26. </el-col>
  27. </el-col>
  28. </el-row>
  29. </div>
  30. </template>
  31. <script>
  32. import topInfo from '@/layout/common/topInfo.vue';
  33. import detailTop from '@/layout/common/detailTop.vue';
  34. import intelligentDockingFollowDetails from '@/layout/intelligentDocking/intelligentDockingFollowDetails.vue';
  35. import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
  36. const { mapActions: intelligentDocking } = createNamespacedHelpers('intelligentDocking');
  37. const { mapActions: intelligentFollow } = createNamespacedHelpers('intelligentFollow');
  38. export default {
  39. name: 'intelligentDockingFollowDetail',
  40. props: {},
  41. components: {
  42. topInfo, //头部
  43. detailTop, //返回
  44. intelligentDockingFollowDetails, //详情
  45. },
  46. data: () => ({
  47. topTitle: '银企对接关注详情',
  48. display: 'none',
  49. form: {
  50. company: {},
  51. dictionary: {},
  52. finance_claims: {},
  53. when: {},
  54. follow: {},
  55. },
  56. shenheForm: {},
  57. shouxinDialog: false,
  58. shouxinForm: {},
  59. }),
  60. created() {
  61. this.searchInfo();
  62. },
  63. computed: {
  64. ...mapState(['user']),
  65. intelligentId() {
  66. return this.$route.query.intelligentId;
  67. },
  68. },
  69. methods: {
  70. ...intelligentDocking(['dockingSearch']),
  71. ...intelligentFollow(['credit']),
  72. // 查询详情
  73. async searchInfo() {
  74. if (this.intelligentId) {
  75. const res = await this.dockingSearch({ id: this.intelligentId });
  76. for (const val of res.result) {
  77. this.$set(this, `form`, val);
  78. }
  79. }
  80. },
  81. // 打开审核
  82. shenheBtns() {
  83. // this.shenheDialog = true;
  84. },
  85. // 取消审核
  86. shenheOut() {
  87. // this.shenheDialog = false;
  88. this.shenheForm = {};
  89. },
  90. // 提交审核
  91. async shenheBtn({ data }) {
  92. data.id = this.form.follow._id;
  93. data.creditStatus = 2;
  94. const res = await this.credit(data);
  95. if (res.errcode === 0) {
  96. this.$message({
  97. message: '审核成功',
  98. type: 'success',
  99. });
  100. this.goBack();
  101. this.searchInfo();
  102. } else {
  103. this.$message.error('审核失败');
  104. }
  105. },
  106. // 打开授信
  107. shouxinBtns() {
  108. this.shouxinDialog = false;
  109. },
  110. // 取消授信
  111. shouxinOut() {
  112. this.shouxinDialog = false;
  113. this.shouxinForm = {};
  114. },
  115. // 提交授信
  116. async shouxinBtn({ data }) {
  117. data.id = this.form.follow._id;
  118. data.creditStatus = 1;
  119. const res = await this.credit(data);
  120. if (res.errcode === 0) {
  121. this.$message({
  122. message: '授信成功',
  123. type: 'success',
  124. });
  125. this.goBack();
  126. this.searchInfo();
  127. } else {
  128. this.$message.error('授信失败');
  129. }
  130. },
  131. // 返回
  132. goBack() {
  133. this.$router.go(-1);
  134. },
  135. },
  136. };
  137. </script>
  138. <style lang="less" scoped>
  139. .main {
  140. float: left;
  141. width: 100%;
  142. min-height: 780px;
  143. box-shadow: 0 0 5px #999;
  144. border-radius: 10px;
  145. padding: 20px;
  146. }
  147. </style>