工单详情

This commit is contained in:
2025-11-12 18:14:12 +08:00
parent b940d7a6cc
commit 1a6071194a
8 changed files with 159 additions and 10 deletions

View File

@@ -1,3 +1,9 @@
import { loadingFunc, alertSuccess, alertInfo } from "../../utils/index";
import request from "../../utils/request"
import { getNoticeFlowDetail, doNoticeFlow } from "../../service/workBench"
const { OK } = request;
// pages/workOrderDetail/index.js
Page({
@@ -5,16 +11,56 @@ Page({
* 页面的初始数据
*/
data: {
detail: {}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
const { id } = options;
const that = this;
loadingFunc(async () => {
that.getDetail(id)
})
},
showImage() {
this.setData({
imageShow: true
})
},
onClose() {
this.setData({
imageShow: false
})
},
goback() {
wx.navigateBack();
},
async onSubmit() {
const {detail} = this.data;
const {id} = detail;
const { code, message } = await doNoticeFlow(id)
if (code !== OK) {
alertInfo(message)
return
}
alertSuccess("确认成功")
const that = this;
loadingFunc(async () => {
that.getDetail(id)
})
},
async getDetail(id) {
const { code, data ,message } = await getNoticeFlowDetail(id)
if (code !== OK) {
alertInfo(message)
return;
}
this.setData({
detail: data
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/