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
f975bcb8
Commit
f975bcb8
authored
Oct 19, 2024
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善订单创建重构
parent
4cadf59e
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
260 additions
and
43 deletions
+260
-43
drawee.vue
src/pages/create_order/components/drawee.vue
+101
-0
create_order.vue
src/pages/create_order/create_order.vue
+154
-43
create.js
src/static/lang/zh/create.js
+5
-0
No files found.
src/pages/create_order/components/drawee.vue
0 → 100644
View file @
f975bcb8
<
script
setup
>
import
UniPopup
from
"
@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue
"
;
export
default
{
props
:{
value
:{
type
:
Array
,
default
:[]
}
},
data
(){
return
{
customDraweeList
:[]
}
},
onMounted
()
{
console
.
log
(
'
drawee
'
)
},
methods
:
{
open
(){
this
.
$refs
.
popup
.
open
()
if
(
!
this
.
customDraweeList
.
length
){
this
.
loadDictData
()
}
},
loadDictData
()
{
this
.
$request
.
getConfig
(
'
custom_drawee
'
).
then
(
res
=>
{
if
(
res
.
code
==
0
&&
res
.
data
&&
res
.
data
.
list
.
length
>
0
){
res
.
data
.
list
.
forEach
(
item
=>
{
const
old
=
this
.
value
?
this
.
value
.
find
(
it
=>
it
.
name
==
item
.
value
)
:
null
this
.
customDraweeList
.
push
({
name
:
item
.
value
,
label
:
this
.
$lang
.
locale
===
'
zh
'
?
item
.
label
:
item
.
labelEn
,
value
:
old
?
old
.
value
:
1
})
})
}
})
},
changeDrawee
(
field
,
e
){
const
index
=
this
.
customDraweeList
.
findIndex
(
item
=>
item
.
name
==
field
)
if
(
index
<
0
)
return
this
.
customDraweeList
[
index
].
value
=
e
.
detail
.
value
},
submit
(){
this
.
$refs
.
popup
.
close
()
this
.
$emit
(
"
confirm
"
,
this
.
customDraweeList
)
},
close
(){
this
.
$refs
.
popup
.
close
()
},
}
}
</
script
>
<
template
>
<uni-popup
ref=
"popup"
type=
"center"
:mask-click=
"false"
>
<view
class=
"content"
>
<view
v-for=
"item in customDraweeList"
:key=
"item.id"
class=
"flex item"
>
<view
class=
"name"
>
{{
item
.
label
}}
</view>
<radio-group
@
change=
"changeDrawee(item.name, $event)"
class=
"flex"
>
<label
class=
"flex"
>
<view
class=
"checkbox-item"
>
<radio
value=
"1"
:checked=
"item.value == 1"
style=
"transform:scale(0.8)"
/>
</view>
<view>
{{
$lang
.
lang
.
create
.
consignee
}}
</view>
</label>
<label
class=
"flex"
>
<view
class=
"checkbox-item"
>
<radio
value=
"2"
:checked=
"item.value == 2"
style=
"transform:scale(0.8)"
/>
</view>
<view>
{{
$lang
.
lang
.
create
.
consignor
}}
</view>
</label>
</radio-group>
</view>
<view
class=
"flex action"
>
<button
@
click=
"close"
>
{{
$lang
.
lang
.
create
.
cancel
}}
</button>
<button
@
click=
"submit"
type=
"primary"
>
{{
$lang
.
lang
.
create
.
submit
}}
</button>
</view>
</view>
</uni-popup>
</
template
>
<
style
scoped
lang=
"scss"
>
.content
{
width
:
80vw
;
background-color
:
#fff
;
padding
:
10px
;
.item
{
padding
:
5px
;
&
:nth-child
(
2n
)
{
background
:
#f8f8f8
;
}
.name
{
width
:
100px
;
}
}
.action
{
margin-top
:
20px
;
}
}
</
style
>
src/pages/create_order/create_order.vue
View file @
f975bcb8
This diff is collapsed.
Click to expand it.
src/static/lang/zh/create.js
View file @
f975bcb8
...
...
@@ -9,6 +9,7 @@ export default {
"
noCotrol
"
:
"
非控货订单代收货款
"
,
"
startCity
"
:
"
始发城市
"
,
"
endCity
"
:
"
目的城市
"
,
"
dstCountry
"
:
"
目的国家
"
,
"
method
"
:
"
运输方式
"
,
"
channel
"
:
"
出货渠道
"
,
"
info
"
:
"
商品
"
,
...
...
@@ -116,4 +117,8 @@ export default {
"
choose
"
:
"
请选择
"
,
"
needCollectionAmount
"
:
"
请设置代收货款金额
"
,
"
needCollectionCurrency
"
:
"
请选择代收货币单位
"
,
"
customDrawee
"
:
"
自定义
"
,
"
billLadingPrice
"
:
"
提单是否显示价格
"
,
"
displayBillLadingPrice
"
:
"
显示
"
,
"
hideBillLadingPrice
"
:
"
不显示
"
,
}
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