Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-customer-new-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-customer-new-master
Commits
1abb49e5
Commit
1abb49e5
authored
Mar 28, 2025
by
knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户端-入仓须知
parent
ce9f9b43
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
229 additions
and
6 deletions
+229
-6
needKnow.js
src/api/system/needKnow.js
+13
-0
address.vue
src/pages/cons/address.vue
+16
-2
create.vue
src/pages/cons/create.vue
+29
-3
create_order.vue
src/pages/create_order/create_order.vue
+17
-1
needKnow.vue
src/pages/need_know/components/needKnow.vue
+86
-0
need_know.css
src/static/css/need_know.css
+68
-0
No files found.
src/api/system/needKnow.js
0 → 100644
View file @
1abb49e5
import
request
from
'
@/utils/request
'
export
function
getNeedKnowByKey
(
param
){
return
request
.
get
(
'
/app-api/system/need-know/getByKey
'
,
param
);
}
export
function
getUserIsAgree
(
param
){
return
request
.
get
(
'
/app-api/system/need-know/isAgreeBestVersion
'
,
param
);
}
export
function
createUserAcceptance
(
param
){
return
request
.
post
(
'
/app-api/system/need-know/createUserAcceptance
'
,
param
);
}
src/pages/cons/address.vue
View file @
1abb49e5
...
...
@@ -86,25 +86,34 @@
<text
style=
"background-color: #F59123"
class=
"footer-btn"
@
tap=
"copyAll"
@
click=
"copyAll"
text=
""
>
一键复制
</text>
<text
style=
"background-color: var(--c427)"
@
tap=
"n
avigateTo('address
')"
class=
"footer-btn"
<text
style=
"background-color: var(--c427)"
@
tap=
"n
eedKnowToggle('dialog','popupWarehouseIn
')"
class=
"footer-btn"
text=
""
>
{{
$lang
.
lang
.
cons
.
warehouseInNotice
}}
</text>
<text
style=
"background-color: red"
class=
"footer-btn"
@
tap=
"n
avigateTo('prohibited
')"
<text
style=
"background-color: red"
class=
"footer-btn"
@
tap=
"n
eedKnowToggle('dialog','popupConsBanGoods
')"
text=
""
>
{{
$lang
.
lang
.
cons
.
banGoods
}}
</text>
</view>
</view>
</view>
<!-- 入仓须知 -->
<need-know
ref=
"popupWarehouseIn"
knowType=
"consWarehousingIn"
:showButtons=
false
/>
<!-- 禁运物品 -->
<need-know
ref=
"popupConsBanGoods"
knowType=
"consBanGoods"
:showButtons=
false
/>
</view>
</
template
>
<
script
>
import
{
getWarehouseList
,
getCountryTree
,
getWarehouse
}
from
"
@/api/ecw/warehouse
"
;
import
lang
from
"
@/common/lang
"
;
import
SignInPicture
from
"
@/pages/cons/components/signInPicture.vue
"
;
import
NeedKnow
from
"
@/pages/need_know/components/needKnow.vue
"
;
export
default
{
components
:
{
NeedKnow
,
SignInPicture
},
data
()
{
return
{
warehouseList
:
null
,
...
...
@@ -198,6 +207,11 @@ export default {
});
},
// 入仓须知弹窗
needKnowToggle
(
type
,
knowType
){
this
.
$refs
[
knowType
].
open
(
type
)
},
/**
* 单项选择器切换事件
*/
...
...
src/pages/cons/create.vue
View file @
1abb49e5
...
...
@@ -157,10 +157,10 @@
<text
style=
"background-color: #F59123"
class=
"footer-btn"
@
tap=
"navigateTo('address')"
text=
""
>
{{
$lang
.
lang
.
cons
.
myConsAddress
}}
</text>
<text
style=
"margin-left: 20upx;background-color: #910012"
@
tap=
"
navigateTo('address
')"
class=
"footer-btn"
<text
style=
"margin-left: 20upx;background-color: #910012"
@
tap=
"
showNeedKnow('dialog','popupWarehouseInNotAgree
')"
class=
"footer-btn"
text=
""
>
{{
$lang
.
lang
.
cons
.
warehouseInNotice
}}
</text>
<text
style=
"margin-left: 20upx;background-color: red"
class=
"footer-btn"
@
tap=
"
navigateTo('prohibited
')"
<text
style=
"margin-left: 20upx;background-color: red"
class=
"footer-btn"
@
tap=
"
showNeedKnow('dialog','popupConsBanGoods
')"
text=
""
>
{{
$lang
.
lang
.
cons
.
banGoods
}}
</text>
</view>
...
...
@@ -170,6 +170,13 @@
<button
class=
"submit-btn"
type=
"primary"
@
tap=
"handleSubmit"
>
编辑
</button>
<button
class=
"cancel-btn"
type=
"warning"
@
tap=
"navigateTo('../cons/index')"
>
取消
</button>
</view>
<!-- 入仓须知(自动弹出) -->
<need-know
ref=
"popupWarehouseIn"
knowType=
"consWarehousingIn"
:showButtons=
true
/>
<!-- 手动触发(没有同意按钮) -->
<need-know
ref=
"popupWarehouseInNotAgree"
knowType=
"consWarehousingIn"
:showButtons=
false
/>
<!-- 禁运物品 -->
<need-know
ref=
"popupConsBanGoods"
knowType=
"consBanGoods"
:showButtons=
false
/>
</view>
</view>
</view>
...
...
@@ -180,8 +187,10 @@
import
{
getWarehouseList
,
getCountryTree
}
from
"
@/api/ecw/warehouse
"
;
import
{
createCons
,
getExpressNo
,
getCons
,
updateCons
}
from
"
@/api/order/cons
"
;
import
lang
from
"
@/common/lang
"
;
import
NeedKnow
from
"
@/pages/need_know/components/needKnow.vue
"
;
export
default
{
components
:
{
NeedKnow
},
data
()
{
const
initForm
=
{
id
:
null
,
// 包裹id(编辑才有)
...
...
@@ -237,9 +246,19 @@ export default {
this
.
getTransportType
();
this
.
getCountryTree
();
// 设置包裹id
this
.
form
.
id
=
option
.
id
;
this
.
form
.
id
=
option
.
id
>
0
?
option
.
id
:
null
;
// 初始化编辑页面数据
this
.
init
();
},
onReady
()
{
// 页面加载后自动弹出入仓须知页面
this
.
$nextTick
(()
=>
{
if
(
this
.
$refs
.
popupWarehouseIn
&&
this
.
$refs
.
popupWarehouseIn
.
open
&&
this
.
form
.
id
===
null
)
{
this
.
$refs
.
popupWarehouseIn
.
open
(
"
dialog
"
);
}
});
},
computed
:
{
...
...
@@ -264,6 +283,13 @@ export default {
}
},
/**
* 弹出入仓须知
*/
showNeedKnow
(
type
,
knowType
){
this
.
$refs
[
knowType
].
open
(
type
)
},
/**
* 获取运输方式
*/
...
...
src/pages/create_order/create_order.vue
View file @
1abb49e5
...
...
@@ -932,14 +932,18 @@
</uni-popup>
<drawee
ref=
"drawee"
:value=
"params.customDraweeVOList"
@
confirm=
"setCustomDrawee"
></drawee>
<!-- 入仓须知(自动弹出) -->
<need-know
ref=
"popupWarehouseIn"
knowType=
"warehousing"
:showButtons=
true
/>
</view>
</template>
<
script
>
import
Drawee
from
"
@/pages/create_order/components/drawee.vue
"
;
import
NeedKnow
from
"
@/pages/need_know/components/needKnow.vue
"
;
export
default
{
components
:
{
Drawee
},
components
:
{
NeedKnow
,
Drawee
},
data
()
{
const
currentDate
=
this
.
getDate
({
format
:
true
...
...
@@ -1194,6 +1198,18 @@ export default {
showFullConsignee
:
false
}
},
onReady
()
{
// 页面加载后自动弹出入仓须知页面
this
.
$nextTick
(()
=>
{
// 只有创建订单页面才显示
if
(
this
.
$refs
.
popupWarehouseIn
&&
this
.
$refs
.
popupWarehouseIn
.
open
&&
this
.
orderId
===
0
)
{
// 如果不显示弹窗大概率是因为orderId不为0
this
.
$refs
.
popupWarehouseIn
.
open
(
"
dialog
"
);
}
});
},
async
onLoad
(
op
)
{
await
this
.
getDstCountryList
()
await
this
.
getTransport
()
...
...
src/pages/need_know/components/needKnow.vue
0 → 100644
View file @
1abb49e5
<
template
>
<uni-popup
ref=
"popupWarehouseIn"
type=
"center"
style=
"overflow-y: auto;"
>
<view
class=
"popup-container"
>
<!-- 须知内容 -->
<scroll-view
scroll-y=
"true"
:style=
"
{ maxHeight: showButtons ? '70vh' : '80vh' }">
<view
v-if=
"detail.contentZh"
class=
"html-content"
v-html=
"detail.contentZh"
></view>
<!-- 搜索结果为空 -->
<u-empty
mode=
"data"
v-else
></u-empty>
</scroll-view>
<!-- 底部按钮 -->
<view
class=
"button-group"
v-if=
"showButtons"
>
<button
class=
"btn agree"
@
tap=
"handleDisagree"
>
我已同意
</button>
<button
class=
"btn disagree"
@
tap=
"handleAgree"
>
我不同意
</button>
</view>
</view>
</uni-popup>
</
template
>
<
script
>
import
{
createUserAcceptance
,
getNeedKnowByKey
,
getUserIsAgree
}
from
"
@/api/system/needKnow
"
;
export
default
{
name
:
'
NeedKnow
'
,
props
:{
knowType
:
String
,
showButtons
:
Boolean
},
data
(){
return
{
detail
:
{},
}
},
created
(){
this
.
getNeedKnow
();
},
methods
:{
async
getNeedKnow
(){
await
getNeedKnowByKey
({
key
:
this
.
knowType
}).
then
(
res
=>
{
this
.
detail
=
res
.
data
});
},
async
open
(
type
){
if
(
this
.
showButtons
&&
(
this
.
knowType
===
"
consWarehousingIn
"
||
this
.
knowType
===
"
warehousing
"
)){
const
needKnow
=
await
getNeedKnowByKey
({
key
:
this
.
knowType
});
this
.
detail
=
needKnow
.
data
;
// 如果是入仓须知需要显示同意按钮判断是否同意过最新版本
const
res
=
await
getUserIsAgree
({
needKnowId
:
needKnow
.
data
.
id
,
version
:
needKnow
.
data
.
currentVersion
});
if
(
res
.
data
===
false
||
res
.
data
===
null
){
// 未同意过则弹出
this
.
$refs
.
popupWarehouseIn
.
open
(
type
)
}
}
else
{
this
.
$refs
.
popupWarehouseIn
.
open
(
type
)
}
},
// 点击同意
handleDisagree
(){
// 当用户点击同意后则生成一条记录
createUserAcceptance
({
needKnowId
:
this
.
detail
.
id
,
version
:
this
.
detail
.
currentVersion
,
});
this
.
$refs
.
popupWarehouseIn
.
close
();
},
// 点击不同意
handleAgree
(){
uni
.
navigateBack
({
delta
:
1
})
// 返回上一页
},
}
}
</
script
>
<
style
scoped
>
@import
url(../../../static/css/need_know.css)
;
</
style
>
src/static/css/need_know.css
0 → 100644
View file @
1abb49e5
.popup-mask
{
position
:
fixed
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
background
:
rgba
(
0
,
0
,
0
,
0.5
);
display
:
flex
;
justify-content
:
center
;
align-items
:
flex-start
;
/* 顶部对齐 */
padding-top
:
200
rpx
;
/* 增加顶部间距 */
}
.popup-container
{
margin-top
:
100
rpx
;
width
:
650
rpx
;
background
:
#fff
;
border-radius
:
16
rpx
;
overflow
:
hidden
;
padding
:
10
upx
;
}
.html-content
{
line-height
:
1.6
;
font-size
:
28
rpx
;
color
:
#333
;
}
.title
{
font-size
:
36
rpx
;
font-weight
:
bold
;
text-align
:
center
;
margin-bottom
:
24
rpx
;
}
.sub-title
{
font-weight
:
bold
;
margin
:
24
rpx
0
16
rpx
;
}
.item
{
margin-bottom
:
12
rpx
;
}
.button-group
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
24
rpx
32
rpx
;
border-top
:
1
rpx
solid
#eee
;
}
.btn
{
flex
:
0.48
;
height
:
80
rpx
;
line-height
:
80
rpx
;
border-radius
:
8
rpx
;
font-size
:
30
rpx
;
}
.disagree
{
background
:
var
(
--ce6
);
color
:
var
(
--c0
);
}
.agree
{
background
:
#007aff
;
color
:
var
(
--c0
);
}
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