feat: 🚀 完工
This commit is contained in:
47
src/views/foundation/set/goods/preview.vue
Normal file
47
src/views/foundation/set/goods/preview.vue
Normal file
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<div class="table-box">
|
||||
<div>
|
||||
<div style="padding-bottom: 16px">
|
||||
<el-button type="primary" @click="handleBlack">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-box card">
|
||||
<div style="display: flex">
|
||||
<el-table :data="dataStore.tableData" border style="width: 70%">
|
||||
<el-table-column type="index" :index="indexMethod" label="序号" width="100" />
|
||||
<el-table-column prop="position" label="仓位" />
|
||||
<el-table-column prop="priority_item" label="匹配项" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="foundationSetGoodsPreview">
|
||||
import { getGoodsPreviewApi } from "@/api/modules/setGoods";
|
||||
const $router = useRouter();
|
||||
const route = useRoute();
|
||||
const dataStore = reactive<any>({
|
||||
tableData: []
|
||||
});
|
||||
const indexMethod = (index: number) => {
|
||||
return index + 1;
|
||||
};
|
||||
//预览
|
||||
const getGoodsPreview = async () => {
|
||||
const result = await getGoodsPreviewApi(route.query.id);
|
||||
if (result?.code === 0) {
|
||||
dataStore.tableData = result?.data ? result?.data : [];
|
||||
console.log(result?.data);
|
||||
}
|
||||
};
|
||||
getGoodsPreview();
|
||||
const handleBlack = () => {
|
||||
$router.push({
|
||||
path: "/foundation/set/goods/add",
|
||||
query: { id: route.query.id, title: route.query.name }
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
Reference in New Issue
Block a user