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.
70 lines
1.4 KiB
70 lines
1.4 KiB
2 years ago
|
import {demandDetail, commonDemandDetail } from "../../../../../utils/statisticsApi";
|
||
|
|
||
|
Page({
|
||
|
data: {
|
||
|
detail: {},
|
||
|
id: '',
|
||
|
process: [],
|
||
|
isDispatch: false,
|
||
|
isSupervision: false,
|
||
|
type: '1',
|
||
|
isShowOrder: 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()
|
||
|
this.setData({
|
||
|
isShowOrder: true
|
||
|
})
|
||
|
},
|
||
|
orderClose() {
|
||
|
this.setData({
|
||
|
isShowOrder: false
|
||
|
})
|
||
|
},
|
||
|
|
||
|
})
|