Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
a823b3b8
Commit
a823b3b8
authored
Feb 09, 2022
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
024155b8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
137 additions
and
62 deletions
+137
-62
b2bCustomerInfo.vue
src/components/sale/b2bcustomerinfo/b2bCustomerInfo.vue
+4
-1
baseInfo.vue
src/components/sale/b2bcustomerinfo/baseInfo.vue
+80
-24
b2bcustomlist.vue
src/components/sale/b2bcustomlist.vue
+6
-6
customcategorylist.vue
src/components/sale/customcategorylist.vue
+2
-2
customerEdit-form.vue
src/components/sale/customerEdit-form.vue
+42
-24
b2bcustomer.vue
src/pages/sale/b2bcustomer.vue
+3
-5
No files found.
src/components/sale/b2bcustomerinfo/b2bCustomerInfo.vue
View file @
a823b3b8
...
...
@@ -136,7 +136,8 @@ export default {
WeChatName
:
""
,
WeChatPhoto
:
""
,
CustomerType
:
1
,
EnterpriseName
:
""
EnterpriseName
:
""
,
CategoryId
:
''
},
//员工列表
employeeList
:
[],
...
...
@@ -186,6 +187,7 @@ export default {
this
.
detailData
.
WeChatPhoto
=
tempData
.
WeChatPhoto
;
this
.
detailData
.
CustomerType
=
tempData
.
CustomerType
;
this
.
detailData
.
EnterpriseName
=
tempData
.
EnterpriseName
;
this
.
detailData
.
CategoryId
=
tempData
.
CategoryId
;
}
});
}
else
{
...
...
@@ -207,6 +209,7 @@ export default {
this
.
detailData
.
WeChatPhoto
=
""
;
this
.
detailData
.
CustomerType
=
1
;
this
.
detailData
.
EnterpriseName
=
""
;
this
.
detailData
.
CategoryId
=
""
;
}
},
saveBaseInfo
(
obj
)
{
...
...
src/components/sale/b2bcustomerinfo/baseInfo.vue
View file @
a823b3b8
...
...
@@ -86,29 +86,51 @@
<q-btn
size=
"sm"
color=
"primary"
label=
"确定"
class=
"q-ml-sm"
@
click=
"save('CustomerType',Data.CustomerType)"
></q-btn>
</div>
</div>
<q-select
outlined
dense
v-model=
"Data.CustomerType"
map-options
emit-value
:options=
"options
"
:rules=
"[val => !!val || '请选择类型']"
/>
<q-select
outlined
dense
stack-label
label=
"类型"
@
input=
"getCustomList(Data.CustomerType)"
option-value=
"Id"
option-label=
"Name
"
:rules=
"[val => !!val || '请选择类型']"
:options=
"options"
v-model=
"Data.CustomerType"
emit-value
map-options
/>
</div>
<div
class=
"flex justify-between items-center q-my-lg"
v-else
@
click=
"showEdit('CustomerType')"
>
<span>
类型
</span>
<span
v-if=
"Data.CustomerType==1"
>
企业
</span>
<span
v-if=
"Data.CustomerType==2"
>
学校
</span>
</div>
<span
v-if=
"Data.CustomerType==3"
>
个人
</span>
<span
v-if=
"Data.CustomerType==4"
>
其他
</span>
</div>
<!-- 客户 -->
<template
v-if=
"Data.CustomerType!=4"
>
<div
class=
"q-my-sm"
v-if=
"editField=='CategoryId'"
>
<div
class=
"flex justify-between items-center q-mb-sm"
>
<span>
客户
</span>
<div>
<q-btn
size=
"sm"
text-color=
"primary"
label=
"取消"
@
click=
"showEdit('')"
></q-btn>
<q-btn
size=
"sm"
color=
"primary"
label=
"确定"
class=
"q-ml-sm"
@
click=
"save('CategoryId',Data.CategoryId)"
></q-btn>
</div>
</div>
<q-select
outlined
dense
stack-label
label=
"客户"
option-value=
"CategoryId"
option-label=
"CategoryName"
:options=
"customList"
v-model=
"Data.CategoryId"
emit-value
map-options
/>
</div>
<div
class=
"flex justify-between items-center q-my-lg"
v-else
@
click=
"showEdit('CategoryId')"
>
<span>
客户
</span>
<span>
{{
getName
(
Data
.
CategoryId
)
}}
</span>
</div>
</
template
>
<!-- 企业/学校名称 -->
<div
class=
"q-my-sm"
v-if=
"editField=='EnterpriseName'"
>
<div
class=
"flex justify-between items-center q-mb-sm"
>
<span>
企业/学校名称
</span>
<div>
<q-btn
size=
"sm"
text-color=
"primary"
label=
"取消"
@
click=
"showEdit('')"
></q-btn>
<q-btn
size=
"sm"
color=
"primary"
label=
"确定"
class=
"q-ml-sm"
@
click=
"save('EnterpriseName',Data.EnterpriseName)"
></q-btn>
<
template
v-if=
"Data.CustomerType==4"
>
<div
class=
"q-my-sm"
v-if=
"editField=='EnterpriseName'"
>
<div
class=
"flex justify-between items-center q-mb-sm"
>
<span>
企业/学校名称
</span>
<div>
<q-btn
size=
"sm"
text-color=
"primary"
label=
"取消"
@
click=
"showEdit('')"
></q-btn>
<q-btn
size=
"sm"
color=
"primary"
label=
"确定"
class=
"q-ml-sm"
@
click=
"save('EnterpriseName',Data.EnterpriseName)"
></q-btn>
</div>
</div>
<q-input
outlined
dense
v-model=
"Data.EnterpriseName"
:rules=
"[val => !!val || '请输入名称']"
></q-input>
</div>
<q-input
outlined
dense
v-model=
"Data.EnterpriseName"
:rules=
"[val => !!val || '请输入名称']"
></q-input>
</div>
<div
class=
"flex justify-between items-center q-my-lg"
v-else
@
click=
"showEdit('EnterpriseName')"
>
<span>
企业/学校名称
</span>
<span>
{{
Data
.
EnterpriseName
}}
</span>
</div>
<div
class=
"flex justify-between items-center q-my-lg"
v-else
@
click=
"showEdit('EnterpriseName')"
>
<span>
企业/学校名称
</span>
<span>
{{
Data
.
EnterpriseName
}}
</span>
</div>
</
template
>
<!-- 详细地址 -->
<div
class=
"q-my-sm"
v-if=
"editField=='Address'"
>
<div
class=
"flex justify-between items-center q-mb-sm"
>
...
...
@@ -142,6 +164,11 @@
</div>
</template>
<
script
>
import
{
GetCatetoryTypeList
,
queryCustomerCategoryList
}
from
"../../../api/users/user"
;
export
default
{
components
:
{},
props
:
{
...
...
@@ -153,21 +180,22 @@
data
()
{
return
{
editField
:
""
,
options
:
[{
label
:
"企业"
,
value
:
1
,
},
{
label
:
"学校"
,
value
:
2
,
}],
options
:
[],
sexOptions
:
[{
label
:
"男"
,
value
:
1
,
},
{
label
:
"女"
,
value
:
2
,
}]
}],
customList
:[]
}
},
mounted
(){
if
(
this
.
Data
.
CustomerType
){
this
.
getCustomList
(
this
.
Data
.
CustomerType
);
}
this
.
getTypeList
();
},
methods
:
{
showEdit
(
field
)
{
...
...
@@ -185,7 +213,35 @@
this
.
$emit
(
"confirm"
,
obj
)
this
.
editField
=
''
},
},
getTypeList
()
{
GetCatetoryTypeList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
options
=
res
.
Data
;
}
})
},
getCustomList
(
Type
){
let
msg
=
{
CategoryName
:
""
,
CatetoryType
:
Type
}
this
.
Data
.
CategoryId
=
''
;
queryCustomerCategoryList
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
customList
=
res
.
Data
;
}
})
},
getName
(
Id
){
let
Name
=
''
this
.
customList
.
forEach
(
x
=>
{
if
(
x
.
CategoryId
==
Id
){
Name
=
x
.
CategoryName
}
})
return
Name
;
}
}
}
</
script
>
...
...
src/components/sale/b2bcustomlist.vue
View file @
a823b3b8
...
...
@@ -122,20 +122,20 @@
return
{
columns
:
[{
name
:
"CustomerName"
,
label
:
"
同业
名称"
,
label
:
"
联系人
名称"
,
field
:
"CustomerName"
,
align
:
"left"
},
{
name
:
"CustomerType"
,
name
:
"CustomerType
Name
"
,
label
:
"类型"
,
field
:
"CustomerType"
,
field
:
"CustomerType
Name
"
,
align
:
"left"
},
{
name
:
"
Enterprise
Name"
,
label
:
"
企业/学校
名称"
,
field
:
"
Enterprise
Name"
,
name
:
"
Category
Name"
,
label
:
"
同业
名称"
,
field
:
"
Category
Name"
,
align
:
"left"
},
{
...
...
src/components/sale/customcategorylist.vue
View file @
a823b3b8
...
...
@@ -10,8 +10,8 @@
</
style
>
<
template
>
<div
class=
"b2bcustomlist"
>
<q-table
:pagination=
"pageMsg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
selection=
"multiple"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"CustomerId"
>
<q-table
:pagination=
"pageMsg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"CustomerId"
>
<template
v-slot:top
>
<q-space
/>
<div
class=
"page-option"
>
...
...
src/components/sale/customerEdit-form.vue
View file @
a823b3b8
...
...
@@ -103,7 +103,7 @@
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.CustomerName"
ref=
"CustomerName"
class=
"col-6 q-pb-lg q-pr-lg"
label=
"
客户名称"
:rules=
"[val => !!val || '请输入客户
名称']"
/>
ref=
"CustomerName"
class=
"col-6 q-pb-lg q-pr-lg"
label=
"
联系人名称"
:rules=
"[val => !!val || '请输入联系人
名称']"
/>
</div>
<div
class=
"col-6"
>
<q-radio
v-model=
"objOption.Sex"
:val=
"1"
label=
"男"
/>
...
...
@@ -116,17 +116,16 @@
ref=
"ContactNumber"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"联系电话"
/>
</div>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"40"
v-model=
"objOption.EnterpriseName"
:label=
"EnterpriseLabelName"
>
<template
v-slot:before
>
<q-select
stack-label
color=
"primary"
filled
label=
"类型"
option-value=
"Id"
option-label=
"TypeName"
:options=
"typeOptions"
v-model=
"objOption.CustomerType"
emit-value
map-options
style=
"border-right:1px solid #999;min-width:90px;"
@
input=
'CustomerTypeChange'
/>
</
template
>
</q-input>
<!-- <q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.Fax" ref="Fax"
class="col-6 q-pb-lg" label="传真" /> -->
<q-select
stack-label
color=
"primary"
filled
label=
"类型"
@
input=
"getCustomList(objOption.CustomerType)"
option-value=
"Id"
option-label=
"Name"
:options=
"typeOptions"
class=
"q-pb-lg"
v-model=
"objOption.CustomerType"
emit-value
map-options
/>
</div>
</div>
<div
class=
"row wrap"
>
<q-input
filled
v-if=
"objOption.CustomerType==4"
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.EnterpriseName"
lazy-rules
ref=
"EnterpriseName"
class=
"col-6 q-pr-lg q-pb-lg"
/>
<q-select
stack-label
color=
"primary"
v-else
filled
label=
"客户"
option-value=
"CategoryId"
option-label=
"CategoryName"
:options=
"customList"
class=
"col-6 q-pr-lg q-pb-lg"
v-model=
"objOption.CategoryId"
emit-value
map-options
/>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model:number=
"objOption.QQ"
ref=
"QQ"
...
...
@@ -134,7 +133,7 @@
</div>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.WeChatNo"
ref=
"wechat"
class=
"col-6 q-p
r-lg q-p
b-lg"
label=
"微信"
/>
class=
"col-6 q-pb-lg"
label=
"微信"
/>
</div>
<!--
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.Email"
ref=
"Email"
...
...
@@ -142,14 +141,11 @@
</div>
-->
</div>
<div
class=
"row wrap"
>
<div
class=
"col-
6
"
>
<div
class=
"col-
12
"
>
<!--
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.Account"
ref=
"Account"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"账号"
/>
-->
<q-input
filled
stack-label
:dense=
"false"
v-model=
"objOption.Address"
ref=
"Address"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"详细地址"
/>
</div>
<div
class=
"col-6"
>
class=
"col-12 q-pb-lg"
label=
"详细地址"
/>
</div>
</div>
<div
class=
"row wrap"
>
...
...
@@ -195,6 +191,11 @@
SetCustomer
,
GetCustomer
}
from
"../../api/sale/peemanagement"
;
import
{
GetCatetoryTypeList
,
queryCustomerCategoryList
}
from
"../../api/users/user"
;
import
{
validateTel
}
from
'../../utils/validate'
...
...
@@ -236,6 +237,7 @@
WeChatPhoto
:
''
,
CustomerType
:
1
,
//同业类型 1企业 2学校
EnterpriseName
:
""
,
//企业名称
CategoryId
:
''
},
EnterpriseLabelName
:
"企业名称"
,
saveCustomLoading
:
false
,
...
...
@@ -244,18 +246,15 @@
regionList
:
[],
//区
CustomerBrandList
:
[],
//所属品牌下拉
optionTitle
:
''
,
typeOptions
:
[{
Id
:
1
,
TypeName
:
"企业"
,
},
{
Id
:
2
,
TypeName
:
"学校"
,
}]
typeOptions
:
[],
customList
:[]
}
},
created
()
{},
mounted
()
{
this
.
getTypeList
();
this
.
initObj
()
this
.
getCustomList
(
1
);
},
methods
:
{
//初始化表单
...
...
@@ -360,8 +359,27 @@
}
else
{
this
.
EnterpriseLabelName
=
'学校名称'
}
},
getTypeList
()
{
GetCatetoryTypeList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
typeOptions
=
res
.
Data
;
}
})
},
getCustomList
(
Type
){
let
msg
=
{
CategoryName
:
""
,
CatetoryType
:
Type
}
this
.
objOption
.
CategoryId
=
''
;
queryCustomerCategoryList
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
customList
=
res
.
Data
;
}
})
}
}
,
}
}
</
script
>
src/pages/sale/b2bcustomer.vue
View file @
a823b3b8
...
...
@@ -13,7 +13,6 @@
</
style
>
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-content"
>
<div>
<q-tabs
style=
"margin-bottom:20px;"
v-model=
"tabCheck"
@
input=
"resetSearch()"
narrow-indicator
dense
...
...
@@ -95,8 +94,8 @@
loading
:
false
,
visibleColumns
:
[
"CustomerName"
,
"CustomerType"
,
"
Enterprise
Name"
,
"CustomerType
Name
"
,
"
Category
Name"
,
"ContactNumber"
,
"StuNum"
,
"OrderNum"
,
...
...
@@ -132,6 +131,7 @@
CategoryName
:
""
,
//客户名称
CatetoryType
:
""
,
//类型
pageCount
:
0
,
IsQueryAll
:
0
},
};
},
...
...
@@ -163,7 +163,6 @@
if
(
this
.
tabCheck
==
1
)
{
GetCustomerPage_v2
(
this
.
msg
)
.
then
(
res
=>
{
console
.
log
(
"GetCustomerPage_v2"
,
res
);
this
.
dataList
=
res
.
Data
.
PageData
;
this
.
loading
=
false
;
this
.
pageCount
=
res
.
Data
.
PageCount
;
...
...
@@ -173,7 +172,6 @@
});
}
else
if
(
this
.
tabCheck
==
2
)
{
queryCustomerCategoryPage
(
this
.
categoryMsg
).
then
(
res
=>
{
console
.
log
(
"queryCustomerCategoryPage"
,
res
);
this
.
dataList
=
res
.
Data
.
PageData
;
this
.
loading
=
false
;
this
.
categoryMsg
.
pageCount
=
res
.
Data
.
PageCount
;
...
...
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