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
4c848d5b
Commit
4c848d5b
authored
Oct 16, 2021
by
jiangqihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asd
parent
84f8de39
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
342 additions
and
21 deletions
+342
-21
customers.js
src/api/customers.js
+9
-1
Navbar.vue
src/layout/components/Navbar.vue
+4
-4
customers.js
src/router/modules/customers.js
+26
-15
index.vue
src/views/customers/personal-customers/index.vue
+302
-0
index.vue
src/views/login/index.vue
+1
-1
No files found.
src/api/customers.js
View file @
4c848d5b
...
...
@@ -38,6 +38,15 @@ export function customerCreate(data) {
})
}
// 查询单条代理商信息
export
function
customerGetOne
(
data
)
{
return
request
({
url
:
'/customer/getOne'
,
method
:
'post'
,
data
})
}
// 查询省
export
function
provinceSearch
(
data
)
{
return
request
({
...
...
@@ -47,7 +56,6 @@ export function provinceSearch(data) {
})
}
// 查询市
export
function
citySearch
(
data
){
return
request
({
...
...
src/layout/components/Navbar.vue
View file @
4c848d5b
...
...
@@ -118,14 +118,14 @@
/>
</div>
<el-dropdown-menu
slot=
"dropdown"
>
<router-link
to=
"/
profile/index
"
>
<router-link
to=
"/"
>
<el-dropdown-item>
{{ $t('navbar.
profile
') }}
{{ $t('navbar.
dashboard
') }}
</el-dropdown-item>
</router-link>
<router-link
to=
"/"
>
<router-link
to=
"/
profile/index
"
>
<el-dropdown-item>
{{ $t('navbar.
dashboard
') }}
{{ $t('navbar.
profile
') }}
</el-dropdown-item>
</router-link>
<router-link
to=
"/changePass/index"
>
...
...
src/router/modules/customers.js
View file @
4c848d5b
...
...
@@ -27,12 +27,12 @@ const customersRouter = {
meta
:
{
title
:
'代理商新增'
},
hidden
:
true
,
},
{
path
:
'/potential'
,
component
:
()
=>
import
(
'@/views/customers/potential-customers'
),
name
:
'PotentialCustomers'
,
meta
:
{
title
:
'potentialCustomers'
}
},
//
{
//
path: '/potential',
//
component: () => import('@/views/customers/potential-customers'),
//
name: 'PotentialCustomers',
//
meta: { title: 'potentialCustomers' }
//
},
{
path
:
'/potential-list'
,
component
:
()
=>
import
(
'@/views/customers/potential-list'
),
...
...
@@ -40,13 +40,6 @@ const customersRouter = {
meta
:
{
title
:
'省级代理商审批'
},
hidden
:
true
,
},
{
path
:
'/citypotential-list'
,
component
:
()
=>
import
(
'@/views/customers/citypotenial-list'
),
name
:
'CityPotenialList'
,
meta
:
{
title
:
'城市代理商审批'
},
hidden
:
true
,
},
{
path
:
'/Provincial-agentList'
,
component
:
()
=>
import
(
'@/views/customers/provincial-agentList'
),
...
...
@@ -57,7 +50,25 @@ const customersRouter = {
path
:
'/Municipal-agentList'
,
component
:
()
=>
import
(
'@/views/customers/municipal-agentList'
),
name
:
'MunicipalAgentList'
,
meta
:
{
title
:
'市级代理商'
}
meta
:
{
title
:
'城市代理商'
}
},
{
path
:
'/potential'
,
component
:
()
=>
import
(
'@/views/customers/potential-customers'
),
name
:
'PotentialCustomers'
,
meta
:
{
title
:
'potentialCustomers'
}
},
{
path
:
'/citypotential-list'
,
component
:
()
=>
import
(
'@/views/customers/citypotenial-list'
),
name
:
'CityPotenialList'
,
meta
:
{
title
:
'城市代理商审批'
},
hidden
:
true
,
},
{
path
:
'/Personal-customers'
,
component
:
()
=>
import
(
'@/views/customers/personal-customers'
),
name
:
'PersonalCustomers'
,
meta
:
{
title
:
'代理商信息'
}
},
// {
// path: 'resource',
...
...
src/views/customers/personal-customers/index.vue
0 → 100644
View file @
4c848d5b
<
template
>
<div
class=
"form-container"
>
<Title
:title=
"title"
>
<span>
*
</span>
为必填项
</Title>
<div
class=
"basic-info"
>
<ele-form-section
v-model=
"formData"
:request-fn=
"handleSubmit"
:rules=
"rules"
:sections=
"sections"
@
request-success=
"handleSuccess"
/>
</div>
<!--
<customerAddAddress
:objectId=
'objectId'
:form-data=
"$attrs['form-data']"
/>
<customerAddAccessory
:objectId=
'objectId'
:form-data=
"$attrs['form-data']"
/>
-->
</div>
</
template
>
<
script
>
import
Title
from
'@/components/Title'
import
{
customerCreate
,
provinceSearch
,
citySearch
,
districtSearch
,
customerGetOne
}
from
'@/api/customers'
;
import
{
qccGetOne
}
from
'@/api/qcc'
export
default
{
components
:
{
Title
,
customerCreate
,
provinceSearch
,
citySearch
,
districtSearch
,
qccGetOne
,
customerGetOne
},
data
()
{
return
{
title
:
'代理商新增'
,
addBtnStart
:
false
,
objectId
:
''
,
formData
:
{},
isShowSubmitBtn
:
false
,
isShowBackBtn
:
false
,
sections
:
[
{
title
:
'基本信息'
,
formDesc
:
{
Name
:
{
type
:
'lov'
,
label
:
'公司全称'
,
layout
:
16
,
code
:
'qcc'
,
displayKey
:
'Name'
,
disabled
:
true
,
btnTitle
:
'获取企查查信息'
,
returnFn
:
function
(
row
)
{
return
{
Name
:
row
.
Name
,
ExtSocialUnifiedCreditCode_SDK
:
row
.
CreditCode
,
ExtCorporateName_SDK
:
row
.
OperName
}
},
},
ExtSecondName_SDK
:
{
type
:
'input'
,
label
:
'公司全称曾用名'
,
layout
:
10
,
disabled
:
true
,
},
ExtSocialUnifiedCreditCode_SDK
:
{
type
:
'input'
,
label
:
'社会统一信用代码'
,
layout
:
10
,
disabled
:
true
},
ExtRegisteredCapital_SDK
:
{
type
:
'input'
,
label
:
'注册资本(万元)'
,
layout
:
10
,
default
:
''
,
disabled
:
true
,
},
ExtCorporateName_SDK
:
{
type
:
'input'
,
label
:
'法人'
,
layout
:
10
,
disabled
:
true
,
},
// Ext_QuoteOppotunity_KUT: {
// type: 'input',
// label: '税务登记编号',
// layout: 10
// },
}
},
{
title
:
'地址信息'
,
formDesc
:
{
ExtProvince_SDK
:
{
type
:
'select'
,
label
:
'省份'
,
layout
:
10
,
disabled
:
true
,
options
:
async
data
=>
{
const
res
=
await
provinceSearch
({})
var
result
=
res
.
results
.
map
(
item
=>
{
return
{
text
:
item
.
Name
,
value
:
item
.
Code
}
})
return
result
},
},
ExtCity_SDK
:
{
type
:
'select'
,
label
:
'地市'
,
layout
:
10
,
isOptions
:
true
,
disabled
:
true
,
optionsLinkageFields
:
[
'ExtProvince_SDK'
],
options
:
async
data
=>
{
if
(
!
data
.
ExtProvince_SDK
)
{
return
[]
}
const
res
=
await
citySearch
({
provinceCode
:
data
.
ExtProvince_SDK
})
var
result
=
res
.
results
.
map
(
item
=>
{
return
{
text
:
item
.
Name
,
value
:
item
.
Code
}
})
return
result
},
},
ExtDistrict_SDK
:
{
type
:
'select'
,
label
:
'县市'
,
layout
:
10
,
isOptions
:
true
,
disabled
:
true
,
optionsLinkageFields
:
[
'ExtProvince_SDK'
,
'ExtCity_SDK'
],
options
:
async
data
=>
{
if
(
!
data
.
ExtCity_SDK
)
{
return
[]
}
const
res
=
await
districtSearch
({
cityCode
:
data
.
ExtCity_SDK
})
var
result
=
res
.
results
.
map
(
item
=>
{
return
{
text
:
item
.
Name
,
value
:
item
.
Code
}
})
return
result
},
},
ExtAddressDetail_SDK
:
{
type
:
'input'
,
label
:
'详细经营地址'
,
layout
:
10
,
disabled
:
true
,
},
}
},
{
title
:
'联系信息'
,
formDesc
:
{
ExtLeader_SDK
:
{
type
:
'input'
,
label
:
'公司负责人姓名'
,
disabled
:
true
,
layout
:
10
},
ExtLeaderPhone_SDK
:
{
type
:
'input'
,
label
:
'公司负责人联系方式'
,
disabled
:
true
,
layout
:
10
},
ExtLeaderEmail_SDK
:
{
type
:
'input'
,
label
:
'公司负责人邮箱'
,
layout
:
10
,
disabled
:
true
},
ExtUnis_SDK
:
{
type
:
'input'
,
layout
:
10
,
label
:
'Unis业务负责人姓名'
,
disabled
:
true
},
ExtUnisPhone_SDK
:
{
type
:
'input'
,
layout
:
10
,
label
:
'Unis业务负责人联系方式'
,
disabled
:
true
},
ExtUnisEmail_SDK
:
{
type
:
'input'
,
label
:
'Unis业务负责人邮箱'
,
layout
:
10
,
disabled
:
true
},
ExtBusiness_SDK
:
{
type
:
'input'
,
layout
:
10
,
label
:
'商务负责人姓名'
,
disabled
:
true
},
ExtBusinessPhone_SDK
:
{
type
:
'input'
,
layout
:
10
,
label
:
'商务负责人联系方式'
,
disabled
:
true
},
ExtBusinessEmail_SDK
:
{
type
:
'input'
,
label
:
'商务负责人邮箱'
,
layout
:
10
,
disabled
:
true
},
}
}
],
}
},
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
()
{
const
perjectID
=
JSON
.
parse
(
localStorage
.
getItem
(
'USERINFO'
))
customerGetOne
({
objectID
:
perjectID
.
ObjectID
}).
then
(
res
=>
{
console
.
log
(
res
)
})
},
methods
:
{
handleSubmit
(
data
)
{
const
formData
=
this
.
$translateToC4CData
(
data
)
formData
.
extCustomerType_SDK
=
'121'
console
.
log
(
formData
)
customerCreate
(
this
.
paramsToFormData
(
formData
)).
then
(
res
=>
{
this
.
addBtnStart
=
true
this
.
objectId
=
res
.
results
const
objectID
=
res
.
results
this
.
$router
.
push
({
path
:
'/customersAdd'
,
query
:
{
objectID
:
objectID
,
addBtnStart
:
false
}
})
this
.
$message
.
success
(
'创建成功'
)
})
// return Promise.resolve()
},
handleSuccess
()
{
// this.$message.success('创建成功')
},
// 对象格式转化为键值对
paramsToFormData
(
obj
)
{
const
formData
=
new
FormData
();
Object
.
keys
(
obj
).
forEach
((
key
)
=>
{
if
(
obj
[
key
]
instanceof
Array
)
{
obj
[
key
].
forEach
((
item
)
=>
{
formData
.
append
(
key
,
item
);
});
return
;
}
formData
.
append
(
key
,
obj
[
key
]);
});
return
formData
;
},
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
::v-deep
.el-row--flex
{
display
:
-
webkit-box
;
.el-col-14
{
width
:
90%
;
}
}
.basic-info
{
::v-deep
.ele-form-btns
{
.el-form-item__content
{
margin-left
:
40%
!
important
;
}
}
}
.btn
{
display
:
none
;
}
</
style
>
src/views/login/index.vue
View file @
4c848d5b
...
...
@@ -103,7 +103,6 @@
<el-button
:loading=
"loading"
type=
"primary"
icon=
"el-icon-check"
@
click=
"handleNext"
>
确定
</el-button>
</div>
...
...
@@ -337,6 +336,7 @@ export default {
})
}
else
{
this
.
$message
.
error
(
'确认密码出错!!'
)
this
.
loading
=
false
}
},
...
...
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