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
476c1ec3
提交
476c1ec3
authored
12月 29, 2022
作者:
刘旭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
解决报价相同bug
上级
e94ea407
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
30 行增加
和
68 行删除
+30
-68
vk-data-goods-sku-popup.vue
...nents/vk-data-goods-sku-popup/vk-data-goods-sku-popup.vue
+3
-3
index.vue
src/pages/cart/index.vue
+2
-0
goodsSku.vue
src/pages/goods/goodsSku.vue
+1
-1
index.vue
src/pages/goods/index.vue
+14
-5
index.vue
src/pages/index/index.vue
+1
-1
downPdf.vue
src/pages/order/downPdf.vue
+0
-9
quotation.vue
src/pages/order/quotation.vue
+6
-48
useStore.ts
src/store/useStore.ts
+3
-1
没有找到文件。
src/components/vk-data-goods-sku-popup/vk-data-goods-sku-popup.vue
浏览文件 @
476c1ec3
...
@@ -54,15 +54,15 @@
...
@@ -54,15 +54,15 @@
{{
item_value
.
name
}}
{{
item_value
.
name
}}
</view>
</view>
<u-input
v-if=
"item.isPlus && item.isCustom"
style=
"width: 170rpx;"
<u-input
v-if=
"item.isPlus && item.isCustom"
style=
"width: 170rpx;"
v-model=
"item.custom"
placeholder=
"
自定义规格
"
placeholder-style=
"font-size: 12px"
v-model=
"item.custom"
placeholder=
"
定制属性
"
placeholder-style=
"font-size: 12px"
type=
"text"
border-color=
"#f4f4f4"
height=
"50"
clearable
border
focus
type=
"text"
border-color=
"#f4f4f4"
height=
"50"
clearable
border
@
blur=
"onBlur($event, index1)"
@
confirm=
"onConfirm($event, index1)"
/>
@
blur=
"onBlur($event, index1)"
@
confirm=
"onConfirm($event, index1)"
/>
</view>
</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>
<u-icon
name=
"plus-circle"
color=
"#999"
size=
"36"
@
click=
"onPlus(index1)"
></u-icon>
</view>
</view>
<view
v-if=
"!item.isPlus && item.isCustom"
style=
"margin-bottom: 12rpx; width: 200rpx;"
>
<view
v-if=
"!item.isPlus && item.isCustom"
style=
"margin-bottom: 12rpx; width: 200rpx;"
>
<u-input
v-model=
"item.custom"
placeholder=
"
自定义规格
"
type=
"text"
<u-input
v-model=
"item.custom"
placeholder=
"
定制属性
"
type=
"text"
border-color=
"#2979ff"
height=
"50"
clearable
border
focus
border-color=
"#2979ff"
height=
"50"
clearable
border
focus
@
blur=
"onBlur($event, index1)"
@
confirm=
"onConfirm($event, index1)"
/>
@
blur=
"onBlur($event, index1)"
@
confirm=
"onConfirm($event, index1)"
/>
</view>
-->
</view>
-->
...
...
src/pages/cart/index.vue
浏览文件 @
476c1ec3
...
@@ -268,6 +268,8 @@ let togoods = (data: any) => {
...
@@ -268,6 +268,8 @@ let togoods = (data: any) => {
sku
:
data
.
specifications
,
sku
:
data
.
specifications
,
num
:
data
.
number
num
:
data
.
number
},
},
partIds
:
data
.
partIds
,
partList
:
data
.
partList
,
isDefaultSku
:
true
isDefaultSku
:
true
})
})
}
}
...
...
src/pages/goods/goodsSku.vue
浏览文件 @
476c1ec3
...
@@ -74,7 +74,7 @@ let onConfirm = (val: string, index: number) => {
...
@@ -74,7 +74,7 @@ let onConfirm = (val: string, index: number) => {
let
selectParts
=
(
data
:
any
)
=>
{
let
selectParts
=
(
data
:
any
)
=>
{
let
index
=
partsIds
.
value
.
indexOf
(
data
.
id
)
let
index
=
partsIds
.
value
.
indexOf
(
data
.
id
)
if
(
index
===
-
1
)
{
if
(
index
===
-
1
)
{
if
(
data
.
show
=
true
)
partsIds
.
value
.
push
(
data
.
id
)
if
(
data
.
show
)
partsIds
.
value
.
push
(
data
.
id
)
}
else
partsIds
.
value
.
splice
(
index
,
1
)
}
else
partsIds
.
value
.
splice
(
index
,
1
)
}
}
...
...
src/pages/goods/index.vue
浏览文件 @
476c1ec3
...
@@ -101,7 +101,7 @@ const specStore = useSpecStore()
...
@@ -101,7 +101,7 @@ const specStore = useSpecStore()
const
goodsSkuRef
=
ref
()
const
goodsSkuRef
=
ref
()
const
attrPopup
=
ref
(
false
);
const
attrPopup
=
ref
(
false
);
const
detailData
:
any
=
ref
();
const
detailData
:
any
=
ref
();
const
partsData
=
ref
();
const
partsData
=
ref
(
[]
as
any
);
const
tabButtons
=
ref
([
'商品详情'
]);
const
tabButtons
=
ref
([
'商品详情'
]);
let
current
=
ref
(
0
);
let
current
=
ref
(
0
);
let
attributeData
=
ref
([]
as
any
)
let
attributeData
=
ref
([]
as
any
)
...
@@ -233,10 +233,19 @@ const buttonClick = () => {
...
@@ -233,10 +233,19 @@ const buttonClick = () => {
// 如果从购物车来的,即存有默认值,需赋值到sku
// 如果从购物车来的,即存有默认值,需赋值到sku
if
(
specStore
.
isDefaultSku
)
{
if
(
specStore
.
isDefaultSku
)
{
goodsSkuRef
.
value
.
defaultSelect
=
specStore
.
defaultSelect
goodsSkuRef
.
value
.
defaultSelect
=
specStore
.
defaultSelect
specStore
.
$patch
({
if
(
specStore
.
partIds
.
length
>
0
)
{
defaultSelect
:
{},
setTimeout
(()
=>
{
isDefaultSku
:
false
partsData
.
value
.
forEach
((
item
:
any
)
=>
{
})
console
.
log
(
item
.
id
,
specStore
.
partIds
);
if
(
specStore
.
partIds
.
indexOf
(
item
.
id
)
!==
-
1
)
{
item
.
show
=
true
}
});
goodsSkuRef
.
value
.
partsIds
=
specStore
.
partIds
specStore
.
$reset
()
// 重置数据
},
100
);
}
else
specStore
.
$reset
()
// 重置数据
}
else
resultSku
()
}
else
resultSku
()
goodsSkuRef
.
value
.
init
(
detailData
.
value
,
detailId
.
value
,
partsData
.
value
)
goodsSkuRef
.
value
.
init
(
detailData
.
value
,
detailId
.
value
,
partsData
.
value
)
goodsSkuRef
.
value
.
skuKey
=
true
goodsSkuRef
.
value
.
skuKey
=
true
...
...
src/pages/index/index.vue
浏览文件 @
476c1ec3
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
item.iconUrl.split('http').length > 1
item.iconUrl.split('http').length > 1
? item.iconUrl
? item.iconUrl
: baseUrl + item.iconUrl
: baseUrl + item.iconUrl
"
:size=
"
5
0"
></u-icon>
"
:size=
"
6
0"
></u-icon>
<view
class=
"grid-text"
>
{{
item
.
name
}}
</view>
<view
class=
"grid-text"
>
{{
item
.
name
}}
</view>
</u-grid-item>
</u-grid-item>
</block>
</block>
...
...
src/pages/order/downPdf.vue
浏览文件 @
476c1ec3
...
@@ -111,15 +111,6 @@ let download = () => {
...
@@ -111,15 +111,6 @@ let download = () => {
// });
// });
};
};
// 获取下载pdf信息
// let initPdf = (orderId: number) => {
// getOrderPdf({ orderId }).then((res: any) => {
// if (res.data.code === 200) {
// console.log(res, 'pdf');
// }
// });
// };
onBackPress
((
options
:
any
)
=>
{
onBackPress
((
options
:
any
)
=>
{
if
(
options
.
from
===
'navigateBack'
)
{
if
(
options
.
from
===
'navigateBack'
)
{
return
false
;
return
false
;
...
...
src/pages/order/quotation.vue
浏览文件 @
476c1ec3
...
@@ -128,7 +128,7 @@
...
@@ -128,7 +128,7 @@
<u-picker
mode=
"region"
v-model=
"pickerShow1"
@
confirm=
"regionConfirm1"
></u-picker>
<u-picker
mode=
"region"
v-model=
"pickerShow1"
@
confirm=
"regionConfirm1"
></u-picker>
<u-picker
mode=
"time"
v-model=
"pickerDateShow"
@
confirm=
"dateConfirm"
></u-picker>
<u-picker
mode=
"time"
v-model=
"pickerDateShow"
@
confirm=
"dateConfirm"
></u-picker>
<u-select
v-model=
"guaranteeShow"
:list=
"guaranteeList"
@
confirm=
"guaranteeConfirm"
></u-select>
<u-select
v-model=
"guaranteeShow"
:list=
"guaranteeList"
@
confirm=
"guaranteeConfirm"
></u-select>
<
order-form
ref=
"orderRef"
@
onSubmit=
"onSubmit"
/
>
<
!--
<order-form
ref=
"orderRef"
@
onSubmit=
"onSubmit"
/>
--
>
<u-modal
v-model=
"showModel"
:content=
"content"
@
confirm=
"modelConfirm"
@
cancel=
"modelCancel"
showCancelButton
>
<u-modal
v-model=
"showModel"
:content=
"content"
@
confirm=
"modelConfirm"
@
cancel=
"modelCancel"
showCancelButton
>
</u-modal>
</u-modal>
</
template
>
</
template
>
...
@@ -141,7 +141,7 @@ import { orderDetail, getTax } from '@/api/index';
...
@@ -141,7 +141,7 @@ import { orderDetail, getTax } from '@/api/index';
import
{
getProductLineMultipleDetail
}
from
'@/api/productLine'
;
import
{
getProductLineMultipleDetail
}
from
'@/api/productLine'
;
import
{
quotationExist
}
from
'@/api/cart'
import
{
quotationExist
}
from
'@/api/cart'
import
config
from
'@/utils/config'
;
import
config
from
'@/utils/config'
;
import
orderForm
from
'./components/orderForm.vue'
;
//
import orderForm from './components/orderForm.vue';
let
{
proxy
}:
any
=
getCurrentInstance
()
as
ComponentInternalInstance
let
{
proxy
}:
any
=
getCurrentInstance
()
as
ComponentInternalInstance
let
orderRef
=
ref
()
let
orderRef
=
ref
()
...
@@ -308,7 +308,6 @@ let priceCheck = (val: any, index: number) => {
...
@@ -308,7 +308,6 @@ let priceCheck = (val: any, index: number) => {
let
submit
=
()
=>
{
let
submit
=
()
=>
{
// 保证单价必填
// 保证单价必填
new
Promise
((
resolve
,
reject
)
=>
{
new
Promise
((
resolve
,
reject
)
=>
{
console
.
log
(
detailData
.
value
,
'....'
);
let
flag
=
true
let
flag
=
true
detailData
.
value
.
map
((
item
:
any
)
=>
{
detailData
.
value
.
map
((
item
:
any
)
=>
{
if
(
item
.
unitPrice
===
undefined
||
item
.
unitPrice
===
''
)
{
if
(
item
.
unitPrice
===
undefined
||
item
.
unitPrice
===
''
)
{
...
@@ -324,37 +323,17 @@ let submit = () => {
...
@@ -324,37 +323,17 @@ let submit = () => {
uFormRef
.
value
?.
validate
((
valid
:
any
,
err
:
any
)
=>
{
uFormRef
.
value
?.
validate
((
valid
:
any
,
err
:
any
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
// 同步价格
// 同步价格
quotationData
.
value
.
items
.
forEach
((
item
:
any
)
=>
{
quotationData
.
value
.
items
.
forEach
((
item
:
any
,
i
:
number
)
=>
{
detailData
.
value
.
map
((
res
:
any
)
=>
{
detailData
.
value
.
map
((
res
:
any
,
r
:
number
)
=>
{
if
(
i
tem
.
goodsName
==
res
.
goodsName
)
{
if
(
i
===
r
)
{
item
.
price
=
res
.
unitPrice
item
.
price
=
res
.
unitPrice
}
}
})
})
})
})
// if (lineId.value) {
// // 同步价格
// quotationData.value.items.forEach((item: any) => {
// detailData.value.map((res: any) => {
// if (item.goodsName == res.goodsName) {
// item.price = res.unitPrice
// }
// })
// })
// } else {
// // 同步价格
// quotationData.value.items.forEach((item: any) => {
// detailData.value.map((res: any) => {
// if (item.goodsName == res.goodsName) {
// item.price = res.unitPrice
// }
// })
// })
// }
let
data
=
{
let
data
=
{
items
:
quotationData
.
value
.
items
,
items
:
quotationData
.
value
.
items
,
quotation
:
formData
.
value
,
quotation
:
formData
.
value
,
};
};
fillQuotation
(
data
).
then
((
res
:
any
)
=>
{
fillQuotation
(
data
).
then
((
res
:
any
)
=>
{
if
(
res
.
data
.
code
===
200
)
showModel
.
value
=
true
if
(
res
.
data
.
code
===
200
)
showModel
.
value
=
true
});
});
...
@@ -470,7 +449,7 @@ let initQuotaionData = (id: number) => {
...
@@ -470,7 +449,7 @@ let initQuotaionData = (id: number) => {
}
}
})
})
})
})
console
.
log
(
detailData
.
value
);
//
console.log(detailData.value);
}
else
initQuotation
(
orderId
.
value
)
}
else
initQuotation
(
orderId
.
value
)
// console.log(res, '订单详情信息');
// console.log(res, '订单详情信息');
}
}
...
@@ -488,27 +467,6 @@ let initQuotaionData = (id: number) => {
...
@@ -488,27 +467,6 @@ let initQuotaionData = (id: number) => {
}
}
}
}
});
});
// 查询产品线
if
(
lineId
.
value
)
{
}
else
// 查询普通商品
orderDetail
({
orderId
:
id
}).
then
((
res
:
any
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
detailData
.
value
=
res
.
data
.
data
.
orderGoods
// 从quotationData获取 在detailData中添加 合同报价字段
if
(
quotationData
.
value
)
{
quotationData
.
value
.
items
.
map
((
item
:
any
)
=>
{
detailData
.
value
.
map
((
detail
:
any
)
=>
{
if
(
item
.
goodsName
==
detail
.
goodsName
)
{
detail
.
contractQuotation
=
item
.
contractQuotation
}
})
})
}
else
initQuotation
(
orderId
.
value
)
console
.
log
(
res
,
'订单详情信息'
);
}
});
}
}
// 获取税率
// 获取税率
...
...
src/store/useStore.ts
浏览文件 @
476c1ec3
...
@@ -26,7 +26,9 @@ export let useSpecStore = defineStore('specData', {
...
@@ -26,7 +26,9 @@ export let useSpecStore = defineStore('specData', {
state
:
()
=>
{
state
:
()
=>
{
return
{
return
{
defaultSelect
:
{},
// 数据
defaultSelect
:
{},
// 数据
isDefaultSku
:
false
// 默认值
isDefaultSku
:
false
,
// 是否存在默认值
partIds
:
[]
as
any
,
partList
:
[]
}
}
}
}
})
})
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论