111 lines
3.6 KiB
Vue

<template>
<uni-drawer ref="drawerContainerRef" :width="width" mode="right">
<uni-nav-bar
:border="false"
:fixed="true"
left-icon="left"
status-bar
title="价格审核"
@clickLeft="hideDrawer"
/>
<uni-collapse ref="collapse">
<uni-collapse-item
v-for="row in tableData"
:key="row.creditHistId"
:title="`商品名称: ${row.shortName}`"
open
>
<view class="padding">
<view class="context">
<view class="label">
<text>发货仓库:</text>
<text>{{ row.warehouseName }}</text>
</view>
<view class="label">
<text>新考核价(,含税):</text>
<text>{{ row.checkPrice }}</text>
</view>
<view class="label">
<text>新开票价(,含税):</text>
<text>{{ row.invoicePrice }}</text>
</view>
<view class="label">
<text>原考核价(,无税):</text>
<text>{{ row.oldCheckPrice }}</text>
</view>
<view class="label">
<text>原开票价(,无税):</text>
<text>{{ row.oldInvoicePrice }}</text>
</view>
<view class="label">
<text>状态:</text>
<text>{{ row.state }}</text>
</view>
<view class="label">
<text>更新日期:</text>
<text>{{ row.updateTime }}</text>
</view>
<view class="label">
<text></text>
<button class="mini-btn" size="mini" type="primary" @click="handleFinalReview(row)">查看</button>
</view>
</view>
</view>
</uni-collapse-item>
</uni-collapse>
</uni-drawer>
<PriceFinalReview ref="PriceFinalReviewRef" @refresh="handleQuery"/>
</template>
<script setup>
import {defineExpose, defineOptions, ref} from 'vue'
import {getCreditPerRepeatReviewlist} from "../../../../api/AccountPriceFinallReview";
import PriceFinalReview from "./components/PriceFinalReview.vue";
defineOptions({
name: "PriceFinal"
})
const width = ref(document.documentElement.clientWidth || document.body.clientWidth)
const queryParams = ref({})
const tableData = ref([])
const total = ref()
const paging = ref({
pageNum: 1,
pageSize: 100,
})
const drawerContainerRef = ref()
const PriceFinalReviewRef = ref()
const handleQuery = async () => {
uni.showLoading({
title: '加载中'
});
const {rows, total: count} = await getCreditPerRepeatReviewlist(queryParams.value, paging.value)
tableData.value = rows
total.value = count
uni.hideLoading()
}
const openDrawer = async (item) => {
drawerContainerRef.value.open()
queryParams.value = {
userId: item.userId,
type: 0
}
await handleQuery()
}
defineExpose({openDrawer})
const hideDrawer = () => {
drawerContainerRef.value.close()
}
const handleFinalReview = (item) => {
PriceFinalReviewRef.value.openDrawer(item)
}
</script>