Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
project
Project
Project
Details
Activity
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
高宇
project
Commits
d9ae8300
Commit
d9ae8300
authored
May 05, 2019
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复未调通接口功能;
parent
35077b75
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
457 additions
and
17 deletions
+457
-17
index.ejs
index.ejs
+8
-0
addressBook.js
src/apis/addressBook.js
+8
-0
product.js
src/apis/product.js
+2
-2
list.vue
src/components/addressBook/list.vue
+21
-0
scheduleItem.vue
src/components/addressBook/scheduleItem.vue
+334
-0
keywordHeader.vue
src/components/common/keywordHeader.vue
+1
-1
productComponent.vue
src/components/products/productComponent.vue
+15
-6
operationProductComponent.vue
...s/products/productComponent/operationProductComponent.vue
+3
-0
productComponentTable.vue
...nents/products/productComponent/productComponentTable.vue
+17
-3
productSerieTable.vue
src/components/products/productSerie/productSerieTable.vue
+8
-0
prouductSerie.vue
src/components/products/prouductSerie.vue
+22
-5
route.js
src/route.js
+4
-0
addressBook.js
src/routes/addressBook.js
+14
-0
No files found.
index.ejs
View file @
d9ae8300
...
...
@@ -48,6 +48,14 @@
isRouteShow
:
1
,
title
:
"产品信息"
,
url
:
"/product"
},
{
appName
:
"addressBook"
,
icon
:
"fa-address-book"
,
id
:
1
,
isRouteShow
:
1
,
title
:
"通讯录"
,
url
:
"/addressBook"
}
],
homePage
:
{
...
...
src/apis/addressBook.js
0 → 100644
View file @
d9ae8300
export
default
{
getAddressBookList
:
{
url
:
'/vue/address-book/list'
},
getAddressBookFilter
:
{
url
:
'/vue/address-book/get-filter'
}
}
src/apis/product.js
View file @
d9ae8300
...
...
@@ -189,11 +189,11 @@ export default {
// 1 获取产品类别筛选
getProductComponentFilter
:
{
url
:
'/vue/product/get-filter-component'
url
:
'/vue/product/get-filter-
product-
component'
},
// 2 获取产品系列筛选
getProductSerieFilter
:
{
url
:
'/vue/product/get-filter-serie'
url
:
'/vue/product/get-filter-
product-
serie'
},
// 搜索供应商名称
...
...
src/components/addressBook/list.vue
0 → 100644
View file @
d9ae8300
<
template
>
<div>
</div>
</
template
>
<
script
>
export
default
{
name
:
''
,
data
()
{
return
{}
},
methods
:
{},
created
()
{
}
}
</
script
>
<
style
scoped
>
</
style
>
src/components/addressBook/scheduleItem.vue
0 → 100644
View file @
d9ae8300
<
template
>
<section
class=
"client-schedule-item"
>
<el-row
class=
"client-schedule-row"
>
<el-col
:span=
"4"
:xs=
"24"
class=
"client-schedule-left"
:style=
"
{'background-color': item.bgcolor}">
<el-row
:gutter=
"10"
>
<el-col
:span=
"24"
class=
"entity-name"
>
<i
class=
"fa fa-fw fa-star"
aria-hidden=
"true"
></i>
<a
@
click=
"toView(item)"
v-if=
"Object.keys(item.client).length > 0"
>
{{
item
.
client
.
name
}}
</a>
<span
v-else
>
客户名称
{{
noneText
}}
</span>
</el-col>
<el-col
:span=
"12"
class=
"entity-name"
v-if=
"Object.keys(item.createdBy).length > 0"
>
<img
class=
"user-avatar rounded-circle"
:src=
"item.createdBy.avatar.name"
>
<span
class=
"black"
>
{{
item
.
createdBy
.
name
}}
</span>
</el-col>
<el-col
:span=
"12"
v-else
><i
class=
"fa fa-fw fa-user"
></i>
{{
noneText
}}
</el-col>
</el-row>
</el-col>
<el-col
:span=
"20"
:xs=
"24"
class=
"client-schedule-right"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"6"
:xs=
"24"
class=
"show-picture"
>
合同编号:
<span>
{{
item
.
serial_no
!==
''
?
item
.
serial_no
:
noneText
}}
</span>
</el-col>
<el-col
:span=
"6"
:xs=
"24"
>
<span
class=
"border border-info text-info rounded px-1"
>
总额
</span>
:
¥
{{
item
.
amount
!==
''
?
item
.
amount
:
noneText
}}
</el-col>
<el-col
:span=
"6"
:xs=
"24"
>
客户经理:
{{
item
.
salesRep
}}
</el-col>
<el-col
:span=
"6"
:xs=
"24"
>
签订日期:
<span
class=
"date-time"
>
{{
item
.
signed_at
!==
''
?
item
.
signed_at
:
noneText
}}
</span>
</el-col>
</el-row>
<el-row
:gutter=
"10"
>
<el-col
:span=
"6"
:xs=
"24"
>
项目名称:
<a
href=
"javascript:;"
size=
"mini"
@
click
.
prevent
.
stop=
"showProject(item.project)"
v-if=
"Object.keys(item.project).length > 0"
>
{{
Object
.
keys
(
item
.
project
).
length
>
0
?
item
.
project
.
name
:
noneText
}}
</a>
<span
v-else
>
{{
noneText
}}
</span>
</el-col>
<el-col
:span=
"6"
:xs=
"24"
>
合同类型:
<span
class=
"border border-info text-info rounded px-1"
v-if=
"item.contract_type !== ''"
>
{{
[
'产品销售'
,
'运维服务'
][
parseInt
(
item
.
contract_type
)
-
1
]
}}
</span>
<span
v-else
>
{{
noneText
}}
</span>
</el-col>
<el-col
:span=
"6"
:xs=
"24"
>
上传合同:
<a
:href=
"getScanUrl(item, 'contractScan')"
target=
"_blank"
v-if=
"Object.keys(item.contractScan).length > 0"
>
<i
class=
"fa fa-fw fa-file-pdf-o"
></i>
</a>
<span
v-else
class=
"text-danger"
>
扫描件待上传
</span>
</el-col>
<el-col
:span=
"6"
:xs=
"24"
>
上传签收单:
<a
:href=
"getScanUrl(item, 'receiptScan')"
target=
"_blank"
v-if=
"Object.keys(item.receiptScan).length > 0"
>
<i
class=
"fa fa-fw fa-file-image-o"
></i>
</a>
<span
v-else
class=
"text-danger"
>
扫描件待上传
</span>
</el-col>
</el-row>
<el-row
:gutter=
"10"
>
<el-col
:span=
"6"
:xs=
"24"
>
<span
class=
"border border-danger text-danger rounded px-1"
>
服务截止日期
</span>
:
{{
item
.
expire_date
!==
''
?
item
.
expire_date
:
noneText
}}
</el-col>
<el-col
:span=
"6"
:xs=
"24"
>
<span
class=
"border border-danger text-danger rounded px-1"
>
下次巡检日期
</span>
:
{{
item
.
remind_date
!==
''
?
item
.
remind_date
:
noneText
}}
</el-col>
<el-col
:span=
"6"
:xs=
"24"
>
<span
class=
"border border-danger text-danger rounded px-1"
>
SLA
</span>
:
{{
item
.
sla
!==
''
?
item
.
sla
:
noneText
}}
</el-col>
</el-row>
<el-row
:gutter=
"10"
>
<el-col
:span=
"12"
:xs=
"24"
>
<span
class=
"border border-danger text-danger rounded px-1"
>
备注
</span>
:
{{
item
.
description
!==
''
?
item
.
description
:
noneText
}}
</el-col>
<el-col
:span=
"12"
:xs=
"24"
>
<slot
name=
"opearate"
>
</slot>
</el-col>
</el-row>
</el-col>
</el-row>
</section>
</
template
>
<
script
>
export
default
{
name
:
'scheduleItem'
,
props
:
{
item
:
Object
},
data
()
{
return
{
noneText
:
'(未设置)'
}
},
methods
:
{
showProject
(
project
)
{
this
.
$emit
(
'update:showProject'
,
project
)
},
splitFileName
(
text
)
{
var
pattern
=
/
\.{1}[
a-z
]{1,}
$/
if
(
pattern
.
exec
(
text
)
!==
null
)
{
return
(
text
.
slice
(
0
,
pattern
.
exec
(
text
).
index
))
}
else
{
return
text
}
},
getScanUrl
(
item
,
key
)
{
let
names
=
item
[
key
].
name
.
split
(
'/'
)
let
name
=
names
[
names
.
length
-
1
]
return
'/attachment/view?name='
+
this
.
splitFileName
(
name
)
},
setBr
(
text
)
{
if
(
text
===
''
)
{
return
this
.
noneText
}
else
{
return
text
.
replace
(
/
\n
/g
,
'<br />'
)
}
},
toView
(
item
)
{
this
.
$router
.
push
({
app
:
'client'
,
name
:
'viewClient'
,
params
:
{
id
:
item
.
client_id
}
})
},
toDetailView
(
item
)
{
this
.
$router
.
push
({
app
:
'salesOrders'
,
name
:
'salesOrderView'
,
params
:
{
id
:
item
.
id
}
})
}
},
computed
:
{
isNullClient
()
{
return
!
this
.
item
.
client
},
isPublic
()
{
return
!!
this
.
item
.
is_public
}
},
mounted
()
{
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.text-info
{
color
:
#17a2b8
!
important
;
}
.border-info
{
border-color
:
#17a2b8
!
important
;
}
.colRed
{
color
:
red
;
border
:
1px
solid
red
;
}
.colGreen
{
color
:
green
;
border
:
1px
solid
green
;
}
.colRed
,
.colGreen
,
.col
{
border-radius
:
.25rem
;
padding
:
0
.25rem
;
}
.rounded-circle
{
border-radius
:
50%
!
important
;
}
.user-avatar
{
width
:
16px
;
max-width
:
16px
;
height
:
16px
;
max-height
:
16px
;
}
@include
c
(
'schedule-item'
)
{
margin-bottom
:
10px
;
font-size
:
12px
;
.border
{
border
:
1px
solid
#dee2e6
;
}
.border-success
{
border-color
:
#28a745
!
important
;
}
.border-danger
{
border-color
:
#dc3545
;
}
.text-success
{
color
:
#28a745
!
important
;
}
.text-danger
{
color
:
#E45744
;
}
.rounded
{
border-radius
:
.25rem
!
important
;
}
.px-1
{
padding
:
0
.25rem
;
}
}
@include
c
(
'schedule-item:first-child'
)
{
.client-schedule-left
{
border-radius
:
5px
0
0
0
;
}
}
@include
c
(
'schedule-row'
)
{
background-color
:
white
;
display
:
flex
;
flex-wrap
:
wrap
;
}
@include
c
(
'schedule-left'
)
{
background-color
:
#FF6A6A
;
min-height
:
100%
;
padding
:
10px
15px
6px
;
.fa-fw
{
width
:
1
.28571429em
;
}
>
.el-row
{
>
.el-col
{
margin-bottom
:
4px
;
}
}
.el-row
div
:first-child
,
.el-row
div
:first-child
a
,
.entity-name
,
.entity-name
a
{
color
:
white
;
}
.entity-name
.black
{
color
:
#000000
;
}
span
{
display
:
inline-block
;
padding-left
:
3px
;
}
span
.np
{
padding-left
:
0
;
}
@include
e
(
'private'
)
{
display
:
inline-block
;
// border: 1px solid black;
padding-right
:
5px
;
border-radius
:
5px
;
width
:
40px
;
height
:
20px
;
}
}
@include
c
(
'schedule-right'
)
{
height
:
100%
;
padding
:
10px
15px
6px
;
>
.el-row
{
>
.el-col
{
margin-bottom
:
4px
;
.el-button
{
margin
:
0
2px
;
padding
:
7px
;
}
.date-time
,
.show-picture
{
color
:
#649FD7
;
}
.show-picture
{
cursor
:
pointer
;
}
}
}
.badge
{
border-radius
:
2px
;
color
:
#333744
;
background
:
#ffffff
;
vertical-align
:
baseline
;
display
:
inline
;
padding
:
2px
6px
;
text-align
:
center
;
}
span
.badge-unread
{
&
:hover
{
border-color
:
#de321d
}
color
:
#fff
;
background-color
:
#e54c3a
;
border-color
:
#a32516
}
@include
e
(
'item'
)
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-around
;
padding
:
5px
0
5px
5px
;
flex
:
1
;
}
@include
e
(
'status'
)
{
color
:
red
;
}
@include
e
(
'content'
)
{
display
:
inline-block
;
border
:
1px
solid
red
;
border-radius
:
5px
;
height
:
20px
;
padding
:
0
5px
0
5px
;
color
:
red
;
}
}
</
style
>
src/components/common/keywordHeader.vue
View file @
d9ae8300
...
...
@@ -4,7 +4,7 @@
<div
class=
"pull-right search-form"
>
<el-form-item
v-if=
"searchKey"
>
<el-input
size=
"mini"
v-model=
"model[(searchKey + '[' + keyCode + ']')]"
placeholder=
"关键词"
>
<el-button
slot=
"append"
type=
"primary"
@
click=
"searchKeyword"
>
搜索
</el-button>
<el-button
slot=
"append"
type=
"primary"
@
click=
"searchKeyword
()
"
>
搜索
</el-button>
</el-input>
</el-form-item>
<el-form-item
v-if=
"searchKey"
>
...
...
src/components/products/productComponent.vue
View file @
d9ae8300
...
...
@@ -5,7 +5,7 @@
title=
"设置类别"
:title-span=
"6"
:model=
"form"
search-key=
"
SearchForm
"
search-key=
"
ProductComponents
"
key-code=
"keyword"
type=
"keyword"
button-title=
"新建产品类别 "
...
...
@@ -14,7 +14,11 @@
:search-keyword=
"searchKeyword"
></client-header>
<div
class=
"page-body-content"
>
<children-nav></children-nav>
<product-component-table
ref=
"productComponentTable"
:table-list=
"result.list"
:product-type=
"productType"
:loading=
"loading"
>
<product-component-table
ref=
"productComponentTable"
@
update:list=
"form =>
{updateTable(form)}"
:table-list="result.list"
:product-type="productType"
:loading="loading">
<template
slot=
"operationTable"
slot-scope=
"scope"
>
<el-button
type=
"primary"
...
...
@@ -66,7 +70,7 @@
operationPage
:
''
,
operationTitle
:
''
,
form
:
{
'
SearchForm
[keyword]'
:
''
'
ProductComponents
[keyword]'
:
''
},
result
:
{
list
:
[]
...
...
@@ -93,6 +97,7 @@
Object
.
keys
(
this
.
form
).
forEach
(
item
=>
{
this
.
form
[
item
]
=
''
})
this
.
$refs
.
productComponentTable
.
resetForm
()
this
.
getList
()
},
addNewProductComponent
()
{
...
...
@@ -109,8 +114,12 @@
this
.
$refs
.
sidePopup
.
show
(
this
.
$refs
[
this
.
operationPage
].
initEdit
(
id
))
})
},
updateTable
(
form
)
{
this
.
subForm
=
Object
.
assign
({},
this
.
subForm
,
this
.
form
,
form
)
this
.
getList
()
},
updateForm
(
form
)
{
this
.
subForm
=
Object
.
assign
({},
this
.
form
,
form
)
this
.
subForm
=
Object
.
assign
({},
this
.
subForm
,
this
.
form
,
form
)
this
.
getList
()
},
searchKeyword
(
search
)
{
...
...
@@ -160,7 +169,7 @@
this
.
loading
=
true
requestAPI
(
api
.
getProductComponentList
,
{
data
:
{
...
Object
.
assign
({},
this
.
form
,
this
.
subForm
),
...
Object
.
assign
({},
this
.
subForm
),
page
:
this
.
pagenation
.
page
}
}).
then
(
res
=>
{
...
...
@@ -179,7 +188,7 @@
},
created
()
{
requestAPI
(
api
.
getProductComponentFilter
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
productType
=
res
.
options
[
'ProductComponents[product_type]'
].
value
})
this
.
getList
()
}
...
...
src/components/products/productComponent/operationProductComponent.vue
View file @
d9ae8300
...
...
@@ -135,6 +135,9 @@
initAdd
()
{
requestAPI
(
api
.
getNewProductComponent
).
then
(
res
=>
{
this
.
ProductComponents
.
order
=
res
.
nextOrder
Object
.
keys
(
res
.
options
).
forEach
(
item
=>
{
this
.
$set
(
this
.
options
,
item
,
res
.
options
[
item
])
})
})
},
initEdit
(
id
)
{
...
...
src/components/products/productComponent/productComponentTable.vue
View file @
d9ae8300
...
...
@@ -26,7 +26,7 @@
label=
"产品分类"
>
<template
slot=
"header"
slot-scope=
"scope"
>
<div
style=
"line-height: 18px;"
>
产品分类
</div>
<el-select
v-model=
"form
.productType
"
placeholder=
"请选择"
size=
"mini"
>
<el-select
v-model=
"form
['ProductComponents[product_type]']
"
placeholder=
"请选择"
size=
"mini"
>
<el-option
v-for=
"item in productType"
:key=
"item.id"
...
...
@@ -60,7 +60,7 @@
data
()
{
return
{
form
:
{
productType
:
''
'ProductComponents[product_type]'
:
''
}
}
},
...
...
@@ -69,9 +69,23 @@
if
(
rowIndex
%
2
===
0
)
{
return
'stripe-class'
}
},
resetForm
()
{
Object
.
keys
(
this
.
form
).
forEach
(
item
=>
{
this
.
form
[
item
]
=
''
})
}
},
props
:
[
'tableList'
,
'productType'
,
'loading'
]
props
:
[
'tableList'
,
'productType'
,
'loading'
],
watch
:
{
form
:
{
handler
(
val
)
{
console
.
log
(
val
)
this
.
$emit
(
'update:list'
,
val
)
},
deep
:
true
}
}
}
</
script
>
...
...
src/components/products/productSerie/productSerieTable.vue
View file @
d9ae8300
...
...
@@ -99,6 +99,14 @@
if
(
rowIndex
%
2
===
0
)
{
return
'stripe-class'
}
},
resetComponent
()
{
this
.
form
.
productComponent
=
''
},
resetForm
()
{
Object
.
keys
(
this
.
form
).
forEach
(
item
=>
{
this
.
form
[
item
]
=
''
})
}
},
props
:
[
'tableList'
,
'productComponent'
,
'productType'
,
'productBrand'
,
'loading'
],
...
...
src/components/products/prouductSerie.vue
View file @
d9ae8300
...
...
@@ -5,7 +5,7 @@
title=
"设置系列"
:title-span=
"6"
:model=
"form"
search-key=
"
SearchForm
"
search-key=
"
ProductSeries
"
key-code=
"keyword"
type=
"keyword"
button-title=
"新建产品系列 "
...
...
@@ -14,11 +14,12 @@
:search-keyword=
"searchKeyword"
></client-header>
<div
class=
"page-body-content"
>
<children-nav></children-nav>
<product-Serie-table
ref=
"product
Component
Table"
<product-Serie-table
ref=
"product
Serie
Table"
:table-list=
"result.list"
:product-type=
"productType"
:product-component=
"productComponent"
:product-brand=
"productBrand"
@
update:form=
"val =>
{updateForm(val)}"
:product-brand=
"productBrand"
@
update:form=
"val =>
{updateForm(val)}"
:loading="loading">
<template
slot=
"operationTable"
slot-scope=
"scope"
>
<el-button
...
...
@@ -72,7 +73,7 @@
operationPage
:
''
,
operationTitle
:
''
,
form
:
{
'
SearchForm
[keyword]'
:
''
'
ProductSeries
[keyword]'
:
''
},
result
:
{
list
:
[]
...
...
@@ -101,6 +102,8 @@
Object
.
keys
(
this
.
form
).
forEach
(
item
=>
{
this
.
form
[
item
]
=
''
})
this
.
productComponent
=
[]
this
.
$refs
.
productSerieTable
.
resetForm
()
this
.
getList
()
},
addNewProductSerie
()
{
...
...
@@ -118,7 +121,19 @@
})
},
updateForm
(
form
)
{
if
(
form
.
productType
!==
''
&&
form
.
productType
!==
this
.
subForm
.
productType
)
{
requestAPI
(
api
.
getProductComponent
,
{
data
:
{
product_type
:
form
.
productType
}
}).
then
(
res
=>
{
this
.
$refs
.
productSerieTable
.
resetComponent
()
this
.
productComponent
=
[]
this
.
productComponent
=
res
})
}
this
.
subForm
=
Object
.
assign
({},
this
.
form
,
form
)
console
.
log
(
this
.
subForm
)
this
.
getList
()
},
searchKeyword
(
search
)
{
...
...
@@ -187,7 +202,9 @@
},
created
()
{
requestAPI
(
api
.
getProductSerieFilter
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
productType
=
res
.
options
[
'ProductSeries[product_type]'
].
value
this
.
productBrand
=
res
.
options
[
'ProductSeries[product_brand]'
].
value
this
.
productComponent
=
res
.
options
[
'ProductSeries[product_component]'
].
value
})
this
.
getList
()
}
...
...
src/route.js
View file @
d9ae8300
...
...
@@ -4,6 +4,7 @@ import ElementRoute from './routes/project'
import
salesOrder
from
'./routes/salesOrders'
import
salesContracts
from
'./routes/salesContracts'
import
products
from
'./routes/products'
import
address
from
'./routes/addressBook'
let
routes
=
[]
let
salesRours
=
[]
const
appName
=
'project'
...
...
@@ -23,6 +24,9 @@ let RouterInit = () => {
portal
.
createApp
(
'products'
,
{},
app
=>
{
app
.
mapRoute
(
products
)
})
portal
.
createApp
(
'addressBook'
,
{},
app
=>
{
app
.
mapRoute
(
address
)
})
}
export
default
RouterInit
src/routes/addressBook.js
0 → 100644
View file @
d9ae8300
import
addressBookList
from
'../components/addressBook/list'
const
projectTitle
=
'金畅逍BMS - '
const
routes
=
[
{
path
:
'/addressBook'
,
name
:
'addressBookList'
,
component
:
addressBookList
,
meta
:
{
title
:
projectTitle
+
'通讯录'
}
}
]
export
default
routes
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