|
|
@ -1,21 +1,18 @@ |
|
|
|
<template> |
|
|
|
<view class="page-wraper"> |
|
|
|
<view class="page-header"> |
|
|
|
<view class='page-header-box'> |
|
|
|
<view class="page-header-box"> |
|
|
|
<view class="header_job_top"> |
|
|
|
<request-top :dataContent="requestContent"></request-top> |
|
|
|
</view> |
|
|
|
<view class="header_item"> |
|
|
|
供应商 : {{requestContent.supplierCode}} |
|
|
|
</view> |
|
|
|
<view class="header_item"> 供应商 : {{ requestContent.supplierCode }} </view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="page-main"> |
|
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
|
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|
|
|
<view class=""> |
|
|
|
<com-request-detail-card :dataContent="item" @openDetail="openDetail"> |
|
|
|
</com-request-detail-card> |
|
|
|
<com-request-detail-card :dataContent="item" @openDetail="openDetail"> </com-request-detail-card> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
@ -26,33 +23,18 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
import { |
|
|
|
ref, |
|
|
|
getCurrentInstance, |
|
|
|
onMounted |
|
|
|
} from 'vue' |
|
|
|
import { |
|
|
|
onLoad, |
|
|
|
onNavigationBarButtonTap, |
|
|
|
onPullDownRefresh |
|
|
|
} from '@dcloudio/uni-app' |
|
|
|
import { |
|
|
|
getPurchaseReturnRequestDetail, |
|
|
|
|
|
|
|
} from '@/api/request2.js'; |
|
|
|
|
|
|
|
import { |
|
|
|
goHome, |
|
|
|
} from '@/common/basic.js'; |
|
|
|
import { ref, getCurrentInstance, onMounted } from 'vue' |
|
|
|
import { onLoad, onNavigationBarButtonTap, onPullDownRefresh } from '@dcloudio/uni-app' |
|
|
|
import { getPurchaseReturnRequestDetail } from '@/api/request2.js' |
|
|
|
|
|
|
|
import { |
|
|
|
getDataSource, |
|
|
|
} from '@/common/detail.js'; |
|
|
|
import { goHome } from '@/common/basic.js' |
|
|
|
|
|
|
|
import { getDataSource } from '@/common/detail.js' |
|
|
|
|
|
|
|
import comRequestDetailCard from "@/mycomponents/detail/comRequestDetailCard.vue" |
|
|
|
import comRequestDetailCard from '@/mycomponents/detail/comRequestDetailCard.vue' |
|
|
|
import requestDetailInfoPopup from '@/pages/purchaseReturn/coms/requestDetailInfoPopup.vue' |
|
|
|
import requestTop from "@/mycomponents/request/requestTop.vue" |
|
|
|
import requestTop from '@/mycomponents/request/requestTop.vue' |
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance() |
|
|
|
|
|
|
|
const id = ref('') |
|
|
@ -62,56 +44,56 @@ |
|
|
|
const comMessageRef = ref() |
|
|
|
const jobDetailPopup = ref() |
|
|
|
onLoad((option) => { |
|
|
|
id.value = option.id; |
|
|
|
getDetail(); |
|
|
|
id.value = option.id |
|
|
|
uni.setNavigationBarTitle({ |
|
|
|
title: `${option.title}详情` |
|
|
|
}) |
|
|
|
getDetail() |
|
|
|
}) |
|
|
|
// 返回首页 |
|
|
|
onNavigationBarButtonTap((e) => { |
|
|
|
if (e.index === 0) { |
|
|
|
goHome(); |
|
|
|
goHome() |
|
|
|
} |
|
|
|
}) |
|
|
|
onPullDownRefresh(() => { |
|
|
|
getDetail(); |
|
|
|
uni.stopPullDownRefresh(); |
|
|
|
getDetail() |
|
|
|
uni.stopPullDownRefresh() |
|
|
|
}) |
|
|
|
const getDetail = () => { |
|
|
|
proxy.$modal.loading('加载中....') |
|
|
|
getPurchaseReturnRequestDetail(id.value).then(res => { |
|
|
|
proxy.$modal.closeLoading(); |
|
|
|
getPurchaseReturnRequestDetail(id.value) |
|
|
|
.then((res) => { |
|
|
|
proxy.$modal.closeLoading() |
|
|
|
if (res.data == null) { |
|
|
|
showMessage('未获取到详情'); |
|
|
|
} else { |
|
|
|
if (res.data.subList.length > 0) { |
|
|
|
requestContent.value = res.data; |
|
|
|
subList.value = res.data.subList; |
|
|
|
subList.value.forEach(res => { |
|
|
|
showMessage('未获取到详情') |
|
|
|
} else if (res.data.subList.length > 0) { |
|
|
|
requestContent.value = res.data |
|
|
|
subList.value = res.data.subList |
|
|
|
subList.value.forEach((res) => { |
|
|
|
// res.fromLocationCode = res.toLocationCode |
|
|
|
res.locationCode = res.fromLocationCode |
|
|
|
}) |
|
|
|
detailSource.value = getDataSource(subList.value); |
|
|
|
detailSource.value = getDataSource(subList.value) |
|
|
|
} else { |
|
|
|
showMessage('列表数据为0'); |
|
|
|
showMessage('列表数据为0') |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
proxy.$modal.closeLoading(); |
|
|
|
}) |
|
|
|
.catch((error) => { |
|
|
|
proxy.$modal.closeLoading() |
|
|
|
showMessage(error) |
|
|
|
}) |
|
|
|
} |
|
|
|
const showMessage = (message) => { |
|
|
|
comMessageRef.value.showMessage(message, res => { |
|
|
|
comMessageRef.value.showMessage(message, (res) => { |
|
|
|
if (res) { |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const openDetail = (item) => { |
|
|
|
jobDetailPopup.value.openPopup(item) |
|
|
|
} |
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
|
|
|
|
</style> |
|
|
|
<style scoped lang="scss"></style> |
|
|
|