Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
hs-app-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
李星剑
hs-app-project
Commits
221fa0bc
Commit
221fa0bc
authored
3 years ago
by
李星剑
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add 款式委托
parent
6438f955
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
310 additions
and
579 deletions
+310
-579
hs-material-thumbnail.vue
...omponents/hs-material-thumbnail/hs-material-thumbnail.vue
+6
-1
colors.js
src/config/request/apiList/colors.js
+9
-0
orderTicket.js
src/config/request/apiList/orderTicket.js
+46
-0
apis.js
src/config/request/apis.js
+4
-0
addItem.vue
src/pages/designCommissioned/addItem.vue
+72
-472
list.vue
src/pages/designCommissioned/list.vue
+50
-82
listSelectToAdd.vue
src/pages/designCommissioned/listSelectToAdd.vue
+77
-24
dom.js
src/pages/designCommissioned/mixins/dom.js
+46
-0
No files found.
src/components/hs-material-thumbnail/hs-material-thumbnail.vue
View file @
221fa0bc
<
template
>
<
template
>
<view
class=
"home_con_content_order
u-m-t-30"
>
<view
class=
"home_con_content_order
"
@
click=
"click"
>
<image
style=
"width: 100%;height: 160rpx;"
src=
"@/static/images/home/1@2x.png"
mode=
""
></image>
<image
style=
"width: 100%;height: 160rpx;"
src=
"@/static/images/home/1@2x.png"
mode=
""
></image>
<view
class=
"order_tit"
>
<view
class=
"order_tit"
>
<view
class=
"u-flex justify-between u-font-32"
>
<view
class=
"u-flex justify-between u-font-32"
>
...
@@ -28,6 +28,11 @@ export default {
...
@@ -28,6 +28,11 @@ export default {
},
},
data
()
{
data
()
{
return
{};
return
{};
},
methods
:{
click
(){
this
.
$emit
(
"click"
)
}
}
}
}
}
</
script
>
</
script
>
...
...
This diff is collapsed.
Click to expand it.
src/config/request/apiList/colors.js
0 → 100644
View file @
221fa0bc
export
default
{
colors
:{
// 获取颜色组
getColors
:{
url
:
"/gdep-mdm/colour/selectColour"
,
method
:
"get"
,
}
}
}
This diff is collapsed.
Click to expand it.
src/config/request/apiList/orderTicket.js
0 → 100644
View file @
221fa0bc
// 委托单接口列表
let
base
=
"/gdep-plm/orderTicket"
export
default
{
orderTicket
:{
// 委托单详情
detail
:{
url
:
`
${
base
}
/detail`
,
method
:
'get'
},
// 新建委托单
save
:{
url
:
`
${
base
}
/save`
,
method
:
'post'
},
// 编辑委托单
update
:{
url
:
`
${
base
}
/update`
,
method
:
'post'
},
// 拆分委托单
split
:{
url
:
`
${
base
}
/split`
,
method
:
'post'
},
// 删除委托单
del
:{
url
:
`
${
base
}
/removeByIds`
,
method
:
'post'
},
// 取消发布
abolishByIds
:{
url
:
`
${
base
}
/abolishByIds`
,
method
:
'post'
},
// 确认寄样
sendSamplesByIds
:{
url
:
`
${
base
}
/sendSamplesByIds`
,
method
:
'post'
},
// 风格树
styleTreeList
:{
url
:
`
${
base
}
/styleTreeList`
,
method
:
'get'
}
}
}
This diff is collapsed.
Click to expand it.
src/config/request/apis.js
View file @
221fa0bc
...
@@ -4,11 +4,15 @@
...
@@ -4,11 +4,15 @@
import
user
from
'./apiList/user.js'
import
user
from
'./apiList/user.js'
import
auth
from
'./apiList/auth.js'
import
auth
from
'./apiList/auth.js'
import
plm
from
'./apiList/plm.js'
import
plm
from
'./apiList/plm.js'
import
color
from
'./apiList/colors.js'
import
orderTicket
from
'./apiList/orderTicket.js'
// import goods from './apiList/goods.js'
// import goods from './apiList/goods.js'
// import base from './apiList/base.js'
// import base from './apiList/base.js'
export
default
{
export
default
{
...
user
,
...
user
,
...
auth
,
...
auth
,
...
color
,
...
orderTicket
,
...
plm
...
plm
};
};
This diff is collapsed.
Click to expand it.
src/pages/designCommissioned/addItem.vue
View file @
221fa0bc
This diff is collapsed.
Click to expand it.
src/pages/designCommissioned/list.vue
View file @
221fa0bc
...
@@ -18,15 +18,16 @@
...
@@ -18,15 +18,16 @@
swiperWidth="750">
</u-tabs-swiper>
swiperWidth="750">
</u-tabs-swiper>
</view>
</view>
<!--状态栏 tab-->
<!--状态栏 tab-->
<view
v-if=
"!status[current].
status
"
>
<view
v-if=
"!status[current].
close
"
>
<view
class=
"list-tip u-flex u-p-r-30 u-p-l-30"
>
<view
class=
"list-tip u-flex u-p-r-30 u-p-l-30"
>
<text
class=
"u-flex-1"
>
全部总共
{{
totalNum
}}
款
</text>
<text
class=
"u-flex-1"
v-if=
"current === 3"
>
<text
class=
"u-flex-1"
v-if=
"current === 3"
>
已选中
{{
selectedLength
}}
款
已选中
{{
selectedLength
}}
款
</text>
</text>
<u-icon
name=
"close"
></u-icon>
<text
class=
"u-flex-1"
v-if=
"current !== 3"
>
{{
status
[
current
].
label
}}
总共
{{
totalNum
}}
款
</text>
<u-icon
name=
"close"
@
click=
"closeTip"
></u-icon>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -35,9 +36,7 @@
...
@@ -35,9 +36,7 @@
<view
v-for=
"(item,index) in data"
>
<view
v-for=
"(item,index) in data"
>
<view
class=
"u-flex u-p-t-12 u-p-b-12"
>
<view
class=
"u-flex u-p-t-12 u-p-b-12"
>
<text
class=
"u-flex-1"
>
<text
class=
"u-flex-1"
>
{{
item
.
label
}}
(20 款)
{{
item
.
label
}}
(
{{
item
.
children
.
length
}}
款)
<!--
{{
item
.
children
.
length
}}
-->
<!-- 款)-->
</text>
</text>
<text
class=
""
@
click=
"collapse(index)"
>
<text
class=
""
@
click=
"collapse(index)"
>
{{
activeIndex
===
index
?
'收起'
:
'展开'
}}
{{
activeIndex
===
index
?
'收起'
:
'展开'
}}
...
@@ -92,107 +91,76 @@
...
@@ -92,107 +91,76 @@
<
script
>
<
script
>
import
status
from
'./mixins/status'
import
status
from
'./mixins/status'
import
dom
from
'./mixins/dom'
import
HsTipTitle
from
"../../components/hs-tip-title/hs-tip-title"
;
import
HsTipTitle
from
"../../components/hs-tip-title/hs-tip-title"
;
export
default
{
export
default
{
name
:
"list"
,
name
:
"list"
,
components
:
{
HsTipTitle
},
components
:
{
HsTipTitle
},
mixins
:
[
status
],
mixins
:
[
status
,
dom
],
data
()
{
data
()
{
return
{
return
{
current
:
0
,
// tabs组件的current值,表示当前活动的tab选项
current
:
0
,
// tabs组件的current值,表示当前活动的tab选项
activeIndex
:
0
,
activeIndex
:
0
,
// data: ,
// data: ,
res
:
[]
,
//列表数据源
res
:
[
headerHeight
:
0
,
{
date
:
'12月11日'
,
title
:
'立领夹克'
,
status
:
1
},
footerHeight
:
0
{
date
:
'12月11日'
,
title
:
'立领夹克'
,
status
:
1
},
{
date
:
'12月10日'
,
title
:
'立领夹克1'
,
status
:
1
},
{
date
:
'12月10日'
,
title
:
'立领夹克1'
,
status
:
1
}
]
,
//列表数据源
};
};
},
},
computed
:{
computed
:{
data
(){
data
(){
return
[
function
arr2Tree
(
data
,
id
=
"colourGroup"
)
{
{
const
newList
=
[],
children
:
[
map
=
Array
.
from
(
{
new
Set
(
title
:
'立领夹克'
,
data
.
map
((
item
)
=>
{
status
:
1
return
item
[
id
];
},
})
{
)
title
:
'立领夹克'
,
);
status
:
1
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
},
let
item
=
data
[
i
],
{
name
=
item
[
id
],
title
:
'立领夹克'
,
index
=
map
.
indexOf
(
name
);
status
:
1
if
(
newList
[
index
])
{
},
newList
[
index
][
"children"
].
push
(
item
);
{
}
else
{
title
:
'立领夹克'
,
newList
.
push
({
status
:
1
label
:
name
,
},
children
:
[
item
]
{
});
title
:
'立领夹克'
,
}
status
:
1
},
],
label
:
'12月11日'
},
{
children
:
[
{
title
:
'立领夹克'
,
status
:
1
},
],
label
:
'12月10日'
}
}
]
return
newList
;
}
return
arr2Tree
(
this
.
res
,
"date"
);
},
},
totalNum
(){
totalNum
(){
let
res
=
this
.
data
.
reduce
((
total
,
item
)
=>
{
return
this
.
res
.
length
return
total
.
concat
(
item
.
children
)
},[]);
console
.
log
(
res
)
return
0
;
},
},
selectedLength
(){
selectedLength
(){
return
this
.
data
.
filter
return
this
.
res
.
filter
((
item
)
=>
{
return
item
.
status
==
1
}).
length
;
}
}
},
},
watch
:{
watch
:{
current
(){
current
(){
this
.
getHeaderHeight
();
this
.
getFooterHeight
();
this
.
getFooterHeight
();
}
}
},
},
mounted
()
{
this
.
uGetRect
(
"#header"
).
then
(
res
=>
{
this
.
headerHeight
=
res
.
height
;
})
},
methods
:
{
methods
:
{
getFooterHeight
(){
closeTip
(){
this
.
$nextTick
(()
=>
{
this
.
$set
(
this
.
status
,
this
.
current
,{
this
.
uGetRect
(
"#footer"
).
then
(
res
=>
{
...
this
.
status
[
this
.
current
],
this
.
footerHeight
=
res
.
height
||
0
;
close
:
true
})
})
},
uGetRect
(
selector
,
all
)
{
return
new
Promise
((
resolve
)
=>
{
uni
.
createSelectorQuery
()
.
in
(
this
)[
all
?
'selectAll'
:
'select'
](
selector
)
.
boundingClientRect
((
rect
)
=>
{
if
(
all
&&
Array
.
isArray
(
rect
)
&&
rect
.
length
)
{
resolve
(
rect
)
}
if
(
!
all
&&
rect
)
{
resolve
(
rect
)
}
if
(
rect
===
null
){
resolve
({})
}
})
.
exec
()
})
})
this
.
getHeaderHeight
()
},
},
collapse
(
index
){
collapse
(
index
){
this
.
activeIndex
=
this
.
activeIndex
===
index
?
null
:
index
;
this
.
activeIndex
=
this
.
activeIndex
===
index
?
null
:
index
;
...
...
This diff is collapsed.
Click to expand it.
src/pages/designCommissioned/listSelectToAdd.vue
View file @
221fa0bc
<!--新增委托-->
<!--新增委托-->
<
template
>
<
template
>
<view>
<view>
<view
id=
"header"
>
<!--新增委托navbar-->
<!--新增委托navbar-->
<u-navbar
title=
"新增委托"
<u-navbar
title=
"新增委托"
:border-bottom=
"false"
:border-bottom=
"false"
...
@@ -16,22 +17,27 @@
...
@@ -16,22 +17,27 @@
border-color=
"#e1e1e1"
height=
"76"
border-color=
"#e1e1e1"
height=
"76"
bg-color=
"#fff"
:show-action=
"false"
></u-search>
bg-color=
"#fff"
:show-action=
"false"
></u-search>
</view>
</view>
</view>
<!-- 列表 确定-->
<!-- 列表 确定-->
<view
class=
"u-p-30"
>
<view
class=
"u-p-30 body"
:style=
"{ bottom: footerHeight+ 'px', top: headerHeight + 'px' }"
>
<radio-group
style=
"width: 100%"
>
<view
v-for=
"(item, index) in list"
:key=
"item.id"
class=
"u-flex u-m-b-20"
>
<view
v-for=
"(item, index) in list"
:key=
"item.id"
class=
"u-flex u-m-b-20"
>
<view>
<view
class=
"u-m-r-30"
>
<radio
:value=
"item.value"
:checked=
"index === selectedIndex"
/>
<u-icon
:name=
"index === selectedIndex ? 'checkmark-circle-fill': 'checkmark-circle'"
color=
"#000"
size=
"40"
@
click=
"triggerSelectItem(index)"
/>
</view>
</view>
<hs-material-thumbnail
:item=
"item
"
></hs-material-thumbnail>
<hs-material-thumbnail
:item=
"item"
@
click=
"toMaterialDetail(item)
"
></hs-material-thumbnail>
</view>
</view>
</radio-group>
</view>
</view>
<!-- 底部按钮 确定-->
<!-- 底部按钮 确定-->
<view
class=
"footer"
id=
"footer"
>
<view
class=
"footer"
id=
"footer"
>
<view
class=
"footer-btn"
>
<view
class=
"footer-btn"
>
<!-- /* 以下形式在微信小程序会无效,APP和H5有效 */-->
<!-- /* 以下形式在微信小程序会无效,APP和H5有效 */-->
<u-button
class=
"custom-style"
shape=
"circle"
>
<u-button
:disabled=
"selectedIndex === -1"
@
click=
"toAddItem"
class=
"custom-style"
shape=
"circle"
>
确定
确定
</u-button>
</u-button>
</view>
</view>
...
@@ -40,16 +46,17 @@
...
@@ -40,16 +46,17 @@
</template>
</template>
<
script
>
<
script
>
import
dom
from
'./mixins/dom'
import
HsSelectItem
from
"../../components/hs-select-item/hs-select-item"
;
import
HsSelectItem
from
"../../components/hs-select-item/hs-select-item"
;
import
HsMaterialThumbnail
from
"../../components/hs-material-thumbnail/hs-material-thumbnail"
;
import
HsMaterialThumbnail
from
"../../components/hs-material-thumbnail/hs-material-thumbnail"
;
export
default
{
export
default
{
name
:
"listSelectToAdd"
,
name
:
"listSelectToAdd"
,
components
:
{
HsMaterialThumbnail
,
HsSelectItem
},
components
:
{
HsMaterialThumbnail
,
HsSelectItem
},
mixins
:[
dom
],
data
(){
data
(){
return
{
return
{
keyword
:
""
,
keyword
:
""
,
selectedIndex
:
""
,
selectedIndex
:
-
1
,
selectedItem
:
{},
list
:
[
list
:
[
{
{
title
:
'加厚荷兰绒绒布布料'
,
title
:
'加厚荷兰绒绒布布料'
,
...
@@ -59,12 +66,47 @@ export default {
...
@@ -59,12 +66,47 @@ export default {
title
:
'加厚荷兰绒绒布布料加厚荷兰绒绒布布料'
,
title
:
'加厚荷兰绒绒布布料加厚荷兰绒绒布布料'
,
id
:
12
id
:
12
},
},
{
title
:
'加厚荷兰绒绒布布料'
,
id
:
221
},
{
{
title
:
'加厚荷兰绒绒布布料'
,
title
:
'加厚荷兰绒绒布布料'
,
id
:
22
id
:
22
},
{
title
:
'加厚荷兰绒绒布布料'
,
id
:
224
},
{
title
:
'加厚荷兰绒绒布布料'
,
id
:
222
}
}
]
]
}
}
},
methods
:{
triggerSelectItem
(
index
){
this
.
selectedIndex
=
index
===
this
.
selectedIndex
?
-
1
:
index
;
},
// 跳转到新增详情页面
toAddItem
({
id
}){
this
.
$Router
.
push
({
path
:
"/pages/designCommissioned/addItem"
,
query
:{
id
}
})
},
// 跳转到面料详情
toMaterialDetail
({
id
}){
this
.
$Router
.
push
({
path
:
"/pages/home/fabricDetails"
,
query
:{
id
}
})
},
}
}
}
}
</
script
>
</
script
>
...
@@ -72,6 +114,17 @@ export default {
...
@@ -72,6 +114,17 @@ export default {
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
$h-color
:
#AF8D66
;
$h-color
:
#AF8D66
;
$main-color
:
#fff
;
$main-color
:
#fff
;
.body
{
position
:
absolute
;
width
:
100%
;
height
:
auto
;
left
:
0
;
right
:
0
;
bottom
:
0
;
top
:
0
;
overflow-y
:
auto
;
}
.title
{
.title
{
color
:
$h-color
;
color
:
$h-color
;
background-color
:
whitesmoke
;
background-color
:
whitesmoke
;
...
...
This diff is collapsed.
Click to expand it.
src/pages/designCommissioned/mixins/dom.js
0 → 100644
View file @
221fa0bc
export
default
{
data
(){
return
{
headerHeight
:
0
,
footerHeight
:
0
}
},
methods
:{
getHeaderHeight
(){
this
.
$nextTick
(()
=>
{
this
.
uGetRect
(
"#header"
).
then
(
res
=>
{
this
.
headerHeight
=
res
.
height
;
})
})
},
getFooterHeight
(){
this
.
$nextTick
(()
=>
{
this
.
uGetRect
(
"#footer"
).
then
(
res
=>
{
this
.
footerHeight
=
res
.
height
;
})
})
},
uGetRect
(
selector
,
all
)
{
return
new
Promise
((
resolve
)
=>
{
uni
.
createSelectorQuery
()
.
in
(
this
)[
all
?
'selectAll'
:
'select'
](
selector
)
.
boundingClientRect
((
rect
)
=>
{
if
(
all
&&
Array
.
isArray
(
rect
)
&&
rect
.
length
)
{
resolve
(
rect
)
}
if
(
!
all
&&
rect
)
{
resolve
(
rect
)
}
if
(
rect
===
null
){
resolve
({})
}
})
.
exec
()
})
},
},
mounted
()
{
this
.
getHeaderHeight
();
this
.
getFooterHeight
();
},
}
This diff is collapsed.
Click to expand it.
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