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
4d9eac81
提交
4d9eac81
authored
12月 09, 2022
作者:
刘旭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
商城配件对接完成
上级
bed33059
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
31 行增加
和
32 行删除
+31
-32
vk-data-goods-sku-popup.vue
...nents/vk-data-goods-sku-popup/vk-data-goods-sku-popup.vue
+16
-5
goodsSku.vue
src/pages/goods/goodsSku.vue
+4
-3
index.vue
src/pages/goods/index.vue
+11
-5
productLineDetails.vue
src/pages/productLine/productLineDetails.vue
+0
-19
没有找到文件。
src/components/vk-data-goods-sku-popup/vk-data-goods-sku-popup.vue
浏览文件 @
4d9eac81
...
@@ -107,10 +107,11 @@
...
@@ -107,10 +107,11 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view
<!-- v-if="
v-if=
"
JSON.stringify(goodsInfo.partsData) !== '[]' && goodsInfo.partsData
JSON.stringify(goodsInfo.partsData) !== '[]' && goodsInfo.partsData
"
" -->
<view
v-if=
"JSON.stringify(partList) !== '[]' && partList"
class=
"specification-item"
class=
"specification-item"
>
>
<view
class=
"item-title"
>
配件(多选)
</view>
<view
class=
"item-title"
>
配件(多选)
</view>
...
@@ -119,7 +120,7 @@
...
@@ -119,7 +120,7 @@
>
>
<view
class=
"item-wrapper"
>
<view
class=
"item-wrapper"
>
<view
<view
v-for=
"(item, index) in
goodsInfo.partsData
"
v-for=
"(item, index) in
partList
"
:key=
"item.id"
:key=
"item.id"
class=
"item-content"
class=
"item-content"
:class=
"[item.show ? 'actived' : '']"
:class=
"[item.show ? 'actived' : '']"
...
@@ -496,6 +497,7 @@ export default {
...
@@ -496,6 +497,7 @@ export default {
selectShop
:
{},
// 存放最后选中的商品
selectShop
:
{},
// 存放最后选中的商品
selectNum
:
this
.
minBuyNum
||
1
,
// 选中数量
selectNum
:
this
.
minBuyNum
||
1
,
// 选中数量
outFoStock
:
false
,
// 是否全部sku都缺货
outFoStock
:
false
,
// 是否全部sku都缺货
partList
:
undefined
,
// 监听赋值配件
openTime
:
0
,
openTime
:
0
,
themeColor
:
{
themeColor
:
{
// 默认主题
// 默认主题
...
@@ -592,7 +594,7 @@ export default {
...
@@ -592,7 +594,7 @@ export default {
methods
:
{
methods
:
{
// 选择配件
// 选择配件
tapParts
(
row
,
index
)
{
tapParts
(
row
,
index
)
{
this
.
goodsInfo
.
partsData
[
index
].
show
=
!
this
.
goodsInfo
.
partsData
[
index
].
show
;
this
.
partList
[
index
].
show
=
!
this
.
partList
[
index
].
show
;
this
.
$emit
(
'select-parts'
,
row
);
this
.
$emit
(
'select-parts'
,
row
);
},
},
// 初始化
// 初始化
...
@@ -1277,6 +1279,15 @@ export default {
...
@@ -1277,6 +1279,15 @@ export default {
that
.
$emit
(
'change'
,
newVal
);
that
.
$emit
(
'change'
,
newVal
);
},
},
},
},
localdata
:
{
// immediate: true,
deep
:
true
,
handler
:
function
(
newVal
,
oldValue
)
{
let
that
=
this
;
that
.
partList
=
that
.
localdata
.
partsData
;
// console.log(that.localdata, 'localdata');
},
},
},
},
};
};
</
script
>
</
script
>
...
...
src/pages/goods/goodsSku.vue
浏览文件 @
4d9eac81
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
</
template
>
</
template
>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
ref
,
watch
}
from
'vue'
;
import
{
ref
,
watch
}
from
'vue'
;
import
{
addCart
,
fastaddCart
,
readdCart
}
from
'@/api/index'
;
import
{
addCart
,
fastaddCart
,
readdCart
}
from
'@/api/index'
;
// SKU弹窗模式
// SKU弹窗模式
...
@@ -124,6 +124,7 @@ let init = (data: any, id: number, partsData?: any) => {
...
@@ -124,6 +124,7 @@ let init = (data: any, id: number, partsData?: any) => {
spec_list
:
specificationList
,
spec_list
:
specificationList
,
partsData
partsData
};
};
// console.log(goodsInfo.value, 'goodsInfo.value');
productList
=
[]
productList
=
[]
specificationList
=
[]
specificationList
=
[]
};
};
...
@@ -326,7 +327,7 @@ const handleClose = () => {
...
@@ -326,7 +327,7 @@ const handleClose = () => {
skuPopupRef
.
value
.
handClose
()
skuPopupRef
.
value
.
handClose
()
}
}
// 重置页面数据
// 重置页面数据
let
reload
=
()
=>
{
let
reload
=
()
=>
{
let
pages
=
getCurrentPages
();
//获取所有页面的数组对象
let
pages
=
getCurrentPages
();
//获取所有页面的数组对象
let
currPage
:
any
=
pages
[
pages
.
length
-
1
];
//当前页面
let
currPage
:
any
=
pages
[
pages
.
length
-
1
];
//当前页面
...
@@ -339,7 +340,7 @@ defineExpose({
...
@@ -339,7 +340,7 @@ defineExpose({
skuKey
,
skuKey
,
skuMode
,
skuMode
,
init
,
init
,
handleClose
,
handleClose
});
});
</
script
>
</
script
>
...
...
src/pages/goods/index.vue
浏览文件 @
4d9eac81
...
@@ -168,7 +168,6 @@ onLoad((options: any) => {
...
@@ -168,7 +168,6 @@ onLoad((options: any) => {
data
:
options
.
id
data
:
options
.
id
})
})
initDetails
(
options
.
id
)
initDetails
(
options
.
id
)
initParts
(
options
.
id
)
});
});
let
selectedGoodsItem
=
ref
()
let
selectedGoodsItem
=
ref
()
...
@@ -204,7 +203,15 @@ const selected = (data: any) => {
...
@@ -204,7 +203,15 @@ const selected = (data: any) => {
bool
=
true
bool
=
true
}
}
})
})
if
(
productId
)
initAttribute
(
productId
)
console
.
log
(
productId
);
if
(
productId
)
{
let
productIds
=
productId
initAttribute
(
productIds
)
initParts
(
detailId
.
value
,
productIds
)
setTimeout
(()
=>
{
goodsSkuRef
.
value
.
init
(
detailData
.
value
,
detailId
.
value
,
partsData
.
value
)
},
50
)
}
else
attributeData
.
value
=
null
else
attributeData
.
value
=
null
}
}
...
@@ -268,7 +275,6 @@ const initAttribute = (productId: number) => {
...
@@ -268,7 +275,6 @@ const initAttribute = (productId: number) => {
orderAttribute
({
productId
}).
then
((
res
:
any
)
=>
{
orderAttribute
({
productId
}).
then
((
res
:
any
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
if
(
res
.
data
.
code
===
200
)
{
attributeData
.
value
=
res
.
data
.
data
attributeData
.
value
=
res
.
data
.
data
console
.
log
(
'Attribute'
,
res
);
}
}
})
})
}
}
...
@@ -308,8 +314,8 @@ const initDetails = (id: number) => {
...
@@ -308,8 +314,8 @@ const initDetails = (id: number) => {
}
}
// 获取商品配件
// 获取商品配件
const
initParts
=
(
i
d
:
number
)
=>
{
const
initParts
=
(
goodsId
:
number
,
productI
d
:
number
)
=>
{
goodsParts
({
goodsId
:
i
d
}).
then
((
res
:
any
)
=>
{
goodsParts
({
goodsId
,
productI
d
}).
then
((
res
:
any
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
if
(
res
.
data
.
code
===
200
)
{
res
.
data
.
data
.
forEach
((
item
:
any
)
=>
{
res
.
data
.
data
.
forEach
((
item
:
any
)
=>
{
item
[
'show'
]
=
false
item
[
'show'
]
=
false
...
...
src/pages/productLine/productLineDetails.vue
浏览文件 @
4d9eac81
...
@@ -101,25 +101,6 @@ let toIndex = () => {
...
@@ -101,25 +101,6 @@ let toIndex = () => {
// 生成报价
// 生成报价
let
generateQuote
=
()
=>
{
let
generateQuote
=
()
=>
{
// let data = [] as any;
// let flag = true;
// detailData.value.map((item: any) => {
// if (typeof item.unitPrice === 'undefined') {
// flag = false;
// return uni.showToast({
// title: `请填写 ${item.goodsName} 单价`,
// icon: 'none',
// });
// } else
// data.push({
// goodsName: item.goodsName,
// unitPrice: item.unitPrice,
// });
// });
// if (flag)
// uni.navigateTo({
// url: `../order/quotation?orderId=${orderId.value}`,
// });
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`../order/quotation?orderId=
${
orderId
.
value
}
&lineId=
${
lineId
.
value
}
`
,
url
:
`../order/quotation?orderId=
${
orderId
.
value
}
&lineId=
${
lineId
.
value
}
`
,
});
});
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论