123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- <template>
- <div id="intelligentDockingFollowDetail">
- <el-row>
- <el-col :span="24">
- <el-col :span="24">
- <topInfo :topTitle="topTitle" :display="display"></topInfo>
- </el-col>
- <el-col :span="24" class="main">
- <el-col :span="24">
- <detailTop @goBack="goBack"></detailTop>
- </el-col>
- <el-col :span="24">
- <intelligentDockingFollowDetails
- :form="form"
- :shenheForm="shenheForm"
- @shenheBtns="shenheBtns"
- @shenheOut="shenheOut"
- @shenheBtn="shenheBtn"
- :shouxinForm="shouxinForm"
- :shouxinDialog="shouxinDialog"
- @shouxinBtns="shouxinBtns"
- @shouxinOut="shouxinOut"
- @shouxinBtn="shouxinBtn"
- ></intelligentDockingFollowDetails>
- </el-col>
- </el-col>
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
- import topInfo from '@/layout/common/topInfo.vue';
- import detailTop from '@/layout/common/detailTop.vue';
- import intelligentDockingFollowDetails from '@/layout/intelligentDocking/intelligentDockingFollowDetails.vue';
- import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
- const { mapActions: intelligentDocking } = createNamespacedHelpers('intelligentDocking');
- const { mapActions: intelligentFollow } = createNamespacedHelpers('intelligentFollow');
- export default {
- name: 'intelligentDockingFollowDetail',
- props: {},
- components: {
- topInfo, //头部
- detailTop, //返回
- intelligentDockingFollowDetails, //详情
- },
- data: () => ({
- topTitle: '银企对接关注详情',
- display: 'none',
- form: {
- company: {},
- dictionary: {},
- finance_claims: {},
- when: {},
- follow: {},
- },
- shenheForm: {},
- shouxinDialog: false,
- shouxinForm: {},
- }),
- created() {
- this.searchInfo();
- },
- computed: {
- ...mapState(['user']),
- intelligentId() {
- return this.$route.query.intelligentId;
- },
- },
- methods: {
- ...intelligentDocking(['dockingSearch']),
- ...intelligentFollow(['credit']),
- // 查询详情
- async searchInfo() {
- if (this.intelligentId) {
- const res = await this.dockingSearch({ id: this.intelligentId });
- for (const val of res.result) {
- this.$set(this, `form`, val);
- }
- }
- },
- // 打开审核
- shenheBtns() {
- // this.shenheDialog = true;
- },
- // 取消审核
- shenheOut() {
- // this.shenheDialog = false;
- this.shenheForm = {};
- },
- // 提交审核
- async shenheBtn({ data }) {
- data.id = this.form.follow._id;
- data.creditStatus = 2;
- const res = await this.credit(data);
- if (res.errcode === 0) {
- this.$message({
- message: '审核成功',
- type: 'success',
- });
- this.goBack();
- this.searchInfo();
- } else {
- this.$message.error('审核失败');
- }
- },
- // 打开授信
- shouxinBtns() {
- this.shouxinDialog = false;
- },
- // 取消授信
- shouxinOut() {
- this.shouxinDialog = false;
- this.shouxinForm = {};
- },
- // 提交授信
- async shouxinBtn({ data }) {
- data.id = this.form.follow._id;
- data.creditStatus = 1;
- const res = await this.credit(data);
- if (res.errcode === 0) {
- this.$message({
- message: '授信成功',
- type: 'success',
- });
- this.goBack();
- this.searchInfo();
- } else {
- this.$message.error('授信失败');
- }
- },
- // 返回
- goBack() {
- this.$router.go(-1);
- },
- },
- };
- </script>
- <style lang="less" scoped>
- .main {
- float: left;
- width: 100%;
- min-height: 780px;
- box-shadow: 0 0 5px #999;
- border-radius: 10px;
- padding: 20px;
- }
- </style>
|