问题清单修复

This commit is contained in:
BianLzhaoMin 2025-01-02 18:02:58 +08:00
parent bb3d8531de
commit 20c447122a
18 changed files with 909 additions and 250 deletions

View File

@ -93,6 +93,7 @@ const onInputChange = (value) => {
.check-type {
position: relative;
padding-left: 12px;
height: 36px;
width: 100px;
display: flex;

View File

@ -126,6 +126,13 @@
"navigationStyle": "custom"
}
},
//
{
"path": "pages/repair-details/index",
"style": {
"navigationStyle": "custom"
}
},
//
{
"path": "pages/order-confirm/index",
@ -153,6 +160,13 @@
"style": {
"navigationStyle": "custom"
}
},
//
{
"path": "pages/my-demand/index",
"style": {
"navigationStyle": "custom"
}
}
],
"tabBar": {

View File

@ -20,16 +20,16 @@ import mammoth from 'mammoth'
const docHtml = ref('')
const pagesType = ref(1)
const onClickLeft = () => {
let url = ''
if (pagesType.value == 1) url = '/pages/cart/index'
if (pagesType.value == 3) url = '/pages/order-list/index'
if (pagesType.value == 1 || pagesType.value == 3) {
uni.reLaunch({
url,
})
} else {
uni.navigateBack()
}
// let url = ''
// if (pagesType.value == 1) url = '/pages/cart/index'
// if (pagesType.value == 3) url = '/pages/order-list/index'
// if (pagesType.value == 3) {
// uni.reLaunch({
// url,
// })
// } else {
// }
uni.navigateBack()
}
onLoad(async (options) => {
pagesType.value = options.type

View File

@ -1,204 +1,216 @@
<template>
<!-- 预约车 -->
<view class="h5-container cart-container">
<view class="nav-header">
<view style="display: flex; align-items: center">
<van-icon name="arrow-left" @click="onClickLeft()" />
<van-image height="1rem" width="3rem" :src="cartImg" />
<text> ({{ amountNum }}) </text>
<keep-alive>
<view class="h5-container cart-container">
<view class="nav-header">
<view style="display: flex; align-items: center">
<van-icon name="arrow-left" @click="onClickLeft()" />
<van-image height="1rem" width="3rem" :src="cartImg" />
<text> ({{ amountNum }}) </text>
</view>
<van-button
style="padding: 10px 20px"
type="primary"
size="mini"
class="primary-lease"
@click="onClickManage"
>
{{ isCartManage ? '退出管理' : '管理' }}
</van-button>
</view>
<van-button
style="padding: 10px 20px"
type="primary"
size="mini"
class="primary-lease"
@click="onClickManage"
>
{{ isCartManage ? '退出管理' : '管理' }}
</van-button>
</view>
<scroll-view scroll-y :style="{ paddingBottom: actionBarHeight + 'px' }">
<view class="order-set" v-for="(item, index) in cartList" :key="index">
<van-row>
<van-col span="2">
<van-checkbox
v-model="item.isChecked"
icon-size="16px"
@change="onChangeAllCheckbox($event, index)"
/>
</van-col>
<van-col span="12">
<view class="company-box">
<van-image
fit="cover"
width="1.5rem"
height="1.2rem"
:src="companyImg"
/>
<view class="company-name">
<view> {{ item.companyPersonPhoneKey.companyName }} </view>
<van-image fit="cover" height="0.5rem" :src="companyBg" />
</view>
</view>
</van-col>
<van-col span="10" class="contacts">
<view> 联系人 {{ item.companyPersonPhoneKey.person }} </view>
<view>
{{ item.companyPersonPhoneKey.personPhone }}
</view>
</van-col>
</van-row>
<view v-for="(goods, i) in item.devInfoVoList" :key="i">
<scroll-view scroll-y :style="{ paddingBottom: actionBarHeight + 'px' }">
<view class="order-set" v-for="(item, index) in cartList" :key="index">
<van-row>
<van-col span="2">
<van-checkbox
v-model="goods.isChecked"
v-model="item.isChecked"
icon-size="16px"
@click="onChangeCheckbox($event, index)"
@change="onChangeAllCheckbox($event, index)"
/>
</van-col>
<van-col span="22">
<view class="items-info">
<van-col span="12">
<view class="company-box">
<van-image
fit="cover"
height="4rem"
width="4rem"
:src="goods.picUrl"
width="1.5rem"
height="1.2rem"
:src="companyImg"
/>
<view class="info">
<view style="color: #000">{{ goods.deviceName }}</view>
<view>装备编号{{ goods.code }}</view>
<view>装备型号{{ goods.typeName }}</view>
<view
style="
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
"
>
<text style="color: var(--van-submit-bar-price-color)">
租赁金额{{ goods.dayLeasePrice }}/
</text>
<van-stepper
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">
{{ goods.rentBeginTime ? goods.rentBeginTime : '开始日期' }}
<van-image
width="1rem"
height="1rem"
:src="dateIcon"
style="margin: 0 6px"
@click="onSelectTime(1, index, i)"
/>
{{ goods.rentEndTime ? goods.rentEndTime : '结束日期' }}
<van-image
width="1rem"
height="1rem"
:src="dateIcon"
style="margin: 0 6px"
@click="onSelectTime(2, index, i)"
/>
</view>
<view>
租赁天数
{{ goods.days }}
</view>
<view class="company-name">
<view> {{ item.companyPersonPhoneKey.companyName }} </view>
<van-image fit="cover" height="0.5rem" :src="companyBg" />
</view>
</view>
</van-col>
<van-col span="10" class="contacts">
<view> 联系人 {{ item.companyPersonPhoneKey.person }} </view>
<view>
{{ item.companyPersonPhoneKey.personPhone }}
</view>
</van-col>
</van-row>
<view
style="
margin-top: 14px;
display: flex;
justify-content: flex-end;
height: 30px;
line-height: 30px;
"
>
<text style="font-weight: bold; color: var(--van-submit-bar-price-color)">
{{ goods.num * goods.dayLeasePrice * goods.days }}
</text>
<view v-for="(goods, i) in item.devInfoVoList" :key="i">
<van-row>
<van-col span="2">
<van-checkbox
v-model="goods.isChecked"
icon-size="16px"
@click="onChangeCheckbox($event, index)"
/>
</van-col>
<van-col span="22">
<view class="items-info">
<van-image
fit="cover"
height="4rem"
width="4rem"
:src="goods.picUrl"
/>
<view class="info">
<view style="color: #000">{{ goods.deviceName }}</view>
<view>装备编号{{ goods.code }}</view>
<view>装备型号{{ goods.typeName }}</view>
<view
style="
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
"
>
<text style="color: var(--van-submit-bar-price-color)">
租赁金额{{ goods.dayLeasePrice }}/
</text>
<van-stepper
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">
{{
goods.rentBeginTime
? goods.rentBeginTime
: '开始日期'
}}
<van-image
width="1rem"
height="1rem"
:src="dateIcon"
style="margin: 0 6px"
@click="onSelectTime(1, index, i)"
/>
{{ goods.rentEndTime ? goods.rentEndTime : '结束日期' }}
<van-image
width="1rem"
height="1rem"
:src="dateIcon"
style="margin: 0 6px"
@click="onSelectTime(2, index, i)"
/>
</view>
<view>
租赁天数
{{ goods.days }}
</view>
</view>
</view>
</van-col>
</van-row>
<view
style="
margin-top: 14px;
display: flex;
justify-content: flex-end;
height: 30px;
line-height: 30px;
"
>
<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 v-model="item.protocolChecked" icon-size="16px">
我已阅读并同意
<text class="protocol" @click.stop="onViewProtocol(item, index)">
{{ item.companyPersonPhoneKey.companyName }}公司协议
</text>
</van-checkbox>
</van-row>
</view>
<van-row style="padding: 10px 0; margin-top: 10px; border-top: 1px solid #ccc">
<van-checkbox v-model="item.protocolChecked" icon-size="16px">
我已阅读并同意
<text class="protocol" @click.stop="onViewProtocol(item, index)">
{{ item.companyPersonPhoneKey.companyName }}公司协议
</text>
</van-checkbox>
</van-row>
</view>
</scroll-view>
</scroll-view>
<van-popup v-model:show="showBottom" position="bottom" :destroy-on-close="true">
<van-date-picker
v-model="leaseTime"
@confirm="onConfirm"
@cancel="onCancel"
:min-date="minDate"
:max-date="maxDate"
title="选择日期"
/>
</van-popup>
<van-popup v-model:show="showBottom" position="bottom" :destroy-on-close="true">
<van-date-picker
v-model="leaseTime"
@confirm="onConfirm"
@cancel="onCancel"
:min-date="minDate"
:max-date="maxDate"
title="选择日期"
/>
</van-popup>
<van-popup v-model:show="showBottomAddress" position="bottom" :style="{ height: '50%' }">
<van-address-list
v-model="chosenAddressId"
:list="addressList"
@click-item="onClickAddress"
@add="onAddAddress"
/>
</van-popup>
<van-popup
v-model:show="showBottomAddress"
position="bottom"
:style="{ height: '50%' }"
>
<van-address-list
v-model="chosenAddressId"
:list="addressList"
@click-item="onClickAddress"
@add="onAddAddress"
/>
</van-popup>
<van-submit-bar
button-color="#579d92"
button-text="提交"
:price="totalPrice"
@submit="onSubmitOrder"
v-if="!isCartManage"
>
<template #default>
<view class="amount"> 共计 {{ amountDevice }} 件装备 </view>
</template>
<template #tip>
<text @click="onClickLink">
{{ address.length === 0 ? '请选择收货地址' : `收货地址:${address}` }}
</text>
</template>
</van-submit-bar>
<van-submit-bar
button-color="#579d92"
button-text="提交"
:price="totalPrice"
@submit="onSubmitOrder"
v-if="!isCartManage"
>
<template #default>
<view class="amount"> 共计 {{ amountDevice }} 件装备 </view>
</template>
<template #tip>
<text @click="onClickLink">
{{ address.length === 0 ? '请选择收货地址' : `收货地址:${address}` }}
</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>
<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>
</keep-alive>
</template>
<script setup>
@ -235,6 +247,7 @@ const isCartManage = ref(false)
const checkedAll = ref(false)
const memberStore = useMemberStore()
const onClickLeft = () => {
uni.removeStorageSync('myCartList')
uni.showTabBar()
uni.switchTab({
url: '/pages/index/index',
@ -325,6 +338,7 @@ const onSubmitOrder = async () => {
const res = await submitBookCarAPI(paramsList)
if (res.code === 200) {
showSuccessToast('提交成功')
uni.removeStorageSync('myCartList')
setTimeout(() => {
uni.navigateTo({ url: `/pages/order-list/index?type=2` })
}, 500)
@ -377,6 +391,8 @@ const onViewProtocol = async (item, index) => {
}
const { data: res } = await getBookCarAgreementAPI(queryParams)
uni.setStorageSync('myCartList', { cartList: cartList.value })
uni.navigateTo({
url: `/pages/agreement/index?url=${res.url}&type=1`,
})
@ -597,7 +613,13 @@ onLoad(() => {
})
onShow(() => {
getDeviceDetailsData()
const myCartList = uni.getStorageSync('myCartList')
if (myCartList.cartList) {
cartList.value = myCartList.cartList
} else {
getDeviceDetailsData()
}
getAddressListData()
uni.hideTabBar()
})

View File

@ -84,13 +84,13 @@
<view class="card-style goods-company">
<h4>{{ demandDetails.leaseName }}</h4>
<view>
<text> 预估总数量{{ demandDetails.searchNum }} </text>
<text> 预估总数量{{ demandDetails.leaseTotalNum }} </text>
<text> 预估天数{{ demandDetails.leaseDay }} </text>
</view>
<view>
<!-- <view>
<van-icon name="location-o" />
<text> 合肥市 </text>
</view>
</view> -->
<view>
<text>
@ -242,6 +242,8 @@ onLoad(async (options) => {
// box-sizing: border-box;
// background: linear-gradient(to bottom, #bfdfdb, #f9f9f9, #fff);
font-size: 16px;
.card-style {
width: 97%;
margin: 5px auto 0;
@ -270,7 +272,7 @@ onLoad(async (options) => {
.text-right {
margin-top: 6px;
font-size: 12px;
font-size: 16px;
text-align: right;
}
}
@ -280,7 +282,7 @@ onLoad(async (options) => {
.goods-details text,
.demand-list text {
margin-right: 16px;
font-size: 13px;
font-size: 16px;
color: #5c5b5b;
}
@ -296,7 +298,6 @@ onLoad(async (options) => {
align-items: center;
padding: 8px 0;
background-color: #e5f2f7;
font-size: 13px;
view {
text-align: center;
@ -333,7 +334,7 @@ onLoad(async (options) => {
align-items: center;
justify-content: flex-end;
color: #ee0a24;
font-size: 13px;
font-size: 16px;
.van-count-down {
color: #ee0a24;

View File

@ -406,8 +406,8 @@ const onConfirmArea = (val) => {
areaName.value = areaName.value.slice(1)
const [provinceCode, cityCode, areaCode] = val.selectedValues
Object.assign(demandForm, {
provinceCode,
cityCode,
provinceCode: provinceCode.slice(0, 2),
cityCode: cityCode.slice(0, 4),
areaCode,
})
showArea.value = false

View File

@ -447,4 +447,12 @@ onShow(async () => {
:deep(.van-sidebar-item--select:before) {
display: none;
}
:deep(.van-sidebar-item__text) {
white-space: nowrap; /* 防止换行 */
overflow: hidden; /* 隐藏溢出的内容 */
text-overflow: ellipsis; /* 显示省略号 */
max-width: 100%; /* 最大宽度,根据需要设置 */
display: block; /* 确保是块级元素 */
}
</style>

View File

@ -271,7 +271,7 @@ const leaseDemandLis = ref([])
const showBottom = ref(false)
const activeSelect = ref(0)
const total = ref(0)
const activeTypeName = ref('')
const activeTypeName = ref('需求')
const searchModelValue = ref('')
const searchParams = ref({
keyWord: '',
@ -409,18 +409,30 @@ const onDemandDetails = (id) => {
const onClickStartTime = (type) => {
searchParams.value.startTime = type
searchParams.value.endTime = ''
searchParams.value.rentNum = ''
searchParams.value.rentDay = ''
getLeaseDemandListData(true)
}
const onClickRentDay = (type) => {
searchParams.value.rentDay = type
searchParams.value.endTime = ''
searchParams.value.rentNum = ''
searchParams.value.startTime = ''
getLeaseDemandListData(true)
}
const onClickEndTime = (type) => {
searchParams.value.endTime = type
searchParams.value.startTime = ''
searchParams.value.rentNum = ''
searchParams.value.rentDay = ''
getLeaseDemandListData(true)
}
const onClickRentNum = (type) => {
searchParams.value.rentNum = type
searchParams.value.endTime = ''
searchParams.value.startTime = ''
searchParams.value.rentDay = ''
getLeaseDemandListData(true)
}

View File

@ -0,0 +1,100 @@
<template>
<!-- 我的--我的需求-->
<view class="h5-container my-setting">
<view style="padding: 15px">
<van-icon name="arrow-left" @click="onClickLeft" />
<text style="color: #000"> 我的需求 </text>
</view>
<scroll-view scroll-y @scrolltolower="onScrollTolower">
<van-cell-group
inset
style="margin-bottom: 8px"
v-for="item in demandList"
:key="item.id"
>
<van-cell title="需求编号">
<template #right-icon>
<view
class="view-file"
style="text-decoration: underline"
@click="onViewDemandDetails(item.id)"
>
{{ item.leaseCode }}
</view>
</template>
</van-cell>
<van-cell title="需求名称" :value="item.leaseName" />
<van-cell title="项目所在地" :value="item.areaName" />
<van-cell title="发布人" :value="item.publishUser" />
<van-cell title="操作人" :value="item.orderUser" />
<van-cell title="需求截止日期" :value="item.endTime" />
<van-cell title="接单时间" :value="item.orderTime" />
<van-cell title="状态" :value="item.leaseStatusName" />
</van-cell-group>
<view class="loading-text">
{{ finish ? '没有更多数据了~' : '正在加载...' }}
</view>
</scroll-view>
</view>
</template>
<script setup>
import { ref, computed } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { getMyRentListAPI } from '@/services/demand/index.js'
import { debounce } from 'lodash-es'
const demandList = ref([])
const total = ref(0)
const queryParams = ref({
pageSize: 10,
pageNum: 1,
})
const onClickLeft = () => {
uni.navigateBack()
}
const getMyRentListData = async () => {
const { data: res } = await getMyRentListAPI(queryParams.value)
total.value = res.total
if (res.rows.length == 0) {
demandList.value = []
} else {
demandList.value.push(...res.rows)
}
}
const onViewDemandDetails = (id) => {
uni.navigateTo({
url: `/pages/demand-details/index?id=${id}`,
})
}
const onScrollTolower = debounce(() => {
if (total.value > demandList.value.length) {
queryParams.value.pageNum++
getMyRentListData()
}
}, 500)
//
const finish = computed(() => {
if (total.value === demandList.value.length) return true
})
onLoad(() => {
getMyRentListData()
})
</script>
<style lang="scss" scoped>
.my-setting {
padding: 10px 0;
color: #333;
box-sizing: border-box;
background: linear-gradient(to bottom, #c0e9ce, #e4f2f2, #f9f9f9);
}
:deep(.van-cell-group--inset) {
padding: 15px 0;
}
</style>

View File

@ -35,6 +35,12 @@
<text>出租订单</text>
</navigator>
</van-grid-item>
<van-grid-item v-if="memberStore.userType === 1">
<navigator url="/pages/my-demand/index">
<van-icon name="cart" />
<text>我的需求</text>
</navigator>
</van-grid-item>
<van-grid-item v-if="memberStore.userType === 2">
<navigator url="/pages/order-list/index?type=2">
<van-icon name="cart" />

View File

@ -85,13 +85,19 @@
<van-cell title="改价后费用(元)" :value="item.repairChangePrice" />
<van-cell title="附件" center>
<template #right-icon>
<view>
<van-text-ellipsis :content="item.fileList[0]?.fileName" />
<view
class="view-file"
v-if="item.fileList[0]?.fileName"
@click="onPreviewFile(item.fileList)"
>
点击查看
</view>
<view v-else> 暂无附件 </view>
</template>
</van-cell>
</van-cell-group>
</view>
<van-empty description="暂无数据" v-if="repairRecordList.length === 0" />
<view>
<TitleTip :title="`报废费用明细`" />
@ -111,13 +117,19 @@
<van-cell title="改价后费用(元)" :value="item.scrapChangePrice" />
<van-cell title="附件" center>
<template #right-icon>
<view>
<van-text-ellipsis :content="item.fileList[0]?.fileName" />
<view
class="view-file"
v-if="item.fileList[0]?.fileName"
@click="onPreviewFile(item.fileList)"
>
点击查看
</view>
<view v-else> 暂无附件 </view>
</template>
</van-cell>
</van-cell-group>
</view>
<van-empty description="暂无数据" v-if="scrapRecordList.length === 0" />
<view>
<TitleTip :title="`丢失费用明细`" />
@ -136,13 +148,19 @@
<van-cell title="改价后费用(元)" :value="item.lossChangePrice" />
<van-cell title="附件" center>
<template #right-icon>
<view>
<van-text-ellipsis :content="item.fileList[0]?.fileName" />
<view
class="view-file"
v-if="item.fileList[0]?.fileName"
@click="onPreviewFile(item.fileList)"
>
点击查看
</view>
<view v-else> 暂无附件 </view>
</template>
</van-cell>
</van-cell-group>
</view>
<van-empty description="暂无数据" v-if="lossRecordList.length === 0" />
</scroll-view>
</view>
</template>
@ -152,6 +170,7 @@ import { ref } from 'vue'
import TitleTip from '@/components/TitleTip'
import { onLoad } from '@dcloudio/uni-app'
import { getOverhaulAPI, confirmPriceAPI } from '@/services/order/index.js'
import { showImagePreview } from 'vant'
const orderDetails = ref({})
const orderId = ref('')
const orderDetailDtoList = ref({})
@ -235,6 +254,9 @@ const onCostConfirm = () => {
})
.catch(() => {})
}
const onPreviewFile = (fileList) => {
showImagePreview([fileList[0].fileUrl])
}
</script>
<style lang="scss" scoped>

View File

@ -128,9 +128,14 @@
<van-cell title="改价后费用(元)" :value="item.repairChangePrice" />
<van-cell title="附件" center>
<template #right-icon>
<view>
<van-text-ellipsis :content="item.fileList[0]?.fileName" />
<view
class="view-file"
v-if="item.fileList[0]?.fileName"
@click="onPreviewFile(item.fileList)"
>
点击查看
</view>
<view v-else> 暂无附件 </view>
</template>
</van-cell>
<van-field
@ -163,9 +168,14 @@
<van-cell title="改价后费用(元)" :value="item.scrapChangePrice" />
<van-cell title="附件" center>
<template #right-icon>
<view>
<van-text-ellipsis :content="item.fileList[0]?.fileName" />
<view
class="view-file"
v-if="item.fileList[0]?.fileName"
@click="onPreviewFile(item.fileList)"
>
点击查看
</view>
<view v-else> 暂无附件 </view>
</template>
</van-cell>
<van-field
@ -197,9 +207,14 @@
<van-cell title="改价后费用(元)" :value="item.lossChangePrice" />
<van-cell title="附件" center>
<template #right-icon>
<view>
<van-text-ellipsis :content="item.fileList[0]?.fileName" />
<view
class="view-file"
v-if="item.fileList[0]?.fileName"
@click="onPreviewFile(item.fileList)"
>
点击查看
</view>
<view v-else> 暂无附件 </view>
</template>
</van-cell>
<van-field
@ -222,6 +237,7 @@ import companyBg from '@/static/goods/company-bg.png'
import TitleTip from '@/components/TitleTip/index'
import { ref } from 'vue'
import { editOrderDetailsAPI, getOverhaulAPI } from '@/services/order/index.js'
import { showImagePreview } from 'vant'
import { onLoad } from '@dcloudio/uni-app'
const orderDetailsList = ref([])
const orderDetails = ref({})
@ -285,6 +301,10 @@ const getOverhaulData = async (orderId) => {
})
})
}
const onPreviewFile = (fileList) => {
showImagePreview([fileList[0].fileUrl])
}
onLoad(async (options) => {
const { data: res } = await editOrderDetailsAPI({ orderId: options?.orderId })
orderDetails.value = res

View File

@ -51,12 +51,51 @@
:src="goods.url"
/>
<view class="info">
<view style="color: #000">
{{ goods.deviceName }}
<text style="color: var(--van-submit-bar-price-color)">
<view style="font-size: 14px; font-weight: bold">
<text>
{{ goods.deviceName }}
</text>
<text
style="color: var(--van-submit-bar-price-color)"
:style="
item.orderStatus == 20
? 'text-decoration: line-through'
: ''
"
>
{{ goods.costs }}
</text>
<text
v-if="item.orderStatus == 20"
style="color: var(--van-submit-bar-price-color)"
>
{{ item.totalRealPrice }}
</text>
</view>
<!-- <view style="display: flex; justify-content: space-between">
<view>
{{ goods.deviceName }}
</view>
<view>
<text
style="color: var(--van-submit-bar-price-color)"
:style="
item.orderStatus == 20
? 'text-decoration: line-through'
: ''
"
>
{{ goods.costs }}
</text>
<text
v-if="item.orderStatus == 20"
style="color: var(--van-submit-bar-price-color)"
>
{{ item.totalRealPrice }}
</text>
</view>
</view> -->
<view>
装备编号{{ goods.code }}
@ -64,14 +103,17 @@
{{ orderText(goods.orderStatus) }}
</van-tag>
</view>
<view>装备型号{{ goods.typeName }}</view>
<view> 租赁时长 {{ goods.days }}</view>
<view>租金{{ goods.dayLeasePrice }} / </view>
<view>
<text>租赁时长 {{ goods.days }}</text>
<text>数量{{ goods.num }}</text>
</view>
</view>
</view>
</van-col>
</van-row>
<van-row style="margin-top: 14px">
<van-row>
<van-button
type="primary"
size="mini"
@ -84,7 +126,7 @@
</van-button>
</van-row>
</view>
<van-row style="margin-top: 14px">
<van-row>
<van-button
type="primary"
size="small"
@ -107,7 +149,7 @@
(item.orderStatus == 3 || item.orderStatus == 4) &&
!orderQueryParams.flag
"
@click="onEditOrderStatus(item, parseInt(item.orderStatus))"
@click.stop="onEditOrderStatus(item, parseInt(item.orderStatus))"
>
{{ initLesseeBtnText(item.orderStatus) }}
</van-button>
@ -152,6 +194,26 @@
>
费用确认
</van-button>
<van-button
style="margin-right: 6px"
size="small"
type="primary"
class="primary-lease"
v-if="item.orderStatus >= 10"
@click.stop="onViewRepairDetails(item)"
>
检修详情
</van-button>
<van-button
style="margin-right: 6px"
size="small"
type="primary"
class="primary-lease"
v-if="item.orderStatus >= 15"
@click.stop="onViewCosts(item)"
>
费用清单
</van-button>
<van-button
style="margin-right: 6px"
size="small"
@ -167,9 +229,19 @@
总金额
<view style="color: var(--van-submit-bar-price-color)">
<text> </text>
<text style="font-size: 16px; font-weight: bold">
<text
style="font-size: 16px; font-weight: bold"
:style="item.orderStatus == 20 ? 'text-decoration: line-through' : ''"
>
{{ item.cost }}
</text>
&nbsp; &nbsp;
<text
style="font-size: 16px; font-weight: bold"
v-if="item.orderStatus == 20"
>
{{ item.totalRealPrice }}
</text>
</view>
</van-row>
</view>
@ -208,7 +280,7 @@
<van-tag type="primary">已退租</van-tag>
</view>
<view> 装备编号{{ item.code }}</view>
<view>租赁时长{{ item.originDays }}</view>
<view>租赁时长{{ item.dateDays }}</view>
</view>
</view>
</van-col>
@ -274,8 +346,17 @@
/>
</view>
<view>
<view> 附件 </view>
<van-text-ellipsis :content="item.repairRecord.fileInfoList[0]?.name" />
<view>
附件
<text
class="view-file"
v-if="item.repairRecord.fileInfoList[0]?.name"
@click="onPreviewFile(item.repairRecord.fileInfoList)"
>
点击查看
</text>
</view>
<!-- <van-text-ellipsis :content="item.repairRecord.fileInfoList[0]?.name" /> -->
</view>
</view>
<view
@ -291,13 +372,21 @@
/>
</view>
<view>
<view> 附件 </view>
<van-text-ellipsis :content="item.scrapRecord?.fileInfoList[0]?.name" />
<view>
附件
<text
class="view-file"
v-if="item.scrapRecord.fileInfoList[0]?.name"
@click="onPreviewFile(item.scrapRecord.fileInfoList)"
>
点击查看
</text>
</view>
</view>
</view>
<view style="padding: 4px 0; font-size: 13px" v-if="item.lossRecord.lossPrice > 0">
<view style="display: flex; justify-content: space-between">
报废费用{{ item.lossRecord.lossPrice }}
丢失费用{{ item.lossRecord.lossPrice }}
<van-icon
name="clear"
color="#ee0a24"
@ -305,8 +394,16 @@
/>
</view>
<view>
<view> 附件 </view>
<van-text-ellipsis :content="item.lossRecord?.fileInfoList[0]?.name" />
<view>
附件
<text
class="view-file"
v-if="item.lossRecord.fileInfoList[0]?.name"
@click="onPreviewFile(item.lossRecord.fileInfoList)"
>
点击查看
</text>
</view>
</view>
</view>
</van-cell-group>
@ -336,15 +433,21 @@
</template>
</van-cell>
</van-cell-group>
<van-form v-if="handleTitle === '维修费用'">
<van-form v-if="handleTitle === '维修费用'" @submit="onSubmitFormResult">
<van-cell-group inset>
<van-field
required
label="维修金额"
placeholder="请输入维修金额"
v-model="repairList[repairIndex].repairRecord.repairPrice"
:rules="[{ required: true, message: '请输入维修金额' }]"
/>
<van-field name="uploader" label="附件" required>
<van-field
required
label="附件"
name="uploader"
:rules="[{ required: true, message: '请上传维修附件' }]"
>
<template #input>
<UploadFile
v-model:fileInfoList="
@ -354,16 +457,28 @@
</template>
</van-field>
</van-cell-group>
<view style="margin: 16px">
<van-button block type="primary" size="small" native-type="submit">
提交
</van-button>
</view>
</van-form>
<van-form v-if="handleTitle === '报废费用'">
<van-form v-if="handleTitle === '报废费用'" @submit="onSubmitFormResult">
<van-cell-group inset>
<van-field
required
label="报废金额"
placeholder="请输入报废金额"
v-model="repairList[repairIndex].scrapRecord.scrapPrice"
:rules="[{ required: true, message: '请输入报废金额' }]"
/>
<van-field name="uploader" label="附件" required>
<van-field
name="uploader"
label="附件"
required
:rules="[{ required: true, message: '请上传报废附件' }]"
>
<template #input>
<UploadFile
v-model:fileInfoList="
@ -373,16 +488,27 @@
</template>
</van-field>
</van-cell-group>
<view style="margin: 16px">
<van-button block type="primary" size="small" native-type="submit">
提交
</van-button>
</view>
</van-form>
<van-form v-if="handleTitle === '丢失费用'">
<van-form v-if="handleTitle === '丢失费用'" @submit="onSubmitFormResult">
<van-cell-group inset>
<van-field
required
label="丢失金额"
placeholder="请输入丢失金额"
v-model="repairList[repairIndex].lossRecord.lossPrice"
:rules="[{ required: true, message: '请输入丢失金额' }]"
/>
<van-field name="uploader" label="附件" required>
<van-field
name="uploader"
label="附件"
required
:rules="[{ required: true, message: '请上传丢失附件' }]"
>
<template #input>
<UploadFile
v-model:fileInfoList="
@ -392,13 +518,18 @@
</template>
</van-field>
</van-cell-group>
<view style="margin: 16px">
<van-button block type="primary" size="small" native-type="submit">
提交
</van-button>
</view>
</van-form>
<view style="margin: 16px">
<van-button block type="primary" size="small" @click="onSubmitFormResult">
<!-- <view style="margin: 16px">
<van-button block type="primary" size="small" native-type="onSubmitFormResult">
提交
</van-button>
</view>
</view> -->
</van-popup>
</view>
</template>
@ -417,6 +548,7 @@ import {
setAddLeaseRepairAPI,
getLeaseAgreementAPI,
} from '@/services/order/index.js'
import { showImagePreview } from 'vant'
const showBottom = ref(false)
const showCenter = ref(false)
const activeTabs = ref(0)
@ -690,9 +822,16 @@ const onRepairEnd = (item) => {
.catch(() => {})
}
const onViewRepairDetails = (item) => {
uni.navigateTo({ url: `/pages/repair-details/index?orderId=${item.orderId}` })
}
const onViewCosts = (item) => {
uni.navigateTo({ url: `/pages/order-settlement/index?orderId=${item.orderId}&type=2` })
}
//
const onCostsSett = (item) => {
uni.navigateTo({ url: `/pages/order-settlement/index?orderId=${item.orderId}` })
uni.navigateTo({ url: `/pages/order-settlement/index?orderId=${item.orderId}&type=1` })
}
//
const onCostConfirm = (item) => {
@ -809,6 +948,10 @@ const onTapsChange = (val) => {
getOrderListData()
}
const onPreviewFile = (fileList) => {
showImagePreview([fileList[0].url])
}
onLoad((options) => {
orderQueryParams.value.flag = options?.type == 1 ? true : false
// console.log(options?.status, '')
@ -859,6 +1002,7 @@ onShow(() => {
padding-left: 6px;
font-size: 16px;
font-weight: bold;
margin-bottom: -6px;
}
.van-image {
@ -888,10 +1032,10 @@ onShow(() => {
}
}
& view:first-child {
font-size: 14px;
font-weight: bold;
}
// & view:first-child {
// font-size: 14px;
// font-weight: bold;
// }
}
}

View File

@ -11,10 +11,10 @@
>
<view>
<van-icon name="arrow-left" @click="onClickLeft" />
<text style="color: #000"> 费用结算 </text>
<text style="color: #000"> {{ pagesType == 1 ? '费用结算' : '费用清单' }} </text>
</view>
<view>
<view v-if="pagesType == 1">
<van-button
size="mini"
type="primary"
@ -71,6 +71,7 @@
name="密码"
label="操作改价"
placeholder="请输入改价后费用"
v-if="pagesType == 1"
/>
</van-cell-group>
</view>
@ -92,18 +93,25 @@
<van-cell title="改价后费用(元)" :value="item.repairChangePrice" />
<van-cell title="附件" center>
<template #right-icon>
<view>
<van-text-ellipsis :content="item.fileList[0]?.fileName" />
<view
class="view-file"
v-if="item.fileList[0]?.fileName"
@click="onPreviewFile(item.fileList)"
>
点击查看
</view>
<view v-else> 暂无附件 </view>
</template>
</van-cell>
<van-field
v-model="item.repairPrice"
label="操作改价"
placeholder="请输入改价后费用"
v-if="pagesType == 1"
/>
</van-cell-group>
</view>
<van-empty description="暂无数据" v-if="repairRecordList.length === 0" />
<view>
<TitleTip :title="`报废费用明细`" />
@ -123,9 +131,14 @@
<van-cell title="改价后费用(元)" :value="item.scrapChangePrice" />
<van-cell title="附件" center>
<template #right-icon>
<view>
<van-text-ellipsis :content="item.fileList[0]?.fileName" />
<view
class="view-file"
v-if="item.fileList[0]?.fileName"
@click="onPreviewFile(item.fileList)"
>
点击查看
</view>
<view v-else> 暂无附件 </view>
</template>
</van-cell>
<van-field
@ -133,9 +146,11 @@
name="密码"
label="操作改价"
placeholder="请输入改价后费用"
v-if="pagesType == 1"
/>
</van-cell-group>
</view>
<van-empty description="暂无数据" v-if="scrapRecordList.length === 0" />
<view>
<TitleTip :title="`丢失费用明细`" />
@ -154,9 +169,14 @@
<van-cell title="改价后费用(元)" :value="item.lossChangePrice" />
<van-cell title="附件" center>
<template #right-icon>
<view>
<van-text-ellipsis :content="item.fileList[0]?.fileName" />
<view
class="view-file"
v-if="item.fileList[0]?.fileName"
@click="onPreviewFile(item.fileList)"
>
点击查看
</view>
<view v-else> 暂无附件 </view>
</template>
</van-cell>
<van-field
@ -164,9 +184,11 @@
name="密码"
label="操作改价"
placeholder="请输入改价后费用"
v-if="pagesType == 1"
/>
</van-cell-group>
</view>
<van-empty description="暂无数据" v-if="lossRecordList.length === 0" />
</scroll-view>
</view>
</template>
@ -174,6 +196,7 @@
<script setup>
import TitleTip from '@/components/TitleTip'
import { getOverhaulAPI, setChangePriceAPI } from '@/services/order/index.js'
import { showImagePreview } from 'vant'
import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'
const orderDetails = ref({})
@ -183,11 +206,13 @@ const repairRecordList = ref([])
const scrapRecordList = ref([])
const lossRecordList = ref([])
const fileListAll = ref([])
const pagesType = ref(1)
const onClickLeft = () => {
uni.navigateBack()
}
onLoad(async (options) => {
pagesType.value = options?.type
orderId.value = options.orderId
const { data: res } = await getOverhaulAPI({ orderId: options.orderId })
orderDetailDtoList.value = res.orderDetailDtoList
@ -291,6 +316,10 @@ const onSubmitSett = () => {
})
.catch(() => {})
}
const onPreviewFile = (fileList) => {
showImagePreview([fileList[0].fileUrl])
}
</script>
<style lang="scss" scoped>

View File

@ -147,7 +147,7 @@ import companyImg from '@/static/goods/company-img.png'
import companyBg from '@/static/goods/company-bg.png'
import dateIcon from '@/static/goods/date-icon.png'
import { computed, ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { onLoad, onShow } from '@dcloudio/uni-app'
import { useMemberStore } from '@/stores/index.js'
import { getDeviceDetailsAPI } from '@/services/goods/index.js'
import {
@ -168,6 +168,7 @@ const address = ref('')
const chosenAddressId = ref()
const addressList = ref([])
const onClickLeft = () => {
uni.removeStorageSync('myOrderList')
uni.navigateBack()
}
const onSubmitOrder = async () => {
@ -212,6 +213,7 @@ const onSubmitOrder = async () => {
const res = await submitBookCarAPI([submitParams])
if (res.code === 200) {
showSuccessToast('提交成功')
uni.removeStorageSync('myOrderList')
setTimeout(() => {
uni.redirectTo({ url: `/pages/order-list/index?type=2` })
}, 500)
@ -256,6 +258,7 @@ const onViewProtocol = async (item) => {
}
const { data: res } = await getBookCarAgreementAPI(queryParams)
uni.setStorageSync('myOrderList', { orderList: orderList.value })
uni.navigateTo({
url: `/pages/agreement/index?url=${res.url}&type=2`,
})
@ -336,6 +339,13 @@ onLoad((options) => {
getDeviceDetailsData(options.id)
getAddressListData()
})
onShow(() => {
const myOrderList = uni.getStorageSync('myOrderList')
if (myOrderList.cartList) {
orderList.value = myOrderList.orderList
}
})
</script>
<style lang="scss" scoped>

View File

@ -0,0 +1,256 @@
<template>
<!-- 订单详情-->
<view class="h5-container order-reduction">
<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>
<van-cell-group inset>
<view>订单编号{{ orderDetails.code }}</view>
<view>装备数量{{ orderDetails.maNumber }}</view>
<view>结算单位{{ orderDetails.leaseCompany }}</view>
<view style="text-align: right">
总租金
<text style="text-align: right; font-size: 18px; color: #ee0a24">
{{ orderDetails.totalCost }}
</text>
</view>
</van-cell-group>
<scroll-view scroll-y style="background-color: #fff; padding: 10px; box-sizing: border-box">
<view>
<TitleTip :title="`维修费用明细`" />
</view>
<view :key="item.id" class="items-container" v-for="(item, index) in repairRecordList">
<view class="count-title">
<text></text>
<text style="font-weight: bold">设备{{ index + 1 }}</text>
</view>
<van-cell-group inset>
<van-cell title="装备编号" :value="item.code" />
<van-cell title="装备名称" :value="item.deviceName" />
<van-cell title="装备型号" :value="item.typeName" />
<van-cell title="维修数量" :value="item.repairNum" />
<van-cell title="维修费用(元)" :value="item.repairPrice" />
<van-cell title="改价后费用(元)" :value="item.repairChangePrice" />
<van-cell title="附件" center>
<template #right-icon>
<!-- <view>
<van-text-ellipsis :content="item.fileList[0]?.fileName" />
</view> -->
<view
class="view-file"
v-if="item.fileList[0]?.fileName"
@click="onPreviewFile(item.fileList)"
>
点击查看
</view>
<view v-else> 暂无附件 </view>
</template>
</van-cell>
<van-field
v-model="item.repairPrice"
label="操作改价"
placeholder="请输入改价后费用"
/>
</van-cell-group>
</view>
<van-empty description="暂无数据" v-if="repairRecordList.length === 0" />
<view>
<TitleTip :title="`报废费用明细`" />
</view>
<view :key="item.id" class="items-container" v-for="(item, index) in scrapRecordList">
<view class="count-title">
<text></text>
<text style="font-weight: bold">设备{{ index + 1 }}</text>
</view>
<van-cell-group inset>
<van-cell title="装备编号" :value="item.code" />
<van-cell title="装备名称" :value="item.deviceName" />
<van-cell title="装备型号" :value="item.typeName" />
<van-cell title="报废数量" :value="item.scrapNum" />
<van-cell title="报废原因" :value="item.scrapReason" />
<van-cell title="报废费用(元)" :value="item.scrapPrice" />
<van-cell title="改价后费用(元)" :value="item.scrapChangePrice" />
<van-cell title="附件" center>
<template #right-icon>
<view
class="view-file"
v-if="item.fileList[0]?.fileName"
@click="onPreviewFile(item.fileList)"
>
点击查看
</view>
<view v-else> 暂无附件 </view>
</template>
</van-cell>
<van-field
v-model="item.scrapPrice"
name="密码"
label="操作改价"
placeholder="请输入改价后费用"
/>
</van-cell-group>
</view>
<van-empty description="暂无数据" v-if="scrapRecordList.length === 0" />
<view>
<TitleTip :title="`丢失费用明细`" />
</view>
<view :key="item.id" class="items-container" v-for="(item, index) in lossRecordList">
<view class="count-title">
<text></text>
<text style="font-weight: bold">设备{{ index + 1 }}</text>
</view>
<van-cell-group inset>
<van-cell title="装备编号" :value="item.code" />
<van-cell title="装备名称" :value="item.deviceName" />
<van-cell title="装备型号" :value="item.typeName" />
<van-cell title="丢失数量" :value="item.lossNum" />
<van-cell title="丢失费用(元)" :value="item.lossPrice" />
<van-cell title="改价后费用(元)" :value="item.lossChangePrice" />
<van-cell title="附件" center>
<template #right-icon>
<view
class="view-file"
v-if="item.fileList[0]?.fileName"
@click="onPreviewFile(item.fileList)"
>
点击查看
</view>
<view v-else> 暂无附件 </view>
</template>
</van-cell>
<van-field
v-model="item.lossPrice"
name="密码"
label="操作改价"
placeholder="请输入改价后费用"
/>
</van-cell-group>
</view>
<van-empty description="暂无数据" v-if="lossRecordList.length === 0" />
</scroll-view>
</view>
</template>
<script setup>
import TitleTip from '@/components/TitleTip'
import { getOverhaulAPI } from '@/services/order/index.js'
import { showImagePreview } from 'vant'
import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'
const orderDetails = ref({})
const orderId = ref('')
const orderDetailDtoList = ref({})
const repairRecordList = ref([])
const scrapRecordList = ref([])
const lossRecordList = ref([])
const fileListAll = ref([])
const onClickLeft = () => {
uni.navigateBack()
}
onLoad(async (options) => {
orderId.value = options.orderId
const { data: res } = await getOverhaulAPI({ orderId: options.orderId })
orderDetailDtoList.value = res.orderDetailDtoList
repairRecordList.value = res.repairRecordList.map((e) => {
return {
...e,
fileList: [],
}
})
scrapRecordList.value = res.scrapRecordList.map((e) => {
return {
...e,
fileList: [],
}
})
lossRecordList.value = res.lossRecordList.map((e) => {
return {
...e,
fileList: [],
}
})
fileListAll.value = res.fileInfoList
orderDetails.value = res
fileListAll.value.forEach((e) => {
repairRecordList.value.forEach((j) => {
if (e.modelId == j.maId && e.fileType == 0) {
j.fileList.push({
fileName: e.fileName,
fileUrl: e.fileUrl,
})
}
})
scrapRecordList.value.forEach((j) => {
if (e.modelId == j.maId && e.fileType == 1) {
j.fileList.push({
fileName: e.fileName,
fileUrl: e.fileUrl,
})
}
})
lossRecordList.value.forEach((j) => {
if (e.modelId == j.maId && e.fileType == 2) {
j.fileList.push({
fileName: e.fileName,
fileUrl: e.fileUrl,
})
}
})
})
})
const onPreviewFile = (fileList) => {
showImagePreview([fileList[0].fileUrl])
}
</script>
<style lang="scss" scoped>
.order-reduction {
padding: 10px;
color: #333;
box-sizing: border-box;
background: linear-gradient(to bottom, #c0e9ce, #e4f2f2, #f9f9f9);
}
.van-cell-group view {
padding: 6px 10px;
}
:deep(.van-cell-group--inset) {
margin: 0;
margin-bottom: 10px;
}
.items-container {
margin-bottom: 10px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
.count-title text:first-child {
display: inline-block;
width: 10px;
height: 10px;
border-radius: 5px;
background-color: #ff660f;
margin-right: 8px;
}
}
</style>

View File

@ -40,3 +40,13 @@ export const getDemandDetailsByIdAPI = (data) => {
data,
})
}
/**
* 接单列表
*/
export const getMyRentListAPI = (data) => {
return http({
method: 'GET',
url: `/material-mall/ma-lease/rentList`,
data,
})
}

View File

@ -43,6 +43,10 @@
padding: 20rpx 0;
}
.view-file {
color: #00a288;
}
// :root {
// --van-primary-color:#00a288;
// }