Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
wmsApp
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
d4579db3
authored
Apr 16, 2024
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
理货--产地一栏,需要增加一套产地标准(即国家二字简写)
parent
c45a04a6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
113 additions
and
15 deletions
pages/tallyReceive/index.vue
pages/tallyReceive/operate.vue
pages/tallyReceive/index.vue
View file @
d4579db3
...
@@ -121,7 +121,7 @@
...
@@ -121,7 +121,7 @@
<text
class=
"label"
>
待理货数量:
</text>
<text
class=
"label"
>
待理货数量:
</text>
<text
class=
"ttt"
>
{{ item.wait_tally_qty }}
</text>
<text
class=
"ttt"
>
{{ item.wait_tally_qty }}
</text>
</view>
</view>
<navigator
class=
"btn-box row"
:url=
"'/pages/tallyReceive/operate?stock_in_item_id=' + item.stock_in_item_id + '&stock_in_id=' + item.stock_in_id + '&container_id=' + searchParams.container_id + '&container_name=' + searchParams.container_name"
hover-class=
"none"
>
<navigator
class=
"btn-box row"
:url=
"'/pages/tallyReceive/operate?stock_in_item_id=' + item.stock_in_item_id + '&stock_in_id=' + item.stock_in_id + '&container_id=' + searchParams.container_id + '&container_name=' + searchParams.container_name
+'&flag='+fastParams.flag+'&qty='+fastParams.qty+'&batch='+fastParams.batch+'&origin='+fastParams.origin
"
hover-class=
"none"
>
<view
class=
"btn row rowCenter verCenter"
>
理货
</view>
<view
class=
"btn row rowCenter verCenter"
>
理货
</view>
</navigator>
</navigator>
</view>
</view>
...
@@ -247,6 +247,12 @@
...
@@ -247,6 +247,12 @@
tally_remark
:
''
,
tally_remark
:
''
,
image_ids
:
''
,
//理货照片集合
image_ids
:
''
,
//理货照片集合
is_print
:
1
is_print
:
1
},
fastParams
:
{
flag
:
''
,
qty
:
''
,
batch
:
''
,
origin
:
''
}
}
};
};
},
},
...
@@ -545,17 +551,79 @@
...
@@ -545,17 +551,79 @@
this
.
searchParams
.
goods_name
=
res
.
data
.
model
;
//赋值检索出来的型号
this
.
searchParams
.
goods_name
=
res
.
data
.
model
;
//赋值检索出来的型号
this
.
resetChange
();
//清空数据
this
.
resetChange
();
//清空数据
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
getData
((
data
)
=>
{
this
.
getData
((
data
,
type
)
=>
{
//TME 特殊处理
//TME 特殊处理
if
(
code_type
==
'TME'
)
{
if
(
code_type
==
'TME'
)
{
//条件:后台搜索不到数据,则拿model2字段继续请求 只请求一次
//条件:后台搜索不到数据,则拿model2字段继续请求 只请求一次
if
(
data
.
length
==
0
&&
res
.
data
.
model2
&&
!
this
.
isStopRequest
)
{
if
(
data
.
length
==
0
&&
res
.
data
.
model2
&&
!
this
.
isStopRequest
)
{
this
.
isStopRequest
=
true
;
this
.
isStopRequest
=
true
;
this
.
searchParams
.
goods_name
=
res
.
data
.
model2
;
this
.
searchParams
.
goods_name
=
res
.
data
.
model2
;
//识别二维码的数量和型号
self
.
getData
();
//识别二维码的数量和型号
self
.
getData
((
data
,
type
)
=>
{
setTimeout
(()
=>
{
//如果搜索多个的情况
if
(
data
.
length
>
0
)
{
const
{
qty
,
origin
,
batch
}
=
res
.
data
;
this
.
fastParams
.
flag
=
'fast'
;
this
.
fastParams
.
qty
=
qty
;
this
.
fastParams
.
batch
=
batch
;
this
.
fastParams
.
origin
=
origin
;
//如果搜索只有一个的情况
if
(
data
.
length
==
1
)
{
const
{
stock_in_item_id
,
stock_in_id
}
=
data
[
0
];
const
{
container_id
,
container_name
}
=
this
.
searchParams
;
uni
.
navigateTo
({
url
:
'/pages/tallyReceive/operate?stock_in_item_id='
+
stock_in_item_id
+
'&stock_in_id='
+
stock_in_id
+
'&container_id='
+
container_id
+
'&container_name='
+
container_name
+
'&flag=fast'
+
'&qty='
+
qty
+
'&origin='
+
origin
+
'&batch='
+
batch
})
}
}
}
}
});
},
0
)
},
code_type
);
}
else
{
self
.
getData
((
data
,
type
)
=>
{
setTimeout
(()
=>
{
//如果搜索多个的情况
if
(
data
.
length
>
0
)
{
const
{
qty
,
origin
,
batch
}
=
res
.
data
;
this
.
fastParams
.
flag
=
'fast'
;
this
.
fastParams
.
qty
=
qty
;
this
.
fastParams
.
batch
=
batch
;
this
.
fastParams
.
origin
=
origin
;
//如果搜索只有一个的情况
if
(
data
.
length
==
1
)
{
const
{
stock_in_item_id
,
stock_in_id
}
=
data
[
0
];
const
{
container_id
,
container_name
}
=
this
.
searchParams
;
uni
.
navigateTo
({
url
:
'/pages/tallyReceive/operate?stock_in_item_id='
+
stock_in_item_id
+
'&stock_in_id='
+
stock_in_id
+
'&container_id='
+
container_id
+
'&container_name='
+
container_name
+
'&flag=fast'
+
'&qty='
+
qty
+
'&origin='
+
origin
+
'&batch='
+
batch
})
}
}
},
0
)
},
code_type
);
}
}
else
{
setTimeout
(()
=>
{
//如果搜索多个的情况
if
(
data
.
length
>
0
)
{
const
{
qty
,
origin
,
batch
}
=
res
.
data
;
this
.
fastParams
.
flag
=
'fast'
;
this
.
fastParams
.
qty
=
qty
;
this
.
fastParams
.
batch
=
batch
;
this
.
fastParams
.
origin
=
origin
;
//如果搜索只有一个的情况
if
(
data
.
length
==
1
)
{
const
{
stock_in_item_id
,
stock_in_id
}
=
data
[
0
];
const
{
container_id
,
container_name
}
=
this
.
searchParams
;
uni
.
navigateTo
({
url
:
'/pages/tallyReceive/operate?stock_in_item_id='
+
stock_in_item_id
+
'&stock_in_id='
+
stock_in_id
+
'&container_id='
+
container_id
+
'&container_name='
+
container_name
+
'&flag=fast'
+
'&qty='
+
qty
+
'&origin='
+
origin
+
'&batch='
+
batch
})
}
}
},
0
)
}
},
code_type
);
},
0
)
},
0
)
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
...
@@ -626,7 +694,7 @@
...
@@ -626,7 +694,7 @@
/**
/**
* 获取列表数据 支持分页
* 获取列表数据 支持分页
*/
*/
getData
(
callback
)
{
getData
(
callback
,
type
)
{
this
.
request
(
API
.
waitTallyReceiveList
,
'POST'
,
{
page
:
this
.
page
,
limit
:
this
.
limit
,
...
this
.
searchParams
},
false
).
then
(
res
=>
{
this
.
request
(
API
.
waitTallyReceiveList
,
'POST'
,
{
page
:
this
.
page
,
limit
:
this
.
limit
,
...
this
.
searchParams
},
false
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
if
(
res
.
data
.
total
>
0
)
{
if
(
res
.
data
.
total
>
0
)
{
...
@@ -636,7 +704,7 @@
...
@@ -636,7 +704,7 @@
}
else
{
}
else
{
this
.
hasMoreData
=
false
;
this
.
hasMoreData
=
false
;
}
}
typeof
callback
==
'function'
&&
callback
(
res
.
data
.
list
);
typeof
callback
==
'function'
&&
callback
(
res
.
data
.
list
,
type
);
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
msg
,
title
:
res
.
msg
,
...
...
pages/tallyReceive/operate.vue
View file @
d4579db3
...
@@ -161,6 +161,9 @@
...
@@ -161,6 +161,9 @@
<view
class=
"input-title"
>
<view
class=
"input-title"
>
<text
class=
"input-title-t1"
>
*
</text>
<text
class=
"input-title-t1"
>
*
</text>
<text
class=
"input-title-t2"
>
理货数量:
</text>
<text
class=
"input-title-t2"
>
理货数量:
</text>
<
template
v-if=
"is_tips"
>
<text
style=
"color: red;font-size:16rpx;"
>
⚠注意:理货数与待理货数不一致
</text>
</
template
>
</view>
</view>
<view
class=
"input-box"
><input
type=
"number"
class=
"uni-input"
placeholder-style=
"color:#919399"
placeholder=
"请输入理货数量"
v-model=
"formParams.tally_qty"
@
input=
"handleInputNumber($event, detail.wait_tally_qty)"
/></view>
<view
class=
"input-box"
><input
type=
"number"
class=
"uni-input"
placeholder-style=
"color:#919399"
placeholder=
"请输入理货数量"
v-model=
"formParams.tally_qty"
@
input=
"handleInputNumber($event, detail.wait_tally_qty)"
/></view>
</view>
</view>
...
@@ -185,9 +188,9 @@
...
@@ -185,9 +188,9 @@
<text
class=
"input-title-t2"
>
产 地:
</text>
<text
class=
"input-title-t2"
>
产 地:
</text>
</view>
</view>
<view
class=
"pick-box"
>
<view
class=
"pick-box"
>
<picker
@
change=
"bindPickerChange($event, 1)"
:value=
"useOptionIndex"
:range=
"useOption"
:range-key=
"'
country_cn
'"
>
<picker
@
change=
"bindPickerChange($event, 1)"
:value=
"useOptionIndex"
:range=
"useOption"
:range-key=
"'
name
'"
>
<view
class=
"row verCenter"
>
<view
class=
"row verCenter"
>
<view
class=
"uni-input"
>
{{ useOptionIndex == -1 ? '请选择' : useOption[useOptionIndex].
country_cn
}}
</view>
<view
class=
"uni-input"
>
{{ useOptionIndex == -1 ? '请选择' : useOption[useOptionIndex].
name
}}
</view>
<view
class=
"uni-arrow"
></view>
<view
class=
"uni-arrow"
></view>
</view>
</view>
</picker>
</picker>
...
@@ -383,6 +386,13 @@
...
@@ -383,6 +386,13 @@
useOptionIndex
:
-
1
,
useOptionIndex
:
-
1
,
useOption
:
[],
//产地
useOption
:
[],
//产地
warehouse_id
:
''
,
//区分仓库
warehouse_id
:
''
,
//区分仓库
is_tips
:
false
,
//是否展示提示
fastParams
:
{
flag
:
''
,
qty
:
''
,
batch
:
''
,
origin
:
''
},
searchParams
:
{
searchParams
:
{
stock_in_sn
:
''
,
//入库单号
stock_in_sn
:
''
,
//入库单号
tracking_no
:
''
,
//物流单号
tracking_no
:
''
,
//物流单号
...
@@ -409,6 +419,11 @@
...
@@ -409,6 +419,11 @@
this
.
stock_in_id
=
options
.
stock_in_id
||
''
;
this
.
stock_in_id
=
options
.
stock_in_id
||
''
;
this
.
searchParams
.
container_name
=
options
.
container_name
||
''
;
this
.
searchParams
.
container_name
=
options
.
container_name
||
''
;
this
.
searchParams
.
container_id
=
options
.
container_id
||
''
;
this
.
searchParams
.
container_id
=
options
.
container_id
||
''
;
//快速扫描
this
.
fastParams
.
flag
=
options
.
flag
;
this
.
fastParams
.
qty
=
options
.
qty
;
this
.
fastParams
.
batch
=
options
.
batch
;
this
.
fastParams
.
origin
=
options
.
origin
;
},
},
onShow
()
{
onShow
()
{
if
(
this
.
noexebshowFalg
)
{
if
(
this
.
noexebshowFalg
)
{
...
@@ -440,7 +455,7 @@
...
@@ -440,7 +455,7 @@
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
);
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
);
if
(
type
==
1
)
{
if
(
type
==
1
)
{
this
.
useOptionIndex
=
e
.
detail
.
value
;
this
.
useOptionIndex
=
e
.
detail
.
value
;
this
.
formParams
.
coo
=
this
.
useOption
[
e
.
detail
.
value
].
coo_en
;
this
.
formParams
.
coo
=
this
.
useOption
[
e
.
detail
.
value
].
value
;
}
else
if
(
type
==
2
)
{
}
else
if
(
type
==
2
)
{
this
.
print_style_index
=
e
.
detail
.
value
;
this
.
print_style_index
=
e
.
detail
.
value
;
//区分深圳自营和非深圳自营
//区分深圳自营和非深圳自营
...
@@ -598,10 +613,13 @@
...
@@ -598,10 +613,13 @@
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
if
(
res
.
data
.
length
>
0
)
{
if
(
res
.
data
.
length
>
0
)
{
this
.
useOption
=
res
.
data
;
this
.
useOption
=
res
.
data
;
let
filter_arr
=
this
.
findIndex
(
res
.
data
,
this
.
coo
);
//如果携带产地就自动赋值
if
(
filter_arr
.
length
>
0
)
{
if
(
this
.
fastParams
.
origin
)
{
this
.
useOptionIndex
=
filter_arr
[
0
];
var
index
=
res
.
data
.
findIndex
(
item
=>
item
.
name
.
split
(
'|'
).
includes
(
this
.
fastParams
.
origin
));
this
.
formParams
.
coo
=
res
.
data
[
this
.
useOptionIndex
].
coo_en
;
if
(
index
!=
-
1
)
{
this
.
useOptionIndex
=
index
;
this
.
formParams
.
coo
=
res
.
data
[
this
.
useOptionIndex
].
value
;
}
}
}
}
}
}
else
{
}
else
{
...
@@ -625,18 +643,30 @@
...
@@ -625,18 +643,30 @@
this
.
formParams
.
date_code
=
res
.
data
.
list
[
0
].
expect_date_code
;
this
.
formParams
.
date_code
=
res
.
data
.
list
[
0
].
expect_date_code
;
this
.
coo
=
res
.
data
.
list
[
0
].
coo_key
;
//产地
this
.
coo
=
res
.
data
.
list
[
0
].
coo_key
;
//产地
this
.
is_watch
=
res
.
data
.
list
[
0
].
is_watch
==
1
?
true
:
false
;
//是否看货
this
.
is_watch
=
res
.
data
.
list
[
0
].
is_watch
==
1
?
true
:
false
;
//是否看货
this
.
getUseOption
();
//初始化产地
if
(
res
.
data
.
list
[
0
].
mobile_default_img
)
{
if
(
res
.
data
.
list
[
0
].
mobile_default_img
)
{
this
.
image_list
=
res
.
data
.
list
[
0
].
mobile_default_img
.
split
(
','
);
this
.
image_list
=
res
.
data
.
list
[
0
].
mobile_default_img
.
split
(
','
);
}
else
{
}
else
{
this
.
image_list
=
[];
this
.
image_list
=
[];
}
}
//DigiKey 供应商快速扫描过来的
if
(
this
.
fastParams
.
flag
==
'fast'
)
{
if
(
this
.
fastParams
.
qty
)
{
this
.
formParams
.
tally_qty
=
this
.
fastParams
.
qty
;
//理货数量
this
.
is_tips
=
res
.
data
.
list
[
0
].
wait_tally_qty
!=
Number
(
this
.
formParams
.
tally_qty
);
}
if
(
this
.
fastParams
.
batch
)
{
this
.
formParams
.
date_code
=
this
.
fastParams
.
batch
;
//D/C
}
}
uni
.
setNavigationBarTitle
({
uni
.
setNavigationBarTitle
({
title
:
res
.
data
.
list
[
0
].
stock_in_sn
+
'-理货'
title
:
res
.
data
.
list
[
0
].
stock_in_sn
+
'-理货'
});
});
this
.
getOrderIsPrintLabel
(
res
.
data
.
list
[
0
].
order_items_id
);
this
.
getOrderIsPrintLabel
(
res
.
data
.
list
[
0
].
order_items_id
);
this
.
getUseOption
();
//初始化产地
}
}
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
...
...
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