我的工单,工单详情
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
* @Author: Zy
|
* @Author: Zy
|
||||||
* @Date: 2026-05-19 16:29:20
|
* @Date: 2026-05-19 16:29:20
|
||||||
* @LastEditor: Zy
|
* @LastEditor: Zy
|
||||||
* @LastEditTime: 2026-05-19 17:39:23
|
* @LastEditTime: 2026-05-19 18:31:32
|
||||||
*/
|
*/
|
||||||
import request, {
|
import request, {
|
||||||
get,
|
get,
|
||||||
@@ -87,3 +87,19 @@ export function getTicketMainById(id) {
|
|||||||
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>
|
<text>问题描述</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="descrition">
|
<view class="descrition">
|
||||||
<textarea value="" placeholder-style="color:#e8e8e8;" placeholder="请描述您的问题" />
|
<textarea
|
||||||
|
v-model="form.descrition"
|
||||||
|
placeholder-style="color:#e8e8e8;"
|
||||||
|
placeholder="请描述您的问题"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
@@ -14,11 +18,17 @@
|
|||||||
<text>问题照片</text>
|
<text>问题照片</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<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">
|
<view class="addimages images flex flex-center">
|
||||||
<uni-icons type="plusempty" color="#a6a6a6" size="27"></uni-icons>
|
<uni-icons type="plusempty" color="#a6a6a6" size="27"></uni-icons>
|
||||||
</view>
|
</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>
|
</view>
|
||||||
<view class="action_btn" @tap="handleSelecthouse">
|
<view class="action_btn" @tap="handleSelecthouse">
|
||||||
@@ -30,34 +40,39 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
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({
|
const form = ref({
|
||||||
|
id: '',
|
||||||
descrition: '',
|
descrition: '',
|
||||||
images: [
|
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'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
onLoad(options => {
|
||||||
|
form.value.id = options.id
|
||||||
|
})
|
||||||
|
|
||||||
/** 返回上一页 */
|
/** 返回上一页 */
|
||||||
function handleSelecthouse() {
|
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()
|
uni.navigateBack()
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'error',
|
||||||
|
title: '网络错误'
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ function handleSelecthouse() {
|
|||||||
/** 跳转到维修完成 */
|
/** 跳转到维修完成 */
|
||||||
function handleRepairCompluted() {
|
function handleRepairCompluted() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pageSubPack/ticket/repairCompleted'
|
url: '/pageSubPack/ticket/repairCompleted?id=' + repairInfo.value.id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user