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
81af981c
Commit
81af981c
authored
Dec 02, 2021
by
阮藤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
相关接口对接完成
parent
8fa8b70b
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
357 additions
and
58 deletions
+357
-58
orderTicket.js
src/config/request/apiList/orderTicket.js
+17
-2
plm.js
src/config/request/apiList/plm.js
+1
-1
dom.js
src/mixins/dom.js
+46
-0
fabricList.vue
src/pages/home/fabricList.vue
+24
-3
index.vue
src/pages/home/index.vue
+39
-29
sampleConfirmation.vue
src/pages/home/sampleConfirmation.vue
+12
-3
styleEntrustment.vue
src/pages/home/styleEntrustment.vue
+217
-19
common.scss
src/static/style/common.scss
+1
-1
No files found.
src/config/request/apiList/orderTicket.js
View file @
81af981c
...
...
@@ -25,7 +25,7 @@ export default {
// 删除委托单
del
:{
url
:
`
${
base
}
/removeByIds`
,
method
:
'
post
'
method
:
'
DELETE
'
},
// 取消发布
abolishByIds
:{
...
...
@@ -41,6 +41,21 @@ export default {
styleTreeList
:{
url
:
`
${
base
}
/styleTreeList`
,
method
:
'get'
}
},
// 委托单列表
entrustmentPage
:{
url
:
`
${
base
}
/page`
,
method
:
'get'
},
// 委托单待寄样列表
noSampleOrder
:{
url
:
`
${
base
}
/noSampleOrder`
,
method
:
'get'
},
// 我的面料列表
materialList
:{
url
:
`
${
base
}
/materialList`
,
method
:
'get'
},
}
}
src/config/request/apiList/plm.js
View file @
81af981c
...
...
@@ -10,7 +10,7 @@ export default {
},
abolishByIds
:
{
url
:
'/gdep-plm/orderTicket/abolishByIds'
,
method
:
"
ge
t"
method
:
"
pu
t"
},
}
}
src/mixins/dom.js
0 → 100644
View file @
81af981c
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
();
},
}
src/pages/home/fabricList.vue
View file @
81af981c
...
...
@@ -6,20 +6,41 @@
<u-sticky
offset-top=
"15"
>
<u-search
class=
""
bg-color=
"#fff"
border-color=
"#ececec"
placeholder=
"请输入面料名称"
:show-action=
"false"
v-model=
"search"
></u-search>
</u-sticky>
<view><fabricTitle
:tableData=
"table"
></fabricTitle></view>
<view>
<view
class=
"u-m-t-30"
v-for=
"item in fiabricList"
><fabricTitle
:item=
"item"
></fabricTitle></view>
</view>
</view>
</view>
</
template
>
<
script
>
import
fabricTitle
from
'
./components/fabricTitle
.vue'
;
import
fabricTitle
from
'
@/components/hs-material-thumbnail/hs-material-thumbnail
.vue'
;
export
default
{
components
:
{
fabricTitle
},
data
()
{
return
{
search
:
''
,
table
:
[
1
,
2
,
3
,
4
]
fiabricList
:
[
]
};
},
onLoad
()
{
this
.
materialList
();
},
methods
:
{
// 我的面料
materialList
()
{
this
.
$http
(
'orderTicket.materialList'
,
{
size
:
4
,
materialCode
:
''
,
materialName
:
this
.
search
}).
then
(
res
=>
{
let
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
this
.
fiabricList
.
concat
(
data
);
// this.fiabricList = [1, 2];
}
});
}
}
};
</
script
>
...
...
src/pages/home/index.vue
View file @
81af981c
...
...
@@ -11,8 +11,8 @@
</view>
<!-- 按钮 -->
<view
class=
"home_btn"
>
<view
class=
""
v-for=
"item in buts"
>
<image
class=
"
img
"
:src=
"item.img"
mode=
""
></image>
<view
class=
""
v-for=
"item in buts"
@
click=
"goCli(item.url)"
>
<image
class=
"
hs-img-56
"
:src=
"item.img"
mode=
""
></image>
<view
class=
"u-m-t-8"
>
{{
item
.
name
}}
</view>
</view>
</view>
...
...
@@ -35,7 +35,8 @@
</view>
<view
class=
"home_con_fabric"
>
<view
class=
"home_con_content u-m-t-24"
@
click=
"detailFabric(item)"
v-for=
"item in fiabricList"
>
<view
class=
"home_con_content_font ov_hiden"
>
{{
item
.
name
}}
</view>
<image
class=
"hs-img"
:src=
"item.fileCode"
mode=
""
></image>
<view
class=
"home_con_content_font ov_hiden"
>
{{
item
.
materialName
}}
</view>
</view>
</view>
</view>
...
...
@@ -77,36 +78,28 @@ export default {
quantityNum
:
0
,
exceptionNum
:
0
,
abolishIds
:
[],
fiabricList
:
[
{
name
:
'加厚荷兰绒绒布布料布布料布布料布'
},
{
name
:
'加厚荷兰绒绒布布料布布料布'
},
{
name
:
'加厚荷兰绒绒布布料布布料布'
},
{
name
:
'加厚荷兰绒绒布布料布'
}
],
// 我的面料
fiabricList
:
[],
buts
:
[
{
name
:
'面料建模'
,
img
:
'../../static/images/home/fabricModeling@2x.png'
img
:
'../../static/images/home/fabricModeling@2x.png'
,
url
:
''
},
{
name
:
'款式委托'
,
img
:
'../../static/images/home/styleEntrustment@2x.png'
img
:
'../../static/images/home/styleEntrustment@2x.png'
,
url
:
'/pages/home/styleEntrustment'
},
{
name
:
'检测委托'
,
img
:
'../../static/images/home/styleManageme@2x.png'
img
:
'../../static/images/home/styleManageme@2x.png'
,
url
:
''
},
{
name
:
'款式管理'
,
img
:
'../../static/images/home/testCommission@2x.png'
img
:
'../../static/images/home/testCommission@2x.png'
,
url
:
''
}
]
};
...
...
@@ -114,9 +107,11 @@ export default {
onLoad
()
{
this
.
toBeSelectedQuantity
();
this
.
orderTicketExceptionNum
();
this
.
abolishByIds
();
this
.
noSampleOrder
();
this
.
materialList
();
},
methods
:
{
// 选款总数
toBeSelectedQuantity
()
{
this
.
$http
(
'plm.toBeSelectedQuantity'
,
{}).
then
(
res
=>
{
let
{
code
,
data
}
=
res
;
...
...
@@ -125,6 +120,7 @@ export default {
}
});
},
// 异常总数
orderTicketExceptionNum
()
{
this
.
$http
(
'plm.orderTicketExceptionNum'
,
{}).
then
(
res
=>
{
let
{
code
,
data
}
=
res
;
...
...
@@ -133,14 +129,29 @@ export default {
}
});
},
abolishByIds
()
{
this
.
$http
(
'plm.abolishByIds'
,
{}).
then
(
res
=>
{
// 寄样单总数
noSampleOrder
()
{
this
.
$http
(
'orderTicket.noSampleOrder'
,
{}).
then
(
res
=>
{
let
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
this
.
abolishIds
=
data
;
}
});
},
// 我的面料
materialList
()
{
this
.
$http
(
'orderTicket.materialList'
,
{
size
:
4
,
materialCode
:
''
,
materialName
:
''
}).
then
(
res
=>
{
let
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
this
.
fiabricList
=
data
;
// this.fiabricList = [1,2];
}
});
},
searchCli
()
{
this
.
$Router
.
push
(
'/pages/home/search'
);
},
...
...
@@ -155,6 +166,9 @@ export default {
},
entrustmentCli
()
{
this
.
$Router
.
push
(
'/pages/home/styleEntrustment'
);
},
goCli
(
url
)
{
this
.
$router
.
push
(
url
);
}
}
};
...
...
@@ -234,7 +248,7 @@ export default {
height
:
160rpx
;
border-radius
:
8rpx
;
overflow
:
hidden
;
background-image
:
url(../../static/images/home/1@2x.png)
;
//
background-image: url(../../static/images/home/1@2x.png);
.home_con_content_font
{
position
:
absolute
;
bottom
:
0
;
...
...
@@ -275,10 +289,6 @@ export default {
height
:
50rpx
;
border
:
1rpx
solid
#fff
;
}
.img
{
width
:
56rpx
;
height
:
56rpx
;
}
.color_000
{
color
:
rgba
(
0
,
0
,
0
,
0
.2
);
}
...
...
src/pages/home/sampleConfirmation.vue
View file @
81af981c
...
...
@@ -36,7 +36,7 @@
<span
class=
"u-font-28"
>
所选面料
</span>
<span
class=
"u-font-24 color_DDA973"
>
(新建面料,已同步面料建模)
</span>
</view>
<fabricTitle
:
tableData
=
"tableData"
></fabricTitle>
<fabricTitle
:
item
=
"tableData"
></fabricTitle>
</view>
</view>
</view>
...
...
@@ -45,7 +45,7 @@
</
template
>
<
script
>
import
fabricTitle
from
'
./components/fabricTitle
.vue'
;
import
fabricTitle
from
'
@/components/hs-material-thumbnail/hs-material-thumbnail
.vue'
;
export
default
{
components
:
{
fabricTitle
},
data
()
{
...
...
@@ -54,10 +54,19 @@ export default {
total
:
12
,
// 当前数
sum
:
12
,
tableData
:
[
1
]
tableData
:
{}
};
},
onLoad
(){
this
.
detail
()
},
methods
:
{
detail
(){
// this.$http('orderTicket.detail',1).then(res => {
// let { code,data } = res
// this.a = data
// })
},
previousCli
()
{
if
(
this
.
sum
==
1
)
return
;
this
.
sum
==
--
this
.
sum
;
...
...
src/pages/home/styleEntrustment.vue
View file @
81af981c
<
template
>
<!-- 款式委托 -->
<view
class=
""
style=
"position: relative;"
>
<u-navbar
:is-back=
"true"
:background=
"
{ backgroundColor: '#F5F5F5' }" title="款式委托">
<!-- style="position: relative;" -->
<view
class=
""
>
<u-navbar
:is-back=
"true"
id=
"header"
:background=
"
{ backgroundColor: '#F5F5F5' }" title="款式委托">
<template
v-slot:right
>
<view
class=
"u-m-r-24"
><u-icon
name=
"search"
size=
"38"
></u-icon></view>
</
template
>
</u-navbar>
<view
class=
"bg_img"
></view>
<view
class=
"content"
>
<view
class=
"content"
:style=
"{ bottom: footerHeight + 'px', top: headerHeight + 'px' }"
>
<!-- 总数 -->
<view
class=
"u-m-b-30 entrus_sum u-flex justify-around text-center"
>
<view
class=
""
@
click=
"
tabsCli
(1)"
>
<view
class=
"color_FA5353 u-font-48 hs-weight-500"
>
123
</view>
<view
class=
""
@
click=
"
change
(1)"
>
<view
class=
"color_FA5353 u-font-48 hs-weight-500"
>
{{ exceptionNum }}
</view>
<view
class=
"color_AF8D66 u-font-28 hs-weight-500"
>
异常
</view>
</view>
<view
class=
"split_line"
></view>
<view
class=
""
@
click=
"
tabsCli
(5)"
>
<view
class=
"u-font-48 hs-weight-500"
>
123
</view>
<view
class=
""
@
click=
"
change
(5)"
>
<view
class=
"u-font-48 hs-weight-500"
>
{{ abolishIds }}
</view>
<view
class=
"color_AF8D66 u-font-28 hs-weight-500"
>
待寄样
</view>
</view>
<view
class=
"split_line"
></view>
<view
class=
""
@
click=
"
tabsCli
(6)"
>
<view
class=
"u-font-48 hs-weight-500"
>
123
</view>
<view
class=
""
@
click=
"
change
(6)"
>
<view
class=
"u-font-48 hs-weight-500"
>
{{ quantityNum }}
</view>
<view
class=
"color_AF8D66 u-font-28 hs-weight-500"
>
待选款
</view>
</view>
</view>
...
...
@@ -32,40 +33,71 @@
<!-- list -->
<view
class=
"u-m-t-20 u-m-l-30 u-m-r-30 u-m-b-20"
>
<!-- v-for -->
<view
class=
"u-m-b-20 posi_rela bd_rad1 u-p-30"
v-for=
"
(item, index) in 3
"
style=
"background: #fff;"
>
<view
class=
"u-m-b-20 posi_rela bd_rad1 u-p-30"
v-for=
"
item in entrustmentList"
:key=
"item.id
"
style=
"background: #fff;"
>
<view
class=
"u-m-b-30 u-flex justify-between"
>
<view
class=
"entrus_list_title u-font-32"
>
加厚荷兰绒绒布布料
</view>
<view
class=
"u-font-28"
>
2天无人接单
</view>
<view
class=
"entrus_list_title u-font-32"
>
{{ item.materialName }}
</view>
<view
class=
"u-font-28"
>
{{ item.status | filterStatus }}
</view>
</view>
<view
class=
"dis_flex"
>
<image
style=
"width: 160rpx;height:160rpx;"
src=
"@/static/images/home/1@2x.png
"
mode=
""
></image>
<image
style=
"width: 160rpx;height:160rpx;"
:src=
"`${item.fileCode}`
"
mode=
""
></image>
<view
class=
"u-m-l-20"
>
<view
class=
"u-m-b-10"
>
<span
class=
"color_00004"
>
发布日期
</span>
<span
class=
"u-m-l-20"
>
2021-12-01
</span>
<span
class=
"u-m-l-20"
>
{{ item.releaseDate }}
</span>
</view>
<view
class=
""
>
<span
class=
"color_00004"
>
截止日期
</span>
<span
class=
"u-m-l-20"
>
2021-12-01
</span>
<span
class=
"u-m-l-20"
>
{{ item.expirationDate }}
</span>
</view>
</view>
</view>
<view
class=
"u-m-t-30 bd_split_line"
></view>
<view
class=
"text-right"
>
<view
class=
"u-m-t-30 u-m-l-10 btn"
>
拆单
</view>
<view
class=
"u-m-t-30 u-m-l-10 btn"
>
拆单
</view>
<view
v-if=
"item.status == 7"
class=
"u-m-t-30 u-m-l-10 btn"
>
寄样
</view>
<view
v-if=
"item.status == 6"
class=
"u-m-t-30 u-m-l-10 btn"
>
撤回
</view>
<view
v-if=
"item.status == 4"
@
click=
"removeCli(item)"
class=
"u-m-t-30 u-m-l-10 btn"
>
删除
</view>
<view
v-if=
"item.status == 4"
@
click=
"dateilEnt(item, '编辑')"
class=
"u-m-t-30 u-m-l-10 btn"
>
编辑
</view>
<view
v-if=
"item.status == 5"
@
click=
"cancelCli(item)"
class=
"u-m-t-30 u-m-l-10 btn"
>
取消
</view>
<view
v-if=
"item.status == 3 || item.status == 9"
class=
"u-m-t-30 u-m-l-10 btn"
>
选款
</view>
<view
v-if=
"item.status == 2"
class=
"u-m-t-30 u-m-l-10 btn"
>
催单
</view>
<view
v-if=
"item.status == 1 || item.status == 5 || item.status == 6"
@
click=
"dateilEnt(item, '拆单')"
class=
"u-m-t-30 u-m-l-10 btn"
>
拆单
</view>
</view>
</view>
</view>
</view>
<!--底部按钮-->
<view
class=
"footer"
id=
"footer"
>
<view
class=
"footer-btn"
>
<view
class=
"custom-style-round-circle custom-style-btn custom-style"
>
<view
class=
"custom-style-right"
@
click=
"submitData"
><view
class=
"title"
>
新增委托
</view></view>
</view>
</view>
</view>
<u-modal
v-model=
"modal.show"
:show-cancel-button=
"true"
:content=
"modal.title"
@
cancel=
"modal.show = false"
@
confirm=
"confirm"
></u-modal>
<u-toast
ref=
"uToast"
/>
</view>
</template>
<
script
>
import
dom
from
'@/mixins/dom.js'
;
export
default
{
mixins
:
[
dom
],
data
()
{
return
{
modal
:
{
show
:
false
,
title
:
''
},
quantityNum
:
0
,
exceptionNum
:
0
,
abolishIds
:
0
,
pages
:
{
materialName
:
''
,
size
:
5
},
entrustmentId
:
''
,
current
:
0
,
entrustmentList
:
[],
list
:
[
{
name
:
'全部'
...
...
@@ -94,12 +126,134 @@ export default {
]
};
},
onLoad
()
{
this
.
entrustmentPage
();
this
.
toBeSelectedQuantity
();
this
.
orderTicketExceptionNum
();
this
.
noSampleOrder
();
},
// 上拉加载更多
onReachBottom
()
{
this
.
pages
.
size
=
this
.
pages
.
size
+
5
;
this
.
entrustmentPage
();
},
filters
:
{
filterStatus
(
v
)
{
switch
(
v
)
{
case
1
:
return
'无人接单'
;
case
2
:
return
'延误'
;
case
3
:
return
'已待定超期'
;
case
4
:
return
'待发布'
;
case
5
:
return
'审核中'
;
case
6
:
return
'待接单'
;
case
7
:
return
'已接单'
;
case
8
:
return
'已寄样'
;
case
9
:
return
'待选款'
;
case
10
:
return
'已结束'
;
default
:
return
''
;
}
}
},
methods
:
{
// 选款总数
toBeSelectedQuantity
()
{
this
.
$http
(
'plm.toBeSelectedQuantity'
,
{}).
then
(
res
=>
{
let
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
this
.
quantityNum
=
data
;
}
});
},
// 异常总数
orderTicketExceptionNum
()
{
this
.
$http
(
'plm.orderTicketExceptionNum'
,
{}).
then
(
res
=>
{
let
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
this
.
exceptionNum
=
data
;
}
});
},
// 寄样单总数
noSampleOrder
()
{
this
.
$http
(
'orderTicket.noSampleOrder'
,
{}).
then
(
res
=>
{
let
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
this
.
abolishIds
=
data
.
length
;
}
});
},
entrustmentPage
()
{
let
{
materialName
,
size
}
=
this
.
pages
;
this
.
$http
(
'orderTicket.entrustmentPage'
,
{
materialName
:
materialName
?
materialName
:
null
,
status
:
this
.
current
,
size
:
size
}).
then
(
res
=>
{
let
{
code
,
data
}
=
res
;
if
(
code
===
200
)
{
this
.
entrustmentList
=
data
;
}
});
},
change
(
index
)
{
this
.
current
=
index
;
this
.
pages
.
size
=
5
;
this
.
entrustmentPage
();
},
// 删除操作
removeCli
(
item
)
{
this
.
modal
.
title
=
'删除后不可恢复,确定删除吗?'
;
this
.
modal
.
show
=
true
;
this
.
entrustmentId
=
item
.
id
;
},
confirm
()
{
this
.
delEntrustment
();
},
tabsCli
(
v
){
this
.
current
=
v
delEntrustment
()
{
this
.
$http
(
'orderTicket.del'
,
[
this
.
entrustmentId
]).
then
(
res
=>
{
let
{
code
,
data
}
=
res
;
if
(
code
===
200
)
{
this
.
pages
.
size
=
5
;
this
.
entrustmentList
=
[];
this
.
entrustmentPage
();
this
.
$refs
.
uToast
.
show
({
title
:
'删除成功'
});
}
});
},
// 取消发布
cancelCli
(
item
)
{
this
.
$http
(
'orderTicket.abolishByIds'
,
[
item
.
id
]).
then
(
res
=>
{
let
{
code
,
data
}
=
res
;
if
(
code
===
200
)
{
this
.
pages
.
size
=
5
;
this
.
entrustmentList
=
[];
this
.
entrustmentPage
();
this
.
$refs
.
uToast
.
show
({
title
:
'取消成功'
});
}
});
},
// 编辑 拆单
dateilEnt
(
item
,
val
)
{
if
(
val
==
'拆单'
)
{
this
.
$Router
.
push
(
'/pages/designCommissioned/splitItem?id='
+
item
.
id
);
}
else
if
(
val
==
'编辑'
)
{
this
.
$Router
.
push
(
'/pages/designCommissioned/addItem?id='
+
item
.
id
);
}
}
}
};
...
...
@@ -122,6 +276,19 @@ export default {
}
</
style
>
<
style
lang=
"scss"
scoped
>
.footer
{
position
:
fixed
;
width
:
100%
;
bottom
:
0
;
z-index
:
998
;
background
:
#fff
;
box-shadow
:
0px
-4rpx
6rpx
0px
rgba
(
178
,
182
,
214
,
0
.1
);
padding-bottom
:
constant
(
safe-area-inset-bottom
);
padding-bottom
:
env
(
safe-area-inset-bottom
);
.footer-btn
{
padding
:
20rpx
60rpx
;
}
}
.bg_img
{
position
:
absolute
;
top
:
0
;
...
...
@@ -133,6 +300,7 @@ export default {
position
:
absolute
;
top
:
220rpx
;
width
:
100%
;
overflow-y
:
auto
;
}
.entrus_sum
{
height
:
164rpx
;
...
...
@@ -204,4 +372,34 @@ export default {
border-radius
:
100rpx
;
}
}
@mixin
vue-flex
(
$direction
:
row
)
{
/* #ifndef APP-NVUE */
display
:
flex
;
flex-direction
:
$direction
;
/* #endif */
}
.custom-style
{
color
:
#fff
;
height
:
88rpx
;
line-height
:
88rpx
;
@include
vue-flex
;
&
-btn
{
overflow
:
hidden
;
}
&
-round-circle
{
border-radius
:
100rpx
;
}
/*background: #000;*/
.custom-style-left
{
width
:
240rpx
;
background
:
#d6d6d6
;
text-align
:
center
;
}
.custom-style-right
{
flex
:
1
;
background
:
rgba
(
0
,
0
,
0
,
0
.8
);
text-align
:
center
;
}
}
</
style
>
src/static/style/common.scss
View file @
81af981c
.hs-position-relative
{
position
:
relative
;
}
.img
{
.
hs-
img
{
width
:
100%
;
height
:
100%
;
}
...
...
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