Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
ptfw-uniapp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
侯忠英
ptfw-uniapp
Commits
98b1a091
Commit
98b1a091
authored
Aug 06, 2019
by
刘攀
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/hotfix/20190805-order-bug'
parents
7da22a58
fb78ab4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
16 deletions
+25
-16
index.vue
src/pages/order/create/index.vue
+25
-16
No files found.
src/pages/order/create/index.vue
View file @
98b1a091
...
...
@@ -1095,23 +1095,32 @@ export default {
}
let
callback
=
res
=>
{
this
.
hideLoading
()
if
(
res
.
errMsg
)
prompt
.
toast
(
res
.
errMsg
)
// 计算减配送费(运费)
let
freight
=
Number
(
res
.
data
.
freight
).
toFixed
(
2
)
let
orgFreight
=
freight
if
(
res
.
data
.
freight_minus
)
{
freight
=
util
.
numCalc
(
'-'
,
res
.
data
.
freight
,
res
.
data
.
freight_minus
)
if
(
res
.
errMsg
)
{
prompt
.
toast
(
res
.
errMsg
)
this
.
packageFee
=
this
.
freight
=
this
.
orgFreight
=
this
.
freightMinus
=
null
this
.
freightError
=
res
.
errMsg
this
.
amount
=
Number
(
this
.
baseAmount
).
toFixed
(
2
)
}
else
{
// 计算减配送费(运费)
let
freight
=
Number
(
res
.
data
.
freight
).
toFixed
(
2
)
const
orgFreight
=
freight
if
(
res
.
data
.
freight_minus
)
{
freight
=
util
.
numCalc
(
'-'
,
res
.
data
.
freight
,
res
.
data
.
freight_minus
)
}
// 餐饮包装费
this
.
packageFee
=
Number
(
res
.
data
.
package_fee
).
toFixed
(
2
)
// 零售运费、餐饮配送费
this
.
freight
=
freight
this
.
orgFreight
=
orgFreight
this
.
freightMinus
=
Number
(
res
.
data
.
freight_minus
).
toFixed
(
2
)
this
.
freightError
=
''
this
.
amount
=
(
Number
(
this
.
baseAmount
)
+
Number
(
freight
)
+
Number
(
res
.
data
.
package_fee
)
).
toFixed
(
2
)
}
// 餐饮包装费
this
.
packageFee
=
res
.
errMsg
?
null
:
Number
(
res
.
data
.
package_fee
).
toFixed
(
2
)
// 零售运费、餐饮配送费
this
.
freight
=
res
.
errMsg
?
null
:
freight
this
.
orgFreight
=
orgFreight
this
.
freightMinus
=
Number
(
res
.
data
.
freight_minus
).
toFixed
(
2
)
this
.
freightError
=
res
.
errMsg
?
res
.
errMsg
:
''
this
.
amount
=
res
.
errMsg
?
Number
(
this
.
baseAmount
).
toFixed
(
2
)
:
(
Number
(
this
.
baseAmount
)
+
Number
(
freight
)
+
Number
(
res
.
data
.
package_fee
)).
toFixed
(
2
)
resolve
()
}
orderModel
...
...
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