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