Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-pda-scan
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
ximai
mes-pda-scan
Commits
af4b9314
Commit
af4b9314
authored
Jul 24, 2024
by
何远江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加工作中心发料界面
parent
e0df4a92
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
462 additions
and
0 deletions
+462
-0
pages.json
pages.json
+7
-0
index.vue
pages/index/index.vue
+5
-0
scanningList.vue
pages/workCenter/scanningList.vue
+285
-0
workCenter.vue
pages/workCenter/workCenter.vue
+165
-0
workCenterList.vue
pages/workCenter/workCenterList.vue
+0
-0
No files found.
pages.json
View file @
af4b9314
...
@@ -96,6 +96,13 @@
...
@@ -96,6 +96,13 @@
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
},
{
"path"
:
"pages/workCenter/workCenter"
,
"style"
:
{
"navigationBarTitleText"
:
"工作中心发料"
,
"enablePullDownRefresh"
:
false
}
},
{
{
"path"
:
"pages/salesReturns/salesReturns"
,
"path"
:
"pages/salesReturns/salesReturns"
,
"style"
:
{
"style"
:
{
...
...
pages/index/index.vue
View file @
af4b9314
...
@@ -125,6 +125,11 @@
...
@@ -125,6 +125,11 @@
text
:
'工厂间调拨'
,
text
:
'工厂间调拨'
,
url
:
'/pages/factoryTransfer/index'
url
:
'/pages/factoryTransfer/index'
},
},
{
src
:
require
(
'@/static/images/clycxj.png'
),
text
:
'工作中心发料'
,
url
:
'/pages/workCenter/workCenter'
},
]
]
}]
}]
};
};
...
...
pages/workCenter/scanningList.vue
0 → 100644
View file @
af4b9314
<
template
>
<view>
<view
class=
"listItemTitle"
>
<view>
<view
class=
"item"
>
物料编号:
{{
item
.
sapItemCode
}}
</view>
<view
class=
"item"
>
物料描述:
{{
item
.
itemName
}}
</view>
</view>
<view
class=
"right"
>
<text
class=
"blue"
>
{{
totalVistaNum
}}
</text>
<text
class=
"line"
>
/
</text>
<text
class=
""
>
{{
totalNum
}}
</text>
</view>
</view>
<view
class=
"listBottom"
>
<view
class=
"bottomTitle"
@
click=
"show = !show"
>
<view
class=
"desc"
>
卷条码明细
</view>
<view
class=
"topIcons"
>
<view
v-if=
"show"
>
<u-icon
name=
"arrow-down"
color=
"#aaa"
size=
"32"
></u-icon>
展开
</view>
<view
v-else
>
<u-icon
name=
"arrow-up"
color=
"#aaa"
size=
"32"
></u-icon>
收起
</view>
</view>
</view>
<view
v-if=
"!show"
class=
"bottomBox"
>
<view
class=
"bottomItem"
v-for=
"(ele, idx) in details"
:key=
"ele.workorderCode"
>
<view
class=
"proItem"
>
<view
class=
"items"
>
生产单号:
{{
ele
.
workorderCode
}}
</view>
<view
class=
"progress"
>
<progress
:percent=
"handleVista(ele)"
show-info
/>
</view>
</view>
<view
class=
"items inputItem"
>
数量:
{{
handleUseVista
(
ele
)
}}
/
{{
ele
.
applyNum
}}
</view>
<template
v-for=
"item in ele.details"
>
<view
class=
"items"
>
PL:
{{
item
.
PLNR
}}
</view>
<view
class=
"items"
>
库位:
{{
item
.
LGORT
}}
-
{{
item
.
LGOBE
}}
</view>
<view
class=
"items"
>
仓位:
{{
item
.
NLPLA
}}
</view>
</
template
>
</view>
</view>
</view>
</view>
</template>
<
script
>
import
StickyNavBar
from
"@/components/StickyNavBar/index.vue"
;
import
ContentLoadingMore
from
"@/components/ContentLoadingMore/index.vue"
;
import
BottomBtn
from
"@/components/BottomBtn/index.vue"
;
export
default
{
components
:
{
StickyNavBar
,
ContentLoadingMore
,
BottomBtn
,
},
props
:
{
item
:
{
type
:
Object
,
default
:
function
()
{
return
{};
},
},
list
:
{
type
:
Array
,
default
:
function
()
{
return
[];
},
},
},
computed
:
{
details
()
{
return
this
.
list
.
reduce
((
acc
,
cur
)
=>
{
const
item
=
acc
.
find
((
v
)
=>
v
.
workorderCode
===
cur
.
workorderCode
);
if
(
item
)
{
item
.
details
.
push
({
...
cur
});
}
else
{
acc
.
push
({
...
cur
,
details
:
[{...
cur
}]
});
}
return
acc
;
},
[]);
},
totalNum
()
{
const
workCodes
=
[];
return
this
.
list
.
reduce
((
acc
,
cur
)
=>
{
if
(
workCodes
.
includes
(
cur
.
workorderCode
))
{
return
acc
;
}
else
{
workCodes
.
push
(
cur
.
workorderCode
);
return
acc
+
cur
.
applyNum
;
}
},
0
).
toFixed
(
3
);
},
totalVistaNum
()
{
return
this
.
list
.
reduce
((
acc
,
cur
)
=>
{
return
acc
+
cur
.
vista
;
},
0
).
toFixed
(
3
);
},
},
watch
:
{
details
:
{
handler
:
function
(
val
,
oldVal
)
{
console
.
log
(
val
,
"00-------"
,
this
.
list
);
},
immediate
:
true
,
deep
:
true
,
},
},
data
()
{
return
{
number
:
0
,
nlpla
:
""
,
wxparams
:
""
,
btnArr
:
[
{
style
:
""
,
type
:
"warning"
,
text
:
"返回"
,
way
:
"goBack"
,
},
{
style
:
""
,
type
:
"primary"
,
text
:
"提交"
,
way
:
"goSubmit"
,
},
],
isFocus
:
false
,
show
:
true
,
num1
:
0
,
};
},
created
()
{},
methods
:
{
handleUseVista
(
items
)
{
return
items
.
details
.
reduce
((
acc
,
cur
)
=>
cur
.
vista
+
acc
,
0
)
},
handleVista
(
items
)
{
let
num
=
0
;
this
.
list
.
forEach
((
ele
)
=>
{
if
(
ele
.
workorderCode
===
items
.
workorderCode
)
{
console
.
log
(
`output->`
,
ele
.
vista
,
items
.
workorderCode
);
num
+=
(
ele
.
vista
?
ele
.
vista
:
0
)
-
0
;
}
});
console
.
log
(
`output->num`
,
num
);
return
(
num
/
items
.
applyNum
).
toFixed
(
2
)
*
100
-
0
>
100
?
100
:
(
num
/
items
.
applyNum
).
toFixed
(
2
)
*
100
||
0
;
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
page
{
background
:
#f8f8f8
;
}
.headerTitle
{
padding
:
20rpx
;
font-weight
:
600
;
.items
{
line-height
:
40rpx
;
}
}
.btn
{
padding
:
20rpx
;
background
:
#fff
;
.topSearch
{
margin-bottom
:
20rpx
;
}
}
.bottomBtn
{
position
:
sticky
;
padding
:
20rpx
;
display
:
flex
;
justify-content
:
space-between
;
background
:
#fff
;
bottom
:
0rpx
;
margin-top
:
20rpx
;
.u-btn
{
width
:
300rpx
;
}
}
.blue
{
color
:
#3f9dcc
;
}
.total
{
background
:
#fff
;
color
:
#000
;
padding
:
0rpx
40rpx
;
display
:
flex
;
justify-content
:
space-between
;
font-size
:
32rpx
;
.line
{
margin
:
0px
10rpx
;
}
}
.listItemTitle
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
20rpx
;
border-bottom
:
2px
solid
#f8f8f8
;
.u-btn
{
width
:
150rpx
;
margin
:
0px
;
margin-top
:
10rpx
;
}
.item
{
line-height
:
50rpx
;
color
:
#333
;
font-size
:
28rpx
;
font-weight
:
500
;
word-break
:
break-all
;
font-weight
:
600
;
}
}
.listBottom
{
.bottomTitle
{
height
:
80rpx
;
position
:
relative
;
.desc
{
color
:
#bbb
;
font-size
:
24rpx
;
line-height
:
80rpx
;
padding-left
:
20rpx
;
}
.topIcons
{
position
:
absolute
;
left
:
50%
;
top
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
color
:
#aaa
;
}
}
.bottomBox
{
padding
:
20rpx
;
.bottomItem
{
background
:
#f8f8f8
;
padding
:
20rpx
;
margin-bottom
:
20rpx
;
.items
{
color
:
#333
;
font-size
:
24rpx
;
line-height
:
40rpx
;
word-break
:
break-all
;
/
deep
/
.uni-easyinput
{
width
:
200rpx
;
}
}
.inputItem
{
display
:
inline-flex
;
// line-height: 76rpx;
}
}
}
}
/
deep
/
.u-sticky
{
top
:
0
!
important
;
background
:
#fff
;
}
.progress
{
width
:
45%
;
margin-left
:
20rpx
;
/
deep
/
.uni-progress-info
{
font-size
:
24rpx
;
}
}
/
deep
/
.uni-progress
{
line-height
:
40rpx
;
}
.proItem
{
display
:
flex
;
}
</
style
>
pages/workCenter/workCenter.vue
0 → 100644
View file @
af4b9314
<
template
>
<view>
<StickyNavBar>
<NavBar
title=
"工作中心发料"
></NavBar>
<view
class=
"btn"
>
<uni-easyinput
prefixIcon=
"search"
:disabled=
"isDisabled"
v-model=
"wxparams"
:focus=
"isFocus"
placeholder=
"请扫描单号"
@
input=
"handleInputPlnr"
></uni-easyinput>
</view>
</StickyNavBar>
<view
class=
"cardBox"
>
<text
class=
"cardBoxTip"
>
步骤一 扫描单号
</text>
<u-image
class=
'cardBoxImg'
:src=
"bgSrc"
width=
"560rpx"
height=
"400rpx"
></u-image>
<view
class=
"cardBoxTip2"
>
摄像头对准
</view>
<view
class=
"cardBoxTip3"
>
生产发料单号二维码
</view>
<view
class=
"cardBoxTip2"
>
<text
class=
"tipLeft"
>
点击扫描或
</text>
<text
class=
"tipRight"
>
点选单号
</text>
</view>
</view>
<!--
<BottomBtn
:btnArr=
"btnArr"
@
getBtnHandle=
"getBtnHandle"
></BottomBtn>
-->
</view>
</
template
>
<
script
>
import
StickyNavBar
from
'@/components/StickyNavBar/index.vue'
;
import
ContentLoadingMore
from
'@/components/ContentLoadingMore/index.vue'
;
import
BottomBtn
from
'@/components/BottomBtn/index.vue'
;
export
default
{
components
:
{
StickyNavBar
,
ContentLoadingMore
,
BottomBtn
},
data
()
{
return
{
bgSrc
:
require
(
'@/static/images/qrcode.png'
),
number
:
0
,
totalNum
:
0
,
show
:
true
,
nlpla
:
''
,
wxparams
:
''
,
btnArr
:
[
{
style
:
''
,
type
:
'primary'
,
text
:
'扫描单号'
,
way
:
'scanning'
},
{
style
:
''
,
type
:
'warning'
,
text
:
'查询单号'
,
way
:
'goClick'
}
],
goodsList
:
[],
isFocus
:
false
,
isDisabled
:
false
};
},
created
()
{},
methods
:
{
getBtnHandle
(
row
)
{
this
[
row
.
way
]();
},
goClick
()
{
uni
.
navigateTo
({
url
:
`/pages/productionIssuance/oddNumList`
});
},
handleInputPlnr
(
e
)
{
this
.
isFocus
=
false
;
e
&&
this
.
getPlnr
(
e
);
},
getPlnr
(
applyNo
)
{
this
.
totalNum
=
0
;
this
.
isDisabled
=
true
;
this
.
$u
.
api
.
mesApi
.
pdaMaterialcreate
({
pageNum
:
1
,
pageSize
:
10
,
applyNo
})
.
then
((
res
)
=>
{
if
(
res
&&
res
.
code
-
200
===
0
)
{
if
(
res
.
rows
.
length
){
uni
.
navigateTo
({
url
:
`/pages/productionIssuance/productionIssuanceList?order=
${
applyNo
}
`
});
}
else
{
setTimeout
(()
=>
{
this
.
isFocus
=
true
;
this
.
isDisabled
=
false
;
this
.
wxparams
=
''
this
.
$u
.
toast
(
'未查询到数据'
);
},
1000
);
}
}
else
{
setTimeout
(()
=>
{
this
.
isFocus
=
true
;
this
.
isDisabled
=
false
;
},
1000
);
this
.
$u
.
toast
(
res
.
msg
);
}
this
.
loading
=
false
;
});
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
page
{
background
:
#f8f8f8
;
}
.btn
{
padding
:
20rpx
;
background
:
#fff
;
.topSearch
{
margin-bottom
:
20rpx
;
}
}
.cardBox
{
min-height
:
calc
(
100vh
-
400rpx
);
padding
:
0rpx
20rpx
;
margin-top
:
20rpx
;
}
/
deep
/
.u-sticky
{
top
:
0
!
important
;
background
:
#fff
;
}
.cardBoxTip
{
color
:
#000
;
font-size
:
28rpx
;
}
.cardBoxTip2
{
color
:
#000
;
font-size
:
28rpx
;
text-align
:
center
;
}
.cardBoxTip3
{
color
:
#3f9dcc
;
font-size
:
28rpx
;
text-align
:
center
;
}
.tipRight
{
color
:
#ff9900
;
}
</
style
>
\ No newline at end of file
pages/workCenter/workCenterList.vue
0 → 100644
View file @
af4b9314
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