108 lines
3.6 KiB
Vue

<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-tabs v-model="activeName" class="demo-tabs" @tab-change="tabChange">
<el-tab-pane label="概况" name="detail">
<el-descriptions class="margin-top" :column="4" border>
<<<<<<< HEAD
<!-- <template #extra>
<el-button type="primary">Operation</el-button>
</template> -->
=======
>>>>>>> 1f12492c0c5a598c6a3a40a6943f3335aff92557
<el-descriptions-item :span="4" label="单据编号">
{{ form.number }}
</el-descriptions-item>
<el-descriptions-item :span="2" label="单据金额">
{{ form.total }}
</el-descriptions-item>
<el-descriptions-item :span="2" label="抵扣金额">
{{ form.deduction_price }}
</el-descriptions-item>
<el-descriptions-item :span="2" label="实际金额">
{{ form.actual }}
</el-descriptions-item>
<el-descriptions-item :span="2" label="实收金额">
{{ form.money }}
</el-descriptions-item>
<el-descriptions-item label="所属商户">
{{ form.merchant_name }}
</el-descriptions-item>
</el-descriptions>
<el-table
:data="form.goods_info"
border
style="width: 100%; margin-top: 20px"
>
<el-table-column prop="id" label="ID" width="120" />
<el-table-column prop="goods_name" label="商品名称" />
<el-table-column prop="price" label="单价(元)" />
<el-table-column prop="unit_name" label="单位" />
<el-table-column prop="nums" label="数量" />
<el-table-column prop="total" label="合计(元)" />
<el-table-column prop="nums_count" label="已采纳数量" />
</el-table>
</el-tab-pane>
<el-tab-pane label="商户订单" name="order">
<subOrder ref="subOrderRef" />
</el-tab-pane>
<el-tab-pane label="报价列表" name="offer">
<goodsOffer ref="goodsOfferRef" />
</el-tab-pane>
<el-tab-pane label="未推送商品" name="notPushedGoods">
<noPush ref="noPushRef" />
</el-tab-pane>
</el-tabs>
</el-card>
</div>
</template>
<script lang="ts" setup name="opurchaseclassDetail">
import { usePaging } from "@/hooks/usePaging";
<<<<<<< HEAD
import { useDictData } from "@/hooks/useDictOptions";
=======
>>>>>>> 1f12492c0c5a598c6a3a40a6943f3335aff92557
import {
apiOpurchaseclassLists,
apiOpurchaseclassDelete,
apiOpurchaseclassDetail,
} from "@/api/opurchaseclass";
import { useRoute } from "vue-router";
import subOrder from "./component/subOrder.vue";
import goodsOffer from "./component/goodsOffer.vue";
import noPush from "./component/noPush.vue";
const route = useRoute();
const form = ref({});
const activeName = ref("detail");
const activeMap = ref(
new Map([
["detail", true],
["order", false],
["offer", false],
["notPushedGoods", false],
])
);
const getDetail = async () => {
const data = await apiOpurchaseclassDetail({
id: route.query.id,
});
form.value = data;
};
getDetail();
const subOrderRef = ref(null);
const goodsOfferRef = ref(null);
const noPushRef = ref(null);
const tabChange = (type: any) => {
if (!activeMap.value.get(type)) {
activeMap.value.set(type, true);
if (type == "order") subOrderRef.value?.getLists();
if (type == "offer") goodsOfferRef.value?.getLists();
if (type == "notPushedGoods") noPushRef.value?.getLists();
}
};
</script>