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
23f21727
authored
Apr 29, 2024
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add
parent
228ef18a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
194 additions
and
13 deletions
assets/css/tally/index.scss
pages/tally/index.vue
assets/css/tally/index.scss
View file @
23f21727
...
...
@@ -195,3 +195,86 @@
height
:
100%
;
}
}
.popup-content
{
padding
:
28rpx
24rpx
24rpx
24rpx
;
.selected-items
{
flex-wrap
:
wrap
;
.box
{
padding
:
0
12rpx
;
height
:
44rpx
;
background
:
#ffffff
;
border-radius
:
4rpx
;
border
:
1rpx
solid
#197adb
;
margin-right
:
16rpx
;
margin-bottom
:
16rpx
;
.text
{
font-size
:
24rpx
;
color
:
#197adb
;
}
.close
{
margin-left
:
5rpx
;
font-size
:
36rpx
;
color
:
#197adb
;
}
}
}
.search-baar
{
height
:
88rpx
;
background
:
#ffffff
;
border-radius
:
4rpx
;
padding-left
:
24rpx
;
margin-bottom
:
16rpx
;
.iconfont
{
font-size
:
36rpx
;
color
:
#6e767a
;
}
.uni-input
{
margin-left
:
15rpx
;
font-size
:
28rpx
;
color
:
#404547
;
}
}
.data-list
{
background
:
#ffffff
;
border-radius
:
4rpx
;
margin-bottom
:
22rpx
;
max-height
:
504rpx
;
overflow-y
:
auto
;
.box
{
margin
:
0
24rpx
;
height
:
84rpx
;
border-bottom
:
1rpx
solid
#e6edf0
;
&
:last-child
{
border-bottom
:
none
;
}
.text
{
font-size
:
26rpx
;
color
:
#404547
;
}
.check-ico
{
width
:
24rpx
;
height
:
25rpx
;
background
:
url('https://img.ichunt.com/images/ichunt/202309/14/3743c01230310f62a2afa41a6c2eea96.png')
no-repeat
center
;
background-size
:
contain
;
display
:
block
;
}
&
.curr
{
.text
{
color
:
#197adb
;
}
.check-ico
{
background
:
url('https://img.ichunt.com/images/ichunt/202309/14/e651ddae61b5f02af4129f723b2cf74f.png')
no-repeat
center
;
background-size
:
contain
;
}
}
}
}
.pop-btn
{
height
:
88rpx
;
background
:
#197adb
;
border-radius
:
4rpx
;
font-size
:
28rpx
;
color
:
#ffffff
;
}
}
pages/tally/index.vue
View file @
23f21727
...
...
@@ -112,13 +112,13 @@
<view
class=
"row verCenter"
style=
"width: 50%;"
>
<text
class=
"t3 w130"
>
入库数量:
</text>
<view
class=
"input-text"
>
<input
class=
"uni-input"
type=
"number"
placeholder=
"输入"
placeholder-style=
"color:#000;font-weight: bold;"
/>
<input
class=
"uni-input"
type=
"number"
placeholder=
"输入"
placeholder-style=
"color:#000;font-weight: bold;"
v-model=
"form[index].tally_num"
/>
</view>
</view>
<view
class=
"row verCenter"
style=
"width: 50%;"
>
<text
class=
"t3 w130"
>
原产地:
</text>
<view
class=
"input-text"
>
<input
class=
"uni-input"
placeholder=
"输入"
placeholder-style=
"color:#000;font-weight: bold;"
disabled=
""
/>
<input
class=
"uni-input"
placeholder=
"输入"
placeholder-style=
"color:#000;font-weight: bold;"
disabled=
""
@
click=
"open(index)"
v-model=
"form[index].origin"
/>
</view>
</view>
</view>
...
...
@@ -126,7 +126,7 @@
<view
class=
"row verCenter"
style=
"width: 50%;"
>
<text
class=
"t3 w130"
>
净重:
</text>
<view
class=
"input-text"
>
<input
class=
"uni-input"
placeholder=
"输入"
placeholder-style=
"color:#000;font-weight: bold;"
/>
<input
class=
"uni-input"
placeholder=
"输入"
placeholder-style=
"color:#000;font-weight: bold;"
v-model=
"form[index].net_weight"
/>
</view>
</view>
</view>
...
...
@@ -151,16 +151,41 @@
<navigator
url=
"/pages/tally/printBox"
class=
"box row rowCenter verCenter"
hover-class=
"none"
>
打印箱号
</navigator>
<navigator
url=
"/pages/tally/abnormalTally"
class=
"box row rowCenter verCenter"
hover-class=
"none"
>
理货异常处理
</navigator>
</view>
<!-- 选择国家 -->
<uni-popup
ref=
"popup"
background-color=
"#F1F4F6"
>
<view
class=
"popup-content"
>
<view
class=
"search-baar row verCenter"
>
<text
class=
"iconfont icon-a-riqi11"
></text>
<input
type=
"text"
class=
"uni-input"
placeholder=
"请输入国家或地区名称(支持中英文)"
placeholder-style=
"font-size:26rpx;color:#6E767A;"
@
input=
"handleInput($event)"
v-model=
"origin"
style=
"width: 100%;"
/>
</view>
<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>
<view
class=
"check-ico"
></view>
</view>
</
template
>
<
template
v-else
>
<view
class=
"box row bothSide verCenter"
>
<text
class=
"text"
>
暂无数据
</text>
</view>
</
template
>
</view>
<view
class=
"pop-btn row rowCenter verCenter"
@
click=
"confirmChange"
>
确 认
</view>
</view>
</uni-popup>
</view>
</template>
<
script
>
import
{
API
}
from
'@/util/api.js'
;
import
debounce
from
'lodash/debounce'
;
import
{
createArray
}
from
'@/util/util.js'
;
export
default
{
data
()
{
return
{
curr
:
-
1
,
//当前打开的是哪个产地
fixBoxStyle
:
''
,
noexebshowFalg
:
true
,
//控制是否会触发生命周期
img_upload_url
:
'http://hk.image.semour.com'
,
...
...
@@ -171,24 +196,69 @@
goods_type
:
''
,
//商品型号
tallyData
:
{},
//理货信息
image_list
:
[],
//图片列表
form
:
{
tally_num
:
''
,
//入库数量
origin
:
''
,
//原产地
net_weight
:
''
,
//净重
wstydl_id
:
''
,
//理货明细ID
erp_order_sn
:
''
,
//入仓号
wsty_id
:
''
,
//箱子id
goods_check_pic
:
''
//商检的必须上传图片
}
filter_status
:
[],
//控制状态
origin_list
:
[],
//产地
origin
:
''
,
//搜索国家携带的参数
form
:
{}
};
},
created
()
{
this
.
getOrigin
();
},
methods
:
{
/**
* 找出false对应的下标
* @param {Object} arr
* @param {Object} target
*/
findIndex
(
arr
,
target
)
{
const
result
=
[];
arr
.
map
((
item
,
index
)
=>
{
if
(
item
===
target
)
{
result
.
push
(
index
);
}
});
return
result
;
},
bindPickerChange
:
function
(
e
)
{
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
);
this
.
index
=
e
.
detail
.
value
;
},
/**
*筛选过滤出选中的元素
*/
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
]);
this
.
form
[
this
.
curr
].
origin
=
name
[
0
];
this
.
$forceUpdate
();
this
.
$refs
.
popup
.
close
();
},
confirmChange
()
{
this
.
$refs
.
popup
.
close
();
},
/**
* 输入国家监听
* @param {Object} event
*/
handleInput
:
debounce
(
function
(
event
)
{
var
val
=
event
.
target
.
value
;
if
(
val
)
{
this
.
origin_list
=
[];
//数组清空
}
this
.
getOrigin
();
},
500
),
/**
* 打开弹窗
* @param {Object} index
*/
open
(
index
)
{
this
.
curr
=
index
;
this
.
filter_status
.
fill
(
false
);
this
.
$refs
.
popup
.
open
(
'bottom'
);
},
/**
* 选择图片
*/
chooseImageChange
()
{
...
...
@@ -306,6 +376,22 @@
});
},
/**
* 获取产地
*/
getOrigin
()
{
this
.
request
(
API
.
getOrigin
,
'GET'
,
{
origin
:
this
.
origin
},
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
origin_list
=
Object
.
values
(
res
.
data
);
this
.
filter_status
=
createArray
(
this
.
origin_list
.
length
,
false
);
}
else
{
uni
.
showToast
({
title
:
res
.
err_msg
,
icon
:
'none'
});
}
});
},
/**
* 获取锁定理货信息
*/
getTallyData
()
{
...
...
@@ -328,6 +414,18 @@
this
.
request
(
API
.
getTallyData
,
'POST'
,
{
erp_order_sn
:
this
.
erp_order_sn
,
goods_type
:
this
.
goods_type
},
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
tallyData
=
res
.
data
;
if
(
res
.
data
.
detail
.
length
>
0
)
{
// 使用 map 方法生成表单数组
this
.
form
=
res
.
data
.
detail
.
map
((
item
)
=>
({
tally_num
:
''
,
// 入库数量
origin
:
''
,
// 原产地
net_weight
:
''
,
// 净重
wstydl_id
:
''
,
// 理货明细ID
erp_order_sn
:
''
,
// 入仓号
wsty_id
:
''
,
// 箱子id
goods_check_pic
:
''
// 商检的必须上传图片
}));
}
}
else
{
uni
.
showToast
({
title
:
res
.
err_msg
,
...
...
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