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
2ffbcb83
Commit
2ffbcb83
authored
Mar 26, 2024
by
xiangzj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代理服务优化
parent
ce7d487d
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
354 additions
and
190 deletions
+354
-190
config.js
common/config.js
+4
-2
http.api.js
common/http.api.js
+6
-1
http.interceptor.js
common/http.interceptor.js
+2
-3
manifest.json
manifest.json
+6
-7
confirComplete.vue
pages/confirComplete/confirComplete.vue
+171
-86
purchaseStorage.vue
pages/purchaseStorage/purchaseStorage.vue
+146
-86
index.js
uview-ui/libs/request/index.js
+10
-3
vue.config.js
vue.config.js
+9
-2
No files found.
common/config.js
View file @
2ffbcb83
...
@@ -21,8 +21,10 @@ const config = {
...
@@ -21,8 +21,10 @@ const config = {
}
}
// 设置后台接口服务的基础地址
// 设置后台接口服务的基础地址
config
.
baseUrl
=
'http://192.168.3.91:8080'
;
// config.baseUrl = 'http://192.168.3.91:8080'; //测试环境java
config
.
baseSapUrl
=
'http://192.168.3.109:8080'
;
//sap接口服务
// config.baseUrl = 'http://192.168.3.109:8000'; //测试环境sap
config
.
baseUrl
=
''
;
//sap接口服务
// config.baseSapUrl = '/sapApi'; //sap接口服务
//config.baseUrl = "http://101.43.244.58:8080/";
//config.baseUrl = "http://101.43.244.58:8080/";
//config.baseUrl = "/api";
//config.baseUrl = "/api";
//config.baseUrl = "http://101.200.162.168:8080";
//config.baseUrl = "http://101.200.162.168:8080";
...
...
common/http.api.js
View file @
2ffbcb83
...
@@ -14,7 +14,7 @@ const install = (Vue, vm) => {
...
@@ -14,7 +14,7 @@ const install = (Vue, vm) => {
lang
:
(
params
=
{})
=>
vm
.
$u
.
get
(
'/lang/'
+
params
.
lang
),
lang
:
(
params
=
{})
=>
vm
.
$u
.
get
(
'/lang/'
+
params
.
lang
),
index
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/mobile/index'
,
params
),
index
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/mobile/index'
,
params
),
getUserInfo
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/mobile/user/getUserInfo'
,
params
),
getUserInfo
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/mobile/user/getUserInfo'
,
params
),
login
:
(
params
=
{})
=>
vm
.
$u
.
post
(
config
.
adminPath
+
'/mobile/login/loginByPassword'
,
params
),
login
:
(
params
=
{})
=>
vm
.
$u
.
post
(
'/mobile/login/loginByPassword'
,
params
),
sendCode
:
(
params
=
{})
=>
vm
.
$u
.
post
(
config
.
adminPath
+
'/mobile/login/sendCode'
,
params
),
sendCode
:
(
params
=
{})
=>
vm
.
$u
.
post
(
config
.
adminPath
+
'/mobile/login/sendCode'
,
params
),
registerUser
:
(
params
=
{})
=>
vm
.
$u
.
post
(
config
.
adminPath
+
'/mobile/user/registerUser'
,
params
),
registerUser
:
(
params
=
{})
=>
vm
.
$u
.
post
(
config
.
adminPath
+
'/mobile/user/registerUser'
,
params
),
...
@@ -30,6 +30,11 @@ const install = (Vue, vm) => {
...
@@ -30,6 +30,11 @@ const install = (Vue, vm) => {
empUser
:
{
empUser
:
{
listData
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/sys/empUser/listData'
,
params
),
listData
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/sys/empUser/listData'
,
params
),
},
},
sapApi
:
{
// 采购入库
sapRrm
:
(
params
=
{})
=>
vm
.
$u
.
post
(
config
.
adminPath
+
'/sap/bc/erp_ep/cud_mm_rrm/rrm?sap-client=300'
,
params
),
sapPlnr
:
(
params
=
{})
=>
vm
.
$u
.
post
(
config
.
adminPath
+
'/sap/bc/erp_ep/get_mm_plnr/plnr?sap-client=300'
,
params
,),
}
};
};
}
}
...
...
common/http.interceptor.js
View file @
2ffbcb83
...
@@ -11,7 +11,6 @@ const install = (Vue, vm) => {
...
@@ -11,7 +11,6 @@ const install = (Vue, vm) => {
// 请求参数默认配置
// 请求参数默认配置
Vue
.
prototype
.
$u
.
http
.
setConfig
({
Vue
.
prototype
.
$u
.
http
.
setConfig
({
baseUrl
:
vm
.
vuex_config
.
baseUrl
,
baseUrl
:
vm
.
vuex_config
.
baseUrl
,
baseSapUrl
:
vm
.
vuex_config
.
baseSapUrl
,
originalData
:
true
,
originalData
:
true
,
// 默认头部,http2约定header名称统一小写 aidex
// 默认头部,http2约定header名称统一小写 aidex
header
:
{
header
:
{
...
@@ -56,7 +55,7 @@ const install = (Vue, vm) => {
...
@@ -56,7 +55,7 @@ const install = (Vue, vm) => {
}
}
// 根据返回的code值来做不同的处理
// 根据返回的code值来做不同的处理
switch
(
res
.
data
?.
c
ode
)
{
switch
(
res
.
statusC
ode
)
{
case
401
:
case
401
:
uni
.
reLaunch
({
uni
.
reLaunch
({
url
:
'/pages/sys/login/login'
url
:
'/pages/sys/login/login'
...
@@ -81,7 +80,7 @@ const install = (Vue, vm) => {
...
@@ -81,7 +80,7 @@ const install = (Vue, vm) => {
if
(
data
.
msg
!==
null
)
{
if
(
data
.
msg
!==
null
)
{
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
icon
:
'none'
,
title
:
data
.
msg
,
title
:
data
.
msg
||
'未连接到服务器'
,
duration
:
3000
duration
:
3000
})
})
}
else
{
}
else
{
...
...
manifest.json
View file @
2ffbcb83
{
{
"name"
:
"mes-pda"
,
"name"
:
"mes-pda"
,
"appid"
:
"__UNI__
2D1FF48
"
,
"appid"
:
"__UNI__
E23397B
"
,
"description"
:
"MES-PDA"
,
"description"
:
"MES-PDA"
,
"versionName"
:
"1.0.0"
,
"versionName"
:
"1.0.0"
,
"versionCode"
:
"100"
,
"versionCode"
:
"100"
,
...
@@ -60,12 +60,11 @@
...
@@ -60,12 +60,11 @@
"ad"
:
{}
"ad"
:
{}
},
},
"icons"
:
{
"icons"
:
{
"android"
:
{
"android"
:
{},
"hdpi"
:
"unpackage/res/icons/72x72.png"
,
//
"hdpi"
:
"unpackage/res/icons/72x72.png"
,
"xhdpi"
:
"unpackage/res/icons/96x96.png"
,
//
"xhdpi"
:
"unpackage/res/icons/96x96.png"
,
"xxhdpi"
:
"unpackage/res/icons/144x144.png"
,
//
"xxhdpi"
:
"unpackage/res/icons/144x144.png"
,
"xxxhdpi"
:
"unpackage/res/icons/192x192.png"
//
"xxxhdpi"
:
"unpackage/res/icons/192x192.png"
},
"ios"
:
{
"ios"
:
{
"appstore"
:
"unpackage/res/icons/1024x1024.png"
,
"appstore"
:
"unpackage/res/icons/1024x1024.png"
,
"ipad"
:
{
"ipad"
:
{
...
...
pages/confirComplete/confirComplete.vue
View file @
2ffbcb83
<
template
>
<
template
>
<view>
<view>
<StickyNavBar>
<StickyNavBar>
<NavBar
title=
"
采购
入库扫描"
></NavBar>
<NavBar
title=
"
完工
入库扫描"
></NavBar>
<view
class=
"btn"
>
<view
class=
"btn"
>
<uni-easyinput
prefixIcon=
"search"
class=
"topSearch"
v-model=
"value"
focus
placeholder=
"请扫描库位"
@
input=
"handleInput"
></uni-easyinput>
<uni-easyinput
prefixIcon=
"search"
class=
"topSearch"
v-model=
"nlpla"
focus
placeholder=
"请扫描库位"
@
change=
"handleInputNlpla"
></uni-easyinput>
<uni-easyinput
prefixIcon=
"search"
v-model=
"wxparams"
focus
placeholder=
"请扫描产品包装条码/外箱码"
@
input=
"handleInput"
></uni-easyinput>
<uni-easyinput
prefixIcon=
"search"
:disabled=
"isDisabled"
v-model=
"wxparams"
:focus=
"isFocus"
placeholder=
"请扫描产品包装条码/外箱码"
@
input=
"handleInputPlnr"
></uni-easyinput>
</view>
</view>
</StickyNavBar>
<ContentLoadingMore
class=
"contentMore"
>
<view
class=
"total"
>
<view
class=
"total"
>
<view
class=
"left"
>
入库明细
</view>
<view
class=
"left"
>
入库明细
</view>
<view
class=
"right"
>
<view
class=
"right"
>
批次数:
批次数:
<text
class=
"blue"
>
{{
number
}}
</text>
<text
class=
"blue"
>
{{
goodsList
.
length
}}
</text>
<text
class=
"line"
>
|
</text>
<text
class=
"line"
>
|
</text>
总数量:
总数量:
<text
class=
"blue"
>
{{
total
}}
</text>
<text
class=
"blue"
>
{{
total
Num
}}
</text>
</view>
</view>
</view>
</view>
</StickyNavBar>
<view
class=
"cardbox"
>
<view
class=
"cardbox"
>
<view
class=
"cardConten
t"
>
<view
class=
"cardContent"
v-for=
"(item, index) in goodsLis
t"
>
<view
class=
"listItemTitle"
>
<view
class=
"listItemTitle"
>
<view>
<view>
<view
class=
"item"
>
入库批次:L99999999
</view>
<view
class=
"item"
>
入库批次:
{{
item
.
CHARG
}}
</view>
<view
class=
"item"
>
产品编号:L99999999
</view>
<view
class=
"item"
>
产品编号:
{{
item
.
MATNR
}}
</view>
<view
class=
"item"
>
产品描述:L99999999
</view>
<view
class=
"item"
>
产品描述:
{{
item
.
MAKTX
}}
</view>
<view
class=
"item"
>
入库数量:L99999999
</view>
<view
class=
"item"
>
入库数量:
{{
item
.
ERFMG
}}
</view>
<view
class=
"item"
>
入库库位:L99999999
</view>
<view
class=
"item"
>
入库库位:
{{
item
.
MATNR
}}
</view>
</view>
</view>
<u-button
size=
"mini"
type=
"primary"
plain
>
<u-button
size=
"mini"
type=
"primary"
plain
@
click=
"deleGonds(index)"
>
<u-icon
name=
"trash"
size=
"28"
></u-icon>
<u-icon
name=
"trash"
size=
"28"
></u-icon>
删除
删除
</u-button>
</u-button>
...
@@ -50,52 +55,15 @@
...
@@ -50,52 +55,15 @@
</view>
</view>
<view
v-if=
"!show"
class=
"bottomBox"
>
<view
v-if=
"!show"
class=
"bottomBox"
>
<view
class=
"bottomItem"
>
<view
class=
"bottomItem"
>
<view
class=
"items"
>
C00990099900027
</view>
<view
class=
"items"
>
{{
item
.
CHARG
}}
</view>
<view
class=
"items"
>
C009900|防霉抗菌包装纸
</view>
<view
class=
"items"
>
{{
item
.
MATNR
}}
</view>
<view
class=
"items"
>
数量:80PCS
</view>
<view
class=
"items"
>
数量:
{{
item
.
ERFMG
}}
</view>
<view
class=
"items"
>
生产日期:2023-10-27
</view>
<view
class=
"items"
>
生产日期:
{{
item
.
BLDAT
}}
</view>
</view>
<view
class=
"bottomItem"
>
<view
class=
"items"
>
C00990099900027
</view>
<view
class=
"items"
>
C009900|防霉抗菌包装纸
</view>
<view
class=
"items"
>
数量:80PCS
</view>
<view
class=
"items"
>
生产日期:2023-10-27
</view>
</view>
<view
class=
"bottomItem"
>
<view
class=
"items"
>
C00990099900027
</view>
<view
class=
"items"
>
C009900|防霉抗菌包装纸
</view>
<view
class=
"items"
>
数量:80PCS
</view>
<view
class=
"items"
>
生产日期:2023-10-27
</view>
</view>
<view
class=
"bottomItem"
>
<view
class=
"items"
>
C00990099900027
</view>
<view
class=
"items"
>
C009900|防霉抗菌包装纸
</view>
<view
class=
"items"
>
数量:80PCS
</view>
<view
class=
"items"
>
生产日期:2023-10-27
</view>
</view>
<view
class=
"bottomItem"
>
<view
class=
"items"
>
C00990099900027
</view>
<view
class=
"items"
>
C009900|防霉抗菌包装纸
</view>
<view
class=
"items"
>
数量:80PCS
</view>
<view
class=
"items"
>
生产日期:2023-10-27
</view>
</view>
<view
class=
"bottomItem"
>
<view
class=
"items"
>
C00990099900027
</view>
<view
class=
"items"
>
C009900|防霉抗菌包装纸
</view>
<view
class=
"items"
>
数量:80PCS
</view>
<view
class=
"items"
>
生产日期:2023-10-27
</view>
</view>
<view
class=
"bottomItem"
>
<view
class=
"items"
>
C00990099900027
</view>
<view
class=
"items"
>
C009900|防霉抗菌包装纸
</view>
<view
class=
"items"
>
数量:80PCS
</view>
<view
class=
"items"
>
生产日期:2023-10-27
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</ContentLoadingMore>
<BottomBtn
:btnArr=
"btnArr"
@
getBtnHandle=
"getBtnHandle"
></BottomBtn>
<BottomBtn
:btnArr=
"btnArr"
@
getBtnHandle=
"getBtnHandle"
></BottomBtn>
</view>
</view>
</
template
>
</
template
>
...
@@ -112,10 +80,10 @@ export default {
...
@@ -112,10 +80,10 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
number
:
2
,
number
:
0
,
total
:
20
0
,
total
Num
:
0
,
show
:
true
,
show
:
true
,
value
:
''
,
nlpla
:
''
,
wxparams
:
''
,
wxparams
:
''
,
btnArr
:
[
btnArr
:
[
{
{
...
@@ -130,19 +98,135 @@ export default {
...
@@ -130,19 +98,135 @@ export default {
text
:
'提交'
,
text
:
'提交'
,
way
:
'goSubmit'
way
:
'goSubmit'
}
}
]
],
goodsList
:
[],
isFocus
:
false
,
isDisabled
:
false
};
};
},
},
created
()
{
this
.
getPlnr
(
'10000820240325000001|10000320100'
);
},
methods
:
{
methods
:
{
deleGonds
(
idx
)
{
this
.
goodsList
.
splice
(
idx
,
1
);
this
.
totalNum
=
0
;
this
.
goodsList
.
forEach
((
ele
)
=>
{
this
.
totalNum
+=
ele
.
ERFMG
;
});
},
getBtnHandle
(
row
)
{
getBtnHandle
(
row
)
{
this
[
row
.
way
]();
this
[
row
.
way
]();
},
},
goBack
()
{
goBack
()
{
uni
.
navigateBack
();
uni
.
navigateBack
();
},
},
goSubmit
()
{},
goSubmit
()
{
handleInput
(
e
)
{
if
(
this
.
goodsList
.
length
===
0
)
{
console
.
log
(
e
,
'eee'
);
return
;
}
this
.
$u
.
api
.
sapApi
.
sapRrm
([
{
"LFSNR"
:
""
,
"BLDAT"
:
"20240325"
,
"BUDAT"
:
"20240325"
,
"ZENCODE"
:
"A002"
,
"ITEM"
:
[
{
"PLNR"
:
""
,
"AUFNR"
:
"1000000122"
,
"MATNR"
:
"6000336"
,
"WERKS"
:
"1000"
,
"LGORT"
:
"8006"
,
"CHARG"
:
"2432500006"
,
"PACKNR"
:
""
,
"PAZEIL"
:
""
,
"INSNAM"
:
""
,
"ZINSTNUM"
:
""
,
"ZSIZE"
:
""
,
"ZMNGO"
:
""
,
"ZMNGL"
:
""
,
"ERFME"
:
""
,
"BRGEW"
:
""
,
"NTGEW"
:
""
,
"GEWEI"
:
""
,
"LGNUM"
:
""
,
"NLTYP"
:
""
,
"NLBER"
:
""
,
"NLPLA"
:
"YA-01-01-1"
,
"PACMG"
:
""
,
"ERFMG"
:
"10"
,
"MIGO_INSMK"
:
"10"
,
"HSDAT"
:
"20230325"
,
"EBELN"
:
"8000000119"
,
"EBELP"
:
"10"
,
"GERNR"
:
""
,
"meins"
:
"KG"
,
"UMLGO"
:
"8006"
,
"UMCHA"
:
""
}
]
}
])
.
then
((
res
)
=>
{
this
.
loading
=
false
;
console
.
log
(
res
);
if
(
res
.
every
((
item
)
=>
item
.
TYPE
===
'S'
))
{
this
.
goodsList
=
[];
this
.
totalNum
=
0
;
this
.
nlpla
=
''
;
this
.
wxparams
=
''
;
this
.
$u
.
toast
(
'提交成功'
);
}
res
.
forEach
((
ele
)
=>
{
if
(
ele
.
TYPE
===
'E'
)
{
this
.
$u
.
toast
(
ele
.
MESSAGE
);
}
});
});
},
handleInputPlnr
(
e
)
{
this
.
isFocus
=
false
;
e
&&
this
.
getPlnr
(
e
);
},
handleInputNlpla
(
e
)
{
if
(
e
)
{
this
.
nlpla
=
e
;
this
.
goodsList
.
forEach
((
ele
)
=>
{
this
.
totalNum
+=
ele
.
ERFMG
;
ele
.
NLPLA
=
ele
.
NLPLA
||
this
.
nlpla
;
});
}
},
getPlnr
(
plnr
)
{
this
.
totalNum
=
0
;
this
.
isDisabled
=
true
this
.
$u
.
api
.
sapApi
.
sapPlnr
({
plnr
})
.
then
((
res
)
=>
{
if
(
res
.
RESULT
.
TYPE
===
'S'
)
{
this
.
goodsList
=
this
.
goodsList
.
concat
(
res
.
DATA
);
this
.
goodsList
.
forEach
((
ele
)
=>
{
this
.
totalNum
+=
ele
.
ERFMG
;
ele
.
NLPLA
=
ele
.
NLPLA
||
this
.
nlpla
;
});
setTimeout
(()
=>
{
this
.
wxparams
=
''
;
this
.
isFocus
=
true
;
this
.
isDisabled
=
false
},
1000
);
}
else
{
setTimeout
(()
=>
{
this
.
isFocus
=
true
;
this
.
isDisabled
=
false
},
1000
);
this
.
$u
.
toast
(
res
.
RESULT
.
MESSAGE
);
}
this
.
loading
=
false
;
});
}
}
}
}
};
};
...
@@ -175,6 +259,7 @@ page {
...
@@ -175,6 +259,7 @@ page {
color
:
#3f9dcc
;
color
:
#3f9dcc
;
}
}
.total
{
.total
{
background
:
#fff
;
color
:
#000
;
color
:
#000
;
padding
:
0rpx
40rpx
;
padding
:
0rpx
40rpx
;
display
:
flex
;
display
:
flex
;
...
@@ -204,11 +289,11 @@ page {
...
@@ -204,11 +289,11 @@ page {
margin-top
:
10rpx
;
margin-top
:
10rpx
;
}
}
.item
{
.item
{
height
:
50rpx
;
line-height
:
50rpx
;
line-height
:
50rpx
;
color
:
#000
;
color
:
#000
;
font-size
:
28rpx
;
font-size
:
28rpx
;
font-weight
:
500
;
font-weight
:
500
;
word-break
:
break-all
;
}
}
}
}
.listBottom
{
.listBottom
{
...
...
pages/purchaseStorage/purchaseStorage.vue
View file @
2ffbcb83
...
@@ -3,33 +3,38 @@
...
@@ -3,33 +3,38 @@
<StickyNavBar>
<StickyNavBar>
<NavBar
title=
"采购入库扫描"
></NavBar>
<NavBar
title=
"采购入库扫描"
></NavBar>
<view
class=
"btn"
>
<view
class=
"btn"
>
<uni-easyinput
prefixIcon=
"search"
class=
"topSearch"
v-model=
"value"
focus
placeholder=
"请扫描库位"
@
input=
"handleInput"
></uni-easyinput>
<uni-easyinput
prefixIcon=
"search"
class=
"topSearch"
v-model=
"nlpla"
focus
placeholder=
"请扫描库位"
@
change=
"handleInputNlpla"
></uni-easyinput>
<uni-easyinput
prefixIcon=
"search"
v-model=
"wxparams"
focus
placeholder=
"请扫描产品包装条码/外箱码"
@
input=
"handleInput"
></uni-easyinput>
<uni-easyinput
prefixIcon=
"search"
:disabled=
"isDisabled"
v-model=
"wxparams"
:focus=
"isFocus"
placeholder=
"请扫描产品包装条码/外箱码"
@
input=
"handleInputPlnr"
></uni-easyinput>
</view>
</view>
</StickyNavBar>
<ContentLoadingMore
class=
"contentMore"
>
<view
class=
"total"
>
<view
class=
"total"
>
<view
class=
"left"
>
入库明细
</view>
<view
class=
"left"
>
入库明细
</view>
<view
class=
"right"
>
<view
class=
"right"
>
批次数:
批次数:
<text
class=
"blue"
>
{{
number
}}
</text>
<text
class=
"blue"
>
{{
goodsList
.
length
}}
</text>
<text
class=
"line"
>
|
</text>
<text
class=
"line"
>
|
</text>
总数量:
总数量:
<text
class=
"blue"
>
{{
total
}}
</text>
<text
class=
"blue"
>
{{
total
Num
}}
</text>
</view>
</view>
</view>
</view>
</StickyNavBar>
<view
class=
"cardbox"
>
<view
class=
"cardbox"
>
<view
class=
"cardConten
t"
>
<view
class=
"cardContent"
v-for=
"(item, index) in goodsLis
t"
>
<view
class=
"listItemTitle"
>
<view
class=
"listItemTitle"
>
<view>
<view>
<view
class=
"item"
>
入库批次:L99999999
</view>
<view
class=
"item"
>
入库批次:
{{
item
.
CHARG
}}
</view>
<view
class=
"item"
>
物料编号:L99999999
</view>
<view
class=
"item"
>
物料编号:
{{
item
.
MATNR
}}
</view>
<view
class=
"item"
>
物料描述:L99999999
</view>
<view
class=
"item"
>
物料描述:
{{
item
.
MAKTX
}}
</view>
<view
class=
"item"
>
入库数量:L99999999
</view>
<view
class=
"item"
>
入库数量:
{{
item
.
ERFMG
}}
</view>
<view
class=
"item"
>
入库库位:L99999999
</view>
<view
class=
"item"
>
入库库位:
{{
item
.
MATNR
}}
</view>
</view>
</view>
<u-button
size=
"mini"
type=
"primary"
plain
>
<u-button
size=
"mini"
type=
"primary"
plain
@
click=
"deleGonds(index)"
>
<u-icon
name=
"trash"
size=
"28"
></u-icon>
<u-icon
name=
"trash"
size=
"28"
></u-icon>
删除
删除
</u-button>
</u-button>
...
@@ -50,52 +55,15 @@
...
@@ -50,52 +55,15 @@
</view>
</view>
<view
v-if=
"!show"
class=
"bottomBox"
>
<view
v-if=
"!show"
class=
"bottomBox"
>
<view
class=
"bottomItem"
>
<view
class=
"bottomItem"
>
<view
class=
"items"
>
C00990099900027
</view>
<view
class=
"items"
>
{{
item
.
CHARG
}}
</view>
<view
class=
"items"
>
C009900|防霉抗菌包装纸
</view>
<view
class=
"items"
>
{{
item
.
MATNR
}}
</view>
<view
class=
"items"
>
数量:80PCS
</view>
<view
class=
"items"
>
数量:
{{
item
.
ERFMG
}}
</view>
<view
class=
"items"
>
生产日期:2023-10-27
</view>
<view
class=
"items"
>
生产日期:
{{
item
.
BLDAT
}}
</view>
</view>
<view
class=
"bottomItem"
>
<view
class=
"items"
>
C00990099900027
</view>
<view
class=
"items"
>
C009900|防霉抗菌包装纸
</view>
<view
class=
"items"
>
数量:80PCS
</view>
<view
class=
"items"
>
生产日期:2023-10-27
</view>
</view>
<view
class=
"bottomItem"
>
<view
class=
"items"
>
C00990099900027
</view>
<view
class=
"items"
>
C009900|防霉抗菌包装纸
</view>
<view
class=
"items"
>
数量:80PCS
</view>
<view
class=
"items"
>
生产日期:2023-10-27
</view>
</view>
<view
class=
"bottomItem"
>
<view
class=
"items"
>
C00990099900027
</view>
<view
class=
"items"
>
C009900|防霉抗菌包装纸
</view>
<view
class=
"items"
>
数量:80PCS
</view>
<view
class=
"items"
>
生产日期:2023-10-27
</view>
</view>
<view
class=
"bottomItem"
>
<view
class=
"items"
>
C00990099900027
</view>
<view
class=
"items"
>
C009900|防霉抗菌包装纸
</view>
<view
class=
"items"
>
数量:80PCS
</view>
<view
class=
"items"
>
生产日期:2023-10-27
</view>
</view>
<view
class=
"bottomItem"
>
<view
class=
"items"
>
C00990099900027
</view>
<view
class=
"items"
>
C009900|防霉抗菌包装纸
</view>
<view
class=
"items"
>
数量:80PCS
</view>
<view
class=
"items"
>
生产日期:2023-10-27
</view>
</view>
<view
class=
"bottomItem"
>
<view
class=
"items"
>
C00990099900027
</view>
<view
class=
"items"
>
C009900|防霉抗菌包装纸
</view>
<view
class=
"items"
>
数量:80PCS
</view>
<view
class=
"items"
>
生产日期:2023-10-27
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</ContentLoadingMore>
<BottomBtn
:btnArr=
"btnArr"
@
getBtnHandle=
"getBtnHandle"
></BottomBtn>
<BottomBtn
:btnArr=
"btnArr"
@
getBtnHandle=
"getBtnHandle"
></BottomBtn>
</view>
</view>
</
template
>
</
template
>
...
@@ -112,10 +80,10 @@ export default {
...
@@ -112,10 +80,10 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
number
:
2
,
number
:
0
,
total
:
20
0
,
total
Num
:
0
,
show
:
true
,
show
:
true
,
value
:
''
,
nlpla
:
''
,
wxparams
:
''
,
wxparams
:
''
,
btnArr
:
[
btnArr
:
[
{
{
...
@@ -130,19 +98,110 @@ export default {
...
@@ -130,19 +98,110 @@ export default {
text
:
'提交'
,
text
:
'提交'
,
way
:
'goSubmit'
way
:
'goSubmit'
}
}
]
],
goodsList
:
[],
isFocus
:
false
,
isDisabled
:
false
};
};
},
},
created
()
{
// this.getPlnr('10000820240325000001|10000320100');
},
methods
:
{
methods
:
{
deleGonds
(
idx
)
{
this
.
goodsList
.
splice
(
idx
,
1
);
this
.
totalNum
=
0
;
this
.
goodsList
.
forEach
((
ele
)
=>
{
this
.
totalNum
+=
ele
.
ERFMG
;
});
},
getBtnHandle
(
row
)
{
getBtnHandle
(
row
)
{
this
[
row
.
way
]();
this
[
row
.
way
]();
},
},
goBack
()
{
goBack
()
{
uni
.
navigateBack
();
uni
.
navigateBack
();
},
},
goSubmit
()
{},
goSubmit
()
{
handleInput
(
e
)
{
if
(
this
.
goodsList
.
length
===
0
)
{
console
.
log
(
e
,
'eee'
);
return
;
}
console
.
log
([
{
BLDAT
:
'20240325'
,
BUDAT
:
'20240325'
,
ZENCODE
:
'A001'
,
TYPE
:
'CG'
,
ITEM
:
this
.
goodsList
}
]);
this
.
$u
.
api
.
sapApi
.
sapRrm
([
{
BLDAT
:
'20240325'
,
BUDAT
:
'20240325'
,
ZENCODE
:
'A001'
,
TYPE
:
'CG'
,
ITEM
:
this
.
goodsList
}
])
.
then
((
res
)
=>
{
this
.
loading
=
false
;
console
.
log
(
res
);
if
(
res
.
every
((
item
)
=>
item
.
TYPE
===
'S'
))
{
this
.
goodsList
=
[];
this
.
totalNum
=
0
;
this
.
nlpla
=
''
;
this
.
wxparams
=
''
;
this
.
$u
.
toast
(
'提交成功'
);
}
res
.
forEach
((
ele
)
=>
{
if
(
ele
.
TYPE
===
'E'
)
{
this
.
$u
.
toast
(
ele
.
MESSAGE
);
}
});
});
},
handleInputPlnr
(
e
)
{
this
.
isFocus
=
false
;
e
&&
this
.
getPlnr
(
e
);
},
handleInputNlpla
(
e
)
{
if
(
e
)
{
this
.
nlpla
=
e
;
this
.
goodsList
.
forEach
((
ele
)
=>
{
this
.
totalNum
+=
ele
.
ERFMG
;
ele
.
NLPLA
=
ele
.
NLPLA
||
this
.
nlpla
;
});
}
},
getPlnr
(
plnr
)
{
this
.
totalNum
=
0
;
this
.
isDisabled
=
true
;
this
.
$u
.
api
.
sapApi
.
sapPlnr
({
plnr
})
.
then
((
res
)
=>
{
if
(
res
.
RESULT
.
TYPE
===
'S'
)
{
this
.
goodsList
=
this
.
goodsList
.
concat
(
res
.
DATA
);
this
.
goodsList
.
forEach
((
ele
)
=>
{
this
.
totalNum
+=
ele
.
ERFMG
;
ele
.
NLPLA
=
ele
.
NLPLA
||
this
.
nlpla
;
});
setTimeout
(()
=>
{
this
.
wxparams
=
''
;
this
.
isFocus
=
true
;
this
.
isDisabled
=
false
;
},
1000
);
}
else
{
setTimeout
(()
=>
{
this
.
isFocus
=
true
;
this
.
isDisabled
=
false
;
},
1000
);
this
.
$u
.
toast
(
res
.
RESULT
.
MESSAGE
);
}
this
.
loading
=
false
;
});
}
}
}
}
};
};
...
@@ -175,6 +234,7 @@ page {
...
@@ -175,6 +234,7 @@ page {
color
:
#3f9dcc
;
color
:
#3f9dcc
;
}
}
.total
{
.total
{
background
:
#fff
;
color
:
#000
;
color
:
#000
;
padding
:
0rpx
40rpx
;
padding
:
0rpx
40rpx
;
display
:
flex
;
display
:
flex
;
...
@@ -204,11 +264,11 @@ page {
...
@@ -204,11 +264,11 @@ page {
margin-top
:
10rpx
;
margin-top
:
10rpx
;
}
}
.item
{
.item
{
height
:
50rpx
;
line-height
:
50rpx
;
line-height
:
50rpx
;
color
:
#000
;
color
:
#000
;
font-size
:
28rpx
;
font-size
:
28rpx
;
font-weight
:
500
;
font-weight
:
500
;
word-break
:
break-all
;
}
}
}
}
.listBottom
{
.listBottom
{
...
...
uview-ui/libs/request/index.js
View file @
2ffbcb83
...
@@ -77,9 +77,16 @@ class Request {
...
@@ -77,9 +77,16 @@ class Request {
// 处理sap接口
// 处理sap接口
let
url
=
this
.
config
.
baseUrl
let
url
=
this
.
config
.
baseUrl
if
(
options
.
url
.
indexOf
(
'sap'
)
>
-
1
){
if
(
options
.
url
.
indexOf
(
'sap'
)
>
-
1
){
url
=
this
.
config
.
baseSapUrl
// url = '/sapApi'
// options.url = options.url.replace('/sap','')
url
=
'http://192.168.3.109:8000'
options
.
header
=
{...
options
.
header
,
'Authorization'
:
'Basic cmVzdF91c2VyOkJzbjEyMzQ1Ng=='
}
options
.
header
=
{
...
options
.
header
,
'content-type'
:
'application/json;charset=UTF-8'
,
'Authorization'
:
'Basic cmVzdF91c2VyOkJzbjEyMzQ1Ng=='
,
}
}
else
{
// url = '/api'
url
=
'http://192.168.3.91:8080'
}
}
// 判断用户传递的URL是否/开头,如果不是,加上/,这里使用了uView的test.js验证库的url()方法
// 判断用户传递的URL是否/开头,如果不是,加上/,这里使用了uView的test.js验证库的url()方法
options
.
url
=
validate
.
url
(
options
.
url
)
?
options
.
url
:
(
url
+
(
options
.
url
.
indexOf
(
'/'
)
==
0
?
options
.
url
=
validate
.
url
(
options
.
url
)
?
options
.
url
:
(
url
+
(
options
.
url
.
indexOf
(
'/'
)
==
0
?
...
...
vue.config.js
View file @
2ffbcb83
...
@@ -17,11 +17,18 @@ module.exports = {
...
@@ -17,11 +17,18 @@ module.exports = {
devServer
:
{
devServer
:
{
proxy
:
{
proxy
:
{
'/api'
:
{
'/api'
:
{
target
:
'http://
localhost:8080/
'
,
target
:
'http://
192.168.3.91:8080
'
,
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
pathRewrite
:
{
'^/api'
:
''
'^/api'
:
''
}
}
},
'/sapApi'
:
{
target
:
'http://192.168.3.109:8000'
,
changeOrigin
:
true
,
pathRewrite
:
{
'^/sapApi'
:
''
}
}
}
},
},
}
}
...
...
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