|
@@ -1,14 +1,14 @@
|
|
|
<template>
|
|
|
- <div id="index">
|
|
|
+ <div id="claim">
|
|
|
<el-col :span="24" class="debt">
|
|
|
<el-col :span="24" class="top">
|
|
|
- <topInfo :topTitle="topTitle" :display="display" @clickBtn="clickBtn"></topInfo>
|
|
|
+ <topInfo :topTitle="topTitle" :display="display" ></topInfo>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="search">
|
|
|
- <searchInfo></searchInfo>
|
|
|
+ <searchInfo @clickBtn="clickBtn"></searchInfo>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="main">
|
|
|
- <claimList :debtTable="debtTable" :total="total" @deleteRow="deleteRow" @clickRest="clickRest"></claimList>
|
|
|
+ <claimList :debtTable="debtTable" :total="total" @pagechange="pagechange" ></claimList>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</div>
|
|
@@ -16,55 +16,63 @@
|
|
|
|
|
|
<script>
|
|
|
import topInfo from '@/layout/common/topInfo.vue';
|
|
|
-import searchInfo from '@/layout/common/searchInfo.vue';
|
|
|
+import searchInfo from '@/layout/common/needSearchInfo.vue';
|
|
|
import claimList from '@/layout/businessneed/claimList.vue';
|
|
|
import { createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
-const { mapActions: otheruser } = createNamespacedHelpers('otheruser');
|
|
|
-const { mapActions: character } = createNamespacedHelpers('character');
|
|
|
+const { mapActions: claimneed } = createNamespacedHelpers('claimneed');
|
|
|
export default {
|
|
|
- name: 'index',
|
|
|
+ name: 'claim',
|
|
|
props: {},
|
|
|
components: {
|
|
|
topInfo, //头部导航
|
|
|
searchInfo, //搜素
|
|
|
- otheruserList, //其他用户列表
|
|
|
+ claimList, //债权需求列表
|
|
|
},
|
|
|
data: () => ({
|
|
|
- topTitle: '其他用户',
|
|
|
+ topTitle: '债权需求',
|
|
|
display: 'none',
|
|
|
debtTable: [],
|
|
|
total: '',
|
|
|
+ jgpro: '0'
|
|
|
}),
|
|
|
created() {
|
|
|
- this.searchInfo();
|
|
|
+ this.claimList();
|
|
|
},
|
|
|
computed: {},
|
|
|
methods: {
|
|
|
- ...otheruser(['query', 'delete']),
|
|
|
- ...character({ userquery: 'query' }),
|
|
|
-
|
|
|
- ...otheruser(['query', 'delete', 'update']),
|
|
|
- async searchInfo({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
- const res = await this.query({ skip, limit, ...info });
|
|
|
- this.$set(this, `debtTable`, res.data);
|
|
|
+ ...claimneed(['followclaim', 'fclaim']),
|
|
|
+ async claimList({ skip = 1, limit = 10,jg_id = '5e79672d0217a7336048b4c5'} = {}) {
|
|
|
+ const res = await this.fclaim({ skip, limit,jg_id });
|
|
|
+ this.$set(this, `debtTable`, res.res);
|
|
|
this.$set(this, `total`, res.total);
|
|
|
},
|
|
|
- // 删除
|
|
|
- async deleteRow(id) {
|
|
|
- const res = await this.delete(id);
|
|
|
- this.$checkRes(res, '删除成功', '删除失败');
|
|
|
- this.searchInfo();
|
|
|
+ async pagechange(data) {
|
|
|
+ var skip = data.skip;
|
|
|
+ var limit = 10;
|
|
|
+ var jg_id ;
|
|
|
+ if(this.jgpro =='0'){
|
|
|
+ jg_id='0';
|
|
|
+ }else{
|
|
|
+ jg_id = '5e79672d0217a7336048b4c5';
|
|
|
+ }
|
|
|
+ const res = await this.fclaim({ skip, limit,jg_id });
|
|
|
+ this.$set(this, `debtTable`, res.res);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
},
|
|
|
- async clickRest(id) {
|
|
|
- let data = {};
|
|
|
- data.id = id;
|
|
|
- data.passwd = '123456';
|
|
|
- const res = await this.update(data);
|
|
|
- if (res.errcode === 0) {
|
|
|
- this.$message({
|
|
|
- message: '密码重置成功',
|
|
|
- type: 'success',
|
|
|
- });
|
|
|
+ async clickBtn(message) {//查询
|
|
|
+ this.jgpro = message;
|
|
|
+ var skip = 0;
|
|
|
+ var limit =10;
|
|
|
+ if(message==1){
|
|
|
+ var jg_id = '0';
|
|
|
+ const res = await this.fclaim({ skip, limit,jg_id});
|
|
|
+ this.$set(this, `debtTable`, res.res);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }else{
|
|
|
+ var jg_id = '5e79672d0217a7336048b4c5';
|
|
|
+ const res = await this.fclaim({ skip, limit,jg_id});
|
|
|
+ this.$set(this, `debtTable`, res.res);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
}
|
|
|
},
|
|
|
},
|