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
6282268f
authored
Feb 27, 2024
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
bug
parent
5dd89ad9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
40 deletions
pages/immediatelyStockIn/index.vue
pages/immediatelyStockIn/list.vue
util/api.js
pages/immediatelyStockIn/index.vue
View file @
6282268f
<
template
>
<view
class=
"immediatelyStockIn"
>
<!-- 仓库 -->
<view
class=
"form-input row verCenter"
>
<text
class=
"text row verCenter"
>
仓 库
</text>
<view
class=
"row bothSide verCenter select-wrap"
>
<picker
@
change=
"bindPickerChange($event)"
:value=
"warehouse_id_index"
:range=
"warehouse_id_data"
range-key=
"name"
style=
"width: 100%;"
>
<view
class=
"row verCenter bothSide"
>
<view
class=
"uni-input"
>
{{
warehouse_id_data
[
warehouse_id_index
]
?
warehouse_id_data
[
warehouse_id_index
].
name
:
''
}}
</view>
<view
class=
"uni-arrow"
></view>
</view>
</picker>
</view>
</view>
<!-- 入库批次号&旧标签 -->
<view
class=
"form-input row verCenter"
>
<view
class=
"pick-box row verCenter"
>
...
...
@@ -48,18 +60,6 @@
<text
class=
"iconfont icon-a-juxing11"
@
click=
"clearInput(2)"
v-if=
"input_goods_name"
></text>
</view>
</view>
<!-- 仓库 -->
<view
class=
"form-input row verCenter"
>
<text
class=
"text row verCenter"
>
仓 库
</text>
<view
class=
"row bothSide verCenter select-wrap"
>
<picker
@
change=
"bindPickerChange($event)"
:value=
"warehouse_id_index"
:range=
"warehouse_id_data"
range-key=
"name"
style=
"width: 100%;"
>
<view
class=
"row verCenter bothSide"
>
<view
class=
"uni-input"
>
{{ warehouse_id_data[warehouse_id_index] ? warehouse_id_data[warehouse_id_index].name : '' }}
</view>
<view
class=
"uni-arrow"
></view>
</view>
</picker>
</view>
</view>
<!-- 库位 -->
<view
class=
"form-input row verCenter"
:class=
"{ 'error-style': !is_submit }"
>
<text
class=
"text row verCenter"
>
库 位
</text>
...
...
@@ -84,8 +84,8 @@
is_focus3
:
false
,
is_focus4
:
false
,
is_submit
:
true
,
index
:
0
,
item
:
[
'货品编码'
,
'自营货品ID'
],
index
:
0
,
item_1
:
[
'入库批次号'
,
'旧标签'
],
index_1
:
0
,
input_stock_in_batch_sn
:
false
,
...
...
@@ -96,12 +96,12 @@
position_id_index
:
0
,
warehouse_id_data
:
[],
formParams
:
{
stock_in_batch_sn
:
''
,
sku_id
:
''
,
goods_sn
:
''
,
goods_name
:
''
,
warehouse_id
:
''
,
position_code
:
''
stock_in_batch_sn
:
''
,
//入库批次号
sku_id
:
''
,
//自营货品ID
goods_sn
:
''
,
//货品编码
goods_name
:
''
,
//货品名称
warehouse_id
:
''
,
//仓库
position_code
:
''
//库位
}
};
},
...
...
@@ -128,9 +128,28 @@
this
.
index_1
=
e
.
detail
.
value
;
this
.
clearInputAndFocus
(
4
);
//再次获取焦点
}
else
{
//仓库选择
//仓库选择
如果仓库切换,就清空其他数据
this
.
warehouse_id_index
=
e
.
detail
.
value
;
this
.
formParams
.
warehouse_id
=
this
.
warehouse_id_data
[
e
.
detail
.
value
].
value
;
//货品编码&自营货品ID
this
.
formParams
.
goods_sn
=
''
;
this
.
formParams
.
sku_id
=
''
;
this
.
input_goods_sn
=
false
;
// 货品名称
this
.
formParams
.
goods_name
=
''
;
this
.
input_goods_name
=
false
;
//库位
this
.
formParams
.
position_code
=
''
;
this
.
input_position
=
false
;
//入库批次号 旧标签
this
.
formParams
.
stock_in_batch_sn
=
''
;
this
.
input_stock_in_batch_sn
=
false
;
this
.
is_submit
=
true
;
}
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
);
},
...
...
@@ -157,6 +176,7 @@
this
.
formParams
.
position_code
=
''
;
this
.
input_position
=
false
;
this
.
clearInputAndFocus
(
3
);
//再次获取焦点
this
.
is_submit
=
true
;
}
else
if
(
type
==
4
)
{
//入库批次号 旧标签
this
.
formParams
.
stock_in_batch_sn
=
''
;
...
...
@@ -175,6 +195,7 @@
}
else
if
(
type
==
2
)
{
this
.
input_goods_name
=
true
;
}
else
if
(
type
==
3
)
{
//库位
this
.
input_position
=
true
;
this
.
getWhPositionList
(
this
.
formParams
.
warehouse_id
,
0
);
}
else
if
(
type
==
4
)
{
...
...
@@ -191,14 +212,15 @@
this
.
input_stock_in_batch_sn
=
false
;
}
}
},
5
00
),
},
8
00
),
/**
* 获取库存数据
*/
getData
()
{
this
.
request
(
API
.
getWareHouselist
,
'POST'
,
{
warehouse_status
:
1
},
fals
e
).
then
(
res
=>
{
this
.
request
(
API
.
getWareHouselist
,
'POST'
,
{
warehouse_status
:
1
},
tru
e
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
formParams
.
warehouse_id
=
res
.
data
.
list
[
0
].
warehouse_id
;
this
.
formParams
.
warehouse_id
=
res
.
data
.
list
[
0
].
warehouse_id
;
//默认仓库
//仓库集合
this
.
warehouse_id_data
=
res
.
data
.
list
.
map
(
function
(
item
)
{
return
{
name
:
item
.
warehouse_name
,
...
...
@@ -208,7 +230,7 @@
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'
error
'
icon
:
'
none
'
});
}
});
...
...
@@ -217,9 +239,10 @@
* 获取库位
*/
getWhPositionList
(
warehouse_id
,
stock_in_type
)
{
this
.
request
(
API
.
getWhPositionList
,
'POST'
,
{
warehouse_id
:
warehouse_id
,
stock_in_type
:
stock_in_type
},
false
).
then
(
res
=>
{
var
position_code
=
this
.
formParams
.
position_code
;
this
.
request
(
API
.
getWhPositionList
,
'POST'
,
{
warehouse_id
:
warehouse_id
,
stock_in_type
:
stock_in_type
},
true
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
var
position_code
=
this
.
formParams
.
position_code
;
//匹配是否正确的库位
this
.
is_submit
=
res
.
data
.
list
.
some
(
function
(
obj
)
{
return
obj
.
position_code
===
position_code
;
});
...
...
@@ -240,7 +263,7 @@
return
false
;
}
uni
.
navigateTo
({
url
:
'/pages/immediatelyStockIn/list?goods_sn='
+
this
.
formParams
.
goods_sn
+
'&goods_name='
+
this
.
formParams
.
goods_name
+
'&warehouse_id='
+
this
.
formParams
.
warehouse_id
+
'&position_
id='
+
this
.
formParams
.
position_id
+
'&sku_id='
+
this
.
formParams
.
sku_id
+
'&stock_in_batch_sn='
+
this
.
formParams
.
stock_in_batch_sn
url
:
'/pages/immediatelyStockIn/list?goods_sn='
+
this
.
formParams
.
goods_sn
+
'&goods_name='
+
this
.
formParams
.
goods_name
+
'&warehouse_id='
+
this
.
formParams
.
warehouse_id
+
'&position_
code='
+
this
.
formParams
.
position_code
+
'&sku_id='
+
this
.
formParams
.
sku_id
+
'&stock_in_batch_sn='
+
this
.
formParams
.
stock_in_batch_sn
});
},
/**
...
...
@@ -248,25 +271,25 @@
*/
clearInputAndFocus
(
type
)
{
if
(
type
==
1
)
{
this
.
input_
flag
=
false
;
//关闭叉叉
this
.
input_
goods_sn
=
false
;
//关闭叉叉
this
.
is_focus1
=
false
;
setTimeout
(()
=>
{
this
.
is_focus1
=
true
;
},
200
);
}
else
if
(
type
==
2
)
{
this
.
input_
flag
=
false
;
//关闭叉叉
this
.
input_
goods_name
=
false
;
this
.
is_focus2
=
false
;
setTimeout
(()
=>
{
this
.
is_focus2
=
true
;
},
200
);
}
else
if
(
type
==
3
)
{
this
.
input_
flag
=
false
;
//关闭叉叉
this
.
input_
position
=
false
;
this
.
is_focus3
=
false
;
setTimeout
(()
=>
{
this
.
is_focus3
=
true
;
},
200
);
}
else
if
(
type
==
4
)
{
this
.
input_
flag
=
false
;
//关闭叉叉
this
.
input_
stock_in_batch_sn
=
false
;
this
.
is_focus4
=
false
;
setTimeout
(()
=>
{
this
.
is_focus4
=
true
;
...
...
pages/immediatelyStockIn/list.vue
View file @
6282268f
...
...
@@ -137,7 +137,7 @@
return
{
list
:
[],
checked
:
false
,
countList
:
''
,
countList
:
{}
,
page
:
1
,
limit
:
30
,
count
:
0
,
...
...
@@ -197,6 +197,7 @@
this
.
formParams
.
sku_id
=
options
.
sku_id
||
''
;
},
onShow
()
{
this
.
list
=
[];
this
.
getData
();
},
methods
:
{
...
...
util/api.js
View file @
6282268f
const
API_BASE_USER
=
'http://user.liexindev.net'
;
//用户系统
const
API_BASE_PUR
=
'http://pur.liexindev.net'
;
//采购系统
const
API_BASE
=
'http://wms.liexindev.net'
;
//WMS系统
const
API_BASE_OSS
=
'http://image.liexindev.net'
;
//oss系统
//
const API_BASE_USER = 'http://user.liexindev.net'; //用户系统
//
const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统
//
const API_BASE = 'http://wms.liexindev.net'; //WMS系统
//
const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统
//
const API_BASE_USER = 'https://user.ichunt.net'; //用户系统
//
const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统
//
const API_BASE = 'https://wms.ichunt.net'; //WMS系统
//
const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
const
API_BASE_USER
=
'https://user.ichunt.net'
;
//用户系统
const
API_BASE_PUR
=
'https://purchase.ichunt.net'
;
//采购系统
const
API_BASE
=
'https://wms.ichunt.net'
;
//WMS系统
const
API_BASE_OSS
=
'https://image.ichunt.net'
;
//oss系统
const
API
=
{
...
...
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