|
|
@@ -1,119 +0,0 @@
|
|
1
|
|
-<!-- 应急物资分类表 -->
|
|
2
|
|
-<template>
|
|
3
|
|
- <basic-container>
|
|
4
|
|
- <el-form class="whole_form">
|
|
5
|
|
- <el-row :gutter="20">
|
|
6
|
|
- <el-col :span="6">
|
|
7
|
|
- <el-form-item label="仓库名称">
|
|
8
|
|
- <el-input v-model="searchList.materialNameVo" clearable />
|
|
9
|
|
- </el-form-item>
|
|
10
|
|
- </el-col>
|
|
11
|
|
- <el-col :span="6">
|
|
12
|
|
- <el-button type="primary" @click="getList">搜索</el-button>
|
|
13
|
|
- <el-button @click="clearSearch">清空</el-button>
|
|
14
|
|
- <el-button type="primary" :icon="Plus" @click="openDetail">新增</el-button>
|
|
15
|
|
- </el-col>
|
|
16
|
|
- </el-row>
|
|
17
|
|
- </el-form>
|
|
18
|
|
- <el-table :data="tableData" style="width: 100%" stripe border>
|
|
19
|
|
- <el-table-column type="index" label="序号" align="center" width="60" />
|
|
20
|
|
- <el-table-column prop="materialGroup" label="仓库全称" align="center" />
|
|
21
|
|
- <el-table-column prop="materialGroup" label="仓库类型" align="center" />
|
|
22
|
|
- <el-table-column prop="materialType" label="管理机构" align="center" />
|
|
23
|
|
- <el-table-column prop="materialName" label="地址" align="center" />
|
|
24
|
|
- <el-table-column prop="quantity" label="法人" align="center" width="80" />
|
|
25
|
|
- <el-table-column prop="outboundTime" label="联系电话" align="center" width="115" />
|
|
26
|
|
- <el-table-column fixed="right" label="操作" width="150" align="center">
|
|
27
|
|
- <template #default="{ row }">
|
|
28
|
|
- <el-button link type="success" size="small" @click="openDetail(row, 'look')">查看</el-button>
|
|
29
|
|
- </template>
|
|
30
|
|
- </el-table-column>
|
|
31
|
|
- </el-table>
|
|
32
|
|
- <pagination
|
|
33
|
|
- v-show="page.total > 0"
|
|
34
|
|
- v-model:page="page.currentPage"
|
|
35
|
|
- v-model:limit="page.pageSize"
|
|
36
|
|
- :total="page.total"
|
|
37
|
|
- @pagination="getList"
|
|
38
|
|
- />
|
|
39
|
|
- </basic-container>
|
|
40
|
|
-</template>
|
|
41
|
|
-
|
|
42
|
|
-<script setup lang="ts">
|
|
43
|
|
-import { Plus } from "@element-plus/icons-vue";
|
|
44
|
|
-import { ref, reactive, onMounted } from "vue";
|
|
45
|
|
-
|
|
46
|
|
-import { getInPage, deleteInData } from "@/api/inAndOut/formationFilling/in";
|
|
47
|
|
-import router from "@/router";
|
|
48
|
|
-import { ElMessage } from "element-plus";
|
|
49
|
|
-import { useDict } from '@/hooks/dict';
|
|
50
|
|
-
|
|
51
|
|
-const { outdound_type, is_available, province_ch, auditing_status } = useDict('outdound_type', 'is_available', 'province_ch', 'auditing_status');
|
|
52
|
|
-
|
|
53
|
|
-const searchList = ref({
|
|
54
|
|
- outboundType: "",
|
|
55
|
|
- materialNameVo: ""
|
|
56
|
|
-});
|
|
57
|
|
-const tableData: any = ref([]);
|
|
58
|
|
-const page = reactive({
|
|
59
|
|
- currentPage: 1,
|
|
60
|
|
- pageSize: 10,
|
|
61
|
|
- total: 0
|
|
62
|
|
-});
|
|
63
|
|
-const handleClick = () => {
|
|
64
|
|
- console.log("click");
|
|
65
|
|
-};
|
|
66
|
|
-// 根据码回显中文
|
|
67
|
|
-const showCh = (value, option) => {
|
|
68
|
|
- const filterItem = option.filter((item) => item.value == value)
|
|
69
|
|
- return filterItem.length ? filterItem[0].label : '-'
|
|
70
|
|
-}
|
|
71
|
|
-
|
|
72
|
|
-// 清空搜索条件
|
|
73
|
|
-const clearSearch = () => {
|
|
74
|
|
- searchList.value = {
|
|
75
|
|
- outboundType: "",
|
|
76
|
|
- materialNameVo: ""
|
|
77
|
|
- };
|
|
78
|
|
- getList();
|
|
79
|
|
-};
|
|
80
|
|
-/** 添加/修改/查看进入详情操作 */
|
|
81
|
|
-const openDetail = (row: any, type) => {
|
|
82
|
|
- router.push({
|
|
83
|
|
- path: "/basic/basicDetail",
|
|
84
|
|
- query: {id: row.outboundId, type: type, random: Math.random()}
|
|
85
|
|
- });
|
|
86
|
|
-};
|
|
87
|
|
-/** 列表数据获取 */
|
|
88
|
|
-const getList = () => {
|
|
89
|
|
- const data = reactive({
|
|
90
|
|
- size: page.pageSize,
|
|
91
|
|
- current: page.currentPage,
|
|
92
|
|
- ...searchList.value
|
|
93
|
|
- });
|
|
94
|
|
- getOutPage(data).then((res: any) => {
|
|
95
|
|
- if (res.code === 0) {
|
|
96
|
|
- tableData.value = res.data.records;
|
|
97
|
|
- page.total = res.data.total;
|
|
98
|
|
- }
|
|
99
|
|
- });
|
|
100
|
|
-};
|
|
101
|
|
-/** 删除操作 */
|
|
102
|
|
-const deleteClick = (row) => {
|
|
103
|
|
- deleteOutData(row.outboundId).then((res: any) => {
|
|
104
|
|
- if (res.code === 0) {
|
|
105
|
|
- getList();
|
|
106
|
|
- ElMessage({
|
|
107
|
|
- message: "删除成功!",
|
|
108
|
|
- type: "success"
|
|
109
|
|
- });
|
|
110
|
|
- }
|
|
111
|
|
- });
|
|
112
|
|
-};
|
|
113
|
|
-/** 初始化 **/
|
|
114
|
|
-onMounted(() => {
|
|
115
|
|
- getList();
|
|
116
|
|
-})
|
|
117
|
|
-</script>
|
|
118
|
|
-
|
|
119
|
|
-<style lang="scss" scoped></style>
|