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
f579ba19
authored
Jul 25, 2024
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
单一物料多箱货物支持快捷理货装(分)箱及相关联功能
parent
2a163828
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
355 additions
and
19 deletions
assets/css/tally/closeBox.scss
pages/tally/abnormalTally.vue
pages/tally/closeBox.vue
pages/tally/index.vue
pages/tally/unboxing.vue
util/api.js
assets/css/tally/closeBox.scss
View file @
f579ba19
...
...
@@ -18,12 +18,12 @@
width
:
33
.3%
;
margin-bottom
:
10rpx
;
.t1
{
font-size
:
2
4
rpx
;
font-size
:
2
6
rpx
;
color
:
#6e767a
;
}
.t2
{
font-size
:
2
4
rpx
;
color
:
#
404547
;
font-size
:
2
6
rpx
;
color
:
#
197adb
;
font-weight
:
bold
;
}
}
...
...
@@ -33,7 +33,13 @@
font-size
:
28rpx
;
color
:
#919399
;
}
.status-color
{
font-size
:
26rpx
;
color
:
#197adb
;
font-weight
:
bold
;
}
.uni-input
{
width
:
216rpx
;
height
:
55rpx
;
background
:
#ffffff
;
border-radius
:
10rpx
;
...
...
@@ -42,6 +48,14 @@
padding-left
:
18rpx
;
margin
:
0
6rpx
;
}
.btn
{
width
:
122rpx
;
height
:
51rpx
;
background
:
#197adb
;
font-size
:
28rpx
;
color
:
#ffffff
;
border-radius
:
10rpx
;
}
}
}
.list
{
...
...
@@ -265,3 +279,59 @@
::v-deep
.uni-drawer__content
{
width
:
85%
!
important
;
}
.popup-content-tally-num
{
background-color
:
#f1f4f6
;
padding
:
50rpx
24rpx
50rpx
24rpx
;
border-radius
:
10rpx
;
width
:
550rpx
;
.input-box
{
margin-bottom
:
30rpx
;
.label
{
width
:
190rpx
;
font-size
:
26rpx
;
color
:
#6e767a
;
white-space
:
nowrap
;
}
.tt
{
font-weight
:
bold
;
font-size
:
28rpx
;
color
:
#404547
;
}
.uni-input
{
width
:
210rpx
;
height
:
55rpx
;
background
:
#e6edf0
;
border-radius
:
4rpx
;
padding-left
:
20rpx
;
font-size
:
26rpx
;
color
:
#404547
;
font-weight
:
bold
;
}
}
.tip
{
font-size
:
26rpx
;
color
:
#f39d18
;
margin-bottom
:
40rpx
;
}
.btn
{
padding
:
0
70rpx
;
.ok
{
width
:
140rpx
;
height
:
60rpx
;
background
:
#197adb
;
border-radius
:
10rpx
;
font-size
:
26rpx
;
color
:
#ffffff
;
}
.canel
{
width
:
140rpx
;
height
:
60rpx
;
background
:
#ffffff
;
border-radius
:
10rpx
;
border
:
1px
solid
#197adb
;
font-size
:
24rpx
;
color
:
#197adb
;
}
}
}
pages/tally/abnormalTally.vue
View file @
f579ba19
...
...
@@ -355,9 +355,10 @@
});
},
/**
* 异常型号装箱 1装箱 0
去除
* 异常型号装箱 1装箱 0
取出
*/
submitAbnormalBox
(
type
,
wstydl_id
,
item
)
{
debugger
if
(
type
==
1
)
{
//装箱的时候验证
if
(
!
this
.
box_sn
)
{
...
...
@@ -377,6 +378,15 @@
confirmText
:
'确认取出'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
this
.
request
(
API
.
getBoxNumByDetailId
,
'POST'
,
{
wsty_id
:
this
.
form
[
index
].
wsty_id
},
true
).
then
(
json
=>
{
if
(
json
.
err_code
===
0
)
{
if
(
json
.
data
>
1
)
{
let
text
=
`
${
item
.
erp_order_sn
}
货物分部在
${
this
.
box_sn
}
的
${
json
.
data
.
length
}
个子箱,请确认是否全部取消`
;
uni
.
showModal
({
title
:
'提示'
,
content
:
text
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
this
.
request
(
API
.
submitAbnormalBox
,
'POST'
,
{
type
:
type
,
wstydl_id
:
wstydl_id
,
wsty_id
:
this
.
wsty_id
},
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
uni
.
showModal
({
...
...
@@ -403,6 +413,41 @@
}
}
});
}
else
{
this
.
request
(
API
.
submitAbnormalBox
,
'POST'
,
{
type
:
type
,
wstydl_id
:
wstydl_id
,
wsty_id
:
this
.
wsty_id
},
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
uni
.
showModal
({
title
:
''
,
content
:
type
==
1
?
'装箱成功'
:
'取出成功'
,
showCancel
:
false
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
this
.
getData
();
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
});
}
else
{
uni
.
showToast
({
title
:
res
.
err_msg
,
icon
:
'none'
});
}
});
}
}
else
{
uni
.
showToast
({
title
:
json
.
err_msg
,
icon
:
'none'
});
}
});
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
});
return
false
;
}
}
...
...
pages/tally/closeBox.vue
View file @
f579ba19
This diff is collapsed.
Click to expand it.
pages/tally/index.vue
View file @
f579ba19
...
...
@@ -285,6 +285,35 @@
</view>
</view>
</uni-popup>
<!-- 多个纸箱提示 -->
<uni-popup
ref=
"printScanList"
background-color=
"#F1F4F6"
>
<view
class=
"popup-content-tally-num"
>
<view
class=
"text"
>
{{box_sn}}有{{checkboxItems.length}}个子箱,选择你需要打印标签
</view>
<view
class=
"row verCenter"
style=
"font-size: 28rpx;"
>
<checkbox-group
@
change=
"checkboxAllChange"
>
<label>
<checkbox
value=
"cb"
style=
"transform:scale(0.7)"
color=
"#197adb"
activeBackgroundColor=
"#197adb"
activeBorderColor=
"#197adb"
:checked=
"allChecked"
/>
全选
</label>
</checkbox-group>
</view>
<view
class=
"uni-list"
style=
"padding-left: 50rpx;"
>
<scroll-view
scroll-y=
"true"
style=
"max-height:400rpx"
>
<checkbox-group
@
change=
"checkboxChange"
>
<label
class=
"row verCenter"
v-for=
"item in checkboxItems"
:key=
"item.value"
>
<view>
<checkbox
:value=
"item.value"
:checked=
"item.checked"
style=
"transform:scale(0.7)"
color=
"#197adb"
/>
</view>
<view>
{{item.name}}
</view>
</label>
</checkbox-group>
</scroll-view>
</view>
<view
class=
"btn row bothSide"
style=
"margin-top: 24rpx;"
>
<view
class=
"ok row rowCenter verCenter"
@
click=
"printMultiple()"
>
打印
</view>
<view
class=
"canel row rowCenter verCenter"
@
click=
"close()"
>
返回
</view>
</view>
</view>
</uni-popup>
</view>
</template>
...
...
@@ -325,7 +354,9 @@
tally_info
:
{
tally_num_temp
:
''
},
net_weight_total
:
0
//净重合计
net_weight_total
:
0
,
//净重合计
allChecked
:
false
,
checkboxItems
:
[]
};
},
watch
:
{
...
...
@@ -395,6 +426,9 @@
var
value
=
event
.
target
.
value
;
if
(
type
==
1
)
{
if
(
value
)
{
if
(
value
.
indexOf
(
'-'
)
!==
-
1
)
{
// 判断字符串中是否存在 '-'
value
=
value
.
split
(
'-'
)[
0
];
// 存在则截取 '-' 前的部分
}
this
.
getBoxSn
(
value
);
}
}
else
if
(
type
==
2
)
{
...
...
@@ -852,6 +886,9 @@
}
});
},
/**
* 理货数量异常提示
*/
tallyDetailConfirmClose
()
{
this
.
$refs
.
popupTallyNum
.
close
();
},
...
...
@@ -993,9 +1030,35 @@
});
},
/**
* 理货明细撤销
* 理货明细撤销
(取消理货)
*/
cancelTallyDetail
(
index
)
{
//根据理货明细获取箱数
this
.
request
(
API
.
getBoxNumByDetailId
,
'POST'
,
{
wsty_id
:
this
.
form
[
index
].
wsty_id
},
true
).
then
(
json
=>
{
if
(
json
.
err_code
===
0
)
{
if
(
json
.
data
>
1
)
{
let
text
=
`
${
this
.
erp_order_sn
}
货物分部在
${
this
.
box_sn
}
的
${
json
.
data
.
length
}
个子箱,请确认是否全部取消`
;
uni
.
showModal
({
title
:
'提示'
,
content
:
text
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
this
.
request
(
API
.
cancelTallyDetail
,
'POST'
,
{
wstydl_id
:
this
.
form
[
index
].
wstydl_id
,
wsty_id
:
this
.
form
[
index
].
wsty_id
},
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
getTallyData
();
}
else
{
uni
.
showToast
({
title
:
res
.
err_msg
,
icon
:
'none'
});
}
});
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
});
}
else
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'确定取消该商品理货吗?'
,
...
...
@@ -1016,6 +1079,14 @@
}
}
});
}
}
else
{
uni
.
showToast
({
title
:
json
.
err_msg
,
icon
:
'none'
});
}
});
},
/**
* 取消释放
...
...
@@ -1127,10 +1198,49 @@
});
return
false
;
}
this
.
request
(
API
.
getPrintScanList
,
'POST'
,
{
box_sn
:
this
.
box_sn
},
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
//一个标签的时候直接打印
if
(
res
.
data
.
length
==
0
)
{
uni
.
showToast
({
title
:
'数据异常'
,
icon
:
'none'
});
}
else
if
(
res
.
data
.
length
==
1
)
{
this
.
printConfirm
(
res
.
data
);
}
else
{
//多个时候
res
.
data
.
forEach
(
item
=>
{
this
.
checkboxItems
.
push
({
value
:
item
,
name
:
item
,
checked
:
false
});
});
this
.
$refs
.
printScanList
.
open
();
}
}
else
{
uni
.
showToast
({
title
:
res
.
err_msg
,
icon
:
'none'
});
}
});
},
/**
* 处理打印标签,单个和多个
*/
printConfirm
(
data
)
{
var
box_sn
=
[];
if
(
data
.
length
>
0
)
{
data
.
forEach
(
item
=>
{
box_sn
.
push
({
box_sn
:
item
});
});
}
var
params
=
{
type
:
1
,
email
:
this
.
email
,
print_json
:
JSON
.
stringify
(
[{
box_sn
:
this
.
box_sn
}]
)
print_json
:
JSON
.
stringify
(
box_sn
)
}
this
.
request
(
API
.
addSCTallyData
,
'POST'
,
params
,
true
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
...
...
@@ -1138,15 +1248,62 @@
title
:
'打印箱号成功'
,
icon
:
'success'
})
setTimeout
(()
=>
{
this
.
close
();
},
2000
)
}
else
{
uni
.
showToast
({
title
:
res
.
err_
msg
,
title
:
res
.
msg
,
icon
:
'none'
});
}
});
},
/**
* 全选复选框状态变化
* @param {Object} e
*/
checkboxAllChange
(
e
)
{
this
.
allChecked
=
e
.
detail
.
value
.
length
>
0
;
// 如果全选框被选中,设置为true
this
.
checkboxItems
.
forEach
(
item
=>
{
item
.
checked
=
this
.
allChecked
;
});
},
/**
* 单个复选框状态变化
* @param {Object} e
*/
checkboxChange
(
e
)
{
const
values
=
e
.
detail
.
value
;
this
.
checkboxItems
.
forEach
(
item
=>
{
item
.
checked
=
values
.
includes
(
item
.
value
);
});
// 更新全选复选框的状态
this
.
allChecked
=
this
.
checkboxItems
.
every
(
item
=>
item
.
checked
);
console
.
log
(
values
);
},
/**
* 多个打印确认
*/
printMultiple
()
{
var
checkedItems
=
this
.
checkboxItems
.
filter
(
item
=>
item
.
checked
);
if
(
checkedItems
.
length
==
0
)
{
uni
.
showToast
({
title
:
'请勾选要打印的箱号'
,
icon
:
'none'
})
return
false
;
}
var
box_sn
=
checkedItems
.
map
(
item
=>
item
.
value
);
this
.
printConfirm
(
box_sn
);
},
/**
* 关闭打印多个提示
*/
close
()
{
this
.
$refs
.
printScanList
.
close
();
},
/**
* 清空数据
*/
clearInput
(
type
)
{
...
...
pages/tally/unboxing.vue
View file @
f579ba19
...
...
@@ -5,7 +5,7 @@
<view
class=
"action-bar row verCenter"
>
<text
class=
"iconfont icon-jinggao2"
@
click=
"clearInput(1)"
v-if=
"box_sn"
></text>
<template
v-if=
"box_sn && is_unboxing && tallyData.detail && tallyData.detail.length > 0"
>
<
view
class=
"btn1 row rowCenter verCenter"
@
click=
"closeBox()"
>
重新封箱
</view
>
<
navigator
class=
"btn1 row rowCenter verCenter"
:url=
"'/pages/tally/closeBox?box_sn='+box_sn+'&wsty_id='+wsty_id"
hover-class=
"none"
@
click=
"closeBox()"
>
重新封箱
</navigator
>
</
template
>
<
template
v-else
>
<view
class=
"btn row rowCenter verCenter"
@
click=
"unboxing()"
v-if=
"box_sn && tallyData.detail && tallyData.detail.length > 0"
>
开 箱
</view>
...
...
@@ -161,6 +161,7 @@
is_focus_1
:
true
,
//获取焦点动态化
is_focus_2
:
false
,
//获取焦点动态化
box_sn
:
''
,
wsty_id
:
''
,
//箱子id
keyword
:
''
,
all_search
:
''
,
//全量搜索字段
tallyData
:
{},
//理货信息
...
...
@@ -280,9 +281,15 @@
title
:
'开箱成功'
,
icon
:
'success'
})
//这里的必须性是为了拿到箱子id
setTimeout
(()
=>
{
this
.
request
(
API
.
getBoxSn
,
'POST'
,
{
box_sn
:
box_sn
},
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
wsty_id
=
res
.
data
.
wsty_id
;
this
.
is_unboxing
=
true
;
//表示开箱成功
this
.
getTallyData
();
}
});
},
2000
)
}
else
{
this
.
form
=
[];
...
...
@@ -610,7 +617,7 @@
net_weight
:
item
.
net_weight
,
// 净重
goods_check_pic
:
item
.
goods_check_pic
,
// 商检的必须上传图片
wstydl_id
:
item
.
wstydl_id
,
// 理货明细ID
erp_order_sn
:
this
.
erp_order_sn
,
// 入仓号
erp_order_sn
:
item
.
erp_order_sn
,
// 入仓号
box_sn
:
this
.
box_sn
,
// 箱子
is_goods_check
:
item
.
is_goods_check
,
//是否商检
sync_status
:
item
.
sync_status
,
//明细同步状态
...
...
@@ -907,6 +914,15 @@
});
return
false
;
}
this
.
request
(
API
.
getBoxNumByDetailId
,
'POST'
,
{
wsty_id
:
this
.
form
[
index
].
wsty_id
},
true
).
then
(
json
=>
{
if
(
json
.
err_code
===
0
)
{
if
(
json
.
data
>
1
)
{
let
text
=
`
${
this
.
form
[
this
.
formIndex
].
erp_order_sn
}
货物分部在
${
this
.
box_sn
}
的
${
json
.
data
.
length
}
个子箱,请确认是否全部取消`
;
uni
.
showModal
({
title
:
'提示'
,
content
:
text
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
this
.
request
(
API
.
cancelTallyDetail
,
'POST'
,
{
wstydl_id
:
this
.
form
[
this
.
formIndex
].
wstydl_id
,
box_sn
:
this
.
box_sn
,
gross_weight
:
val
},
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
uni
.
showToast
({
...
...
@@ -925,6 +941,38 @@
});
}
});
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
});
}
else
{
this
.
request
(
API
.
cancelTallyDetail
,
'POST'
,
{
wstydl_id
:
this
.
form
[
this
.
formIndex
].
wstydl_id
,
box_sn
:
this
.
box_sn
,
gross_weight
:
val
},
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
uni
.
showToast
({
title
:
'取消理货成功'
,
icon
:
'success'
,
duration
:
2000
});
setTimeout
(()
=>
{
this
.
$refs
.
canelInputDialog
.
close
();
this
.
getTallyData
();
},
2000
);
}
else
{
uni
.
showToast
({
title
:
res
.
err_msg
,
icon
:
'none'
});
}
});
}
}
else
{
uni
.
showToast
({
title
:
json
.
err_msg
,
icon
:
'none'
});
}
});
},
/**
* 查看备注
...
...
util/api.js
View file @
f579ba19
const
API_BASE
=
'https://api.ichunt.com'
;
const
API_BASE_OSS
=
'https://image.ichunt.net'
;
//oss系统
const
API_BASE_OSS_HK
=
'http://hk.image.semour.com'
;
//oss系统 HK
const
API_BASE_WMS
=
'https://wms.ichunt.net'
;
//WMS系统
//
const API_BASE = 'https://api.ichunt.com';
//
const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
//
const API_BASE_OSS_HK = 'http://hk.image.semour.com'; //oss系统 HK
//
const API_BASE_WMS = 'https://wms.ichunt.net'; //WMS系统
//
const API_BASE = 'http://api.liexin.com';
//
const API_BASE_OSS = 'http://image.liexindev.net';
//
const API_BASE_OSS_HK = 'http://image.liexindev.net'; //oss系统 HK
//
const API_BASE_WMS = 'http://wms.liexindev.net'; //WMS系统
const
API_BASE
=
'http://api.liexin.com'
;
const
API_BASE_OSS
=
'http://image.liexindev.net'
;
const
API_BASE_OSS_HK
=
'http://image.liexindev.net'
;
//oss系统 HK
const
API_BASE_WMS
=
'http://wms.liexindev.net'
;
//WMS系统
const
API
=
{
...
...
@@ -325,7 +325,23 @@ const API = {
/**
* 获取app版本
*/
getAppLatestVersion
:
API_BASE
+
'/supplywechatwms/getAppLatestVersion'
getAppLatestVersion
:
API_BASE
+
'/supplywechatwms/getAppLatestVersion'
,
/**
* 获取获取标签打印列表版本
*/
getPrintScanList
:
API_BASE
+
'/tallyGoodsAjax/getPrintScanList'
,
/**
* app 修改子箱数量
*/
alterTallyTagBySubBoxQty
:
API_BASE
+
'/supplywechatwms/alterTallyTagBySubBoxQty'
,
/**
* app 根据获取标签号
*/
getPrintScanList
:
API_BASE
+
'/supplywechatwms/getPrintScanList'
,
/**
* app 根据理货明细获取箱数
*/
getBoxNumByDetailId
:
API_BASE
+
'/supplywechatwms/getBoxNumByDetailId'
}
...
...
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