提交 14244f6d 作者: 曹云

改-设备租赁,产品商城-详情-提交订单-添加判断

上级 e820e7cc
...@@ -43,7 +43,13 @@ export default function OrderForGoods(props: PropsBox) { ...@@ -43,7 +43,13 @@ export default function OrderForGoods(props: PropsBox) {
setValue(index) setValue(index)
} }
const detailSumbit = () => { const detailSumbit = () => {
if (detailData && shopDetail && list && wareSkuList) { if (!list?.length)
return message.warning('暂无地址信息,请前往云享飞添加地址')
console.log(value !== 0)
if (list?.length && !value && value !== 0)
return message.warning('请选择地址')
if (detailData && shopDetail && list?.length && wareSkuList) {
const pushList = { const pushList = {
actualPay: actualPay:
discount?.specPrice[0]?.price! * shopDetail?.num! * days! || 0, discount?.specPrice[0]?.price! * shopDetail?.num! * days! || 0,
...@@ -52,7 +58,7 @@ export default function OrderForGoods(props: PropsBox) { ...@@ -52,7 +58,7 @@ export default function OrderForGoods(props: PropsBox) {
'YYYY-MM-DD' 'YYYY-MM-DD'
), ),
orderReceipt: { orderReceipt: {
detailAddress: list[value]?.takeAddress, detailAddress: list[value].takeAddress,
receiptMethod: 0, receiptMethod: 0,
region: list[value].takeRegion, region: list[value].takeRegion,
takeName: list[value].takeName, takeName: list[value].takeName,
......
...@@ -95,7 +95,7 @@ export default function IntentionModal(props: Props) { ...@@ -95,7 +95,7 @@ export default function IntentionModal(props: Props) {
}) })
.then((res) => { .then((res) => {
if (res.code == '200') { if (res.code == '200') {
message.success('提交意向成功') // message.success('提交意向成功')
//重置为未选中 //重置为未选中
let temp = { let temp = {
......
...@@ -43,8 +43,10 @@ export default function OrderForGoods(props: PropsBox) { ...@@ -43,8 +43,10 @@ export default function OrderForGoods(props: PropsBox) {
setValue(index) setValue(index)
} }
const detailSumbit = () => { const detailSumbit = () => {
if (!list?.length && !value) return message.warning('暂无地址信息') if (!list?.length)
if (list?.length && !value) return message.warning('请选择地址') return message.warning('暂无地址信息,请前往云享飞添加地址')
if (list?.length && !value && value !== 0)
return message.warning('请选择地址')
if (detailData && list && mallDetail) { if (detailData && list && mallDetail) {
const pushList = { const pushList = {
buyNum: mallDetail.buyNum, buyNum: mallDetail.buyNum,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论