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
eeaf1615
Commit
eeaf1615
authored
Aug 08, 2024
by
何远江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug 修改, 优化
parent
bc3edf4c
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
814 additions
and
730 deletions
+814
-730
FactorySelect.vue
components/FactorySelect/FactorySelect.vue
+71
-73
confirComplete.vue
pages/confirComplete/confirComplete.vue
+25
-29
scanningList.vue
pages/confirComplete/scanningList.vue
+1
-0
costCenterList.vue
pages/costCenter/costCenterList.vue
+22
-17
salesOutboundList.vue
pages/salesOutbound/salesOutboundList.vue
+385
-343
scanningList.vue
pages/salesOutbound/scanningList.vue
+18
-10
index.vue
pages/sendOutGoodsOff/index.vue
+289
-256
toast.js
uview-ui/libs/function/toast.js
+3
-2
No files found.
components/FactorySelect/FactorySelect.vue
View file @
eeaf1615
<
template
>
<
template
>
<view
class=
"factoryBox"
>
<view
class=
"factoryBox"
>
<zxz-uni-data-select
<zxz-uni-data-select
filterable
v-model=
"warehouseCode"
dataKey=
"label"
placeholder=
"请选择库存地点"
dataValue=
"value"
filterable
:localdata=
"warehouseData"
@
change=
"onWarehouseChange"
/>
v-model=
"warehouseCode"
dataKey=
"label"
placeholder=
"请选择库存地点"
dataValue=
"value"
:localdata=
"warehouseData"
@
change=
"onWarehouseChange"
/>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
model
:
{
model
:
{
prop
:
"value"
,
prop
:
"value"
,
event
:
"update"
,
event
:
"update"
,
...
@@ -21,8 +14,12 @@ export default {
...
@@ -21,8 +14,12 @@ export default {
props
:
{
props
:
{
value
:
{
value
:
{
type
:
String
,
type
:
String
,
defua
lt
:
""
,
defau
lt
:
""
,
},
},
options
:
{
type
:
Array
,
default
:
()
=>
([])
}
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -60,22 +57,23 @@ export default {
...
@@ -60,22 +57,23 @@ export default {
item
.
label
=
item
.
LGORT
+
"-"
+
item
.
LGOBE
;
item
.
label
=
item
.
LGORT
+
"-"
+
item
.
LGOBE
;
item
.
value
=
item
.
LGORT
;
item
.
value
=
item
.
LGORT
;
return
item
;
return
item
;
});
})
this
.
warehouseData
.
unshift
(...
this
.
options
)
}
else
{
}
else
{
this
.
warehouseData
=
[];
this
.
warehouseData
=
[];
}
}
});
});
},
},
},
},
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.factoryBox
{
.factoryBox
{
padding
:
10rpx
20rpx
0
;
padding
:
10rpx
20rpx
0
;
.item-select
{
.item-select
{
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
}
}
}
}
</
style
>
</
style
>
pages/confirComplete/confirComplete.vue
View file @
eeaf1615
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<view
class=
"page"
>
<view
class=
"page"
>
<StickyNavBar>
<StickyNavBar>
<NavBar
title=
"完工入库扫描"
></NavBar>
<NavBar
title=
"完工入库扫描"
></NavBar>
<FactorySelect
v-model=
"LGOBE"
@
change=
"actionSheetCallback"
/>
<FactorySelect
v-model=
"LGOBE"
@
change=
"actionSheetCallback"
:options=
"options"
/>
<!--
<view
class=
"selectSheet"
>
<!--
<view
class=
"selectSheet"
>
<u-row
>
<u-row
>
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
</u-row>
</u-row>
</view>
-->
</view>
-->
<view
class=
"btn"
>
<view
class=
"btn"
>
<uni-easyinput
prefixIcon=
"search"
class=
"topSearch
"
v-model=
"nlpla"
focus
placeholder=
"请扫描库位"
@
change=
"handleInputNlpla"
></uni-easyinput>
<uni-easyinput
v-if=
"vuex_user_factory !== '1010'"
prefixIcon=
"search"
class=
"topSearch"
:disabled=
"nlplaDisabled
"
v-model=
"nlpla"
focus
placeholder=
"请扫描库位"
@
change=
"handleInputNlpla"
></uni-easyinput>
<uni-easyinput
<uni-easyinput
prefixIcon=
"search"
prefixIcon=
"search"
:disabled=
"isDisabled"
:disabled=
"isDisabled"
...
@@ -65,6 +65,7 @@ export default {
...
@@ -65,6 +65,7 @@ export default {
show
:
true
,
show
:
true
,
nlpla
:
''
,
nlpla
:
''
,
wxparams
:
''
,
wxparams
:
''
,
nlplaDisabled
:
false
,
warehouseCode
:
''
,
warehouseCode
:
''
,
btnArr
:
[
btnArr
:
[
{
{
...
@@ -89,12 +90,18 @@ export default {
...
@@ -89,12 +90,18 @@ export default {
LGORT
:
''
,
LGORT
:
''
,
type
:
'select'
,
type
:
'select'
,
border
:
true
,
border
:
true
,
list
:[]
list
:[],
options
:
[{
WERKS
:
"1000"
,
LGORT
:
"S000"
,
LGOBE
:
"发运仓"
,
label
:
"S000-发运仓"
,
value
:
"S000"
,
},]
};
};
},
},
created
()
{
created
()
{
// this.getDepotLists();
// 二维码包含:10位物料号(右对齐不足补充为0)物料号12位生产单号(右对齐不足补充为0),
// 二维码包含:10位物料号(右对齐不足补充为0)物料号12位生产单号(右对齐不足补充为0),
// 10位批次号(右对齐不足补充为0),8位数量(100000.0)(右对齐不足补充为0)
// 10位批次号(右对齐不足补充为0),8位数量(100000.0)(右对齐不足补充为0)
// this.getPlnr('006000000100100000000300000501001');
// this.getPlnr('006000000100100000000300000501001');
...
@@ -103,29 +110,12 @@ export default {
...
@@ -103,29 +110,12 @@ export default {
totalNum
(){
totalNum
(){
let
num
=
0
;
let
num
=
0
;
this
.
goodsList
.
forEach
((
ele
)
=>
{
this
.
goodsList
.
forEach
((
ele
)
=>
{
num
+=
ele
.
q
uantity
;
num
+=
ele
.
totalQ
uantity
;
});
});
return
num
return
num
}
}
},
},
methods
:
{
methods
:
{
getDepotLists
()
{
this
.
$u
.
api
.
sapApi
.
sapDict
({
FIELDNAME
:
'T001L'
})
.
then
((
res
)
=>
{
if
(
res
)
{
res
.
forEach
((
ele
)
=>
{
ele
.
text
=
ele
.
LGORT
+
"-"
+
ele
.
LGOBE
;
});
this
.
depotLists
=
res
;
console
.
log
(
this
.
depotLists
,
'depotLists'
,
res
);
}
else
{
this
.
depotLists
=
[];
}
});
},
// 点击actionSheet回调
// 点击actionSheet回调
actionSheetCallback
(
item
)
{
actionSheetCallback
(
item
)
{
this
.
LGORT
=
item
?.
LGORT
||
""
;
this
.
LGORT
=
item
?.
LGORT
||
""
;
...
@@ -200,6 +190,7 @@ export default {
...
@@ -200,6 +190,7 @@ export default {
},
},
handleInputNlpla
(
e
)
{
handleInputNlpla
(
e
)
{
console
.
log
(
`output->e`
,
e
)
console
.
log
(
`output->e`
,
e
)
this
.
nlplaDisabled
=
!!
e
},
},
reset
(){
reset
(){
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -211,29 +202,34 @@ export default {
...
@@ -211,29 +202,34 @@ export default {
getPlnr
(
qrcode
)
{
getPlnr
(
qrcode
)
{
this
.
isDisabled
=
true
;
this
.
isDisabled
=
true
;
this
.
isFocus
=
false
this
.
isFocus
=
false
if
(
!
this
.
nlpla
){
if
(
!
this
.
nlpla
&&
this
.
vuex_user_factory
!==
'1010'
){
this
.
$u
.
toast
(
'请先扫描仓位'
);
this
.
$u
.
toast
(
'请先扫描仓位'
);
this
.
reset
()
this
.
reset
()
return
return
}
}
// if(!this.nlpla){
// this.$u.toast('请先扫描仓位');
// this.reset()
// return
// }
this
.
$u
.
api
.
mesApi
this
.
$u
.
api
.
mesApi
.
pdaFindPackageLinkInfo
({
.
pdaFindPackageLinkInfo
({
qrcode
qrcode
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
&&
res
.
code
==
200
)
{
if
(
res
&&
res
.
code
==
200
)
{
if
(
this
.
goodsList
.
some
((
item
)
=>
item
.
workorderNo
!==
res
.
data
[
0
].
workorderNo
))
{
//
if (this.goodsList.some((item) => item.workorderNo !== res.data[0].workorderNo)) {
this
.
$u
.
toast
(
'请扫描同一个工单'
);
//
this.$u.toast('请扫描同一个工单');
this
.
reset
()
//
this.reset()
return
//
return
}
//
}
if
(
this
.
goodsList
.
some
((
item
)
=>
item
.
qrcode
===
qrcode
))
{
if
(
this
.
goodsList
.
some
((
item
)
=>
item
.
qrcode
===
qrcode
))
{
this
.
$u
.
toast
(
'已经存在当前条码'
);
this
.
$u
.
toast
(
'已经存在当前条码'
);
this
.
reset
()
this
.
reset
()
return
return
}
}
res
.
data
.
forEach
(
ele
=>
{
res
.
data
.
forEach
(
ele
=>
{
ele
.
NLPLA
=
this
.
nlpla
?.
trim
();
this
.
nlpla
&&
(
ele
.
NLPLA
=
this
.
nlpla
?.
trim
())
});
});
this
.
list
=
this
.
list
.
concat
(
res
.
data
)
this
.
list
=
this
.
list
.
concat
(
res
.
data
)
...
...
pages/confirComplete/scanningList.vue
View file @
eeaf1615
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
<view
class=
"item"
>
产品描述:
{{
item
.
itemName
}}
</view>
<view
class=
"item"
>
产品描述:
{{
item
.
itemName
}}
</view>
<view
class=
"item"
>
入库仓位:
{{
item
.
NLPLA
}}
</view>
<view
class=
"item"
>
入库仓位:
{{
item
.
NLPLA
}}
</view>
<view
class=
"item"
>
入库数量:
{{
item
.
quantity
}}
</view>
<view
class=
"item"
>
入库数量:
{{
item
.
quantity
}}
</view>
<view
class=
"item"
>
loss数量:
{{
item
.
lossNum
}}
</view>
</view>
</view>
<u-button
size=
"mini"
type=
"primary"
plain
@
click=
"deleGonds(idx)"
>
<u-button
size=
"mini"
type=
"primary"
plain
@
click=
"deleGonds(idx)"
>
<u-icon
name=
"trash"
size=
"28"
></u-icon>
<u-icon
name=
"trash"
size=
"28"
></u-icon>
...
...
pages/costCenter/costCenterList.vue
View file @
eeaf1615
...
@@ -9,11 +9,6 @@
...
@@ -9,11 +9,6 @@
>
{{
goodsInfo
.
KOSTL
}}
/
{{
goodsInfo
.
KTEXT
}}
</view
>
{{
goodsInfo
.
KOSTL
}}
/
{{
goodsInfo
.
KTEXT
}}
</view
>
>
</view>
</view>
<view
class=
"checkedCase"
>
<checkbox-group
@
change=
"checkedChange"
>
<checkbox
value=
"r1"
:checked=
"checkedBox"
/>
是否结案
</checkbox-group>
</view>
</view>
</view>
<view
class=
"btn"
>
<view
class=
"btn"
>
<uni-easyinput
<uni-easyinput
...
@@ -158,10 +153,12 @@ export default {
...
@@ -158,10 +153,12 @@ export default {
// 获取items
// 获取items
const
items
=
this
.
goodsList
.
reduce
((
acc
,
cur
)
=>
{
const
items
=
this
.
goodsList
.
reduce
((
acc
,
cur
)
=>
{
acc
.
push
(...
cur
.
details
.
map
(
v
=>
{
acc
.
push
(
v
.
KOSTL
=
cur
.
KOSTL
...
cur
.
details
.
map
((
v
)
=>
{
return
v
v
.
KOSTL
=
cur
.
KOSTL
;
}));
return
v
;
})
);
return
acc
;
return
acc
;
},
[]);
},
[]);
...
@@ -170,7 +167,7 @@ export default {
...
@@ -170,7 +167,7 @@ export default {
BUDAT
:
parseTime
(
new
Date
(),
"{y}{m}{d}"
),
BUDAT
:
parseTime
(
new
Date
(),
"{y}{m}{d}"
),
zencode
:
"A006"
,
zencode
:
"A006"
,
ZMARK
:
"A001"
,
ZMARK
:
"A001"
,
TYPE
:
'FL'
,
TYPE
:
"FL"
,
item
:
items
,
item
:
items
,
};
};
this
.
$u
.
api
.
sapApi
.
sapRrm
([
params
]).
then
((
res
)
=>
{
this
.
$u
.
api
.
sapApi
.
sapRrm
([
params
]).
then
((
res
)
=>
{
...
@@ -183,8 +180,17 @@ export default {
...
@@ -183,8 +180,17 @@ export default {
return
this
.
$u
.
toast
(
errObj
.
MESSAGE
);
return
this
.
$u
.
toast
(
errObj
.
MESSAGE
);
}
}
// 提交成功 返回上一个页面
// 提交成功 返回上一个页面
this
.
$u
.
toast
(
"提交成功!"
);
this
.
$u
.
toast
(
"提交成功!"
,
3000
,
{
this
.
goBack
();
icon
:
"success"
,
mask
:
true
,
complete
:
()
=>
{
setTimeout
(()
=>
{
uni
.
navigateBack
({
delta
:
1
,
});
},
3000
);
},
});
});
});
},
},
...
@@ -231,10 +237,9 @@ export default {
...
@@ -231,10 +237,9 @@ export default {
let
bdmng
=
0
;
let
bdmng
=
0
;
// 查询需求数量与pl数量总和不等的物料
// 查询需求数量与pl数量总和不等的物料
const
item
=
items
.
find
((
v
)
=>
{
const
item
=
items
.
find
((
v
)
=>
{
const
total
=
v
.
details
.
length
?
v
.
details
.
reduce
(
const
total
=
v
.
details
.
length
(
acc
,
cur
)
=>
(
acc
+
+
cur
.
ERFMG
).
toFixed
(
3
),
?
v
.
details
.
reduce
((
acc
,
cur
)
=>
(
acc
+
+
cur
.
ERFMG
).
toFixed
(
3
),
0
)
0
:
0
;
)
:
0
bdmng
=
(
v
.
BDMNG
-
total
).
toFixed
(
3
);
bdmng
=
(
v
.
BDMNG
-
total
).
toFixed
(
3
);
return
bdmng
>
0
;
return
bdmng
>
0
;
});
});
...
@@ -246,7 +251,7 @@ export default {
...
@@ -246,7 +251,7 @@ export default {
splitBlpl
.
ERFMG
=
bdmng
;
splitBlpl
.
ERFMG
=
bdmng
;
blpl
.
ERFMG
=
(
blpl
.
ERFMG
-
bdmng
).
toFixed
(
3
);
blpl
.
ERFMG
=
(
blpl
.
ERFMG
-
bdmng
).
toFixed
(
3
);
}
}
splitBlpl
.
PACMG
=
splitBlpl
.
ERFMG
splitBlpl
.
PACMG
=
splitBlpl
.
ERFMG
;
item
.
details
.
push
(
splitBlpl
);
item
.
details
.
push
(
splitBlpl
);
}
}
}
else
{
}
else
{
...
...
pages/salesOutbound/salesOutboundList.vue
View file @
eeaf1615
...
@@ -4,14 +4,22 @@
...
@@ -4,14 +4,22 @@
<NavBar
title=
"销售拣货"
></NavBar>
<NavBar
title=
"销售拣货"
></NavBar>
<view
class=
"headerTitle"
>
<view
class=
"headerTitle"
>
<view
class=
"items"
>
交货单号:
{{
vbeln
}}
</view>
<view
class=
"items"
>
交货单号:
{{
vbeln
}}
</view>
<view
class=
"items"
>
{{
saleInfo
.
KUNNR
}}
|
{{
saleInfo
.
NAME1
}}
</view>
<view
class=
"items"
>
{{
saleInfo
.
KUNNR
}}
|
{{
saleInfo
.
NAME1
}}
</view>
<view
class=
"items"
>
计划日期:
{{
saleInfo
.
WADAT
}}
</view>
<view
class=
"items"
>
计划日期:
{{
saleInfo
.
WADAT
}}
</view>
<view
class=
"items"
>
装箱数:
{{
plslen
}}
/
{{
Number
(
saleInfo
.
XSNUM
)
}}
</view>
<view
class=
"items"
>
装箱数:
{{
plslen
}}
/
{{
Number
(
saleInfo
.
XSNUM
)
}}
</view
>
</view>
</view>
<view
class=
""
>
<view
class=
""
>
<view
class=
"btn"
>
<view
class=
"btn"
>
<uni-easyinput
prefixIcon=
"search"
:disabled=
"isDisabled"
v-model=
"wxparams"
:focus=
"isFocus"
<uni-easyinput
placeholder=
"请扫描产品包装条码/外箱码"
@
input=
"handleInputPlnr"
></uni-easyinput>
prefixIcon=
"search"
:disabled=
"isDisabled"
v-model=
"wxparams"
:focus=
"isFocus"
placeholder=
"请扫描产品包装条码/外箱码"
@
input=
"handleInputPlnr"
></uni-easyinput>
</view>
</view>
<view
class=
"total"
>
<view
class=
"total"
>
<view
class=
"left"
>
明细
</view>
<view
class=
"left"
>
明细
</view>
...
@@ -26,8 +34,16 @@
...
@@ -26,8 +34,16 @@
</StickyNavBar>
</StickyNavBar>
<ContentLoadingMore
class=
"contentMore"
:list=
"goodsList"
>
<ContentLoadingMore
class=
"contentMore"
:list=
"goodsList"
>
<view
class=
"cardbox"
>
<view
class=
"cardbox"
>
<view
class=
"cardContent"
v-for=
"(item, index) in goodsList"
:key=
"item.PLNR"
>
<view
<scanningList
:item=
"item"
:list=
"item.ZPLDT"
/>
class=
"cardContent"
v-for=
"(item, index) in goodsList"
:key=
"item.PLNR"
>
<scanningList
:item=
"item"
:list=
"item.ZPLDT"
@
deleGonds=
"(idx) => deleGonds(item, idx)"
/>
</view>
</view>
</view>
</view>
</ContentLoadingMore>
</ContentLoadingMore>
...
@@ -36,15 +52,13 @@
...
@@ -36,15 +52,13 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
StickyNavBar
from
"@/components/StickyNavBar/index.vue"
;
import
StickyNavBar
from
"@/components/StickyNavBar/index.vue"
;
import
ContentLoadingMore
from
"@/components/ContentLoadingMore/index.vue"
;
import
ContentLoadingMore
from
"@/components/ContentLoadingMore/index.vue"
;
import
BottomBtn
from
"@/components/BottomBtn/index.vue"
;
import
BottomBtn
from
"@/components/BottomBtn/index.vue"
;
import
scanningList
from
"./scanningList.vue"
;
import
scanningList
from
"./scanningList.vue"
;
import
stockList
from
"./stockList.vue"
;
import
stockList
from
"./stockList.vue"
;
import
{
import
{
parseTime
}
from
"@/utils/ruoyi"
;
parseTime
export
default
{
}
from
"@/utils/ruoyi"
;
export
default
{
components
:
{
components
:
{
StickyNavBar
,
StickyNavBar
,
ContentLoadingMore
,
ContentLoadingMore
,
...
@@ -59,7 +73,8 @@
...
@@ -59,7 +73,8 @@
border
:
true
,
border
:
true
,
current
:
0
,
current
:
0
,
status
:
"loadmore"
,
status
:
"loadmore"
,
btnArr
:
[{
btnArr
:
[
{
style
:
""
,
style
:
""
,
type
:
"primary"
,
type
:
"primary"
,
text
:
"保存"
,
text
:
"保存"
,
...
@@ -87,7 +102,7 @@
...
@@ -87,7 +102,7 @@
* 查询缓存中是否有单号,有单号读取扫描PL的数据
* 查询缓存中是否有单号,有单号读取扫描PL的数据
*/
*/
this
.
getInfo
(
option
.
order
);
this
.
getInfo
(
option
.
order
);
this
.
vbeln
=
option
.
order
this
.
vbeln
=
option
.
order
;
},
},
computed
:
{
computed
:
{
totalNum
()
{
totalNum
()
{
...
@@ -98,16 +113,28 @@
...
@@ -98,16 +113,28 @@
* 缓存的扫描过的pl条目
* 缓存的扫描过的pl条目
*/
*/
catchPL
()
{
catchPL
()
{
return
this
.
vuex_sales_outbound
[
this
.
vbeln
]
||
null
return
this
.
vuex_sales_outbound
[
this
.
vbeln
]
||
null
;
},
},
plslen
()
{
plslen
()
{
return
this
.
goodsList
.
reduce
((
acc
,
cur
)
=>
{
return
this
.
goodsList
.
reduce
((
acc
,
cur
)
=>
{
return
acc
+
(
cur
.
ZPLDT
?.
length
||
0
)
return
(
},
0
)
acc
+
(
cur
?.
ZPLDT
?.
reduce
((
a
,
c
)
=>
{
if
(
c
.
ZCODE
==
""
&&
c
.
PLNR
)
{
a
.
push
(
c
.
PLNR
);
}
else
if
(
c
.
PLNR
&&
c
.
ZCODE
)
{
if
(
!
a
.
includes
(
c
.
ZCODE
))
{
a
.
push
(
c
.
ZCODE
);
}
}
return
a
;
},
[]).
length
||
0
)
);
},
0
);
},
},
saleInfo
()
{
saleInfo
()
{
return
this
.
goodsList
[
0
]
||
{}
return
this
.
goodsList
[
0
]
||
{};
}
},
},
},
methods
:
{
methods
:
{
goSubmit
()
{
goSubmit
()
{
...
@@ -156,10 +183,10 @@
...
@@ -156,10 +183,10 @@
// 如果有缓存PL,提交成功将要清楚当前缓存
// 如果有缓存PL,提交成功将要清楚当前缓存
if
(
this
.
catchPL
)
{
if
(
this
.
catchPL
)
{
const
sales_outbound
=
{
const
sales_outbound
=
{
...
this
.
vuex_sales_outbound
...
this
.
vuex_sales_outbound
,
}
};
delete
sales_outbound
[
this
.
vbeln
]
delete
sales_outbound
[
this
.
vbeln
];
this
.
$u
.
vuex
(
'vuex_sales_outbound'
,
sales_outbound
)
this
.
$u
.
vuex
(
"vuex_sales_outbound"
,
sales_outbound
);
}
}
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
goBack
();
this
.
goBack
();
...
@@ -168,31 +195,29 @@
...
@@ -168,31 +195,29 @@
});
});
},
},
goSave
()
{
goSave
()
{
console
.
log
(
this
.
vuex_sales_outbound
,
'this.vuex_sales_outbound'
)
console
.
log
(
this
.
vuex_sales_outbound
,
"this.vuex_sales_outbound"
);
// 缓存以单号为key,扫描的pl为value
// 缓存以单号为key,扫描的pl为value
const
pls
=
this
.
goodsList
.
reduce
((
acc
,
cur
)
=>
{
const
pls
=
this
.
goodsList
.
reduce
((
acc
,
cur
)
=>
{
cur
.
ZPLDT
&&
acc
.
push
(...
cur
.
ZPLDT
)
cur
.
ZPLDT
&&
acc
.
push
(...
cur
.
ZPLDT
);
return
acc
return
acc
;
},
[])
},
[]);
// 如果已经扫描pl执行缓存
if
(
pls
.
length
)
{
const
sales_outbound
=
{
const
sales_outbound
=
{
...(
this
.
vuex_sales_outbound
||
{}),
...(
this
.
vuex_sales_outbound
||
{}),
[
this
.
vbeln
]:
pls
[
this
.
vbeln
]:
pls
,
}
};
this
.
$u
.
vuex
(
'vuex_sales_outbound'
,
sales_outbound
)
this
.
$u
.
vuex
(
"vuex_sales_outbound"
,
sales_outbound
);
this
.
$u
.
toast
(
'保存成功!'
)
this
.
$u
.
toast
(
"保存成功!"
);
}
},
},
getInfo
(
VBELN
)
{
getInfo
(
VBELN
)
{
this
.
$u
.
api
.
sapApi
this
.
$u
.
api
.
sapApi
.
sapSchDn
({
.
sapSchDn
({
VBELN
VBELN
,
}).
then
(
res
=>
{
this
.
initGoodsList
(
res
.
BKDT
)
console
.
log
(
this
.
catchPL
,
'this.catchPL'
)
this
.
catchPL
&&
this
.
setSalesBoundPL
(
this
.
catchPL
)
})
})
.
then
((
res
)
=>
{
this
.
initGoodsList
(
res
.
BKDT
);
console
.
log
(
this
.
catchPL
,
"this.catchPL"
);
this
.
catchPL
&&
this
.
setSalesBoundPL
(
this
.
catchPL
);
});
},
},
initGoodsList
(
arr
)
{
initGoodsList
(
arr
)
{
// 有SIZE行就取ZINSNUM+ZLOSSC,没有SIZE行的就是取交货单行的LFIMG
// 有SIZE行就取ZINSNUM+ZLOSSC,没有SIZE行的就是取交货单行的LFIMG
...
@@ -213,7 +238,7 @@
...
@@ -213,7 +238,7 @@
XSNUM
:
ele
.
XSNUM
,
XSNUM
:
ele
.
XSNUM
,
MATNR
:
ele
.
MATNR
,
MATNR
:
ele
.
MATNR
,
MAKTX
:
ele
.
MAKTX
,
MAKTX
:
ele
.
MAKTX
,
sumNum
:
item
.
ZINSNUM
+
item
.
ZLOSSC
sumNum
:
item
.
ZINSNUM
+
item
.
ZLOSSC
,
};
};
})
})
);
);
...
@@ -227,12 +252,12 @@
...
@@ -227,12 +252,12 @@
});
});
},
},
setSalesBoundPL
(
pls
)
{
setSalesBoundPL
(
pls
)
{
console
.
log
(
pls
,
'pls'
)
console
.
log
(
pls
,
"pls"
);
// 循环BLPL合并相同的物料号和size
// 循环BLPL合并相同的物料号和size
pls
.
forEach
((
ele
)
=>
{
pls
.
forEach
((
ele
)
=>
{
if
(
!
this
.
pls
.
includes
(
ele
.
PLNR
)
||
!
this
.
pls
.
includes
(
ele
.
ZCODE
))
{
if
(
!
this
.
pls
.
includes
(
ele
.
PLNR
)
||
!
this
.
pls
.
includes
(
ele
.
ZCODE
))
{
ele
.
PLNR
&&
this
.
pls
.
push
(
ele
.
PLNR
)
ele
.
PLNR
&&
this
.
pls
.
push
(
ele
.
PLNR
);
ele
.
ZCODE
&&
this
.
pls
.
push
(
ele
.
ZCODE
)
ele
.
ZCODE
&&
this
.
pls
.
push
(
ele
.
ZCODE
);
}
}
ele
.
TOMNG
=
ele
.
PACMG
;
ele
.
TOMNG
=
ele
.
PACMG
;
const
item
=
this
.
goodsList
.
find
(
const
item
=
this
.
goodsList
.
find
(
...
@@ -248,14 +273,15 @@
...
@@ -248,14 +273,15 @@
});
});
},
},
getPlnr
(
plnr
)
{
getPlnr
(
plnr
)
{
const
isBL
=
plnr
.
includes
(
"BL"
);
let
params
=
{
let
params
=
{
ZCODE
:
plnr
.
includes
(
"BL"
)
?
plnr
:
""
,
ZCODE
:
isBL
?
plnr
:
""
,
plnr
:
plnr
.
includes
(
"BL"
)
?
""
:
plnr
,
plnr
:
isBL
?
""
:
plnr
,
ztype
:
'005'
ztype
:
"005"
,
};
};
this
.
$u
.
api
.
sapApi
.
sapBlpl
(
params
).
then
((
res
)
=>
{
this
.
$u
.
api
.
sapApi
.
sapBlpl
(
params
).
then
((
res
)
=>
{
if
(
res
&&
res
.
MSG
[
0
].
TYPE
===
"S"
)
{
if
(
res
&&
res
.
MSG
[
0
].
TYPE
===
"S"
)
{
this
.
setSalesBoundPL
(
res
.
BLPL
)
this
.
setSalesBoundPL
(
res
.
BLPL
);
}
else
{
}
else
{
this
.
$u
.
toast
(
res
.
MSG
[
0
].
MESSAGE
);
this
.
$u
.
toast
(
res
.
MSG
[
0
].
MESSAGE
);
}
}
...
@@ -267,6 +293,21 @@
...
@@ -267,6 +293,21 @@
this
.
loading
=
false
;
this
.
loading
=
false
;
});
});
},
},
deleGonds
(
item
,
idx
)
{
const
currentPL
=
item
.
ZPLDT
[
idx
];
if
(
currentPL
.
ZCODE
)
{
// 删除当前物料 与当前PL关联的所有BL
item
.
ZPLDT
=
item
.
ZPLDT
.
filter
((
ele
)
=>
ele
.
ZCODE
!=
currentPL
.
ZCODE
);
// 查询其他物料中是否有相同的ZCODE
this
.
goodsList
.
forEach
((
ele
)
=>
{
if
(
ele
?.
ZPLDT
?.
some
((
v
)
=>
v
.
ZCODE
==
currentPL
.
ZCODE
))
{
ele
.
ZPLDT
=
ele
.
ZPLDT
.
filter
((
v
)
=>
v
.
ZCODE
!=
currentPL
.
ZCODE
);
}
});
}
else
{
item
.
ZPLDT
.
splice
(
idx
,
1
)
}
},
// 加载更多
// 加载更多
onReachBottom
()
{
onReachBottom
()
{
console
.
log
(
"加载更多inventoryCounting"
);
console
.
log
(
"加载更多inventoryCounting"
);
...
@@ -284,63 +325,64 @@
...
@@ -284,63 +325,64 @@
},
},
handleInputNlpla
(
e
)
{},
handleInputNlpla
(
e
)
{},
handleInputPlnr
(
e
)
{
handleInputPlnr
(
e
)
{
if
(
!
e
)
return
if
(
!
e
)
return
;
this
.
isFocus
=
false
;
this
.
isFocus
=
false
;
console
.
log
(
this
.
pls
,
'this.pls'
)
console
.
log
(
this
.
pls
,
"this.pls"
);
if
(
this
.
pls
.
includes
(
e
))
{
if
(
this
.
pls
.
includes
(
e
))
{
return
this
.
$u
.
toast
(
'请勿重复扫描!'
)
return
this
.
$u
.
toast
(
"请勿重复扫描!"
);
}
}
this
.
getPlnr
(
e
);
this
.
getPlnr
(
e
);
},
},
},
},
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.selectSheet
{
.selectSheet
{
border-bottom
:
1px
solid
#ccc
;
border-bottom
:
1px
solid
#ccc
;
}
}
/
deep
/
.u-sticky
{
/
deep
/
.u-sticky
{
top
:
0
!
important
;
top
:
0
!
important
;
background
:
#fff
;
background
:
#fff
;
}
}
.tabTwo
{
.tabTwo
{
/
deep
/
.u-sticky-wrap
{
/
deep
/
.u-sticky-wrap
{
height
:
330rpx
!
important
;
height
:
330rpx
!
important
;
}
}
}
}
.listTitle
{}
.listTitle
{
}
.contentMore
{
.contentMore
{
margin
:
20rpx
;
margin
:
20rpx
;
}
}
page
{
page
{
background
:
#f8f8f8
;
background
:
#f8f8f8
;
}
}
.headerTitle
{
.headerTitle
{
padding
:
20rpx
;
padding
:
20rpx
;
font-weight
:
600
;
font-weight
:
600
;
.items
{
.items
{
line-height
:
40rpx
;
line-height
:
40rpx
;
}
}
}
}
.btn
{
.btn
{
padding
:
20rpx
;
padding
:
20rpx
;
background
:
#fff
;
background
:
#fff
;
.topSearch
{
.topSearch
{
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
}
}
}
}
.total
{
.total
{
background
:
#fff
;
background
:
#fff
;
color
:
#000
;
color
:
#000
;
padding
:
0rpx
40rpx
;
padding
:
0rpx
40rpx
;
...
@@ -351,17 +393,17 @@
...
@@ -351,17 +393,17 @@
.line
{
.line
{
margin
:
0px
10rpx
;
margin
:
0px
10rpx
;
}
}
}
}
.cardbox
{
.cardbox
{
min-height
:
calc
(
100vh
-
410rpx
);
min-height
:
calc
(
100vh
-
410rpx
);
padding
:
0rpx
20rpx
;
padding
:
0rpx
20rpx
;
margin-top
:
20rpx
;
margin-top
:
20rpx
;
}
}
.cardContent
{
.cardContent
{
border-radius
:
8px
;
border-radius
:
8px
;
background
:
#fff
;
background
:
#fff
;
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
}
}
</
style
>
</
style
>
pages/salesOutbound/scanningList.vue
View file @
eeaf1615
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<view>
<view>
<view
class=
"listItemTitle"
>
<view
class=
"listItemTitle"
>
<view>
<view>
<view
class=
"item"
>
交货单:
{{
item
.
VBELN
}}
</view>
<view
class=
"item"
>
行号:
{{
item
.
POSNR
}}
</view>
<view
class=
"item"
>
行号:
{{
item
.
POSNR
}}
</view>
<view
class=
"item"
>
物料编号:
{{
item
.
MATNR
}}
</view>
<view
class=
"item"
>
物料编号:
{{
item
.
MATNR
}}
</view>
<view
class=
"item"
>
物料描述:
{{
item
.
MAKTX
}}
</view>
<view
class=
"item"
>
物料描述:
{{
item
.
MAKTX
}}
</view>
...
@@ -33,19 +34,17 @@
...
@@ -33,19 +34,17 @@
</view>
</view>
<view
v-if=
"!show"
class=
"bottomBox"
>
<view
v-if=
"!show"
class=
"bottomBox"
>
<view
class=
"bottomItem"
v-for=
"(ele, idx) in list"
:key=
"ele.PLNR+idx"
v-if=
"ele.ZSIZE === item.ZSIZE && ele.MATNR === item.MATNR && ele.PLNR"
>
<view
class=
"bottomItem"
v-for=
"(ele, idx) in list"
:key=
"ele.PLNR+idx"
v-if=
"ele.ZSIZE === item.ZSIZE && ele.MATNR === item.MATNR && ele.PLNR"
>
<view
class=
"items"
v-if=
"ele.ZCODE"
>
BL号:
{{
ele
.
ZCODE
}}
</view>
<view
class=
"items"
>
PL号:
{{
ele
.
PLNR
}}
</view>
<view
class=
"items"
>
PL号:
{{
ele
.
PLNR
}}
</view>
<view
class=
"items"
>
物料批号:
{{
ele
.
CHARG
}}
</view>
<view
class=
"items"
>
物料批号:
{{
ele
.
CHARG
}}
</view>
<view
class=
"items"
>
库位:
{{
ele
.
LGORT
}}
-
{{
ele
.
LGOBE
}}
</view>
<view
class=
"items"
>
库位:
{{
ele
.
LGORT
}}
-
{{
ele
.
LGOBE
}}
</view>
<view
class=
"items"
>
仓位:
{{
ele
.
NLPLA
}}
</view>
<view
class=
"items"
>
仓位:
{{
ele
.
NLPLA
}}
</view>
<!--
<view
class=
"items"
>
{{
ele
.
MATNR
}}
</view>
-->
<view
class=
"items inputItem"
>
数量:
{{
ele
.
PACMG
}}
</view>
<view
class=
"items inputItem"
>
<view
class=
"boxBtn"
>
<!--
<u-row
gutter=
"8"
>
-->
<u-button
class=
"botBtn"
size=
"mini"
type=
"primary"
plain
@
click=
"deleGonds(idx)"
>
数量:
<u-icon
name=
"trash"
size=
"28"
></u-icon>
{{
ele
.
PACMG
}}
删除
<!--
<uni-easyinput
v-model=
"ele.CLABS"
></uni-easyinput>
-->
</u-button>
<!-- /
{{
ele
.
LFIMG
}}
-->
<!--
</u-row>
-->
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -105,6 +104,9 @@ export default {
...
@@ -105,6 +104,9 @@ export default {
},
},
methods
:
{
methods
:
{
deleGonds
(
idx
)
{
this
.
$emit
(
'deleGonds'
,
idx
);
},
handleNum
(){
handleNum
(){
let
num
=
0
let
num
=
0
this
.
list
.
forEach
(
ele
=>
{
this
.
list
.
forEach
(
ele
=>
{
...
@@ -205,6 +207,7 @@ page {
...
@@ -205,6 +207,7 @@ page {
background
:
#f8f8f8
;
background
:
#f8f8f8
;
padding
:
20rpx
;
padding
:
20rpx
;
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
position
:
relative
;
.items
{
.items
{
color
:
#333
;
color
:
#333
;
font-size
:
24rpx
;
font-size
:
24rpx
;
...
@@ -224,6 +227,11 @@ page {
...
@@ -224,6 +227,11 @@ page {
top
:
0
!
important
;
top
:
0
!
important
;
background
:
#fff
;
background
:
#fff
;
}
}
.boxBtn
{
position
:
absolute
;
bottom
:
10rpx
;
right
:
10rpx
;
}
.checkedBox
{
.checkedBox
{
text-align
:
right
;
text-align
:
right
;
}
}
...
...
pages/sendOutGoodsOff/index.vue
View file @
eeaf1615
...
@@ -2,11 +2,23 @@
...
@@ -2,11 +2,23 @@
<view
class=
"lists"
>
<view
class=
"lists"
>
<StickyNavBar>
<StickyNavBar>
<NavBar
title=
"发货下架"
></NavBar>
<NavBar
title=
"发货下架"
></NavBar>
<FactorySelect
v-model=
"lgort"
:options=
"options"
/>
<view
class=
"btn"
>
<view
class=
"btn"
>
<uni-easyinput
class=
"boxSelect"
prefixIcon=
"search"
v-model
.
trim=
"lgort"
placeholder=
"请扫描目标仓位"
></uni-easyinput>
<uni-easyinput
<uni-easyinput
class=
"boxSelect"
prefixIcon=
"search"
v-model
.
trim=
"vbeln"
placeholder=
"请扫描交货单"
@
input=
"handleInputvbeln"
></uni-easyinput>
class=
"boxSelect"
<uni-easyinput
prefixIcon=
"search"
:disabled=
"isDisabled"
v-model
.
trim=
"wxparams"
:focus=
"isFocus"
prefixIcon=
"search"
placeholder=
"请扫描产品包装条码/外箱码"
@
input=
"handleInputPlnr"
></uni-easyinput>
v-model
.
trim=
"vbeln"
placeholder=
"请扫描交货单"
@
input=
"handleInputvbeln"
></uni-easyinput>
<uni-easyinput
prefixIcon=
"search"
:disabled=
"isDisabled"
v-model
.
trim=
"wxparams"
:focus=
"isFocus"
placeholder=
"请扫描产品包装条码/外箱码"
@
input=
"handleInputPlnr"
></uni-easyinput>
</view>
</view>
<!--
<view
class=
"total"
v-show=
"goodsList && goodsList.length > 0"
>
<!--
<view
class=
"total"
v-show=
"goodsList && goodsList.length > 0"
>
<view
class=
"left"
>
明细
</view>
<view
class=
"left"
>
明细
</view>
...
@@ -25,72 +37,83 @@
...
@@ -25,72 +37,83 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
BottomBtn
from
'@/components/BottomBtn/index.vue'
;
import
BottomBtn
from
"@/components/BottomBtn/index.vue"
;
import
ContentLoadingMore
from
"@/components/ContentLoadingMore/index.vue"
;
import
ContentLoadingMore
from
"@/components/ContentLoadingMore/index.vue"
;
import
scanningList
from
"../salesOutbound/scanningList.vue"
;
import
scanningList
from
"../salesOutbound/scanningList.vue"
;
import
StickyNavBar
from
'@/components/StickyNavBar/index.vue'
;
import
StickyNavBar
from
"@/components/StickyNavBar/index.vue"
;
import
{
import
{
parseTime
}
from
"@/utils/ruoyi"
;
parseTime
}
from
"@/utils/ruoyi"
;
export
default
{
export
default
{
components
:
{
components
:
{
StickyNavBar
,
StickyNavBar
,
ContentLoadingMore
,
ContentLoadingMore
,
scanningList
,
scanningList
,
BottomBtn
BottomBtn
,
},
},
data
()
{
data
()
{
return
{
return
{
wxparams
:
""
,
wxparams
:
""
,
lgort
:
''
,
lgort
:
""
,
vbeln
:
''
,
vbeln
:
""
,
isDisabled
:
false
,
isDisabled
:
false
,
isFocus
:
false
,
isFocus
:
false
,
goodsList
:
[],
goodsList
:
[],
options
:
[
{
WERKS
:
"1000"
,
LGORT
:
"S000"
,
LGOBE
:
"发运仓"
,
label
:
"S000-发运仓"
,
value
:
"S000"
,
},
],
pls
:
[],
// 已经扫码的pl号
pls
:
[],
// 已经扫码的pl号
btnArr
:
[{
btnArr
:
[
style
:
''
,
{
type
:
'warning'
,
style
:
""
,
text
:
'返回'
,
type
:
"warning"
,
way
:
'goBack'
text
:
"返回"
,
way
:
"goBack"
,
},
},
{
{
style
:
''
,
style
:
""
,
type
:
'primary'
,
type
:
"primary"
,
text
:
'提交'
,
text
:
"提交"
,
way
:
'goSubmit'
way
:
"goSubmit"
,
}
},
],
],
}
};
},
},
computed
:
{
computed
:
{
/**
/**
* 缓存的扫描过的pl条目
* 缓存的扫描过的pl条目
*/
*/
catchPL
()
{
catchPL
()
{
return
this
.
vuex_sales_outbound
[
this
.
vbeln
]
||
null
return
this
.
vuex_sales_outbound
[
this
.
vbeln
]
||
null
;
}
},
},
},
methods
:
{
methods
:
{
handleInputPlnr
(
e
)
{
handleInputPlnr
(
e
)
{
if
(
!
e
)
return
if
(
!
e
)
return
;
this
.
isFocus
=
false
;
this
.
isFocus
=
false
;
console
.
log
(
this
.
pls
,
'this.pls'
)
console
.
log
(
this
.
pls
,
"this.pls"
);
if
(
this
.
pls
.
includes
(
e
))
{
if
(
this
.
pls
.
includes
(
e
))
{
return
this
.
$u
.
toast
(
'请勿重复扫描!'
)
return
this
.
$u
.
toast
(
"请勿重复扫描!"
);
}
}
this
.
getPlnr
(
e
);
this
.
getPlnr
(
e
);
},
},
getPlnr
(
plnr
)
{
getPlnr
(
plnr
)
{
if
(
!
this
.
goodsList
.
length
)
{
return
this
.
$u
.
toast
(
"请先扫描交货单!"
);
}
let
params
=
{
let
params
=
{
ZCODE
:
plnr
.
includes
(
"BL"
)
?
plnr
:
""
,
ZCODE
:
plnr
.
includes
(
"BL"
)
?
plnr
:
""
,
plnr
:
plnr
.
includes
(
"BL"
)
?
""
:
plnr
,
plnr
:
plnr
.
includes
(
"BL"
)
?
""
:
plnr
,
ztype
:
'005'
ztype
:
"005"
,
};
};
this
.
$u
.
api
.
sapApi
.
sapBlpl
(
params
).
then
((
res
)
=>
{
this
.
$u
.
api
.
sapApi
.
sapBlpl
(
params
).
then
((
res
)
=>
{
if
(
res
&&
res
.
MSG
[
0
].
TYPE
===
"S"
)
{
if
(
res
&&
res
.
MSG
[
0
].
TYPE
===
"S"
)
{
this
.
setSalesBoundPL
(
res
.
BLPL
)
this
.
setSalesBoundPL
(
res
.
BLPL
);
}
else
{
}
else
{
this
.
$u
.
toast
(
res
.
MSG
[
0
].
MESSAGE
);
this
.
$u
.
toast
(
res
.
MSG
[
0
].
MESSAGE
);
}
}
...
@@ -103,12 +126,12 @@
...
@@ -103,12 +126,12 @@
});
});
},
},
setSalesBoundPL
(
pls
)
{
setSalesBoundPL
(
pls
)
{
console
.
log
(
pls
,
'pls'
)
console
.
log
(
pls
,
"pls"
);
// 循环BLPL合并相同的物料号和size
// 循环BLPL合并相同的物料号和size
pls
.
forEach
((
ele
)
=>
{
pls
.
forEach
((
ele
)
=>
{
if
(
!
this
.
pls
.
includes
(
ele
.
PLNR
)
||
!
this
.
pls
.
includes
(
ele
.
ZCODE
))
{
if
(
!
this
.
pls
.
includes
(
ele
.
PLNR
)
||
!
this
.
pls
.
includes
(
ele
.
ZCODE
))
{
ele
.
PLNR
&&
this
.
pls
.
push
(
ele
.
PLNR
)
ele
.
PLNR
&&
this
.
pls
.
push
(
ele
.
PLNR
);
ele
.
ZCODE
&&
this
.
pls
.
push
(
ele
.
ZCODE
)
ele
.
ZCODE
&&
this
.
pls
.
push
(
ele
.
ZCODE
);
}
}
ele
.
TOMNG
=
ele
.
PACMG
;
ele
.
TOMNG
=
ele
.
PACMG
;
const
item
=
this
.
goodsList
.
find
(
const
item
=
this
.
goodsList
.
find
(
...
@@ -123,7 +146,7 @@
...
@@ -123,7 +146,7 @@
}
}
});
});
},
},
initGoodsList
(
arr
)
{
initGoodsList
(
arr
,
VBELN
)
{
// 有SIZE行就取ZINSNUM+ZLOSSC,没有SIZE行的就是取交货单行的LFIMG
// 有SIZE行就取ZINSNUM+ZLOSSC,没有SIZE行的就是取交货单行的LFIMG
arr
.
forEach
((
ele
)
=>
{
arr
.
forEach
((
ele
)
=>
{
if
(
ele
.
ZSIZE
.
length
)
{
if
(
ele
.
ZSIZE
.
length
)
{
...
@@ -142,7 +165,10 @@
...
@@ -142,7 +165,10 @@
XSNUM
:
ele
.
XSNUM
,
XSNUM
:
ele
.
XSNUM
,
MATNR
:
ele
.
MATNR
,
MATNR
:
ele
.
MATNR
,
MAKTX
:
ele
.
MAKTX
,
MAKTX
:
ele
.
MAKTX
,
sumNum
:
item
.
ZINSNUM
+
item
.
ZLOSSC
VBELN
:
VBELN
,
POSNR
:
ele
.
POSNR
,
ZPLDT
:
[],
sumNum
:
item
.
ZINSNUM
+
item
.
ZLOSSC
,
};
};
})
})
);
);
...
@@ -158,109 +184,116 @@
...
@@ -158,109 +184,116 @@
handleInputvbeln
(
VBELN
)
{
handleInputvbeln
(
VBELN
)
{
this
.
$u
.
api
.
sapApi
this
.
$u
.
api
.
sapApi
.
sapSchDn
({
.
sapSchDn
({
VBELN
VBELN
,
}).
then
(
res
=>
{
})
this
.
initGoodsList
(
res
.
BKDT
)
.
then
((
res
)
=>
{
console
.
log
(
this
.
catchPL
,
'this.catchPL'
)
this
.
initGoodsList
(
res
.
BKDT
,
VBELN
);
this
.
catchPL
&&
this
.
setSalesBoundPL
(
this
.
catchPL
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
vbeln
=
""
;
this
.
vbeln
=
""
;
},
1000
);
},
1000
);
})
});
},
},
deleGonds
(
index
)
{
deleGonds
(
index
)
{
this
.
goodsList
.
splice
(
index
,
1
)
this
.
goodsList
.
splice
(
index
,
1
);
},
},
reset
()
{
reset
()
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
isFocus
=
true
;
this
.
isFocus
=
true
;
this
.
isDisabled
=
false
;
this
.
isDisabled
=
false
;
this
.
wxparams
=
''
this
.
wxparams
=
""
;
},
1000
);
},
1000
);
},
},
goBack
()
{
goBack
()
{
uni
.
navigateBack
()
uni
.
navigateBack
();
},
},
getBtnHandle
(
row
)
{
getBtnHandle
(
row
)
{
console
.
log
(
'getBtnHandle'
,
row
);
console
.
log
(
"getBtnHandle"
,
row
);
this
[
row
.
way
]();
this
[
row
.
way
]();
},
},
// 提交
// 提交
goSubmit
()
{
goSubmit
()
{
// console.log(this.goodsList, '--------');
// return
if
(
!
this
.
goodsList
.
length
)
{
if
(
!
this
.
goodsList
.
length
)
{
return
this
.
$u
.
toast
(
'请扫描需要下架的箱条码/外箱码'
)
return
this
.
$u
.
toast
(
"请先扫描交货单!"
);
}
if
(
!
this
.
vbeln
)
{
return
this
.
$u
.
toast
(
'请扫描交货单'
)
}
}
if
(
!
this
.
lgort
)
{
if
(
!
this
.
lgort
)
{
return
this
.
$u
.
toast
(
'请选择目标仓位'
)
return
this
.
$u
.
toast
(
"请选择目标仓位"
);
}
}
const
arr
=
this
.
goodsList
.
map
((
item
)
=>
{
const
arr
=
this
.
goodsList
.
reduce
((
acc
,
cur
)
=>
{
item
.
LGORT
=
this
.
lgort
acc
.
push
(
item
.
VBELN
=
this
.
vbeln
...
cur
.
ZPLDT
.
map
((
item
)
=>
{
return
item
item
.
LGORT
=
this
.
lgort
;
item
.
VBELN
=
cur
.
VBELN
;
item
.
POSNR
=
cur
.
POSNR
;
return
item
;
})
})
this
.
$u
.
api
.
sapApi
);
.
sapCasePlnr2
(
arr
)
return
acc
;
.
then
((
res
)
=>
{
},
[]);
// const arr = this.goodsList.map((item) => {
// item.LGORT = this.lgort
// item.VBELN = this.vbeln
// return item
// })
this
.
$u
.
api
.
sapApi
.
sapCasePlnr2
(
arr
).
then
((
res
)
=>
{
const
flag
=
res
.
some
((
item
)
=>
{
const
flag
=
res
.
some
((
item
)
=>
{
const
b
=
item
.
TYPE
==
'E'
const
b
=
item
.
TYPE
==
"E"
;
if
(
b
)
{
if
(
b
)
{
this
.
$u
.
toast
(
item
.
MESSAGE
)
this
.
$u
.
toast
(
item
.
MESSAGE
);
}
}
return
b
return
b
;
})
});
if
(
!
flag
)
{
if
(
!
flag
)
{
this
.
$u
.
toast
(
res
[
0
].
MESSAGE
);
this
.
$u
.
toast
(
res
[
0
].
MESSAGE
);
this
.
goodsList
=
[]
this
.
goodsList
=
[];
}
}
})
});
},
},
}
},
}
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.lists
{
.lists
{
flex
:
1
;
flex
:
1
;
flex-direction
:
column
;
flex-direction
:
column
;
}
}
page
{
page
{
background
:
#f8f8f8
;
background
:
#f8f8f8
;
}
}
/
deep
/
.u-sticky
{
/
deep
/
.u-sticky
{
top
:
0
!
important
;
top
:
0
!
important
;
background
:
#fff
;
background
:
#fff
;
}
}
.btn
{
.btn
{
padding
:
20rpx
;
padding
:
20rpx
;
background
:
#fff
;
background
:
#fff
;
.boxSelect
{
.boxSelect
{
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
}
}
}
}
.contentMore
{
.contentMore
{
margin
:
20rpx
;
margin
:
20rpx
;
}
}
.cardbox
{
.cardbox
{
max-height
:
calc
(
100vh
-
105px
-
60rpx
-
140rpx
);
max-height
:
calc
(
100vh
-
105px
-
60rpx
-
140rpx
);
padding
:
0rpx
20rpx
;
padding
:
0rpx
20rpx
;
margin-top
:
20rpx
;
margin-top
:
20rpx
;
}
}
.cardContent
{
.cardContent
{
border-radius
:
8px
;
border-radius
:
8px
;
background
:
#fff
;
background
:
#fff
;
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
}
}
.total
{
.total
{
background
:
#fff
;
background
:
#fff
;
color
:
#000
;
color
:
#000
;
padding
:
0rpx
40rpx
;
padding
:
0rpx
40rpx
;
...
@@ -271,5 +304,5 @@
...
@@ -271,5 +304,5 @@
.line
{
.line
{
margin
:
0px
10rpx
;
margin
:
0px
10rpx
;
}
}
}
}
</
style
>
</
style
>
uview-ui/libs/function/toast.js
View file @
eeaf1615
function
toast
(
title
,
duration
=
3000
)
{
function
toast
(
title
,
duration
=
3000
,
params
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
title
,
title
:
title
,
icon
:
'none'
,
icon
:
'none'
,
duration
:
duration
duration
:
duration
,
...
params
})
})
}
}
...
...
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