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
1d48a559
Commit
1d48a559
authored
Feb 09, 2022
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
0d3f8d76
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
253 additions
and
121 deletions
+253
-121
user.js
src/api/users/user.js
+12
-0
categoryEdit-form.vue
src/components/sale/categoryEdit-form.vue
+220
-0
customcategorylist.vue
src/components/sale/customcategorylist.vue
+17
-117
b2bcustomer.vue
src/pages/sale/b2bcustomer.vue
+4
-4
No files found.
src/api/users/user.js
View file @
1d48a559
...
...
@@ -356,4 +356,16 @@ export function deleteCustomerCategory(data) {
method
:
'post'
,
data
})
}
/**
* 获取客户类型列表
* @param {查询参数} data
*/
export
function
GetCatetoryTypeList
(
data
)
{
return
request
({
url
:
'/B2BCustomer/GetCatetoryTypeList'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/components/sale/categoryEdit-form.vue
0 → 100644
View file @
1d48a559
<
style
scoped
>
.CLM-Form
.el-input__inner
{
background
:
transparent
;
border
:
0
;
}
.CLM-Form
.el-input-group__append
{
background
:
transparent
;
border
:
0
;
}
.common_Style
{
display
:
inline-block
;
width
:
30px
;
height
:
30px
;
border-radius
:
50%
;
text-align
:
center
;
line-height
:
30px
;
}
.classForm_monday
{
background-color
:
#ced9f8
;
color
:
#2961FE
;
}
.classForm_tuesday
{
background-color
:
#d9f3ff
;
color
:
#3FC4FF
;
}
.classForm_wednesday
{
background-color
:
#f6e2cb
;
color
:
#F28C1D
;
}
.classForm_thursday
{
background-color
:
#ccf3eb
;
color
:
#02C499
;
}
.classForm_friday
{
background-color
:
#f7cfd6
;
color
:
#F72E52
;
}
.classForm_saturday
{
background-color
:
#fff5cc
;
color
:
#FFCC00
;
}
.classForm_sunday
{
background-color
:
#e6e3fe
;
color
:
#8175FB
;
}
.planTimeLi2
tbody
::before
{
content
:
''
;
display
:
table-row
;
height
:
20px
;
}
.customerPhoto
{
width
:
55px
;
height
:
55px
;
}
.customerPhoto
img
{
width
:
100%
;
height
:
100%
;
}
/
deep
/
.q-field__before
,
/
deep
/
.q-field__prepend
{
padding-right
:
0px
!important
;
}
</
style
>
<
template
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
>
<q-card
style=
"width: 400px;max-width:400px;"
class=
"CLM-Form"
>
<q-card-section>
<div
class=
"text-h6"
>
{{
optionTitle
}}
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.CategoryName"
ref=
"CategoryName"
class=
"col-12 q-pb-lg"
label=
"名称"
:rules=
"[val => !!val || '请填写客户名称']"
/>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<q-select
stack-label
color=
"primary"
filled
label=
"类型"
option-value=
"Id"
option-label=
"Name"
:options=
"typeList"
class=
"q-pb-lg"
v-model=
"objOption.CatetoryType"
emit-value
map-options
/>
</div>
</div>
<template
v-if=
"isShowTel"
>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.linkMan"
ref=
"linkMan"
class=
"col-12 q-pb-lg"
label=
"联系人"
/>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.linkTel"
ref=
"linkTel"
class=
"col-12 q-pb-lg"
label=
"联系电话"
/>
</div>
</div>
</
template
>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeCourseForm"
/>
<q-btn
label=
"保存"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
:loading=
"saveCustomLoading"
@
click=
"saveCourse"
>
</q-btn>
</q-card-actions>
</q-card>
</q-dialog>
</template>
<
script
>
import
{
saveCustomerCategory
,
queryCustomerCategory
,
GetCatetoryTypeList
}
from
"../../api/users/user"
;
export
default
{
components
:
{},
props
:
{
customerObj
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
persistent
:
true
,
objOption
:
{
CategoryName
:
""
,
CatetoryType
:
''
,
CategoryId
:
0
,
linkMan
:
""
,
linkTel
:
""
},
typeList
:
[],
//类型
saveCustomLoading
:
false
,
optionTitle
:
''
,
isShowTel
:
true
}
},
created
()
{},
mounted
()
{
this
.
initObj
()
this
.
getTypeList
();
},
methods
:
{
//初始化表单
initObj
()
{
if
(
this
.
customerObj
&&
this
.
customerObj
.
CategoryId
>
0
)
{
this
.
isShowTel
=
false
;
let
msg
=
{
CategoryId
:
this
.
customerObj
.
CategoryId
}
queryCustomerCategory
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
let
tempData
=
res
.
Data
;
this
.
objOption
.
CategoryName
=
tempData
.
CategoryName
;
this
.
objOption
.
CatetoryType
=
tempData
.
CatetoryType
;
this
.
objOption
.
CategoryId
=
tempData
.
CategoryId
;
}
})
this
.
optionTitle
=
"修改客户信息"
}
else
{
this
.
objOption
.
CategoryName
=
''
;
this
.
objOption
.
CatetoryType
=
''
;
this
.
objOption
.
CategoryId
=
0
;
this
.
objOption
.
linkMan
=
''
;
this
.
objOption
.
linkTel
=
''
;
this
.
optionTitle
=
"新增客户信息"
this
.
isShowTel
=
true
;
}
},
//保存
saveCourse
()
{
this
.
$refs
.
CategoryName
.
validate
();
if
(
!
this
.
$refs
.
CategoryName
.
hasError
)
{
this
.
saveCustomLoading
=
true
;
saveCustomerCategory
(
this
.
objOption
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
saveCustomLoading
=
false
;
this
.
$q
.
notify
({
icon
:
"iconfont icon-chenggong"
,
color
:
"accent"
,
timeout
:
2000
,
message
:
"数据保存成功!"
,
position
:
"top"
,
});
this
.
$emit
(
"success"
);
this
.
closeCourseForm
()
}
})
}
},
getTypeList
()
{
GetCatetoryTypeList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
typeList
=
res
.
Data
;
}
})
},
//关闭弹窗
closeCourseForm
()
{
this
.
$emit
(
'close'
);
this
.
persistent
=
false
;
}
},
}
</
script
>
src/components/sale/customcategorylist.vue
View file @
1d48a559
...
...
@@ -10,7 +10,7 @@
</
style
>
<
template
>
<div
class=
"b2bcustomlist"
>
<q-table
:pagination=
"pageMsg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
selection=
"multiple"
:class=
"sticky"
<q-table
:pagination=
"pageMsg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
selection=
"multiple"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"CustomerId"
>
<template
v-slot:top
>
<q-space
/>
...
...
@@ -47,44 +47,34 @@
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"修改"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
@
click=
"EditCustom(props.row)"
style=
"font-weight:400"
label=
"修改"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
@
click=
"RemoveCustomer(props.row)"
color=
"negative"
style=
"font-weight:400"
label=
"删除"
/>
</q-td>
</
template
>
<
template
v-slot:bottom
>
<div></div>
</
template
>
</q-table>
<categoryEdit-form
v-if=
"isShowCategoryForm"
:customerObj=
"customerObj"
@
close=
"closeCustomForm"
@
success=
"refreshQuestion"
>
</categoryEdit-form>
</div>
</template>
<
script
>
import
{
queryEmployee
deleteCustomerCategory
}
from
"../../api/users/user"
;
import
{
setCustomerCareOf
}
from
"../../api/sale/peemanagement"
;
import
customerEditForm
from
"../sale/customerEdit-form"
;
import
customerReviewForm
from
"../sale/customerReview-form"
;
import
customerInfo
from
"./b2bcustomerinfo/b2bCustomerInfo.vue"
;
import
categoryEditForm
from
"../sale/categoryEdit-form"
;
export
default
{
props
:
{
dataList
:
{
type
:
Array
,
default
:
null
},
empList
:
{
type
:
Array
,
default
:
()
=>
[]
},
sticky
:
{
type
:
String
,
default
:
""
}
},
components
:
{
customerEditForm
,
customerReviewForm
,
customerInfo
categoryEditForm
},
data
()
{
return
{
...
...
@@ -139,39 +129,16 @@
rowsPerPage
:
12
},
loading
:
false
,
isShowCustomForm
:
false
,
isShowRightForm
:
false
,
customerObj
:
null
,
//传入参数
isShowDetailForm
:
false
,
curRowId
:
0
,
//权限设置
AuthorityObj
:
{
isShowEdit
:
false
,
//是否显示新增修改按钮
isShowAudit
:
false
,
//是否显示审批
isShowBankBook
:
false
,
//是否显示幸福存折
isShowRebate
:
false
//是否显示返佣
},
tabId
:
1
,
TransferMsg
:
{
CustomerIds
:
""
,
EmpId
:
""
},
//员工列表
employeeList
:
[],
myEmployeeList
:
[],
isShowTrans
:
false
isShowCategoryForm
:
false
,
customerObj
:
null
//传入参数
};
},
created
()
{
this
.
getEmployeeList
();
},
mounted
()
{
console
.
log
(
"this.dataList"
,
this
.
dataList
);
},
methods
:
{
//新增或者修改客户
EditCustom
(
obj
)
{
if
(
obj
)
{
...
...
@@ -179,31 +146,14 @@
}
else
{
this
.
customerObj
=
null
;
}
this
.
isShowCustomForm
=
true
;
},
//客户审核
AuditCustomer
(
obj
,
Type
)
{
if
(
obj
)
{
this
.
customerObj
=
obj
;
this
.
customerObj
.
Type
=
Type
;
}
else
{
this
.
customerObj
=
null
;
}
this
.
isShowRightForm
=
true
;
},
//客户详情
showDetail
(
row
,
tabId
=
1
)
{
this
.
curRowId
=
row
.
CustomerId
;
this
.
tabId
=
tabId
;
this
.
isShowDetailForm
=
true
;
this
.
isShowCategoryForm
=
true
;
},
//删除客户
RemoveCustomer
(
obj
)
{
let
that
=
this
;
var
message
=
"您正在进行删除【"
+
obj
.
C
ustomer
Name
+
obj
.
C
ategory
Name
+
"】行为,一旦执行无法找回,是否确认执行?"
;
this
.
$q
.
dialog
({
...
...
@@ -222,9 +172,9 @@
})
.
onOk
(()
=>
{
var
delMsg
=
{
C
ustomerId
:
obj
.
Customer
Id
C
ategoryId
:
obj
.
Category
Id
};
RemoveCustomer
(
delMsg
).
then
(
res
=>
{
deleteCustomerCategory
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
that
.
$q
.
notify
({
icon
:
"iconfont icon-chenggong"
,
...
...
@@ -240,61 +190,11 @@
},
//关闭弹窗
closeCustomForm
()
{
this
.
isShowCustomForm
=
false
;
this
.
isShowRightForm
=
false
;
this
.
isShowDetailForm
=
false
;
this
.
isShowCategoryForm
=
false
;
},
refreshQuestion
()
{
this
.
$emit
(
"success"
);
},
//跳转到幸福存折
gohappyPassbook
(
item
)
{
this
.
OpenNewUrl
(
"/sale/happyPassbook"
,
{
CustomerId
:
item
.
CustomerId
});
},
//跳转到返佣管理
gohappyCommisson
(
item
)
{
this
.
OpenNewUrl
(
"/sale/commsionManagement"
,
{
CustomerId
:
item
.
CustomerId
});
},
//同业转交
saveTransForm
()
{
this
.
$refs
.
transfer
.
validate
();
if
(
this
.
$refs
.
transfer
.
hasError
)
return
;
this
.
TransferMsg
.
CustomerIds
=
this
.
selection
.
map
(
e
=>
e
.
CustomerId
)
.
toString
();
setCustomerCareOf
(
this
.
TransferMsg
).
then
(
res
=>
{
this
.
$q
.
notify
({
icon
:
"iconfont icon-chenggong"
,
color
:
"accent"
,
timeout
:
2000
,
message
:
"转交成功"
,
position
:
"top"
});
this
.
isShowTrans
=
false
;
this
.
selection
=
[];
});
},
//获取员工列表
getEmployeeList
()
{
queryEmployee
({
IsLeave
:
1
}).
then
(
res
=>
{
this
.
employeeList
=
res
.
Data
;
this
.
myEmployeeList
=
res
.
Data
;
});
},
//筛选员工
filterEmployee
(
val
,
update
,
abort
)
{
update
(()
=>
{
this
.
myEmployeeList
=
this
.
employeeList
.
filter
(
v
=>
v
.
EmployeeName
.
indexOf
(
val
)
>
-
1
);
});
}
}
};
</
script
>
\ No newline at end of file
src/pages/sale/b2bcustomer.vue
View file @
1d48a559
...
...
@@ -19,7 +19,7 @@
<q-tabs
style=
"margin-bottom:20px;"
v-model=
"tabCheck"
@
input=
"resetSearch()"
narrow-indicator
dense
align=
"left"
class=
"text-primary"
>
<q-tab
:ripple=
"false"
:name=
"1"
label=
"联系人"
/>
<
!--
<q-tab
:ripple=
"false"
:name=
"2"
label=
"同行管理"
/>
--
>
<
q-tab
:ripple=
"false"
:name=
"2"
label=
"同行管理"
/
>
</q-tabs>
</div>
<template
v-if=
"tabCheck==1"
>
...
...
@@ -46,10 +46,10 @@
:input=
"true"
@
input=
"changePage"
/>
</
template
>
<
template
v-if=
"tabCheck==2"
>
<
!--
<
div
class=
"page-search row items-center"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
@
input=
"resetSearch"
filled
clearable
v-model=
"
m
sg.CategoryName"
label=
"同业名称"
maxlength=
"20"
/>
<q-input
@
input=
"resetSearch"
filled
clearable
v-model=
"
categoryM
sg.CategoryName"
label=
"同业名称"
maxlength=
"20"
/>
</div>
</div>
</div>
...
...
@@ -57,7 +57,7 @@
sticky=
"sticky-tow-column-table sticky-right-column-table"
>
</customcategorylist>
<q-pagination
class=
"full-width justify-end"
v-model=
"categoryMsg.pageIndex"
color=
"primary"
:max=
"categoryMsg.pageCount"
:input=
"true"
@
input=
"changeCategoryPage"
/>
-->
:max=
"categoryMsg.pageCount"
:input=
"true"
@
input=
"changeCategoryPage"
/>
</
template
>
</div>
</div>
...
...
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