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
bc413cf7
提交
bc413cf7
authored
12月 27, 2022
作者:
刘旭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化
上级
d995b80b
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
69 行增加
和
79 行删除
+69
-79
productLine.ts
src/api/productLine.ts
+6
-2
vk-data-goods-sku-popup.vue
...nents/vk-data-goods-sku-popup/vk-data-goods-sku-popup.vue
+6
-8
goodsSku.vue
src/pages/goods/goodsSku.vue
+1
-2
quotation.vue
src/pages/order/quotation.vue
+0
-0
productLineDetails.vue
src/pages/productLine/productLineDetails.vue
+56
-67
没有找到文件。
src/api/productLine.ts
浏览文件 @
bc413cf7
...
...
@@ -40,4 +40,8 @@ export const productLineUpload = (data: any) =>
request
(
'/wx/productLine/upload'
,
'POST'
,
data
);
export
const
getLineSpecification
=
(
data
:
any
)
=>
request
(
'/wx/productLine/getSpecification'
,
'POST'
,
data
);
\ No newline at end of file
request
(
'/wx/productLine/getSpecification'
,
'POST'
,
data
);
// 产品线-查看多个条详情
export
const
getProductLineMultipleDetail
=
(
data
:
any
)
=>
request
(
'/wx/productLine/detail'
,
'POST'
,
data
)
\ No newline at end of file
src/components/vk-data-goods-sku-popup/vk-data-goods-sku-popup.vue
浏览文件 @
bc413cf7
...
...
@@ -53,21 +53,19 @@
]"
@
click=
"skuClick(item_value, index1, index2)"
>
{{
item_value
.
name
}}
</view>
<!--
<view
class=
"item-content"
style=
" width: 200rpx;"
>
<u-input
v-model=
"item.custom"
placeholder=
"自定义规格"
type=
"text"
border-color=
"#2979ff"
height=
"50"
clearable
border
focus
@
blur=
"onBlur($event, index1)"
@
confirm=
"onConfirm($event, index1)"
/>
</view>
-->
<u-input
v-if=
"item.isPlus && item.isCustom"
style=
"width: 170rpx;"
v-model=
"item.custom"
placeholder=
"自定义规格"
placeholder-style=
"font-size: 12px"
type=
"text"
border-color=
"#f4f4f4"
height=
"50"
clearable
border
focus
@
blur=
"onBlur($event, index1)"
@
confirm=
"onConfirm($event, index1)"
/>
</view>
<view
v-if=
"item.isPlus && item.isCustom"
>
<
!--
<
view
v-if=
"item.isPlus && item.isCustom"
>
<u-icon
name=
"plus-circle"
color=
"#999"
size=
"36"
@
click=
"onPlus(index1)"
></u-icon>
</view>
<view
v-if=
"!item.isPlus && item.isCustom"
style=
"margin-bottom: 12rpx; width: 200rpx;"
>
<u-input
v-model=
"item.custom"
placeholder=
"自定义规格"
type=
"text"
border-color=
"#2979ff"
height=
"50"
clearable
border
focus
@
blur=
"onBlur($event, index1)"
@
confirm=
"onConfirm($event, index1)"
/>
</view>
</view>
-->
</view>
</view>
<view
v-if=
"JSON.stringify(partList) !== '[]' && partList"
class=
"specification-item"
>
...
...
src/pages/goods/goodsSku.vue
浏览文件 @
bc413cf7
...
...
@@ -61,9 +61,8 @@ let onPlus = (index: number) => {
// 失去输入自定义规格输入框焦点
let
onBlur
=
(
val
:
string
,
index
:
number
)
=>
{
if
(
!
val
)
return
goodsInfo
.
value
.
spec_list
[
index
].
isPlus
=
true
// console.log(val, 'zidinyi', index);
goodsInfo
.
value
.
spec_list
[
index
].
custom
=
val
console
.
log
(
goodsInfo
.
value
.
spec_list
[
index
].
custom
);
//
console.log(goodsInfo.value.spec_list[index].custom);
}
let
onConfirm
=
(
val
:
string
,
index
:
number
)
=>
{
...
...
src/pages/order/quotation.vue
浏览文件 @
bc413cf7
差异被折叠。
点击展开。
src/pages/productLine/productLineDetails.vue
浏览文件 @
bc413cf7
<
template
>
<view
class=
"container"
>
<block
v-for=
"(item, index) in detailData"
>
<view>
<view
class=
"details"
>
<u-image
width=
"140rpx"
height=
"200rpx"
:src=
"
item.picUrl.split('http').length > 1
? item.picUrl
: baseUrl + item.picUrl
"
class=
"img"
></u-image>
<view
class=
"right"
>
<view
class=
"name"
>
{{
item
.
goodsName
}}
</view>
<view
class=
"tag"
>
<block
v-for=
"(item1, index1) in item.specifications?.length"
:key=
"index1"
>
<u-tag
:text=
"item.specifications[index1]"
type=
"info"
size=
"mini"
style=
"margin: 8rpx 8rpx 8rpx 0;"
/>
</block>
<block
v-for=
"res in detailData"
>
<view
style=
"margin-bottom: 20rpx; background-color: #fff;"
>
<view
style=
"width: 100%; text-align: end; padding: 20rpx 20rpx 0 0;"
>
{{
res
.
name
}}
</view>
<block
v-for=
"(item, index) in res.values"
>
<view
class=
"details"
>
<u-image
width=
"140rpx"
height=
"200rpx"
:src=
"
item.picUrl.split('http').length > 1
? item.picUrl
: baseUrl + item.picUrl
"
class=
"img"
></u-image>
<view
class=
"right"
>
<view
class=
"name"
>
{{
item
.
goodsName
}}
</view>
<view
class=
"tag"
>
<block
v-for=
"(item1, index1) in item.specifications?.length"
:key=
"index1"
>
<u-tag
:text=
"item.specifications[index1]"
type=
"info"
size=
"mini"
style=
"margin: 8rpx 8rpx 8rpx 0;"
/>
</block>
</view>
<text
style=
"display: flex; justify-content: flex-end; 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"
/
>
<u-line
v-if=
"res.values.length >= 1"
color=
"#e8e8e8"
/
>
<
/block
>
</view>
</block>
<view
class=
"content-footer"
>
...
...
@@ -37,18 +42,13 @@
</view>
</view>
<view
style=
"height: 100rpx;"
></view>
<view
class=
"footer"
>
<text>
商品总价:¥
{{
totlePirce
}}
</text>
<text>
含税商品总价:¥
{{
taxTotlePirce
}}
</text>
</view>
</
template
>
<
script
setup
lang=
"ts"
>
import
{
ref
,
computed
}
from
'vue'
;
import
{
ref
}
from
'vue'
;
import
{
onLoad
,
onBackPress
}
from
'@dcloudio/uni-app'
;
import
{
orderDetail
}
from
'@/api/index'
;
import
{
quotationInit
}
from
'@/api/cart'
;
import
{
getProductLineIndex
}
from
'@/api/productLine'
;
import
{
getProductLineMultipleDetail
}
from
'@/api/productLine'
;
import
{
useStore
}
from
'@/store/useStore'
;
import
config
from
'@/utils/config'
;
...
...
@@ -58,7 +58,6 @@ let enclosure = ref(''); // pdf key值
let
detailData
=
ref
([]
as
any
);
let
type
=
ref
();
let
orderId
=
ref
();
let
tax
=
ref
(
0
);
// 税率
onLoad
((
options
:
any
)
=>
{
type
.
value
=
options
.
type
;
...
...
@@ -82,29 +81,10 @@ let toIndex = () => {
// 生成报价
let
generateQuote
=
()
=>
{
uni
.
navigateTo
({
url
:
`../order/quotation?orderId=
${
orderId
.
value
}
&lineId=
${
lineId
.
value
}
`
,
url
:
`../order/quotation?orderId=
${
orderId
.
value
}
&lineId=
${
0
}
`
,
});
};
// 总价格
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
=
()
=>
{
open
(
baseUrl
+
'/wx/storage/downloadFile/'
+
enclosure
.
value
)
...
...
@@ -134,37 +114,44 @@ let download = () => {
// });
};
let
initQuotationInit
=
(
orderId
:
number
)
=>
{
quotationInit
({
orderId
}).
then
((
res
:
any
)
=>
{
console
.
log
(
res
,
'产品线'
);
});
};
let
lineId
=
ref
();
let
lineNames
=
ref
([]
as
any
)
// 获取goodsId
let
initOrderData
=
(
orderId
:
number
)
=>
{
orderDetail
({
orderId
}).
then
((
res
:
any
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
enclosure
.
value
=
res
.
data
.
data
.
orderInfo
.
enclosure
;
let
lineArr
=
[]
as
any
res
.
data
.
data
.
orderGoods
.
map
((
item
:
any
,
i
:
number
)
=>
{
if
(
res
.
data
.
data
.
orderGoods
.
length
-
1
===
i
)
{
lineId
.
value
=
item
.
goodsId
;
initProductLineIndex
(
item
.
goodsId
);
if
(
item
.
goodsId
)
{
lineArr
.
push
(
item
.
goodsId
)
lineNames
.
value
.
push
({
id
:
item
.
goodsId
,
name
:
item
.
goodsName
})
}
});
initProductLineMultipleDetail
(
lineArr
)
}
});
};
// 通过goodsId查询产品线数据
let
initProductLineIndex
=
(
lineId
:
number
)
=>
{
getProductLineIndex
({
lineId
}).
then
((
res
:
any
)
=>
{
let
initProductLineMultipleDetail
=
(
lineArr
:
[])
=>
{
getProductLineMultipleDetail
(
lineArr
).
then
((
res
:
any
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
detailData
.
value
=
[...
res
.
data
.
data
.
cartList
,
...
detailData
.
value
];
console
.
log
(
res
,
'lineId'
);
for
(
const
key
in
res
.
data
.
data
)
{
lineNames
.
value
.
map
((
item
:
any
)
=>
{
if
(
key
==
item
.
id
)
{
detailData
.
value
.
push
({
name
:
item
.
name
,
values
:
res
.
data
.
data
[
key
]
})
}
})
}
// console.log(detailData.value, 'getProductLineMultipleDetail', lineNames.value);
}
})
;
}
;
})
}
// 通过type判断返回页面
onBackPress
((
options
:
any
)
=>
{
...
...
@@ -207,7 +194,7 @@ onBackPress((options: any) => {
.container
{
box-sizing
:
border-box
;
margin
:
16rpx
32rpx
;
background-color
:
#fff
;
//
background-color: #fff;
.details
{
width
:
100%
;
...
...
@@ -216,6 +203,7 @@ onBackPress((options: any) => {
flex-direction
:
row
;
justify-content
:
flex-start
;
align-items
:
center
;
background-color
:
#fff
;
.img
{
margin-right
:
20rpx
;
...
...
@@ -240,12 +228,13 @@ onBackPress((options: any) => {
}
.content-footer
{
margin-top
:
50rpx
;
//
margin-top: 50rpx;
padding
:
50rpx
;
width
:
100%
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
background-color
:
#fff
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论