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
51858d42
提交
51858d42
authored
1月 05, 2023
作者:
刘旭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化sku页面
上级
45e89fc4
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
73 行增加
和
24 行删除
+73
-24
cart.ts
src/api/cart.ts
+7
-0
vk-data-goods-sku-popup.vue
...nents/vk-data-goods-sku-popup/vk-data-goods-sku-popup.vue
+10
-2
goodsSku.vue
src/pages/goods/goodsSku.vue
+2
-2
index.vue
src/pages/goods/index.vue
+3
-3
checkout.vue
src/pages/order/checkout.vue
+1
-3
downPdf.vue
src/pages/order/downPdf.vue
+2
-3
quotation.vue
src/pages/order/quotation.vue
+48
-11
没有找到文件。
src/api/cart.ts
浏览文件 @
51858d42
...
...
@@ -47,3 +47,9 @@ export const quotationExist = (data: any) => request('/wx/quotation/exist', 'GET
// 再次加入购物车
export
const
orderCartAgain
=
(
data
:
any
)
=>
request
(
'/wx/order/cart/again'
,
'GET'
,
data
);
// 报价单-交货地址集合
export
const
getQuotationDelivery
=
()
=>
request
(
'/wx/quotation/delivery'
,
'GET'
);
// 报价单-收款条件集合
export
const
getQuotationPayment
=
()
=>
request
(
'/wx/quotation/payment'
,
'GET'
);
\ No newline at end of file
src/components/vk-data-goods-sku-popup/vk-data-goods-sku-popup.vue
浏览文件 @
51858d42
...
...
@@ -1064,8 +1064,16 @@ export default {
},
handClose
()
{
let
that
=
this
;
that
.
selectShop
=
{};
that
.
goodsInfo
=
{};
console
.
log
(
that
.
localdata
,
'that.goodsInfo+++'
);
// that.selectShop = {};
// that.init();
// that.open()
// that.checkInpath(-1)
// console.log(that.goodsInfo, 'that.goodsInfo----');
// that.goodsInfo = {};
// console.log(that.goodsInfo, 'that.goodsInfo+++');
// init(true)
},
// 添加子字段
onPlus
(
index
)
{
...
...
src/pages/goods/goodsSku.vue
浏览文件 @
51858d42
...
...
@@ -10,7 +10,7 @@
</
template
>
<
script
setup
lang=
"ts"
>
import
{
ref
,
watch
}
from
'vue'
;
import
{
nextTick
,
ref
,
watch
}
from
'vue'
;
import
{
addCart
,
fastaddCart
,
readdCart
}
from
'@/api/index'
;
import
{
useSpecStore
}
from
'@/store/useStore'
;
...
...
@@ -334,7 +334,7 @@ const handleClose = () => {
emits
(
'selected'
,
''
)
defaultSelect
.
value
=
{}
goodsInfo
.
value
=
{}
skuPopupRef
.
value
.
handClose
()
skuPopupRef
.
value
.
init
()
}
// 重置页面数据
...
...
src/pages/goods/index.vue
浏览文件 @
51858d42
...
...
@@ -87,7 +87,7 @@
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
nextTick
}
from
'vue'
;
import
{
onLoad
,
onBackPress
}
from
'@dcloudio/uni-app'
;
import
{
onLoad
,
onBackPress
,
onShow
}
from
'@dcloudio/uni-app'
;
import
{
indexDetails
,
collectAddordelete
,
...
...
@@ -149,7 +149,7 @@ let selectedGoodsSum = ref()
let
selectedGoods
=
computed
(()
=>
{
if
(
selectedGoodsItem
.
value
.
length
>
0
)
{
let
str
=
''
selectedGoodsItem
.
value
.
forEach
((
item
:
any
,
i
:
number
)
=>
{
selectedGoodsItem
.
value
.
map
((
item
:
any
,
i
:
number
)
=>
{
if
(
i
==
0
)
{
str
+=
item
}
else
{
...
...
@@ -162,7 +162,7 @@ let selectedGoods = computed(() => {
const
selected
=
(
data
:
any
)
=>
{
if
(
!
data
)
{
selectedGoodsItem
.
value
.
length
=
0
selectedGoodsItem
.
value
=
[]
partsData
.
value
=
[]
goodsSkuRef
.
value
.
init
(
detailData
.
value
,
detailId
.
value
,
partsData
.
value
)
return
...
...
src/pages/order/checkout.vue
浏览文件 @
51858d42
...
...
@@ -64,10 +64,8 @@
import
{
onLoad
,
onBackPress
,
onShow
}
from
'@dcloudio/uni-app'
;
import
{
ref
,
computed
}
from
'vue'
;
import
{
checkoutCart
,
orderSubmit
}
from
'@/api/index'
;
import
{
useSpecStore
}
from
'@/store/useStore'
;
import
config
from
'@/utils/config'
;
const
specStore
=
useSpecStore
()
const
baseUrl
=
config
.
baseUrl
;
const
buyNowId
=
ref
();
const
buyNowData
:
any
=
ref
();
...
...
@@ -80,7 +78,7 @@ onLoad((options: any) => {
});
onBackPress
((
options
:
any
)
=>
{
specStore
.
$reset
()
// 退回到购物车页面同步type值
if
(
options
.
from
===
'backbutton'
&&
type
.
value
===
'productLineCart'
)
{
let
pages
=
getCurrentPages
();
// 当前页面
let
beforePage
:
any
=
pages
[
pages
.
length
-
2
];
// 上一页
...
...
src/pages/order/downPdf.vue
浏览文件 @
51858d42
...
...
@@ -112,9 +112,8 @@ let download = () => {
};
onBackPress
((
options
:
any
)
=>
{
if
(
options
.
from
===
'navigateBack'
)
{
return
false
;
}
if
(
options
.
from
===
'navigateBack'
)
return
false
if
(
type
.
value
===
'profile'
)
{
uni
.
redirectTo
({
url
:
'../order/orderList?showType='
+
currentStore
.
current
,
...
...
src/pages/order/quotation.vue
浏览文件 @
51858d42
...
...
@@ -96,6 +96,9 @@
<u-form-item
label=
"交货期:"
prop=
"deliveryTime"
>
<u-input
v-model=
"formData.deliveryTime"
placeholder=
"请输入交货期"
/>
</u-form-item>
<u-form-item
label=
"交货地点:"
prop=
"deliveryAddr"
>
<u-input
v-model=
"formData.deliveryAddr"
placeholder=
"请输入交货地点"
/>
</u-form-item>
<u-form-item
label=
"订单号:"
prop=
"noOrder"
>
<u-input
type=
"number"
v-model=
"formData.noOrder"
placeholder=
"请输入订单号"
/>
</u-form-item>
...
...
@@ -124,18 +127,19 @@
<u-button
type=
"error"
@
click=
"submit"
>
提交
</u-button>
</u-col>
</u-row>
<u-picker
mode=
"region"
v-model=
"pickerShow"
@
confirm=
"regionConfirm"
></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-select
v-model=
"guaranteeShow"
:list=
"guaranteeList"
@
confirm=
"guaranteeConfirm"
></u-select>
<u-picker
mode=
"region"
v-model=
"pickerShow"
@
confirm=
"regionConfirm"
/>
<u-picker
mode=
"region"
v-model=
"pickerShow1"
@
confirm=
"regionConfirm1"
/>
<u-picker
mode=
"time"
v-model=
"pickerDateShow"
@
confirm=
"dateConfirm"
/>
<u-select
v-model=
"guaranteeShow"
:list=
"guaranteeList"
@
confirm=
"guaranteeConfirm"
/>
<u-select
v-model=
"paymentShow"
:list=
"paymentList"
@
confirm=
"paymentConfirm"
/>
<u-select
v-model=
"deliveryShow"
:list=
"deliveryList"
@
confirm=
"deliveryConfirm"
/>
<!--
<order-form
ref=
"orderRef"
@
onSubmit=
"onSubmit"
/>
-->
<u-modal
v-model=
"showModel"
:content=
"content"
@
confirm=
"modelConfirm"
@
cancel=
"modelCancel"
showCancelButton
>
</u-modal>
<u-modal
v-model=
"showModel"
:content=
"content"
@
confirm=
"modelConfirm"
@
cancel=
"modelCancel"
showCancelButton
/>
</
template
>
<
script
setup
lang=
"ts"
>
import
{
ref
,
getCurrentInstance
,
ComponentInternalInstance
,
computed
,
nextTick
}
from
'vue'
;
import
{
fillQuotation
,
quotationInit
}
from
'@/api/cart'
;
import
{
fillQuotation
,
quotationInit
,
getQuotationDelivery
,
getQuotationPayment
}
from
'@/api/cart'
;
import
{
onLoad
,
onReady
}
from
'@dcloudio/uni-app'
;
import
{
orderDetail
,
getTax
}
from
'@/api/index'
;
import
{
getProductLineMultipleDetail
}
from
'@/api/productLine'
;
...
...
@@ -150,6 +154,8 @@ let pickerShow = ref(false)
let
pickerShow1
=
ref
(
false
)
let
pickerDateShow
=
ref
(
false
)
let
guaranteeShow
=
ref
(
false
)
let
paymentShow
=
ref
(
false
)
let
deliveryShow
=
ref
(
false
)
let
showModel
=
ref
(
false
)
let
content
=
ref
(
'是否下载execl?'
)
let
formData
=
ref
({
...
...
@@ -209,7 +215,7 @@ let rules = ref({
message
:
'手机号码不正确'
,
trigger
:
'blur'
,
}],
deliveryAddr
:
[{
required
:
true
,
message
:
'请选择收货地
址'
,
trigger
:
'blur'
}],
deliveryAddr
:
[{
required
:
true
,
message
:
'请选择收货地
点'
,
trigger
:
[
'blur'
,
'change'
]
}],
deliveryDate
:
[{
required
:
true
,
message
:
'请选择交货时间'
,
trigger
:
'blur'
},
{
pattern
:
/^
[
+
]{0,1}(\d
+
)
$/g
,
message
:
'必须为正整数'
,
trigger
:
'blur'
}],
noOrder
:
[{
required
:
true
,
message
:
'请输入订单号'
,
trigger
:
'blur'
}],
...
...
@@ -229,6 +235,8 @@ let quotationData = ref();
let
orderId
=
ref
()
let
tax
=
ref
()
// 税率
let
lineId
=
ref
()
// 产品线id 可以分辨是产品线还是普通商品
let
paymentList
=
ref
()
// 收款方式数据
let
deliveryList
=
ref
()
// 交货地点数据
onLoad
((
options
:
any
)
=>
{
if
(
options
.
lineId
)
lineId
.
value
=
options
.
lineId
...
...
@@ -402,6 +410,14 @@ let dateConfirm = (e: any) => {
let
guaranteeConfirm
=
(
e
:
any
)
=>
{
formData
.
value
.
guarantee
=
e
[
0
].
value
}
// 选择收款方式回调
let
paymentConfirm
=
(
e
:
any
)
=>
{
formData
.
value
.
guarantee
=
e
[
0
].
value
}
// 选择交货地点回调
let
deliveryConfirm
=
(
e
:
any
)
=>
{
formData
.
value
.
guarantee
=
e
[
0
].
value
}
// 初始化数据
let
initQuotation
=
(
orderId
:
number
)
=>
{
...
...
@@ -436,9 +452,8 @@ 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
]
}
for
(
const
key
in
res
.
data
.
data
)
detailData
.
value
=
[...
res
.
data
.
data
[
key
],
...
detailData
.
value
]
// 从quotationData获取 在detailData中添加 合同报价字段
if
(
quotationData
.
value
)
{
detailData
.
value
.
map
((
detail
:
any
)
=>
{
...
...
@@ -475,6 +490,28 @@ let initTax = () => {
if
(
res
.
data
.
code
===
200
)
tax
.
value
=
Number
(
res
.
data
.
data
.
mall_tax_rate
);
});
};
// 交货地点
let
initQuotationDelivery
=
()
=>
{
getQuotationDelivery
().
then
((
res
:
any
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
paymentList
.
value
=
res
.
data
.
data
console
.
log
(
res
.
data
.
data
,
'交货地点'
);
}
})
}
initQuotationDelivery
()
// 收款条件
let
initQuotationPayment
=
()
=>
{
getQuotationPayment
().
then
((
res
:
any
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
deliveryList
.
value
=
res
.
data
.
data
console
.
log
(
res
.
data
.
data
,
'收款条件'
);
}
})
}
initQuotationPayment
()
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论