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
60948629
authored
May 15, 2024
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
产地
parent
7a2b57b9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
103 additions
and
16 deletions
pages/tally/index.vue
pages/tally/unboxing.vue
pages/tally/index.vue
View file @
60948629
...
...
@@ -337,7 +337,7 @@
}
}
else
if
(
type
==
2
)
{
if
(
value
)
{
uni
.
hideKeyboard
()
uni
.
hideKeyboard
()
;
this
.
identifyQrCodeNumAndSn
();
}
else
{
this
.
goods_type
=
''
;
...
...
@@ -588,11 +588,18 @@
//解析处理的产地
if
(
res
.
data
.
origin
)
{
var
originIndex
=
this
.
origin_list
.
findIndex
(
item
=>
item
.
name
.
split
(
'|'
).
includes
(
res
.
data
.
origin
));
//通过英文去匹配出对应的中文国家
//排除已理货的数据
if
(
this
.
form
[
0
].
tally_status
!=
3
)
{
this
.
$set
(
this
.
form
[
0
],
'origin'
,
this
.
origin_list
[
originIndex
].
value
);
}
}
//解析处理的数量
if
(
res
.
data
.
qty
)
{
this
.
$set
(
this
.
form
[
0
],
'tally_num'
,
res
.
data
.
qty
);
//排除已理货的数据
if
(
this
.
form
[
0
].
tally_status
!=
3
)
{
this
.
$set
(
this
.
form
[
0
],
'tally_num'
,
res
.
data
.
qty
);
}
}
}
});
...
...
pages/tally/unboxing.vue
View file @
60948629
...
...
@@ -29,7 +29,7 @@
</
template
>
<!-- digikey等供应商-->
<
template
v-else
>
<input
class=
"uni-input"
:focus=
"is_focus_2"
placeholder=
"输入或扫描"
placeholder-style=
"color:#000;font-weight: bold;"
v-model=
"keyword"
@
input=
"handleInput($event,2)"
/>
<input
class=
"uni-input"
:focus=
"is_focus_2"
:confirm-type=
"'none'"
:hold-keyboard=
"false"
placeholder=
"输入或扫描"
placeholder-style=
"color:#000;font-weight: bold;"
v-model=
"keyword"
@
input=
"handleInput($event,2)"
/>
</
template
>
</view>
</view>
...
...
@@ -39,7 +39,7 @@
</view>
</view>
<!-- 列表 -->
<view
class=
"list"
v-if=
"
tallyData && tallyData.detail
"
>
<view
class=
"list"
v-if=
"
form.length > 0
"
>
<scroll-view
scroll-y=
"true"
class=
"scroll-Y"
>
<view
class=
"box"
v-for=
"(item,index) in tallyData.detail"
:key=
"index"
:class=
"{disabled:item.tally_status == 3}"
>
<view
class=
"title pb16 row verCenter"
>
...
...
@@ -47,10 +47,15 @@
<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"
>
<view
class=
"pb16 row bothSide verCenter"
>
<view
class=
"row"
style=
"width: 50%;"
>
<text
class=
"t3 w130"
>
物料名称:
</text>
<text
class=
"t4"
>
{{item.goods_title}}
</text>
</view>
<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>
</view>
</view>
<view
class=
"pb16 row"
>
<text
class=
"t3 w130"
>
入仓号:
</text>
<text
class=
"t4"
>
{{item.erp_order_sn}}
</text>
...
...
@@ -70,14 +75,35 @@
</view>
</view>
<view
class=
"pb16 row"
style=
"border-bottom: 1px solid #E6EDF0;padding-bottom: 24rpx;"
>
<view
class=
"row"
style=
"width: 50%;"
>
<!-- 完全理货 -->
<
template
v-if=
"item.tally_status == 3"
>
<view
class=
"row"
>
<text
class=
"t3 w130"
>
总数量:
</text>
<text
class=
"t4"
>
{{
item
.
order_numbers
}}
</text>
</view>
</
template
>
<!-- 1未理货2部分理货 -->
<
template
v-else
>
<view
class=
"row"
style=
"width: 50%;"
>
<text
class=
"t3 w130"
>
待收数量:
</text>
<text
class=
"t4"
>
{{
item
.
wait_tally_num
}}
</text>
</view>
<view
class=
"row"
style=
"width: 50%;"
>
<text
class=
"t3 w130"
style=
"text-align: right;"
>
总数量:
</text>
<text
class=
"t4"
>
{{
item
.
order_numbers
}}
</text>
</view>
</
template
>
</view>
<view
class=
"pb16 row verCenter bothSide"
style=
"margin-top: 24rpx;"
>
<view
class=
"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>
...
...
@@ -85,9 +111,11 @@
<view
class=
"row verCenter rowCenter"
>
<text
class=
"t3 w130"
style=
"width:105rpx;"
>
原产地:
</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
>
...
...
@@ -122,6 +150,12 @@
</view>
</scroll-view>
</view>
<!-- 无数据 -->
<view
class=
"no-data column verCenter rowCenter"
v-if=
"form.length == 0 && tallyData.create_time_cn"
>
<text
class=
"iconfont icon-jinggao2"
></text>
<text
class=
"text"
>
查找不到相关信息
</text>
<text
class=
"p"
>
1、请输入正确的入箱号和型号
</text>
</view>
<!-- 选择国家 -->
<uni-popup
ref=
"popup"
background-color=
"#F1F4F6"
>
<view
class=
"popup-content"
>
...
...
@@ -132,7 +166,7 @@
<view
class=
"data-list"
>
<
template
v-if=
"origin_list.length > 0"
>
<view
class=
"box row bothSide verCenter"
v-for=
"(item, index) in origin_list"
:key=
"index"
:class=
"
{ curr: filter_status[index] }" @click="filterChange(index)">
<text
class=
"text"
>
{{
item
}}
</text>
<text
class=
"text"
>
{{
item
.
name
}}
</text>
<view
class=
"check-ico"
></view>
</view>
</
template
>
...
...
@@ -221,6 +255,7 @@
bindPickerChange
:
function
(
e
)
{
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
);
this
.
index
=
e
.
detail
.
value
;
this
.
clearInput
(
2
);
},
/**
* @param {Object} event 输入框监听
...
...
@@ -233,6 +268,7 @@
}
}
else
if
(
type
==
2
)
{
if
(
value
)
{
uni
.
hideKeyboard
();
this
.
identifyQrCodeNumAndSn
();
}
else
{
this
.
goods_type
=
''
;
...
...
@@ -242,7 +278,7 @@
}
}
else
if
(
type
==
3
)
{
this
.
origin_list
=
[];
//数组清空
this
.
getOrigin
();
this
.
getOrigin
Cn
();
}
},
500
),
/**
...
...
@@ -251,7 +287,7 @@
filterChange
(
index
)
{
this
.
$set
(
this
.
filter_status
,
index
,
(
this
.
filter_status
[
index
]
=
!
this
.
filter_status
[
index
]));
let
filter_arr
=
this
.
findIndex
(
this
.
filter_status
,
true
);
let
name
=
filter_arr
.
map
(
i
=>
this
.
origin_list
[
i
]);
let
name
=
filter_arr
.
map
(
i
=>
this
.
origin_list
[
i
]
.
value
);
this
.
form
[
this
.
curr
].
origin
=
name
[
0
];
this
.
$forceUpdate
();
this
.
$refs
.
popup
.
close
();
...
...
@@ -481,6 +517,22 @@
});
},
/**
* 获取产地升级版
*/
getOriginCn
()
{
this
.
request
(
API
.
getOriginCn
,
'GET'
,
{
coo
:
this
.
origin
},
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
origin_list
=
res
.
data
;
this
.
filter_status
=
createArray
(
this
.
origin_list
.
length
,
false
);
}
else
{
uni
.
showToast
({
title
:
res
.
err_msg
,
icon
:
'none'
});
}
});
},
/**
* 识别
*/
identifyQrCodeNumAndSn
()
{
...
...
@@ -512,14 +564,33 @@
this
.
isRequestSent
=
true
;
// 设置标志,防止重复发送请求
this
.
request
(
API
.
scanQrCode
,
'POST'
,
{
data
:
this
.
keyword
,
type
:
codeType
,
device
:
device
.
deviceModel
},
true
).
then
(
res
=>
{
this
.
isRequestSent
=
false
;
// 请求完成后重置标志
if
(
res
.
code
===
0
)
{
if
(
res
.
err_
code
===
0
)
{
//如果后台搜索到型号则替换输入框的值
let
model
=
res
.
data
.
model
||
res
.
data
.
model2
;
if
(
model
)
{
this
.
keyword
=
model
;
//兼容TME
this
.
goods_type
=
model
;
//赋值检索出来的型号
}
this
.
getTallyData
();
this
.
getTallyData
((
json
)
=>
{
//解析出一个物料的情况下才执行此操作
if
(
json
.
length
==
1
)
{
//解析处理的产地-重新赋值
if
(
res
.
data
.
origin
)
{
var
originIndex
=
this
.
origin_list
.
findIndex
(
item
=>
item
.
name
.
split
(
'|'
).
includes
(
res
.
data
.
origin
));
//通过英文去匹配出对应的中文国家
//排除已理货的数据
if
(
this
.
form
[
0
].
tally_status
!=
3
)
{
this
.
$set
(
this
.
form
[
0
],
'origin'
,
this
.
origin_list
[
originIndex
].
value
);
}
}
//解析处理的数量-重新赋值
if
(
res
.
data
.
qty
)
{
//排除已理货的数据
if
(
this
.
form
[
0
].
tally_status
!=
3
)
{
this
.
$set
(
this
.
form
[
0
],
'tally_num'
,
res
.
data
.
qty
);
}
}
}
});
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
...
...
@@ -535,12 +606,12 @@
* 获取锁定理货信息
*
*/
getTallyData
()
{
getTallyData
(
callback
)
{
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
)
{
this
.
getOrigin
();
//获取产地
this
.
getOrigin
Cn
();
//获取产地
// 使用 map 方法生成表单数组
this
.
form
=
res
.
data
.
detail
.
map
((
item
)
=>
({
...
...
@@ -564,11 +635,11 @@
this
.
image_list
[
index
]
=
item
.
goods_check_pic
.
split
(
','
);
}
});
typeof
callback
==
'function'
&&
callback
(
this
.
form
);
}
else
{
uni
.
showToast
({
title
:
'查询不到该箱号信息'
,
icon
:
'none'
});
this
.
form
=
[];
}
}
else
{
uni
.
showToast
({
...
...
@@ -582,6 +653,15 @@
* 理货明细提交
*/
submitTallyDetail
(
index
)
{
if
(
!
this
.
box_sn
)
{
uni
.
showModal
({
title
:
''
,
content
:
'请先取箱号!并将打印的箱号贴于外箱上'
,
showCancel
:
false
});
return
false
;
}
if
(
!
this
.
form
[
index
].
tally_num
)
{
uni
.
showToast
({
title
:
'入库数量必填'
,
...
...
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