Commit b0adcc57 authored by jiangqihao's avatar jiangqihao

高级认证

parent a10c5ec3
...@@ -76,6 +76,24 @@ export function districtSearch(data){ ...@@ -76,6 +76,24 @@ export function districtSearch(data){
}) })
} }
// 附件查询
export function fileInfoSearch(data){
return request({
url: '/search',
method: 'post',
data
})
}
// CCP高级认证
export function seniorCertification(data) {
return request({
url: '/customer/seniorCertification',
method: 'post',
data
})
}
// 客户发布记录 // 客户发布记录
// 签约产品组 // 签约产品组
export function searchProduct(data) { export function searchProduct(data) {
......
...@@ -165,9 +165,7 @@ export default { ...@@ -165,9 +165,7 @@ export default {
}, },
watch: { watch: {
url: { url: {
handler(newVal) { handler(newVal) { },
},
deep: true deep: true
} }
}, },
......
...@@ -123,16 +123,16 @@ ...@@ -123,16 +123,16 @@
{{ $t('navbar.dashboard') }} {{ $t('navbar.dashboard') }}
</el-dropdown-item> </el-dropdown-item>
</router-link> </router-link>
<router-link to="/profile/index"> <!-- <router-link to="/profile/index">
<el-dropdown-item> <el-dropdown-item>
{{ $t('navbar.profile') }} {{ $t('navbar.profile') }}
</el-dropdown-item> </el-dropdown-item>
</router-link> </router-link> -->
<router-link to="/changePass/index"> <!-- <router-link to="/changePass/index">
<el-dropdown-item> <el-dropdown-item>
修改密码 修改密码
</el-dropdown-item> </el-dropdown-item>
</router-link> </router-link> -->
<el-dropdown-item <el-dropdown-item
divided divided
@click.native="logout" @click.native="logout"
......
...@@ -27,6 +27,27 @@ const customersRouter = { ...@@ -27,6 +27,27 @@ const customersRouter = {
meta: {title: '代理商新增'}, meta: {title: '代理商新增'},
hidden: true, hidden: true,
}, },
{
path: '/customersDetails/total',
component: () => import('@/views/customers/customers-details/index.vue'),
name: 'customersDetails',
meta: {title: '总代理商详情'},
hidden: true,
},
{
path: '/customersDetails/province',
component: () => import('@/views/customers/customers-details/province.vue'),
name: 'customersDetails',
meta: {title: '省代理商详情'},
hidden: true,
},
{
path: '/customersDetails/area',
component: () => import('@/views/customers/customers-details/area.vue'),
name: 'customersDetails',
meta: {title: '城市代理商详情'},
hidden: true,
},
// { // {
// path: '/potential', // path: '/potential',
// component: () => import('@/views/customers/potential-customers'), // component: () => import('@/views/customers/potential-customers'),
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -67,7 +67,7 @@ const tableConfig = { ...@@ -67,7 +67,7 @@ const tableConfig = {
icon: 'el-icon-edit-outline', icon: 'el-icon-edit-outline',
type: 'text' type: 'text'
} }
}, i18n.t('详情')), }, '详情'),
// h('el-button', { // h('el-button', {
// on: { // on: {
// click: (e) => listeners.handleTakeEffect(scope.row, 'takeEffect') // click: (e) => listeners.handleTakeEffect(scope.row, 'takeEffect')
......
...@@ -47,16 +47,14 @@ export default { ...@@ -47,16 +47,14 @@ export default {
}, },
created() { created() {
this.tableListeners = { this.tableListeners = {
// handleDetails: this.handleDetails, // 添加 handleEdit: this.handleEdit, // 详情
// handleTakeEffect: this.handleTakeEffect, // 生效
handleEdit: this.handleEdit, // 编辑
// handleInvalid: this.handleInvalid // 失效
} }
}, },
methods: { methods: {
// 编辑 // 编辑
handleEdit() { handleEdit(row) {
console.log("编辑") console.log(row)
this.$router.push({ path: '/customersDetails/total',query: { objectID: row.ObjectID}})
}, },
// 添加 // 添加
handleAdd() { handleAdd() {
......
...@@ -51,7 +51,7 @@ const tableConfig = { ...@@ -51,7 +51,7 @@ const tableConfig = {
icon: 'el-icon-edit-outline', icon: 'el-icon-edit-outline',
type: 'text' type: 'text'
} }
}, i18n.t('详情')), }, '详情'),
// h('el-button', { // h('el-button', {
// on: { // on: {
// click: (e) => listeners.handleTakeEffect(scope.row, 'takeEffect') // click: (e) => listeners.handleTakeEffect(scope.row, 'takeEffect')
......
...@@ -47,6 +47,7 @@ export default { ...@@ -47,6 +47,7 @@ export default {
methods: { methods: {
// 编辑 // 编辑
handleEdit(row) { handleEdit(row) {
this.$router.push({ path: '/customersDetails/area',query: { objectID: row.ObjectID}})
console.log("编辑", row) console.log("编辑", row)
}, },
// 添加 // 添加
......
import { file } from '@/api/customers'
const tableConfig = {
tableTitle: '附件信息',
url: file.searchUrl,
// url: '',
isSearch: true,
defaultColumns: {
minWidth: 120,
showOverflowTooltip: true,
align: 'center'
},
columns: {
CreateOn_SDK: {
label: '创建时间'
},
FileName: {
label: '文件名'
},
handle: {
label: '操作',
hideInFilter: true,
fixed: 'right',
renderItem: (h, scope, listeners) => {
return h('div', [
// h('el-button', {
// on: {
// click: (e) => listeners.handleEdit(scope.row, 'edit')
// },
// props: {
// icon: 'el-icon-edit-outline',
// type: 'text'
// }
// }, '编辑'),
h('el-button', {
on: {
click: (e) => listeners.handleDownload(scope.row, 'takeEffect')
},
props: {
icon: 'el-icon-circle-check',
type: 'text'
}
}, '下载'),
])
},
}
}
}
const formConfig = {
labelPosition: 'left',
isShowBackBtn: false,
isShowSubmitBtn: false,
formDesc: {
TypeCode: {
vif: false,
label: '类型',
default: ''
},
FileDetails: {
label: '附件'
}
}
}
export default {
tableConfig,
formConfig,
...file
}
<template> <template>
<div> <div class="table-container">
<FileTable :type-code="typeCode" :objectID='objectId'/> <form-title :title="tableConfig.tableTitle">
<div v-if="isShowEditBtn">
<el-button
type="primary"
icon="el-icon-plus"
@click="handleAdd()"
:disabled="addBtnStart"
>添加</el-button>
<el-button
type="danger"
icon="el-icon-delete"
@click="handleDelete()"
:disabled="dedeleBtnStart"
>删除</el-button>
</div>
</form-title>
<ele-table
ref="eleTable"
:multiple="false"
:listeners="tableListeners"
v-bind="tableConfig"
:expand-params="expandParams"
@handleSelectionChange="handleSelectionChange"
/>
<el-dialog
:title="dialogTitle"
:visible.sync="dialogFormVisible"
:loading="loading"
>
<ele-form
ref="form"
v-model="formData"
v-bind="formConfig"
>
<template v-slot:FileDetails>
<upload-btn
:objectID="formData.ObjectID"
:fileDetails="formData.FileDetails"
:file-list="fileList"
@change="changeFileList"
/>
</template>
</ele-form>
<div
slot="footer"
class="dialog-footer"
>
<el-button @click="dialogFormVisible = false">取消</el-button>
<el-button
type="primary"
@click="handleSave"
>保存</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { uploadCode } from '@/api/upload' import constant from './constant'
import FileTable from '@/views/public/file-info' import UploadBtn from './upload-btn'
import { file, fileInfoSearch } from '@/api/customers'
export default { export default {
components: { components: { UploadBtn, fileInfoSearch },
FileTable name: 'FileInfo',
},
props: { props: {
// addBtnStart: { isShowEditBtn: {
// type: Boolean, type: Boolean,
// default: false default: true
},
// 不同的typeCode代表不同模块的附件
typeCode: {
type: String,
required: true
},
// 同一模块的附件通过moduleType区分
moduleType: {
type: String,
default: ''
},
// path: {
// type: String,
// required: true
// }, // },
objectId: { objectID: {
type: String, type: String,
default: '' default: ''
},
addBtnStart: {
type: Boolean,
default: true,
},
dedeleBtnStart: {
type: Boolean,
default: true,
} }
}, },
data() { data() {
return { return {
typeCode: uploadCode.customer, tableConfig: constant.tableConfig,
// addBtnStart: false formConfig: constant.formConfig,
expandParams: {},
desc: {},
tableListeners: {}, // 事件监听对象,供ele-table内部调用
formData: {},
fileList: [],
row: {},
$index: -1,
current: null,
dialogFormVisible: false,
dialogTitle: '',
loading: false,
// url: ''
} }
}, },
watch: { watch: {
// addBtnStart: { isShowEditBtn(val) {
// handler(newVal) { this.tableConfig.columns.handle.vif = val
// console.log(newVal)
// },
// immediate: true,
// deep: true
// },
objectId: {
handler(newVal) {
// constant.tableConfig.initialParams = {
// BusinessObjectID: newVal
// }
}, },
btnStart: {
handler(val){},
deep: true,
immediate: true, immediate: true,
deep: true
} }
}, },
created() { created() {
// this.addBtnStart = this.$route.query.addBtnStart this.tableConfig.columns.handle.vif = this.isShowEditBtn
constant.tableConfig.initialParams = {
BusinessObjectID: this.objectID || this.$route.query.objectID,
TypeCode: this.typeCode
}
if (this.moduleType) {
constant.tableConfig.initialParams.ModuleType = this.moduleType
}
constant.formConfig.formDesc.TypeCode.default = this.typeCode
// constant.formConfig.formDesc.Path.default = this.path
this.tableListeners = {
handleEdit: this.handleEdit,
handleDownload: this.handleDownload
}
},
methods: {
getDetails(params) {
this.loading = true
this.$request(file.detailUrl, params).then((res) => {
this.loading = false
this.formData = res.results[0]
})
},
handleAdd() {
this.dialogTitle = '创建附件'
this.formData = {}
this.fileList = []
this.dialogFormVisible = true
},
handleEdit(row, index) {
this.dialogTitle = '编辑附件'
this.$index = index
this.row = row
this.formData = {}
this.getDetails({ objectID: row.ObjectID })
this.fileList = []
this.dialogFormVisible = true
},
// 选择/删除临时文件
changeFileList(fileList) {
this.fileList = fileList
},
handleSave() {
const fd = this.$getUpdateChange(this.row, this.formData)
if (Object.keys(fd).length < 2 && this.fileList.length === 0) {
this.dialogFormVisible = false
return
}
const formData = new FormData()
for (const key in fd) {
formData.append(key, fd[key])
}
if (this.moduleType) {
formData.append('moduleType', this.moduleType)
}
this.fileList.forEach((item) => {
formData.append('file', item.raw)
})
// if (this.fileList.length > 0) {
// formData.path = this.path
// }
if (!this.formData.ObjectID) {
const businessObjectID =
this.$route.query.objectID || this.tableConfig.initialParams.objectID
formData.append('businessObjectID', businessObjectID)
formData.delete('objectID')
this.loading = true
this.$request(file.createUrl, formData).then(res => {
console.log(res)
this.loading = false
this.dialogFormVisible = false
this.fileList = []
this.$message.success('添加成功!')
this.$refs.eleTable.url = file.searchUrl
this.$refs.eleTable.handleSearch()
}).catch(() => {
this.loading = false
// this.tableConfig.url = file.searchUrl
})
} else {
formData.append('typeCode', this.typeCode)
this.$request(file.updateUrl, formData).then((res) => {
this.loading = false
this.dialogFormVisible = false
this.$message.success('修改成功!')
// this.tableConfig.url = file.searchUrl
this.$refs.eleTable.url = file.searchUrl
this.$refs.eleTable.handleSearch()
}).catch(() => {
this.loading = false
})
}
},
handleSelectionChange(selection) {
this.current = selection.length > 0 ? selection[0] : null
},
handleDelete() {
if (this.current === null) {
this.$message.warning('请先选择一行数据')
return
}
console.log(this.$refs.eleTable.tableData)
if (!this.$refs.eleTable.tableData[0].FileLabel == 1) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$request(file.deleteUrl, { objectID: this.current.ObjectID }).then(() => {
this.$message.success('删除成功!')
this.$refs.eleTable.url = file.searchUrl
this.$refs.eleTable.handleSearch()
}
)
})
} else {
this.$message.error('当前选中的附件禁止删除')
}
// this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// this.$request(file.deleteUrl, { objectID: this.current.ObjectID }).then(() => {
// this.$message.success('删除成功!')
// this.$refs.eleTable.url = file.searchUrl
// this.$refs.eleTable.handleSearch()
// }
// )
// })
},
handleDownload(row) {
window.open(row.FileURL)
}
} }
} }
</script> </script>
<style> <style>
</style> </style>
<template>
<div>
<el-upload
v-if="vif"
:disabled="disabled"
ref="upload"
action="false"
:limit="5"
:multiple="multiple"
:on-change="handleChange"
:on-remove="handleRemove"
:auto-upload="false"
:on-exceed="handleExceed"
:file-list="fileList"
>
<el-button size="small" type="primary">上传文件</el-button>
</el-upload>
<!-- <upload-list
v-if="objectID"
v-bind="config"
:files="fileDetails"
@remove="handleRemoveReq" /> -->
</div>
</template>
<script>
import { file } from '@/api/customers'
import UploadList from '@/components/UploadFile/UploadList.vue'
export default {
components: { UploadList },
name: 'UploadBtn',
props: {
vif: {
type: Boolean,
default: true
},
disabled: {
type: Boolean,
default: false
},
objectID: {
type: String,
default: function() {
return this.$route.query.objectID
}
},
// 是否支持多选文件
multiple: {
type: Boolean,
default: false
},
// 已上传到服务器的文件列表
fileDetails: {
type: Array,
default: function() {
return []
}
},
config: {
type: Object,
default: function() {
return {}
}
},
fileList: {
type: Array,
default: function() {
return []
}
}
},
data() {
return {
// fileList: [],
}
},
watch: {
fileList: {
handler(newVal){},
deep: true,
immediate: true
}
},
created() {
},
methods: {
// 监控上传文件列表
handleChange(file, fileList) {
this.fileList = fileList
this.$emit('change', fileList)
},
// 移除文件
handleRemove(file, fileList) {
this.fileList = fileList
this.$emit('change', fileList)
},
handleExceed() {
this.$message.warning('上传文件超出文件数量')
}
// // 删除文件
// handleRemoveReq(index, item) {
// this.$request(file.deleteDetailUrl, [{ objectID: item.ObjectID }]).then(() => {
// this.$message.success('删除成功!')
// this.fileDetails.splice(index, 1)
// }
// )
// }
}
}
</script>
<style>
</style>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
@request-success="handleSuccess" @request-success="handleSuccess"
/> />
</div> </div>
<PersonalInFo :objectId='objectId'/> <PersonalInFo :addBtnStart='addBtnStart' :dedeleBtnStart="dedeleBtnStart" :type-code="typeCode"/>
</div> </div>
</template> </template>
...@@ -21,6 +21,7 @@ import Title from '@/components/Title' ...@@ -21,6 +21,7 @@ import Title from '@/components/Title'
import { customerCreate, provinceSearch, citySearch, districtSearch, customerGetOne } from '@/api/customers'; import { customerCreate, provinceSearch, citySearch, districtSearch, customerGetOne } from '@/api/customers';
import { qccGetOne } from '@/api/qcc' import { qccGetOne } from '@/api/qcc'
import PersonalInFo from './conponents/personal-info' import PersonalInFo from './conponents/personal-info'
import { uploadCode } from '@/api/upload'
export default { export default {
components: { components: {
...@@ -35,9 +36,11 @@ export default { ...@@ -35,9 +36,11 @@ export default {
}, },
data () { data () {
return { return {
title: '代理商新增', typeCode: uploadCode.customer,
addBtnStart: false, title: '代理商详情',
objectId: '', dedeleBtnStart: true,
objectID: '',
addBtnStart: true,
formData: {}, formData: {},
isShowSubmitBtn: false, isShowSubmitBtn: false,
isShowBackBtn: false, isShowBackBtn: false,
...@@ -308,9 +311,14 @@ export default { ...@@ -308,9 +311,14 @@ export default {
}, },
getOneData() { getOneData() {
const dataId = JSON.parse(localStorage.getItem('USERINFO')).ExtCustomerObjectID_SDK const dataId = JSON.parse(localStorage.getItem('USERINFO')).ExtCustomerObjectID_SDK
this.$router.push({
path: '/Personal-customers',
query: { objectID: dataId}
})
customerGetOne({ objectID: dataId }).then(res => { customerGetOne({ objectID: dataId }).then(res => {
this.formData = res.results[0] this.formData = res.results[0]
console.log(res) this.addBtnStart = false
this.dedeleBtnStart = false
}) })
} }
} }
......
...@@ -51,7 +51,7 @@ const tableConfig = { ...@@ -51,7 +51,7 @@ const tableConfig = {
icon: 'el-icon-edit-outline', icon: 'el-icon-edit-outline',
type: 'text' type: 'text'
} }
}, i18n.t('详情')), }, '详情'),
// h('el-button', { // h('el-button', {
// on: { // on: {
// click: (e) => listeners.handleTakeEffect(scope.row, 'takeEffect') // click: (e) => listeners.handleTakeEffect(scope.row, 'takeEffect')
......
...@@ -48,6 +48,7 @@ export default { ...@@ -48,6 +48,7 @@ export default {
methods: { methods: {
// 编辑 // 编辑
handleEdit(row) { handleEdit(row) {
this.$router.push({ path: '/customersDetails/province',query: { objectID: row.ObjectID}})
console.log("编辑", row) console.log("编辑", row)
}, },
// 添加 // 添加
......
...@@ -134,14 +134,14 @@ export default { ...@@ -134,14 +134,14 @@ export default {
data() { data() {
const validateUsername = (rule, value, callback) => { const validateUsername = (rule, value, callback) => {
if (!value) { if (!value) {
callback(new Error('Please enter the correct user name')) callback(new Error('请输入账号'))
} else { } else {
callback() callback()
} }
} }
const validatePassword = (rule, value, callback) => { const validatePassword = (rule, value, callback) => {
if (value.length < 6) { if (value.length < 6) {
callback(new Error('The password can not be less than 6 digits')) callback(new Error('请输入密码'))
} else { } else {
callback() callback()
} }
...@@ -178,7 +178,8 @@ export default { ...@@ -178,7 +178,8 @@ export default {
rules: [ rules: [
{ {
trigger: "blur", trigger: "blur",
message: "请输入原始密码" message: "原始密码",
placeholder: "原始密码"
} }
], ],
attrs: { attrs: {
...@@ -187,35 +188,42 @@ export default { ...@@ -187,35 +188,42 @@ export default {
} }
}, },
NewPassword: { NewPassword: {
type: "input", type: "password",
label: "新密码", label: "新密码",
layout: 14, layout: 14,
required: true, required: true,
rules: [ rules: [
{ {
min: 8,
max: 16,
type: "string",
trigger: "blur", trigger: "blur",
message: "请输入新密码" message: "密码由字母(区分大小写)和数字组成,长度不能小于8位" }
}
], ],
attrs: { attrs: {
size: "mini", size: "mini",
clearable: false clearable: false,
minlength: 8
} }
}, },
AgainPassword: { AgainPassword: {
type: "input", type: "password",
label: "确认密码", label: "确认密码",
layout: 14, layout: 14,
required: true, required: true,
rules: [ rules: [
{ {
min: 8,
max: 16,
type: "string",
trigger: "blur", trigger: "blur",
message: "请输入新密码" message: "密码由字母(区分大小写)和数字组成,长度不能小于8位"
} }
], ],
attrs: { attrs: {
size: "mini", size: "mini",
clearable: false clearable: false,
minlength: 8
} }
} }
}, },
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
:url="url" :url="url"
@handleSelectionChange="handleSelectionChange" @handleSelectionChange="handleSelectionChange"
/> />
<el-dialog <el-dialog
:title="dialogTitle" :title="dialogTitle"
:visible.sync="dialogFormVisible" :visible.sync="dialogFormVisible"
......
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