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
17dc0fe7
提交
17dc0fe7
authored
3月 20, 2023
作者:
刘旭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改单价
上级
b062c6ec
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
23 行增加
和
13 行删除
+23
-13
editQuotation.vue
src/pages/order/editQuotation.vue
+23
-12
quotation.vue
src/pages/order/quotation.vue
+0
-1
没有找到文件。
src/pages/order/editQuotation.vue
浏览文件 @
17dc0fe7
...
...
@@ -20,8 +20,8 @@
<h4>
{{
item
.
goodsName
}}
</h4>
<view
style=
"display: flex; flex-direction: row; align-items: center; margin-bottom: 10rpx;"
>
<text>
重新设置单价:
</text>
<
u-
input
v-model=
"item.price"
type=
"number"
height=
"50"
placeholder=
"请输入单价"
style=
"width: 200rpx;"
@
input=
"priceInput($event, index)
"
/>
<input
v-model=
"item.price"
type=
"number"
height=
"50"
placeholder=
"请输入单价"
style=
"width: 200rpx;"
@
blur=
"priceBlur($event, index)"
@
focus=
"priceFocus
"
/>
</view>
<view
style=
"margin-bottom: 10rpx; display: flex; justify-content: space-between;"
>
<view
class=
""
>
...
...
@@ -55,7 +55,7 @@
<
script
setup
lang=
"ts"
>
import
{
onLoad
}
from
'@dcloudio/uni-app'
;
import
{
ref
,
computed
}
from
'vue'
;
import
{
ref
,
computed
,
nextTick
}
from
'vue'
;
import
{
quotationInitAgain
,
fillQuotation
}
from
'@/api/cart'
;
import
{
getTax
}
from
'@/api/index'
;
import
config
from
'@/utils/config'
;
...
...
@@ -68,6 +68,8 @@ let tax = ref();
let
content
=
ref
(
'确认重新报价?'
);
let
show
=
ref
(
false
);
let
showModel
=
ref
(
false
);
let
oldPrice
=
ref
()
onLoad
((
options
:
any
)
=>
{
orderId
.
value
=
options
.
orderId
;
getTax
().
then
((
res
:
any
)
=>
{
...
...
@@ -148,20 +150,29 @@ let valChange = (val: any) => {
quotationData
.
value
.
items
[
val
.
index
].
number
*
quotationData
.
value
.
items
[
val
.
index
].
price
;
quotationData
.
value
.
items
[
val
.
index
].
totalPriceTex
=
quotationData
.
value
.
items
[
val
.
index
].
totalP
rice
*
tax
.
value
+
quotationData
.
value
.
items
[
val
.
index
].
totalPrice
;
Number
(
quotationData
.
value
.
items
[
val
.
index
].
p
rice
*
tax
.
value
+
quotationData
.
value
.
items
[
val
.
index
].
price
)
*
val
.
value
};
// 单价变化处理
let
priceInput
=
(
val
:
any
,
index
:
number
)
=>
{
quotationData
.
value
.
items
[
index
].
price
=
val
;
let
priceFocus
=
(
data
:
any
)
=>
{
const
{
value
}
=
data
.
detail
oldPrice
.
value
=
value
}
// 单价变化处理
let
priceBlur
=
(
data
:
any
,
index
:
number
)
=>
{
const
{
value
:
val
}
=
data
.
detail
if
(
Number
(
val
)
===
Number
(
oldPrice
.
value
))
return
let
price
=
Number
(
val
)
*
100
nextTick
(()
=>
{
let
newPrice
=
(
price
-
price
*
tax
.
value
)
/
100
let
number
=
quotationData
.
value
.
items
[
index
].
number
quotationData
.
value
.
items
[
index
].
price
=
newPrice
.
toFixed
(
2
)
quotationData
.
value
.
items
[
index
].
totalPrice
=
Number
(
quotationData
.
value
.
items
[
index
].
number
)
*
val
;
Number
(
number
)
*
newPrice
quotationData
.
value
.
items
[
index
].
totalPriceTex
=
quotationData
.
value
.
items
[
index
].
totalPrice
*
tax
.
value
+
quotationData
.
value
.
items
[
index
].
totalPrice
;
Number
((
newPrice
*
tax
.
value
+
newPrice
)
*
number
)
})
};
let
init
=
()
=>
{
...
...
src/pages/order/quotation.vue
浏览文件 @
17dc0fe7
...
...
@@ -325,7 +325,6 @@ let priceCheck = (data: any, index: number) => {
})
if
(
Number
(
val
)
===
Number
(
oldPrice
.
value
))
return
else
{
oldPrice
.
value
=
val
let
price
=
Number
(
val
)
*
100
nextTick
(()
=>
{
detailData
.
value
[
index
].
unitPrice
=
((
price
-
price
*
tax
.
value
*
0.01
)
/
100
).
toFixed
(
2
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论