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
186cabc4
Commit
186cabc4
authored
Aug 02, 2024
by
何远江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f1be7edb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
353 additions
and
338 deletions
+353
-338
workCenterList.vue
pages/workCenter/workCenterList.vue
+353
-338
No files found.
pages/workCenter/workCenterList.vue
View file @
186cabc4
...
...
@@ -5,9 +5,11 @@
<view
class=
"headerTitle"
>
<view
class=
""
>
<view
class=
"items"
>
领料申请:
{{
goodsInfo
.
applyNo
}}
</view>
<view
class=
"items"
>
{{
goodsInfo
.
workstationCode
}}
/
{{
<view
class=
"items"
>
{{
goodsInfo
.
workstationCode
}}
/
{{
goodsInfo
.
workstationName
}}
</view>
}}
</view
>
<view
class=
"items"
>
计划日期:
{{
goodsInfo
.
startTime
}}
</view>
</view>
<view
class=
"checkedCase"
>
...
...
@@ -17,8 +19,14 @@
</view>
</view>
<view
class=
"btn"
>
<uni-easyinput
prefixIcon=
"search"
:disabled=
"isDisabled"
v-model=
"wxparams"
:focus=
"isFocus"
placeholder=
"请扫描产品包装条码/外箱码"
@
input=
"handleInputPlnr"
></uni-easyinput>
<uni-easyinput
prefixIcon=
"search"
:disabled=
"isDisabled"
v-model=
"wxparams"
:focus=
"isFocus"
placeholder=
"请扫描产品包装条码/外箱码"
@
input=
"handleInputPlnr"
></uni-easyinput>
</view>
<view
class=
"total"
>
<view
class=
"left"
>
物料明细
</view>
...
...
@@ -38,15 +46,13 @@
</
template
>
<
script
>
import
StickyNavBar
from
"@/components/StickyNavBar/index.vue"
;
import
ContentLoadingMore
from
"@/components/ContentLoadingMore/index.vue"
;
import
BottomBtn
from
"@/components/BottomBtn/index.vue"
;
import
scanningList
from
"./scanningList.vue"
;
import
{
parseTime
}
from
"@/utils/ruoyi"
;
import
StickyNavBar
from
"@/components/StickyNavBar/index.vue"
;
import
ContentLoadingMore
from
"@/components/ContentLoadingMore/index.vue"
;
import
BottomBtn
from
"@/components/BottomBtn/index.vue"
;
import
scanningList
from
"./scanningList.vue"
;
import
{
parseTime
}
from
"@/utils/ruoyi"
;
export
default
{
export
default
{
components
:
{
StickyNavBar
,
ContentLoadingMore
,
...
...
@@ -62,7 +68,8 @@
show
:
true
,
nlpla
:
"YD-02-02-3"
,
wxparams
:
""
,
btnArr
:
[{
btnArr
:
[
{
style
:
""
,
type
:
"warning"
,
text
:
"返回"
,
...
...
@@ -80,12 +87,12 @@
isDisabled
:
false
,
OrderNum
:
""
,
list
:
[],
scanPLs
:
[]
scanPLs
:
[],
};
},
computed
:
{
goodsInfo
()
{
return
this
.
goodsList
[
0
]
||
{}
return
this
.
goodsList
[
0
]
||
{};
},
},
onLoad
(
option
)
{
...
...
@@ -113,9 +120,9 @@
})
.
then
((
res
)
=>
{
if
(
res
&&
res
.
code
-
200
===
0
)
{
this
.
goodsList
=
res
.
rows
.
map
(
item
=>
{
item
.
details
=
[]
return
item
this
.
goodsList
=
res
.
rows
.
map
((
item
)
=>
{
item
.
details
=
[];
return
item
;
});
}
else
{
this
.
$u
.
toast
(
res
.
msg
);
...
...
@@ -138,31 +145,36 @@
goSubmit
()
{
// 检查是否扫描PL
if
(
!
this
.
scanPLs
.
length
)
{
return
this
.
$u
.
toast
(
'请扫描PL!'
);
return
this
.
$u
.
toast
(
"请扫描PL!"
);
}
// 可以少发,不可以超发
if
(
this
.
goodsList
.
some
((
item
)
=>
{
return
item
.
applyNum
<
item
.
details
.
reduce
((
acc
,
cur
)
=>
{
acc
+=
cur
.
PACMG
if
(
this
.
goodsList
.
some
((
item
)
=>
{
return
(
item
.
applyNum
<
item
.
details
.
reduce
((
acc
,
cur
)
=>
{
acc
+=
cur
.
PACMG
;
},
0
)
}))
{
return
this
.
$u
.
toast
(
'检查数量是否正确!'
)
);
})
)
{
return
this
.
$u
.
toast
(
"检查数量是否正确!"
);
}
// 获取items
const
items
=
this
.
goodsList
.
reduce
((
acc
,
cur
)
=>
{
// 添加工作中心
acc
.
push
(...
cur
.
details
)
return
acc
},
[])
acc
.
push
(...
cur
.
details
);
return
acc
;
},
[]);
const
params
=
{
BLDAT
:
parseTime
(
new
Date
(),
'{y}{m}{d}'
),
BUDAT
:
parseTime
(
new
Date
(),
'{y}{m}{d}'
),
BLDAT
:
parseTime
(
new
Date
(),
"{y}{m}{d}"
),
BUDAT
:
parseTime
(
new
Date
(),
"{y}{m}{d}"
),
zencode
:
"A006"
,
TYPE
:
'FL'
,
ZMARK
:
'A002'
,
TYPE
:
"FL"
,
ZMARK
:
"A002"
,
item
:
items
,
};
this
.
$u
.
api
.
sapApi
.
sapRrm
([
params
]).
then
((
res
)
=>
{
...
...
@@ -170,21 +182,19 @@
if
(
!
Array
.
isArray
(
res
))
{
return
;
}
if
(
res
.
every
((
item
)
=>
item
.
TYPE
===
"S"
))
{
this
.
handleMes
();
}
const
foundObject
=
res
.
find
((
item
)
=>
item
.
TYPE
===
"E"
);
if
(
foundObject
&&
foundObject
.
MESSAGE
)
{
this
.
$u
.
toast
(
foundObject
.
MESSAGE
);
const
errObj
=
res
.
find
((
item
)
=>
item
.
TYPE
===
"E"
);
if
(
errObj
)
{
return
this
.
$u
.
toast
(
errObj
.
MESSAGE
);
}
this
.
handleMes
();
});
},
handleMes
()
{
const
params
=
this
.
goodsList
.
map
(
item
=>
{
item
.
windCase
=
this
.
checkedBox
?
'Y'
:
'N'
item
.
grantNum
=
item
.
details
.
reduce
((
acc
,
cur
)
=>
acc
+
cur
.
PACMG
,
0
)
return
item
})
const
params
=
this
.
goodsList
.
map
((
item
)
=>
{
item
.
windCase
=
this
.
checkedBox
?
"Y"
:
"N"
;
item
.
grantNum
=
item
.
details
.
reduce
((
acc
,
cur
)
=>
acc
+
cur
.
PACMG
,
0
);
return
item
;
});
this
.
$u
.
api
.
mesApi
.
pdaworkstationUpadteNum
(
params
).
then
((
res
)
=>
{
this
.
loading
=
false
;
console
.
log
(
res
);
...
...
@@ -200,7 +210,7 @@
},
handleInputPlnr
(
e
)
{
if
(
this
.
scanPLs
.
includes
(
e
))
{
return
this
.
$u
.
toast
(
'请勿重复扫描!'
)
return
this
.
$u
.
toast
(
"请勿重复扫描!"
);
}
e
&&
this
.
getPlnr
(
e
);
},
...
...
@@ -215,13 +225,18 @@
.
then
((
res
)
=>
{
if
(
res
&&
res
.
MSG
[
0
].
TYPE
===
"S"
)
{
// 相同物料
const
item
=
this
.
goodsList
.
find
(
v
=>
v
.
sapItemCode
==
res
.
BLPL
[
0
].
MATNR
)
item
&&
item
.
details
.
push
(...
res
.
BLPL
.
map
(
v
=>
{
v
.
ARBPL
=
item
.
workstationCode
v
.
ERFMG
=
v
.
PACMG
return
v
}))
item
&&
this
.
scanPLs
.
push
(
plnr
)
const
item
=
this
.
goodsList
.
find
(
(
v
)
=>
v
.
sapItemCode
==
res
.
BLPL
[
0
].
MATNR
);
item
&&
item
.
details
.
push
(
...
res
.
BLPL
.
map
((
v
)
=>
{
v
.
ARBPL
=
item
.
workstationCode
;
v
.
ERFMG
=
v
.
PACMG
;
return
v
;
})
);
item
&&
this
.
scanPLs
.
push
(
plnr
);
this
.
reset
();
}
else
{
...
...
@@ -232,33 +247,33 @@
});
},
},
};
};
</
script
>
<
style
lang=
"scss"
scoped
>
page
{
page
{
background
:
#f8f8f8
;
}
}
.headerTitle
{
.headerTitle
{
padding
:
20rpx
;
font-weight
:
600
;
.items
{
line-height
:
40rpx
;
}
}
}
.btn
{
.btn
{
padding
:
20rpx
;
background
:
#fff
;
.topSearch
{
margin-bottom
:
20rpx
;
}
}
}
.bottomBtn
{
.bottomBtn
{
position
:
sticky
;
padding
:
20rpx
;
display
:
flex
;
...
...
@@ -270,13 +285,13 @@
.u-btn
{
width
:
300rpx
;
}
}
}
.blue
{
.blue
{
color
:
#3f9dcc
;
}
}
.total
{
.total
{
background
:
#fff
;
color
:
#000
;
padding
:
0rpx
40rpx
;
...
...
@@ -287,21 +302,21 @@
.line
{
margin
:
0px
10rpx
;
}
}
}
.cardbox
{
.cardbox
{
min-height
:
calc
(
100vh
-
480rpx
);
padding
:
0rpx
20rpx
;
margin-top
:
20rpx
;
}
}
.cardContent
{
.cardContent
{
border-radius
:
8px
;
background
:
#fff
;
margin-bottom
:
20rpx
;
}
}
.listItemTitle
{
.listItemTitle
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
20rpx
;
...
...
@@ -321,9 +336,9 @@
word-break
:
break-all
;
font-weight
:
600
;
}
}
}
.listBottom
{
.listBottom
{
.bottomTitle
{
height
:
80rpx
;
position
:
relative
;
...
...
@@ -360,14 +375,14 @@
}
}
}
}
}
/
deep
/
.u-sticky
{
/
deep
/
.u-sticky
{
top
:
0
!
important
;
background
:
#fff
;
}
}
.checkedCase
{
.checkedCase
{
margin-top
:
10rpx
;
}
}
</
style
>
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