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