Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
portalhtml
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rex
portalhtml
Commits
f0bab561
Commit
f0bab561
authored
Oct 13, 2021
by
jiangqihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增总代理商
parent
f4c0ab2b
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
181 additions
and
243 deletions
+181
-243
customers.js
src/api/customers.js
+38
-10
dictionary.js
src/api/dictionary.js
+1
-0
lov-data.js
src/api/lov-data.js
+10
-0
fetch-dictionary.js
src/utils/fetch-dictionary.js
+1
-1
index.vue
...customers-add/components/customersAdd-accessory/index.vue
+18
-10
index.vue
...rs/customers-add/components/customersAdd-adress/index.vue
+20
-7
index.vue
src/views/customers/customers-add/index.vue
+85
-26
constant.js
src/views/customers/customers-overview/constant.js
+2
-1
index.vue
src/views/customers/potential-customers/index.vue
+5
-187
index.vue
src/views/public/file-info/index.vue
+1
-1
No files found.
src/api/customers.js
View file @
f0bab561
...
...
@@ -25,7 +25,36 @@ export function customerCreate(data) {
data
})
}
// // 客户发布记录
// 查询省
export
function
provinceSearch
(
data
)
{
return
request
({
url
:
'/province/searchAll'
,
method
:
'post'
,
data
})
}
// 查询市
export
function
citySearch
(
data
){
return
request
({
url
:
'/city/searchAll'
,
method
:
'post'
,
data
})
}
// 查询市
export
function
districtSearch
(
data
){
return
request
({
url
:
'/district/searchAll'
,
method
:
'post'
,
data
})
}
// 客户发布记录
// export const releaseRecord = {
// createUrl: '/releaserecord/create',
// searchUrl: '/releaserecord/search',
...
...
@@ -219,15 +248,14 @@ export const project = {
// updateUrl: '/paymentTerm/updateDetail'
// }
// // 客户附件
// export const file = {
// createUrl: '/file/create',
// searchUrl: '/file/search',
// detailUrl: '/file/getOne',
// updateUrl: '/file/update',
// deleteUrl: '/file/delete',
// deleteDetailUrl: '/file/deleteDetail'
// }
// 客户附件
export
const
file
=
{
createUrl
:
'/create'
,
searchUrl
:
'/search'
,
detailUrl
:
'/getOne'
,
updateUrl
:
'/update'
,
deleteUrl
:
'/delete'
,
}
// export const businessLog = {
// searchUrl: '/businessLog/search'
...
...
src/api/dictionary.js
View file @
f0bab561
...
...
@@ -424,6 +424,7 @@ export default {
'module'
:
'OpportunityPhaseTask'
},
flowDefinitions
:
'flow/definition/getAllEnum'
,
flowNodesByDefinition
:
'flow/node/getAllEnumByDefinitionId?definitionId=1424712643570155522'
,
...
...
src/api/lov-data.js
View file @
f0bab561
...
...
@@ -182,6 +182,16 @@ export default {
label
:
'公司名称'
,
type
:
'input'
,
layout
:
12
},
OperName
:
{
label
:
'法人'
,
type
:
'input'
,
layout
:
12
},
CreditCode
:
{
label
:
'社会统一信用代码'
,
type
:
'input'
,
layout
:
12
}
}
}
...
...
src/utils/fetch-dictionary.js
View file @
f0bab561
...
...
@@ -11,7 +11,7 @@ function fetchDictionary(data) {
return
enums
[
code
]
}
return
request
({
url
:
'/
enum/query
All'
,
url
:
'/
commonSession/search
All'
,
method
:
'post'
,
data
}).
then
((
res
)
=>
{
...
...
src/views/customers/customers-add/components/customersAdd-accessory/index.vue
View file @
f0bab561
<
template
>
<div
v-if=
"addBtnStart"
>
<
BusinessTable
v-bind=
"constant"
/>
<
FileTable
:type-code=
"typeCode"
:objectID=
'objectId'
/>
</div>
</
template
>
<
script
>
import
constant
from
'./constant'
import
{
uploadCode
}
from
'@/api/upload'
import
FileTable
from
'@/views/public/file-info'
export
default
{
components
:
{
FileTable
},
props
:
{
addBtnStart
:
{
type
:
Boolean
,
default
:
false
},
objectId
:
{
type
:
String
,
default
:
''
}
},
data
()
{
return
{
constant
:
{}
}
},
created
()
{
// 设置表单的初始搜索条件,该条件一般不会发生改变
constant
.
tableConfig
.
initialParams
=
{
AccountID
:
this
.
$route
.
query
.
objectID
typeCode
:
uploadCode
.
customer
}
this
.
constant
=
constant
},
watch
:
{
addBtnStart
:
{
...
...
@@ -33,6 +34,13 @@ export default {
},
immediate
:
true
,
deep
:
true
},
objectId
:
{
handler
(
newVal
)
{
console
.
log
(
newVal
)
},
immediate
:
true
,
deep
:
true
}
}
}
...
...
src/views/customers/customers-add/components/customersAdd-adress/index.vue
View file @
f0bab561
...
...
@@ -12,6 +12,10 @@ export default {
addBtnStart
:
{
type
:
Boolean
,
default
:
false
},
objectId
:
{
type
:
String
,
default
:
''
}
},
data
()
{
...
...
@@ -19,13 +23,6 @@ export default {
constant
:
{}
}
},
created
()
{
// 设置表单的初始搜索条件,该条件一般不会发生改变
constant
.
tableConfig
.
initialParams
=
{
AccountID
:
this
.
$route
.
query
.
objectID
}
this
.
constant
=
constant
},
watch
:
{
addBtnStart
:
{
handler
(
newVal
)
{
...
...
@@ -33,7 +30,23 @@ export default {
},
immediate
:
true
,
deep
:
true
},
objectId
:
{
handler
(
newVal
)
{
constant
.
tableConfig
.
initialParams
=
{
BusinessObjectID
:
newVal
}
},
immediate
:
true
,
deep
:
true
}
},
created
()
{
// 设置表单的初始搜索条件,该条件一般不会发生改变
constant
.
tableConfig
.
initialParams
=
{
BusinessObjectID
:
this
.
objectId
}
this
.
constant
=
constant
}
}
</
script
>
...
...
src/views/customers/customers-add/index.vue
View file @
f0bab561
...
...
@@ -12,8 +12,8 @@
@
request-success=
"handleSuccess"
/>
</div>
<customerAddAddress
:addBtnStart=
'addBtnStart'
/>
<customerAddAccessory
:addBtnStart=
'addBtnStart'
/>
<customerAddAddress
:addBtnStart=
'addBtnStart'
:objectId=
'objectId'
/>
<customerAddAccessory
:addBtnStart=
'addBtnStart'
:objectId=
'objectId'
/>
<!--
<div
class=
"btn"
>
<el-button
type=
"primary"
>
提交保存
</el-button>
</div>
-->
...
...
@@ -22,22 +22,29 @@
<
script
>
import
Title
from
'@/components/Title'
import
{
customerCreate
}
from
'@/api/customers'
;
import
{
customerCreate
,
provinceSearch
,
citySearch
,
districtSearch
}
from
'@/api/customers'
;
import
customerAddAddress
from
'./components/customersAdd-adress/index'
import
customerAddAccessory
from
'./components/customersAdd-accessory/index'
// import dictionary from '@/api/dictionary'
export
default
{
components
:
{
Title
,
customerCreate
,
customerAddAddress
,
customerAddAccessory
customerAddAccessory
,
provinceSearch
,
citySearch
,
districtSearch
},
data
()
{
data
()
{
return
{
title
:
'代理商新增'
,
addBtnStart
:
false
,
addBtnStart
:
true
,
objectId
:
''
,
formData
:
{},
province
:
[],
sections
:
[
{
title
:
'基本信息'
,
...
...
@@ -49,7 +56,9 @@ export default {
code
:
'qcc'
,
returnFn
:
function
(
row
)
{
return
{
Name
:
row
.
Name
Name
:
row
.
Name
,
ExtSocialUnifiedCreditCode_SDK
:
row
.
CreditCode
,
ExtCorporateName_SDK
:
row
.
OperName
}
},
},
...
...
@@ -83,21 +92,65 @@ export default {
{
title
:
'地址信息'
,
formDesc
:
{
// Name: {
// type: 'select',
// label: '省份',
// layout: 12
// },
// ExtSecondName_SDK: {
// type: 'select',
// label: '城市',
// layout: 12,
// },
// ExtSocialUnifiedCreditCode_SDK: {
// type: 'select',
// label: '县市',
// layout: 12
// },
ExtProvinceCode_SDK
:
{
type
:
'select'
,
label
:
'省份'
,
layout
:
12
,
options
:
async
data
=>
{
const
res
=
await
provinceSearch
({})
var
result
=
res
.
results
.
map
(
item
=>
{
return
{
text
:
item
.
Name
,
value
:
item
.
Code
}
})
return
result
},
},
ExtCityCode_SDK
:
{
type
:
'select'
,
label
:
'城市'
,
layout
:
12
,
isOptions
:
true
,
optionsLinkageFields
:
[
'ExtProvinceCode_SDK'
],
options
:
async
data
=>
{
if
(
!
data
.
ExtProvinceCode_SDK
)
{
return
[]
}
const
res
=
await
citySearch
({
provinceCode
:
data
.
ExtProvinceCode_SDK
})
var
result
=
res
.
results
.
map
(
item
=>
{
return
{
text
:
item
.
Name
,
value
:
item
.
Code
}
})
return
result
},
},
ExtDistrictCode_SDK
:
{
type
:
'select'
,
label
:
'县市'
,
layout
:
12
,
isOptions
:
true
,
optionsLinkageFields
:
[
'ExtProvinceCode_SDK'
,
'ExtCityCode_SDK'
],
options
:
async
data
=>
{
if
(
!
data
.
ExtCityCode_SDK
)
{
return
[]
}
const
res
=
await
districtSearch
({
cityCode
:
data
.
ExtCityCode_SDK
})
var
result
=
res
.
results
.
map
(
item
=>
{
return
{
text
:
item
.
Name
,
value
:
item
.
Code
}
})
return
result
},
},
ExtAddressDetail_SDK
:
{
type
:
'input'
,
label
:
'详细经营地址'
,
...
...
@@ -158,17 +211,23 @@ export default {
],
// 同 vue-ele-form
rules
:
{
ExtSocialUnifiedCreditCode_SDK
:
{
required
:
true
,
message
:
'名称必填'
}
Name
:
{
required
:
true
,
message
:
'名称必填'
},
ExtSocialUnifiedCreditCode_SDK
:
{
required
:
true
,
message
:
'名称必填'
},
ExtSocialUnifiedCreditCode_SDK
:
{
required
:
true
,
message
:
'名称必填'
},
ExtRegisteredCapital_SDK
:
{
required
:
true
,
message
:
'名称必填'
},
ExtCorporateName_SDK
:
{
required
:
true
,
message
:
'名称必填'
},
}
}
},
methods
:
{
handleSubmit
(
data
)
{
console
.
log
(
data
)
this
.
addBtnStart
=
true
//
this.addBtnStart = true
customerCreate
(
this
.
paramsToFormData
(
data
)).
then
(
res
=>
{
console
.
log
(
res
)
this
.
addBtnStart
=
true
// console.log(res)
this
.
addBtnStart
=
true
this
.
objectId
=
res
.
results
this
.
$message
.
success
(
'创建成功'
)
})
// return Promise.resolve()
...
...
src/views/customers/customers-overview/constant.js
View file @
f0bab561
...
...
@@ -31,7 +31,8 @@ const tableConfig = {
},
Name
:
{
label
:
'公司名称'
,
type
:
'input'
type
:
'input'
,
showInSearch
:
true
,
},
ExtCorporateName_SDK
:
{
label
:
'法定人代表'
,
...
...
src/views/customers/potential-customers/index.vue
View file @
f0bab561
<
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-dropdown
style=
"margin-right: 10px;"
@
command=
"handleAdd"
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
>
添加
</el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
:command=
"1"
>
创建个人客户
</el-dropdown-item>
<el-dropdown-item
:command=
"2"
>
创建企业客户
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button
plain
icon=
"el-icon-refresh"
@
click=
"handleShowDialog(config.followTask)"
>
分配
</el-button>
<el-button
plain
icon=
"el-icon-user"
@
click=
"handleShowDialog(config.resourcePool)"
>
转资源池
</el-button>
<el-button
plain
icon=
"el-icon-document"
@
click=
"handleShowDialog(config.supervise)"
>
督办
</el-button>
<export-btn
:expand-params=
"expandParams"
config-code=
"customer"
/>
</
template
>
</TableBtns>
<ele-table
ref=
"eleTable"
v-bind=
"tableConfig"
:expand-params=
"expandParams"
:listeners=
"tableListeners"
@
handleSelectionChange=
"handleSelectionChange"
/>
<!-- 弹框部分 -->
<ele-form-dialog
:title=
"dialogTitle"
:form-data=
"formData"
:request-fn=
"handleSave"
:visible
.
sync=
"dialogFormVisible"
v-bind=
"formConfig"
:loading=
"loading"
/>
</div>
</div>
<h3>
测试
</h3>
</
template
>
<
script
>
import
constant
from
'./constant'
import
tableMixin
from
'@/mixins/table'
import
followTask
from
'../important-customers/components/record-info/components/follow-task/constant'
import
supervise
from
'../important-customers/components/record-info/components/supervise/constant'
import
{
customer
}
from
'@/api/customers'
export
default
{
mixins
:
[
tableMixin
],
data
()
{
return
{
expandParams
:
{},
// 筛选条件
tableListeners
:
{},
// 事件监听对象,供ele-table内部调用
tableConfig
:
constant
.
tableConfig
,
enterpriseUrl
:
'/customers/enterprise'
,
individualUrl
:
'/customers/individual'
,
enterpriseDetailUrl
:
'/customers/enterprise-detail'
,
individualDetailUrl
:
'/customers/individual-detail'
,
selection
:
[],
config
:
{
followTask
,
supervise
,
resourcePool
:
constant
.
ResourcePoolFormConfig
},
dialogTitle
:
''
,
dialogFormVisible
:
false
,
formData
:
{},
formConfig
:
{
formDesc
:
{}
},
loading
:
false
}
},
created
()
{
this
.
tableListeners
=
{
handleCheck
:
this
.
handleCheck
,
handleEdit
:
this
.
handleEdit
,
handleDelete
:
this
.
handleDelete
}
},
methods
:
{
handleAdd
(
type
)
{
if
(
type
===
1
)
{
this
.
$router
.
push
({
path
:
this
.
individualUrl
})
}
else
{
this
.
$router
.
push
({
path
:
this
.
enterpriseUrl
})
}
},
handleCheck
(
row
)
{
if
(
row
.
Ext_CustomerType_KUT
===
'121'
)
{
this
.
$router
.
push
({
path
:
this
.
individualDetailUrl
,
query
:
{
objectID
:
row
.
ObjectID
}
})
}
else
if
(
row
.
Ext_CustomerType_KUT
===
'131'
)
{
this
.
$router
.
push
({
path
:
this
.
enterpriseDetailUrl
,
query
:
{
objectID
:
row
.
ObjectID
}
})
}
},
handleEdit
(
row
)
{
if
(
row
.
Ext_CustomerType_KUT
===
'121'
)
{
this
.
$router
.
push
({
path
:
this
.
individualUrl
,
query
:
{
objectID
:
row
.
ObjectID
}
})
}
else
if
(
row
.
Ext_CustomerType_KUT
===
'131'
)
{
this
.
$router
.
push
({
path
:
this
.
enterpriseUrl
,
query
:
{
objectID
:
row
.
ObjectID
}
})
}
},
handleSelectionChange
(
selection
)
{
console
.
log
(
selection
)
this
.
selection
=
selection
},
handleShowDialog
(
obj
)
{
if
(
this
.
selection
.
length
===
0
)
{
this
.
$message
.
warning
(
'请先选择一个客户'
)
return
}
this
.
dialogTitle
=
obj
.
title
?
obj
.
title
:
'添加'
+
obj
.
tableConfig
.
tableTitle
this
.
postUrl
=
obj
.
createUrl
this
.
formData
=
{
objectID
:
this
.
selection
[
0
].
ObjectID
,
roleCode
:
this
.
selection
[
0
].
roleCode
}
this
.
formConfig
=
obj
.
formConfig
||
obj
this
.
dialogFormVisible
=
true
},
handleSave
(
data
)
{
this
.
loading
=
true
data
=
this
.
$translateToC4CData
(
data
)
this
.
$request
(
this
.
postUrl
,
[
data
]).
then
(
res
=>
{
this
.
loading
=
false
this
.
dialogFormVisible
=
false
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
handleDelete
(
row
)
{
this
.
$confirm
(
'此操作将删除该客户, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
const
data
=
{
objectID
:
row
.
ObjectID
,
ext_CustomerStatus_KUT
:
'191'
}
this
.
$request
(
customer
.
updateUrl
,
data
).
then
(
res
=>
{
this
.
$message
.
success
(
'删除成功'
)
this
.
handleSearch
()
})
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
<
style
>
</
style
>
\ No newline at end of file
src/views/public/file-info/index.vue
View file @
f0bab561
...
...
@@ -111,7 +111,7 @@ export default {
created
()
{
this
.
tableConfig
.
columns
.
handle
.
vif
=
this
.
isShowEditBtn
constant
.
tableConfig
.
initialParams
=
{
Accoun
tID
:
this
.
objectID
||
this
.
$route
.
query
.
objectID
,
BusinessObjec
tID
:
this
.
objectID
||
this
.
$route
.
query
.
objectID
,
TypeCode
:
this
.
typeCode
}
if
(
this
.
moduleType
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment