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
8c65f22b
提交
8c65f22b
authored
12月 01, 2022
作者:
刘旭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化
上级
b7f30a93
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
98 行增加
和
63 行删除
+98
-63
index.vue
src/pages/cart/index.vue
+92
-50
quotation.vue
src/pages/order/quotation.vue
+6
-13
没有找到文件。
src/pages/cart/index.vue
浏览文件 @
8c65f22b
...
...
@@ -10,27 +10,34 @@
<view
v-if=
"cartList.length > 0"
style=
"width: 100%; display:flex; margin-top: 10rpx;"
>
<u-checkbox-group
@
change=
"checkboxGroupChange"
style=
"width: 100%; display:flex"
>
<block
v-for=
"(item, index) in cartList"
:key=
"item.id"
>
<view
class=
"group-item"
>
<view
class=
"item"
>
<u-checkbox
:name=
"item.id"
v-model=
"item.checked"
shape=
"circle"
></u-checkbox>
<u-image
v-if=
"type === 0"
width=
"140rpx"
height=
"200rpx"
:src=
"
item.picUrl?.split('http').length > 1
? item.picUrl
: baseUrl + item.picUrl
"
class=
"img"
></u-image>
<view
class=
"details"
>
<view
v-if=
"item.isSubmit"
class=
"group-item"
>
<u-row
class=
"item"
>
<u-col
:span=
"1"
>
<u-checkbox
:name=
"item.id"
v-model=
"item.checked"
shape=
"circle"
></u-checkbox>
</u-col>
<u-col
:span=
"3"
>
<u-image
v-if=
"type === 0"
width=
"140rpx"
height=
"200rpx"
:src=
"
item.picUrl?.split('http').length > 1
? item.picUrl
: baseUrl + item.picUrl
"
class=
"img"
></u-image>
</u-col>
<u-col
:span=
"delCircle ? 7 : 5"
class=
"details"
>
<view>
{{ item.goodsName }}
</view>
<view
class=
"b-tag"
>
<view
class=
"b-tag"
:style=
"delCircle ? 'margin-bottom: 26%;' : 'margin-bottom: 40%;'"
>
<block
v-for=
"(item1, index1) in item.specifications?.length"
:key=
"index1"
...
...
@@ -43,19 +50,63 @@
/>
</block>
</view>
<!-- <view style="font-weight: bold;">¥{{ item.price }}</view> -->
</view>
</view>
<view
v-if=
"delCircle"
class=
"circle"
@
tap=
"deleteCart(index)"
>
<view
class=
"horizontal"
></view>
</view>
<view
v-else
class=
"number-box"
>
<u-number-box
v-model=
"item.number"
:min=
"1"
disabled-input
@
change=
"valChange($event, item)"
></u-number-box>
</u-col>
<u-col
v-if=
"delCircle"
:span=
"1"
>
<view
class=
"circle"
@
tap=
"deleteCart(index)"
>
<view
class=
"horizontal"
></view>
</view>
</u-col>
<u-col
v-else
:span=
"3"
style=
"margin-top: 20%;"
>
<view
class=
"number-box"
>
<u-number-box
v-model=
"item.number"
:min=
"1"
disabled-input
@
change=
"valChange($event, item)"
></u-number-box>
</view>
</u-col>
</u-row>
</view>
<!-- 失效商品数据 -->
<view
v-else
class=
"group-item"
>
<view
class=
"item"
>
<u-row>
<u-col
:span=
"1"
>
<u-checkbox
:name=
"item.id"
:disabled=
"!item.isSubmit && !delCircle"
v-model=
"item.checked"
shape=
"circle"
></u-checkbox>
</u-col>
<u-col
:span=
"3"
>
<u-image
v-if=
"type === 0"
width=
"140rpx"
height=
"200rpx"
:src=
"
item.picUrl?.split('http').length > 1
? item.picUrl
: baseUrl + item.picUrl
"
class=
"img"
></u-image>
</u-col>
<u-col
:span=
"7"
>
<view
class=
"details"
>
<view>
{{ item.goodsName }}
</view>
<view
style=
"color: #ccc; margin-top: 20%;"
>
{{ item.message }}
</view>
</view>
</u-col>
<u-col
:span=
"1"
>
<view
v-if=
"delCircle"
class=
"circle"
@
tap=
"deleteCart(index)"
>
<view
class=
"horizontal"
></view>
</view>
</u-col>
</u-row>
</view>
</view>
</block>
...
...
@@ -350,27 +401,19 @@ onShow(() => {
<
style
lang=
"scss"
scoped
>
.group-item
{
width
:
100%
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
padding
:
15rpx
;
margin-bottom
:
10rpx
;
background-color
:
#fff
;
.item
{
.details
{
width
:
55%
;
display
:
flex
;
justify-content
:
flex-start
;
.details
{
width
:
55%
;
flex-direction
:
column
;
align-items
:
self-start
!
important
;
margin-left
:
20rpx
;
.b-tag
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
flex-start
;
margin-left
:
20rpx
;
.b-tag
{
display
:
flex
;
flex-direction
:
row
;
margin-bottom
:
40%
;
flex-wrap
:
wrap
;
}
flex-direction
:
row
;
flex-wrap
:
wrap
;
}
}
.circle
{
...
...
@@ -397,7 +440,6 @@ onShow(() => {
display
:
flex
;
flex-direction
:
column
;
justify-content
:
flex-end
;
margin-top
:
20%
;
}
}
...
...
src/pages/order/quotation.vue
浏览文件 @
8c65f22b
...
...
@@ -161,8 +161,7 @@ let rules = ref({
}],
deliveryAddr
:
[{
required
:
true
,
message
:
'请选择收货地址'
,
trigger
:
'blur'
}],
deliveryDate
:
[{
required
:
true
,
message
:
'请选择交货时间'
,
trigger
:
'blur'
},
{
pattern
:
/^
[
1-9
]\d
*|0$/
,
message
:
'不能为负数'
,
trigger
:
'blur'
},
{
type
:
'integer'
,
message
:
'不能为小数'
,
trigger
:
'blur'
}],
{
pattern
:
/^
[
+
]{0,1}(\d
+
)
$/g
,
message
:
'必须为正整数'
,
trigger
:
'blur'
}],
noOrder
:
[{
required
:
true
,
message
:
'请输入订单号'
,
trigger
:
'blur'
}],
pay
:
[{
required
:
true
,
message
:
'请输入付款方式'
,
trigger
:
'blur'
}],
guarantee
:
[{
required
:
true
,
message
:
'请输入保修'
,
trigger
:
'blur'
}],
...
...
@@ -171,9 +170,9 @@ let rules = ref({
});
let
guaranteeList
=
ref
([
{
value
:
'1年'
,
label
:
'1年'
},
{
value
:
'2年'
,
label
:
'2年'
},
{
value
:
'其他'
,
label
:
'其他'
}
{
value
:
'1年'
,
label
:
'1年'
},
{
value
:
'2年'
,
label
:
'2年'
},
{
value
:
'其他'
,
label
:
'其他'
}
])
let
uFormRef
=
ref
();
...
...
@@ -192,12 +191,6 @@ onReady(() => {
uFormRef
.
value
?.
setRules
(
rules
.
value
);
})
// 打开单价popup
// let fillIn = () => {
// if(!quotationData.value.items) return
// orderRef.value.form = quotationData.value.items
// orderRef.value.show = true
// }
let
submit
=
()
=>
{
uFormRef
.
value
?.
validate
((
valid
:
any
,
err
:
any
)
=>
{
...
...
@@ -214,7 +207,6 @@ let submit = () => {
items
:
quotationData
.
value
.
items
,
quotation
:
formData
.
value
,
};
console
.
log
(
data
,
'submit'
);
fillQuotation
(
data
).
then
((
res
:
any
)
=>
{
if
(
res
.
data
.
code
===
200
)
showModel
.
value
=
true
});
...
...
@@ -246,7 +238,7 @@ let modelConfirm = () => {
// 点击取消按钮
let
modelCancel
=
()
=>
{
uni
.
re
directTo
({
uni
.
re
Launch
({
url
:
'./editQuotation?orderId='
+
orderId
.
value
})
}
...
...
@@ -291,6 +283,7 @@ let initQuotation = (orderId: number) => {
let
initQuotationOrder
=
(
orderId
:
number
)
=>
{
quotationOrder
({
orderId
}).
then
((
res
:
any
)
=>
{
if
(
res
.
data
.
data
)
{
// res.data.data.id = null
formData
.
value
=
res
.
data
.
data
}
})
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论