Commit af4b6cd2 authored by dzx's avatar dzx

Merge branch 'dev' into 'master'

Dev

See merge request !5
parents f05f844b 26fca489
......@@ -2,5 +2,6 @@
applications:
- name: portalhtml
memory: 500M
routes:
- route: devcrm.wangyouyu.com
......@@ -181,18 +181,18 @@ export default {
Status: {
label: '状态',
type: 'input',
layout: 12,
layout: 8,
vif: false,
},
Name: {
label: '公司名称',
type: 'input',
layout: 14
layout: 22
},
OperName: {
label: '法人',
type: 'input',
layout: 12,
layout: 8,
vif: false,
},
CreditCode: {
......
......@@ -3,7 +3,8 @@ import request from '@/utils/request'
export const Qcc = {
searchUrl: '/qcc/search',
detailUrl: '/qcc/getOne'
detailUrl: '/qcc/getOne',
onlyDetailUrl: '/customer/checkUniqueness',
}
export const Country = {
searchPro: '/province/searchAll',
......
<template>
<div class="table-container">
<form-title :title="tableConfig.tableTitle">
<div>
<div v-if="isShowBtn">
<slot
name="btn"
:selection="selection"
......@@ -78,6 +78,10 @@ export default {
deleteUrl: {
type: String,
default: ''
},
isShowBtn: {
type: Boolean,
default: true
}
},
data() {
......@@ -89,7 +93,8 @@ export default {
selection: [],
dialogFormVisible: false,
dialogTitle: '',
loading: false
loading: false,
fenye: true
}
},
created() {
......
This diff is collapsed.
......@@ -68,30 +68,30 @@ export default {
},
methods: {
// 变化处理
// handleChange(value) {
// var result = {}
// if (!this.attrs.multiple) {
// this.options.forEach(item => {
// if (item.value === value) {
// result = item.value
// }
// })
// } else {
// result = {
// value: [],
// text: []
// }
// this.options.forEach(item => {
// value.forEach(jtem => {
// if (item.value === jtem) {
// result.value.push(item.value)
// result.text.push(item.text)
// }
// })
// })
// }
// this.$emit('input', result)
// },
handleChange(value) {
var result = {}
if (!this.attrs.multiple) {
this.options.forEach(item => {
if (item.value === value) {
result = item
}
})
} else {
result = {
value: [],
text: []
}
this.options.forEach(item => {
value.forEach(jtem => {
if (item.value === jtem) {
result.value.push(item.value)
result.text.push(item.text)
}
})
})
}
this.$emit('input', result)
},
changeOptions(q) {
if (this.remoteMethod) {
this.loading = true
......
......@@ -187,6 +187,7 @@ export default {
const params = this.$translateToC4CData(data)
this.loading = true
fetchJAVATable(this.url, params).then(res => {
console.log(res)
this.tableData = res.results || []
this.total = Number(res.totalSize || 0)
this.loading = false
......
......@@ -17,35 +17,35 @@ const customersRouter = {
path: '/overview',
component: () => import('@/views/customers/customers-overview'),
name: 'CustomersOverview',
meta: { title: '总代理商' }
meta: { title: '总代信息' }
},
// 添加新代理商
{
path: '/customersAdd',
component: () => import('@/views/customers/customers-add'),
name: 'CustomersOverviewAdd',
meta: {title: '代理商新增'},
meta: {title: '总代注册'},
hidden: true,
},
{
path: '/CustomersOverview-detail',
component: () => import('@/views/customers/customers-details/index.vue'),
name: 'CustomersOverviewDetail',
meta: {title: '总代理商详情'},
meta: {title: '总代详情'},
hidden: true,
},
{
path: '/CustomersProvince-detail',
component: () => import('@/views/customers/customers-details/province.vue'),
name: 'CustomersProvinceDetail',
meta: {title: '省代理商详情'},
meta: {title: 'RSP信息详情'},
hidden: true,
},
{
path: '/CustomersCity-detail',
component: () => import('@/views/customers/customers-details/area.vue'),
name: 'CustomersCityDetail',
meta: {title: '城市代理商详情'},
meta: {title: 'CCP信息详情'},
hidden: true,
},
{
......@@ -59,19 +59,19 @@ const customersRouter = {
path: '/Provincial-agentList',
component: () => import('@/views/customers/provincial-agentList'),
name: 'CustomersProvince',
meta: { title: '省级代理商' }
meta: { title: 'RSP信息' }
},
{
path: '/Municipal-agentList',
component: () => import('@/views/customers/municipal-agentList'),
name: 'CustomersCity',
meta: { title: '城市代理商' }
meta: { title: 'CCP信息' }
},
{
path: '/potential',
component: () => import('@/views/customers/potential-customers'),
name: 'CustomersProcess',
meta: { title: 'potentialCustomers' }
meta: { title: '注册商审批' }
},
{
path: '/citypotential-list',
......@@ -83,117 +83,9 @@ const customersRouter = {
path: '/Personal-customers',
component: () => import('@/views/customers/personal-customers'),
name: 'CustomersMessage',
meta: { title: '代理商信息' }
meta: { title: '注册信息' }
},
// {
// path: 'resource',
// meta: { title: '资源池管理' },
// component: () => import('@/views/customers/resource'),
// redirect: '/customers/resource/pool',
// name: 'ResourceManagement',
// children: [
// {
// path: 'pool',
// component: () => import('@/views/customers/resource-pool'),
// name: 'ResourcePool',
// meta: { title: '资源池' }
// },
// {
// path: 'release',
// component: () => import('@/views/customers/release-record'),
// name: 'ReleaseRecord',
// meta: { title: '发布记录' }
// },
// {
// path: 'release-detail',
// component: () => import('@/views/customers/release-record/detail'),
// name: 'ReleaseDetail',
// hidden: true,
// meta: { title: '发布记录详情' }
// },
// {
// path: 'detail',
// component: () => import('@/views/customers/resource-detail/detail.vue'),
// name: 'ResourceDetail',
// meta: { title: '资源池客户详情' },
// hidden: true
// },
// {
// path: 'application',
// component: () => import('@/views/customers/application-record'),
// name: 'ApplicationRecord',
// meta: { title: '申请记录' }
// },
// {
// path: 'application-detail',
// component: () => import('@/views/customers/application-record/detail.vue'),
// name: 'ApplicationDetail',
// hidden: true,
// meta: { title: '申请记录详情' }
// },
// {
// path: 'approval',
// component: () => import('@/views/customers/approval-record'),
// name: 'ApprovalRecord',
// meta: { title: '审批记录' }
// },
// {
// path: 'approval-detail',
// component: () => import('@/views/customers/approval-record/detail'),
// name: 'ApprovalDetail',
// hidden: true,
// meta: { title: '审批记录详情' }
// },
// {
// path: 'contact',
// component: () => import('@/views/customers/contact'),
// name: 'Contact',
// meta: { title: '联系人' }
// },
// ]
// },
{
path: 'enterprise',
component: () => import('@/views/customers/enterprise-customers'),
name: 'EnterpriseCustomers',
meta: { title: 'enterpriseCustomers' },
hidden: true
},
{
path: 'enterprise-detail',
component: () => import('@/views/customers/enterprise-customers/detail'),
name: 'EnterpriseCustomersDetail',
meta: { title: '企业用户详情' },
hidden: true
},
{
path: 'individual',
component: () => import('@/views/customers/individual-customers'),
name: 'IndividualCustomersDetail',
meta: { title: '个人客户' },
hidden: true
},
{
path: 'individual-detail',
component: () => import('@/views/customers/individual-customers/detail'),
name: 'IndividualCustomers',
meta: { title: '个人客户详情' },
hidden: true
},
{
path: 'important',
component: () => import('@/views/customers/important-customers'),
name: 'ImportantCustomers',
meta: { title: '创建正式客户' },
hidden: true
},
{
path: 'important-detail',
component: () => import('@/views/customers/important-customers/detail'),
name: 'ImportantCustomersDetail',
meta: { title: '正式客户详情' },
hidden: true
}
]
}
export default customersRouter
......@@ -17,19 +17,19 @@ const modelsRouter = {
path: 'total',
component: () => import('@/views/models/total-models'),
name: 'TemplatesOverview',
meta: { title: '总代模板' }
meta: { title: '总代协议模板' }
},
{
path: 'prov',
component: () => import('@/views/models/prov-models'),
name: 'TemplatesProvince',
meta: { title: '省代模板' }
meta: { title: 'RSP协议模板' }
},
{
path: 'city',
component: () => import('@/views/models/city-models'),
name: 'TemplatesCity',
meta: { title: '城市模板' }
meta: { title: 'CCP协议模板' }
},
{
path: 'all',
......
......@@ -93,17 +93,39 @@ const actions = {
})
},
async getPermissions({ commit }, roleId) {
await normalRequest(role.searchOneUrl, { id: roleId }).then(res => {
var menus = res.results.data.results[0].RoleToMenuMenuList
if(roleId !== '') {
await normalRequest(role.searchOneUrl, { id: roleId }).then(res => {
var menus = res.results.data.results[0].RoleToMenuMenuList
var permissions = []
var paths = []
treeToArray(menus, permissions, paths)
// console.log(paths)
localStorage.setItem('PERMISSIONS', JSON.stringify(permissions))
localStorage.setItem('PATHS', JSON.stringify(paths))
commit('SET_PERMISSIONS', permissions)
commit('SET_PATHS', paths)
})
} else {
var permissions = []
var paths = []
treeToArray(menus, permissions, paths)
console.log(paths)
// treeToArray(menus, permissions, paths)
// console.log(paths)
localStorage.setItem('PERMISSIONS', JSON.stringify(permissions))
localStorage.setItem('PATHS', JSON.stringify(paths))
commit('SET_PERMISSIONS', permissions)
commit('SET_PATHS', paths)
})
}
// await normalRequest(role.searchOneUrl, { id: roleId }).then(res => {
// var menus = res.results.data.results[0].RoleToMenuMenuList
// var permissions = []
// var paths = []
// treeToArray(menus, permissions, paths)
// // console.log(paths)
// localStorage.setItem('PERMISSIONS', JSON.stringify(permissions))
// localStorage.setItem('PATHS', JSON.stringify(paths))
// commit('SET_PERMISSIONS', permissions)
// commit('SET_PATHS', paths)
// })
}
}
......
import dictionary from '@/api/dictionary'
import { releaseRecord, applicationRecord } from '@/api/customers'
const tableConfig = {
url: releaseRecord.searchUrl,
defaultColumns: {
minWidth: 120,
showOverflowTooltip: true,
align: 'center'
},
columns: {
ReleaseName: {
label: '发布名称',
type: 'input',
renderItem: (h, scope, listeners) => {
return h(
'el-button',
{
on: {
click: (e) => listeners.handleCheck(scope.row)
},
props: {
type: 'text'
}
},
scope.row.ReleaseName)
},
showInSearch: true
},
ReleaseBatch: {
label: '发布批次',
type: 'input',
showInSearch: true
},
ReleaseContent: {
label: '发布内容',
type: 'select'
},
ReleaseStartTime: {
label: '发布开始时间',
showInSearch: true,
type: 'date'
},
ReleaseEndTime: {
label: '发布截止时间',
type: 'input'
},
PublicationResultTime: {
label: '公布结果时间',
type: 'input'
},
ApprovalEndTime: {
label: '审核截止时间',
type: 'input'
},
ApprovalStatus: {
label: '审批状态',
type: 'select',
value: 'ApprovalStatusText',
options: dictionary.approvalStatus
},
CreateName: {
label: '创建人',
type: 'input'
},
CreateOn: {
label: '创建时间',
type: 'input'
}
}
}
const listConfig = {
tableTitle: '客户资源清单',
url: releaseRecord.customerListUrl,
initialParams: {},
defaultColumns: {
minWidth: 120,
showOverflowTooltip: true,
align: 'center'
},
columns: {
AccountName: {
label: '客户',
type: 'input',
renderItem: (h, scope, listeners) => {
return h(
'el-button',
{
on: {
click: (e) => listeners.handleCheck(scope.row)
},
props: {
type: 'text'
}
},
scope.row.AccountName)
},
showInSearch: true
},
handle: {
label: '操作',
hideInFilter: true,
fixed: 'right',
renderItem: (h, scope, listeners) => {
return h(
'el-button',
{
on: {
click: (e) => listeners.handleApply(scope.row)
},
class: 'el-icon-s-promotion',
props: {
type: 'text'
}
},
'申请')
}
}
}
}
const applyDialogformConfig = {
title: '申请原因',
createUrl: applicationRecord.createUrl,
labelPosition: 'left',
submitBtnText: '确定',
span: 22,
formDesc: {
ApplicationReason: {
type: 'textarea',
label: '申请原因',
required: true,
layout: 24
}
}
}
const applicationRecordConfig = {
tableTitle: '申请记录',
url: applicationRecord.searchUrl,
initialParams: {},
defaultColumns: {
minWidth: 120,
showOverflowTooltip: true,
align: 'center'
},
columns: {
AccountName: {
label: '客户',
type: 'input',
renderItem: (h, scope, listeners) => {
return h(
'el-button',
{
on: {
click: (e) => listeners.handleCheck(scope.row)
},
props: {
type: 'text'
}
},
scope.row.AccountName)
}
},
ApplicationPersonName: {
label: '申请人',
type: 'input'
},
ApplicationTime: {
label: '申请时间',
type: 'input'
},
ApplicationReason: {
label: '申请原因',
type: 'input'
}
}
}
export default {
tableConfig,
listConfig,
applicationRecordConfig,
applyDialogformConfig
}
<template>
<div class="app-container">
<ele-search
:columns="listConfig.columns"
@handleSearch="handleSearch"
@handleReset="handleReset"
@handleFilter="handleFilter"
/>
<div class="table-container">
<form-title :title="listConfig.tableTitle" />
<ele-table
ref="eleTable"
v-bind="listConfig"
:expand-params="expandParams"
:listeners="tableListeners"
/>
</div>
<div class="table-container">
<form-title :title="applicationRecordConfig.tableTitle" />
<ele-table
ref="eleTable2"
v-bind="applicationRecordConfig"
:expand-params="expandParams"
:listeners="tableListeners"
/>
</div>
<!-- 弹框部分 -->
<ele-form-dialog
:form-data="applyData"
:request-fn="handleSave"
:visible.sync="applyDialogFormVisible"
v-bind="applyDialogformConfig"
:loading="applyLoading"
/>
</div>
</template>
<script>
import constant from './constant'
import tableMixin from '@/mixins/table'
export default {
mixins: [tableMixin],
data() {
return {
expandParams: {}, // 筛选条件
tableListeners: {}, // 事件监听对象,供ele-table内部调用
listConfig: {},
applicationRecordConfig: {},
applyLoading: false,
applyData: {},
applyDialogFormVisible: false,
applyDialogformConfig: constant.applyDialogformConfig
}
},
created() {
constant.listConfig.initialParams.parentObjectID = this.$route.query.objectID
this.listConfig = constant.listConfig
constant.applicationRecordConfig.initialParams.releaseRecordID = this.$route.query.objectID
this.applicationRecordConfig = constant.applicationRecordConfig
this.tableListeners = {
handleCheck: this.handleCheck,
handleApply: this.handleApply
}
},
methods: {
handleCheck(row) {
},
handleApply(row) {
this.applyData = {
AccountID: row.AccountID,
AccountName: row.AccountName,
releaseRecordID: row.ParentObjectID,
approvalStatus: '101'
}
this.applyDialogFormVisible = true
},
handleSave() {
this.applyLoading = true
const url = this.applyDialogformConfig.createUrl
const applyData = this.$translateToC4CData(this.applyData)
this.$request(url, [applyData]).then(res => {
this.applyLoading = false
this.applyDialogFormVisible = false
this.$refs.eleTable2.handleSearch()
}).catch(() => {
this.applyLoading = false
})
}
}
}
</script>
<style lang="scss" scoped>
</style>
<template>
<div class="app-container">
<ele-search
:columns="tableConfig.columns"
@handleSearch="handleSearch"
@handleReset="handleReset"
@handleFilter="handleFilter"
/>
<div class="table-container">
<ele-table
ref="eleTable"
v-bind="tableConfig"
:expand-params="expandParams"
:listeners="tableListeners"
@handleSelectionChange="handleSelectionChange"
/>
</div>
</div>
</template>
<script>
import constant from './constant'
import tableMixin from '@/mixins/table'
export default {
mixins: [tableMixin],
data() {
return {
expandParams: {}, // 筛选条件
tableListeners: {}, // 事件监听对象,供ele-table内部调用
tableConfig: constant.tableConfig
}
},
created() {
this.tableListeners = {
handleCheck: this.handleCheck
}
},
methods: {
handleSelectionChange(selection) {
console.log(selection)
this.selection = selection
},
handleCheck(row) {
this.$router.push({
path: '/customers/resource/application-detail',
query: {
objectID: row.ObjectID
}
})
}
}
}
</script>
<style lang="scss" scoped>
</style>
import dictionary from '@/api/dictionary'
import { releaseRecord, applicationRecord, approvalRecord } from '@/api/customers'
const tableConfig = {
url: releaseRecord.searchUrl,
defaultColumns: {
minWidth: 120,
showOverflowTooltip: true,
align: 'center'
},
columns: {
ReleaseName: {
label: '发布名称',
type: 'input',
renderItem: (h, scope, listeners) => {
return h(
'el-button',
{
on: {
click: (e) => listeners.handleCheck(scope.row)
},
props: {
type: 'text'
}
},
scope.row.ReleaseName)
},
showInSearch: true
},
ReleaseBatch: {
label: '发布批次',
type: 'input',
showInSearch: true
},
ReleaseContent: {
label: '发布内容',
type: 'select'
},
ReleaseStartTime: {
label: '发布开始时间',
showInSearch: true,
type: 'date'
},
ReleaseEndTime: {
label: '发布截止时间',
type: 'input'
},
PublicationResultTime: {
label: '公布结果时间',
type: 'input'
},
ApprovalEndTime: {
label: '审核截止时间',
type: 'input'
},
ApprovalStatus: {
label: '审批状态',
type: 'select',
value: 'ApprovalStatusText',
options: dictionary.approvalStatus
},
CreateName: {
label: '创建人',
type: 'input'
},
CreateOn: {
label: '创建时间',
type: 'input'
}
}
}
const listConfig = {
tableTitle: '客户资源清单',
url: releaseRecord.customerListUrl,
initialParams: {},
defaultColumns: {
minWidth: 120,
showOverflowTooltip: true,
align: 'center'
},
columns: {
AccountName: {
label: '客户',
type: 'input',
renderItem: (h, scope, listeners) => {
return h(
'el-button',
{
on: {
click: (e) => listeners.handleCheck(scope.row)
},
props: {
type: 'text'
}
},
scope.row.AccountName)
}
}
}
}
const applyDialogformConfig = {
title: '审批意见',
createUrl: approvalRecord.updateUrl,
labelPosition: 'left',
submitBtnText: '确定',
span: 22,
formDesc: {
ApplicationReason: {
type: 'textarea',
label: '申请原因',
required: true,
layout: 24
}
}
}
const applicationRecordConfig = {
tableTitle: '审批记录',
url: applicationRecord.searchUrl,
initialParams: {},
defaultColumns: {
minWidth: 120,
showOverflowTooltip: true,
align: 'center'
},
columns: {
AccountName: {
label: '客户',
type: 'input',
renderItem: (h, scope, listeners) => {
return h(
'el-button',
{
on: {
click: (e) => listeners.handleCheck(scope.row)
},
props: {
type: 'text'
}
},
scope.row.AccountName)
}
},
ApplicationPersonName: {
label: '申请人',
type: 'input',
showInSearch: true
},
ApplicationTime: {
label: '申请时间',
type: 'input'
},
ApplicationReason: {
label: '申请原因',
type: 'input'
},
ApprovalPersonName: {
label: '审批人',
type: 'input'
},
ApprovalTime: {
label: '审批时间',
type: 'input'
},
ApprovalComments: {
label: '审批原因',
type: 'input'
},
handle: {
label: '操作',
hideInFilter: true,
fixed: 'right',
renderItem: (h, scope, listeners) => {
return h('div', {}, [
h(
'el-button',
{
on: {
click: (e) => listeners.handleAddView(scope.row)
},
// class: 'el-icon-edit',
props: {
type: 'text'
}
},
'审批意见'),
scope.row.Ext_CustomerStatus_KUTText === '草稿' && h(
'el-button',
{
on: {
click: (e) => listeners.handlePass(scope.row)
},
// class: 'el-icon-delete',
props: {
type: 'text'
}
},
'通过')
])
}
}
}
}
export default {
tableConfig,
listConfig,
applicationRecordConfig,
applyDialogformConfig
}
<template>
<div class="app-container">
<div class="table-container">
<form-title :title="listConfig.tableTitle" />
<ele-table
v-bind="listConfig"
:expand-params="expandParams"
:listeners="tableListeners"
/>
</div>
<div class="table-container">
<ele-search
:columns="listConfig.columns"
@handleSearch="handleSearch"
@handleReset="handleReset"
@handleFilter="handleFilter"
/>
<form-title :title="applicationRecordConfig.tableTitle" />
<ele-table
ref="eleTable"
v-bind="applicationRecordConfig"
:expand-params="expandParams"
:listeners="tableListeners"
/>
</div>
<!-- 弹框部分 -->
<ele-form-dialog
:form-data="applyData"
:request-fn="handleSave"
:visible.sync="applyDialogFormVisible"
v-bind="applyDialogformConfig"
:loading="applyLoading"
/>
</div>
</template>
<script>
import constant from './constant'
import tableMixin from '@/mixins/table'
export default {
mixins: [tableMixin],
data() {
return {
expandParams: {}, // 筛选条件
tableListeners: {}, // 事件监听对象,供ele-table内部调用
listConfig: {},
applicationRecordConfig: {},
applyLoading: false,
applyData: {},
applyDialogFormVisible: false,
applyDialogformConfig: constant.applyDialogformConfig
}
},
created() {
constant.listConfig.initialParams.parentObjectID = this.$route.query.objectID
this.listConfig = constant.listConfig
constant.applicationRecordConfig.initialParams.releaseRecordID = this.$route.query.objectID
this.applicationRecordConfig = constant.applicationRecordConfig
this.tableListeners = {
handleCheck: this.handleCheck,
handlePass: this.handlePass,
handleAddView: this.handleAddView
}
},
methods: {
handleCheck(row) {
},
handlePass(row) {
this.applyData = {
AccountID: row.AccountID,
AccountName: row.AccountName,
releaseRecordID: row.ParentObjectID,
approvalStatus: '101'
}
this.applyDialogFormVisible = true
},
handleAddView(row) {
},
handleSave() {
this.applyLoading = true
const url = this.applyDialogformConfig.createUrl
const applyData = this.$translateToC4CData(this.applyData)
this.$request(url, [applyData]).then(res => {
this.applyLoading = false
this.applyDialogFormVisible = false
this.$refs.eleTable.handleSearch()
}).catch(() => {
this.applyLoading = false
})
}
}
}
</script>
<style lang="scss" scoped>
</style>
<template>
<div class="app-container">
<ele-search
:columns="tableConfig.columns"
@handleSearch="handleSearch"
@handleReset="handleReset"
@handleFilter="handleFilter"
/>
<div class="table-container">
<ele-table
ref="eleTable"
v-bind="tableConfig"
:expand-params="expandParams"
:listeners="tableListeners"
@handleSelectionChange="handleSelectionChange"
/>
</div>
</div>
</template>
<script>
import constant from './constant'
import tableMixin from '@/mixins/table'
export default {
mixins: [tableMixin],
data() {
return {
expandParams: {}, // 筛选条件
tableListeners: {}, // 事件监听对象,供ele-table内部调用
tableConfig: constant.tableConfig
}
},
created() {
this.tableListeners = {
handleCheck: this.handleCheck
}
},
methods: {
handleSelectionChange(selection) {
console.log(selection)
this.selection = selection
},
handleCheck(row) {
this.$router.push({
path: '/customers/resource/approval-detail',
query: {
objectID: row.ObjectID
}
})
}
}
}
</script>
<style lang="scss" scoped>
</style>
......@@ -3,11 +3,17 @@
<Title :title="title">
<span>*</span>为必填项
</Title>
<div class="basic-info" v-loading='loading'>
<div class="basic-info"
v-loading='loading'>
<ele-form-section v-model="formData"
:rules="rules"
:sections="sections">
<template v-slot:ExtRegisteredCapital_SDK="{ formData }">
<el-input v-if="formData.ExtProcessNode_SDK==4"
v-model="formData.ExtRegisteredCapital_SDK"
:disabled="isEdit">
</el-input>
</template>
<template v-slot:ExtLockRsp_SDK="{ formData }">
<!-- 插槽内容有el-form-item组件包裹 -->
<el-select v-if="formData.ExtProcessNode_SDK==2"
......@@ -24,6 +30,7 @@
:value="item.ExtAgentID_SDK" />
</el-select>
<el-input v-else
type="textarea"
v-model="formData.ExtLockRspName_SDK"
disabled>
</el-input>
......@@ -44,6 +51,7 @@
:value="item.Code" />
</el-select>
<el-input v-else
type="textarea"
v-model="formData.ExtLockCityName_SDK"
disabled>
</el-input>
......@@ -53,7 +61,6 @@
<el-select v-if="formData.ExtProcessNode_SDK==2"
v-model="formData.ExtChannelType_SDK"
style="width: 91%"
placeholder="请选择"
no-match-text="无匹配数据">
<el-option v-for="item in cOptions"
......@@ -72,14 +79,11 @@
<el-table :data="tableData2"
border
style="width: 100%">
<el-table-column prop="FileName"
label="附件名称">
</el-table-column>
<el-table-column prop="CreateOn_SDK"
label="上传日期">
label="创建时间">
</el-table-column>
<el-table-column prop="CreateName_SDK"
label="操作者">
<el-table-column prop="FileName"
label="文件名">
</el-table-column>
<el-table-column label="操作">
<el-link slot-scope="{ row }"
......@@ -165,7 +169,10 @@ export default {
status: 0,
loading: false,
tableData2: [],
formData: {},
formData: {
ExtLockRsp_SDK: [],
ExtLockCity_SDK: [],
},
province: [],
sections: [
{
......@@ -275,6 +282,7 @@ export default {
type: 'input',
layout: 12,
disabled: true,
break: true,
label: 'Unis业务负责人姓名'
},
ExtUnisPhone_SDK: {
......@@ -334,19 +342,25 @@ export default {
],
tableData: [],
TotalRecords: 0,
isEdit: true,
page: {},
apptions: [],
cOptions: [],
// 同 vue-ele-form
rules: {
ExtChannelType_SDK: {required: true, message: '请选择签约渠道类型',trigger: 'change' },
ExtLockRsp_SDK: { required: true, message: '请选择锁定RSP' },
ExtLockCity_SDK: { required: true, message: '请选择城市覆盖范围' },
ExtChannelType_SDK: { required: true, message: '请选择签约渠道类型', trigger: 'change' },
ExtLockRsp_SDK: { required: true, message: '请选择锁定RSP', trigger: 'change' },
ExtLockCity_SDK: { required: true, message: '请选择城市覆盖范围', trigger: 'change' },
}
}
},
watch: {
},
computed: {
visitedViews() {
return this.$store.state.tagsView.visitedViews
},
},
created() {
......@@ -367,12 +381,29 @@ export default {
})
},
getList() {
this.loading=true
this.loading = true
getCustomer({ objectID: this.id }).then((resp) => {
this.loading=false
resp.results[0].ExtChannelType_SDK=null
resp.results[0].ExtChannelType_SDKText=null
this.loading = false
this.formData = resp.results[0]
if (this.formData.ExtProcessNode_SDK == 4) {
if (!this.formData.ExtRegisteredCapital_SDK) {
this.isEdit = false
}
}
if (this.formData.ExtProcessNode_SDK == 2) {
this.formData.extChannelType_SDK = ''
if(!this.formData.ExtLockRsp_SDK){
this.formData.ExtLockRsp_SDK =[]
}else{
this.formData.ExtLockRsp_SDK = this.formData.ExtLockRsp_SDK.split(',')
}
if(!this.formData.ExtLockCity_SDK){
this.formData.ExtLockCity_SDK = []
}else{
this.formData.ExtLockCity_SDK = this.formData.ExtLockCity_SDK.split(',')
}
}
lockRsp({ extProvince_SDK: resp.results[0].ExtProvince_SDK }).then((resp) => {
this.province = resp.results
})
......@@ -382,7 +413,7 @@ export default {
})
typeSearch({ code: 'ExtChannelType_SDK', module: 'Customer', content: 'CCP' }).then((resp) => {
this.cOptions = resp
})
})
})
},
......@@ -427,8 +458,19 @@ export default {
// this.$message.success('创建成功')
},
approve() {
this.dialogFormVisible = true
this.status = 1
if (this.formData.ExtLockRsp_SDK.length == 0 || this.formData.ExtLockCity_SDK.length == 0 || this.formData.ExtChannelType_SDK.length == 0) {
return this.$message.warning('请输入必填信息')
} else if (this.formData.ExtProcessNode_SDK == 4) {
if (!this.formData.ExtRegisteredCapital_SDK) {
return this.$message.warning('请输入注册资金')
} else {
this.dialogFormVisible = true
this.status = 1
}
} else {
this.dialogFormVisible = true
this.status = 1
}
},
reject() {
this.dialogFormVisible = true
......@@ -440,9 +482,11 @@ export default {
const extLockCity_SDK = this.formData.ExtLockCity_SDK.toString()
const extLockCityName_SDK = this.formData.ExtLockCityName_SDK.toString()
const cc = {
extRegisteredCapital_SDK: this.formData.ExtRegisteredCapital_SDK,
extProcessNode_SDK: this.formData.ExtProcessNode_SDK,
extCustomerType_SDK: this.formData.ExtCustomerType_SDK,
extProvince_SDK: this.formData.ExtProvince_SDK,
extCity_SDK: this.formData.ExtCity_SDK,
objectID: this.formData.ObjectID,
extLockRsp_SDK: extLockRsp_SDK,
extLockRspName_SDK: extLockRspName_SDK,
......@@ -457,7 +501,7 @@ export default {
this.loading = false
this.$message.success("审批成功!")
this.dialogFormVisible = false
this.$router.back()
this.handleClickGoBack()
})
} else {
const bdd = { customerDTO: cc, note: this.form.note, result: "reject" }
......@@ -466,11 +510,17 @@ export default {
this.loading = false
this.$message.success("退回成功!")
this.dialogFormVisible = false
this.$router.back()
this.handleClickGoBack()
})
}
},
handleClickGoBack() {
this.$store.dispatch('tagsView/delView', this.$route)
.then((visitedViews) => {
this.$router.back(-1)
})
},
// 对象格式转化为键值对
paramsToFormData(obj) {
const formData = new FormData();
......
import { contact } from '@/api/customers'
import dictionary from '@/api/dictionary'
const tableConfig = {
url: contact.searchUrl,
defaultColumns: {
minWidth: 120,
showOverflowTooltip: true,
align: 'center'
},
columns: {
ContactID: {
label: '联系人编码',
type: 'input',
showInSearch: true
},
LastName: {
label: '联系人名称',
type: 'input',
showInSearch: true
},
AccountFormattedName: {
label: '客户名称'
},
Ext_CustomerPhone_KUT: {
label: '手机1'
},
Ext_CustomerMobile_KUT: {
label: '手机2'
},
Ext_CustomerLandline_KUT: {
label: '座机'
},
Ext_CustomerRole_KUT: {
label: '角色',
value: 'Ext_CustomerRole_KUTText'
},
JobTitle: {
label: '职位',
type: 'input',
showInSearch: true
},
Email: {
label: '电子邮箱'
},
Ext_CustomerWeChat_KUT: {
label: '微信'
},
Ext_CustomerQQ_KUT: {
label: 'QQ'
},
Ext_CustomerAddress_KUT: {
label: '详细地址'
},
Ext_CustomerCreateBy_KUT: {
label: '创建人'
},
handle: {
label: '操作',
hideInFilter: true,
fixed: 'right',
renderItem: (h, scope, listeners) => {
return h(
'el-button',
{
on: {
click: (e) => listeners.handleEdit(scope.row, scope.$index)
},
props: {
type: 'text'
}
},
'编辑')
}
}
}
}
const formConfig = {
labelPosition: 'left',
submitBtnText: '保存',
formDesc: {
LastName: {
type: 'input',
label: '联系人名称',
layout: 12
},
AccountFormattedName: {
type: 'lov',
label: '客户名称',
code: 'customer',
returnFn: function(row) {
return {
AccountID: row.AccountID,
AccountUUID: row.AccountUUID,
AccountFormattedName: row.Name
}
},
layout: 12
},
Ext_CustomerPhone_KUT: {
label: '手机1',
type: 'input',
layout: 12
},
Ext_CustomerMobile_KUT: {
label: '手机2',
type: 'input',
layout: 12
},
Ext_CustomerLandline_KUT: {
label: '座机',
type: 'input',
layout: 12
},
Ext_CustomerRole_KUT: {
type: 'select',
label: '角色',
isOptions: true,
options: dictionary.contactRole,
layout: 12
},
JobTitle: {
label: '职位',
type: 'input',
layout: 12
},
Email: {
label: '电子邮箱',
type: 'input',
layout: 12
},
Ext_CustomerWeChat_KUT: {
label: '微信',
type: 'input',
layout: 12
},
Ext_CustomerQQ_KUT: {
label: 'QQ',
type: 'input',
layout: 12
},
Ext_CustomerAddress_KUT: {
label: '详细地址',
type: 'input',
layout: 12
}
}
}
export default {
tableConfig,
formConfig
}
<template>
<div class="app-container">
<ele-search
:columns="tableConfig.columns"
@handleSearch="handleSearch"
@handleReset="handleReset"
@handleFilter="handleFilter"
/>
<div class="table-container">
<TableBtns>
<template v-slot:left>
<el-button
type="primary"
icon="el-icon-plus"
@click="handleShowDialog"
>新建</el-button>
<el-button
type="danger"
icon="el-icon-delete"
@click="handleDelete"
>
删除
</el-button>
</template>
</TableBtns>
<ele-table
ref="eleTable"
v-bind="tableConfig"
:expand-params="expandParams"
:listeners="tableListeners"
@handleSelectionChange="handleSelectionChange"
/>
</div>
<!-- 弹框部分 -->
<ele-form-dialog
:title="title"
:form-data="diglogFormData"
:request-fn="handleSave"
:visible.sync="diglogVisble"
v-bind="formConfig"
:loading="loading"
/>
</div>
</template>
<script>
import constant from './constant'
import tableMixin from '@/mixins/table'
import { contact } from '@/api/customers'
export default {
mixins: [tableMixin],
data() {
return {
expandParams: {}, // 筛选条件
tableListeners: {}, // 事件监听对象,供ele-table内部调用
tableConfig: constant.tableConfig,
selection: [],
loading: false,
diglogVisble: false,
title: '',
diglogFormData: {},
formConfig: constant.formConfig
}
},
created() {
this.tableListeners = {
handleCheck: this.handleCheck,
handleEdit: this.handleEdit
}
},
methods: {
handleCheck(row) {
this.$router.push({
path: '/customers/resource/detail',
query: {
objectID: row.ObjectID
}
})
},
handleSelectionChange(selection) {
console.log(selection)
this.selection = selection
},
handleClearSelection() {
this.selection = []
this.$refs.eleTable.clearSelection()
},
handleDelete() {
if (this.selection.length === 0) {
this.$message.warning('请先选择一个客户')
return
}
},
handleShowDialog() {
this.title = '新建联系人'
this.diglogFormData = {}
this.diglogVisble = true
},
handleEdit(row) {
this.title = '编辑联系人'
this.diglogFormData = JSON.parse(JSON.stringify(row))
this.diglogVisble = true
},
handleSave() {
this.loading = true
var data = this.$translateToC4CData(this.releaseData)
if (data.objectID) {
this.$request(contact.updateUrl, [data]).then(res => {
this.$message.success('保存成功')
this.loading = false
this.dialogVisble = false
this.handleSearch()
}).catch(() => {
this.loading = false
})
} else {
this.$request(contact.createUrl, [data]).then(res => {
this.$message.success('新建成功')
this.loading = false
this.dialogVisble = false
this.handleSearch()
}).catch(() => {
this.loading = false
})
}
}
}
}
</script>
<style lang="scss" scoped>
</style>
......@@ -5,10 +5,13 @@
</Title>
<div class="basic-info" v-loading="loading">
<ele-form-section
ref="eleForm"
v-model="formData"
:request-fn="handleSubmit"
:rules="rules"
:sections="sections"
:isShowSubmitBtn="subBtn"
:isShowBackBtn="subBtn"
@request-success="handleSuccess"
/>
</div>
......@@ -44,6 +47,7 @@ export default {
loading: false,
addBtnStart: false,
displayBtn: false,
subBtn: true,
objectId: '',
formData: {},
sections: [
......@@ -76,7 +80,7 @@ export default {
type: 'input',
label: '社会统一信用代码',
layout: 12,
disabled: this.displayBtn
disabled: true
},
ExtRegisteredCapital_SDK: {
type: 'input',
......@@ -105,6 +109,10 @@ export default {
type: 'select',
label: '省份',
layout: 12,
value: 'ExtProvinceName_SDK',
attrs: {
multiple: false
},
options: async data => {
const res = await provinceSearch({})
var result = res.results.map(item => {
......@@ -122,6 +130,10 @@ export default {
label: '地市',
layout: 12,
isOptions: true,
value: 'ExtCityName_SDK',
attrs: {
multiple: false
},
optionsLinkageFields: ['ExtProvince_SDK'],
options: async data => {
if (!data.ExtProvince_SDK) {
......@@ -145,6 +157,10 @@ export default {
label: '县市',
layout: 12,
isOptions: true,
attrs: {
multiple: false
},
value: 'ExtDistrictName_SDK',
optionsLinkageFields: ['ExtProvince_SDK', 'ExtCity_SDK'],
options: async data => {
if (!data.ExtCity_SDK) {
......@@ -185,12 +201,30 @@ export default {
label: '公司负责人联系方式',
layout: 12,
disabled:false,
rules: [
{
pattern: "^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$",
min: 11,
max: 11,
type: "string",
trigger: "blur",
message: "手机号格式错误"
}
]
},
ExtLeaderEmail_SDK: {
type: 'input',
label: '公司负责人邮箱',
layout: 12,
disabled:false,
rules: [
{
pattern: "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$",
type: "string",
trigger: "blur",
message: "邮箱格式错误"
}
]
},
ExtUnis_SDK: {
type: 'input',
......@@ -204,12 +238,29 @@ export default {
layout: 12,
label: 'Unis业务负责人联系方式',
disabled:false,
},
rules: [
{
pattern: "^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$",
min: 11,
max: 11,
type: "string",
trigger: "blur",
message: "手机号格式错误"
}
] },
ExtUnisEmail_SDK: {
type: 'input',
label: 'Unis业务负责人邮箱',
layout: 12,
disabled:false,
rules: [
{
pattern: "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$",
type: "string",
trigger: "blur",
message: "邮箱格式错误"
}
]
},
ExtBusiness_SDK: {
type: 'input',
......@@ -223,12 +274,30 @@ export default {
layout: 12,
label: '商务负责人联系方式',
disabled:false,
rules: [
{
pattern: "^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$",
min: 11,
max: 11,
type: "string",
trigger: "blur",
message: "手机号格式错误"
}
]
},
ExtBusinessEmail_SDK: {
type: 'input',
label: '商务负责人邮箱',
layout: 12,
disabled:false,
rules: [
{
pattern: "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$",
type: "string",
trigger: "blur",
message: "邮箱格式错误"
}
]
},
}
}
......@@ -237,11 +306,11 @@ export default {
rules: {
Name: {required: true, message: '公司名称必填'},
ExtSocialUnifiedCreditCode_SDK: { required: true, message: '社会统一信用代码必填' },
ExtRegisteredCapital_SDK: {required: true, message: '注册资本必填' },
// ExtRegisteredCapital_SDK: {required: true, message: '注册资本必填' },
ExtCorporateName_SDK: { required: true, message: '法人必填' },
ExtProvince_SDK: { required: true, message: '省份必填' },
ExtDistrict_SDK: {required: true, message: '城市必填' },
ExtCity_SDK: { required: true, message: '县区必填' },
ExtCity_SDK: {required: true, message: '地市必填' },
ExtDistrict_SDK: { required: true, message: '县区必填' },
ExtLeader_SDK: { required: true, message: '公司负责人姓名' },
ExtLeaderPhone_SDK: { required: true, message: '公司负责人联系方式' },
ExtLeaderEmail_SDK: { required: true, message: '公司负责人邮箱' },
......@@ -264,8 +333,10 @@ export default {
},
methods: {
handleSubmit (data) {
console.log(this.$refs.eleForm)
const formData = this.$translateToC4CData(data)
formData.extCustomerType_SDK = '121'
console.log(formData)
this.loading = true
customerCreate(this.paramsToFormData(formData)).then(res => {
this.addBtnStart = true
......@@ -278,6 +349,7 @@ export default {
})
this.$message.success('创建成功')
this.loading = false
this.subBtn = false
})
},
handleSuccess () {
......
......@@ -17,13 +17,13 @@
type="primary"
:loading="btnLoading"
@click="authentication"
:disabled="showAuthentication"
:disabled="btnShow"
>
认 证
</el-button>
</div>
<div>
<PersonalInFo :addBtnStart='addBtnStart' :dedeleBtnStart="dedeleBtnStart" :type-code="typeCode" :isShowBtn='isShowBtn' :isShowEditBtn="isShowEditBtn"/>
<PersonalInFo :addBtnStart='addBtnStart' :dedeleBtnStart="dedeleBtnStart" :type-code="typeCode" :isShowBtn='isShowBtn' :isShowEditBtn="isShowEditBtn" @showAuthentication="showStart" :searchUrl="searchUrl"/>
</div>
<!-- <PersonalInFo :addBtnStart='addBtnStart' :dedeleBtnStart="dedeleBtnStart" :type-code="typeCode" :isShowEditBtn='btn'/> -->
</div>
......@@ -35,6 +35,7 @@ import { customerCreate, provinceSearch, citySearch, districtSearch, customerGet
import { qccGetOne } from '@/api/qcc'
import PersonalInFo from '../personal-customers/conponents/personal-info'
import { uploadCode } from '@/api/upload'
import EleTable from '@/components/EleTable/EleTable.vue';
export default {
components: {
......@@ -51,9 +52,10 @@ export default {
data () {
return {
loading: false,
searchUrl: '',
btnLoading: false,
typeCode: uploadCode.customer,
title: '城市代理商详情',
title: 'CCP信息详情',
addBtnStart: true,
dedeleBtnStart: true,
isShowBtn:true,
......@@ -63,7 +65,7 @@ export default {
formData: {},
isShowSubmitBtn: false,
isShowBackBtn: false,
showAuthentication: false,
btnShow: true,
sections: [
{
title: '基本信息',
......@@ -229,25 +231,25 @@ export default {
layout: 12,
disabled: true
},
ExtBusiness_SDK: {
type: 'input',
layout: 12,
label: '商务负责人姓名',
disabled: true,
break: true,
},
ExtBusinessPhone_SDK: {
type: 'input',
layout: 12,
label: '商务负责人联系方式',
disabled: true
},
ExtBusinessEmail_SDK: {
type: 'input',
label: '商务负责人邮箱',
layout: 12,
disabled: true
},
// ExtBusiness_SDK: {
// type: 'input',
// layout: 12,
// label: '商务负责人姓名',
// disabled: true,
// break: true,
// },
// ExtBusinessPhone_SDK: {
// type: 'input',
// layout: 12,
// label: '商务负责人联系方式',
// disabled: true
// },
// ExtBusinessEmail_SDK: {
// type: 'input',
// label: '商务负责人邮箱',
// layout: 12,
// disabled: true
// },
}
},
{
......@@ -257,61 +259,45 @@ export default {
type: 'input',
label: '签约渠道类型',
layout: 12,
disabled: true
disabled: true,
},
ExtLockRsp_SDK: {
ExtLockRspName_SDK: {
type: 'input',
label: '签约渠道类型',
label: '锁定RSP',
layout: 12,
disabled: true
disabled: true,
attrs: {
type: "textarea"
}
},
ExtLockCity_SDK: {
ExtLockCityName_SDK: {
type: 'input',
label: '城市范围覆盖',
label: '城市覆盖范围',
layout: 12,
disabled: true
},
disabled: true,
attrs: {
type: "textarea"
}
}
}
},
{
title: "合作日期",
formDesc: {
ExtStartDate_SDK: {
type: 'input',
label: '初始合作开始时间',
layout: 12,
disabled: true
},
ExtAuthenticationDate_SDK: {
type: 'input',
label: '高级认证日期',
layout: 12,
disabled: true
},
ExtEndDate_SDK: {
type: 'input',
label: '合作终止日期',
layout: 12,
disabled: true
},
}
}
],
rules: {}
}
},
// watch: {
// 'formData.ExtSocialUnifiedCreditCode_SDK': {
// handler(newValue) {
// console.log("单个属性监听", newValue)
// qccGetOne({searchKey: newValue}).then(res =>{
// this.sections[0].formDesc.ExtRegisteredCapital_SDK.default = res.results.Result.RegistCapi
// console.log(this.sections[0].formDesc.ExtRegisteredCapital_SDK.default)
// })
// }
// }
// },
watch: {
// 'formData.ExtSocialUnifiedCreditCode_SDK': {
// handler(newValue) {
// console.log("单个属性监听", newValue)
// qccGetOne({searchKey: newValue}).then(res =>{
// this.sections[0].formDesc.ExtRegisteredCapital_SDK.default = res.results.Result.RegistCapi
// console.log(this.sections[0].formDesc.ExtRegisteredCapital_SDK.default)
// })
// }
// }
},
created() {
console.log(this.$refs.eleTable)
this.getOneData()
},
methods: {
......@@ -331,14 +317,54 @@ export default {
});
return formData;
},
showStart(val) {
this.btnShow = val
// console.log('1.', val)
},
getOneData() {
this.loading = true
this.searchUrl = '/file/search'
const dataId = this.$route.query.objectID
customerGetOne({ objectID: dataId }).then(res => {
this.loading = false
this.formData = res.results[0]
if(res.results[0].ExtCustomerType_SDK === '111') {
this.btnStart = false
if(res.results[0].ExtProcessStatus_SDK === '131') {
const time = {
title: "合作日期",
formDesc: {
ExtStartDate_SDK: {
type: 'date',
label: '合作开始日期',
layout: 12,
disabled: true,
attrs: {
valueFormat: "yyyy-MM-dd"
}
},
ExtAuthenticationDate_SDK: {
type: 'date',
label: '高级认证日期',
layout: 12,
disabled: true,
attrs: {
valueFormat: "yyyy-MM-dd"
}
},
ExtEndDate_SDK: {
type: 'date',
label: '合作终止日期',
layout: 12,
disabled: true,
attrs: {
valueFormat: "yyyy-MM-dd"
}
},
}
}
this.sections.push(time)
}
}
}).catch(() => {
this.loading = false
......
......@@ -12,7 +12,8 @@
@request-success="handleSuccess"
/>
</div>
<PersonalInFo :addBtnStart='addBtnStart' :dedeleBtnStart="dedeleBtnStart" :type-code="typeCode"/>
<CustomerAddress :objectID='objectID' v-if="showAdress"/>
<PersonalInFo :addBtnStart='addBtnStart' :dedeleBtnStart="dedeleBtnStart" :type-code="typeCode" :searchUrl="searchUrl"/>
</div>
</template>
......@@ -22,11 +23,13 @@ import { customerCreate, provinceSearch, citySearch, districtSearch, customerGet
import { qccGetOne } from '@/api/qcc'
import PersonalInFo from '../personal-customers/conponents/personal-info'
import { uploadCode } from '@/api/upload'
import CustomerAddress from '../personal-customers/conponents/customersAdd-adress'
export default {
components: {
Title,
PersonalInFo,
CustomerAddress,
customerCreate,
provinceSearch,
citySearch,
......@@ -36,12 +39,14 @@ export default {
},
data () {
return {
searchUrl: '',
loading: false,
typeCode: uploadCode.customer,
title: '总代理商详情',
title: '总代详情',
addBtnStart: true,
dedeleBtnStart: true,
objectID: '',
showAdress: true,
btnStart: true,
formData: {},
isShowSubmitBtn: false,
......@@ -232,52 +237,6 @@ export default {
},
}
},
{
title: "签约信息",
formDesc: {
ExtChannelType_SDKText: {
type: 'input',
label: '签约渠道类型',
layout: 12,
disabled: true
},
ExtLockRsp_SDK: {
type: 'input',
label: '签约渠道类型',
layout: 12,
disabled: true
},
ExtLockCity_SDK: {
type: 'input',
label: '城市范围覆盖',
layout: 12,
disabled: true
},
}
},
{
title: "合作日期",
formDesc: {
ExtStartDate_SDK: {
type: 'input',
label: '初始合作开始时间',
layout: 12,
disabled: true
},
ExtAuthenticationDate_SDK: {
type: 'input',
label: '高级认证日期',
layout: 12,
disabled: true
},
ExtEndDate_SDK: {
type: 'input',
label: '合作终止日期',
layout: 12,
disabled: true
},
}
}
],
rules: {}
}
......@@ -315,6 +274,8 @@ export default {
},
getOneData() {
this.loading = true
this.searchUrl = '/file/search'
this.objectID = this.$route.query.objectID
const dataId = this.$route.query.objectID
customerGetOne({ objectID: dataId }).then(res => {
this.formData = res.results[0]
......
......@@ -12,7 +12,7 @@
@request-success="handleSuccess"
/>
</div>
<PersonalInFo :addBtnStart='addBtnStart' :dedeleBtnStart="dedeleBtnStart" :type-code="typeCode"/>
<PersonalInFo :addBtnStart='addBtnStart' :dedeleBtnStart="dedeleBtnStart" :type-code="typeCode" :searchUrl="searchUrl"/>
</div>
</template>
......@@ -36,11 +36,12 @@ export default {
},
data () {
return {
searchUrl: '',
loading: false,
typeCode: uploadCode.customer,
title: '省代理商详情',
addBtnStart: true,
dedeleBtnStart: true,
title: 'RSP信息详情',
addBtnStart: false,
dedeleBtnStart: false,
objectID: '',
btnStart: true,
formData: {},
......@@ -242,43 +243,29 @@ export default {
disabled: true,
// value: 'ExtChannelType_SDKText'
},
ExtLockRsp_SDK: {
ExtProductGroup_SDK: {
type: 'input',
label: '签约渠道类型',
layout: 12,
disabled: true
},
ExtLockCity_SDK: {
type: 'input',
label: '城市范围覆盖',
layout: 12,
disabled: true
},
}
},
{
title: "合作日期",
formDesc: {
ExtStartDate_SDK: {
type: 'input',
label: '初始合作开始时间',
label: '签约产品组',
layout: 12,
disabled: true
},
ExtAuthenticationDate_SDK: {
ExtTotalAgent_SDK: {
type: 'input',
label: '高级认证日期',
label: '签约总代',
layout: 12,
disabled: true
},
ExtEndDate_SDK: {
ExtLockCityName_SDK: {
type: 'input',
label: '合作终止日期',
label: '城市覆盖范围',
layout: 12,
disabled: true
},
disabled: true,
attrs: {
type: "textarea"
}
}
}
}
},
],
rules: {}
}
......@@ -316,6 +303,7 @@ export default {
},
getOneData() {
this.loading = true
this.searchUrl = '/file/search'
const dataId = this.$route.query.objectID
customerGetOne({ objectID: dataId }).then(res => {
this.loading = false
......@@ -323,6 +311,32 @@ export default {
if(res.results[0].ExtCustomerType_SDK === '111') {
this.btnStart = false
}
if(res.results[0].ExtProcessStatus_SDK === '131') {
const time = {
title: "合作日期",
formDesc: {
ExtStartDate_SDK: {
type: 'date',
label: '合作开始日期',
layout: 12,
disabled: true,
attrs: {
valueFormat: "yyyy-MM-dd"
}
},
ExtEndDate_SDK: {
type: 'date',
label: '合作终止日期',
layout: 12,
disabled: true,
attrs: {
valueFormat: "yyyy-MM-dd"
}
},
}
}
this.sections.push(time)
}
}).catch(() => {
this.loading = false
this.$$message.error("数据获取失败")
......
import { address } from '@/api/customers'
import dictionary from '@/api/dictionary'
const tableConfig = {
tableTitle: '地址信息',
url: address.searchUrl,
isSearch: true,
defaultColumns: {
minWidth: 120,
showOverflowTooltip: true,
align: 'center'
},
columns: {
Ext_CustomerAddressType_KUT: {
label: '地址类型'
},
CountryCode: {
label: '国别',
value: 'CountryCodeText'
},
StateCode: {
label: '省份',
value: 'StateCodeText'
},
City: {
label: '城市'
},
Street: {
label: '区/县'
},
Ext_CustomerAddressDetailedAddress_KUT: {
label: '详细地址'
},
StreetPostalCode: {
label: '邮编'
},
MainIndicator: {
label: '是否默认'
},
Ext_CustomerAddressNote_KUT: {
label: '备注'
},
handle: {
label: '操作',
hideInFilter: true,
fixed: 'right',
renderItem: (h, scope, listeners) => {
return h(
'el-button',
{
on: {
click: (e) => listeners.handleEdit(scope.row, scope.$index)
},
props: {
type: 'text'
}
},
'编辑')
}
}
}
}
const formConfig = {
labelPosition: 'left',
submitBtnText: '保存',
formDesc: {
Ext_CustomerAddressType_KUT: {
type: 'select',
label: '地址类型',
isOptions: true,
options: dictionary.customerAddressType,
layout: 12
},
CountryCode: {
type: 'select',
label: '国别',
isOptions: true,
options: dictionary.countryCode,
layout: 12
},
StateCode: {
label: '省份',
type: 'select',
value: 'Ext_CustomerStatus_KUTText',
layout: 12
},
City: {
label: '城市',
type: 'input',
layout: 12
},
Street: {
label: '区/县',
type: 'input',
layout: 12
},
Ext_CustomerAddressDetailedAddress_KUT: {
label: '详细地址',
type: 'input',
layout: 12
},
StreetPostalCode: {
label: '邮编',
type: 'input',
layout: 12
},
MainIndicator: {
label: '是否默认',
type: 'radio',
layout: 12,
isOptions: true,
options: [
{
text: '是',
value: true
},
{
text: '否',
value: false
}
],
default: false
},
Ext_CustomerAddressNote_KUT: {
label: '备注',
type: 'textarea',
attrs: {
// autosizeType: 'switch',
autosize: false,
rows: 2,
maxlength: 300
},
layout: 24
}
}
}
export default {
tableConfig,
formConfig,
...address
}
<template>
<div>
<Title :title="title" />
<AddressTable :form-data="$attrs['form-data']" />
<div class="submit-btn">
<el-button
type="primary"
icon="el-icon-back"
@click="handlePrev"
>
上一步,完善项目信息
</el-button>
<el-button
type="primary"
icon="el-icon-right"
@click="handleNext"
>下一步,完善联系人信息</el-button>
</div>
</div>
</template>
<script>
import Title from '@/components/Title'
import AddressTable from './table.vue'
import constant from './constant'
const tableTitle = constant.tableConfig.tableTitle
export default {
components: {
Title,
AddressTable
},
data() {
return {
title: '创建企业客户-' + tableTitle
}
},
methods: {
handlePrev() {
this.$emit('changeComponent', 'projectInfo')
},
handleNext() {
this.$emit('changeComponent', 'contactsInfo')
}
}
}
</script>
<style lang="scss" scoped>
</style>
<template>
<BusinessTable v-bind="constant" />
</template>
<script>
import constant from './constant'
export default {
data() {
return {
constant: {}
}
},
created() {
// 设置表单的初始搜索条件,该条件一般不会发生改变
// 如果没有AccountID即代表是新增阶段,可以不设置url,让其为一个空数组
if (this.$attrs['form-data'] && this.$attrs['form-data'].AccountID) {
constant.tableConfig.initialParams = {
AccountID: this.$attrs['form-data'].AccountID
}
} else {
constant.tableConfig.url = ''
}
this.constant = constant
}
}
</script>
<style>
</style>
import dictionary from '@/api/dictionary'
import { customer } from '@/api/customers'
const formConfig = {
tableTitle: '基本信息',
updateUrl: customer.updateUrl,
labelPosition: 'left',
isShowBackBtn: false,
isShowSubmitBtn: false,
rules: {
Name: {
trigger: 'blur',
validator: function(rule, value, callback) {
if (this.formData.Ext_CustomerIsRepeatability_KUT === true && this.formData.isRepeat) {
return callback(new Error('客户名称重复'))
} else {
return callback()
}
}
}
},
formDesc: {
Name: {
type: 'input',
label: '客户名称',
layout: 12,
required: true
},
Ext_CustomerSocialUnifiedCreditCode_KUT: {
type: 'input',
label: '社会统一信用代码',
layout: 12
},
Ext_CustomerIsRepeatability_KUT: {
type: 'radio',
label: '进行重复性校验',
isOptions: true,
options: dictionary.TF,
layout: 12
},
key_btn: {
type: 'button',
default: '重复性校验',
layout: 12,
attrs: {
type: 'primary'
}
},
Ext_CustomerEnglishName_KUT: {
type: 'input',
label: '英文名称',
layout: 12
},
CountryCode: {
type: 'select',
label: '客户国别',
isOptions: true,
options: dictionary.countryCode,
attrs: {
filterable: true
},
layout: 12
},
Ext_CustomerForm_KUT: {
type: 'select',
label: '客户来源',
isOptions: true,
options: dictionary.customerForm,
layout: 12
},
Ext_CustomerContinent_KUT: {
type: 'select',
label: '所在大洲',
isOptions: true,
options: dictionary.customerContinent,
layout: 12
},
Ext_CustomerType_KUT: {
type: 'select',
label: '客户类型',
disabled: true,
isOptions: true,
default: '131',
options: dictionary.customerType,
layout: 12
},
ParentAccountID: {
type: 'lov',
code: 'customer',
returnFn: function(row) {
return {
ParentAccountID: row.ObjectID,
ParentAccountText: row.Name
}
},
initialParams: {
roleCode: 'BUP002'
},
label: '上级客户',
layout: 12
},
Ext_CustomerResearchSubjects_KUT: {
type: 'radio',
label: '研发主体',
isOptions: true,
options: [
{
text: '是',
value: true
},
{
text: '否',
value: false
}
],
layout: 12
},
Ext_CustomerFilingInstructions_KUT: {
type: 'textarea',
label: '报备说明',
attrs: {
autosizeType: 'switch',
autosize: false,
rows: 3
}
},
Ext_CustomerNote_KUT: {
type: 'textarea',
label: '备注信息',
attrs: {
autosizeType: 'switch',
autosize: false,
rows: 3
}
}
}
}
export default {
formConfig
}
<template>
<div>
<Title :title="title">
<span>*</span>为必填项
</Title>
<div class="form-container">
<form-title :title="formTitle" />
<ele-form
ref="form"
v-model="formData"
v-bind="formConfig"
>
<template v-slot:key_btn>
<el-button
type="primary"
@click="handleCheckRepeat"
>进行重复性校验</el-button>
</template>
</ele-form>
<div class="submit-btn">
<el-button
type="primary"
icon="el-icon-right"
:loading="loading"
@click="handleSubmit"
>保存,下一步,完善行业信息</el-button>
</div>
</div>
</div>
</template>
<script>
import Title from '@/components/Title'
import constant from './constant.js'
import { addPotentialCustomer } from '@/api/customers'
import { updatePotentialCustomer } from '@/api/customers'
export default {
name: 'EnterpriseCustomersBaseInfo',
components: {
Title
},
props: {
formData: {
type: Object,
default: () => { }
}
},
data() {
return {
title: '创建企业客户-基础信息',
formTitle: '基础信息',
loading: false,
formConfig: constant.formConfig
}
},
watch: {
formData(val) {
this.originData = JSON.stringify(val)
}
},
methods: {
async handleSubmit() {
await this.$refs.form.validate()
this.loading = true
if (this.$route.query.objectID) {
if (JSON.stringify(this.formData) !== this.originData) {
this.handleEdit()
} else {
this.loading = false
this.handleNext()
}
} else {
this.handleAdd()
}
},
handleAdd() {
const formData = this.$translateToC4CData(this.formData)
// 潜在客户roleCode默认是'BUP002'
formData.roleCode = 'BUP002'
// 新建潜在客户的状态为草稿状态101
formData.ext_CustomerStatus_KUT = '101'
delete formData.key_btn
// 新建接口是基于批量新增设计的,所以要用数组包裹formData传值
addPotentialCustomer([formData]).then(res => {
console.log(res)
this.loading = false
const objectID = res.results[0]
this.$router.push({
path: '/customers/enterprise',
query: { objectID }
})
this.handleNext()
})
},
handleEdit() {
const formData = this.$translateToC4CData(this.formData)
updatePotentialCustomer(formData).then(res => {
this.loading = false
this.handleNext()
})
},
handleCheckRepeat() {
this.formData.isRepeat = true
this.$refs.form.$refs.form.validateField('Name')
},
handleNext() {
this.originData = JSON.stringify(this.formData)
this.$emit('changeComponent', 'industryInfo')
}
}
}
</script>
<style>
</style>
<template>
<DescriptionTable
:table-config="formConfig"
:table-data="formData"
/>
</template>
<script>
import constant from './constant'
export default {
name: 'BaseInfo',
props: {
formData: {
type: Object,
default: () => { }
}
},
data() {
return {
formConfig: constant.formConfig
}
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div>
<Title :title="title" />
<ContactTable :form-data="$attrs['form-data']" />
<div class="submit-btn">
<el-button
type="primary"
icon="el-icon-back"
@click="handlePrev"
>
上一步,完善地址信息
</el-button>
<el-button
type="primary"
icon="el-icon-right"
@click="handleNext"
>下一步,完善附件信息</el-button>
</div>
</div>
</template>
<script>
import Title from '@/components/Title'
import ContactTable from './table.vue'
import constant from './constant'
const tableTitle = constant.tableConfig.tableTitle
export default {
components: {
Title,
ContactTable
},
data() {
return {
title: '创建企业客户-' + tableTitle
}
},
methods: {
handlePrev() {
this.$emit('changeComponent', 'addressInfo')
},
handleNext() {
this.$emit('changeComponent', 'fileInfo')
}
}
}
</script>
<style lang="scss" scoped>
</style>
<template>
<div>
<base-info :form-data="$attrs.formData" />
</div>
</template>
<script>
import BaseInfo from '../base-info/table'
export default {
components: {
BaseInfo
}
}
</script>
<style>
</style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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