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
cbacb518
Commit
cbacb518
authored
Jul 16, 2024
by
何远江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
销售拣货添加新字段
parent
755f316e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
50 deletions
+54
-50
salesOutboundList.vue
pages/salesOutbound/salesOutboundList.vue
+54
-50
No files found.
pages/salesOutbound/salesOutboundList.vue
View file @
cbacb518
...
@@ -3,9 +3,10 @@
...
@@ -3,9 +3,10 @@
<StickyNavBar
class=
"listTitle"
>
<StickyNavBar
class=
"listTitle"
>
<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"
>
8|李XXXXXXX体
</view>
<view
class=
"items"
>
{{
saleInfo
.
KUNNR
}}
|
{{
saleInfo
.
NAME1
}}
</view>
<view
class=
"items"
>
计划日期:9999/99/99
</view>
<view
class=
"items"
>
计划日期:
{{
saleInfo
.
WADAT
}}
</view>
<view
class=
"items"
>
装箱数:
{{
catchPL
&&
catchPL
.
length
||
0
}}
/
{{
Number
(
saleInfo
.
XSNUM
)
}}
</view>
</view>
</view>
<view
class=
""
>
<view
class=
""
>
<view
class=
"btn"
>
<view
class=
"btn"
>
...
@@ -75,7 +76,7 @@
...
@@ -75,7 +76,7 @@
isDisabled
:
false
,
isDisabled
:
false
,
nlpla
:
""
,
nlpla
:
""
,
wxparams
:
""
,
wxparams
:
""
,
goodsList
:
[],
goodsList
:
[],
pls
:
[],
// 已经扫码的pl号
pls
:
[],
// 已经扫码的pl号
resFlag
:
false
,
resFlag
:
false
,
};
};
...
@@ -92,13 +93,16 @@
...
@@ -92,13 +93,16 @@
totalNum
()
{
totalNum
()
{
const
count
=
this
.
goodsList
.
filter
((
item
)
=>
item
.
checkedBox
).
length
;
const
count
=
this
.
goodsList
.
filter
((
item
)
=>
item
.
checkedBox
).
length
;
return
count
||
0
;
return
count
||
0
;
},
/**
* 缓存的扫描过的pl条目
*/
catchPL
()
{
return
this
.
vuex_sales_outbound
[
this
.
vbeln
]
||
null
},
},
/**
* 缓存的扫描过的pl条目
*/
catchPL
()
{
return
this
.
vuex_sales_outbound
[
this
.
vbeln
]
||
null
},
saleInfo
()
{
return
this
.
goodsList
[
0
]
||
{}
}
},
},
methods
:
{
methods
:
{
goSubmit
()
{
goSubmit
()
{
...
@@ -143,14 +147,14 @@
...
@@ -143,14 +147,14 @@
return
f
;
return
f
;
});
});
if
(
!
flag
)
{
if
(
!
flag
)
{
this
.
$u
.
toast
(
"提交成功"
);
this
.
$u
.
toast
(
"提交成功"
);
// 如果有缓存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
();
...
@@ -164,14 +168,14 @@
...
@@ -164,14 +168,14 @@
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执行缓存
// 如果已经扫描pl执行缓存
if
(
pls
.
length
)
{
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
(
'保存成功!'
)
}
}
},
},
...
@@ -180,8 +184,8 @@
...
@@ -180,8 +184,8 @@
.
sapSchDn
({
.
sapSchDn
({
VBELN
VBELN
}).
then
(
res
=>
{
}).
then
(
res
=>
{
this
.
initGoodsList
(
res
.
BKDT
)
this
.
initGoodsList
(
res
.
BKDT
)
console
.
log
(
this
.
catchPL
,
'this.catchPL'
)
console
.
log
(
this
.
catchPL
,
'this.catchPL'
)
this
.
catchPL
&&
this
.
setSalesBoundPL
(
this
.
catchPL
)
this
.
catchPL
&&
this
.
setSalesBoundPL
(
this
.
catchPL
)
})
})
},
},
...
@@ -212,27 +216,27 @@
...
@@ -212,27 +216,27 @@
this
.
$u
.
toast
(
`物料编号:
${
ele
.
MATNR
}
--没有尺码信息`
);
this
.
$u
.
toast
(
`物料编号:
${
ele
.
MATNR
}
--没有尺码信息`
);
}
}
});
});
},
},
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
(
(
v
)
=>
v
.
ZSIZE
==
ele
.
ZSIZE
&&
ele
.
MATNR
==
v
.
MATNR
(
v
)
=>
v
.
ZSIZE
==
ele
.
ZSIZE
&&
ele
.
MATNR
==
v
.
MATNR
);
);
if
(
item
)
{
if
(
item
)
{
if
(
Reflect
.
has
(
item
,
"ZPLDT"
))
{
if
(
Reflect
.
has
(
item
,
"ZPLDT"
))
{
item
.
ZPLDT
.
push
(
ele
);
item
.
ZPLDT
.
push
(
ele
);
}
else
{
}
else
{
this
.
$set
(
item
,
"ZPLDT"
,
[
ele
]);
this
.
$set
(
item
,
"ZPLDT"
,
[
ele
]);
}
}
}
}
});
});
},
},
getPlnr
(
plnr
)
{
getPlnr
(
plnr
)
{
let
params
=
{
let
params
=
{
...
@@ -269,13 +273,13 @@
...
@@ -269,13 +273,13 @@
this
.
current
=
index
;
this
.
current
=
index
;
},
},
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
);
},
},
},
},
...
@@ -350,4 +354,4 @@
...
@@ -350,4 +354,4 @@
background
:
#fff
;
background
:
#fff
;
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
}
}
</
style
>
</
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