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
c1b6ae76
Commit
c1b6ae76
authored
Oct 23, 2024
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复部分bug
parent
be528127
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
102 additions
and
13 deletions
+102
-13
drawee.vue
src/pages/create_order/components/drawee.vue
+7
-3
create_order.vue
src/pages/create_order/create_order.vue
+87
-8
orderInfo.vue
src/pages/orderInfo/orderInfo.vue
+8
-2
No files found.
src/pages/create_order/components/drawee.vue
View file @
c1b6ae76
...
...
@@ -6,6 +6,10 @@ export default {
value
:{
type
:
Array
,
default
:[]
},
readonly
:{
type
:
Boolean
,
default
:
false
}
},
data
(){
...
...
@@ -61,19 +65,19 @@ export default {
<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)"
/>
<radio
value=
"1"
:checked=
"item.value == 1"
:disabled=
"readonly"
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)"
/>
<radio
value=
"2"
:checked=
"item.value == 2"
:disabled=
"readonly"
style=
"transform:scale(0.8)"
/>
</view>
<view>
{{
$lang
.
lang
.
create
.
consignor
}}
</view>
</label>
</radio-group>
</view>
<view
class=
"flex action"
>
<view
class=
"flex action"
v-if=
"!readonly"
>
<button
@
click=
"close"
>
{{
$lang
.
lang
.
create
.
cancel
}}
</button>
<button
@
click=
"submit"
type=
"primary"
>
{{
$lang
.
lang
.
create
.
submit
}}
</button>
</view>
...
...
src/pages/create_order/create_order.vue
View file @
c1b6ae76
...
...
@@ -514,8 +514,11 @@
<!--收货方式-->
<view
class=
"corder-v5-v corder-picker"
>
<view
class=
"corder-v5-label"
><span
class=
"redcolor"
>
*
</span>
{{$lang.lang.create.consignorType}}
</view>
<picker
class=
"date-picker"
:value=
"config.harvestMethod.index"
:range=
"config.harvestMethod.label"
data-config=
"harvestMethod"
data-key=
"harvestMethod"
@
change=
"configChange"
v-if=
"config.harvestMethod.value.length > 0"
>
<
!--<
picker class="date-picker" :value="config.harvestMethod.index" :range="config.harvestMethod.label" data-config="harvestMethod" data-key="harvestMethod" @change="configChange" v-if="config.harvestMethod.value.length > 0">
<view class="uni-input">{{config.harvestMethod.label[config.harvestMethod.index]}}</view>
</picker>-->
<picker
class=
"date-picker"
:value=
"currentHarvestIndex"
:range=
"enabledHarvestList"
:range-key=
"harvestRangeKey"
@
change=
"changeHarvestMethod"
>
<view
class=
"uni-input"
>
{{currentHarvestIndex !== null
&&
enabledHarvestList[currentHarvestIndex] ? enabledHarvestList[currentHarvestIndex][harvestRangeKey] : $lang.lang.create.choose}}
</view>
</picker>
<image
class=
"rgt"
src=
"../../static/img/rgt.png"
mode=
"widthFix"
></image>
</view>
...
...
@@ -936,6 +939,9 @@
format
:
true
})
return
{
// 收货方式
harvestList
:
[],
currentHarvestIndex
:
null
,
// 始发城市
startCityList
:[],
currentStartCityIndex
:
null
,
...
...
@@ -1173,6 +1179,7 @@
await
this
.
getDstCountryList
()
await
this
.
getTransport
()
await
this
.
getStartCity
()
await
this
.
getHarvestMethod
()
// this.getZd()
this
.
getTreeList
()
this
.
getCurrencyData
()
...
...
@@ -1195,6 +1202,7 @@
this
.
getCountrySn
()
this
.
getClientaData
()
if
(
op
.
id
){
await
this
.
$nextTick
()
this
.
getOrderData
(
op
.
id
)
this
.
orderId
=
op
.
id
}
...
...
@@ -1229,6 +1237,18 @@
isOverSearWarehouse
(){
return
this
.
params
.
type
?.
indexOf
(
'
2
'
)
!=
-
1
},
// 可用的收货方式
enabledHarvestList
(){
const
currentRoute
=
this
.
currentRouteIndex
!==
null
?
this
.
routerList
[
this
.
currentRouteIndex
]
:
null
const
otherService
=
currentRoute
?.
otherService
?.
split
(
"
,
"
)
||
[]
console
.
log
(
"
enabledHarvestList
"
,
otherService
,
currentRoute
)
// 开通了送货上门才显示全部
if
(
otherService
?.
indexOf
(
"
2
"
)
>
-
1
){
return
this
.
harvestList
}
// 否则隐藏送货上门服务
return
this
.
harvestList
.
filter
(
item
=>
item
.
value
!=
2
)
},
transportRangeKey
(){
return
this
.
$lang
.
locale
==
'
zh
'
?
'
label
'
:
'
labelEn
'
},
...
...
@@ -1246,6 +1266,9 @@
},
startCityRangeKey
(){
return
this
.
$lang
.
locale
==
'
zh
'
?
'
titleZh
'
:
'
titleEn
'
},
harvestRangeKey
(){
return
this
.
$lang
.
locale
==
'
zh
'
?
'
label
'
:
'
labelEn
'
}
},
watch
:{
...
...
@@ -1678,6 +1701,7 @@
getPackageType
(
e
){
this
.
params
.
packageType
=
e
.
detail
.
value
.
join
(
'
,
'
)
},
addOrder
(){
// 如果勾选了海外仓给提示
if
(
this
.
params
.
type
.
indexOf
(
'
2
'
)
>
-
1
){
...
...
@@ -1853,7 +1877,8 @@
}
this
.
isClick
=
false
},
async
creatOrder
(){
// 校验目的国和手机区号
async
validateCountryAndAreaCode
(){
if
(
this
.
hasConsignee
){
const
res
=
await
this
.
$request
.
get
(
'
/app-api/ecw/region/check/dest-currency/area-code/
'
,
{
areaCode
:
this
.
params
.
countryCode
,
...
...
@@ -1868,10 +1893,13 @@
})
console
.
log
(
"
确认结果
"
,
res
)
if
(
!
res
[
1
].
confirm
){
return
throw
new
Error
(
"
目的国手机号校验不通过且用户点击取消
"
)
}
}
}
},
async
creatOrder
(){
await
this
.
validateCountryAndAreaCode
()
this
.
$request
.
post
(
'
/app-api/my/order/create
'
,
{...
this
.
params
,
hasConsignee
:
this
.
hasConsignee
}).
then
(
res
=>
{
this
.
isClick
=
false
if
(
res
.
code
==
0
&&
res
.
data
){
...
...
@@ -1928,14 +1956,14 @@
})
}
if
(
that
.
params
.
transportId
!=
0
||
that
.
params
.
lineId
!=
0
||
(
that
.
params
.
departureId
!=
0
&&
that
.
params
.
objectiveId
!=
0
)){
/*
if(that.params.transportId != 0 ||that.params.lineId!=0 ||(that.params.departureId != 0 && that.params.objectiveId != 0)){
that.openedRouterF = false
that.getOpenedRouter()
}
that.getConfigIndex('transport',that.params.transportId)
that.getConfigIndex('channel',that.params.channelId)
that.getConfigIndex('tradeCity2',that.params.objectiveId)
that
.
getConfigIndex
(
'
tradeCity1
'
,
that
.
params
.
departureId
)
that.getConfigIndex('tradeCity1',that.params.departureId)
*/
that
.
setPackType
()
if
(
that
.
params
.
shippingCompany
){
that
.
getConfigIndex
(
'
clientaData
'
,
that
.
params
.
shippingCompany
)
...
...
@@ -1981,6 +2009,30 @@
await
this
.
$nextTick
()
this
.
currentDstCityIndex
=
dstCityIndex
}
// 回显始发城市
const
startCityIndex
=
this
.
startCityList
.
findIndex
(
item
=>
item
.
id
==
that
.
params
.
departureId
)
console
.
log
(
"
startCityIndex
"
,
startCityIndex
,
this
.
startCityList
.
length
)
if
(
startCityIndex
>
-
1
){
this
.
currentStartCityIndex
=
startCityIndex
}
// 回显运输方式
const
transIndex
=
this
.
transportList
.
findIndex
(
item
=>
item
.
value
==
that
.
params
.
transportId
)
if
(
transIndex
>
-
1
){
this
.
currentTransportIndex
=
transIndex
}
// 回显路线
await
that
.
getOpenedRouter
()
const
currentRouteIndex
=
this
.
routerList
.
findIndex
(
item
=>
item
.
id
==
this
.
params
.
lineId
)
if
(
currentRouteIndex
>
-
1
){
this
.
currentRouteIndex
=
currentRouteIndex
}
// 回显收货方式
const
harvestIndex
=
this
.
enabledHarvestList
.
findIndex
(
item
=>
item
.
value
==
that
.
params
.
harvestMethod
)
if
(
harvestIndex
>
-
1
){
this
.
currentHarvestIndex
=
harvestIndex
}
}
})
},
...
...
@@ -2039,7 +2091,8 @@
that
.
channeled
=
false
}
},
updateOrder
(){
async
updateOrder
(){
await
this
.
validateCountryAndAreaCode
()
this
.
$request
.
put
(
'
/app-api/my/order/update
'
,
this
.
params
).
then
(
res
=>
{
this
.
isClick
=
false
if
(
res
.
code
==
0
){
...
...
@@ -3128,6 +3181,10 @@
changeBillPrice
(
e
){
this
.
params
.
displayBillLadingPrice
=
e
.
detail
.
value
==
1
?
true
:
false
},
async
getHarvestMethod
(){
const
res
=
await
this
.
$request
.
getConfig
(
"
harvest_method
"
)
this
.
harvestList
=
res
.
data
.
list
||
[]
},
async
getDstCountryList
(){
const
res
=
await
this
.
$request
.
get
(
"
/app-api/ecw/warehouse/getGuojiaAndShiAndWarehouseList
"
,
{
tradeType
:
1
})
console
.
log
(
"
getDstCountryList
"
,
res
)
...
...
@@ -3219,10 +3276,11 @@
}
}
},
changeRoute
(
e
){
async
changeRoute
(
e
){
this
.
currentRouteIndex
=
e
.
detail
.
value
this
.
params
.
lineId
=
this
.
routerList
[
this
.
currentRouteIndex
].
id
// 如果没有始发城市则回显
if
(
this
.
currentStartCityIndex
===
null
){
const
startCityIndex
=
this
.
startCityList
.
findIndex
(
item
=>
item
.
id
==
this
.
routerList
[
this
.
currentRouteIndex
].
startCityId
)
...
...
@@ -3250,6 +3308,22 @@
}
}
}
await
this
.
$nextTick
()
const
currentRoute
=
this
.
routerList
[
this
.
currentRouteIndex
]
const
otherService
=
currentRoute
.
otherService
?.
split
(
"
,
"
)
||
[]
// 如果不支持送货上门则设置为自提,2表示送货上门,10表示默认送货上门
if
(
otherService
.
indexOf
(
"
2
"
)
==
-
1
){
this
.
params
.
harvestMethod
=
1
this
.
currentHarvestIndex
=
0
}
// 支持送货上门,且默认送货上门
if
(
otherService
.
indexOf
(
"
2
"
)
>
-
1
&&
otherService
.
indexOf
(
"
10
"
)
>
-
1
){
// value == 1 表示自提 2 表示送货上门
this
.
currentHarvestIndex
=
this
.
enabledHarvestList
.
findIndex
(
item
=>
item
.
value
==
2
)
this
.
params
.
harvestMethod
=
2
}
},
changeStartCity
(
e
){
this
.
currentStartCityIndex
=
e
.
detail
.
value
...
...
@@ -3259,6 +3333,11 @@
this
.
currentRouteIndex
=
null
this
.
params
.
lineId
=
''
this
.
getOpenedRouter
()
},
// 更换收货方式
changeHarvestMethod
(
e
){
this
.
currentHarvestIndex
=
e
.
detail
.
value
this
.
params
.
harvestMethod
=
this
.
harvestList
[
this
.
currentHarvestIndex
].
value
}
}
}
...
...
src/pages/orderInfo/orderInfo.vue
View file @
c1b6ae76
...
...
@@ -163,7 +163,7 @@
</view>
<view
style=
"height: 36px;"
v-if=
"orderData.drawee==1"
>
{{
$lang
.
lang
.
create
.
payer
}}
:
{{
$lang
.
lang
.
create
.
consignor
}}
</view>
<view
style=
"height: 36px;"
v-else-if=
"orderData.drawee==2"
>
{{
$lang
.
lang
.
create
.
payer
}}
:
{{
$lang
.
lang
.
create
.
consignee
}}
</view>
<view
style=
"height: 36px;"
v-else
>
{{
$lang
.
lang
.
create
.
payer
}}
:
{{
orderData
.
customDraweeVOList
?
orderData
.
customDraweeVOList
[
0
].
name
:
''
}}
</view>
<view
style=
"height: 36px;"
v-else
@
click=
"showCustomDrawee"
>
{{
$lang
.
lang
.
create
.
payer
}}
:
{{
$lang
.
lang
.
create
.
customDrawee
}}
</view>
<view
style=
"height: 36px;"
>
{{
$lang
.
lang
.
orderInfo
.
objectport
}}
:
{{
orderData
.
productRecord
==
1
?
$lang
.
lang
.
orderInfo
.
ourUndertakes
:
$lang
.
lang
.
orderInfo
.
customerUndertakes
}}
</view>
<view
style=
"height: 36px;"
>
{{
$lang
.
lang
.
create
.
special
}}
:
{{
packageTypeName
||
''
}}
</view>
</view>
...
...
@@ -363,6 +363,7 @@
</view>
</uni-popup>
<declaration-documents
ref=
"declaration"
:orderId=
"orderData.orderId"
:isoper=
"orderData.customsType==2"
:orderNo=
"orderData.orderNo"
@
open=
"open"
></declaration-documents>
<drawee
ref=
"drawee"
:value=
"orderData.customDraweeVOList"
readonly
></drawee>
</view>
</template>
...
...
@@ -372,9 +373,11 @@
import
declarationDocuments
from
'
../../components/declarationDocuments/index.vue
'
//#ifdef H5
import
FileSaver
from
'
file-saver
'
import
Drawee
from
"
@/pages/create_order/components/drawee.vue
"
;
//#endif
export
default
{
components
:
{
Drawee
,
steper
,
declarationDocuments
},
data
()
{
...
...
@@ -871,6 +874,9 @@
})
}
})
},
showCustomDrawee
(){
this
.
$refs
.
drawee
.
open
()
}
}
}
...
...
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