zhang_li
3 months ago
9 changed files with 132 additions and 122 deletions
@ -1,117 +1,99 @@ |
|||||
<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 class="page-main"> |
||||
</view> |
<scroll-view scroll-y="true" class="page-main-scroll"> |
||||
<view class="page-main"> |
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
||||
<scroll-view scroll-y="true" class="page-main-scroll"> |
<view class=""> |
||||
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
<com-request-detail-card :dataContent="item" @openDetail="openDetail"> </com-request-detail-card> |
||||
<view class=""> |
</view> |
||||
<com-request-detail-card :dataContent="item" @openDetail="openDetail"> |
</view> |
||||
</com-request-detail-card> |
</scroll-view> |
||||
</view> |
</view> |
||||
</view> |
<request-detail-info-popup ref="jobDetailPopup"></request-detail-info-popup> |
||||
</scroll-view> |
<com-message ref="comMessageRef" /> |
||||
</view> |
</view> |
||||
<request-detail-info-popup ref="jobDetailPopup"></request-detail-info-popup> |
|
||||
<com-message ref="comMessageRef" /> |
|
||||
</view> |
|
||||
</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 { getDataSource } from '@/common/detail.js' |
||||
goHome, |
|
||||
} from '@/common/basic.js'; |
|
||||
|
|
||||
import { |
import comRequestDetailCard from '@/mycomponents/detail/comRequestDetailCard.vue' |
||||
getDataSource, |
import requestDetailInfoPopup from '@/pages/purchaseReturn/coms/requestDetailInfoPopup.vue' |
||||
} from '@/common/detail.js'; |
import requestTop from '@/mycomponents/request/requestTop.vue' |
||||
|
|
||||
|
const { proxy } = getCurrentInstance() |
||||
|
|
||||
import comRequestDetailCard from "@/mycomponents/detail/comRequestDetailCard.vue" |
const id = ref('') |
||||
import requestDetailInfoPopup from '@/pages/purchaseReturn/coms/requestDetailInfoPopup.vue' |
const requestContent = ref({}) |
||||
import requestTop from "@/mycomponents/request/requestTop.vue" |
const subList = ref([]) |
||||
const { proxy } = getCurrentInstance() |
const detailSource = ref([]) |
||||
|
const comMessageRef = ref() |
||||
const id = ref('') |
const jobDetailPopup = ref() |
||||
const requestContent = ref({}) |
onLoad((option) => { |
||||
const subList = ref([]) |
id.value = option.id |
||||
const detailSource = ref([]) |
uni.setNavigationBarTitle({ |
||||
const comMessageRef = ref() |
title: `${option.title}详情` |
||||
const jobDetailPopup = ref() |
}) |
||||
onLoad((option)=>{ |
getDetail() |
||||
id.value = option.id; |
}) |
||||
getDetail(); |
// 返回首页 |
||||
}) |
onNavigationBarButtonTap((e) => { |
||||
//返回首页 |
if (e.index === 0) { |
||||
onNavigationBarButtonTap((e)=> { |
goHome() |
||||
if (e.index === 0) { |
} |
||||
goHome(); |
}) |
||||
} |
onPullDownRefresh(() => { |
||||
}) |
getDetail() |
||||
onPullDownRefresh(()=> { |
uni.stopPullDownRefresh() |
||||
getDetail(); |
}) |
||||
uni.stopPullDownRefresh(); |
const getDetail = () => { |
||||
}) |
proxy.$modal.loading('加载中....') |
||||
const getDetail = ()=> { |
getPurchaseReturnRequestDetail(id.value) |
||||
proxy.$modal.loading('加载中....') |
.then((res) => { |
||||
getPurchaseReturnRequestDetail(id.value).then(res => { |
proxy.$modal.closeLoading() |
||||
proxy.$modal.closeLoading(); |
if (res.data == null) { |
||||
if (res.data == null) { |
showMessage('未获取到详情') |
||||
showMessage('未获取到详情'); |
} else if (res.data.subList.length > 0) { |
||||
} else { |
requestContent.value = res.data |
||||
if (res.data.subList.length > 0) { |
subList.value = res.data.subList |
||||
requestContent.value = res.data; |
subList.value.forEach((res) => { |
||||
subList.value = res.data.subList; |
// res.fromLocationCode = res.toLocationCode |
||||
subList.value.forEach(res => { |
res.locationCode = res.fromLocationCode |
||||
// res.fromLocationCode = res.toLocationCode |
}) |
||||
res.locationCode = res.fromLocationCode |
detailSource.value = getDataSource(subList.value) |
||||
}) |
} else { |
||||
detailSource.value = getDataSource(subList.value); |
showMessage('列表数据为0') |
||||
} else { |
} |
||||
showMessage('列表数据为0'); |
}) |
||||
} |
.catch((error) => { |
||||
} |
proxy.$modal.closeLoading() |
||||
}).catch(error => { |
showMessage(error) |
||||
proxy.$modal.closeLoading(); |
}) |
||||
showMessage(error) |
} |
||||
}) |
const showMessage = (message) => { |
||||
} |
comMessageRef.value.showMessage(message, (res) => { |
||||
const showMessage=(message) =>{ |
if (res) { |
||||
comMessageRef.value.showMessage(message, res => { |
} |
||||
if (res) { |
}) |
||||
} |
} |
||||
}); |
|
||||
} |
|
||||
|
|
||||
const openDetail=(item)=> { |
|
||||
jobDetailPopup.value.openPopup(item) |
|
||||
} |
|
||||
|
|
||||
|
const openDetail = (item) => { |
||||
|
jobDetailPopup.value.openPopup(item) |
||||
|
} |
||||
</script> |
</script> |
||||
|
|
||||
<style scoped lang="scss"> |
<style scoped lang="scss"></style> |
||||
|
|
||||
</style> |
|
||||
|
Loading…
Reference in new issue