1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
| <template>
| <div>
| <BasicTable
| @register="registerTable"
| >
| <template #toolbar>
| <a-button type="primary" @click="handleCreate"> {{t('新增盘点单')}} </a-button>
| <!-- <a-button type="primary" @click="handleCreate"> 盘点启动 </a-button>
| <a-button type="primary" @click="handleCreate"> 盘点结束 </a-button>
| <a-button type="primary" @click="handleCreate"> 撤销 </a-button> -->
| </template>
| <template #action="{ record }">
| <TableAction
| :actions="[
| {
| icon: 'clarity:info-standard-line',
| tooltip: t('查看盘点单详情'),
| onClick: handleEdit.bind(null, record),
| }
| ]"
| />
| </template>
| </BasicTable>
| <!-- <InventoryDrawer @register="registerDrawer" @success="handleSuccess" /> -->
| </div>
| </template>
| <script lang="ts">
| import { defineComponent, ref } from 'vue';
|
| import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
| // import { useDrawer } from '/@/components/Drawer';
|
| import { columns, searchFormSchema } from './inventory.data';
| import { getInventoryListByPage,CreateBillCode } from '/@/api/tigerapi/wms/inventory';
| import { buildUUID } from '/@/utils/uuid';
| import { useGo } from '/@/hooks/web/usePage';
| import { useI18n } from '/@/hooks/web/useI18n';
| const { t } = useI18n();
| export default defineComponent({
| name: 'WHManagement',
| components: { BasicTable, TableAction },
| setup() {
| const go = useGo();
| // const [registerDrawer, { openDrawer }] = useDrawer();
| const [registerTable, { reload }] = useTable({
| title: t('盘点单列表'),
| api: getInventoryListByPage,
| columns,
| formConfig: {
| labelWidth: 120,
| schemas: searchFormSchema,
| },
| useSearchForm: true,
| showTableSetting: false,
| bordered: true,
| //canResize:true,
| showIndexColumn: false,
| actionColumn: {
| width: 80,
| title: t('操作'),
| dataIndex: 'action',
| slots: { customRender: 'action' },
| fixed: 'right' //undefined,
| },
| });
|
| async function handleCreate() {
|
| const count = {ITEM_CODE:"0",ID: buildUUID()}
| go(`/inventoryDetail/${encodeURI(JSON.stringify(count))}`);
| }
|
| function handleEdit(record: Recordable) {
| // openDrawer(true, {
| // record,
| // isUpdate: true,
| // });
|
| const count = {ITEM_CODE:'1',ID: record.ID}
| go(`/inventoryDetail/${encodeURI(JSON.stringify(count))}`);
|
| }
|
| function handleSuccess() {
| reload();
| }
|
| return {
| registerTable,
| handleCreate,
| handleEdit,
| handleSuccess,
| t
| };
| },
| });
| </script>
|
|