You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
1.8 KiB
83 lines
1.8 KiB
import {demandDetail, commonDemandDetail } from "../../../../../utils/statisticsApi";
|
|
|
|
Page({
|
|
data: {
|
|
detail: {},
|
|
id: '',
|
|
process: [],
|
|
isDispatch: false,
|
|
isSupervision: false,
|
|
type: '1',
|
|
isShowOrder: false,
|
|
isShowCommonOrder: false
|
|
},
|
|
onLoad(options) {
|
|
this.setData({
|
|
id: options.id,
|
|
type: options.type,
|
|
})
|
|
this.getData()
|
|
},
|
|
getData() {
|
|
console.log(this.data.type)
|
|
if (this.data.type === '1') {
|
|
demandDetail({demandRecId: this.data.id}).then(res => {
|
|
this.getDetail(res.data);
|
|
})
|
|
} else {
|
|
commonDemandDetail(this.data.id).then(res => {
|
|
this.getDetail(res.data);
|
|
})
|
|
}
|
|
},
|
|
getDetail(data) {
|
|
this.setData({
|
|
detail: data
|
|
})
|
|
},
|
|
dispatchOpen() {
|
|
this.setData({
|
|
isDispatch: true
|
|
})
|
|
},
|
|
dispatchClose() {
|
|
this.setData({
|
|
isDispatch: false
|
|
})
|
|
},
|
|
supervisionOpen() {
|
|
this.setData({
|
|
isSupervision: true
|
|
})
|
|
},
|
|
supervisionClose() {
|
|
this.setData({
|
|
isSupervision: false
|
|
})
|
|
},
|
|
|
|
handleDispatchOrder(){
|
|
this.dispatchClose()
|
|
if (this.data.type === '1') {
|
|
this.setData({
|
|
isShowOrder: true
|
|
})
|
|
} else {
|
|
this.setData({
|
|
isShowCommonOrder: true
|
|
})
|
|
}
|
|
},
|
|
orderClose() {
|
|
if (this.data.type === '1') {
|
|
this.setData({
|
|
isShowOrder: false
|
|
})
|
|
} else {
|
|
this.setData({
|
|
isShowCommonOrder: false
|
|
})
|
|
}
|
|
},
|
|
|
|
})
|