增加:合同管理相关内容
This commit is contained in:
parent
4af98648d8
commit
2f298a33ab
|
|
@ -851,16 +851,22 @@ export function activityRecordList(data) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 合同管理 - 授权信息列表
|
||||
export function contractList(data) {
|
||||
return request.get(`common/contract/list`, data)
|
||||
}
|
||||
// 合同管理 - 配置获取
|
||||
export function contractConfigGet() {
|
||||
return request.get(`common/contract/get_config`)
|
||||
}
|
||||
// 合同管理 - 配置编辑
|
||||
export function contractConfigSet(data) {
|
||||
return request.post(`common/contract/set_config`,data)
|
||||
}
|
||||
// 合同管理 - 下载合同
|
||||
export function contractDownload(id) {
|
||||
return request.get(`common/contract/download/${id}`)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,37 +1,229 @@
|
|||
<template>
|
||||
<div class="divBox">
|
||||
<!--主要内容-->
|
||||
<el-card class="box-card">
|
||||
|
||||
合同列表
|
||||
|
||||
|
||||
|
||||
<!--顶部搜索栏-->
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="container">
|
||||
<el-form inline size="small" label-width="80px">
|
||||
<el-form-item label="">
|
||||
<el-input v-model="tableFrom.uid" placeholder="请输入会员uid" clearable>
|
||||
<el-button slot="append" icon="el-icon-search" class="el-button-solt" @click="getList(1)"/>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<!--表格信息-->
|
||||
<el-table v-loading="listLoading" :data="tableData.data" style="width: 100%" size="mini">
|
||||
<el-table-column label="ID" prop="id" min-width="80" align="center"/>
|
||||
<el-table-column label="用户信息" min-width="230" align="center">
|
||||
<template slot-scope="scope">
|
||||
<div class="user-content">
|
||||
<div class="user-avatar">
|
||||
<img :src="scope.row.user.avatar || moren" />
|
||||
</div>
|
||||
<div class="user-info">
|
||||
<div class="nickname">{{ scope.row.user.nickname }}</div>
|
||||
<div class="agent-type-text">
|
||||
<el-tag type="info" effect="dark" size="small">{{ scope.row.user.uid }}</el-tag>
|
||||
<el-tag type="success" effect="dark" size="small">{{ scope.row.role_type_text }}</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="法大大相关信息" align="center">
|
||||
<el-table-column label="clientUserId" prop="client_user_id" min-width="200" align="center"/>
|
||||
<el-table-column label="是否授权" min-width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.binding_status == 1 ? '已授权' : '未授权' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否实名" min-width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.binding_status == 1 ? '已认证' : '未认证' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="账号状态" min-width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.binding_status == 1 ? '正常' : '禁用' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="签署状态" min-width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.binding_status == 1">已签署</span>
|
||||
<span v-else-if="scope.row.binding_status == 2">已拒签</span>
|
||||
<span v-else>待签署</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同信息" min-width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.sign_task_subject || ''}}<br />
|
||||
{{ scope.row.sign_template_id || ''}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="100" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.binding_status == 1" type="text" size="small" @click="downloadContract(scope.row.id)">查看合同</el-button>
|
||||
<el-button v-if="scope.row.binding_status == 2" type="text" size="small" @click="lookRejectedReason(scope.row)">拒绝原因</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页-->
|
||||
<div class="block">
|
||||
<el-pagination :page-size="tableFrom.limit" :current-page="tableFrom.page" :total="tableData.total" @current-change="pageChange" />
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {contractDownload, contractList} from "@/api/marketing";
|
||||
|
||||
export default {
|
||||
name: "preSaleProductList",
|
||||
name: "ContractList",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
|
||||
|
||||
// 列表
|
||||
listLoading: false,
|
||||
tableFrom: {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
uid: '',
|
||||
},
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0,
|
||||
},
|
||||
};
|
||||
},
|
||||
watch: {},
|
||||
mounted() {
|
||||
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 列表
|
||||
getList(num = ''){
|
||||
let _this = this;
|
||||
_this.listLoading = true;
|
||||
_this.tableFrom.page = num ? num : _this.tableFrom.page;
|
||||
contractList(_this.tableFrom).then((res) => {
|
||||
_this.tableData.data = res.data.list;
|
||||
_this.tableData.total = res.data.count;
|
||||
_this.listLoading = false;
|
||||
}).catch((res) => {
|
||||
_this.listLoading = false;
|
||||
_this.$message.error(res.message);
|
||||
});
|
||||
},
|
||||
pageChange(page) {
|
||||
this.tableFrom.page = page;
|
||||
this.getList('');
|
||||
},
|
||||
// 查看驳回原因
|
||||
lookRejectedReason(info){
|
||||
let msg = info.rejected_reason || '用户未填写拒绝原因!';
|
||||
|
||||
this.$message.error(msg)
|
||||
},
|
||||
// 下载合同
|
||||
downloadContract(id){
|
||||
let _this = this;
|
||||
contractDownload(id).then((res) => {
|
||||
if(Number(res.status) === 200){
|
||||
let downloadUrl = res.data.downloadUrl || '';
|
||||
if(downloadUrl) window.open(downloadUrl, '_blank');
|
||||
}else{
|
||||
_this.$message.error(res.message);
|
||||
}
|
||||
}).catch((res) => {
|
||||
_this.$message.error(res.message);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
/deep/ .el-select{
|
||||
width: 100% !important;
|
||||
}
|
||||
/deep/ .cell{
|
||||
padding: 0!important;
|
||||
}
|
||||
.user-content{
|
||||
--user-content-height-: 80px;
|
||||
|
||||
height: var(--user-content-height-);
|
||||
width: 100%;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
.user-avatar{
|
||||
height: var(--user-content-height-);
|
||||
width: var(--user-content-height-);
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
img{
|
||||
height: 80%!important;
|
||||
width: 80%!important;
|
||||
border-radius: 50% !important;
|
||||
}
|
||||
}
|
||||
.user-info{
|
||||
max-width: calc(100% - var(--user-content-height-));
|
||||
height: var(--user-content-height-);
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
.nickname{
|
||||
width: 100%;
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
text-align: left;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
.user-id{
|
||||
color: #fff;
|
||||
background-color: #409eff;
|
||||
border-color: #409eff;
|
||||
height: 18px;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
padding: 0 5px;
|
||||
border-radius: 5px;
|
||||
margin-left: 10px;
|
||||
width: max-content!important;
|
||||
}
|
||||
}
|
||||
.user-id{
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
font-size: 13px;
|
||||
line-height: calc(var(--user-content-height- * 35%));
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -2,17 +2,26 @@
|
|||
<div class="divBox">
|
||||
<el-card class="box-card">
|
||||
<el-form ref="config" :model="config" label-width="200px" class="demo-config">
|
||||
|
||||
|
||||
|
||||
合同设置
|
||||
|
||||
|
||||
|
||||
|
||||
<el-form-item label="应用Appid:">
|
||||
<el-input v-model="config.appid" type="text" class="selWidth" />
|
||||
</el-form-item>
|
||||
<el-form-item label="应用AppSecret:">
|
||||
<el-input v-model="config.app_secret" type="text" class="selWidth" />
|
||||
</el-form-item>
|
||||
<el-form-item label="应用企业的openCorpId:">
|
||||
<el-input v-model="config.open_corp_id" type="text" class="selWidth" />
|
||||
</el-form-item>
|
||||
<el-form-item v-for="(item,index) in Object.values(template_list)" :key="index" :label="item.title">
|
||||
<el-input v-model="item.sign_task_subject" class="selWidth">
|
||||
<template slot="prepend">合同名称</template>
|
||||
</el-input>
|
||||
<el-input v-model="item.sign_template_id" class="selWidth">
|
||||
<template slot="prepend">模板ID</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<!-- 提交按钮 -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="setConfig('config')">保存</el-button>
|
||||
<el-button type="primary" @click="setConfig()">保存</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
|
@ -20,14 +29,19 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {getAgentConfig, setAgentConfig} from "@/api/marketing";
|
||||
import {contractConfigGet, contractConfigSet} from "@/api/marketing";
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
data() {
|
||||
return {
|
||||
// 配置信息
|
||||
config: { },
|
||||
config: {
|
||||
appid: '',
|
||||
app_secret: '',
|
||||
open_corp_id: '',
|
||||
},
|
||||
template_list: {},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -39,10 +53,9 @@ export default {
|
|||
let _this = this;
|
||||
// 信息处理
|
||||
let config = Object.assign({}, _this.config);
|
||||
config.invite_limit = Object.assign({}, _this.invite_limit) || {};
|
||||
config.payment_list = Object.assign({}, _this.payment_list) || {};
|
||||
config.template_list = Object.assign({}, _this.template_list) || {};
|
||||
// 提交配置信息
|
||||
setAgentConfig(config).then((res) => {
|
||||
contractConfigSet(config).then((res) => {
|
||||
_this.$message.success(res.message);
|
||||
_this.getConfig();
|
||||
}).catch((res) => {
|
||||
|
|
@ -52,32 +65,26 @@ export default {
|
|||
// 获取配置信息
|
||||
getConfig(){
|
||||
let _this = this;
|
||||
getAgentConfig().then((res) => {
|
||||
contractConfigGet().then((res) => {
|
||||
_this.config = res.data || {};
|
||||
_this.invite_limit = Object.assign({}, res.data.invite_limit) || {};
|
||||
_this.payment_list = Object.assign({}, res.data.payment_list) || {};
|
||||
_this.template_list = Object.assign({}, res.data.template_list) || {};
|
||||
}).catch((res) => {
|
||||
_this.$message.error(res.message);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.selWidth{
|
||||
width: 500px!important;
|
||||
margin-bottom: 10px!important;
|
||||
}
|
||||
.invite-limit{
|
||||
.el-form-item{
|
||||
margin-bottom: 0!important;
|
||||
}
|
||||
.selWidth{
|
||||
width: 350px!important;
|
||||
}
|
||||
.tips{
|
||||
padding-bottom: 5px;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@
|
|||
|
||||
<script>
|
||||
import { exchangeQuotaConfigGet, exchangeQuotaConfigSet } from "@/api/marketing";
|
||||
import {distributionLevelLst} from "@/api/promoter";
|
||||
import {levelListApi} from "@/api/user";
|
||||
import {merShareholderList} from "@/api/merchant";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue