Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yongxinda-h5
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
刘旭
yongxinda-h5
Commits
4ea27ba0
提交
4ea27ba0
authored
12月 07, 2022
作者:
刘旭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化
上级
3b58d490
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
27 行增加
和
70 行删除
+27
-70
checkout.vue
src/pages/order/checkout.vue
+8
-2
downPdf.vue
src/pages/order/downPdf.vue
+7
-23
quotation.vue
src/pages/order/quotation.vue
+2
-2
productLineDetails.vue
src/pages/productLine/productLineDetails.vue
+8
-41
address.vue
src/pages/profile/address.vue
+2
-2
没有找到文件。
src/pages/order/checkout.vue
浏览文件 @
4ea27ba0
...
...
@@ -11,7 +11,14 @@
<text
style=
"margin-right: 10rpx;"
>
{{
buyNowData
?.
checkedAddress
.
name
}}
</text>
<text>
{{
buyNowData
?.
checkedAddress
.
tel
}}
</text>
</view>
<text>
{{
buyNowData
?.
checkedAddress
.
addressDetail
}}
</text>
<text>
{{
buyNowData
?.
checkedAddress
.
province
+
buyNowData
?.
checkedAddress
.
city
+
buyNowData
?.
checkedAddress
.
county
+
buyNowData
?.
checkedAddress
.
addressDetail
}}
</text>
</view>
</view>
<!-- 商品详情 -->
...
...
@@ -130,7 +137,6 @@ const onsubmit = () => {
title
:
'请设置收货地址'
,
icon
:
'none'
,
});
console
.
log
(
uni
.
getStorageSync
(
'addressId'
)
===
0
);
let
types
=
0
;
if
(
type
.
value
===
'productline'
||
type
.
value
===
'productLineCart'
)
types
=
2
;
else
types
=
0
;
...
...
src/pages/order/downPdf.vue
浏览文件 @
4ea27ba0
...
...
@@ -28,7 +28,11 @@
/>
</block>
</view>
<text
style=
"color: #969799; font-size: 12px;"
>
x
{{
item
.
number
}}
</text>
<text
style=
"display: flex; justify-content: flex-end; color: #969799; font-size: 12px;"
>
x
{{
item
.
number
}}
</text>
</view>
</view>
<u-line
v-if=
"detailData.length > 1"
color=
"#e8e8e8"
/>
...
...
@@ -44,7 +48,7 @@
>
返回首页
</u-button>
<view
class=
""
>
<view>
<u-button
shape=
"circle"
size=
"mini"
@
tap=
"generateQuote"
>
生成报价
</u-button>
<u-button
shape=
"circle"
size=
"mini"
style=
"margin-left: 20rpx;"
@
tap=
"download"
>
下载pdf
...
...
@@ -55,7 +59,7 @@
</
template
>
<
script
setup
lang=
"ts"
>
import
{
ref
,
computed
}
from
'vue'
;
import
{
ref
}
from
'vue'
;
import
{
onLoad
,
onBackPress
}
from
'@dcloudio/uni-app'
;
import
config
from
'@/utils/config'
;
import
{
useCurrentStore
}
from
'@/store/useStore'
;
...
...
@@ -67,7 +71,6 @@ let enclosure = ref(''); // pdf key值
let
detailData
=
ref
();
let
type
=
ref
();
let
orderId
=
ref
();
let
tax
=
ref
(
0
);
// 税率
onLoad
((
options
:
any
)
=>
{
type
.
value
=
options
.
type
;
...
...
@@ -99,25 +102,6 @@ let generateQuote = () => {
});
};
// 总价格
let
totlePirce
:
any
=
computed
(()
=>
{
let
totlePic
=
0
;
if
(
detailData
.
value
)
{
detailData
.
value
.
map
((
item
:
any
)
=>
{
if
(
typeof
item
.
unitPrice
!==
'undefined'
)
{
totlePic
+=
Number
(
item
.
unitPrice
);
}
});
}
return
totlePic
.
toFixed
(
2
);
});
// 含税总价格
let
taxTotlePirce
=
computed
(()
=>
{
let
taxTotlePic
=
Number
(
totlePirce
.
value
)
+
Number
(
totlePirce
.
value
)
*
tax
.
value
*
0.01
;
return
Number
(
taxTotlePic
).
toFixed
(
2
);
});
// 下载pdf
let
download
=
()
=>
{
uni
.
showLoading
({
...
...
src/pages/order/quotation.vue
浏览文件 @
4ea27ba0
...
...
@@ -145,7 +145,6 @@
</u-form-item>
</view>
</u-form>
<view
style=
"height: 100rpx;"
></view>
</view>
<u-row
class=
"footer"
>
...
...
@@ -328,6 +327,7 @@ let taxTotlePirce = computed(() => {
let
submit
=
()
=>
{
uFormRef
.
value
?.
validate
((
valid
:
any
,
err
:
any
)
=>
{
if
(
valid
)
{
// 保证单价必填
detailData
.
value
.
some
((
item
:
any
)
=>
{
if
(
typeof
item
.
unitPrice
===
'undefined'
)
{
return
uni
.
showToast
({
...
...
@@ -336,8 +336,8 @@ let submit = () => {
});
}
})
// 同步价格
quotationData
.
value
.
items
.
forEach
((
item
:
any
)
=>
{
console
.
log
(
item
);
detailData
.
value
.
map
((
res
:
any
)
=>
{
if
(
item
.
goodsName
==
res
.
goodsName
)
{
item
.
price
=
res
.
unitPrice
...
...
src/pages/productLine/productLineDetails.vue
浏览文件 @
4ea27ba0
...
...
@@ -28,44 +28,11 @@
/>
</block>
</view>
<view
class=
"sum-price"
>
<view
style=
"display: flex; flex-direction: column;"
>
<view
style=
"display: flex; flex-direction: row; align-items: center; margin-bottom: 10rpx;"
>
<text>
设置单价:
</text>
<u-input
v-model=
"item.unitPrice"
type=
"number"
height=
"50"
placeholder=
"请输入单价"
style=
"width: 200rpx;"
/>
</view>
<view
style=
"margin-bottom: 10rpx;"
>
金额:¥
{{
item
.
unitPrice
?
(
Number
(
item
.
unitPrice
)
*
item
.
number
).
toFixed
(
2
)
:
0
}}
</view>
<view
style=
"margin-bottom: 10rpx;"
>
含税金额:¥
{{
item
.
unitPrice
?
(
Number
(
item
.
unitPrice
)
*
item
.
number
+
Number
(
item
.
unitPrice
)
*
item
.
number
*
tax
*
0.01
).
toFixed
(
2
)
:
0
}}
</view>
</view>
<text
style=
"color: #969799; font-size: 12px;"
>
x
{{
item
.
number
}}
</text>
</view>
<text
style=
"display: flex; justify-content: flex-end; color: #969799; font-size: 12px;"
>
x
{{
item
.
number
}}
</text>
</view>
</view>
<u-line
v-if=
"detailData.length > 1"
color=
"#e8e8e8"
/>
...
...
@@ -81,7 +48,7 @@
>
返回首页
</u-button>
<view
class=
""
>
<view>
<u-button
shape=
"circle"
size=
"mini"
@
tap=
"generateQuote"
>
生成报价
</u-button>
<u-button
shape=
"circle"
size=
"mini"
style=
"margin-left: 20rpx;"
@
tap=
"download"
>
下载pdf
...
...
@@ -152,7 +119,7 @@ let generateQuote = () => {
});
if
(
flag
)
uni
.
navigateTo
({
url
:
`../order/quotation?orderId=
${
orderId
.
value
}
&data=
${
JSON
.
stringify
(
data
)}
`
,
url
:
`../order/quotation?orderId=
${
orderId
.
value
}
`
,
});
};
...
...
@@ -229,7 +196,7 @@ let initQuotationInit = (orderId: number) => {
let
initOrderData
=
(
orderId
:
number
)
=>
{
orderDetail
({
orderId
}).
then
((
res
:
any
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
enclosure
.
value
=
res
.
data
.
data
.
orderInfo
.
enclosure
enclosure
.
value
=
res
.
data
.
data
.
orderInfo
.
enclosure
;
res
.
data
.
data
.
orderGoods
.
map
((
item
:
any
)
=>
{
initProductLineIndex
(
item
.
goodsId
);
});
...
...
src/pages/profile/address.vue
浏览文件 @
4ea27ba0
...
...
@@ -87,8 +87,8 @@ const setAddress = (item: any) => {
uni
.
navigateBack
({
success
:
function
()
{
if
(
beforePage
.
route
===
'pages/order/quotation'
)
beforePage
.
addressData
=
item
;
else
beforePage
.
init
();
// 执行上一页的onLoad方法
beforePage
.
$vm
.
addressData
=
item
;
else
beforePage
.
$vm
.
init
();
// 执行上一页的onLoad方法
},
});
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论