|
|
@ -34,17 +34,8 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 时间选择器 --> |
|
|
|
<!-- <uv-picker |
|
|
|
ref="timePicker" |
|
|
|
:columns="timeColumns" |
|
|
|
@confirm="onTimeConfirm" |
|
|
|
@cancel="onTimeCancel" |
|
|
|
title="选择时间范围" |
|
|
|
confirmColor="#C70019" |
|
|
|
></uv-picker> --> |
|
|
|
|
|
|
|
<!-- 日期选择器 --> |
|
|
|
<!-- 日期选择器 --> |
|
|
|
<uv-datetime-picker |
|
|
|
confirm-color="#C70019" |
|
|
|
ref="timePicker" |
|
|
@ -66,18 +57,22 @@ |
|
|
|
<!-- 内容区域 --> |
|
|
|
<view class="content-area"> |
|
|
|
<!-- 记录item --> |
|
|
|
<view class="record-item" v-for="(record, index) in list" :key="index"> |
|
|
|
<!-- 加载动画容器 --> |
|
|
|
<view v-if="isLoading" class="loading-icon"> |
|
|
|
<uv-loading-icon mode="circle" size="48"></uv-loading-icon> |
|
|
|
</view> |
|
|
|
<view class="record-item" v-else-if="list.length" v-for="(record, index) in list" :key="index"> |
|
|
|
<!-- 维修记录 --> |
|
|
|
<template v-if="activeMainTab === 'repair'"> |
|
|
|
<!-- 基本信息 --> |
|
|
|
<view class="info-row"> |
|
|
|
<text class="label">维修人</text> |
|
|
|
<text class="value">{{ record.repairPerson }}</text> |
|
|
|
<text class="value">{{ record.repairName }}</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="info-row"> |
|
|
|
<text class="label">联系方式</text> |
|
|
|
<text class="value">{{ record.contactPhone }}</text> |
|
|
|
<text class="value">{{ record.phone }}</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="info-row"> |
|
|
@ -91,7 +86,7 @@ |
|
|
|
|
|
|
|
<!-- 处理内容文本区域 --> |
|
|
|
<view class="content-text"> |
|
|
|
<text>{{ record.processContent }}</text> |
|
|
|
<text>{{ record.content }}</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 上传图片 --> |
|
|
@ -100,13 +95,13 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="image-container" v-if="!collapsedStates[index]"> |
|
|
|
<image class="uploaded-image" :src="record.uploadImage" mode="aspectFill"></image> |
|
|
|
<image class="uploaded-image" v-for="(value, index) in record.image.split(',')" :key="index" :src="value" mode="aspectFill"></image> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 是否产生费用 --> |
|
|
|
<view class="info-row"> |
|
|
|
<text class="label">是否产生费用</text> |
|
|
|
<text class="value red-text">{{ record.hasCost }}</text> |
|
|
|
<text class="value red-text">{{ record.isExpend === '1' || record.isExpend === 1 ? '是' : '否' }}</text> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
@ -115,7 +110,7 @@ |
|
|
|
<!-- 基本信息 --> |
|
|
|
<view class="info-row"> |
|
|
|
<text class="label">保养人</text> |
|
|
|
<text class="value">{{ record.maintainPerson }}</text> |
|
|
|
<text class="value">{{ record.maintenanceName }}</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="info-row"> |
|
|
@ -129,14 +124,14 @@ |
|
|
|
|
|
|
|
<!-- 保养前状态文本区域 --> |
|
|
|
<view class="content-text"> |
|
|
|
<text>{{ record.beforeStatus }}</text> |
|
|
|
<text>{{ record.stateFrontText }}</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 保养前图片 --> |
|
|
|
<view class="image-container" v-if="!collapsedStates[index]"> |
|
|
|
<image |
|
|
|
class="uploaded-image" |
|
|
|
v-for="(img, imgIndex) in record.beforeImages" |
|
|
|
v-for="(img, imgIndex) in record.stateFrontImage.split(',')" |
|
|
|
:key="imgIndex" |
|
|
|
:src="img" |
|
|
|
mode="aspectFill" |
|
|
@ -149,14 +144,14 @@ |
|
|
|
|
|
|
|
<!-- 保养后状态文本区域 --> |
|
|
|
<view class="content-text" v-if="!collapsedStates[index]"> |
|
|
|
<text>{{ record.afterStatus }}</text> |
|
|
|
<text>{{ record.stateBackText }}</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 保养后图片 --> |
|
|
|
<view class="image-container" v-if="!collapsedStates[index]"> |
|
|
|
<image |
|
|
|
class="uploaded-image" |
|
|
|
v-for="(img, imgIndex) in record.afterImages" |
|
|
|
v-for="(img, imgIndex) in record.stateBackImage.split(',')" |
|
|
|
:key="'after-' + imgIndex" |
|
|
|
:src="img" |
|
|
|
mode="aspectFill" |
|
|
@ -166,20 +161,14 @@ |
|
|
|
<!-- 是否产生费用 --> |
|
|
|
<view class="info-row" v-if="!collapsedStates[index]"> |
|
|
|
<text class="label">是否产生费用</text> |
|
|
|
<text class="value red-text">{{ record.hasCost }}</text> |
|
|
|
<text class="value red-text">{{ record.isExpend === '1'||record.isExpend === 1 ? '是' : '否' }}</text> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<!-- 查看全部按钮(收起状态时显示) --> |
|
|
|
<!-- <view class="view-all-btn" v-if="collapsedStates[index]" @click="toggleCollapse(index)"> |
|
|
|
<text class="view-all-text">查看全部</text> |
|
|
|
<text class="view-all-icon">▼</text> |
|
|
|
</view> --> |
|
|
|
|
|
|
|
<!-- 产生费用 --> |
|
|
|
<view class="info-row" v-if="!collapsedStates[index]"> |
|
|
|
<text class="label">产生费用</text> |
|
|
|
<text class="value red-text">{{ record.totalCost }}</text> |
|
|
|
<text class="value red-text">{{ record.amount }}</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 费用详情表格 --> |
|
|
@ -190,9 +179,14 @@ |
|
|
|
<text class="header-cell">金额</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="table-row" v-for="(item, costIndex) in record.costDetails" :key="costIndex"> |
|
|
|
<text class="cell">{{ item.name }}</text> |
|
|
|
<text class="cell">{{ item.quantity }}</text> |
|
|
|
<view class="table-row" v-for="(item, costIndex) in record.exhibitMaintenanceExpenses" :key="costIndex"> |
|
|
|
<text class="cell">{{ item.title }}</text> |
|
|
|
<text class="cell">{{ item.num }}</text> |
|
|
|
<text class="cell">{{ item.amount }}</text> |
|
|
|
</view> |
|
|
|
<view class="table-row" v-for="(item, costIndex) in record.exhibitRepairExpenseList" :key="costIndex"> |
|
|
|
<text class="cell">{{ item.title }}</text> |
|
|
|
<text class="cell">{{ item.num }}</text> |
|
|
|
<text class="cell">{{ item.amount }}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -225,12 +219,12 @@ |
|
|
|
|
|
|
|
<!-- 附件信息文本区域 --> |
|
|
|
<view class="content-text" v-if="!collapsedStates[index]"> |
|
|
|
<text>{{ record.attachmentInfo }}</text> |
|
|
|
<text>{{ record.remarkText }}</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 附件图片 --> |
|
|
|
<view class="image-container" v-if="!collapsedStates[index]"> |
|
|
|
<image class="uploaded-image" :src="record.attachmentImage" mode="aspectFill"></image> |
|
|
|
<image class="uploaded-image" v-for="(value, index) in record.remarkImage.split(',')" :src="value" :key="index" mode="aspectFill"></image> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 保养备注 --> |
|
|
@ -240,7 +234,7 @@ |
|
|
|
|
|
|
|
<!-- 保养备注文本区域 --> |
|
|
|
<view class="content-text" v-if="!collapsedStates[index]"> |
|
|
|
<text>{{ record.maintainRemark }}</text> |
|
|
|
<text>{{ record.remark }}</text> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
@ -250,6 +244,9 @@ |
|
|
|
<text class="collapse-icon">{{ collapsedStates[index] ? '▼' : '▲' }}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-else> |
|
|
|
<uv-empty icon="/static/暂无搜索结果.png" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
@ -266,6 +263,9 @@ export default { |
|
|
|
activeMainTab: 'repair', // 当前激活的主Tab |
|
|
|
activeFilter: 0, // 当前激活的筛选器 |
|
|
|
collapsedStates: [], // 控制每个记录项的展开/收起状态 |
|
|
|
afterUpdateDataFn(list) { |
|
|
|
this.collapsedStates = new Array(list.length).fill(true) |
|
|
|
}, |
|
|
|
filterOptions: [ |
|
|
|
{ name: '时间' }, |
|
|
|
{ name: '人员' } |
|
|
@ -275,77 +275,7 @@ export default { |
|
|
|
timeColumns: [ |
|
|
|
['今天', '昨天', '本周', '本月', '上月', '自定义'] |
|
|
|
], |
|
|
|
personColumns: [ ], |
|
|
|
// 维修记录数据 |
|
|
|
repairData: [ |
|
|
|
{ |
|
|
|
repairPerson: '李华', |
|
|
|
contactPhone: '15845623255', |
|
|
|
repairDate: '2025-08-14', |
|
|
|
processContent: '文字内容文字内容文字内容', |
|
|
|
uploadImage: '/static/商城_商品2.png', |
|
|
|
hasCost: '是', |
|
|
|
totalCost: '300.00', |
|
|
|
costDetails: [ |
|
|
|
{ name: '天然粘胶剂', quantity: '2', amount: '100.00' }, |
|
|
|
{ name: '达玛树脂', quantity: '1', amount: '200.00' } |
|
|
|
], |
|
|
|
isResolved: '是', |
|
|
|
remark: '文字内容', |
|
|
|
}, |
|
|
|
{ |
|
|
|
repairPerson: '李华', |
|
|
|
contactPhone: '15845623255', |
|
|
|
repairDate: '2025-08-14', |
|
|
|
processContent: '文字内容文字内容文字内容', |
|
|
|
uploadImage: '/static/商城_商品2.png', |
|
|
|
hasCost: '是', |
|
|
|
totalCost: '300.00', |
|
|
|
costDetails: [ |
|
|
|
{ name: '天然粘胶剂', quantity: '2', amount: '100.00' }, |
|
|
|
{ name: '达玛树脂', quantity: '1', amount: '200.00' } |
|
|
|
], |
|
|
|
isResolved: '是', |
|
|
|
remark: '文字内容' |
|
|
|
}, |
|
|
|
], |
|
|
|
// 保养记录数据 |
|
|
|
maintainData: [ |
|
|
|
{ |
|
|
|
maintainPerson: '李华', |
|
|
|
maintainDate: '2025-08-19', |
|
|
|
beforeStatus: '文字内容文字内容文字内容', |
|
|
|
beforeImages: ['/static/商城_商品2.png', '/static/商城_商品2.png'], |
|
|
|
afterStatus: '文字内容文字内容文字内容', |
|
|
|
afterImages: ['/static/商城_商品2.png', '/static/商城_商品2.png'], |
|
|
|
hasCost: '是', |
|
|
|
totalCost: '300.00', |
|
|
|
costDetails: [ |
|
|
|
{ name: '天然粘胶剂', quantity: '2', amount: '100.00' }, |
|
|
|
{ name: '达玛树脂', quantity: '1', amount: '200.00' } |
|
|
|
], |
|
|
|
attachmentInfo: '附件信息', |
|
|
|
maintainRemark: '文字内容', |
|
|
|
attachmentImage: '/static/商城_商品2.png' |
|
|
|
}, |
|
|
|
{ |
|
|
|
maintainPerson: '李华', |
|
|
|
maintainDate: '2025-08-19', |
|
|
|
beforeStatus: '文字内容文字内容文字内容', |
|
|
|
beforeImages: ['/static/商城_商品2.png', '/static/商城_商品2.png'], |
|
|
|
afterStatus: '文字内容文字内容文字内容', |
|
|
|
afterImages: ['/static/商城_商品2.png', '/static/商城_商品2.png'], |
|
|
|
hasCost: '是', |
|
|
|
totalCost: '300.00', |
|
|
|
costDetails: [ |
|
|
|
{ name: '天然粘胶剂', quantity: '2', amount: '100.00' }, |
|
|
|
{ name: '达玛树脂', quantity: '1', amount: '200.00' } |
|
|
|
], |
|
|
|
attachmentInfo: '附件信息', |
|
|
|
maintainRemark: '文字内容', |
|
|
|
attachmentImage: '/static/商城_商品2.png' |
|
|
|
} |
|
|
|
] |
|
|
|
personColumns: [ ] |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
@ -384,18 +314,15 @@ export default { |
|
|
|
this.mixinListApi = this.activeMainTab === 'repair' ? 'exhibit.queryRepairList' : 'exhibit.queryMaintenanceList' |
|
|
|
this.onFilterChange() |
|
|
|
this.initPage() |
|
|
|
await this.getList(true) |
|
|
|
this.initCollapsedStates() |
|
|
|
}, |
|
|
|
initCollapsedStates() { |
|
|
|
this.collapsedStates = new Array(this.list.length).fill(true) |
|
|
|
this.getList(true) |
|
|
|
// this.initCollapsedStates() |
|
|
|
}, |
|
|
|
|
|
|
|
onFilterChange() { |
|
|
|
// this.activeFilter = index |
|
|
|
// 切换筛选器时清空选择 |
|
|
|
this.selectedTime = '' |
|
|
|
this.selectedPerson = '' |
|
|
|
|
|
|
|
}, |
|
|
|
showTimePicker() { |
|
|
|
this.$refs.timePicker.open() |
|
|
@ -404,8 +331,7 @@ export default { |
|
|
|
this.$refs.personPicker.open() |
|
|
|
}, |
|
|
|
onTimeConfirm(e) { |
|
|
|
const date = new Date(e.value) |
|
|
|
this.selectedTime = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}` |
|
|
|
this.selectedTime = this.$utils.formatTime(e.value) |
|
|
|
this.initPage() |
|
|
|
this.getList(true) |
|
|
|
}, |
|
|
@ -428,7 +354,7 @@ export default { |
|
|
|
}, |
|
|
|
async onLoad(args){{ |
|
|
|
this.showpieceId = args.id |
|
|
|
this.initCollapsedStates() |
|
|
|
|
|
|
|
const userRes = await this.$api.config.queryUserList() |
|
|
|
this.personColumns = [[...userRes.result.records.map(item => ({ |
|
|
|
label: item.nickName, |
|
|
@ -521,6 +447,10 @@ export default { |
|
|
|
.content-area { |
|
|
|
padding: 22rpx 29rpx; |
|
|
|
|
|
|
|
.loading-icon { |
|
|
|
margin-top: 60rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.record-item { |
|
|
|
background: #fff; |
|
|
|
border-radius: 16rpx; |
|
|
|