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
54d35eda
authored
May 14, 2024
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add
parent
56c7996c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
138 additions
and
53 deletions
assets/css/tally/index.scss
pages/tally/index.vue
pages/tally/unboxing.vue
assets/css/tally/index.scss
View file @
54d35eda
...
...
@@ -30,9 +30,11 @@
color
:
#197adb
;
}
.icon-jinggao2
{
position
:
relative
;
font-size
:
30rpx
;
color
:
#c6c7cc
;
margin-right
:
30rpx
;
z-index
:
22
;
}
}
.select-box
{
...
...
pages/tally/index.vue
View file @
54d35eda
...
...
@@ -7,7 +7,7 @@
</view>
<view
class=
"action-bar row verCenter"
>
<text
class=
"iconfont icon-jinggao2"
@
click=
"clearInput(1)"
v-if=
"box_sn"
></text>
<template
v-if=
"wsty_id"
>
<template
v-if=
"
box_sn &&
wsty_id"
>
<view
class=
"btn1 row rowCenter verCenter"
@
click=
"print()"
style=
"margin-right: 8rpx;"
>
打印箱号
</view>
<view
class=
"btn row rowCenter verCenter"
@
click=
"getBoxSn()"
>
取箱号
</view>
</
template
>
...
...
@@ -243,7 +243,7 @@
fixBoxStyle
:
''
,
noexebshowFalg
:
true
,
//控制是否会触发生命周期
index
:
0
,
item
:
[
'
其他
'
,
'DigiKey'
,
'Rochester'
,
'TME'
,
'Chip1stop'
,
'Mouser'
],
item
:
[
'
型号
'
,
'DigiKey'
,
'Rochester'
,
'TME'
,
'Chip1stop'
,
'Mouser'
],
box_sn
:
''
,
//箱号信息
wsty_id
:
''
,
//箱子id
erp_order_sn
:
''
,
//入仓号
...
...
@@ -279,31 +279,6 @@
this
.
$refs
.
inputDialog
.
close
();
},
/**
* 清空数据
*/
clearInput
(
type
)
{
if
(
type
==
1
)
{
this
.
box_sn
=
''
;
this
.
is_focus_1
=
false
;
setTimeout
(()
=>
{
this
.
is_focus_1
=
true
;
},
200
);
}
else
if
(
type
==
2
)
{
this
.
erp_order_sn
=
''
;
this
.
is_focus_2
=
false
;
setTimeout
(()
=>
{
this
.
is_focus_2
=
true
;
},
200
);
}
else
if
(
type
==
3
)
{
this
.
goods_type
=
''
;
this
.
keyword
=
''
;
this
.
is_focus_3
=
false
;
setTimeout
(()
=>
{
this
.
is_focus_3
=
true
;
},
200
);
}
},
/**
* 找出false对应的下标
* @param {Object} arr
* @param {Object} target
...
...
@@ -351,6 +326,10 @@
}
else
if
(
type
==
2
)
{
if
(
value
)
{
this
.
identifyQrCodeNumAndSn
();
}
else
{
this
.
goods_type
=
''
;
this
.
keyword
=
''
;
this
.
getTallyData
();
}
}
else
if
(
type
==
3
)
{
this
.
origin_list
=
[];
//数组清空
...
...
@@ -567,6 +546,7 @@
this
.
step
=
2
;
//标记点击了哪个按钮
if
(
this
.
index
==
0
)
{
//区分其他
this
.
keyword
=
''
;
this
.
getTallyData
();
}
else
{
let
codeTypeByIndex
=
{
...
...
@@ -699,6 +679,11 @@
this
.
image_list
[
index
]
=
item
.
goods_check_pic
.
split
(
','
);
}
});
}
else
{
uni
.
showToast
({
title
:
'查询不到该箱号信息'
,
icon
:
'none'
});
}
}
else
{
uni
.
showToast
({
...
...
@@ -920,6 +905,32 @@
});
},
/**
* 清空数据
*/
clearInput
(
type
)
{
if
(
type
==
1
)
{
this
.
box_sn
=
''
;
this
.
is_focus_1
=
false
;
setTimeout
(()
=>
{
this
.
is_focus_1
=
true
;
},
200
);
}
else
if
(
type
==
2
)
{
this
.
erp_order_sn
=
''
;
this
.
is_focus_2
=
false
;
setTimeout
(()
=>
{
this
.
is_focus_2
=
true
;
},
200
);
}
else
if
(
type
==
3
)
{
this
.
goods_type
=
''
;
this
.
keyword
=
''
;
this
.
is_focus_3
=
false
;
this
.
getTallyData
();
setTimeout
(()
=>
{
this
.
is_focus_3
=
true
;
},
200
);
}
},
/**
* 再次获取焦点
*/
clearInputAndFocus
()
{
...
...
pages/tally/unboxing.vue
View file @
54d35eda
<
template
>
<view
class=
"unboxing"
>
<view
class=
"input-box row bothSide verCenter"
>
<input
class=
"uni-input"
placeholder=
"输入或扫描箱号"
placeholder-style=
"color:#000;font-weight: bold;"
v-model=
"box_sn"
@
input=
"handleInput($event,1)"
/>
<template
v-if=
"tallyData.detail && tallyData.detail.length > 0"
>
<input
class=
"uni-input"
placeholder=
"输入或扫描箱号"
:focus=
"is_focus_1"
placeholder-style=
"color:#000;font-weight: bold;"
v-model=
"box_sn"
@
input=
"handleInput($event,1)"
/>
<view
class=
"action-bar row verCenter"
>
<text
class=
"iconfont icon-jinggao2"
@
click=
"clearInput(1)"
v-if=
"box_sn"
></text>
<template
v-if=
"box_sn && tallyData.detail && tallyData.detail.length > 0"
>
<view
class=
"btn1 row rowCenter verCenter"
@
click=
"closeBox()"
>
重新封箱
</view>
</
template
>
<
template
v-else
>
<view
class=
"btn row rowCenter verCenter"
@
click=
"unboxing()"
>
开 箱
</view>
</
template
>
</view>
<view
class=
"column-box row bothSide verCenter"
style=
"margin-bottom: 0;"
>
</view>
<view
class=
"column-box row bothSide verCenter"
>
<view
class=
"row verCenter"
>
<view
class=
"select-box"
>
<picker
@
change=
"bindPickerChange"
:value=
"index"
:range=
"item"
>
...
...
@@ -20,17 +23,18 @@
</picker>
</view>
<view
class=
"input-box row verCenter"
>
<!--
其他
-->
<!--
全量
-->
<
template
v-if=
"index == 0"
>
<input
class=
"uni-input"
placeholder=
"输入或扫描"
placeholder-style=
"color:#000;font-weight: bold;"
v-model=
"goods_type
"
@
input=
"handleInput($event,2)"
/>
<input
class=
"uni-input"
:focus=
"is_focus_2"
placeholder=
"输入或扫描"
placeholder-style=
"color:#000;font-weight: bold;"
v-model=
"all_search
"
@
input=
"handleInput($event,2)"
/>
</
template
>
<!-- digikey等供应商-->
<
template
v-else
>
<input
class=
"uni-input"
placeholder=
"输入或扫描"
placeholder-style=
"color:#000;font-weight: bold;"
v-model=
"keyword"
@
input=
"handleInput($event,2)"
/>
<input
class=
"uni-input"
:focus=
"is_focus_2"
placeholder=
"输入或扫描"
placeholder-style=
"color:#000;font-weight: bold;"
v-model=
"keyword"
@
input=
"handleInput($event,2)"
/>
</
template
>
</view>
</view>
<view
class=
"action-bar"
>
<view
class=
"action-bar row verCenter"
>
<text
class=
"iconfont icon-jinggao2"
@
click=
"clearInput(2)"
v-if=
"all_search || keyword"
></text>
<view
class=
"btn1 row rowCenter verCenter"
@
click=
"identifyQrCodeNumAndSn()"
>
扫 描
</view>
</view>
</view>
...
...
@@ -41,12 +45,17 @@
<view
class=
"title pb16 row verCenter"
>
<text
class=
"t1"
>
{{item.goods_type}}
</text>
<text
class=
"t2 row rowCenter verCenter"
v-if=
"item.is_goods_check"
>
检
</text>
<text
class=
"t5 row rowCenter verCenter"
>
{{item.sync_status_cn}}
</text>
</view>
<view
class=
"pb16 row"
>
<text
class=
"t3 w130"
>
物料名称:
</text>
<text
class=
"t4"
>
{{item.goods_title}}
</text>
</view>
<view
class=
"pb16 row"
>
<text
class=
"t3 w130"
>
入仓号:
</text>
<text
class=
"t4"
>
{{item.erp_order_sn}}
</text>
</view>
<view
class=
"pb16 row"
>
<text
class=
"t3 w130"
>
品牌:
</text>
<text
class=
"t4"
>
{{item.brand}}
</text>
</view>
...
...
@@ -140,6 +149,10 @@
<uni-popup
ref=
"inputDialog"
type=
"dialog"
:mask-click=
"true"
@
maskClick=
"maskClick"
>
<uni-popup-dialog
ref=
"inputClose"
mode=
"input"
:title=
"title"
v-model=
"gross_weight"
value=
""
confirmText=
"新箱子"
cancelText=
"不需要换箱"
placeholder=
"请输入毛重"
@
close=
"dialogInputClose"
@
confirm=
"dialogInputConfirm"
:before-close=
"true"
></uni-popup-dialog>
</uni-popup>
<!-- 取消理货弹窗 -->
<uni-popup
ref=
"canelInputDialog"
type=
"dialog"
:mask-click=
"true"
@
maskClick=
"maskClick"
>
<uni-popup-dialog
ref=
"inputClose"
mode=
"input"
title=
"确定取消该商品理货吗?"
value=
""
confirmText=
"确定"
cancelText=
"取消"
placeholder=
"请输入毛重"
@
close=
"dialogInputCanelClose"
@
confirm=
"dialogInputCanelConfirm"
:before-close=
"true"
></uni-popup-dialog>
</uni-popup>
</view>
</template>
...
...
@@ -151,8 +164,11 @@
export
default
{
data
()
{
return
{
is_focus_1
:
true
,
//获取焦点动态化
is_focus_2
:
false
,
//获取焦点动态化
box_sn
:
''
,
keyword
:
''
,
all_search
:
''
,
//全量搜索字段
tallyData
:
{},
//理货信息
goods_type
:
''
,
//商品型号
image_list
:
[],
//图片列表
...
...
@@ -161,10 +177,11 @@
curr
:
-
1
,
//当前打开的是哪个产地
origin
:
''
,
//搜索国家携带的参数
form
:
{},
formIndex
:
-
1
,
//记录打开了那个物料
title
:
''
,
gross_weight
:
''
,
index
:
0
,
item
:
[
'
其他
'
,
'DigiKey'
,
'Rochester'
,
'TME'
,
'Chip1stop'
,
'Mouser'
],
item
:
[
'
全量
'
,
'DigiKey'
,
'Rochester'
,
'TME'
,
'Chip1stop'
,
'Mouser'
],
net_weight_total
:
0
//净重合计
};
},
...
...
@@ -185,6 +202,7 @@
*/
maskClick
()
{
this
.
$refs
.
inputDialog
.
close
();
this
.
$refs
.
canelInputDialog
.
close
();
},
/**
* 找出false对应的下标
...
...
@@ -216,6 +234,11 @@
}
else
if
(
type
==
2
)
{
if
(
value
)
{
this
.
identifyQrCodeNumAndSn
();
}
else
{
this
.
goods_type
=
''
;
this
.
keyword
=
''
;
this
.
all_search
=
''
;
this
.
getTallyData
();
}
}
else
if
(
type
==
3
)
{
this
.
origin_list
=
[];
//数组清空
...
...
@@ -471,8 +494,10 @@
}
if
(
this
.
index
==
0
)
{
//区分其他
this
.
goods_type
=
''
;
this
.
getTallyData
();
}
else
{
this
.
all_search
=
''
;
let
codeTypeByIndex
=
{
1
:
'DigiKey'
,
2
:
'Rochester'
,
...
...
@@ -511,7 +536,7 @@
*
*/
getTallyData
()
{
this
.
request
(
API
.
getTallyData
,
'POST'
,
{
box_sn
:
this
.
box_sn
,
goods_type
:
this
.
goods_type
},
true
).
then
(
res
=>
{
this
.
request
(
API
.
getTallyData
,
'POST'
,
{
box_sn
:
this
.
box_sn
,
goods_type
:
this
.
goods_type
,
all_search
:
this
.
all_search
},
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
tallyData
=
res
.
data
;
if
(
res
.
data
.
detail
.
length
>
0
)
{
...
...
@@ -527,7 +552,8 @@
wstydl_id
:
item
.
wstydl_id
,
// 理货明细ID
erp_order_sn
:
this
.
erp_order_sn
,
// 入仓号
box_sn
:
this
.
box_sn
,
// 箱子
is_goods_check
:
item
.
is_goods_check
//是否商检
is_goods_check
:
item
.
is_goods_check
,
//是否商检
sync_status
:
item
.
sync_status
//明细同步状态
}));
this
.
image_list
=
res
.
data
.
detail
.
map
(()
=>
new
Array
());
//图片特殊处理
...
...
@@ -608,26 +634,16 @@
* 理货明细撤销
*/
cancelTallyDetail
(
index
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'确定取消该商品理货吗?'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
this
.
request
(
API
.
cancelTallyDetail
,
'POST'
,
{
wstydl_id
:
this
.
form
[
index
].
wstydl_id
,
box_sn
:
this
.
box_sn
},
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
getTallyData
(
1
);
//推送状态为 未推送,推送失败
if
(
this
.
form
[
index
].
sync_status
==
1
||
this
.
form
[
index
].
sync_status
==
4
)
{
this
.
$refs
.
canelInputDialog
.
open
();
this
.
formIndex
=
index
;
}
else
{
uni
.
showToast
({
title
:
res
.
err_msg
,
title
:
'该状态不可取消理货'
,
icon
:
'none'
});
}
});
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
});
},
/**
* 关单封箱
...
...
@@ -636,7 +652,7 @@
this
.
net_weight_total
=
this
.
form
.
filter
(
item
=>
item
.
tally_status
===
3
)
// 筛选出 tally_status 等于 3 的数据
.
reduce
((
acc
,
curr
)
=>
acc
+
parseFloat
(
curr
.
net_weight
),
0
);
// 将 net_weight 转换为数字并计算总和
this
.
title
=
`
入仓号
${
this
.
erp_order
_sn
}
已经全部验货完毕是否更换新的箱子?\n\n总净重:
${
this
.
net_weight_total
}
`
;
this
.
title
=
`
箱号
${
this
.
box
_sn
}
已经全部验货完毕是否更换新的箱子?\n\n总净重:
${
this
.
net_weight_total
}
`
;
this
.
$refs
.
inputDialog
.
open
();
},
/**
...
...
@@ -692,7 +708,63 @@
dialogInputClose
()
{
this
.
$refs
.
inputDialog
.
close
();
this
.
tallyData
=
[];
},
/**
* 取消理货取消
*/
dialogInputCanelClose
()
{
this
.
$refs
.
canelInputDialog
.
close
();
},
/**
* 取消理货确认
*/
dialogInputCanelConfirm
(
val
)
{
if
(
!
val
)
{
uni
.
showToast
({
title
:
'请输入毛重'
,
icon
:
'error'
});
return
false
;
}
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
.
getTallyData
();
},
2000
);
}
else
{
uni
.
showToast
({
title
:
res
.
err_msg
,
icon
:
'none'
});
}
});
},
/**
* 清空数据
*/
clearInput
(
type
)
{
if
(
type
==
1
)
{
this
.
box_sn
=
''
;
this
.
is_focus_1
=
false
;
setTimeout
(()
=>
{
this
.
is_focus_1
=
true
;
},
200
);
}
else
if
(
type
==
2
)
{
this
.
all_search
=
''
;
this
.
keyword
=
''
;
this
.
goods_type
=
''
;
this
.
is_focus_2
=
false
;
this
.
getTallyData
();
setTimeout
(()
=>
{
this
.
is_focus_2
=
true
;
},
200
);
}
},
}
};
</
script
>
...
...
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