|
|
|
|
@ -1,4 +1,7 @@ |
|
|
|
|
// pages/my-report/myReport.ts
|
|
|
|
|
import services from "../../../services/index" |
|
|
|
|
import { QRecord } from "../../../services/baseClass" |
|
|
|
|
import constant from "../../../utils/constant" |
|
|
|
|
Page({ |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
@ -16,22 +19,33 @@ Page({ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
bindtap(event: WechatMiniprogram.Input) { |
|
|
|
|
const { reportID } = event.currentTarget.dataset |
|
|
|
|
wx.setStorageSync("auditList/auditList", reportID) |
|
|
|
|
wx.navigateTo({ url: "../auditDetail/auditDetail" }) |
|
|
|
|
const { reportid } = event.currentTarget.dataset |
|
|
|
|
wx.setStorageSync("auditList/auditList", reportid) |
|
|
|
|
wx.navigateTo({ url: "../detail/index" }) |
|
|
|
|
}, |
|
|
|
|
onSubmit({ detail }: { detail: Record<string, string> }) { |
|
|
|
|
// orderApi.getOrderDetailFilter(detail.reportType, detail.reportStatus).then(res => {
|
|
|
|
|
// this.setData({reportInfos:res || []})
|
|
|
|
|
// })
|
|
|
|
|
onSubmit:async function( detail : QRecord) { |
|
|
|
|
let res = await services.API.iORecords.getIORecordsList.request(detail); |
|
|
|
|
if(res&&res.data){ |
|
|
|
|
console.log(res.data) |
|
|
|
|
this.setData({reportInfos:res.data||[]}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
/** |
|
|
|
|
* 生命周期函数--监听页面加载 |
|
|
|
|
*/ |
|
|
|
|
onLoad() { |
|
|
|
|
onLoad:async function() { |
|
|
|
|
// 单据id 报备时间 报备类型 审核人 审核状态
|
|
|
|
|
// 锁? 多人同时操作一个订单怎么办
|
|
|
|
|
// orderApi.getOrderInfo().then(res => this.setData({ reportInfos: res || [] }))
|
|
|
|
|
const user = wx.getStorageSync(constant.USER_INFO); |
|
|
|
|
console.log("user",user); |
|
|
|
|
if(!user||!user.teacherID){ |
|
|
|
|
wx.navigateTo({url:"../../index/index.ts"}) |
|
|
|
|
} |
|
|
|
|
let res = await services.API.iORecords.getIORecordsList.request({teacherID:user.teacherID}); |
|
|
|
|
if(res&&res.data){ |
|
|
|
|
console.log(res.data) |
|
|
|
|
this.setData({reportInfos:res.data||[]}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|