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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
| <template>
| <div class="app-container">
| <el-container>
| <el-container>
| <el-card class="box-card" style="width: 100%" shadow="never">
| <!--搜索条件-->
| <div class="filter-container">
| <my-search ref="searchBar" :items="items" @search="fifterForm"></my-search>
| </div>
| <el-row style="margin-top: 15px">
| <el-col>
| <!--列表-->
| <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/>
| </el-col>
| </el-row>
| <!--添加/编辑弹窗-->
| <!-- <detail/>-->
| <component v-if="detailSetting.show" :setting="detailSetting" @close="detailSetting.show = false"
| :is="activeDetail"></component>
| </el-card>
| </el-container>
| </el-container>
| </div>
| </template>
|
| <script>
| import MyTableV2 from '@/components/myTable/myTableV2';
| import MyButton from '@/components/myButton/myButton';
| import SettingIplatform from '@/utils/settingIplatform';
| import myImport from '@/views/components/myImport';
| import * as DateFormatter from '@/utils/DateFormatter';
| import stockType from '@/utils/stockType';
| import detail from '../outbound/detail';
| import purchaseDetail from '@/views/stock/procure/purchaseOrder/detail.vue'; // 采购单详情
| import transferDetail from '@/views/stock/transfer/transferissue/detail.vue'; // 调拨单详情
| import inventoryDetail from '@/views/stock/inventorycount/inventorytask/detail.vue'; // 盘点单详情
| import scrapDetail from '@/views/stock/scrap/itemScrapping/detail.vue'; // 报废单详情
| import distributionDetail from '@/views/departmentitem/itemdis/distribution/detail.vue'; // 分发单详情
| import itemscrDetail from '@/views/departmentitem/itemscr/scrapping/detail.vue'; // 部门报废单详情
| import returnNoteDetail from '@/views/departmentitem/itemret/returnNote/detail.vue'; // 部门退还单详情
|
| export default {
| name: 'index',
| components: {
| MyButton,
| MyTableV2,
| detail,
| myImport,
| purchaseDetail,
| transferDetail,
| inventoryDetail,
| scrapDetail,
| distributionDetail,
| itemscrDetail,
| returnNoteDetail
| },
| data() {
| return {
| activeDetail: '',
| // 搜索框
| items: [
| {
| type: 'text',
| dataIndex: 'businessFormCode',
| label: '单号',
| placeholder: '请输入',
| defaultValue: '',
| },
| {
| type: 'select',
| dataIndex: 'flowType',
| label: '类型',
| placeholder: '请选择',
| defaultValue: '',
| options: [],
| optionsConfig: {
| label: 'dict_label',
| value: 'dict_value',
| url: SettingIplatform.apiBaseURL + '/permit/dict/data/type/FLOW_TYPE',
| },
| },
| {
| type: 'select',
| dataIndex: 'goodsTemplateId',
| label: '物品名称',
| placeholder: '请选择',
| defaultValue: '',
| options: [],
| cascader: [{key: 'baseGoodsModelsId', queryKey: 'goodsTemplatesId'}],
| optionsConfig: {
| label: 'goodsName',
| value: 'id',
| url: SettingIplatform.apiBaseURL + '/pc/base/goods/template/query/goodsTemplate',
| },
| },
| {
| type: 'select',
| dataIndex: 'baseGoodsModelsId',
| label: '规格型号',
| placeholder: '请选择',
| defaultValue: '',
| options: [],
| optionsConfig: {
| label: 'modelName',
| value: 'id',
| url: SettingIplatform.apiBaseURL + '/pc/base/goods/models/query/goodsModel',
| },
| },
| {
| type: 'cascader',
| dataIndex: 'agencyId',
| label: '机构',
| placeholder: '请选择',
| optionsConfig: {url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null},
| defaultValue: '',
| options: [],
| },
| {
| type: 'text',
| dataIndex: 'createName',
| label: '创建人',
| placeholder: '请输入',
| defaultValue: '',
| },
| {
| type: 'date-picker',
| dataIndex: 'startTime',
| label: '时间',
| defaultValue: '',
| },
| {
| type: 'date-picker',
| dataIndex: 'endTime',
| label: '至',
| defaultValue: '',
| },
| ],
| // 树数据
| treeDataList: [],
| // 搜索条件
| filterFrom: {
| tenantId: null,
| userName: null,
| userPhone: null,
| status: 1,
| },
| editSetting: {
| title: '',
| id: '',
| orgId: '',
| show: false,
| },
| detailSetting: {
| title: '详情',
| id: '',
| show: false,
| },
| // 表格数据
| table: {
| showIndex: true, // 是否显示序号
| expand: false, // 是否显示详情数据
| url: SettingIplatform.apiBaseURL + '/pc/l/wh/form/output/detail/list', // 请求地址
| // 工具条
| tools: {
| columnsCtrl: {
| // 列控制按钮
| show: false,
| },
| generalExport: {
| // 通用导出按钮
| show: false,
| },
| // 自定义工具条按钮
| custom: [],
| },
| // 列信息
| columns: [
| {
| title: '类型', field: 'thisType', align: 'left',
| formatter: (row) => {
| let result = stockType(row)
| return {value: result};
| },
| },
| {title: '单号', field: 'businessFormCode', align: 'center', width: 130},
| {title: '物品名称', field: 'goodsTemplateName', align: 'left', minWidth: 130},
| {title: '规格型号', field: 'baseGoodsModelsName', align: 'left', minWidth: 130},
| {title: '出入库数量', field: 'thisCount', align: 'center', width: 100},
| {title: '金额', field: 'totalPrice', align: 'center', width: 100},
| {title: '所属机构', field: 'agencyName', align: 'left', minWidth: 130},
| {title: '创建人', field: 'operatorName', align: 'left', width: 100},
| {
| title: '操作时间',
| field: 'dealTime',
| align: 'center',
| width: 160,
| formatter: (row) => {
| return {value: DateFormatter.LongToDateTime(row.dealTime)};
| },
| },
| ],
| // 操作信息
| operation: {
| show: true, // 显示操作列
| width: 100, // 列宽
| attr: [
| {
| title: '详情',
| events: (row) => {
| this.showDetail(row);
| },
| },
| ],
| },
| paging: {
| show: true, // 显示分页
| // 分页信息
| page: {
| small: false,
| pageNum: 1,
| pageSize: 10,
| total: 0,
| },
| },
| },
| components: {
| '1': 'purchaseDetail',
| '2': 'returnNoteDetail',
| '3': 'transferDetail',
| '4': 'inventoryDetail',
| '5': 'itemscrDetail',
| '6': 'transferDetail',
| '7': 'inventoryDetail',
| '8': 'scrapDetail',
| '9': 'detail',
| }
| };
| },
| created() {
| },
| methods: {
| showDetail(row) {
| this.activeDetail = this.components[row.mixType]
| this.detailSetting.id = row.id;
| this.detailSetting.info = JSON.stringify(row);
| this.detailSetting.title = '详情';
| this.detailSetting.show = true;
| },
| // 查询table列表
| search(pageNum) {
| if (pageNum != undefined) {
| this.$refs.myTable.search({pageNum});
| } else {
| this.$refs.myTable.search();
| }
| },
| fifterForm(params) {
| this.filterFrom = Object.assign(this.filterFrom, params);
| this.search(1);
| },
| },
| };
| </script>
|
| <style scoped></style>
|
|