Commit f31bf88d authored by dragondean@qq.com's avatar dragondean@qq.com
parents d02661e3 38af27f0
......@@ -9,6 +9,16 @@ export function createWarehouse(data) {
})
}
//创建提单模板
export function createTemplate(data) {
console.log(data);
return request({
url: '/ecw/lading-template/create',
method: 'post',
data: data
})
}
// 更新仓库
export function updateWarehouse(data) {
return request({
......@@ -80,6 +90,14 @@ export function changeRouteStatus(data) {
})
}
export function getLadingTemplate(data) {
console.log(data);
return request({
url: '/ecw/lading-template/getByLineId?lineId='+data,
method: 'get'
})
}
/**查看已开通线路列表 */
export function openedRouterList(data = {}) {
return request({
......
import request from '@/utils/request'
import query from "@/views/ecw/customer/query";
// 创建用户
export function createUser(data) {
......@@ -77,3 +78,43 @@ export function memberGetAuthIdcardInfo(query){
params:query,
})
}
//获取指定企业认证信息
export function memberGetAuthEnterpriseInfo(query){
return request({
url:'/member/user/get-auth-enterprise-info',
method:'get',
params:query,
})
}
//身份证审核
export function memberUserAuditIdCard(query){
return request({
url:'/member/user/audit-idcard',
method :'get',
params:query,
})
}
//企业认证审核
export function memberUserAuditEnterprise(query){
return request({
url:'/member/user/audit-enterprise',
method:'get',
params:query,
})
}
//修改身份证
export function memberUserUpdateIdCard(data){
return request({
url:'/member/user/update-idcard',
method:'put',
data: data
})
}
// 修改企业
export function memberUserUpdateEnterprise(data){
return request({
url:'/member/user/update-enterprise',
method:'put',
data:data,
})
}
......@@ -61,3 +61,14 @@ export function getMyInternalMessagePage(query) {
params: query
})
}
//获取个未读消息
export function getNotReadInternalMessageTotal(){
return request(
{
url:'ecw/internal-message/getNotReadInternalMessageTotal',
method:'get',
}
)
}
......@@ -8,8 +8,8 @@
<div class="right-menu">
<template v-if="device!=='mobile'">
<el-badge :value="notReadTotal" class="right-menu-item badge">
<el-image style="width: 22px;height: 20px;" :src="unreadMessage"></el-image>
<el-badge :value="notMessage" class="right-menu-item badge">
<el-image style="width: 22px;height: 20px;cursor: pointer;" :src="unreadMessage" @click="notRead"></el-image>
</el-badge>
......@@ -79,6 +79,9 @@ export default {
notReadTotal:0,//要去取VUEX里面的未读数据总数,我不会,登录之后要调得到当前人未读记录总数接口放到VUEX中
}
},
created() {
this.$store.dispatch('getNotMessage');
},
components: {
Breadcrumb,
TopNav,
......@@ -110,6 +113,9 @@ export default {
get() {
return this.$store.state.settings.topNav
}
},
notMessage(){
return this.$store.state.user.notMessage
}
},
methods: {
......@@ -128,7 +134,7 @@ export default {
}).catch(() => {});
},
notRead(){
this.$router.push({path:'/system/internalMessage/my-internal-message',query:{'status':0}});
this.$router.push({path:'/system/internalMessage/my-internal-message',query:{status:'0'}});
}
}
}
......@@ -182,6 +188,7 @@ export default {
.el-badge__content{
top: 13px;
right:15px;
height: 20px;
}
}
.right-menu-item {
......
import {login, logout, getInfo, socialLogin, socialLogin2} from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth'
import {getNotReadInternalMessageTotal} from '@/api/system/internalMessage'
const user = {
state: {
......@@ -8,7 +9,8 @@ const user = {
name: '',
avatar: '',
roles: [],
permissions: []
permissions: [],
notMessage:0,
},
mutations: {
......@@ -29,6 +31,9 @@ const user = {
},
SET_PERMISSIONS: (state, permissions) => {
state.permissions = permissions
},
NOt_MESSAGE:(state, notMessage)=>{
state.notMessage = notMessage;
}
},
......@@ -146,7 +151,18 @@ const user = {
removeToken()
resolve()
})
}
},
// 获取未登录消息
getNotMessage({commit}){
return new Promise((resolve, reject) =>{
getNotReadInternalMessageTotal().then((r)=>{
commit('NOt_MESSAGE',r.data);
resolve()
}).catch(error =>{
reject(error);
})
})
},
}
}
......
......@@ -677,7 +677,9 @@ export default {
},
followUp(row){
this.customerId = row.id;
this.$nextTick(()=>{
this.$refs.CustomerFollowList.customerFollow.dialogVisible = true;
})
},
complaint(row){
this.customerId = row.id;
......
......@@ -30,6 +30,10 @@
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['ecw:warehouse:export']">导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="templateClick('')"
v-hasPermi="['ecw:warehouse:create']">批量设置提单模板</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
......@@ -108,6 +112,8 @@
<template slot-scope="scope">
<el-button size="mini" type="text" @click="routeStatusClick(scope.row)"
v-hasPermi="['ecw:warehouse:routerQuery']">{{scope.row.lineId ? '关闭线路' : '开通线路'}}</el-button>
<el-button size="mini" type="primary" @click="templateClick(scope.row)" v-if="scope.row.lineId != null"
v-hasPermi="['ecw:warehouse:routerQuery']">设置路线提单模板</el-button>
</template>
</el-table-column>
</el-table>
......@@ -245,11 +251,81 @@
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<!-- 对话框(添加 / 修改) -->
<el-dialog title="设置路线提单模板" :visible.sync="templateOpen" width="1000px" @close="ladingFormClose()" append-to-body>
<el-form ref="form" :model="ladingform" :rules="rules" label-width="80px">
<el-form-item label="货柜前缀" prop="prefixCounter">
<el-input v-model="ladingform.prefixCounter" placeholder="请输入货柜前缀" />
</el-form-item>
<el-form-item label="抬头" prop="titleZh">
<editor v-model="ladingform.titleZh" :min-height="192"/>
</el-form-item>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>账户详情</span>
<el-button style="float: right;" size="small" type="primary" @click="handleAddAccount">添加账户+</el-button>
</div>
<el-table
:data="arr"
style="width: 100%"
>
<el-table-column
prop="detail"
label="详情"
width=""
>
<template v-slot="{ row, column, $index }">
<el-input v-model="row.detail" placeholder="请输入详情" size="mini"/>
</template>
</el-table-column>
<el-table-column
prop="name"
label="名称"
width=""
>
<template v-slot="{row}">
<el-input v-model="row.name" placeholder="请输入名称" size="mini"/>
</template>
</el-table-column>
<el-table-column
prop="company"
label="公司"
>
<template v-slot="{row}">
<el-input v-model="row.company" placeholder="请输入公司" size="mini"/>
</template>
</el-table-column>
<el-table-column
prop="operate"
label="操作"
>
<template slot-scope="scope">
<el-button type="danger" @click="delRow(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-form-item label="条款" prop="contentZh">
<editor v-model="ladingform.contentZh" :min-height="192"/>
</el-form-item>
<el-form-item v-if="showFlag">
<routers-selector v-model="ladingform.lineIds" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitTemplateForm">保 存</el-button>
<el-button @click="resetTemplate()">重 置</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createWarehouse, updateWarehouse, deleteWarehouse, getWarehouse, getWarehousePage,
import { createWarehouse, updateWarehouse, deleteWarehouse, getWarehouse, getWarehousePage,createTemplate,getLadingTemplate,
exportWarehouseExcel,routerList,changeRouteStatus,deptBind,deptList } from "@/api/ecw/warehouse";
import { getNodePage } from "@/api/ecw/node";
import { getListTree } from "@/api/ecw/region";
......@@ -257,11 +333,18 @@ import { getDictDatas, DICT_TYPE } from '@/utils/dict'
import {CommonStatusEnum} from '@/utils/constants'
import { uploadFile } from "@/api/infra/file";
import { listDept } from "@/api/system/dept";
import Editor from '@/components/Editor';
import {getDictData} from '@/utils/dict'
import RoutersSelector from '@/components/RoutersSelector';
import { has } from 'min-dash';
import Template from "../../cms/template/index";
export default {
name: "Warehouse",
components: {
Template,
Editor,
RoutersSelector
},
data() {
......@@ -315,6 +398,7 @@ export default {
title: "",
// 是否显示弹出层
open: false,
templateOpen:false,
dateRangeCreateTime: [],
isUpdate: false,
......@@ -331,7 +415,9 @@ export default {
id: null,
tradeType: null
},
showFlag:false,
arr:[],
cols:[{prop:"detail",label:"详情"},{prop:"name",label:"名称"},{prop:"company",label:"公司"},{prop:"operate",label:"操作"}],
// 查询参数
queryParams: {
pageNo: 1,
......@@ -356,6 +442,7 @@ export default {
},
// 表单参数
form: {checkList:[],},
ladingform: {prefixCounter:null,titleZh:null,contentZh:null,account:null,acctArr:[]},
// 表单校验
rules: {
nodeId: [{ required: true, message: "服务网点不能为空", trigger: "blur" }],
......@@ -446,6 +533,18 @@ export default {
});
},
delRow(index){
this.arr.splice(index, 1);
},
ladingFormClose(){
this.resetTemplate();
},
handleAddAccount(){
const obj = {"detail": "",
"name": "",
"company": ""};
this.arr.push(obj)
},
/** 查询部门列表 */
getDeptList() {
listDept(this.queryParams).then(response => {
......@@ -556,6 +655,25 @@ export default {
});
},
templateClick(row) {
if(row!=''){
getLadingTemplate(row.lineId).then(response => {
if(response.data!=null){
this.ladingform = response.data;
var jsonArr = JSON.parse(response.data.account);
for (var i in jsonArr) {
this.arr.push(jsonArr[i]);
}
}
});
this.ladingform.lineId = row.lineId;
}else {
this.showFlag = true;
}
this.templateOpen = true;
},
routeStatusClick(row) {
this.routeQueryParam.transportType = row.transportType;
this.routeQueryParam.warehouseId = row.id;
......@@ -650,6 +768,16 @@ export default {
this.open = false;
this.reset();
},
resetTemplate(){
this.arr=[];
this.showFlag = false;
this.ladingform={
prefixCounter:undefined,
titleZh:undefined,
account:undefined,
contentZh:undefined
}
},
/** 表单重置 */
reset() {
this.form = {
......@@ -766,6 +894,23 @@ export default {
});
});
},
submitTemplateForm(){
if(this.showFlag&&this.ladingform.lineIds!=null){
let lineId = '';
let lineArr = this.ladingform.lineIds;
lineArr.forEach((elem, index) => {
lineId = lineId + elem.lineId + ",";
});
this.ladingform.lineId=lineId.substr(0,lineId.length-1);
}
this.ladingform.account = JSON.stringify(this.arr);
createTemplate(this.ladingform).then(response => {
this.$modal.msgSuccess("设置路线提单模板成功");
this.templateOpen = false;
this.resetTemplate();
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
......
......@@ -7,13 +7,17 @@
<el-input v-model="queryParams.nickname" placeholder="搜索昵称、姓名、手机、Email" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="成交" prop="mobile">
<el-input v-model="queryParams.mobile" placeholder="请输入手机号" clearable @keyup.enter.native="handleQuery"/>
<el-select v-model="queryParams.isDeal">
<el-option v-for="item in [{label:'全部',value:''},{label:'是',value:true},{label:'否',value:false}]" :value="item.value" :label="item.label"></el-option>
</el-select>
</el-form-item>
<el-form-item label="认证" prop="password">
<el-input v-model="queryParams.password" placeholder="请输入密码" clearable @keyup.enter.native="handleQuery"/>
<el-select v-model="queryParams.authType">
<el-option v-for="item in [{label: '全部',value: ''},{label:'营业执照认证',value:1},{label:'身份证认证',value:2},{label:'双认证',value:3}]" :value="item.value" :label="item.label"></el-option>
</el-select>
</el-form-item>
<el-form-item label="审核状态" prop="registerIp">
<el-input v-model="queryParams.registerIp" placeholder="请输入注册 IP" clearable @keyup.enter.native="handleQuery"/>
<dict-selector v-model="queryParams.auditStatus" :type="DICT_TYPE.AUDIT_STATUS"></dict-selector>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
......@@ -23,14 +27,6 @@
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['member:user:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['member:user:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
......@@ -46,12 +42,14 @@
<el-table-column label="状态" align="center" prop="status" />
<el-table-column label="身份证审核状态" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.AUDIT_STATUS" :value="scope.row.identityAuditStatus" ></dict-tag>
<div v-if="!scope.row.identityAuditStatus">未提交</div>
<dict-tag v-else :type="DICT_TYPE.AUDIT_STATUS" :value="scope.row.identityAuditStatus" ></dict-tag>
</template>
</el-table-column>
<el-table-column label="营业执照审核状态" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.AUDIT_STATUS" :value="scope.row.enterpriseAuditStatus" ></dict-tag>
<div v-if="!scope.row.enterpriseAuditStatus">未提交</div>
<dict-tag v-else :type="DICT_TYPE.AUDIT_STATUS" :value="scope.row.enterpriseAuditStatus" ></dict-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
......@@ -63,8 +61,8 @@
<template slot-scope="scope" >
<el-button size="mini" type="text" @click="guarantee(scope.row)">保函/证书</el-button>
<el-button size="mini" type="text" @click="operationLogFn(scope.row)">操作日志</el-button>
<el-button size="mini" type="text" @click="identityFn(scope.row , '1')">身份证</el-button>
<el-button size="mini" type="text" @click="identityFn(scope.row, '2')">营业执照</el-button>
<el-button v-if="scope.row.identityAuditStatus !== 0 && scope.row.identityAuditStatus !== undefined" size="mini" type="text" @click="identityFn(scope.row , '1')">身份证</el-button>
<el-button v-if="scope.row.enterpriseAuditStatus !== 0 && scope.row.enterpriseAuditStatus !== undefined" size="mini" type="text" @click="identityFn(scope.row, '2')">营业执照</el-button>
</template>
</el-table-column>
</el-table>
......@@ -106,77 +104,97 @@
</el-table-column>
<el-table-column label="操作ip" prop="ip"></el-table-column>
</el-table>
<pagination v-show="totalLog > 0" :total="totalLog" :page.sync="operationLogFrom.page" :limit.sync="operationLogFrom.row"
@pagination="getOperationLogList"/>
</el-dialog>
<el-dialog
title="认证"
:visible.sync="attestationShow"
width="80%">
<div>
<el-tabs v-model="activeName" type="border-card">
<el-tab-pane label="身份证" name="1">
<div style="width: 500px;padding:0 40px;box-sizing: border-box;">
<el-form label-position="left" label-width="100px">
<el-form-item label="姓名">
<el-input></el-input>
<div class="details">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="身份证" name="1" v-if="this.publicObj && this.publicObj.identityAuditStatus !== 0 && this.publicObj.identityAuditStatus !== undefined">
<div style="padding:0 40px;box-sizing: border-box;">
<el-form label-position="left" label-width="100px" :rules="rulesId" ref="formId" :model="IdDetails" >
<el-form-item label="姓名" prop="name">
<el-input v-model="IdDetails.name"></el-input>
</el-form-item>
<el-form-item label="证件类型">
<el-input></el-input>
<el-form-item label="证件类型" prop="cardType">
<dict-selector v-model="IdDetails.cardType" :type="DICT_TYPE.CERTIFICATE_TYPE" ></dict-selector>
</el-form-item>
<el-form-item label="证件号码">
<el-input></el-input>
<el-form-item label="证件号码" prop="cardNumber">
<el-input v-model="IdDetails.cardNumber"></el-input>
</el-form-item>
<el-form-item label="证件正面照">
<el-form-item label="证件正面照" prop="img1">
<div>
<el-input style="margin-bottom: 20px"></el-input>
<ImageUpload :isShowTip="false" :limit="1"></ImageUpload>
<el-input style="margin-bottom: 20px" v-model="IdDetails.img1"></el-input>
<ImageUpload :isShowTip="false" v-model="IdDetails.img1" :limit="1"></ImageUpload>
</div>
</el-form-item>
<el-form-item label="证件背面照">
<el-form-item label="证件背面照" prop="img2">
<div>
<el-input style="margin-bottom: 20px"></el-input>
<ImageUpload :isShowTip="false" :limit="1"></ImageUpload>
<el-input style="margin-bottom: 20px" v-model="IdDetails.img2"></el-input>
<ImageUpload :isShowTip="false" :limit="1" v-model="IdDetails.img2"></ImageUpload>
</div>
</el-form-item>
<el-form-item label="审核状态">
{{}}
{{getDictDatas(DICT_TYPE.AUDIT_STATUS)[IdDetails.status].label}}
</el-form-item>
<el-form-item label="审核时间">
{{}}
{{parseTime(IdDetails.auditTime)}}
</el-form-item>
<el-form-item v-if="IdDetails.status === 0" label="审核备注">
<el-input v-model="IdDetails.auditRemark" :disabled="IdDetails.status === 2" type="textarea"></el-input>
</el-form-item>
</el-form>
<div v-if="IdDetails.status === 0" style="text-align: center;margin-top: 20px;">
<el-button type="primary" @click="idCardAuditFn(2)">审核通过</el-button>
<el-button type="primary" @click="idCardAuditFn(3)">审核不通过</el-button>
<el-button @click="attestationShow = false">取 消</el-button>
</div>
<div v-if="IdDetails.status === 2" style="text-align: center;margin-top: 20px;">
<el-button type="primary" @click="setMemberUserUpdateIdCard">修 改</el-button>
<el-button @click="attestationShow = false">取 消</el-button>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="营业执照" name="2">
<el-tab-pane label="营业执照" name="2" v-if="this.publicObj && this.publicObj.enterpriseAuditStatus !== 0 && this.publicObj.enterpriseAuditStatus !== undefined" >
<div style="width: 500px;padding:0 40px;box-sizing: border-box;">
<el-form label-position="left" label-width="100px">
<el-form-item label="企业名称">
<el-input></el-input>
<el-form :rules="rulesEnterprise" :model="enterpriseFrom" label-position="left" label-width="100px">
<el-form-item label="企业名称" prop="name">
<el-input v-model="enterpriseFrom.name" ></el-input>
</el-form-item>
<el-form-item label="企业法人">
<el-input></el-input>
<el-form-item label="企业法人" prop="legalName">
<el-input v-model="enterpriseFrom.legalName" ></el-input>
</el-form-item>
<el-form-item label="证件号码">
<el-input></el-input>
<el-form-item label="证件号码" prop="cardNumber">
<el-input v-model="enterpriseFrom.cardNumber"></el-input>
</el-form-item>
<el-form-item label="证件照">
<el-form-item label="证件照" prop="img1">
<div>
<el-input style="margin-bottom: 20px"></el-input>
<ImageUpload :isShowTip="false" :limit="1"></ImageUpload>
<el-input style="margin-bottom: 20px" v-model="enterpriseFrom.img1"></el-input>
<ImageUpload :isShowTip="false" :limit="1" v-model="enterpriseFrom.img1"></ImageUpload>
</div>
</el-form-item>
<el-form-item label="附件">
<el-input></el-input>
<el-input v-model="enterpriseFrom.img2"></el-input>
<ImageUpload :isShowTip="false" :limit="1" v-model="enterpriseFrom.img2"></ImageUpload>
</el-form-item>
<el-form-item label="审核状态">{{}}</el-form-item>
<el-form-item label="审核时间">{{}}</el-form-item>
<el-form-item label="审核状态">{{getDictDatas(DICT_TYPE.AUDIT_STATUS)[enterpriseFrom.status].label}}</el-form-item>
<el-form-item label="审核时间">{{parseTime(enterpriseFrom.auditTime)}}</el-form-item>
</el-form>
<div v-if="enterpriseFrom.status === 0" style="text-align: center;margin-top: 20px;">
<el-button type="primary" @click="certificateVerificationFn(2)">审核通过</el-button>
<el-button type="primary" @click="certificateVerificationFn(3)">审核不通过</el-button>
<el-button @click="attestationShow = false">取 消</el-button>
</div>
<div v-if="enterpriseFrom.status === 2" style="text-align: center;margin-top: 20px;">
<el-button type="primary" @click="setMemberUserUpdateEnterprise">修 改</el-button>
<el-button @click="attestationShow = false">取 消</el-button>
</div>
</div>
</el-tab-pane>
</el-tabs>
<div style="text-align: center;margin-top: 20px;">
<el-button type="primary">提交审核</el-button>
<el-button>取 消</el-button>
</div>
</div>
</el-dialog>
</div>
......@@ -187,22 +205,26 @@ import {
createUser,
updateUser,
deleteUser,
getUser,
getUserPage,
exportUserExcel,
operationLogApi,
seTupdateBackletter,
memberGetAuthIdcardInfo
memberGetAuthIdcardInfo,
memberGetAuthEnterpriseInfo,
memberUserAuditIdCard,
memberUserUpdateIdCard,
memberUserUpdateEnterprise
} from "@/api/member/user";
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import FileUpload from "@/components/FileUpload"
import ImageUpload from "@/components/ImageUpload";
import uploadImage from "@/components/UploadImage";
let stateTitle = {
0:'未审核',
1:'审核中',
2:'审核通过',
3:'审核不通过'
let stateId = {
0:'审核中',
1:'审核通过',
2:'审核不通过',
3:'已过期'
}
export default {
name: "User",
......@@ -212,8 +234,13 @@ export default {
},
data() {
return {
totalLog:0,
stateId,
IdDetails:{},
enterpriseFrom:{},
guaranteeUrl:undefined,
DICT_TYPE,
getDictDatas,
// audit_status
activeName:"1",
// 遮罩层
......@@ -241,17 +268,21 @@ export default {
auditStatus:undefined,//审核状态
authType:undefined,//关键字
},
stateTitle,
// 表单参数
form: {},
// 表单校验
rules: {
nickname: [{ required: true, message: "用户昵称不能为空", trigger: "blur" }],
avatar: [{ required: true, message: "头像不能为空", trigger: "blur" }],
status: [{ required: true, message: "状态不能为空", trigger: "blur" }],
mobile: [{ required: true, message: "手机号不能为空", trigger: "blur" }],
password: [{ required: true, message: "密码不能为空", trigger: "blur" }],
registerIp: [{ required: true, message: "注册 IP不能为空", trigger: "blur" }],
rulesId: {
name: [{ required: true, message: "用户昵称不能为空", trigger: "blur" }],
cardType: [{ required: true, message: "证件类型不能为空", trigger: "blur" }],
cardNumber: [{ required: true, message: "证件号码不能为空", trigger: "blur" }],
img1: [{ required: true, message: "身份正面照不能为空", trigger: "blur" }],
img2: [{ required: true, message: "身份正面照不能为空", trigger: "blur" }],
},
rulesEnterprise: {
name: [{required: true, message: "企业名称不能为空", trigger: "blur"}],
legalName: [{required: true, message: "企业法人不能为空", trigger: "blur"}],
cardNumber: [{required: true, message: "证件号码不能为空", trigger: "blur"}],
img1: [{required: true, message: "证件照不能为空", trigger: "blur"}],
},
publicObj:undefined,
operationLogShow:false,
......@@ -266,6 +297,8 @@ export default {
};
},
created() {
this.resetId();
this.resetEnterprise()
this.getList();
},
methods: {
......@@ -283,26 +316,37 @@ export default {
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
nickname: undefined,
avatar: undefined,
status: undefined,
mobile: undefined,
password: undefined,
registerIp: undefined,
loginIp: undefined,
loginDate: undefined,
};
this.resetForm("form");
},
resetId(){
this.IdDetails = {
auditRemark: undefined,
auditTime: undefined,
cardNumber: undefined,
cardType: 0,
createTime: undefined,
id: 0,
img1: undefined,
img2: undefined,
name: '',
status: 0,
userId: 0
}
},//清空身份证
resetEnterprise(){
this.enterpriseFrom = {
auditRemark: undefined,
auditTime: undefined,
cardNumber: undefined,
createTime: undefined,
id: 0,
img1: undefined,
img2: undefined,
legalName: undefined,
name: undefined,
status: 0,
userId: undefined
}
},//清空企业
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
......@@ -315,12 +359,6 @@ export default {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加用户";
},
// 保函证书
guarantee(row) {
this.publicObj = row;
......@@ -340,6 +378,7 @@ export default {
operationLogApi(this.operationLogFrom).then(r=>{
if(r.code === 0){
this.operationLogList = r.data.list
this.totalLog = r.data.total
}
})
},
......@@ -352,69 +391,125 @@ export default {
}
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
// 修改的提交
if (this.form.id != null) {
updateUser(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
// 添加的提交
createUser(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除用户编号为"' + id + '"的数据项?').then(function() {
return deleteUser(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeLoginDate, 'loginDate');
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
this.$modal.confirm('是否确认导出所有用户数据项?').then(() => {
this.exportLoading = true;
return exportUserExcel(params);
}).then(response => {
this.$download.excel(response, '${table.classComment}.xls');
this.exportLoading = false;
}).catch(() => {});
},
identityFn(row,val){
this.attestationShow = true;
this.activeName = val;
this.publicObj = row;
if(val == 1){
this.getIdentityDetails();
}else {
this.getEnterpriseFn();
}
},
handleClick(val){
if(val.name == 1){
this.getIdentityDetails();
}else {
this.getEnterpriseFn();
}
},
getIdentityDetails(){
this.resetId();
memberGetAuthIdcardInfo({userId:this.publicObj.id}).then(r=>{
console.log(r);
if(r.code === 0 && !!r.data){
this.IdDetails = r.data
}
})
},
getEnterpriseFn(){
this.resetEnterprise();
memberGetAuthEnterpriseInfo({userId:this.publicObj.id}).then(r => {
if(r.code === 0 && !!r.data){
this.enterpriseFrom = r.data
}
})
},
//身份证审核
idCardAuditFn(val){
let p = {
auditStatus:val,
userCardAuthId:this.IdDetails.id,
auditRemark:this.IdDetails.auditRemark
}
if(val === 3){
p.auditRemark = undefined
}
memberUserAuditIdCard(p).then(r => {
if(r.code === 0){
this.getIdentityDetails()
}
})
},
// 企业证书审核
certificateVerificationFn(val){
let p = {
auditStatus:val,
userCardAuthId:this.enterpriseFrom.id,
auditRemark:this.enterpriseFrom.auditRemark
}
if(val === 3){
p.auditRemark = undefined
}
memberUserAuditEnterprise(p).then(r => {
if(r.code === 0){
this.getEnterpriseFn();
}
})
},
setMemberUserUpdateIdCard(){
let p ={
cardNumber:this.IdDetails.cardNumber,
cardType:this.IdDetails.cardType,
img1:this.IdDetails.img1,
img2:this.IdDetails.img2,
name:this.IdDetails.name,
userCardAuthId:this.IdDetails.id,
} ;
memberUserUpdateIdCard(p).then(r => {
if(r.code === 0){
this.$message.success('修改成功');
}
})
},
setMemberUserUpdateEnterprise(){
let p = {
cardNumber:this.enterpriseFrom.cardNumber,
img1:this.enterpriseFrom.img1,
img2:this.enterpriseFrom.img2,
legalName:this.enterpriseFrom.legalName,
name:this.enterpriseFrom.name,
userEnterpriseAuthId:this.enterpriseFrom.id
}
memberUserUpdateEnterprise(p).then(r =>{
if(r.code === 0){
this.$message.success('修改成功');
}
})
}
},
watch:{
attestationShow(newVal){
if(!newVal){
this.resetId();
this.resetEnterprise()
this.publicObj = undefined;
}
}
}
};
</script>
<style lang="scss" scoped>
.details{
.el-input {
width: 300px;
}
.el-textarea{
width: 300px;
}
.el-button{
width: 180px;
height: 50px;
margin: 0 10px;
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment