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
8a5d98bf
authored
Nov 14, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
移动端--拣货--权限及标签打印等优化
parent
6939c8e6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
50 deletions
assets/css/picking/sort.scss
pages/picking/sort.vue
pages/stocktake/operate.vue
assets/css/picking/sort.scss
View file @
8a5d98bf
...
...
@@ -482,7 +482,6 @@
.t1
{
font-size
:
20rpx
;
color
:
#1969f9
;
font-weight
:
bold
;
}
.print-type-box
{
margin-left
:
12rpx
;
...
...
pages/picking/sort.vue
View file @
8a5d98bf
...
...
@@ -31,6 +31,7 @@
<view
class=
"search-bar row bothSide verCenter"
:class=
"{ 'disabled-color': searchParams.position_name == '' ? true : false }"
>
<view
class=
"row verCenter"
>
<text
class=
"iconfont icon-juxing1"
></text>
<!-- 批量扫描 -->
<
template
v-if=
"is_batch"
>
<input
class=
"uni-input"
placeholder=
"请扫描入库标签"
:disabled=
"searchParams.position_name == '' ? true : false"
placeholder-style=
"color:#919399"
:focus=
"isFocus"
v-model=
"search_keyword"
@
input=
"handleInput(2, search_keyword)"
maxlength=
"15"
ref=
"myInput"
/>
</
template
>
...
...
@@ -222,7 +223,7 @@
<text
class=
"label"
>
货品编码:
</text>
<text
class=
"tt"
style=
"max-width: 100%;"
>
{{ detail.goods_sn }}
</text>
</view>
<view
class=
"item row verCenter"
>
<view
class=
"item row verCenter"
v-if=
"detail.sku_id > 0"
>
<text
class=
"label"
>
自营货品ID:
</text>
<text
class=
"tt"
style=
"max-width: 100%;"
>
{{ detail.sku_id }}
</text>
</view>
...
...
@@ -335,7 +336,12 @@
</view>
<!-- 拆货打印标签-->
<view
class=
"print row verCenter"
v-if=
"warehouse_id == 9"
>
<text
class=
"t1"
@
click=
"rePrintTag(1)"
>
拆货打印标签
</text>
<checkbox-group
@
change=
"onCheckboxChange"
>
<label>
<checkbox
value=
"1"
color=
"#1969f9"
style=
"transform:scale(0.7)"
checked
/>
</label>
</checkbox-group>
<text
class=
"t1"
>
拆货打印标签
</text>
<view
class=
"print-type-box row rowCenter verCenter"
>
<picker
@
change=
"bindPickerChange"
:value=
"print_style_index"
:range=
"print_style"
class=
"row rowCenter verCenter"
>
<view
class=
"row rowCenter verCenter"
>
...
...
@@ -538,6 +544,7 @@
data
()
{
return
{
isApp
:
uni
.
getSystemInfoSync
().
platform
===
'android'
||
uni
.
getSystemInfoSync
().
platform
===
'ios'
,
is_print
:
true
,
//是否打印货品标签
old_Label
:
false
,
//旧标签默认false
isFocus
:
false
,
is_batch
:
true
,
//是否开启批量
...
...
@@ -608,6 +615,14 @@
},
methods
:
{
/**
* @param {Object} e
* 拆货打印标签监听是否选择
*/
onCheckboxChange
(
e
)
{
console
.
log
(
'check 发生 change 事件,携带值为'
,
e
.
detail
.
value
);
this
.
is_print
=
e
.
detail
.
value
.
includes
(
'1'
);
},
/**
* 打印货品标签样式切换监听
* @param {Object} e
...
...
@@ -623,7 +638,7 @@
switchChange
(
e
,
type
)
{
console
.
log
(
'switch 发生 change 事件,携带值为'
,
e
.
detail
.
value
);
if
(
type
==
1
)
{
this
.
old_Label
=
e
.
detail
.
value
;
}
else
{
this
.
is_batch
=
e
.
detail
.
value
;
//重置相关数据
...
...
@@ -965,38 +980,6 @@
});
},
/**
*打印货品标签
*/
rePrintTag
(
type
)
{
if
(
type
==
1
)
{
this
.
rePrintTagParams
.
stock_out_item_id
=
this
.
detail
.
stock_out_item_id
;
this
.
rePrintTagParams
.
recheck_num
=
this
.
formParams
.
pick_qty
;
}
else
{
if
(
this
.
filter_id
.
length
==
0
)
{
uni
.
showToast
({
title
:
'请勾选数据'
,
icon
:
'error'
});
return
false
;
}
this
.
rePrintTagParams
.
stock_out_item_id
=
this
.
rePrintTagParams
.
stock_out_item_id
.
join
(
','
);
//出库明细ids
}
this
.
request
(
API
.
RePrintTag
,
'POST'
,
this
.
rePrintTagParams
,
true
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
uni
.
showToast
({
title
:
'操作成功'
,
icon
:
'success'
});
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'none'
});
}
});
},
/**
* 监听拣货数量
*/
handleInputNumber
:
debounce
(
function
(
event
,
num
)
{
...
...
@@ -1007,6 +990,22 @@
}
},
500
),
/**
* 清空数据
*/
clearInput
(
type
)
{
if
(
type
==
1
)
{
this
.
searchParams
.
position_name
=
''
;
this
.
input_flag_position_name
=
false
;
}
else
if
(
type
==
2
)
{
this
.
searchParams
.
stock_in_batch_sn
=
''
;
this
.
input_flag_stock_in_batch_sn
=
false
;
}
else
if
(
type
==
3
)
{
this
.
searchParams
.
container_sn
=
''
;
this
.
input_flag_container_sn
=
false
;
}
this
.
getData
();
},
/**
* 获取列表数据
*/
getData
(
callback
)
{
...
...
@@ -1023,15 +1022,19 @@
title
:
this
.
stock_out_sn
+
'拣货'
});
// 在进行条件判断之前,保存原始的stock_in_batch_sn值
const
originalStockInBatchSn
=
this
.
searchParams
.
stock_in_batch_sn
;
//入库批次号为自营仓库的时候,输入文本后自动截取前8位,作为入库批次号传给后台进行校验。
if
(
this
.
warehouse_id
==
9
&&
this
.
old_Label
)
{
this
.
searchParams
.
stock_in_batch_sn
=
this
.
searchParams
.
stock_in_batch_sn
.
substring
(
0
,
8
);
}
else
{
this
.
searchParams
.
stock_in_batch_sn
=
originalStockInBatchSn
;
}
this
.
request
(
URL
,
'POST'
,
{
page
:
this
.
page
,
limit
:
this
.
limit
,
...
this
.
searchParams
},
false
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
//过滤出应拣数量不为0的数据
if
(
this
.
curr
==
0
)
{
var
filteredList
=
res
.
data
.
list
.
filter
(
item
=>
item
.
lock_qty
-
item
.
pick_qty
>
0
);
...
...
@@ -1051,20 +1054,37 @@
});
},
/**
*
清空数据
*
打印货品标签
*/
clearInput
(
type
)
{
rePrintTag
(
type
)
{
//根据情景序列号不同的参数
if
(
type
==
1
)
{
this
.
searchParams
.
position_name
=
''
;
this
.
input_flag_position_name
=
false
;
}
else
if
(
type
==
2
)
{
this
.
searchParams
.
stock_in_batch_sn
=
''
;
this
.
input_flag_stock_in_batch_sn
=
false
;
}
else
if
(
type
==
3
)
{
this
.
searchParams
.
container_sn
=
''
;
this
.
input_flag_container_sn
=
false
;
this
.
rePrintTagParams
.
stock_out_item_id
=
this
.
detail
.
stock_out_item_id
;
this
.
rePrintTagParams
.
recheck_num
=
this
.
formParams
.
pick_qty
;
}
else
{
if
(
this
.
filter_id
.
length
==
0
)
{
uni
.
showToast
({
title
:
'请勾选数据'
,
icon
:
'error'
});
return
false
;
}
this
.
getData
();
this
.
rePrintTagParams
.
stock_out_item_id
=
this
.
rePrintTagParams
.
stock_out_item_id
.
join
(
','
);
//出库明细ids
}
this
.
request
(
API
.
RePrintTag
,
'POST'
,
this
.
rePrintTagParams
,
true
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
uni
.
showToast
({
title
:
'操作成功'
,
icon
:
'success'
});
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'none'
});
}
});
},
/**
* 按货品拣货提交
...
...
@@ -1081,6 +1101,12 @@
title
:
'拣货成功'
,
icon
:
'success'
});
//如果勾选了打印则触发打印
if
(
is_print
)
{
this
.
rePrintTag
(
1
);
}
setTimeout
(()
=>
{
this
.
getData
();
if
(
pick_qty_num
==
num
)
{
...
...
@@ -1089,7 +1115,7 @@
}
else
{
this
.
picked_num
=
Number
(
this
.
picked_num
)
-
pick_qty_num
;
}
},
2
000
);
},
4
000
);
}
else
{
uni
.
showModal
({
itle
:
'提示'
,
...
...
pages/stocktake/operate.vue
View file @
8a5d98bf
...
...
@@ -640,7 +640,6 @@
this
.
searchParams
.
goods_name
=
''
;
this
.
is_focus
=
true
;
},
500
);
},
2000
);
}
else
{
uni
.
showModal
({
...
...
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