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
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
116 additions
and
72 deletions
App.vue
pages/tally/abnormalTally.vue
pages/tally/index.vue
pages/tally/unboxing.vue
util/api.js
App.vue
View file @
98199c04
<
script
>
export
default
{
import
{
API
}
from
'@/util/api.js'
;
export
default
{
onLaunch
:
function
()
{
console
.
log
(
'App Launch'
);
},
onShow
:
function
()
{
console
.
log
(
'App Show'
);
// #ifdef APP-PLUS
var
wms_version
=
uni
.
getStorageSync
(
'wms_version'
)
||
''
;
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
>
<
style
>
@import
'./assets/css/font.css'
;
page
{
@import
'./assets/css/font.css'
;
page
{
height
:
100%
;
background
:
#f1f4f6
;
}
}
</
style
>
\ No newline at end of file
pages/tally/abnormalTally.vue
View file @
98199c04
...
...
@@ -75,7 +75,7 @@
<!-- 左侧 -->
<view
class=
"bar"
style=
"width: 60%;"
>
<
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
v-else
>
<view
class=
"t1 mb16"
>
{{
item
.
abnormal_batch
}}
</view>
...
...
@@ -358,8 +358,8 @@
* 异常型号装箱 1装箱 0去除
*/
submitAbnormalBox
(
type
,
wstydl_id
,
item
)
{
//装箱的时候验证
if
(
type
==
1
)
{
//装箱的时候验证
if
(
!
this
.
box_sn
)
{
uni
.
showModal
({
title
:
''
,
...
...
@@ -369,11 +369,10 @@
return
false
;
}
}
else
if
(
type
==
0
)
{
//取出
//取出
逻辑
//明细为未推送、推送失败:该箱已封箱,是否确认取出?确认后,则将该物料从箱子中剔除,回到异常待装箱中
if
(
item
.
tally_status
==
2
&&
(
item
.
sync_status
==
1
||
item
.
sync_status
==
4
))
{
uni
.
showModal
({
title
:
''
,
content
:
'该箱已封箱,是否确认取出?确认后,则将该物料从箱子中剔除,回到异常待装箱中'
,
confirmText
:
'确认取出'
,
success
:
(
res
)
=>
{
...
...
pages/tally/index.vue
View file @
98199c04
...
...
@@ -121,7 +121,7 @@
</
template
>
<view
class=
"pb16 row"
>
<text
class=
"t3 w130"
>
订单备注:
</text>
<text
class=
"desc"
>
{{item.order_remark
|| '这是订单备注这是订单备注这是订单备注这是订单备注这是订单备注'
}}
</text>
<text
class=
"desc"
>
{{item.order_remark}}
</text>
</view>
<view
class=
"pb16 row verCenter"
>
<!-- 已入库数量 -->
...
...
pages/tally/unboxing.vue
View file @
98199c04
...
...
@@ -8,7 +8,7 @@
<view
class=
"btn1 row rowCenter verCenter"
@
click=
"closeBox()"
>
重新封箱
</view>
</
template
>
<
template
v-else
>
<view
class=
"btn row rowCenter verCenter"
@
click=
"unboxing()"
>
开 箱
</view>
<view
class=
"btn row rowCenter verCenter"
@
click=
"unboxing()"
v-if=
"box_sn && tallyData.detail && tallyData.detail.length > 0"
>
开 箱
</view>
</
template
>
</view>
</view>
...
...
@@ -64,33 +64,12 @@
<text
class=
"t3 w130"
>
金额:
</text>
<text
class=
"t4"
>
{{item.total_price}}
</text>
</view>
<!-- 完全理货 -->
<
template
v-if=
"item.tally_status == 3"
>
<view
class=
"pb16 row"
>
<text
class=
"t3 w130"
>
总数量:
</text>
<text
class=
"t4"
>
{{item.order_numbers}}
</text>
</view>
</
template
>
<!-- 1未理货2部分理货 -->
<
template
v-else
>
<view
class=
"pb16 row"
>
<text
class=
"t3 w130"
>
待收数量:
</text>
<text
class=
"t4"
>
{{
item
.
wait_tally_num
}}
</text>
</view>
<view
class=
"pb16 row"
>
<text
class=
"t3 w130"
>
总数量:
</text>
<text
class=
"t4"
>
{{
item
.
order_numbers
}}
</text>
</view>
</
template
>
<view
class=
"pb16 row verCenter"
>
<!-- 完全理货 -->
<
template
v-if=
"item.tally_status == 3"
>
<text
class=
"t3 w130"
>
已入库数量:
</text>
</
template
>
<!-- 1未理货2部分理货 -->
<
template
v-else
>
<text
class=
"t3 w130"
>
入库数量:
</text>
</
template
>
<view
class=
"input-text"
>
<input
class=
"uni-input"
:disabled=
"item.tally_status == 3"
type=
"number"
inputmode=
"numeric"
placeholder=
"输入"
placeholder-style=
"color:#000;font-weight: bold;"
v-model=
"form[index].tally_num"
/>
</view>
...
...
@@ -98,31 +77,19 @@
<view
class=
"pb16 row verCenter"
>
<text
class=
"t3 w130"
>
原产地:
</text>
<view
class=
"input-text"
>
<!-- 完全理货 -->
<
template
v-if=
"item.tally_status == 3"
>
<input
class=
"uni-input"
placeholder=
"选择产地"
placeholder-style=
"color:#000;font-weight: bold;"
disabled=
""
v-model=
"form[index].origin"
/>
</
template
>
<!-- 1未理货2部分理货 -->
<
template
v-else
>
<input
class=
"uni-input"
placeholder=
"选择产地"
placeholder-style=
"color:#000;font-weight: bold;"
disabled=
""
@
click=
"open(index)"
v-model=
"form[index].origin"
/>
</
template
>
</view>
</view>
<view
class=
"pb16 row verCenter"
>
<text
class=
"t3 w130"
>
净重:
</text>
<view
class=
"input-text"
>
<input
class=
"uni-input"
:disabled=
"item.tally_status == 3
"
type=
"number"
inputmode=
"decimal"
placeholder=
"输入"
placeholder-style=
"color:#000;font-weight: bold;"
v-model=
"form[index].net_weight"
/>
<input
class=
"uni-input"
disabled=
"true
"
type=
"number"
inputmode=
"decimal"
placeholder=
"输入"
placeholder-style=
"color:#000;font-weight: bold;"
v-model=
"form[index].net_weight"
/>
</view>
</view>
<view
class=
"pb16 row verCenter"
>
<text
class=
"t3 w130"
>
备注:
</text>
<view
class=
"input-text"
>
<
template
v-if=
"item.tally_status == 3"
>
<input
class=
"uni-input"
:disabled=
"item.tally_status == 3"
type=
"text"
placeholder=
"输入"
placeholder-style=
"color:#000;font-weight: bold;"
v-model=
"form[index].remark"
maxlength=
"100"
@
click=
"viewChange(form[index].remark)"
/>
</
template
>
<
template
v-else
>
<input
class=
"uni-input"
:disabled=
"item.tally_status == 3"
type=
"text"
placeholder=
"输入"
placeholder-style=
"color:#000;font-weight: bold;"
v-model=
"form[index].remark"
maxlength=
"100"
/>
</
template
>
</view>
</view>
<view
class=
"pb16 row verCenter"
>
...
...
@@ -131,28 +98,13 @@
<
template
v-if=
"image_list.length > 0"
>
<view
class=
"pic-box"
v-for=
"(v, i) in image_list[index]"
:key=
"i"
>
<image
:src=
"v"
mode=
"aspectFill"
lazy-load=
"true"
@
click=
"previewChange(image_list[index], i)"
></image>
<template
v-if=
"item.tally_status != 3"
>
<view
class=
"delete row rowCenter verCenter"
@
click=
"deletePic(index,i)"
><text
class=
"iconfont icon-shanchu"
></text></view>
</
template
>
</view>
</
template
>
<
template
v-if=
"item.tally_status == 3"
>
<view
class=
"default row rowCenter verCenter"
v-if=
"image_list[index].length < 4"
><text
class=
"iconfont icon-xingzhuangjiehe"
></text></view>
</
template
>
<
template
v-else
>
<view
class=
"default row rowCenter verCenter"
@
click=
"chooseImageChange(index)"
v-if=
"image_list[index].length
<
4
"
><text
class=
"iconfont icon-xingzhuangjiehe"
></text></view>
</
template
>
</view>
</view>
<view
class=
"row"
style=
"justify-content: flex-end;"
>
<!-- 完全理货 -->
<
template
v-if=
"item.tally_status == 3"
>
<view
class=
"btn row rowCenter verCenter disabled"
@
click=
"cancelTallyDetail(index)"
>
取消理货
</view>
</
template
>
<!-- 1未理货2部分理货 -->
<
template
v-else
>
<view
class=
"btn row rowCenter verCenter"
@
click=
"submitTallyDetail(index)"
>
提 交
</view>
</
template
>
</view>
</view>
</scroll-view>
...
...
@@ -647,7 +599,7 @@
if
(
res
.
err_code
===
0
)
{
this
.
tallyData
=
res
.
data
;
if
(
res
.
data
.
detail
.
length
>
0
)
{
this
.
getOriginCn
();
//获取产地
//
this.getOriginCn(); //获取产地
// 使用 map 方法生成表单数组
this
.
form
=
res
.
data
.
detail
.
map
((
item
)
=>
({
...
...
@@ -770,8 +722,32 @@
* 理货明细撤销
*/
cancelTallyDetail
(
index
)
{
//若该箱状态为“已封箱”则,则需校验该物料明细的推送状态
//A、若该箱状态为“理货中”则,直接取消成功。
if
(
this
.
tallyData
.
tally_status
==
1
)
{
//执行关单封箱弹窗毛重填写
this
.
$refs
.
canelInputDialog
.
open
();
this
.
formIndex
=
index
;
return
false
;
}
//B、若该箱状态为“已封箱”则,则需校验该物料明细的推送状态
if
(
this
.
tallyData
.
tally_status
==
2
)
{
//明细为推送成功、推送中:该物料已推送金蝶,请联系关务取消推送再进行取出
if
(
this
.
form
[
index
].
sync_status
==
2
||
this
.
form
[
index
].
sync_status
==
3
)
{
uni
.
showModal
({
content
:
'该物料已推送金蝶,请联系关务取消推送再进行取出'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
});
return
false
;
}
//明细为未推送、推送失败:则提示该箱已封箱,是否确认取出?确认后,则将该物料从箱子中剔除,回到异常待装箱中
if
(
this
.
form
[
index
].
sync_status
==
1
||
this
.
form
[
index
].
sync_status
==
4
)
{
uni
.
showModal
({
title
:
''
,
...
...
@@ -779,6 +755,7 @@
confirmText
:
'确认取出'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
//执行关单封箱弹窗毛重填写
this
.
$refs
.
canelInputDialog
.
open
();
this
.
formIndex
=
index
;
}
else
if
(
res
.
cancel
)
{
...
...
@@ -790,15 +767,19 @@
}
}
//推送状态为 未推送,推送失败
if
(
this
.
form
[
index
].
sync_status
==
1
||
this
.
form
[
index
].
sync_status
==
4
)
{
this
.
$refs
.
canelInputDialog
.
open
();
this
.
formIndex
=
index
;
}
else
{
uni
.
showToast
({
title
:
'该状态不可取消理货'
,
icon
:
'none'
//C、若校验箱状态为“已装板”时,则提示:该箱已装板,请先取消装板
if
(
this
.
tallyData
.
tally_status
==
3
)
{
uni
.
showModal
({
content
:
'该箱已装板,请先取消装板'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
});
return
false
;
}
},
/**
...
...
util/api.js
View file @
98199c04
...
...
@@ -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