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
11c9a30b
authored
May 16, 2024
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add
parent
071e2cc7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
37 deletions
pages/tally/abnormalTally.vue
pages/tally/index.vue
pages/tally/unboxing.vue
pages/tally/abnormalTally.vue
View file @
11c9a30b
...
@@ -285,7 +285,7 @@
...
@@ -285,7 +285,7 @@
});
});
return
false
;
return
false
;
}
}
this
.
request
(
API
.
closeBox
,
'POST'
,
{
wsty_id
:
this
.
wsty_id
,
gross_weight
:
val
},
true
).
then
(
res
=>
{
this
.
request
(
API
.
closeBox
,
'POST'
,
{
wsty_id
:
this
.
wsty_id
,
gross_weight
:
val
,
box_sn
:
this
.
box_sn
},
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
this
.
box_sn
=
''
;
this
.
box_sn
=
''
;
this
.
wsty_id
=
''
;
this
.
wsty_id
=
''
;
...
...
pages/tally/index.vue
View file @
11c9a30b
...
@@ -89,6 +89,7 @@
...
@@ -89,6 +89,7 @@
<text
class=
"t3 w130"
>
物料名称:
</text>
<text
class=
"t3 w130"
>
物料名称:
</text>
<text
class=
"t4"
>
{{item.goods_title}}
</text>
<text
class=
"t4"
>
{{item.goods_title}}
</text>
</view>
</view>
<!-- 完全理货显示箱号 -->
<view
class=
"row"
style=
"width: 50%;justify-content: flex-end;"
v-if=
"item.tally_status == 3"
>
<view
class=
"row"
style=
"width: 50%;justify-content: flex-end;"
v-if=
"item.tally_status == 3"
>
<text
class=
"t4"
style=
"text-align: right;color: #197adb;"
>
{{item.box_sn}}
</text>
<text
class=
"t4"
style=
"text-align: right;color: #197adb;"
>
{{item.box_sn}}
</text>
</view>
</view>
...
@@ -146,11 +147,11 @@
...
@@ -146,11 +147,11 @@
<view
class=
"input-text"
>
<view
class=
"input-text"
>
<!-- 完全理货 -->
<!-- 完全理货 -->
<
template
v-if=
"item.tally_status == 3"
>
<
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"
/>
<input
class=
"uni-input"
placeholder=
"
选择产地
"
placeholder-style=
"color:#000;font-weight: bold;"
disabled=
""
v-model=
"form[index].origin"
/>
</
template
>
</
template
>
<!-- 1未理货2部分理货 -->
<!-- 1未理货2部分理货 -->
<
template
v-else
>
<
template
v-else
>
<input
class=
"uni-input"
placeholder=
"
输入
"
placeholder-style=
"color:#000;font-weight: bold;"
disabled=
""
@
click=
"open(index)"
v-model=
"form[index].origin"
/>
<input
class=
"uni-input"
placeholder=
"
选择产地
"
placeholder-style=
"color:#000;font-weight: bold;"
disabled=
""
@
click=
"open(index)"
v-model=
"form[index].origin"
/>
</
template
>
</
template
>
</view>
</view>
</view>
</view>
...
@@ -168,21 +169,23 @@
...
@@ -168,21 +169,23 @@
<
template
v-if=
"image_list.length > 0"
>
<
template
v-if=
"image_list.length > 0"
>
<view
class=
"pic-box"
v-for=
"(v, i) in image_list[index]"
:key=
"i"
>
<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>
<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>
<view
class=
"delete row rowCenter verCenter"
@
click=
"deletePic(index,i)"
><text
class=
"iconfont icon-shanchu"
></text></view>
</
template
>
</view>
</view>
</template>
</template>
<!-- 完全理货 -->
<
template
v-if=
"item.tally_status == 3"
>
<
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>
<view
class=
"default row rowCenter verCenter"
v-if=
"image_list[index].length
<
4
"
><text
class=
"iconfont icon-xingzhuangjiehe"
></text></view>
</
template
>
</
template
>
<!-- 1未理货2部分理货 -->
<
template
v-else
>
<
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>
<view
class=
"default row rowCenter verCenter"
@
click=
"chooseImageChange(index)"
v-if=
"image_list[index].length
<
4
"
><text
class=
"iconfont icon-xingzhuangjiehe"
></text></view>
</
template
>
</
template
>
</view>
</view>
<!-- 完全理货 -->
<
template
v-if=
"item.tally_status == 3"
>
<
template
v-if=
"item.tally_status == 3"
>
<view
class=
"btn row rowCenter verCenter disabled"
@
click=
"cancelTallyDetail(index)"
>
取消理货
</view>
<view
class=
"btn row rowCenter verCenter disabled"
@
click=
"cancelTallyDetail(index)"
>
取消理货
</view>
</
template
>
</
template
>
<!-- 1未理货2部分理货 -->
<
template
v-else
>
<
template
v-else
>
<view
class=
"btn row rowCenter verCenter"
@
click=
"submitTallyDetail(index)"
>
提 交
</view>
<view
class=
"btn row rowCenter verCenter"
@
click=
"submitTallyDetail(index)"
>
提 交
</view>
</
template
>
</
template
>
...
@@ -270,14 +273,18 @@
...
@@ -270,14 +273,18 @@
};
};
},
},
watch
:
{
watch
:
{
image_list
(
arr
)
{
image_list
:
{
const
allNonEmpty
=
arr
.
every
(
subArr
=>
subArr
.
length
>
0
);
handler
(
arr
)
{
if
(
allNonEmpty
)
{
arr
.
forEach
((
subArr
,
index
)
=>
{
arr
.
forEach
((
item
,
index
)
=>
{
if
(
subArr
.
length
>
0
)
{
// 将数组元素用逗号连接成字符串,并赋值给对应的 form 中的 goods_check_pic 字段
// 将数组元素用逗号连接成字符串,并赋值给对应的 form 中的 goods_check_pic 字段
this
.
form
[
index
].
goods_check_pic
=
item
.
length
>
0
?
item
.
join
(
','
)
:
''
;
this
.
form
[
index
].
goods_check_pic
=
subArr
.
join
(
','
);
});
}
else
{
this
.
form
[
index
].
goods_check_pic
=
''
;
}
}
});
},
deep
:
true
// 深度监听
}
}
},
},
methods
:
{
methods
:
{
...
@@ -621,6 +628,17 @@
...
@@ -621,6 +628,17 @@
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
this
.
box_sn
=
res
.
data
.
box_sn
;
this
.
box_sn
=
res
.
data
.
box_sn
;
this
.
wsty_id
=
res
.
data
.
wsty_id
;
this
.
wsty_id
=
res
.
data
.
wsty_id
;
if
(
this
.
form
.
length
>
0
)
{
// 筛选出 tally_status 等于 1 或 2 的数据
var
filteredForm
=
this
.
form
.
filter
(
item
=>
item
.
tally_status
===
1
||
item
.
tally_status
===
2
);
// 替换 wsty_id
this
.
form
=
filteredForm
.
map
(
item
=>
{
return
{
...
item
,
wsty_id
:
this
.
wsty_id
,
box_sn
:
this
.
box_sn
};
});
}
}
else
{
}
else
{
uni
.
showModal
({
uni
.
showModal
({
title
:
''
,
title
:
''
,
...
@@ -707,13 +725,13 @@
...
@@ -707,13 +725,13 @@
// 使用 map 方法生成表单数组
// 使用 map 方法生成表单数组
this
.
form
=
res
.
data
.
detail
.
map
((
item
)
=>
({
this
.
form
=
res
.
data
.
detail
.
map
((
item
)
=>
({
tally_status
:
item
.
tally_status
,
//理货状态
tally_status
:
item
.
tally_status
,
//理货状态
tally_num
:
item
.
tally_num
,
// 入库数量
tally_num
:
item
.
tally_num
===
0
?
''
:
item
.
tally_num
,
// 入库数量,0 时显示为空
origin
:
item
.
origin
,
// 原产地
origin
:
item
.
origin
,
// 原产地
net_weight
:
item
.
net_weight
,
// 净重
net_weight
:
item
.
net_weight
,
// 净重
goods_check_pic
:
item
.
goods_check_pic
,
// 商检的必须上传图片
goods_check_pic
:
item
.
goods_check_pic
,
// 商检的必须上传图片
wstydl_id
:
item
.
wstydl_id
,
// 理货明细ID
wstydl_id
:
item
.
wstydl_id
,
// 理货明细ID
erp_order_sn
:
this
.
erp_order_sn
,
// 入仓号
erp_order_sn
:
this
.
erp_order_sn
,
// 入仓号
box_sn
:
item
.
box_sn
,
box_sn
:
item
.
tally_status
==
3
?
item
.
box_sn
:
this
.
box_sn
,
wsty_id
:
this
.
wsty_id
,
// 箱子id
wsty_id
:
this
.
wsty_id
,
// 箱子id
is_goods_check
:
item
.
is_goods_check
//是否商检
is_goods_check
:
item
.
is_goods_check
//是否商检
}));
}));
...
@@ -744,6 +762,9 @@
...
@@ -744,6 +762,9 @@
* 理货明细提交
* 理货明细提交
*/
*/
submitTallyDetail
(
index
)
{
submitTallyDetail
(
index
)
{
var
tally_num
=
parseInt
(
this
.
form
[
index
].
tally_num
);
var
netWeight
=
parseFloat
(
this
.
form
[
index
].
net_weight
);
if
(
!
this
.
box_sn
)
{
if
(
!
this
.
box_sn
)
{
uni
.
showModal
({
uni
.
showModal
({
title
:
''
,
title
:
''
,
...
@@ -752,23 +773,23 @@
...
@@ -752,23 +773,23 @@
});
});
return
false
;
return
false
;
}
}
if
(
!
t
his
.
form
[
index
].
t
ally_num
)
{
if
(
!
tally_num
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'
入库数量必填
'
,
title
:
'
请填写入库数量
'
,
icon
:
'error'
icon
:
'error'
});
});
return
false
;
return
false
;
}
}
if
(
!
this
.
form
[
index
].
origin
)
{
if
(
!
this
.
form
[
index
].
origin
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'
原产地必填
'
,
title
:
'
请填写原产地
'
,
icon
:
'error'
icon
:
'error'
});
});
return
false
;
return
false
;
}
}
if
(
!
this
.
form
[
index
].
net_w
eight
)
{
if
(
!
netW
eight
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'
净重必填
'
,
title
:
'
请填写净重
'
,
icon
:
'error'
icon
:
'error'
});
});
return
false
;
return
false
;
...
...
pages/tally/unboxing.vue
View file @
11c9a30b
...
@@ -108,11 +108,11 @@
...
@@ -108,11 +108,11 @@
<view
class=
"input-text"
>
<view
class=
"input-text"
>
<!-- 完全理货 -->
<!-- 完全理货 -->
<
template
v-if=
"item.tally_status == 3"
>
<
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"
/>
<input
class=
"uni-input"
placeholder=
"
选择产地
"
placeholder-style=
"color:#000;font-weight: bold;"
disabled=
""
v-model=
"form[index].origin"
/>
</
template
>
</
template
>
<!-- 1未理货2部分理货 -->
<!-- 1未理货2部分理货 -->
<
template
v-else
>
<
template
v-else
>
<input
class=
"uni-input"
placeholder=
"
输入
"
placeholder-style=
"color:#000;font-weight: bold;"
disabled=
""
@
click=
"open(index)"
v-model=
"form[index].origin"
/>
<input
class=
"uni-input"
placeholder=
"
选择产地
"
placeholder-style=
"color:#000;font-weight: bold;"
disabled=
""
@
click=
"open(index)"
v-model=
"form[index].origin"
/>
</
template
>
</
template
>
</view>
</view>
</view>
</view>
...
@@ -130,21 +130,23 @@
...
@@ -130,21 +130,23 @@
<
template
v-if=
"image_list.length > 0"
>
<
template
v-if=
"image_list.length > 0"
>
<view
class=
"pic-box"
v-for=
"(v, i) in image_list[index]"
:key=
"i"
>
<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>
<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>
<view
class=
"delete row rowCenter verCenter"
@
click=
"deletePic(index,i)"
><text
class=
"iconfont icon-shanchu"
></text></view>
</
template
>
</view>
</view>
</template>
</template>
<!-- 完全理货 -->
<
template
v-if=
"item.tally_status == 3"
>
<
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>
<view
class=
"default row rowCenter verCenter"
v-if=
"image_list[index].length
<
4
"
><text
class=
"iconfont icon-xingzhuangjiehe"
></text></view>
</
template
>
</
template
>
<!-- 1未理货2部分理货 -->
<
template
v-else
>
<
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>
<view
class=
"default row rowCenter verCenter"
@
click=
"chooseImageChange(index)"
v-if=
"image_list[index].length
<
4
"
><text
class=
"iconfont icon-xingzhuangjiehe"
></text></view>
</
template
>
</
template
>
</view>
</view>
<!-- 完全理货 -->
<
template
v-if=
"item.tally_status == 3"
>
<
template
v-if=
"item.tally_status == 3"
>
<view
class=
"btn row rowCenter verCenter disabled"
@
click=
"cancelTallyDetail(index)"
>
取消理货
</view>
<view
class=
"btn row rowCenter verCenter disabled"
@
click=
"cancelTallyDetail(index)"
>
取消理货
</view>
</
template
>
</
template
>
<!-- 1未理货2部分理货 -->
<
template
v-else
>
<
template
v-else
>
<view
class=
"btn row rowCenter verCenter"
@
click=
"submitTallyDetail(index)"
>
提 交
</view>
<view
class=
"btn row rowCenter verCenter"
@
click=
"submitTallyDetail(index)"
>
提 交
</view>
</
template
>
</
template
>
...
@@ -217,19 +219,23 @@
...
@@ -217,19 +219,23 @@
title
:
''
,
title
:
''
,
gross_weight
:
''
,
gross_weight
:
''
,
index
:
0
,
index
:
0
,
item
:
[
'全量'
,
'DigiKey'
,
'Rochester'
,
'TME'
,
'Chip1stop'
,
'Mouser'
],
item
:
[
'全量'
,
'DigiKey'
,
'Rochester'
,
'TME'
,
'Chip1stop'
],
net_weight_total
:
0
//净重合计
net_weight_total
:
0
//净重合计
};
};
},
},
watch
:
{
watch
:
{
image_list
(
arr
)
{
image_list
:
{
const
allNonEmpty
=
arr
.
every
(
subArr
=>
subArr
.
length
>
0
);
handler
(
arr
)
{
if
(
allNonEmpty
)
{
arr
.
forEach
((
subArr
,
index
)
=>
{
arr
.
forEach
((
item
,
index
)
=>
{
if
(
subArr
.
length
>
0
)
{
// 将数组元素用逗号连接成字符串,并赋值给对应的 form 中的 goods_check_pic 字段
// 将数组元素用逗号连接成字符串,并赋值给对应的 form 中的 goods_check_pic 字段
this
.
form
[
index
].
goods_check_pic
=
item
.
length
>
0
?
item
.
join
(
','
)
:
''
;
this
.
form
[
index
].
goods_check_pic
=
subArr
.
join
(
','
);
});
}
else
{
this
.
form
[
index
].
goods_check_pic
=
''
;
}
}
});
},
deep
:
true
// 深度监听
}
}
},
},
methods
:
{
methods
:
{
...
@@ -362,7 +368,7 @@
...
@@ -362,7 +368,7 @@
if
(
maxNum
>
4
)
{
if
(
maxNum
>
4
)
{
uni
.
hideLoading
();
uni
.
hideLoading
();
uni
.
showToast
({
uni
.
showToast
({
title
:
'图片不超过
5
张'
,
title
:
'图片不超过
4
张'
,
icon
:
'none'
icon
:
'none'
});
});
return
false
;
return
false
;
...
@@ -635,7 +641,7 @@
...
@@ -635,7 +641,7 @@
// 使用 map 方法生成表单数组
// 使用 map 方法生成表单数组
this
.
form
=
res
.
data
.
detail
.
map
((
item
)
=>
({
this
.
form
=
res
.
data
.
detail
.
map
((
item
)
=>
({
tally_status
:
item
.
tally_status
,
//理货状态
tally_status
:
item
.
tally_status
,
//理货状态
tally_num
:
item
.
tally_num
,
// 入库数量
tally_num
:
item
.
tally_num
===
0
?
''
:
item
.
tally_num
,
// 入库数量,0 时显示为空
origin
:
item
.
origin
,
// 原产地
origin
:
item
.
origin
,
// 原产地
net_weight
:
item
.
net_weight
,
// 净重
net_weight
:
item
.
net_weight
,
// 净重
goods_check_pic
:
item
.
goods_check_pic
,
// 商检的必须上传图片
goods_check_pic
:
item
.
goods_check_pic
,
// 商检的必须上传图片
...
@@ -672,6 +678,9 @@
...
@@ -672,6 +678,9 @@
* 理货明细提交
* 理货明细提交
*/
*/
submitTallyDetail
(
index
)
{
submitTallyDetail
(
index
)
{
var
tally_num
=
parseInt
(
this
.
form
[
index
].
tally_num
);
var
netWeight
=
parseFloat
(
this
.
form
[
index
].
net_weight
);
if
(
!
this
.
box_sn
)
{
if
(
!
this
.
box_sn
)
{
uni
.
showModal
({
uni
.
showModal
({
title
:
''
,
title
:
''
,
...
@@ -680,24 +689,23 @@
...
@@ -680,24 +689,23 @@
});
});
return
false
;
return
false
;
}
}
if
(
!
tally_num
)
{
if
(
!
this
.
form
[
index
].
tally_num
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'
入库数量必填
'
,
title
:
'
请填写入库数量
'
,
icon
:
'error'
icon
:
'error'
});
});
return
false
;
return
false
;
}
}
if
(
!
this
.
form
[
index
].
origin
)
{
if
(
!
this
.
form
[
index
].
origin
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'
原产地必填
'
,
title
:
'
请填写原产地
'
,
icon
:
'error'
icon
:
'error'
});
});
return
false
;
return
false
;
}
}
if
(
!
this
.
form
[
index
].
net_w
eight
)
{
if
(
!
netW
eight
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'
净重必填
'
,
title
:
'
请填写净重
'
,
icon
:
'error'
icon
:
'error'
});
});
return
false
;
return
false
;
...
@@ -721,6 +729,18 @@
...
@@ -721,6 +729,18 @@
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
getTallyData
();
this
.
getTallyData
();
},
2000
);
},
2000
);
}
else
if
(
res
.
err_code
===
10000
)
{
uni
.
showModal
({
title
:
''
,
content
:
res
.
err_msg
,
showCancel
:
false
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
// 用户点击确定按钮后的操作
this
.
getTallyData
();
}
}
});
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
err_msg
,
title
:
res
.
err_msg
,
...
...
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