我的工单,工单详情
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* @Author: Zy
|
||||
* @Date: 2026-05-19 16:29:20
|
||||
* @LastEditor: Zy
|
||||
* @LastEditTime: 2026-05-19 17:39:23
|
||||
* @LastEditTime: 2026-05-19 18:31:32
|
||||
*/
|
||||
import request, {
|
||||
get,
|
||||
@@ -87,3 +87,19 @@ export function getTicketMainById(id) {
|
||||
id,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @typedef ticketComputedInfo 维修工单信息
|
||||
* @property {String} id = [工单ID]
|
||||
* @property {String} repairDes = [维修房屋ID]
|
||||
* @property {String} repairImageUrl = [维修房屋地址]
|
||||
*/
|
||||
/**
|
||||
* @description: 维修工单完成
|
||||
* @param {ticketComputedInfo} data
|
||||
*/
|
||||
export function ticketComputed(data) {
|
||||
return get('/manage/repair/order', filterParams(data))
|
||||
}
|
||||
|
||||
@@ -6,7 +6,11 @@
|
||||
<text>问题描述</text>
|
||||
</view>
|
||||
<view class="descrition">
|
||||
<textarea value="" placeholder-style="color:#e8e8e8;" placeholder="请描述您的问题" />
|
||||
<textarea
|
||||
v-model="form.descrition"
|
||||
placeholder-style="color:#e8e8e8;"
|
||||
placeholder="请描述您的问题"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
@@ -14,11 +18,17 @@
|
||||
<text>问题照片</text>
|
||||
</view>
|
||||
<view class="">
|
||||
<uni-file-picker v-model="form.images" file-mediatype="image">
|
||||
<!-- <uni-file-picker v-model="form.images" file-mediatype="image">
|
||||
<view class="addimages images flex flex-center">
|
||||
<uni-icons type="plusempty" color="#a6a6a6" size="27"></uni-icons>
|
||||
</view>
|
||||
</uni-file-picker>
|
||||
</uni-file-picker> -->
|
||||
<filePicker
|
||||
v-model="form.images"
|
||||
:sourceType="['camera']"
|
||||
file-field-name="file"
|
||||
uploadUrl="/resource/oss/upload"
|
||||
></filePicker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="action_btn" @tap="handleSelecthouse">
|
||||
@@ -30,34 +40,39 @@
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import filePicker from '@/components/filePicker/filePicker.vue'
|
||||
import { ticketComputed } from '@/api/ticket.js'
|
||||
const form = ref({
|
||||
id: '',
|
||||
descrition: '',
|
||||
images: [
|
||||
{
|
||||
name: 'file1.png',
|
||||
extname: 'png',
|
||||
url: 'https://picsum.photos/80'
|
||||
},
|
||||
{
|
||||
name: 'file2.png',
|
||||
extname: 'png',
|
||||
url: 'https://picsum.photos/80'
|
||||
},
|
||||
{
|
||||
name: 'file3.png',
|
||||
extname: 'png',
|
||||
url: 'https://picsum.photos/80'
|
||||
},
|
||||
{
|
||||
name: 'file4.png',
|
||||
extname: 'png',
|
||||
url: 'https://picsum.photos/80'
|
||||
}
|
||||
]
|
||||
images: []
|
||||
})
|
||||
|
||||
onLoad(options => {
|
||||
form.value.id = options.id
|
||||
})
|
||||
|
||||
/** 返回上一页 */
|
||||
function handleSelecthouse() {
|
||||
const obj = {
|
||||
id: form.value.id,
|
||||
repairDes: form.value.descrition,
|
||||
repairImageUrl: ''
|
||||
}
|
||||
if (form.value.images.length > 0) {
|
||||
obj.repairImageUrl = form.value.images.join(',')
|
||||
}
|
||||
ticketComputed(obj)
|
||||
.then(() => {
|
||||
uni.navigateBack()
|
||||
})
|
||||
.catch(() => {
|
||||
uni.showToast({
|
||||
icon: 'error',
|
||||
title: '网络错误'
|
||||
})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -260,7 +260,7 @@ function handleSelecthouse() {
|
||||
/** 跳转到维修完成 */
|
||||
function handleRepairCompluted() {
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/ticket/repairCompleted'
|
||||
url: '/pageSubPack/ticket/repairCompleted?id=' + repairInfo.value.id
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user