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
7245a7c4
authored
Jun 01, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
打印快递单
parent
2060d6aa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
71 deletions
assets/css/stockRecheck/print.scss
pages.json
pages/stockRecheck/print.vue
assets/css/stockRecheck/print.scss
View file @
7245a7c4
...
...
@@ -162,7 +162,7 @@
}
.input-box
{
.uni-input
{
height
:
55
rpx
;
height
:
40
rpx
;
background
:
#ffffff
;
border-radius
:
10rpx
;
border
:
1px
solid
#1969f9
;
...
...
@@ -172,7 +172,7 @@
}
}
.select-box
{
height
:
55
rpx
;
height
:
40
rpx
;
background
:
#ffffff
;
border-radius
:
10rpx
;
border
:
1px
solid
#1969f9
;
...
...
@@ -180,7 +180,7 @@
.wrap
{
padding-left
:
15rpx
;
padding-right
:
25rpx
;
height
:
55
rpx
;
height
:
40
rpx
;
}
.uni-input
{
font-size
:
17rpx
;
...
...
pages.json
View file @
7245a7c4
...
...
@@ -214,7 +214,19 @@
},
{
"path"
:
"pages/stockRecheck/index"
,
"style"
:
{
"navigationBarTitleText"
:
"复核"
"navigationBarTitleText"
:
"复核"
,
"app-plus"
:
{
"titleNView"
:
{
"buttons"
:
[{
"index"
:
"0"
,
"text"
:
"打印快递单"
,
"fontSize"
:
"15px"
,
"color"
:
"#1969F9"
,
"float"
:
"right"
,
"width"
:
"100px"
}]
}
}
}
},
{
"path"
:
"pages/stockRecheck/sort"
,
...
...
pages/stockRecheck/print.vue
View file @
7245a7c4
...
...
@@ -93,7 +93,7 @@
</view>
<view
class=
"item row verCenter"
style=
"flex: 0 0 100%;"
>
<text
class=
"label"
>
收货客户:
</text>
<text
class=
"tt"
>
{{
detail
.
stock_out_info
.
customer_name
}}
</text>
<text
class=
"tt"
style=
"max-width: 100%;"
>
{{
detail
.
stock_out_info
.
customer_name
}}
</text>
</view>
<view
class=
"item row verCenter"
>
<text
class=
"label"
>
操 作 人:
</text>
...
...
@@ -116,7 +116,7 @@
<view
class=
"select-box row"
>
<picker
@
change=
"bindPickerChange(1, $event)"
:value=
"real_shipping_type_index"
:range=
"real_shipping_type_data"
:range-key=
"'name'"
style=
"width: 100%;"
>
<view
class=
"row verCenter bothSide wrap"
>
<view
class=
"uni-input"
>
{{
real_shipping_type_data
[
real_shipping_type_index
].
name
}}
</view>
<view
class=
"uni-input"
>
{{
real_shipping_type_
index
==
-
1
?
'请选择'
:
real_shipping_type_
data
[
real_shipping_type_index
].
name
}}
</view>
<view
class=
"uni-arrow"
></view>
</view>
</picker>
...
...
@@ -124,44 +124,42 @@
</view>
<view
class=
"form-input"
>
<view
class=
"input-title"
>
<text
class=
"input-title-t1"
>
*
</text>
<text
class=
"input-title-t1"
v-if=
"formParams.real_shipping_type != 2"
>
*
</text>
<text
class=
"input-title-t2"
>
物流公司:
</text>
</view>
<view
class=
"select-box row"
>
<picker
@
change=
"bindPickerChange(2, $event)"
:value=
"real_shipping_id_index"
:range=
"real_shipping_id_data"
:range-key=
"'name'"
style=
"width: 100%;"
>
<view
class=
"row verCenter bothSide wrap"
>
<view
class=
"uni-input"
>
{{
real_shipping_id_
data
[
real_shipping_id_index
].
name
||
'请选择'
}}
</view>
<view
class=
"uni-input"
>
{{
real_shipping_id_
index
==
-
1
?
'请选择'
:
real_shipping_id_data
[
real_shipping_id_index
].
name
}}
</view>
<view
class=
"uni-arrow"
></view>
</view>
</picker>
</view>
</view>
<view
class=
"form-input"
>
<view
class=
"input-title"
>
<text
class=
"input-title-t1"
>
*
</text>
<text
class=
"input-title-t2"
>
物流模式:
</text>
</view>
<view
class=
"input-title"
><text
class=
"input-title-t2"
>
物流模式:
</text></view>
<view
class=
"select-box row"
>
<picker
@
change=
"bindPickerChange(3, $event)"
:value=
"real_shipping_mode_index"
:range=
"real_shipping_mode_data"
:range-key=
"'name'"
style=
"width: 100%;"
>
<view
class=
"row verCenter bothSide wrap"
>
<view
class=
"uni-input"
>
{{
real_shipping_mode_data
[
real_shipping_mode_index
].
name
}}
</view>
<view
class=
"uni-input"
>
{{
real_shipping_mode_
index
==
-
1
?
'请选择'
:
real_shipping_mode_
data
[
real_shipping_mode_index
].
name
}}
</view>
<view
class=
"uni-arrow"
></view>
</view>
</picker>
</view>
</view>
<template
v-if=
"formParams.real_shipping_type == 1 && formParams.real_shipping_id == 1"
></
template
>
<
template
v-else
>
<view
class=
"form-input"
>
<view
class=
"input-title"
>
<text
class=
"input-title-t1"
>
*
</text>
<text
class=
"input-title-t2"
>
物流单号:
</text>
</view>
<view
class=
"input-box"
><input
type=
"text"
class=
"uni-input"
placeholder-style=
"color:#919399"
placeholder=
"请输入"
v-model=
"formParams.shipping_code"
/></view>
<view
class=
"form-input"
>
<view
class=
"input-title"
><text
class=
"input-title-t2"
>
物流单号:
</text></view>
<view
class=
"input-box"
>
<template
v-if=
"formParams.real_shipping_type == 1 && formParams.real_shipping_id == 1"
>
<input
type=
"text"
disabled
style=
"background-color: #f6f6f6;border: 1px solid #eee;"
class=
"uni-input"
placeholder-style=
"color:#919399"
placeholder=
"请输入"
v-model=
"formParams.shipping_code"
/>
</
template
>
<
template
v-else
>
<input
type=
"text"
class=
"uni-input"
placeholder-style=
"color:#919399"
placeholder=
"请输入"
v-model=
"formParams.shipping_code"
/>
</
template
>
</view>
</
template
>
<view
class=
"print row verCenter"
@
click=
"toggel()
"
>
<text
class=
"check-box-icon"
:class=
"{ curr:
flag
}"
></text>
</
view
>
<view
class=
"print row verCenter"
v-if=
"detail.stock_out_info
"
>
<text
class=
"check-box-icon"
:class=
"{ curr:
detail.stock_out_info.is_receipt == 1
}"
></text>
<text
class=
"tt"
>
签回单
</text>
</view>
<view
class=
"bor"
></view>
...
...
@@ -220,14 +218,7 @@
<view
class=
"input-box"
><input
type=
"text"
class=
"uni-input"
placeholder-style=
"color:#919399"
placeholder=
"请输入"
v-model=
"formParams.address"
/></view>
</view>
</view>
<view
class=
"btn row verCenter bothSide"
>
<
template
v-if=
"formParams.real_shipping_type == 1 && formParams.real_shipping_id == 1"
>
<view
class=
"btn1 row rowCenter verCenter"
style=
"width: 100%;"
@
click=
"updateDeliveryInfo(detail.stock_out_info.stock_out_id)"
>
保存
</view>
</
template
>
<
template
v-else
>
<view
class=
"btn2 row rowCenter verCenter"
style=
"width: 100%;"
@
click=
"updateDeliveryInfo(detail.stock_out_info.stock_out_id)"
>
保存
</view>
</
template
>
</view>
<view
class=
"btn row verCenter bothSide"
><view
class=
"btn1 row rowCenter verCenter"
style=
"width: 100%;"
@
click=
"updateDeliveryInfo(detail.stock_out_info.stock_out_id)"
>
保存
</view></view>
</view>
</uni-drawer>
</view>
...
...
@@ -246,13 +237,14 @@ export default {
limit
:
10000
,
list
:
[],
index
:
0
,
real_shipping_type_index
:
0
,
real_shipping_id_index
:
0
,
real_shipping_mode_index
:
0
,
real_shipping_type_index
:
-
1
,
real_shipping_id_index
:
-
1
,
real_shipping_mode_index
:
-
1
,
array
:
[
'出库单号'
],
detail
:
{},
real_shipping_type_data
:
[{
name
:
'快递'
,
value
:
1
},
{
name
:
'自送'
,
value
:
2
},
{
name
:
'客户自取'
,
value
:
3
},
{
name
:
'同城物流'
,
value
:
4
}],
//交货方式数据
real_shipping_id_data
:
[],
//物流公司数据
real_shipping_mode_data
:
[{
name
:
'空运'
,
value
:
1
},
{
name
:
'陆运'
,
value
:
2
}
,
{
name
:
'重货快运'
,
value
:
3
},
{
name
:
'物流普运'
,
value
:
4
}
],
//物流模式数据
real_shipping_mode_data
:
[{
name
:
'空运'
,
value
:
1
},
{
name
:
'陆运'
,
value
:
2
}],
//物流模式数据
searchParams
:
{
stock_out_sn
:
''
},
...
...
@@ -281,19 +273,6 @@ export default {
onShow
()
{
this
.
getData
();
},
computed
:
{
//交货方式数据
real_shipping_type_data
()
{
const
company_id
=
Number
(
uni
.
getStorageSync
(
'company_id'
));
if
(
company_id
==
1
)
{
return
[{
name
:
'快递'
,
value
:
1
},
{
name
:
'自送'
,
value
:
2
},
{
name
:
'客户自取'
,
value
:
3
},
{
name
:
'同城物流'
,
value
:
4
}];
}
else
if
(
company_id
==
2
)
{
return
[{
name
:
'快递'
,
value
:
1
}];
}
else
{
return
[];
}
}
},
methods
:
{
toggel
()
{
this
.
flag
=
!
this
.
flag
;
...
...
@@ -304,9 +283,15 @@ export default {
}
},
bindPickerChange
:
function
(
type
,
e
)
{
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
);
if
(
type
==
1
)
{
this
.
real_shipping_type_index
=
e
.
detail
.
value
;
this
.
formParams
.
real_shipping_type
=
this
.
real_shipping_type_data
[
e
.
detail
.
value
].
value
;
if
(
this
.
formParams
.
real_shipping_type
==
2
)
{
this
.
real_shipping_id_index
=
-
1
;
}
else
{
this
.
real_shipping_id_index
=
0
;
}
this
.
realShippChage
();
}
else
if
(
type
==
2
)
{
this
.
real_shipping_id_index
=
e
.
detail
.
value
;
...
...
@@ -315,31 +300,22 @@ export default {
this
.
real_shipping_mode_index
=
e
.
detail
.
value
;
this
.
formParams
.
real_shipping_mode
=
this
.
real_shipping_mode_data
[
e
.
detail
.
value
].
value
;
}
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
);
},
/**
* 根据所选的交货方式,显示对应的物流公司
* @param {Object} value
*/
realShippChage
()
{
const
company_id
=
Number
(
uni
.
getStorageSync
(
'company_id'
));
let
value
=
this
.
formParams
.
real_shipping_type
;
if
(
company_id
==
1
)
{
this
.
real_shipping_id_data
=
[];
if
(
value
==
1
)
{
this
.
real_shipping_id_data
.
push
({
name
:
'顺丰'
,
value
:
1
},
{
name
:
'京东'
,
value
:
11
},
{
name
:
'中通'
,
value
:
18
},
{
name
:
'韵达'
,
value
:
5
});
}
else
if
(
value
==
2
)
{
this
.
real_shipping_id_data
=
[];
if
(
value
==
1
)
{
this
.
real_shipping_id_data
.
push
({
name
:
'顺丰'
,
value
:
1
},
{
name
:
'京东'
,
value
:
11
},
{
name
:
'中通'
,
value
:
18
},
{
name
:
'韵达'
,
value
:
5
});
}
else
if
(
value
==
2
)
{
this
.
real_shipping_id_data
=
[];
}
else
if
(
value
==
3
)
{
this
.
real_shipping_id_data
.
push
({
name
:
'自提'
,
value
:
10
});
}
else
if
(
value
==
4
)
{
this
.
real_shipping_id_data
.
push
({
name
:
'顺丰同城'
,
value
:
19
},
{
name
:
'货拉拉'
,
value
:
20
},
{
name
:
'跨越速运'
,
value
:
21
});
}
}
else
if
(
company_id
==
2
)
{
if
(
value
==
1
)
{
this
.
real_shipping_id_data
.
push
({
name
:
'顺丰'
,
value
:
1
},
{
name
:
'UPS'
,
value
:
17
},
{
name
:
'Fedex'
,
value
:
13
},
{
name
:
'TNT'
,
value
:
9
},
{
name
:
'DHL'
,
value
:
12
});
}
}
else
if
(
value
==
3
)
{
this
.
real_shipping_id_data
.
push
({
name
:
'自提'
,
value
:
10
});
}
else
if
(
value
==
4
)
{
this
.
real_shipping_id_data
.
push
({
name
:
'顺丰同城'
,
value
:
19
},
{
name
:
'货拉拉'
,
value
:
20
},
{
name
:
'跨越速运'
,
value
:
21
});
}
},
showDrawer
(
stock_out_sn
)
{
...
...
@@ -358,6 +334,20 @@ export default {
this
.
getData
();
},
/**
* 找出false对应的下标
* @param {Object} arr
* @param {Object} target
*/
findIndex
(
arr
,
target
)
{
const
result
=
[];
arr
.
map
((
item
,
index
)
=>
{
if
(
item
.
value
===
target
)
{
result
.
push
(
index
);
}
});
return
result
;
},
/**
* 单号搜索
* @param {Object} event
*/
...
...
@@ -392,16 +382,27 @@ export default {
this
.
request
(
API
.
getStockOutDetail
,
'POST'
,
{
stock_out_sn
:
stock_out_sn
},
true
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
detail
=
res
.
data
;
this
.
formParams
.
real_shipping_type
=
1
;
//设置默认
this
.
formParams
.
real_shipping_id
=
1
;
this
.
formParams
.
shipping_code
=
res
.
data
.
stock_out_address
.
shipping_code
;
this
.
formParams
.
real_shipping_type
=
res
.
data
.
stock_out_address
.
real_shipping_type
;
//交货方式
let
real_shipping_type_index
=
this
.
findIndex
(
this
.
real_shipping_type_data
,
this
.
formParams
.
real_shipping_type
);
this
.
real_shipping_type_index
=
real_shipping_type_index
[
0
];
this
.
realShippChage
();
//更新物流公司
this
.
formParams
.
real_shipping_id
=
res
.
data
.
stock_out_address
.
real_shipping_id
;
//物流公司
let
real_shipping_id_index
=
this
.
findIndex
(
this
.
real_shipping_id_data
,
this
.
formParams
.
real_shipping_id
);
this
.
real_shipping_id_index
=
real_shipping_id_index
[
0
];
this
.
formParams
.
real_shipping_mode
=
res
.
data
.
stock_out_address
.
real_shipping_mode
;
//物流模式
let
real_shipping_mode_index
=
this
.
findIndex
(
this
.
real_shipping_mode_data
,
this
.
formParams
.
real_shipping_mode
);
this
.
real_shipping_mode_index
=
real_shipping_mode_index
[
0
];
this
.
formParams
.
shipping_code
=
res
.
data
.
stock_out_address
.
shipping_code
;
//物流单号
this
.
formParams
.
consignee
=
res
.
data
.
stock_out_address
.
consignee
;
this
.
formParams
.
mobile
=
res
.
data
.
stock_out_address
.
mobile
;
this
.
formParams
.
province
=
res
.
data
.
stock_out_address
.
province
;
this
.
formParams
.
city
=
res
.
data
.
stock_out_address
.
city
;
this
.
formParams
.
district
=
res
.
data
.
stock_out_address
.
district
;
this
.
formParams
.
address
=
res
.
data
.
stock_out_address
.
address
;
this
.
realShippChage
(
1
);
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
...
...
@@ -423,7 +424,6 @@ export default {
real_shipping_id
:
this
.
formParams
.
real_shipping_id
,
real_shipping_mode
:
this
.
formParams
.
real_shipping_mode
,
shipping_code
:
this
.
formParams
.
shipping_code
,
is_receipt
:
1
,
consignee
:
this
.
formParams
.
consignee
,
mobile
:
this
.
formParams
.
mobile
,
province
:
this
.
formParams
.
province
,
...
...
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