Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
wmsMin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
98199c04
authored
Jul 05, 2024
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
供应链后台--新增app更新管理页面
parent
b3029fd9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
23 deletions
App.vue
pages/tally/abnormalTally.vue
pages/tally/index.vue
pages/tally/unboxing.vue
util/api.js
App.vue
View file @
98199c04
<
script
>
<
script
>
export
default
{
import
{
API
}
from
'@/util/api.js'
;
onLaunch
:
function
()
{
export
default
{
console
.
log
(
'App Launch'
);
onLaunch
:
function
()
{
},
console
.
log
(
'App Launch'
);
onShow
:
function
()
{
},
console
.
log
(
'App Show'
);
onShow
:
function
()
{
},
// #ifdef APP-PLUS
onHide
:
function
()
{
var
wms_version
=
uni
.
getStorageSync
(
'wms_version'
)
||
''
;
console
.
log
(
'App Hide'
);
this
.
request
(
API
.
getAppLatestVersion
,
'POST'
,
{},
false
).
then
(
res
=>
{
}
if
(
res
.
err_code
===
0
)
{
};
//判断是否跟线上版本一样
if
(
wms_version
!=
res
.
data
.
version
)
{
uni
.
showModal
({
title
:
'更新提示'
,
content
:
res
.
data
.
remark
,
confirmText
:
'确定更新'
,
cancelText
:
'取消更新'
,
success
:
data
=>
{
if
(
data
.
confirm
)
{
uni
.
setStorageSync
(
'wms_version'
,
res
.
data
.
version
);
//更新本地存储最新版本号
this
.
downloadApk
(
res
.
data
.
download_url
);
//开始下载apk文件
console
.
log
(
'用户点击确定'
);
}
else
if
(
data
.
cancel
)
{}
}
});
}
}
});
// #endif
},
onHide
:
function
()
{
console
.
log
(
'App Hide'
);
},
methods
:
{
//下载apk文件
downloadApk
(
url
)
{
uni
.
showLoading
({
title
:
'下载安装文件'
,
mask
:
true
});
let
dtask
=
plus
.
downloader
.
createDownload
(
url
,
{},
(
d
,
status
)
=>
{
if
(
status
==
200
)
{
uni
.
hideLoading
();
//下载成功后调用安装方法
this
.
installApk
(
d
.
filename
);
}
else
{
uni
.
showToast
({
title
:
'下载失败'
,
icon
:
'error'
});
console
.
log
(
'下载失败'
);
}
});
dtask
.
start
();
},
//安装apk文件
installApk
(
filePath
)
{
plus
.
runtime
.
install
(
filePath
,
{},
()
=>
{
console
.
log
(
'更新成功'
);
},
e
=>
{
console
.
log
(
'安装失败:'
+
JSON
.
stringify
(
e
));
}
);
}
}
};
</
script
>
</
script
>
<
style
>
<
style
>
@import
'./assets/css/font.css'
;
@import
'./assets/css/font.css'
;
page
{
height
:
100%
;
page
{
background
:
#f1f4f6
;
height
:
100%
;
}
background
:
#f1f4f6
;
</
style
>
}
</
style
>
\ No newline at end of file
pages/tally/abnormalTally.vue
View file @
98199c04
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
<!-- 左侧 -->
<!-- 左侧 -->
<view
class=
"bar"
style=
"width: 60%;"
>
<view
class=
"bar"
style=
"width: 60%;"
>
<
template
v-if=
"curr == 3"
>
<
template
v-if=
"curr == 3"
>
<view
class=
"t1 mb16"
>
{{
item
.
abnormal_batch
}}
(
{{
item
.
sync_status_cn
}}
{{
item
.
tally_status_cn
||
''
}}
)
</view>
<view
class=
"t1 mb16"
style=
"white-space: nowrap;"
>
{{
item
.
abnormal_batch
}}
(
{{
item
.
sync_status_cn
}}
{{
item
.
tally_status_cn
||
''
}}
)
</view>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<view
class=
"t1 mb16"
>
{{
item
.
abnormal_batch
}}
</view>
<view
class=
"t1 mb16"
>
{{
item
.
abnormal_batch
}}
</view>
...
@@ -358,8 +358,8 @@
...
@@ -358,8 +358,8 @@
* 异常型号装箱 1装箱 0去除
* 异常型号装箱 1装箱 0去除
*/
*/
submitAbnormalBox
(
type
,
wstydl_id
,
item
)
{
submitAbnormalBox
(
type
,
wstydl_id
,
item
)
{
//装箱的时候验证
if
(
type
==
1
)
{
if
(
type
==
1
)
{
//装箱的时候验证
if
(
!
this
.
box_sn
)
{
if
(
!
this
.
box_sn
)
{
uni
.
showModal
({
uni
.
showModal
({
title
:
''
,
title
:
''
,
...
@@ -369,11 +369,10 @@
...
@@ -369,11 +369,10 @@
return
false
;
return
false
;
}
}
}
else
if
(
type
==
0
)
{
}
else
if
(
type
==
0
)
{
//取出
//取出
逻辑
//明细为未推送、推送失败:该箱已封箱,是否确认取出?确认后,则将该物料从箱子中剔除,回到异常待装箱中
//明细为未推送、推送失败:该箱已封箱,是否确认取出?确认后,则将该物料从箱子中剔除,回到异常待装箱中
if
(
item
.
tally_status
==
2
&&
(
item
.
sync_status
==
1
||
item
.
sync_status
==
4
))
{
if
(
item
.
tally_status
==
2
&&
(
item
.
sync_status
==
1
||
item
.
sync_status
==
4
))
{
uni
.
showModal
({
uni
.
showModal
({
title
:
''
,
content
:
'该箱已封箱,是否确认取出?确认后,则将该物料从箱子中剔除,回到异常待装箱中'
,
content
:
'该箱已封箱,是否确认取出?确认后,则将该物料从箱子中剔除,回到异常待装箱中'
,
confirmText
:
'确认取出'
,
confirmText
:
'确认取出'
,
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
...
...
pages/tally/index.vue
View file @
98199c04
...
@@ -121,7 +121,7 @@
...
@@ -121,7 +121,7 @@
</
template
>
</
template
>
<view
class=
"pb16 row"
>
<view
class=
"pb16 row"
>
<text
class=
"t3 w130"
>
订单备注:
</text>
<text
class=
"t3 w130"
>
订单备注:
</text>
<text
class=
"desc"
>
{{item.order_remark
|| '这是订单备注这是订单备注这是订单备注这是订单备注这是订单备注'
}}
</text>
<text
class=
"desc"
>
{{item.order_remark}}
</text>
</view>
</view>
<view
class=
"pb16 row verCenter"
>
<view
class=
"pb16 row verCenter"
>
<!-- 已入库数量 -->
<!-- 已入库数量 -->
...
...
pages/tally/unboxing.vue
View file @
98199c04
This diff is collapsed.
Click to expand it.
util/api.js
View file @
98199c04
...
@@ -321,7 +321,11 @@ const API = {
...
@@ -321,7 +321,11 @@ const API = {
/**
/**
* 获取货品
* 获取货品
*/
*/
getBoxData
:
API_BASE
+
'/supplywechatwms/getBoxData'
getBoxData
:
API_BASE
+
'/supplywechatwms/getBoxData'
,
/**
* 获取app版本
*/
getAppLatestVersion
:
API_BASE
+
'/supplywechatwms/getAppLatestVersion'
}
}
...
...
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