问题修复
This commit is contained in:
parent
6894858e7f
commit
3e5232c296
|
|
@ -2,26 +2,31 @@
|
|||
<!-- 装修卡片 -->
|
||||
<view class="items-card">
|
||||
<van-image fit="cover" :src="goodsInfo.picUrl" />
|
||||
|
||||
<view class="goods-info">
|
||||
<view class="device-title">
|
||||
<text> {{ goodsInfo.deviceName }} </text>
|
||||
<text> ({{ goodsInfo.typeName }}) </text>
|
||||
<van-text-ellipsis :content="goodsInfo.deviceName" />
|
||||
</view>
|
||||
<view>
|
||||
<van-text-ellipsis :content="`(${goodsInfo.typeName})`" />
|
||||
</view>
|
||||
|
||||
<view class="address-box">
|
||||
<text>{{ goodsInfo.companyName }}</text>
|
||||
<van-text-ellipsis :content="`${goodsInfo.companyName}`" />
|
||||
</view>
|
||||
<view> {{ goodsInfo.companyName }}</view>
|
||||
<view class="flex-row-start phone-price">
|
||||
|
||||
<view>
|
||||
<van-text-ellipsis :content="`${goodsInfo.companyName}`" />
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
<van-icon name="phone-o" />
|
||||
{{ goodsInfo.personPhone }}
|
||||
</view>
|
||||
<view class="price-box">
|
||||
<text>¥</text>
|
||||
<text class="price">{{ goodsInfo.dayLeasePrice }}</text>
|
||||
<text>/日</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="price-box">
|
||||
<text>¥</text>
|
||||
<text class="price">{{ goodsInfo.dayLeasePrice }}</text>
|
||||
<text>/日</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -43,13 +48,17 @@ const props = defineProps({
|
|||
width: 100%;
|
||||
font-size: 12px;
|
||||
background-color: #f9f9f9;
|
||||
border-radius: 12px;
|
||||
margin-top: 8px;
|
||||
|
||||
.goods-info {
|
||||
flex: 1;
|
||||
padding: 4px 6px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.van-image {
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
view {
|
||||
padding: 3px 0;
|
||||
|
|
@ -58,15 +67,18 @@ const props = defineProps({
|
|||
color: #636262;
|
||||
}
|
||||
|
||||
.device-title text:first-child {
|
||||
.device-title {
|
||||
color: #000;
|
||||
font-size: 16px;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.address-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
border: 1px solid $el-color-primary;
|
||||
box-sizing: border-box;
|
||||
color: $el-color-primary;
|
||||
|
||||
text {
|
||||
width: 100%;
|
||||
|
|
@ -81,20 +93,26 @@ const props = defineProps({
|
|||
}
|
||||
}
|
||||
|
||||
.price-box {
|
||||
color: #fe4700;
|
||||
.price {
|
||||
margin: 0 1px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.phone-price {
|
||||
justify-content: space-between;
|
||||
|
||||
.price-box {
|
||||
color: #fe4700;
|
||||
.price {
|
||||
margin: 0 1px;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
view {
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.van-image__img) {
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@
|
|||
<text> ({{ amountNum }}) </text>
|
||||
</view>
|
||||
<van-button
|
||||
round
|
||||
style="padding: 0 20px"
|
||||
style="padding: 10px 20px"
|
||||
type="primary"
|
||||
size="mini"
|
||||
class="primary-lease"
|
||||
@click="onClickManage"
|
||||
>
|
||||
管理
|
||||
{{ isCartManage ? '退出管理' : '管理' }}
|
||||
</van-button>
|
||||
</view>
|
||||
|
||||
|
|
@ -22,13 +22,11 @@
|
|||
<view class="order-set" v-for="(item, index) in cartList" :key="index">
|
||||
<van-row>
|
||||
<van-col span="2">
|
||||
<van-checkbox-group
|
||||
<van-checkbox
|
||||
v-model="item.isChecked"
|
||||
icon-size="16px"
|
||||
@click="onChangeAllCheckbox(index)"
|
||||
>
|
||||
<van-checkbox name="1"> </van-checkbox>
|
||||
</van-checkbox-group>
|
||||
@change="onChangeAllCheckbox($event, index)"
|
||||
/>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<view class="company-box">
|
||||
|
|
@ -45,21 +43,21 @@
|
|||
</view>
|
||||
</van-col>
|
||||
<van-col span="10" class="contacts">
|
||||
联系人: {{ item.companyPersonPhoneKey.person }}
|
||||
{{ item.companyPersonPhoneKey.personPhone }}
|
||||
<view> 联系人: {{ item.companyPersonPhoneKey.person }} </view>
|
||||
<view>
|
||||
{{ item.companyPersonPhoneKey.personPhone }}
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<view v-for="(goods, i) in item.devInfoVoList" :key="i">
|
||||
<van-row>
|
||||
<van-col span="2">
|
||||
<van-checkbox-group
|
||||
<van-checkbox
|
||||
v-model="goods.isChecked"
|
||||
icon-size="16px"
|
||||
@click="onChangeCheckbox(index)"
|
||||
>
|
||||
<van-checkbox name="1"> </van-checkbox>
|
||||
</van-checkbox-group>
|
||||
@click="onChangeCheckbox($event, index)"
|
||||
/>
|
||||
</van-col>
|
||||
<van-col span="22">
|
||||
<view class="items-info">
|
||||
|
|
@ -73,17 +71,31 @@
|
|||
<view style="color: #000">{{ goods.deviceName }}</view>
|
||||
<view>装备编号:{{ goods.code }}</view>
|
||||
<view>装备型号:{{ goods.typeName }}</view>
|
||||
<view style="display: flex; align-items: center">
|
||||
租赁金额:
|
||||
<view
|
||||
style="
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
"
|
||||
>
|
||||
<text style="color: var(--van-submit-bar-price-color)">
|
||||
¥{{ goods.dayLeasePrice }}/天
|
||||
租赁金额:¥{{ goods.dayLeasePrice }}/天
|
||||
</text>
|
||||
|
||||
<van-stepper
|
||||
style="margin-left: 20px"
|
||||
button-size="16"
|
||||
:max="goods.deviceCount"
|
||||
v-model="goods.num"
|
||||
v-if="!isCartManage"
|
||||
/>
|
||||
|
||||
<van-icon
|
||||
v-else
|
||||
name="delete"
|
||||
size="18"
|
||||
@click="onDeleteCartGoods(goods.id)"
|
||||
color="var(--van-submit-bar-price-color)"
|
||||
/>
|
||||
</view>
|
||||
<view class="items-info">
|
||||
|
|
@ -111,23 +123,26 @@
|
|||
</view>
|
||||
</view>
|
||||
</van-col>
|
||||
<!-- <van-col span="5">
|
||||
|
||||
</van-col> -->
|
||||
</van-row>
|
||||
|
||||
<van-row style="margin-top: 14px">
|
||||
总金额:
|
||||
<view style="color: var(--van-submit-bar-price-color)">
|
||||
<text> ¥ </text>
|
||||
<text style="font-size: 16px; font-weight: bold">
|
||||
{{ goods.num * goods.dayLeasePrice * goods.days }}
|
||||
</text>
|
||||
</view>
|
||||
</van-row>
|
||||
<view
|
||||
style="
|
||||
margin-top: 14px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
"
|
||||
>
|
||||
<text> 总金额: </text>
|
||||
|
||||
<text style="font-weight: bold; color: var(--van-submit-bar-price-color)">
|
||||
{{ goods.num * goods.dayLeasePrice * goods.days }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<van-row style="padding: 10px 0; margin-top: 10px; border-top: 1px solid #ccc">
|
||||
<van-checkbox-group
|
||||
<!-- <van-checkbox-group
|
||||
v-model="item.protocolChecked"
|
||||
shape="square"
|
||||
icon-size="16px"
|
||||
|
|
@ -138,7 +153,14 @@
|
|||
《xxx公司协议》
|
||||
</text>
|
||||
</van-checkbox>
|
||||
</van-checkbox-group>
|
||||
|
||||
|
||||
</van-checkbox-group> -->
|
||||
|
||||
<van-checkbox v-model="item.protocolChecked" icon-size="16px">
|
||||
我已阅读并同意
|
||||
<text class="protocol" @click.stop="onViewProtocol"> 《xxx公司协议》 </text>
|
||||
</van-checkbox>
|
||||
</van-row>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
|
@ -168,6 +190,7 @@
|
|||
button-text="提交"
|
||||
:price="totalPrice"
|
||||
@submit="onSubmitOrder"
|
||||
v-if="!isCartManage"
|
||||
>
|
||||
<template #default>
|
||||
<view class="amount"> 共计 {{ amountDevice }} 件装备 </view>
|
||||
|
|
@ -178,6 +201,17 @@
|
|||
</text>
|
||||
</template>
|
||||
</van-submit-bar>
|
||||
|
||||
<van-submit-bar
|
||||
button-color="#579d92"
|
||||
button-text="删除"
|
||||
@submit="onDeleteCart"
|
||||
v-if="isCartManage"
|
||||
>
|
||||
<template #default>
|
||||
<van-checkbox v-model="checkedAll" @change="onChangeDelete">全选</van-checkbox>
|
||||
</template>
|
||||
</van-submit-bar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -188,7 +222,13 @@ import cartImg from '@/static/cart/cart.png'
|
|||
import dateIcon from '@/static/goods/date-icon.png'
|
||||
import { computed, nextTick, ref } from 'vue'
|
||||
import { onHide, onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import { getBookCarDetailsAPI, getAddressListAPI, submitBookCarAPI } from '@/services/cart/index.js'
|
||||
import {
|
||||
getBookCarDetailsAPI,
|
||||
getAddressListAPI,
|
||||
submitBookCarAPI,
|
||||
deleteBookCarAPI,
|
||||
deleteBookCarByIdsAPI,
|
||||
} from '@/services/cart/index.js'
|
||||
import moment from 'moment'
|
||||
const cartList = ref([])
|
||||
const showBottom = ref(false)
|
||||
|
|
@ -203,6 +243,8 @@ const address = ref('')
|
|||
const actionBarHeight = ref()
|
||||
const chosenAddressId = ref()
|
||||
const addressList = ref([])
|
||||
const isCartManage = ref(false)
|
||||
const checkedAll = ref(false)
|
||||
const onClickLeft = () => {
|
||||
uni.showTabBar()
|
||||
uni.switchTab({
|
||||
|
|
@ -230,8 +272,8 @@ const onSubmitOrder = async () => {
|
|||
let isRead = false
|
||||
try {
|
||||
cartList.value.forEach((e) => {
|
||||
const isSelect = e.devInfoVoList.some((j) => j.isChecked?.length > 0)
|
||||
if (isSelect && e.protocolChecked.length == 0) {
|
||||
const isSelect = e.devInfoVoList.some((j) => j.isChecked === true)
|
||||
if (isSelect && !e.protocolChecked) {
|
||||
showFailToast('请阅读公司合同')
|
||||
isRead = true
|
||||
throw new Error()
|
||||
|
|
@ -264,12 +306,12 @@ const onSubmitOrder = async () => {
|
|||
cartList.value.forEach((j, index) => {
|
||||
let itemsArray = []
|
||||
j.devInfoVoList.forEach((e) => {
|
||||
if (e.isChecked?.length > 0) {
|
||||
if (e.isChecked) {
|
||||
itemsArray.push({
|
||||
maId: e.maId,
|
||||
id: e.id,
|
||||
rentBeginTime: e.rentBeginTime + '00:00:00',
|
||||
rentEndTime: e.rentEndTime + '23:59:59',
|
||||
rentBeginTime: e.rentBeginTime + ' ' + '00:00:00',
|
||||
rentEndTime: e.rentEndTime + ' ' + '23:59:59',
|
||||
manageType: e.manageType,
|
||||
days: e.days,
|
||||
num: e.num,
|
||||
|
|
@ -286,18 +328,18 @@ const onSubmitOrder = async () => {
|
|||
}
|
||||
}
|
||||
})
|
||||
|
||||
paramsList.forEach((e) => {
|
||||
e.cost = e.detailsList.reduce((accumulator, currentValue) => {
|
||||
return accumulator + currentValue.costs
|
||||
}, 0)
|
||||
})
|
||||
|
||||
console.log(paramsList, 'paramsList')
|
||||
const res = await submitBookCarAPI(paramsList)
|
||||
if (res.code === 200) {
|
||||
showSuccessToast('提交成功')
|
||||
getDeviceDetailsData()
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({ url: `/pages/order-details/index?type=2` })
|
||||
}, 500)
|
||||
// getDeviceDetailsData()
|
||||
}
|
||||
}
|
||||
const onViewProtocol = () => {}
|
||||
|
|
@ -335,6 +377,10 @@ const onConfirm = () => {
|
|||
showBottom.value = false
|
||||
leaseTime.value = []
|
||||
}
|
||||
|
||||
const onClickManage = () => {
|
||||
isCartManage.value = !isCartManage.value
|
||||
}
|
||||
const onCancel = () => {
|
||||
showBottom.value = false
|
||||
}
|
||||
|
|
@ -344,10 +390,10 @@ const getDeviceDetailsData = async () => {
|
|||
const { data: res } = await getBookCarDetailsAPI()
|
||||
cartList.value = res
|
||||
cartList.value.forEach((e) => {
|
||||
e.isChecked = []
|
||||
e.protocolChecked = []
|
||||
e.isChecked = false
|
||||
e.protocolChecked = false
|
||||
e.devInfoVoList.forEach((j) => {
|
||||
e.isChecked = []
|
||||
e.isChecked = false
|
||||
j.days = 0
|
||||
j.num = 1
|
||||
j.costs = 0
|
||||
|
|
@ -375,7 +421,7 @@ const totalPrice = computed(() => {
|
|||
let orderAmountPice = 0
|
||||
cartList.value.forEach((e) => {
|
||||
e.devInfoVoList.forEach((g) => {
|
||||
if (g.isChecked?.length > 0) {
|
||||
if (g.isChecked) {
|
||||
orderAmountPice = g.num * g.dayLeasePrice * g.days + orderAmountPice
|
||||
}
|
||||
})
|
||||
|
|
@ -397,7 +443,7 @@ const amountDeviceList = computed(() => {
|
|||
let selectList = []
|
||||
cartList.value.forEach((e) => {
|
||||
e.devInfoVoList.forEach((g) => {
|
||||
if (g.isChecked?.length > 0) {
|
||||
if (g.isChecked) {
|
||||
selectList.push(g)
|
||||
}
|
||||
})
|
||||
|
|
@ -409,7 +455,7 @@ const amountDevice = computed(() => {
|
|||
let amountNum = 0
|
||||
cartList.value.forEach((e) => {
|
||||
e.devInfoVoList.forEach((g) => {
|
||||
if (g.isChecked?.length > 0) {
|
||||
if (g.isChecked) {
|
||||
amountNum++
|
||||
}
|
||||
})
|
||||
|
|
@ -417,23 +463,21 @@ const amountDevice = computed(() => {
|
|||
return amountNum
|
||||
})
|
||||
|
||||
const onChangeAllCheckbox = (index) => {
|
||||
const onChangeAllCheckbox = (e, index) => {
|
||||
cartList.value[index].devInfoVoList.forEach((j) => {
|
||||
if (cartList.value[index].isChecked.length > 0) {
|
||||
j.isChecked = ['1']
|
||||
} else {
|
||||
j.isChecked = []
|
||||
}
|
||||
j.isChecked = e
|
||||
})
|
||||
checkedAll.value = cartList.value.every((i) => i.isChecked === true)
|
||||
}
|
||||
const onChangeCheckbox = (index) => {
|
||||
const isCheckAll = cartList.value[index].devInfoVoList.every((j) => j.isChecked.length > 0)
|
||||
console.log(isCheckAll, 'isCheckAll')
|
||||
const onChangeCheckbox = (e, index) => {
|
||||
const isCheckAll = cartList.value[index].devInfoVoList.every((j) => j.isChecked === true)
|
||||
if (isCheckAll) {
|
||||
cartList.value[index].isChecked.push('1')
|
||||
cartList.value[index].isChecked = true
|
||||
} else {
|
||||
cartList.value[index].isChecked = []
|
||||
cartList.value[index].isChecked = false
|
||||
}
|
||||
|
||||
checkedAll.value = cartList.value.every((i) => i.isChecked === true)
|
||||
}
|
||||
|
||||
// 获取底部操作栏高度 适配底部内容
|
||||
|
|
@ -449,6 +493,12 @@ const getActionBarHeight = () => {
|
|||
.exec()
|
||||
}
|
||||
|
||||
const onChangeDelete = (val) => {
|
||||
cartList.value.forEach((e) => {
|
||||
e.isChecked = val
|
||||
})
|
||||
}
|
||||
|
||||
// 选择地址
|
||||
const onClickLink = () => {
|
||||
showBottomAddress.value = true
|
||||
|
|
@ -458,6 +508,45 @@ const onClickAddress = (res) => {
|
|||
showBottomAddress.value = false
|
||||
}
|
||||
|
||||
// 删除 底部操作
|
||||
const onDeleteCart = () => {
|
||||
showConfirmDialog({
|
||||
title: '温馨提示',
|
||||
message: '是否确定删除这条预约车记录',
|
||||
})
|
||||
.then(async () => {
|
||||
let ids = []
|
||||
cartList.value.forEach((e) => {
|
||||
e.devInfoVoList.forEach((j) => {
|
||||
if (j.isChecked) {
|
||||
ids.push(j.id)
|
||||
}
|
||||
})
|
||||
})
|
||||
const res = await deleteBookCarByIdsAPI({ ids })
|
||||
if (res.code === 200) {
|
||||
showSuccessToast('删除成功')
|
||||
getDeviceDetailsData()
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
|
||||
const onDeleteCartGoods = (id) => {
|
||||
showConfirmDialog({
|
||||
title: '温馨提示',
|
||||
message: '是否确定删除这条预约车记录',
|
||||
})
|
||||
.then(async () => {
|
||||
const res = await deleteBookCarAPI({ id })
|
||||
if (res.code === 200) {
|
||||
showSuccessToast('删除成功')
|
||||
getDeviceDetailsData()
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
nextTick(() => {
|
||||
getActionBarHeight()
|
||||
|
|
@ -543,10 +632,12 @@ onHide(() => {
|
|||
|
||||
.items-info {
|
||||
display: flex;
|
||||
|
||||
align-items: center;
|
||||
|
||||
.info {
|
||||
font-size: 12px;
|
||||
flex: 1;
|
||||
|
||||
view {
|
||||
padding: 1px 0 1px 10px;
|
||||
|
|
@ -573,4 +664,7 @@ onHide(() => {
|
|||
:deep(.van-address-item__edit) {
|
||||
display: none;
|
||||
}
|
||||
:deep(.van-submit-bar__bar) {
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,119 +1,183 @@
|
|||
<template>
|
||||
<!-- 需求详情 -->
|
||||
<view class="h5-container">
|
||||
<Navbar :navTitle="`需求详情`" />
|
||||
<view class="h5-container demand-details-container">
|
||||
<!-- <Navbar :navTitle="`需求详情`" /> -->
|
||||
<view
|
||||
style="
|
||||
padding: 15px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
"
|
||||
>
|
||||
<view>
|
||||
<van-icon name="arrow-left" @click="onClickLeft" />
|
||||
<text style="color: #000"> 需求详情 </text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view scroll-y :style="{ paddingBottom: actionBarHeight + 'px' }">
|
||||
<view class="swiper-container">
|
||||
<van-swipe
|
||||
:autoplay="5000"
|
||||
lazy-render
|
||||
:show-indicators="false"
|
||||
@change="onSwiperChange"
|
||||
>
|
||||
<van-swipe-item v-for="image in images" :key="image.id">
|
||||
<van-image fit="cover" position="center" :src="image" />
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
<view class="count-tip"> {{ activeIndex }}/{{ goodsPicCount }} </view>
|
||||
</view>
|
||||
|
||||
<view class="demand-details">
|
||||
<view class="goods-name card-style">
|
||||
<view class="box_1">
|
||||
<!-- <view class="box_1">
|
||||
<text style="color: #2cb0a0"> {{ deviceInfo.deviceName }} </text>
|
||||
<view style="color: #fff">
|
||||
<text class="no-bold">¥</text>
|
||||
<text> {{ deviceInfo.dayLeasePrice }}</text>
|
||||
<text class="no-bold">/天 </text>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="count-down">
|
||||
剩余:
|
||||
<van-count-down :time="demandDetails.countDownTime">
|
||||
<template #default="timeData">
|
||||
<text class="block">
|
||||
{{ timeData.days > 10 ? timeData.days : '0' + timeData.days }}
|
||||
</text>
|
||||
<text class="colon">天</text>
|
||||
<text class="block">
|
||||
{{
|
||||
timeData.hours > 10 ? timeData.hours : '0' + timeData.hours
|
||||
}}
|
||||
</text>
|
||||
<text class="colon">时</text>
|
||||
<text class="block"
|
||||
>{{
|
||||
timeData.minutes > 10
|
||||
? timeData.minutes
|
||||
: '0' + timeData.minutes
|
||||
}}
|
||||
</text>
|
||||
<text class="colon">分</text>
|
||||
</template>
|
||||
</van-count-down>
|
||||
</view>
|
||||
<view class="text-right">
|
||||
{{ deviceInfo.personPhone }} <van-icon name="phone-o"
|
||||
/></view>
|
||||
{{ demandDetails.personPhone }} <van-icon name="phone-o" />
|
||||
</view>
|
||||
<view class="text-right">
|
||||
<text> 发布时间:{{ deviceInfo.createTime?.slice(0, 10) }} </text>
|
||||
<text> 更新时间:{{ deviceInfo.updateTime?.slice(0, 10) }}</text>
|
||||
<text> 浏览次数:{{ deviceInfo.searchNum }} </text>
|
||||
<text> 所属公司:{{ demandDetails.companyName }}</text>
|
||||
</view>
|
||||
<view class="text-right">
|
||||
<text>
|
||||
所属地市:{{
|
||||
`${demandDetails.provinceName}${demandDetails.cityName}${demandDetails.areaName}${demandDetails.address}`
|
||||
}}</text
|
||||
>
|
||||
</view>
|
||||
<view class="text-right">
|
||||
<text> 租赁开始日期:{{ demandDetails.leaseStartTime }}</text>
|
||||
</view>
|
||||
<view class="text-right">
|
||||
<text> 租赁结束日期:{{ demandDetails.leaseEndTime }}</text>
|
||||
</view>
|
||||
|
||||
<view class="text-right">
|
||||
<text> 发布时间:{{ demandDetails.startTime }} </text>
|
||||
</view>
|
||||
<view class="text-right">
|
||||
<text> 截止时间:{{ demandDetails.endTime }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card-style goods-company">
|
||||
<h4>安徽送变电公司</h4>
|
||||
<h4>{{ demandDetails.leaseName }}</h4>
|
||||
<view>
|
||||
<text> 入驻时间:{{ deviceInfo.companyCreateTime }} </text>
|
||||
<text> 上架数量:{{ deviceInfo.devUapNum }} </text>
|
||||
<text> 访问量:{{ deviceInfo.companyVisitNum }} </text>
|
||||
<text> 预估总数量:{{ demandDetails.searchNum }} </text>
|
||||
<text> 预估天数{{ demandDetails.leaseDay }} </text>
|
||||
</view>
|
||||
<view>
|
||||
<van-icon name="location-o" />
|
||||
<text> 合肥市 </text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card-style demand-list">
|
||||
<view>
|
||||
<text> 1 </text>
|
||||
<text> 装备 </text>
|
||||
<text> 1 </text>
|
||||
<text>
|
||||
需求编号:
|
||||
{{ demandDetails.leaseCode }}
|
||||
</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>装备类目:</text>
|
||||
<text>预估数量:</text>
|
||||
<text>
|
||||
联系人:
|
||||
{{ demandDetails.person }}
|
||||
</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>
|
||||
需求描述:
|
||||
{{ demandDetails.description }}
|
||||
</text>
|
||||
</view>
|
||||
|
||||
<van-grid style="margin-top: 10px" :gutter="6" :column-num="2">
|
||||
<van-grid-item v-for="value in 8" :key="value">
|
||||
<van-image
|
||||
fit="cover"
|
||||
src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
|
||||
/>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</view>
|
||||
|
||||
<view class="card-style order-taking">
|
||||
<view
|
||||
class="card-style demand-list"
|
||||
v-for="(item, index) in demandDetails.detailsList"
|
||||
:key="item.id"
|
||||
>
|
||||
<view class="count-title">
|
||||
<text></text>
|
||||
<text style="font-weight: bold">装备{{ index + 1 }}</text>
|
||||
</view>
|
||||
|
||||
<van-cell-group inset>
|
||||
<van-cell title="装备类目:" :value="item.groupName" />
|
||||
<van-cell title="预估数量:" :value="item.leaseNum" />
|
||||
<van-cell title="装备描述:" :value="item.description" />
|
||||
</van-cell-group>
|
||||
</view>
|
||||
|
||||
<view class="card-style order-taking" v-if="demandDetails.leaseStatus != 0">
|
||||
<view class="order-taking-th">
|
||||
<view style="width: 20%">接单人</view>
|
||||
<view style="width: 40%">接单联系电话</view>
|
||||
<view style="width: 30%">接单公司</view>
|
||||
<view style="width: 30%"> 接单时间 </view>
|
||||
</view>
|
||||
<view class="order-taking-td">
|
||||
<view style="width: 20%">接单人</view>
|
||||
<view style="width: 40%">接单联系电话</view>
|
||||
<view style="width: 30%">接单公司</view>
|
||||
<view style="width: 30%"> 接单时间 </view>
|
||||
</view>
|
||||
<view class="order-taking-td">
|
||||
<view style="width: 20%">接单人</view>
|
||||
<view style="width: 40%">接单联系电话</view>
|
||||
<view style="width: 30%">接单公司</view>
|
||||
<view style="width: 30%"> 接单时间 </view>
|
||||
<view
|
||||
class="order-taking-td"
|
||||
v-for="(item, index) in acceptOrders"
|
||||
:key="index"
|
||||
>
|
||||
<view style="width: 20%">{{ item.orderUser }}</view>
|
||||
<view style="width: 40%">{{ item.orderPhone }}</view>
|
||||
<view style="width: 30%">{{ item.orderCompanyName }}</view>
|
||||
<view style="width: 30%"> {{ item.orderTime }} </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<van-action-bar>
|
||||
<van-action-bar-icon icon="chat-o" text="在线聊" />
|
||||
<van-action-bar-button text="立即接单" color="#22ab9b" @click="onReceivingOrders" />
|
||||
<van-action-bar v-if="memberStore.userType === 2">
|
||||
<!-- <van-action-bar-icon icon="chat-o" text="在线聊" /> -->
|
||||
<van-action-bar-button
|
||||
text="立即接单"
|
||||
color="#22ab9b"
|
||||
@click="onReceivingOrders"
|
||||
:disabled="memberStore.userInfo.companyId == demandDetails.publishCompany"
|
||||
/>
|
||||
</van-action-bar>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Navbar from '@/components/Navbar/index'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { nextTick, ref } from 'vue'
|
||||
import { getDemandDetailsByIdAPI } from '@/services/demand/index.js'
|
||||
import { useMemberStore } from '@/stores/index.js'
|
||||
const memberStore = useMemberStore()
|
||||
import moment from 'moment'
|
||||
const activeIndex = ref(1)
|
||||
const goodsPicCount = ref(2)
|
||||
const deviceInfo = ref({})
|
||||
const actionBarHeight = ref(0)
|
||||
const images = ref([
|
||||
'https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg',
|
||||
'https://fastly.jsdelivr.net/npm/@vant/assets/apple-2.jpeg',
|
||||
])
|
||||
const acceptOrders = ref([])
|
||||
|
||||
const demandDetails = ref({})
|
||||
|
||||
const onClickLeft = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
const onSwiperChange = (e) => {
|
||||
activeIndex.value = e + 1
|
||||
}
|
||||
|
|
@ -132,7 +196,16 @@ const getActionBarHeight = () => {
|
|||
.exec()
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
onLoad(async (options) => {
|
||||
const { data: res } = await getDemandDetailsByIdAPI({ id: options?.id })
|
||||
const { orderCompany, orderPhone, orderTime, orderUser } = res
|
||||
acceptOrders.value.push({ orderCompany, orderPhone, orderTime, orderUser })
|
||||
demandDetails.value = res
|
||||
const nowTime = moment()
|
||||
demandDetails.value.countDownTime =
|
||||
moment
|
||||
.duration(moment(demandDetails.value.endTime, 'YYYY-MM-DD HH:mm:ss').diff(nowTime))
|
||||
.asSeconds() * 1000
|
||||
nextTick(() => {
|
||||
getActionBarHeight()
|
||||
})
|
||||
|
|
@ -143,6 +216,13 @@ onLoad(() => {
|
|||
:deep(.van-nav-bar .van-icon) {
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
.demand-details-container {
|
||||
padding: 10px;
|
||||
color: #333;
|
||||
box-sizing: border-box;
|
||||
background: linear-gradient(to bottom, #c0e9ce, #e4f2f2, #f9f9f9);
|
||||
}
|
||||
.swiper-container {
|
||||
position: relative !important;
|
||||
.count-tip {
|
||||
|
|
@ -157,9 +237,9 @@ onLoad(() => {
|
|||
}
|
||||
|
||||
.demand-details {
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
background: linear-gradient(to bottom, #bfdfdb, #f9f9f9, #fff);
|
||||
// padding: 10px;
|
||||
// box-sizing: border-box;
|
||||
// background: linear-gradient(to bottom, #bfdfdb, #f9f9f9, #fff);
|
||||
|
||||
.card-style {
|
||||
width: 97%;
|
||||
|
|
@ -167,6 +247,7 @@ onLoad(() => {
|
|||
border-radius: 6px;
|
||||
padding: 8px 12px;
|
||||
box-sizing: border-box;
|
||||
font-size: 16px;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.goods-name {
|
||||
|
|
@ -232,4 +313,31 @@ onLoad(() => {
|
|||
:deep(.van-action-bar) {
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.count-title text:first-child {
|
||||
display: inline-block;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 5px;
|
||||
background-color: #ff660f;
|
||||
margin-right: 8px;
|
||||
font-size: 16px;
|
||||
}
|
||||
:deep(.van-cell-group--inset) {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.count-down {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
color: #ee0a24;
|
||||
font-size: 13px;
|
||||
|
||||
.van-count-down {
|
||||
color: #ee0a24;
|
||||
letter-spacing: 1px;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -147,15 +147,14 @@
|
|||
</van-field>
|
||||
<van-field
|
||||
v-model="item.description"
|
||||
name="密码"
|
||||
label="装备描述"
|
||||
placeholder="请输入装备描述"
|
||||
/>
|
||||
<van-field name="uploader" label="参考图片/样式">
|
||||
<!-- <van-field name="uploader" label="参考图片/样式">
|
||||
<template #input>
|
||||
<van-uploader v-model="item.fileInfoList" />
|
||||
<UploadFile v-model:fileInfoList="item.fileInfoList" />
|
||||
</template>
|
||||
</van-field>
|
||||
</van-field> -->
|
||||
|
||||
<view style="margin: 16px" v-if="index !== 0">
|
||||
<van-button
|
||||
|
|
@ -216,13 +215,13 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue'
|
||||
import { areaList } from '@vant/area-data'
|
||||
import Navbar from '@/components/Navbar/index'
|
||||
import { getEquipmentTypeAPI } from '@/services/common/index.js'
|
||||
import { addLeaseInfoAPI } from '@/services/demand/index.js'
|
||||
import Navbar from '@/components/Navbar/index'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { areaList } from '@vant/area-data'
|
||||
import moment from 'moment'
|
||||
import { reactive, ref } from 'vue'
|
||||
const minDate = new Date(moment().format('YYYY'), moment().format('MM') - 1, moment().format('DD'))
|
||||
const maxDate = new Date(moment().format('YYYY') * 1 + 100, 12, 31)
|
||||
const showArea = ref(false)
|
||||
|
|
@ -264,7 +263,7 @@ const demandDetails = ref([
|
|||
typeId: '',
|
||||
typeName: '',
|
||||
leaseNum: 1,
|
||||
fileInfoList: [],
|
||||
// fileInfoList: [],
|
||||
description: '',
|
||||
},
|
||||
])
|
||||
|
|
@ -276,7 +275,7 @@ const onAddDemand = () => {
|
|||
typeId: '',
|
||||
typeName: '',
|
||||
leaseNum: 1,
|
||||
fileInfoList: [],
|
||||
// fileInfoList: [],
|
||||
description: '',
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@
|
|||
</view>
|
||||
|
||||
<view class="card-style goods-details">
|
||||
<h3>装备详情</h3>
|
||||
<h4>装备详情</h4>
|
||||
<view v-for="item in goodsLabel" :key="item.goods_label">
|
||||
<text> {{ item.goods_label }}:{{ deviceInfo[item.label_content] }}</text>
|
||||
<text> {{ item.goods_label }}{{ deviceInfo[item.label_content] }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,23 @@
|
|||
<template>
|
||||
<!-- 装备共享大厅 -->
|
||||
<view class="h5-container">
|
||||
<view class="h5-container goods-list">
|
||||
<!-- <Navbar :navTitle="`装备共享大厅`" /> -->
|
||||
<van-nav-bar title="装备共享大厅" left-text="返回" left-arrow @click-left="onClickLeft" />
|
||||
<!-- <van-nav-bar title="装备共享大厅" left-text="返回" left-arrow @click-left="onClickLeft" /> -->
|
||||
|
||||
<view
|
||||
class="h5-content"
|
||||
style="padding: 20px; background: linear-gradient(to bottom, #6caf97, #78b0a9, #b8d0cf)"
|
||||
style="
|
||||
padding: 15px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
"
|
||||
>
|
||||
<view>
|
||||
<van-icon name="arrow-left" @click="onClickLeft" />
|
||||
<text style="color: #000"> 装备共享大厅 </text>
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding: 10px">
|
||||
<SearchIpt @onSearchByType="onSearchByType" />
|
||||
</view>
|
||||
|
||||
|
|
@ -42,7 +53,7 @@
|
|||
</view>
|
||||
|
||||
<scroll-view scroll-y class="scroll-item" @scrolltolower="onScrollTolower">
|
||||
<van-grid :column-num="2" :border="false">
|
||||
<van-grid :column-num="2" :border="false" :gutter="4">
|
||||
<van-grid-item
|
||||
v-for="(item, index) in deviceList"
|
||||
:key="index"
|
||||
|
|
@ -181,7 +192,6 @@ const onScrollTolower = () => {
|
|||
const getDeviceListData = async () => {
|
||||
const { data: result } = await getDeviceListAPI({})
|
||||
deviceList.value = result.rows
|
||||
console.log(res, '装备列表')
|
||||
}
|
||||
const onViewGoodsDetails = (item) => {
|
||||
uni.navigateTo({ url: `/pages/goods-details/index?id=${item.maId}` })
|
||||
|
|
@ -215,6 +225,12 @@ onLoad(() => {
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.goods-list {
|
||||
padding: 10px;
|
||||
color: #333;
|
||||
box-sizing: border-box;
|
||||
background: linear-gradient(to bottom, #c0e9ce, #e4f2f2, #f9f9f9);
|
||||
}
|
||||
.search-index {
|
||||
height: 80px;
|
||||
justify-content: center;
|
||||
|
|
@ -249,7 +265,7 @@ onLoad(() => {
|
|||
box-sizing: border-box;
|
||||
border-top-left-radius: 20px;
|
||||
border-top-right-radius: 20px;
|
||||
background: $uni-bg-color;
|
||||
// background: $uni-bg-color;
|
||||
|
||||
.filter-box {
|
||||
display: flex;
|
||||
|
|
@ -336,4 +352,8 @@ onLoad(() => {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.van-grid-item__content) {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -18,14 +18,12 @@
|
|||
</van-popover>
|
||||
</view>
|
||||
|
||||
<view class="user-name">
|
||||
您好!{{ userCompanyName }} / {{ memberStore.userInfo.nickName }}
|
||||
</view>
|
||||
<view class="user-name"> 您好!{{ userCompanyName }} </view>
|
||||
<view class="notice-box">
|
||||
<van-image height="0.8rem" width="4rem" :src="noticeImg" />
|
||||
<view>
|
||||
<van-notice-bar color="#00a288" background="transparent" left-icon="volume-o">
|
||||
大鹏一日同风起,扶摇直上九万里
|
||||
最新通知···
|
||||
</van-notice-bar>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -40,16 +38,17 @@
|
|||
<TitleTip />
|
||||
|
||||
<van-grid :column-num="3">
|
||||
<van-grid-item v-for="(o, i) in orderData" :key="i">
|
||||
<van-icon name="shopping-cart" size="30" color="#309cef" />
|
||||
<van-grid-item v-for="(o, i) in orderData" :key="i" @click="onViewMyOrder(o)">
|
||||
<van-icon :name="o.order_icon" size="30" />
|
||||
<text class="order-title">{{ o.order_title }}</text>
|
||||
<text class="order-count">{{ o.order_count }}</text>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</view>
|
||||
|
||||
<view class="to-do-list h5-content">
|
||||
<van-image height="0.8rem" width="4rem" :src="toDoList" />
|
||||
<view class="to-do-list">
|
||||
<!-- <van-image height="0.8rem" width="4rem" :src="toDoList" /> -->
|
||||
<TitleTip :title="`待办事项`" />
|
||||
<van-list
|
||||
v-model:loading="loading"
|
||||
:finished="finished"
|
||||
|
|
@ -69,6 +68,12 @@
|
|||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import orderIcon_1 from '@/static/index/order_icon1.png'
|
||||
import orderIcon_2 from '@/static/index/order_icon2.png'
|
||||
import orderIcon_3 from '@/static/index/order_icon3.png'
|
||||
import orderIcon_4 from '@/static/index/order_icon4.png'
|
||||
import orderIcon_5 from '@/static/index/order_icon5.png'
|
||||
import orderIcon_6 from '@/static/index/order_icon6.png'
|
||||
import noticeImg from '@/static/index/notice.png'
|
||||
import toDoList from '@/static/index/to_do_list.png'
|
||||
import SearchIpt from '@/components/SearchIpt/index'
|
||||
|
|
@ -83,12 +88,12 @@ const activeUser = ref(1)
|
|||
const loading = ref(false)
|
||||
const finished = ref(false)
|
||||
const orderData = ref([
|
||||
{ order_title: '我的订单', order_count: 20 },
|
||||
{ order_title: '待出库', order_count: 6 },
|
||||
{ order_title: '待收货', order_count: 8 },
|
||||
{ order_title: '租赁中', order_count: 12 },
|
||||
{ order_title: '已退租', order_count: 7 },
|
||||
{ order_title: '已完成', order_count: 3 },
|
||||
{ order_title: '我的订单', order_count: 20, order_icon: orderIcon_1 },
|
||||
{ order_title: '待出库', order_count: 6, order_icon: orderIcon_2 },
|
||||
{ order_title: '待收货', order_count: 8, order_icon: orderIcon_3 },
|
||||
{ order_title: '租赁中', order_count: 12, order_icon: orderIcon_4 },
|
||||
{ order_title: '已退租', order_count: 7, order_icon: orderIcon_5 },
|
||||
{ order_title: '已完成', order_count: 3, order_icon: orderIcon_6 },
|
||||
])
|
||||
const userActions = ref([
|
||||
{ text: '出租方', userType: 1 },
|
||||
|
|
@ -124,6 +129,12 @@ const getOrderStatusCountData = async () => {
|
|||
// console.log(res, '数量')
|
||||
}
|
||||
|
||||
const onViewMyOrder = (order) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/order-details/index?type=${activeUser.value}`,
|
||||
})
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
finished.value = true
|
||||
userCompanyName.value = memberStore?.userCompanyName
|
||||
|
|
@ -186,7 +197,7 @@ onShow(() => {
|
|||
}
|
||||
|
||||
.order-data {
|
||||
padding: 0 20px;
|
||||
padding: 0 10px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.order-title,
|
||||
|
|
@ -201,6 +212,8 @@ onShow(() => {
|
|||
|
||||
.to-do-list {
|
||||
margin-top: 10px;
|
||||
padding: 0 10px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.items-info {
|
||||
display: flex;
|
||||
|
|
@ -208,7 +221,7 @@ onShow(() => {
|
|||
font-size: 12px;
|
||||
color: #333;
|
||||
& text:first-child {
|
||||
color: #0292f9;
|
||||
color: #22ab9b;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,31 @@
|
|||
<template>
|
||||
<!-- 需求共享大厅 -->
|
||||
<view class="h5-container">
|
||||
<van-nav-bar title="需求共享大厅" />
|
||||
<view class="h5-container lease-demand-container">
|
||||
<!-- <van-nav-bar title="需求共享大厅" /> -->
|
||||
|
||||
<view
|
||||
style="
|
||||
padding: 15px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
"
|
||||
>
|
||||
<view>
|
||||
<van-icon name="arrow-left" @click="onClickLeft" />
|
||||
<text style="color: #000"> 需求共享大厅 </text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="demand-header">
|
||||
<view>
|
||||
<SearchIpt @onSearchByType="onSearchByType" />
|
||||
</view>
|
||||
|
||||
<navigator class="demand-release" url="/pages/demand-release/index">
|
||||
<navigator
|
||||
class="demand-release"
|
||||
url="/pages/demand-release/index"
|
||||
v-if="memberStore.userType === 2"
|
||||
>
|
||||
<view>
|
||||
<van-highlight
|
||||
:keywords="keywords"
|
||||
|
|
@ -19,7 +37,7 @@
|
|||
</navigator>
|
||||
</view>
|
||||
|
||||
<view class="goods-items h5-content">
|
||||
<view class="goods-items">
|
||||
<view class="filter-box">
|
||||
<view>
|
||||
使用年限
|
||||
|
|
@ -36,7 +54,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view scroll-y class="scroll-item h5-content" @scrolltolower="onScrollTolower">
|
||||
<scroll-view scroll-y class="scroll-item" @scrolltolower="onScrollTolower">
|
||||
<van-grid :column-num="1" :gutter="4">
|
||||
<van-grid-item v-for="d in leaseDemandLis" :key="d.id">
|
||||
<view class="demand-items">
|
||||
|
|
@ -85,16 +103,16 @@
|
|||
<view> 联系人: {{ d.person }} </view>
|
||||
<view> 预估租期(天): {{ d.leaseDay }} </view>
|
||||
</view>
|
||||
<view class="demand-items">
|
||||
<view> 预估数量: {{ d.leaseTotalNum }} </view>
|
||||
<view> 截止时间: {{ d.endTime }} </view>
|
||||
</view>
|
||||
<view class="demand-items"> 发布时间: {{ d.startTime }} </view>
|
||||
<view class="demand-items"> 截止时间: {{ d.endTime }} </view>
|
||||
<view class="demand-items"> 租赁开始日期: {{ d.leaseStartTime }} </view>
|
||||
<view class="demand-items"> 租赁结束日期: {{ d.leaseEndTime }} </view>
|
||||
|
||||
<view class="demand-items">
|
||||
<view style="text-align: right">
|
||||
<van-button type="success" size="small" @click="onDemandDetails"
|
||||
>需求详情</van-button
|
||||
>
|
||||
<van-button type="success" size="small" @click="onDemandDetails(d.id)">
|
||||
需求详情
|
||||
</van-button>
|
||||
<van-button
|
||||
type="primary"
|
||||
size="small"
|
||||
|
|
@ -125,6 +143,11 @@ import moment from 'moment'
|
|||
import { ref } from 'vue'
|
||||
const keywords = ref('发布')
|
||||
const leaseDemandLis = ref([])
|
||||
|
||||
const onClickLeft = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
|
||||
const onScrollTolower = () => {
|
||||
console.log('滚动触底')
|
||||
}
|
||||
|
|
@ -170,9 +193,9 @@ const onReceivingOrders = (id) => {
|
|||
}
|
||||
|
||||
// 需求详情
|
||||
const onDemandDetails = () => {
|
||||
const onDemandDetails = (id) => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/demand-details/index',
|
||||
url: `/pages/demand-details/index?id=${id}`,
|
||||
})
|
||||
}
|
||||
onLoad(() => {
|
||||
|
|
@ -184,10 +207,16 @@ onShow(() => {
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.demand-header {
|
||||
padding: 5px 20px 15px;
|
||||
.lease-demand-container {
|
||||
padding: 10px;
|
||||
color: #333;
|
||||
box-sizing: border-box;
|
||||
background: linear-gradient(to bottom, #6caf97, #78b0a9, #b8d0cf);
|
||||
background: linear-gradient(to bottom, #c0e9ce, #e4f2f2, #f9f9f9);
|
||||
}
|
||||
.demand-header {
|
||||
padding: 5px 10px 15px;
|
||||
box-sizing: border-box;
|
||||
// background: linear-gradient(to bottom, #6caf97, #78b0a9, #b8d0cf);
|
||||
border-bottom-left-radius: 40px;
|
||||
border-bottom-right-radius: 40px;
|
||||
}
|
||||
|
|
@ -225,11 +254,11 @@ onShow(() => {
|
|||
|
||||
.demand-items {
|
||||
width: 100%;
|
||||
padding: 2px 0;
|
||||
padding: 4px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 12px;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
|
||||
view {
|
||||
|
|
@ -240,12 +269,12 @@ onShow(() => {
|
|||
display: flex;
|
||||
align-items: center;
|
||||
color: #ee0a24;
|
||||
font-size: 13px;
|
||||
font-size: 14px;
|
||||
|
||||
.van-count-down {
|
||||
color: #ee0a24;
|
||||
letter-spacing: 1px;
|
||||
font-size: 13px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,13 +29,13 @@
|
|||
<h2>我的订单</h2>
|
||||
|
||||
<van-grid clickable :column-num="2" :gutter="10">
|
||||
<van-grid-item>
|
||||
<van-grid-item v-if="memberStore.userType === 1">
|
||||
<navigator url="/pages/order-details/index?type=1">
|
||||
<van-icon name="cart" />
|
||||
<text>出租订单</text>
|
||||
</navigator>
|
||||
</van-grid-item>
|
||||
<van-grid-item>
|
||||
<van-grid-item v-if="memberStore.userType === 2">
|
||||
<navigator url="/pages/order-details/index?type=2">
|
||||
<van-icon name="cart" />
|
||||
<text>租赁订单</text>
|
||||
|
|
|
|||
|
|
@ -172,11 +172,10 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { useMemberStore } from '@/stores/index.js'
|
||||
import TitleTip from '@/components/TitleTip'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { getOverhaulAPI, setChangePriceAPI } from '@/services/order/index.js'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { ref } from 'vue'
|
||||
const orderDetails = ref({})
|
||||
const orderId = ref('')
|
||||
const orderDetailDtoList = ref({})
|
||||
|
|
|
|||
|
|
@ -38,3 +38,23 @@ export const submitBookCarAPI = (data) => {
|
|||
data,
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 预约车 删除
|
||||
*/
|
||||
export const deleteBookCarAPI = (data) => {
|
||||
return http({
|
||||
method: 'POST',
|
||||
url: '/material-mall/bookCar/deleteById',
|
||||
data,
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 预约车 删除
|
||||
*/
|
||||
export const deleteBookCarByIdsAPI = (data) => {
|
||||
return http({
|
||||
method: 'POST',
|
||||
url: '/material-mall/bookCar/deleteByIds',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,3 +30,13 @@ export const acceptLeaseDemandOrderAPI = (data) => {
|
|||
data,
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 需求详情
|
||||
*/
|
||||
export const getDemandDetailsByIdAPI = (data) => {
|
||||
return http({
|
||||
method: 'GET',
|
||||
url: `/material-mall/ma-lease/getById`,
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
Loading…
Reference in New Issue