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
0b8ca1a7
提交
0b8ca1a7
authored
1月 10, 2023
作者:
刘旭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
报价单数量价格合并
上级
85718622
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
30 行增加
和
20 行删除
+30
-20
quotation.vue
src/pages/order/quotation.vue
+30
-20
没有找到文件。
src/pages/order/quotation.vue
浏览文件 @
0b8ca1a7
...
...
@@ -244,10 +244,6 @@ let lineId = ref() // 产品线id 可以分辨是产品线还是普通商品
onLoad
((
options
:
any
)
=>
{
if
(
options
.
lineId
)
lineId
.
value
=
options
.
lineId
orderId
.
value
=
options
.
orderId
nextTick
(()
=>
{
initQuotationDelivery
()
initQuotationPayment
()
})
// 判断是否重复报价
quotationExist
({
orderId
:
orderId
.
value
}).
then
((
res
:
any
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
...
...
@@ -261,6 +257,8 @@ onLoad((options: any) => {
initQuotaionData
(
orderId
.
value
)
},
50
)
initTax
()
initQuotationDelivery
()
initQuotationPayment
()
}
}
})
...
...
@@ -292,7 +290,7 @@ let totlePirce: any = computed(() => {
if
(
detailData
.
value
)
{
detailData
.
value
.
map
((
item
:
any
)
=>
{
if
(
typeof
item
.
unitPrice
!==
'undefined'
)
{
totlePic
+=
Number
(
item
.
unitPrice
);
totlePic
+=
Number
(
item
.
unitPrice
)
*
Number
(
item
.
number
)
;
}
});
}
...
...
@@ -348,6 +346,7 @@ let submit = () => {
let
data
=
{
items
:
quotationData
.
value
.
items
,
quotation
:
formData
.
value
,
genesicItems
:
quotationData
.
value
.
genesicItems
};
fillQuotation
(
data
).
then
((
res
:
any
)
=>
{
if
(
res
.
data
.
code
===
200
)
showModel
.
value
=
true
...
...
@@ -434,6 +433,7 @@ let initQuotation = (orderId: number) => {
});
};
// 初始化价格数据
let
initQuotaionData
=
(
id
:
number
)
=>
{
// 查询普通商品
orderDetail
({
orderId
:
id
}).
then
((
res
:
any
)
=>
{
...
...
@@ -456,21 +456,33 @@ let initQuotaionData = (id: number) => {
getProductLineMultipleDetail
(
lineArr
).
then
((
res
:
any
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
detailData
.
value
=
[]
for
(
const
key
in
res
.
data
.
data
)
detailData
.
value
=
[...
res
.
data
.
data
[
key
],
...
detailData
.
value
]
let
data
=
[]
as
any
for
(
const
key
in
res
.
data
.
data
)
data
=
[...
res
.
data
.
data
[
key
],
...
data
]
console
.
log
(
data
,
quotationData
.
value
.
items
);
quotationData
.
value
.
items
.
forEach
((
item
:
any
)
=>
{
let
flag
=
true
data
.
forEach
((
res
:
any
)
=>
{
if
(
item
.
goodsId
===
res
.
goodsId
&&
item
.
entryId
===
res
.
id
&&
flag
)
{
item
.
specifications
=
res
.
specifications
item
.
picUrl
=
res
.
picUrl
flag
=
false
}
})
})
detailData
.
value
=
quotationData
.
value
.
items
console
.
log
(
quotationData
.
value
.
items
,
'quotationData.value'
);
// 从quotationData获取 在detailData中添加 合同报价字段
if
(
quotationData
.
value
)
{
detailData
.
value
.
map
((
detail
:
any
)
=>
{
detail
.
unitPrice
=
undefined
quotationData
.
value
.
items
.
map
((
item
:
any
)
=>
{
if
(
item
.
goodsName
==
detail
.
goodsName
)
{
detail
.
contractQuotation
=
item
.
contractQuotation
}
})
})
// console.log(detailData.value);
}
else
initQuotation
(
orderId
.
value
)
// console.log(res, '订单详情信息');
// if (quotationData.value) {
// detailData.value.map((detail: any) => {
// detail.unitPrice = undefined
// quotationData.value.items.map((item: any) => {
// if (item.goodsName == detail.goodsName) {
// detail.contractQuotation = item.contractQuotation
// }
// })
// })
// } else initQuotation(orderId.value)
}
})
}
else
{
...
...
@@ -505,7 +517,6 @@ let initQuotationDelivery = () => {
label
:
item
.
textValue
})
})
console
.
log
(
paymentList
.
value
,
'交货地址'
);
}
})
}
...
...
@@ -521,7 +532,6 @@ let initQuotationPayment = () => {
label
:
item
.
textValue
})
})
console
.
log
(
deliveryList
.
value
,
'收款条件'
);
}
})
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论