|
|
@@ -1,11 +1,35 @@
|
|
|
-<!-- 预售大厅-我的预售-详情 -->
|
|
|
+<!-- 集采交易-我的集采-详情 -->
|
|
|
<template>
|
|
|
<app-drawer class="g-details" title="详情" :width="960" v-model:show="show">
|
|
|
- <app-table-details title="预售信息" :label-width="100" :data="selectedRow" :cell-props="details1" :column="2" />
|
|
|
- <app-table-details title="钻石参考信息" :label-width="100" :data="selectedRow" :cell-props="details2" :column="2" />
|
|
|
+ <app-table-details title="预售信息" :label-width="140" :data="selectedRow" :cell-props="details1" :column="2">
|
|
|
+ <!-- 采购保证金比例 -->
|
|
|
+ <template #buymarginvalue="{ value }">
|
|
|
+ {{ parsePercent(value) }}
|
|
|
+ </template>
|
|
|
+ <!-- 状态 -->
|
|
|
+ <template #presalestatus="{ value }">
|
|
|
+ {{ getWRPresaleStatusName(value) }}
|
|
|
+ </template>
|
|
|
+ <!-- 履约方式 -->
|
|
|
+ <template #performancetemplateid="{ value }">
|
|
|
+ <app-performance-rule :item="getPerformanceTemplateById(value)" />
|
|
|
+ </template>
|
|
|
+ </app-table-details>
|
|
|
+ <app-table-details title="钻石参考信息" :label-width="140" :data="selectedRow" :cell-props="details2" :column="2">
|
|
|
+ <!-- 生产方式 -->
|
|
|
+ <template #ysproductionmode="{ value }">
|
|
|
+ {{ getYSProductionModeName(value) }}
|
|
|
+ </template>
|
|
|
+ <!-- 图片 -->
|
|
|
+ <template #pictureurls>
|
|
|
+ <template v-for="(url, index) in imageUrl" :key="index">
|
|
|
+ <el-image :src="url" :preview-src-list="imageUrl" fit="cover" />
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </app-table-details>
|
|
|
<app-table :data="dataList" :columns="columns" :show-toolbar="false" :loading="loading" border>
|
|
|
<template #header>
|
|
|
- <h3 class="g-details__title">认购信息</h3>
|
|
|
+ <h3 class="g-details__title">采购信息</h3>
|
|
|
</template>
|
|
|
<template #footer>
|
|
|
<app-pagination :total="total" v-model:page-size="pageSize" v-model:page-index="pageIndex" @change="run" />
|
|
|
@@ -15,14 +39,18 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef, PropType } from 'vue'
|
|
|
+import { shallowRef, reactive, PropType, onMounted } from 'vue'
|
|
|
import { ElMessage } from 'element-plus'
|
|
|
+import { getFileUrl, parsePercent } from '@/filters'
|
|
|
+import { getWRPresaleStatusName, getYSProductionModeName } from '@/constants/presale'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
|
+import { performanceStore } from '@/stores'
|
|
|
import { queryGZMyPresell } from '@/services/api/presale'
|
|
|
import AppDrawer from '@pc/components/base/drawer/index.vue'
|
|
|
import AppTable from '@pc/components/base/table/index.vue'
|
|
|
import AppPagination from '@pc/components/base/pagination/index.vue'
|
|
|
import AppTableDetails from '@pc/components/base/table-details/index.vue'
|
|
|
+import AppPerformanceRule from '@pc/components/modules/performance-rule/index.vue'
|
|
|
|
|
|
const props = defineProps({
|
|
|
selectedRow: {
|
|
|
@@ -31,7 +59,10 @@ const props = defineProps({
|
|
|
},
|
|
|
})
|
|
|
|
|
|
+const { getPerformanceTemplateById } = performanceStore.actions
|
|
|
const show = shallowRef(true)
|
|
|
+const imageUrl = reactive<string[]>([])
|
|
|
+
|
|
|
const { loading, dataList, total, pageIndex, pageSize, run } = useRequest(queryGZMyPresell, {
|
|
|
params: {
|
|
|
pagesize: 10,
|
|
|
@@ -44,9 +75,9 @@ const { loading, dataList, total, pageIndex, pageSize, run } = useRequest(queryG
|
|
|
|
|
|
const details1 = [
|
|
|
{ prop: 'wrstandardname', label: '商品名称:' },
|
|
|
- { prop: 'createtime', label: '申请日期:' },
|
|
|
- { prop: 'presaleqty', label: '预售总量:' },
|
|
|
- { prop: 'unitprice', label: '预售价格:' },
|
|
|
+ { prop: 'customername', label: '卖方:' },
|
|
|
+ { prop: 'presaleqty', label: '集采总量:' },
|
|
|
+ { prop: 'yszscategory', label: '钻石类型:' },
|
|
|
{ prop: 'minbuyqty', label: '最小采购单位:' },
|
|
|
{ prop: 'minsuccessqty', label: '最低成团量:' },
|
|
|
{ prop: 'maxbuyqty', label: '最大采购单位:' },
|
|
|
@@ -54,8 +85,9 @@ const details1 = [
|
|
|
{ prop: 'startdate', label: '开始日期:' },
|
|
|
{ prop: 'enddate', label: '结束日期:' },
|
|
|
{ prop: 'presalestatus', label: '状态:' },
|
|
|
- { prop: 'tradeqty', label: '已认购数量:' },
|
|
|
- { prop: 'performancetemplateid', label: '履约方式:' },
|
|
|
+ { prop: 'tradeqty', label: '已采购数量:' },
|
|
|
+ { prop: 'performancetemplateid', label: '履约方式:', entireRow: true },
|
|
|
+ { prop: 'price', label: '集采价格:', entireRow: true },
|
|
|
]
|
|
|
|
|
|
const details2 = [
|
|
|
@@ -66,13 +98,35 @@ const details2 = [
|
|
|
{ prop: 'qtydesc', label: '数量描述:' },
|
|
|
{ prop: 'weightdesc', label: '重量描述:' },
|
|
|
{ prop: 'ysproductionmode', label: '生产方式:' },
|
|
|
- { prop: 'pictureurls', label: '图片:' },
|
|
|
- { prop: 'remark', label: '备注:' },
|
|
|
+ { prop: 'pictureurls', label: '图片:', entireRow: true },
|
|
|
+ { prop: 'remark', label: '备注:', entireRow: true },
|
|
|
]
|
|
|
|
|
|
const columns: Ermcp.TableColumn[] = [
|
|
|
- { prop: 'customername', label: '认购方' },
|
|
|
+ { prop: 'customername', label: '采购方' },
|
|
|
{ prop: 'orderqty', label: '认购数量(ct)' },
|
|
|
- { prop: 'ordertime', label: '认购时间' },
|
|
|
+ { prop: 'tradeprice', label: '采购价格(元/克拉)' },
|
|
|
+ { prop: 'ordertime', label: '采购时间' },
|
|
|
]
|
|
|
-</script>
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ const images = props.selectedRow.pictureurls.split(',')
|
|
|
+ images.forEach((url) => {
|
|
|
+ if (url) {
|
|
|
+ imageUrl.push(getFileUrl(url))
|
|
|
+ }
|
|
|
+ })
|
|
|
+})
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.el-image {
|
|
|
+ width: 64px;
|
|
|
+ height: 64px;
|
|
|
+ border: 1px solid #ccc;
|
|
|
+
|
|
|
+ +.el-image {
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|