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
c45a04a6
authored
Apr 12, 2024
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
打印入仓号
parent
4f843677
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
145 additions
and
13 deletions
assets/css/arrivalRegister/index.scss
pages/arrivalRegister/index.vue
pages/arrivalRegister/registered.vue
pages/transfer/quick.vue
util/api.js
assets/css/arrivalRegister/index.scss
View file @
c45a04a6
...
@@ -13,9 +13,12 @@
...
@@ -13,9 +13,12 @@
}
}
.search-all
{
.search-all
{
height
:
60rpx
;
height
:
60rpx
;
.search-all-box
{
height
:
60rpx
;
padding-left
:
17rpx
;
background
:
#ffffff
;
background
:
#ffffff
;
border-radius
:
10rpx
;
border-radius
:
10rpx
;
padding-left
:
17rpx
;
}
.icon-juxing1
{
.icon-juxing1
{
font-size
:
30rpx
;
font-size
:
30rpx
;
color
:
#919399
;
color
:
#919399
;
...
@@ -33,11 +36,20 @@
...
@@ -33,11 +36,20 @@
margin-left
:
13rpx
;
margin-left
:
13rpx
;
}
}
}
}
.print-btn
{
font-size
:
24rpx
;
color
:
#1969f9
;
}
.search-box
{
.search-box
{
height
:
60rpx
;
height
:
60rpx
;
.search-box-wrap
{
width
:
80%
;
height
:
60rpx
;
background
:
#ffffff
;
background
:
#ffffff
;
border-radius
:
10rpx
;
border-radius
:
10rpx
;
padding
:
0
18rpx
0
0
;
padding
:
0
18rpx
0
0
;
}
.sn
{
.sn
{
width
:
164rpx
;
width
:
164rpx
;
height
:
35rpx
;
height
:
35rpx
;
...
...
pages/arrivalRegister/index.vue
View file @
c45a04a6
...
@@ -42,6 +42,7 @@
...
@@ -42,6 +42,7 @@
<view
class=
"total-text"
>
共
<text>
{{
total
}}
</text>
条数据
</view>
<view
class=
"total-text"
>
共
<text>
{{
total
}}
</text>
条数据
</view>
</view>
</view>
<view
class=
"search-all row verCenter bothSide"
>
<view
class=
"search-all row verCenter bothSide"
>
<view
class=
"search-all-box row verCenter"
style=
"width: 80%;"
>
<view
class=
"row verCenter"
>
<view
class=
"row verCenter"
>
<text
class=
"iconfont icon-juxing1"
></text>
<text
class=
"iconfont icon-juxing1"
></text>
<!-- 全量搜索 -->
<!-- 全量搜索 -->
...
@@ -59,6 +60,8 @@
...
@@ -59,6 +60,8 @@
</view>
</view>
<text
class=
"iconfont icon-a-juxing11"
@
click=
"clearInput()"
v-if=
"input_flag"
></text>
<text
class=
"iconfont icon-a-juxing11"
@
click=
"clearInput()"
v-if=
"input_flag"
></text>
</view>
</view>
<view
class=
"print-btn"
@
click=
"print()"
>
打印入仓号
</view>
</view>
<!-- 列表数据 -->
<!-- 列表数据 -->
<view
class=
"list row bothSide"
v-if=
"list.length > 0"
>
<view
class=
"list row bothSide"
v-if=
"list.length > 0"
>
<view
class=
"box"
v-for=
"(item, index) in list"
:key=
"index"
:class=
"{ curr: filter_list[index] }"
>
<view
class=
"box"
v-for=
"(item, index) in list"
:key=
"index"
:class=
"{ curr: filter_list[index] }"
>
...
@@ -484,6 +487,7 @@
...
@@ -484,6 +487,7 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
user_email
:
uni
.
getStorageSync
(
'name'
),
is_focus
:
true
,
//获取焦点动态化
is_focus
:
true
,
//获取焦点动态化
indicatorDots
:
true
,
indicatorDots
:
true
,
autoplay
:
false
,
autoplay
:
false
,
...
@@ -1133,6 +1137,57 @@
...
@@ -1133,6 +1137,57 @@
}
}
},
},
/**
/**
* 打印入仓号
*/
print
()
{
if
(
this
.
filter_id
.
length
==
0
)
{
uni
.
showToast
({
title
:
'请选择入仓号'
,
icon
:
'error'
});
return
false
;
}
const
allElementsEqual
=
this
.
filter_id_warehouse_id
.
every
(
element
=>
element
===
this
.
filter_id_warehouse_id
[
0
]);
if
(
!
allElementsEqual
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'请勾选状态相同仓库的数据'
,
showCancel
:
false
});
return
false
;
}
var
ids
=
[];
this
.
filter_id
.
forEach
(
id
=>
{
// 在 list 中查找与当前 stock_in_id 匹配的对象
var
item
=
this
.
list
.
find
(
element
=>
element
.
stock_in_id
===
id
);
// 如果找到了匹配的对象
if
(
item
)
{
// 遍历匹配对象的 stock_in_items 数组
item
.
stock_in_items
.
forEach
(
stockItem
=>
{
// 将 inhouse 值添加到 ids 数组中
ids
.
push
(
stockItem
.
inhouse
);
});
}
});
// 去除重复值
ids
=
Array
.
from
(
new
Set
(
ids
));
this
.
request
(
API
.
printInhouse
,
'POST'
,
{
inhouse_str
:
ids
.
join
(
','
),
user_email
:
this
.
user_email
,
warehouse_id
:
this
.
filter_id_warehouse_id
[
0
]
},
true
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
uni
.
showToast
({
title
:
'打印成功'
,
icon
:
'success'
});
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'none'
});
}
});
},
/**
* @param {Object} stock_in_sn
* @param {Object} stock_in_sn
* @param {Object} type 1 第一次入库
* @param {Object} type 1 第一次入库
* 打开弹窗
* 打开弹窗
...
...
pages/arrivalRegister/registered.vue
View file @
c45a04a6
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<view
class=
"arrivalRegister"
>
<view
class=
"arrivalRegister"
>
<!-- 搜索条件 -->
<!-- 搜索条件 -->
<view
class=
"search-box row bothSide verCenter"
>
<view
class=
"search-box row bothSide verCenter"
>
<view
class=
"search-box-wrap row verCenter"
>
<view
class=
"sn row rowCenter verCenter"
>
<view
class=
"sn row rowCenter verCenter"
>
<picker
@
change=
"bindPickerChange"
:value=
"index"
:range=
"array"
>
<picker
@
change=
"bindPickerChange"
:value=
"index"
:range=
"array"
>
<view
class=
"row verCenter"
>
<view
class=
"row verCenter"
>
...
@@ -23,6 +24,8 @@
...
@@ -23,6 +24,8 @@
<text
class=
"iconfont icon-a-juxing11"
@
click=
"clearInput()"
v-if=
"input_flag"
></text>
<text
class=
"iconfont icon-a-juxing11"
@
click=
"clearInput()"
v-if=
"input_flag"
></text>
</view>
</view>
</view>
</view>
<view
class=
"print-btn"
@
click=
"print()"
>
打印入仓号
</view>
</view>
<!-- 列表 -->
<!-- 列表 -->
<view
class=
"list row bothSide"
v-if=
"list.length > 0"
>
<view
class=
"list row bothSide"
v-if=
"list.length > 0"
>
<view
class=
"box"
v-for=
"(item, index) in list"
:key=
"index"
:class=
"{ curr: filter_list[index] }"
>
<view
class=
"box"
v-for=
"(item, index) in list"
:key=
"index"
:class=
"{ curr: filter_list[index] }"
>
...
@@ -162,6 +165,7 @@
...
@@ -162,6 +165,7 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
user_email
:
uni
.
getStorageSync
(
'name'
),
is_focus
:
true
,
//获取焦点动态化
is_focus
:
true
,
//获取焦点动态化
input_flag
:
false
,
input_flag
:
false
,
all_flag
:
false
,
//全选标记
all_flag
:
false
,
//全选标记
...
@@ -172,6 +176,7 @@
...
@@ -172,6 +176,7 @@
list
:
[],
list
:
[],
filter_list
:
[],
//筛选已选中的列表
filter_list
:
[],
//筛选已选中的列表
filter_id
:
[],
//过滤id
filter_id
:
[],
//过滤id
filter_id_warehouse_id
:
[],
//过滤处理的仓库id
detail
:
{},
//详情的数据
detail
:
{},
//详情的数据
hasMoreData
:
true
,
//是否分页加载
hasMoreData
:
true
,
//是否分页加载
maxInputLength
:
7
,
maxInputLength
:
7
,
...
@@ -200,6 +205,10 @@
...
@@ -200,6 +205,10 @@
this
.
getData
();
this
.
getData
();
},
},
methods
:
{
methods
:
{
bindPickerChange
:
function
(
e
)
{
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
);
this
.
index
=
e
.
detail
.
value
;
},
/**
/**
* 找出false对应的下标
* 找出false对应的下标
* @param {Object} arr
* @param {Object} arr
...
@@ -221,6 +230,7 @@
...
@@ -221,6 +230,7 @@
this
.
$set
(
this
.
filter_list
,
index
,
(
this
.
filter_list
[
index
]
=
!
this
.
filter_list
[
index
]));
this
.
$set
(
this
.
filter_list
,
index
,
(
this
.
filter_list
[
index
]
=
!
this
.
filter_list
[
index
]));
let
filter_arr
=
this
.
findIndex
(
this
.
filter_list
,
true
);
let
filter_arr
=
this
.
findIndex
(
this
.
filter_list
,
true
);
this
.
filter_id
=
filter_arr
.
map
(
i
=>
this
.
list
[
i
].
stock_in_sn
);
this
.
filter_id
=
filter_arr
.
map
(
i
=>
this
.
list
[
i
].
stock_in_sn
);
this
.
filter_id_warehouse_id
=
filter_arr
.
map
(
i
=>
this
.
list
[
i
].
warehouse_id
);
},
},
/**
/**
* 全选
* 全选
...
@@ -372,9 +382,56 @@
...
@@ -372,9 +382,56 @@
}
}
});
});
},
},
bindPickerChange
:
function
(
e
)
{
/**
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
);
* 打印入仓号
this
.
index
=
e
.
detail
.
value
;
*/
print
()
{
if
(
this
.
filter_id
.
length
==
0
)
{
uni
.
showToast
({
title
:
'请选择入仓号'
,
icon
:
'error'
});
return
false
;
}
const
allElementsEqual
=
this
.
filter_id_warehouse_id
.
every
(
element
=>
element
===
this
.
filter_id_warehouse_id
[
0
]);
if
(
!
allElementsEqual
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'请勾选状态相同仓库的数据'
,
showCancel
:
false
});
return
false
;
}
var
ids
=
[];
this
.
filter_id
.
forEach
(
id
=>
{
// 在 list 中查找与当前 stock_in_sn 匹配的对象
var
item
=
this
.
list
.
find
(
element
=>
element
.
stock_in_sn
===
id
);
// 如果找到了匹配的对象
if
(
item
)
{
// 遍历匹配对象的 stock_in_items 数组
item
.
stock_in_items
.
forEach
(
stockItem
=>
{
// 将 inhouse 值添加到 ids 数组中
ids
.
push
(
stockItem
.
inhouse
);
});
}
});
// 去除重复值
ids
=
Array
.
from
(
new
Set
(
ids
));
this
.
request
(
API
.
printInhouse
,
'POST'
,
{
inhouse_str
:
ids
.
join
(
','
),
user_email
:
this
.
user_email
,
warehouse_id
:
this
.
filter_id_warehouse_id
[
0
]
},
true
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
uni
.
showToast
({
title
:
'打印成功'
,
icon
:
'success'
});
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'none'
});
}
});
},
},
/**
/**
* 打开弹窗
* 打开弹窗
...
...
pages/transfer/quick.vue
View file @
c45a04a6
...
@@ -259,6 +259,7 @@
...
@@ -259,6 +259,7 @@
stock_in_batch_sn
:
''
//入库批次号
stock_in_batch_sn
:
''
//入库批次号
},
},
formParams
:
{
formParams
:
{
sku_id
:
''
,
stock_id
:
''
,
stock_id
:
''
,
transfer_qty
:
''
,
transfer_qty
:
''
,
position_code
:
''
position_code
:
''
...
@@ -312,6 +313,9 @@
...
@@ -312,6 +313,9 @@
this
.
request
(
API
.
searchStockListByYW
,
'GET'
,
{
page
:
this
.
page
,
limit
:
this
.
limit
,
...
this
.
searchParams
},
false
).
then
(
res
=>
{
this
.
request
(
API
.
searchStockListByYW
,
'GET'
,
{
page
:
this
.
page
,
limit
:
this
.
limit
,
...
this
.
searchParams
},
false
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
this
.
list
=
res
.
data
.
list
;
this
.
list
=
res
.
data
.
list
;
if
(
res
.
data
.
list
.
length
>
0
)
{
this
.
formParams
.
sku_id
=
res
.
data
.
list
[
0
].
sku_id
;
//赋值sku_id
}
this
.
single_style
=
Number
(
res
.
data
.
count
)
>
1
?
false
:
true
;
this
.
single_style
=
Number
(
res
.
data
.
count
)
>
1
?
false
:
true
;
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
...
...
util/api.js
View file @
c45a04a6
//
const API_BASE_USER = 'http://user.liexindev.net'; //用户系统
const
API_BASE_USER
=
'http://user.liexindev.net'
;
//用户系统
//
const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统
const
API_BASE_PUR
=
'http://pur.liexindev.net'
;
//采购系统
//
const API_BASE = 'http://wms.liexindev.net'; //WMS系统
const
API_BASE
=
'http://wms.liexindev.net'
;
//WMS系统
//
const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统
const
API_BASE_OSS
=
'http://image.liexindev.net'
;
//oss系统
const
API_BASE_USER
=
'https://user.ichunt.net'
;
//用户系统
//
const API_BASE_USER = 'https://user.ichunt.net'; //用户系统
const
API_BASE_PUR
=
'https://purchase.ichunt.net'
;
//采购系统
//
const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统
const
API_BASE
=
'https://wms.ichunt.net'
;
//WMS系统
//
const API_BASE = 'https://wms.ichunt.net'; //WMS系统
const
API_BASE_OSS
=
'https://image.ichunt.net'
;
//oss系统
//
const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
const
API
=
{
const
API
=
{
...
@@ -355,7 +355,11 @@ const API = {
...
@@ -355,7 +355,11 @@ const API = {
/**
/**
* 修改理货照片
* 修改理货照片
* */
* */
changeStockTallyImages
:
API_BASE
+
'/api/stockIn/tallyReceive/changeStockTallyImages'
changeStockTallyImages
:
API_BASE
+
'/api/stockIn/tallyReceive/changeStockTallyImages'
,
/**
* 标签-入仓号
* */
printInhouse
:
API_BASE
+
'/api/label/printInhouse'
}
}
...
...
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