Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
horse
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
向伟
horse
Commits
2246aa0e
Commit
2246aa0e
authored
Dec 06, 2021
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/xiangwei/horse
parents
71efaafb
bfff7419
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
147 additions
and
37 deletions
+147
-37
App.vue
src/App.vue
+1
-1
departmentStaff.vue
src/components/common/departmentStaff.vue
+1
-0
fileUpload.vue
src/components/common/fileUpload.vue
+0
-1
import.vue
src/components/common/import.vue
+52
-9
request-group.vue
src/components/customer/request-group.vue
+1
-9
customerModule.ts
src/module/customer/customerModule.ts
+24
-5
customer.vue
src/pages/customerManage/customer.vue
+68
-10
upload.ts
src/utils/upload.ts
+0
-2
No files found.
src/App.vue
View file @
2246aa0e
...
...
@@ -10,7 +10,7 @@ export default defineComponent({
</
script
>
<
style
lang=
"sass"
>
@import
url('./css/font.sass')
@import
url('//at.alicdn.com/t/font_2930340_
at4xv6vjd
h.css')
@import
url('//at.alicdn.com/t/font_2930340_
uvse4eempk
h.css')
@import
url('./css/table.sass')
.svg-icon-primary
g
[
fill
]
transition
:
fill
0
.3s
ease
...
...
src/components/common/departmentStaff.vue
View file @
2246aa0e
...
...
@@ -234,6 +234,7 @@
}
let
goback
=
()
=>
{
ctx
.
emit
(
'select'
,
selectArray
.
value
)
show
.
value
=
false
}
return
{
show
,
...
...
src/components/common/fileUpload.vue
View file @
2246aa0e
...
...
@@ -75,7 +75,6 @@
imageList
:
[]
})
let
customUploadImg
=
file
=>
{
console
.
log
(
82
,
file
)
UploadSelfFile
(
'/horse'
,
file
.
file
.
file
,
res
=>
{
msg
.
ImageList
.
push
(
res
.
FileUrl
)
})
...
...
src/components/common/import.vue
View file @
2246aa0e
<
template
>
<q-dialog
v-model=
"show"
class=
"col-6"
persistent
position=
"right"
full-width
maximized
@
hide=
"hideDialog"
>
<q-dialog
v-model=
"show"
class=
"col-6"
position=
"right"
persistent
full-width
maximized
@
hide=
"hideDialog"
>
<q-card
class=
"full-height"
>
<q-card-section
class=
"row items-center q-pb-none"
>
<div
class=
"text-h6"
>
...
...
@@ -13,14 +12,31 @@
</q-card-section>
<q-card-section
class=
"q-pt-none"
>
<div
class=
"row"
style=
"width:800px ;max-width:800px"
>
<div
class=
"row q-my-md"
style=
"width:55vw ;max-width:55vw"
>
<div
class=
"q-mb-sm"
>
<slot
name=
"top"
></slot>
</div>
<n-upload
accept=
"application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
multiple
:custom-request=
"customUploadFile"
>
<n-upload-dragger>
<i
class=
"iconfont icon-Excel"
style=
"font-size:48px;margin-bottom: 12px"
></i>
<div
style=
"font-size: 14px;color:#000"
>
将文件拖到此处,或 点击上传
</div>
</n-upload-dragger>
</n-upload>
<div
class=
"uplaod-tips"
>
请上传xls、xlsx文件
<q-btn
flat
color=
"primary"
label=
"下载模板"
/><br/>
每次最多可上传10000条数据
</div>
<div
class=
"q-mt-sm full-width"
>
<slot
name=
"bottom"
></slot>
</div>
</div>
</q-card-section>
<q-card-actions
align=
"right"
class=
"bg-white text-teal"
>
<q-card-actions
align=
"right"
class=
"bg-white text-teal
q-pa-md
"
>
<q-btn
flat
label=
"取消"
v-close-popup
/>
<q-btn
color=
"primary"
unelevated
label=
"确定"
/>
<q-btn
color=
"primary"
unelevated
label=
"确定"
@
click=
"confirm"
/>
</q-card-actions>
</q-card>
</q-dialog>
...
...
@@ -30,7 +46,9 @@
ref
,
watch
}
from
'vue'
import
{
UploadSelfFile
}
from
'@/utils/upload'
export
default
{
props
:
{
modelValue
:
{
...
...
@@ -45,16 +63,32 @@
watch
(
()
=>
props
.
modelValue
,
val
=>
{
console
.
log
(
48
,
val
)
show
.
value
=
val
}
)
let
hideDialog
=
()
=>
{
ctx
.
emit
(
'update:modelValue'
,
false
)
}
let
FileList
=
ref
<
any
[]
>
([])
let
customUploadFile
=
file
=>
{
UploadSelfFile
(
'/horse'
,
file
.
file
.
file
,
res
=>
{
FileList
.
value
.
push
({
FileName
:
res
.
FileName
,
FileUrl
:
res
.
FileUrl
,
})
})
}
const
confirm
=
()
=>
{
console
.
log
(
FileList
.
value
)
ctx
.
emit
(
'confirm'
,
FileList
.
value
)
show
.
value
=
false
}
return
{
show
,
hideDialog
hideDialog
,
FileList
,
customUploadFile
,
confirm
}
}
}
...
...
@@ -101,4 +135,13 @@
height
:
30px
;
}
:deep
(
.n-upload-dragger
)
{
width
:
55vw
;
}
.uplaod-tips
{
width
:
100%
;
margin-top
:
10px
;
font-size
:
14px
;
color
:
#333
;
}
</
style
>
src/components/customer/request-group.vue
View file @
2246aa0e
...
...
@@ -654,14 +654,6 @@
})
</
script
>
<
style
lang=
"scss"
scoped
>
::v-deep
.ant-cascader-picker
{
border-radius
:
4px
;
border-color
:
rgb
(
0
0
0
/
24%
);
overflow
:
hidden
;
}
</
style
>
<
style
>
/*修改滚动条样式*/
ul
::-webkit-scrollbar
{
...
...
@@ -671,7 +663,7 @@
}
ul
::-webkit-scrollbar-track
{
background
:
rgb
(
239
,
239
,
239
);
background
:
rgb
(
32
,
26
,
26
);
border-radius
:
3px
;
}
...
...
src/module/customer/customerModule.ts
View file @
2246aa0e
...
...
@@ -83,10 +83,14 @@ const CustomerModule = () => {
const
data
=
reactive
<
dataParams
>
({
loading
:
false
,
isshowlabel
:
false
,
//设置标签弹窗
showTransfer
:
false
,
//转移客户弹窗
showAbandon
:
false
,
//放弃客户弹窗
showImport
:
false
,
//导入组件弹窗
isshowlabel
:
false
,
//设置标签弹窗
showTransfer
:
false
,
//转移客户弹窗
showAbandon
:
false
,
//放弃客户弹窗
showImport
:
false
,
//导入组件弹窗
showDptDialog
:
false
,
//部门弹窗
DptDialogArr
:
[],
DistributionRule
:
1
,
importTab
:
1
,
columns
:
[
{
name
:
'CustomerName'
,
...
...
@@ -414,6 +418,18 @@ const CustomerModule = () => {
})
})
}
const
getFile
=
(
val
)
=>
{
console
.
log
(
"文件"
,
val
)
}
const
showdept
=
()
=>
{
data
.
showDptDialog
=
true
}
//导入是获取部门arr
const
getDeptDig
=
(
arr
:
any
)
=>
{
//数据处理 获取id是 1-id,2-id 前面1代表部门2代表人员 后面是原生ID
console
.
log
(
425
,
arr
)
data
.
DptDialogArr
=
arr
}
return
{
getCustomerList
,
getWayList
,
...
...
@@ -439,7 +455,10 @@ const CustomerModule = () => {
TransferMsg
,
AbandonMsg
,
setAbandon
,
delCustomer
delCustomer
,
getFile
,
getDeptDig
,
showdept
}
}
...
...
src/pages/customerManage/customer.vue
View file @
2246aa0e
...
...
@@ -36,7 +36,7 @@
<q-btn-dropdown
label=
"导入"
dense
color=
"primary"
>
<q-list>
<q-item>
<q-btn
unelevated
dense
label=
"导入个人客户"
@
click=
"data.showImport=true"
/>
<q-btn
unelevated
dense
label=
"导入个人客户"
@
click=
"data.showImport=true"
/>
</q-item>
<q-item>
<q-btn
unelevated
dense
label=
"导入企业客户"
/>
...
...
@@ -188,7 +188,48 @@
</q-card>
</q-dialog>
</q-page>
<importComponents
v-model=
"data.showImport"
></importComponents>
<importComponents
v-model=
"data.showImport"
@
confirm=
"getFile"
>
<
template
#
head
>
<q-tabs
v-model=
"data.importTab"
dense
class=
"text-grey"
align=
"left"
active-color=
"primary"
indicator-color=
"primary"
narrow-indicator
>
<q-tab
:name=
"1"
label=
"直接分配负责人"
/>
<q-tab
:name=
"2"
label=
"上传后再分配负责人"
/>
</q-tabs>
</
template
>
<
template
#
top
>
<div
v-if=
"data.importTab==1"
>
表格中需添加负责人“企微账号”
</div>
<div
v-if=
"data.importTab==2"
>
仅限于客户库可重复模式下使用
</div>
</
template
>
<
template
#
bottom
>
<div
class=
"full-width bottom-slot"
v-if=
"data.importTab==2"
>
<div
class=
"row no-wrap"
>
<div
class=
"col-1 add-dep-left"
>
分配员工:
</div>
<div
class=
"col-11"
>
<q-btn
outline
unelevated
size=
"14px"
color=
"primary"
label=
"选择"
class=
"q-mb-sm"
@
click=
"showdept"
/>
<div>
<q-chip
color=
"primary"
v-for=
"(item,index) in data.DptDialogArr"
:key=
"index"
text-color=
"white"
:icon=
"item.Type==1?'work':'person'"
:label=
"item.DeptName"
></q-chip>
</div>
</div>
</div>
<div
class=
"row no-wrap"
>
<div
class=
"col-1 add-dep-left"
>
分配规则:
</div>
<div
class=
"col-11"
>
<q-radio
dense
v-model=
"data.DistributionRule"
:val=
"1"
label=
" 按已选员工顺序依次轮流分配 "
class=
"q-mt-sm"
/><br/>
<q-radio
dense
v-model=
"data.DistributionRule"
:val=
"2"
label=
" 按已选员工随机分配 "
class=
"q-mt-sm"
/>
</div>
</div>
</div>
</
template
>
</importComponents>
<departmentStaff
v-model=
"data.showDptDialog"
nodeKey=
"newId"
labelKey=
"DeptName"
childrenKey=
"ChildList"
strategy=
"leaf"
:treeData=
"data.EmployeeList"
@
select=
"getDeptDig"
/>
</div>
</template>
<
script
lang=
"ts"
>
...
...
@@ -205,6 +246,7 @@
import
visibleColumns
from
'@/components/common/visibleColumns.vue'
import
labelgroup
from
'@/components/customer/label-group.vue'
import
importComponents
from
'@/components/common/import.vue'
import
departmentStaff
from
'@/components/common/departmentStaff.vue'
import
{
zhCN
,
dateZhCN
...
...
@@ -215,7 +257,8 @@
customRight
,
visibleColumns
,
labelgroup
,
importComponents
importComponents
,
departmentStaff
},
setup
()
{
useMeta
({
...
...
@@ -245,7 +288,10 @@
TransferMsg
,
AbandonMsg
,
setAbandon
,
delCustomer
delCustomer
,
getFile
,
getDeptDig
,
showdept
}
=
CustomerModule
()
let
isShowCustom
=
ref
(
false
)
const
closeCustomer
=
()
=>
{
...
...
@@ -291,7 +337,10 @@
TransferMsg
,
AbandonMsg
,
setAbandon
,
delCustomer
delCustomer
,
getFile
,
getDeptDig
,
showdept
}
}
})
...
...
@@ -330,27 +379,27 @@
color
:
#9999a8
;
}
:
:v-deep
.n-base-selection-label
{
:
deep
(
.n-base-selection-label
)
{
height
:
40px
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.05
);
border
:
none
!
important
;
}
:
:v-deep
.n-base-selection-input
{
:
deep
(
.n-base-selection-input
)
{
height
:
40px
;
display
:
flex
;
align-items
:
center
;
border
:
none
!
important
;
}
:
:v-deep
.n-input
{
:
deep
(
.n-input
)
{
height
:
100%
;
border
:
none
;
display
:
flex
;
align-items
:
center
;
}
:
:v-deep
.n-base-selection-tags
{
:
deep
(
.n-base-selection-tags
)
{
height
:
40px
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.05
);
}
...
...
@@ -359,5 +408,14 @@
background-color
:
#f6f6f6
;
border-radius
:
4px
;
}
.bottom-slot
{
border-top
:
1px
solid
#ccc
;
margin-top
:
20px
;
padding-top
:
35px
;
}
.add-dep-left
{
white-space
:
nowrap
;
min-width
:
76px
;
line-height
:
36px
;
}
</
style
>
src/utils/upload.ts
View file @
2246aa0e
...
...
@@ -28,7 +28,6 @@ export function UploadSelfFile(path, file, callback, configObj?) {
let
uploadConfig
:
any
=
{}
if
(
cacheInfo
.
UploadConfig
)
{
uploadConfig
=
JSON
.
parse
(
JSON
.
stringify
(
cacheInfo
.
UploadConfig
))
console
.
log
(
'上传配置'
,
uploadConfig
)
}
//获取文件扩展名
const
index
=
file
.
name
.
lastIndexOf
(
'.'
)
...
...
@@ -204,7 +203,6 @@ export function UploadFileToSystem(uploadConfig, fileFullPath, fileObj, uploadLo
tempArray
.
push
(
uploadConfig
.
CustomDomain
+
item
)
})
}
console
.
log
(
'obj'
,
fileObj
)
const
uploadResult
=
{
Code
:
1
,
Size
:
(
fileObj
.
size
/
1000
).
toFixed
(
2
)
+
'KB'
,
...
...
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