diff --git a/api/modules/exhibit.js b/api/modules/exhibit.js
index 6797280..3df83ff 100644
--- a/api/modules/exhibit.js
+++ b/api/modules/exhibit.js
@@ -11,6 +11,9 @@ export default {
})
},
+
+
+
// 查看维修记录列表
async queryRepairList(data) {
return http({
@@ -91,5 +94,42 @@ export default {
})
},
+ // 查看维修记录详情
+ async queryRepairById(data) {
+ return http({
+ url: '/showpiece/queryRepairById',
+ method: 'GET',
+ data
+ })
+ },
+
+ // 保养- 查看保养记录详情
+ async queryMaintenanceById(data) {
+ return http({
+ url: '/showpiece/queryMaintenanceById',
+ method: 'GET',
+ data
+ })
+ },
+ // 修改保养记录
+ async updateMaintenance(data) {
+ return http({
+ url: '/showpiece/updateMaintenance',
+ method: 'POST',
+ data,
+ showLoading: true,
+ needToken: true
+ })
+ },
+
+ async updateRepair(data) {
+ return http({
+ url: '/showpiece/updateRepair',
+ method: 'POST',
+ data,
+ showLoading: true,
+ needToken: true
+ })
+ }
}
diff --git a/pages.json b/pages.json
index c8ab294..fc6b5e5 100644
--- a/pages.json
+++ b/pages.json
@@ -56,6 +56,18 @@
"navigationBarTitleText": "报修/保养记录"
}
},
+ {
+ "path": "home/repairChange",
+ "style": {
+ "navigationBarTitleText": "报修修改"
+ }
+ },
+ {
+ "path": "home/maintainChange",
+ "style": {
+ "navigationBarTitleText": "保养修改"
+ }
+ },
{
"path": "repair/maintainSubmit",
"style": {
diff --git a/subPages/home/RAArecord.vue b/subPages/home/RAArecord.vue
index 1e31319..ce9d787 100644
--- a/subPages/home/RAArecord.vue
+++ b/subPages/home/RAArecord.vue
@@ -236,6 +236,11 @@
+
+
+ 修改
+
+
{{ collapsedStates[index] ? '查看全部' : '收起' }}
@@ -357,9 +362,16 @@ export default {
toggleCollapse(index) {
this.$set(this.collapsedStates, index, !this.collapsedStates[index])
console.log('收起/展开费用详情', this.collapsedStates[index])
+ },
+ goToEdit(record) {
+ // 根据当前tab类型导航到对应的修改页面
+ const pagePath = this.activeMainTab === 'repair' ? '/subPages/home/repairChange' : '/subPages/home/maintainChange'
+ uni.navigateTo({
+ url: `${pagePath}?id=${record.id}&showpieceId=${this.showpieceId}`
+ })
}
},
- async onLoad(args){{
+ async onLoad(args){
this.showpieceId = args.id
const userRes = await this.$api.config.queryUserList()
@@ -367,7 +379,7 @@ export default {
label: item.nickName,
id: item.id
}))]]
- }}
+ }
}
@@ -591,6 +603,22 @@ export default {
}
}
+ .edit-btn {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ padding: 20rpx 0;
+ margin-top: 16rpx;
+ background-color: $primary-color;
+ border-radius: 8rpx;
+
+ .edit-text {
+ font-size: 28rpx;
+ color: #fff;
+ font-weight: 500;
+ }
+ }
+
.collapse-btn {
display: flex;
justify-content: center;
diff --git a/subPages/home/maintainChange.vue b/subPages/home/maintainChange.vue
new file mode 100644
index 0000000..f601247
--- /dev/null
+++ b/subPages/home/maintainChange.vue
@@ -0,0 +1,809 @@
+
+
+
+
+
+
+
+
+ 保养人
+
+
+
+
+
+
+
+ 保养日期
+
+ {{ maintenanceDate || '请选择' }}
+
+
+
+
+
+
+ 保养前状态
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保养后状态
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 是否产生费用
+
+
+
+ 是
+
+
+
+ 否
+
+
+
+
+
+
+ 产生费用
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保养备注
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 下次保养日期
+
+ {{ nextMaintenanceDate || '请选择' }}
+
+
+
+
+
+
+ 备注
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/subPages/home/repairChange.vue b/subPages/home/repairChange.vue
new file mode 100644
index 0000000..c3598d4
--- /dev/null
+++ b/subPages/home/repairChange.vue
@@ -0,0 +1,749 @@
+
+
+
+
+
+
+
+
+ 维修人
+
+
+
+
+
+
+
+ 联系方式
+
+
+
+
+
+
+
+ 维修日期
+
+ {{ processData.repairDate || '请选择' }}
+
+
+
+
+
+
+ 处理内容
+
+
+
+
+
+
+
+ 上传图片
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 是否产生费用
+
+
+
+ 是
+
+
+
+ 否
+
+
+
+
+
+
+ 产生费用
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 问题是否解决
+
+
+
+ 是
+
+
+
+ 否
+
+
+
+
+
+
+ 备注
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/utils/upload.js b/utils/upload.js
index f4f3b6d..be1da16 100644
--- a/utils/upload.js
+++ b/utils/upload.js
@@ -98,7 +98,7 @@ const uploadImage = async (file) => {
console.error('OSS上传失败:', error)
return {
success: false,
- error: error.message || 'OSS上传失败'
+ error: error.message || '上传失败'
}
}
}