|
@@ -0,0 +1,86 @@
|
|
|
+<template>
|
|
|
+ <window-size>
|
|
|
+ <van-empty v-if="showEmpty" :image="empty" description="暂无数据"></van-empty>
|
|
|
+ <div class="card-list">
|
|
|
+ <div v-for="drug in dataList">
|
|
|
+ <van-card
|
|
|
+ :desc="drug.createTime"
|
|
|
+ :title="drug.drugName"
|
|
|
+ :thumb="drug.drugImg"
|
|
|
+ >
|
|
|
+ <template #tags>
|
|
|
+ <van-tag plain :type="drug.tagType1">
|
|
|
+ {{drug.tagContent1}}
|
|
|
+ </van-tag>
|
|
|
+ <van-tag plain :type="drug.tagType2" style="margin-left: 4px;">
|
|
|
+ {{drug.tagContent2}}
|
|
|
+ </van-tag>
|
|
|
+ </template>
|
|
|
+ <template #price>
|
|
|
+ ¥{{drug.prepayAmt}}
|
|
|
+ </template>
|
|
|
+ <template #num>
|
|
|
+ x{{drug.drugQuantity}}
|
|
|
+ <van-button
|
|
|
+ v-if="drug.showPayButton"
|
|
|
+ size="mini"
|
|
|
+ style="margin-left: 4px"
|
|
|
+ @click="goPayPreAmt(drug)"
|
|
|
+ >
|
|
|
+ 支付订金
|
|
|
+ </van-button>
|
|
|
+ </template>
|
|
|
+ </van-card>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </window-size>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+import empty from "@/assets/empty.png";
|
|
|
+import {computed, onMounted, ref} from "vue";
|
|
|
+import {getHistoryPurchase} from "@/api/import-drug-purchase";
|
|
|
+import store from "@/store";
|
|
|
+import router from "@/router";
|
|
|
+
|
|
|
+const defaultCard = store.getters.getDefaultCard
|
|
|
+
|
|
|
+const dataList = ref([])
|
|
|
+const showEmpty = computed(() => {
|
|
|
+ return dataList.value.length === 0
|
|
|
+})
|
|
|
+
|
|
|
+function goPayPreAmt(drug) {
|
|
|
+ let createOrderRequest = {
|
|
|
+ hisOrdNum: 'NONE',
|
|
|
+ patientId: defaultCard.patientId || 'none',
|
|
|
+ chargeList: [],
|
|
|
+ body: '药品申购订金',
|
|
|
+ orderType: 9,
|
|
|
+ totalFee: drug.prepayAmt,
|
|
|
+ drugPurchaseId: drug.id,
|
|
|
+ fundpayAmt: 0,
|
|
|
+ acctpayAmt: 0,
|
|
|
+ couponAmt: 0,
|
|
|
+ }
|
|
|
+ store.dispatch({
|
|
|
+ type: 'storeCreateOrderRequest',
|
|
|
+ createOrderRequest
|
|
|
+ }).then(() => {
|
|
|
+ router.push('/cashier');
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ getHistoryPurchase().then(res => {
|
|
|
+ dataList.value = res
|
|
|
+ })
|
|
|
+})
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.card-list {
|
|
|
+ height: 100%;
|
|
|
+ overflow-y: auto;
|
|
|
+}
|
|
|
+</style>
|