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.

138 lines
3.2 KiB

12 months ago
<template>
<view class="page-wraper">
10 months ago
<view class="page-header">
<view class="header_job_top">
<request-top :dataContent="requestContent"></request-top>
</view>
<view class="header_item">
<work-station :workshopCode="requestContent.workshopCode"
:productionLineCode="titleInfo.productionLineCode" :workStationCode="titleInfo.workStationCode"
:rawLocationCode="titleInfo.toLocationCode"></work-station>
</view>
</view>
<u-line color="#D8D8D8" />
12 months ago
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
12 months ago
<view class="detail-list">
12 months ago
<view class="">
11 months ago
<comIssueRequestDetailCard :dataContent="requestContent">
</comIssueRequestDetailCard>
12 months ago
</view>
</view>
</scroll-view>
<!-- <div class="btn_bottom" >
11 months ago
<view class="" style="display: flex;flex-direction: row;">
<view class="">
<button class="btn_commit" hover-class="btn_commit_after" @click="submit()">提交</button>
</view>
</view>
</div> -->
12 months ago
</view>
<com-message ref="comMessage"></com-message>
</view>
</template>
<script>
import {
getIssueRequestDetail,
} from '@/api/request2.js';
import {
goHome,
updateTitle
} from '@/common/basic.js';
import {
getDataSource,
} from '@/common/detail.js';
11 months ago
import comIssueRequestDetailCard from "@/pages/issue/coms/comIssueRequestDetailCard.vue"
12 months ago
import comMessage from '@/mycomponents/common/comMessage.vue'
10 months ago
import requestTop from "@/mycomponents/request/requestTop.vue"
import workStation from '@/mycomponents/workStation/workStation.vue'
11 months ago
12 months ago
export default {
components: {
11 months ago
comIssueRequestDetailCard,
12 months ago
comMessage,
10 months ago
requestTop,
workStation
12 months ago
},
data() {
return {
id: '',
requestContent: {}, //任务内容
12 months ago
subList: [], //接口返回的任务
10 months ago
type: 'query', //来源新增add, query查询
titleInfo: {}
12 months ago
};
},
onLoad(option) {
11 months ago
this.id = option.id;
this.getDetail();
12 months ago
},
10 months ago
12 months ago
//返回首页
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}
},
onPullDownRefresh() {
this.getDetail();
uni.stopPullDownRefresh();
},
mounted() {
},
methods: {
getDetail() {
var that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
getIssueRequestDetail(that.id).then(res => {
uni.hideLoading();
if (res.data == null) {
that.showMessage('未获取到详情');
} else {
12 months ago
if (res.data.subList.length > 0) {
that.requestContent = res.data;
10 months ago
11 months ago
that.requestContent.subList = res.data.subList;
10 months ago
that.titleInfo = that.requestContent.subList[0]
12 months ago
that.subList = res.data.subList;
// that.subList.forEach(res => {
// res.fromLocationCode = res.toLocationCode
// })
// that.detailSource = getDataSource(that.subList);
// updateTitle(this.requestContent.number);
12 months ago
} else {
that.showMessage('列表数据为0');
}
12 months ago
}
}).catch(error => {
uni.hideLoading()
this.showMessage(error)
})
},
12 months ago
12 months ago
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
12 months ago
if (res) {}
12 months ago
});
},
}
}
</script>
<style scoped lang="scss">
</style>