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
| <template>
| <view-grid
| ref="grid"
| :columns="columns"
| :editFormFields="editFormFields"
| :editFormOptions="editFormOptions"
| :searchFormFields="searchFormFields"
| :searchFormOptions="searchFormOptions"
| :table="table"
| :extend="extend">
| </view-grid>
| </template>
|
| <script>
| import extend from "@/extension/stock/Dt_PlasticContainerLedger.js";
| import { ref, defineComponent } from "vue";
|
| export default defineComponent({
| setup() {
| const table = ref({
| key: "id",
| footer: "Foots",
| cnName: "胶箱台账",
| name: "plasticContainerLedger",
| url: "/PlasticContainerLedger/",
| sortName: "createDate",
| });
|
| // 编辑字段
| const editFormFields = ref({
| supplyCode: "",
| palletCode: "",
| remark: "",
| });
|
| const editFormOptions = ref([
| [
| { field: "supplyCode", title: "供应商编号", type: "string" },
| { field: "palletCode", title: "托盘编号", type: "string" },
| ],
| [
| { field: "remark", title: "备注", type: "textarea", span: 24 }
| ]
| ]);
|
| // 搜索条件
| const searchFormFields = ref({
| supplyCode: "",
| palletCode: "",
| createDate: "",
| });
|
| const searchFormOptions = ref([
| [
| { title: "供应商编号", field: "supplyCode", type: "like" },
| { title: "托盘编号", field: "palletCode", type: "like" },
| { title: "借出时间", field: "createDate", type: "datetime" },
| ]
| ]);
|
| // 表格列 完全对应 Dt_PlasticContainerLedger
| const columns = ref([
| { field: "id", title: "ID", type: "int", width: 70, align: "left", hidden: true },
| { field: "supplyCode", title: "供应商编号", type: "string", width: 140, align: "left" },
| { field: "palletCode", title: "托盘编号", type: "string", width: 150, align: "left" },
| { field: "remark", title: "备注", type: "string", width: 220, align: "left" },
| { field: "creater", title: "创建人", type: "string", width: 100, align: "left" },
| { field: "createDate", title: "借出时间", type: "datetime", width: 180, align: "left" },
| ]);
|
| return {
| table,
| extend,
| editFormFields,
| editFormOptions,
| searchFormFields,
| searchFormOptions,
| columns
| };
| },
| });
| </script>
|
|