Commit 70224772672330036d6813d24b39c87c7562991e
Merge branch 'develop' of http://www.huahengrobot.com:90/wms/wms4.git into develop
Showing
12 changed files
with
822 additions
and
3 deletions
ant-design-vue-jeecg/src/views/system/UserList.vue
ant-design-vue-jeecg/src/views/system/inventory/SimpleInventoryDetailList.vue
0 → 100644
1 | +<template> | |
2 | + <a-card :bordered="false"> | |
3 | + <!-- 查询区域 --> | |
4 | + <div class="table-page-search-wrapper"> | |
5 | + <a-form layout="inline" @keyup.enter.native="searchQuery"> | |
6 | + <a-row :gutter="24"> | |
7 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
8 | + <a-form-item label="货主"> | |
9 | + <a-input placeholder="请输入货主" v-model="queryParam.companyCode"></a-input> | |
10 | + </a-form-item> | |
11 | + </a-col> | |
12 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
13 | + <a-form-item label="库区"> | |
14 | + <a-input placeholder="请输入库区" v-model="queryParam.zoneCode"></a-input> | |
15 | + </a-form-item> | |
16 | + </a-col> | |
17 | + <template v-if="toggleSearchStatus"> | |
18 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
19 | + <a-form-item label="容器编码"> | |
20 | + <a-input placeholder="请输入容器编码" v-model="queryParam.containerCode"></a-input> | |
21 | + </a-form-item> | |
22 | + </a-col> | |
23 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
24 | + <a-form-item label="库位编码"> | |
25 | + <a-input placeholder="请输入库位编码" v-model="queryParam.locationCode"></a-input> | |
26 | + </a-form-item> | |
27 | + </a-col> | |
28 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
29 | + <a-form-item label="物料编码"> | |
30 | + <a-input placeholder="请输入物料编码" v-model="queryParam.materialCode"></a-input> | |
31 | + </a-form-item> | |
32 | + </a-col> | |
33 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
34 | + <a-form-item label="物料名称"> | |
35 | + <a-input placeholder="请输入物料名称" v-model="queryParam.materialName"></a-input> | |
36 | + </a-form-item> | |
37 | + </a-col> | |
38 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
39 | + <a-form-item label="物料规格"> | |
40 | + <a-input placeholder="请输入物料规格" v-model="queryParam.materialSpec"></a-input> | |
41 | + </a-form-item> | |
42 | + </a-col> | |
43 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
44 | + <a-form-item label="物料单位"> | |
45 | + <a-input placeholder="请输入物料单位" v-model="queryParam.materialUnit"></a-input> | |
46 | + </a-form-item> | |
47 | + </a-col> | |
48 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
49 | + <a-form-item label="库存状态"> | |
50 | + <j-dict-select-tag placeholder="请选择库存状态" v-model="queryParam.inventoryStatus" dictCode="inventory_status"/> | |
51 | + </a-form-item> | |
52 | + </a-col> | |
53 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
54 | + <a-form-item label="批次"> | |
55 | + <a-input placeholder="请输入批次" v-model="queryParam.batch"></a-input> | |
56 | + </a-form-item> | |
57 | + </a-col> | |
58 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
59 | + <a-form-item label="唯一号"> | |
60 | + <a-input placeholder="请输入唯一号" v-model="queryParam.uniqueCode"></a-input> | |
61 | + </a-form-item> | |
62 | + </a-col> | |
63 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
64 | + <a-form-item label="入库日期"> | |
65 | + <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择入库日期" v-model="queryParam.receiptDate"></j-date> | |
66 | + </a-form-item> | |
67 | + </a-col> | |
68 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
69 | + <a-form-item label="库龄(天)"> | |
70 | + <a-input placeholder="请输入库龄(天)" v-model="queryParam.inventoryAge"></a-input> | |
71 | + </a-form-item> | |
72 | + </a-col> | |
73 | + </template> | |
74 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
75 | + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> | |
76 | + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> | |
77 | + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | |
78 | + <a @click="handleToggleSearch" style="margin-left: 8px"> | |
79 | + {{ toggleSearchStatus ? '收起' : '展开' }} | |
80 | + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | |
81 | + </a> | |
82 | + </span> | |
83 | + </a-col> | |
84 | + </a-row> | |
85 | + </a-form> | |
86 | + </div> | |
87 | + <!-- 查询区域-END --> | |
88 | + | |
89 | + <!-- 操作按钮区域 --> | |
90 | + <div class="table-operator"> | |
91 | + <a-button v-has="'inventoryDetail:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> | |
92 | + <a-button type="primary" icon="download" @click="handleExportXls('库存详情')">导出</a-button> | |
93 | + <a-upload v-has="'inventoryDetail:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> | |
94 | + <a-button type="primary" icon="import">导入</a-button> | |
95 | + </a-upload> | |
96 | + <!-- 高级查询区域 --> | |
97 | + <j-super-query :fieldList="superFieldList" v-has="'inventoryDetail:superSearch'" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> | |
98 | + <a-dropdown v-if="selectedRowKeys.length > 0"> | |
99 | + <a-menu slot="overlay"> | |
100 | + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> | |
101 | + </a-menu> | |
102 | + <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> | |
103 | + </a-dropdown> | |
104 | + </div> | |
105 | + | |
106 | + <!-- table区域-begin --> | |
107 | + <div> | |
108 | + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | |
109 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | |
110 | + <a style="margin-left: 24px" @click="onClearSelected">清空</a> | |
111 | + </div> | |
112 | + | |
113 | + <a-table | |
114 | + ref="table" | |
115 | + size="middle" | |
116 | + :scroll="{x:true}" | |
117 | + bordered | |
118 | + rowKey="id" | |
119 | + :columns="columns" | |
120 | + :dataSource="dataSource" | |
121 | + :pagination="ipagination" | |
122 | + :loading="loading" | |
123 | + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | |
124 | + class="j-table-force-nowrap" | |
125 | + @change="handleTableChange"> | |
126 | + | |
127 | + <template slot="htmlSlot" slot-scope="text"> | |
128 | + <div v-html="text"></div> | |
129 | + </template> | |
130 | + <template slot="imgSlot" slot-scope="text"> | |
131 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | |
132 | + <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> | |
133 | + </template> | |
134 | + <template slot="fileSlot" slot-scope="text"> | |
135 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |
136 | + <a-button | |
137 | + v-else | |
138 | + :ghost="true" | |
139 | + type="primary" | |
140 | + icon="download" | |
141 | + size="small" | |
142 | + @click="downloadFile(text)"> | |
143 | + 下载 | |
144 | + </a-button> | |
145 | + </template> | |
146 | + | |
147 | + <span slot="action" slot-scope="text, record"> | |
148 | + <a @click="handleEdit(record)">编辑</a> | |
149 | + | |
150 | + <a-divider type="vertical" /> | |
151 | + <a-dropdown> | |
152 | + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> | |
153 | + <a-menu slot="overlay"> | |
154 | + <a-menu-item> | |
155 | + <a @click="handleDetail(record)">详情</a> | |
156 | + </a-menu-item> | |
157 | + <a-menu-item> | |
158 | + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | |
159 | + <a>删除</a> | |
160 | + </a-popconfirm> | |
161 | + </a-menu-item> | |
162 | + </a-menu> | |
163 | + </a-dropdown> | |
164 | + </span> | |
165 | + | |
166 | + </a-table> | |
167 | + </div> | |
168 | + | |
169 | + <simple-inventory-detail-modal ref="modalForm" @ok="modalFormOk"></simple-inventory-detail-modal> | |
170 | + </a-card> | |
171 | +</template> | |
172 | + | |
173 | +<script> | |
174 | + | |
175 | + import '@/assets/less/TableExpand.less' | |
176 | + import { mixinDevice } from '@/utils/mixin' | |
177 | + import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |
178 | + import SimpleInventoryDetailModal from './modules/SimpleInventoryDetailModal' | |
179 | + import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | |
180 | + | |
181 | + export default { | |
182 | + name: 'InventoryDetailList', | |
183 | + mixins:[JeecgListMixin, mixinDevice], | |
184 | + components: { | |
185 | + SimpleInventoryDetailModal | |
186 | + }, | |
187 | + data () { | |
188 | + return { | |
189 | + description: '库存详情管理页面', | |
190 | + // 表头 | |
191 | + columns: [ | |
192 | + { | |
193 | + title: '#', | |
194 | + dataIndex: '', | |
195 | + key:'rowIndex', | |
196 | + width:60, | |
197 | + align:"center", | |
198 | + customRender:function (t,r,index) { | |
199 | + return parseInt(index)+1; | |
200 | + } | |
201 | + }, | |
202 | + { | |
203 | + title:'货主', | |
204 | + align:"center", | |
205 | + dataIndex: 'companyCode' | |
206 | + }, | |
207 | + { | |
208 | + title:'库区', | |
209 | + align:"center", | |
210 | + dataIndex: 'zoneCode' | |
211 | + }, | |
212 | + { | |
213 | + title:'容器编码', | |
214 | + align:"center", | |
215 | + dataIndex: 'containerCode' | |
216 | + }, | |
217 | + { | |
218 | + title:'库位编码', | |
219 | + align:"center", | |
220 | + dataIndex: 'locationCode' | |
221 | + }, | |
222 | + { | |
223 | + title:'物料编码', | |
224 | + align:"center", | |
225 | + dataIndex: 'materialCode' | |
226 | + }, | |
227 | + { | |
228 | + title:'物料名称', | |
229 | + align:"center", | |
230 | + dataIndex: 'materialName' | |
231 | + }, | |
232 | + { | |
233 | + title:'物料规格', | |
234 | + align:"center", | |
235 | + dataIndex: 'materialSpec' | |
236 | + }, | |
237 | + { | |
238 | + title:'物料单位', | |
239 | + align:"center", | |
240 | + dataIndex: 'materialUnit' | |
241 | + }, | |
242 | + { | |
243 | + title:'数量', | |
244 | + align:"center", | |
245 | + dataIndex: 'qty' | |
246 | + }, | |
247 | + { | |
248 | + title:'任务锁定数量', | |
249 | + align:"center", | |
250 | + dataIndex: 'taskQty' | |
251 | + }, | |
252 | + { | |
253 | + title:'库存状态', | |
254 | + align:"center", | |
255 | + dataIndex: 'inventoryStatus_dictText' | |
256 | + }, | |
257 | + { | |
258 | + title:'批次', | |
259 | + align:"center", | |
260 | + dataIndex: 'batch' | |
261 | + }, | |
262 | + { | |
263 | + title:'唯一号', | |
264 | + align:"center", | |
265 | + dataIndex: 'uniqueCode' | |
266 | + }, | |
267 | + { | |
268 | + title:'入库日期', | |
269 | + align:"center", | |
270 | + dataIndex: 'receiptDate' | |
271 | + }, | |
272 | + { | |
273 | + title:'库龄(天)', | |
274 | + align:"center", | |
275 | + dataIndex: 'inventoryAge' | |
276 | + }, | |
277 | + { | |
278 | + title:'创建人', | |
279 | + align:"center", | |
280 | + dataIndex: 'createBy' | |
281 | + }, | |
282 | + { | |
283 | + title:'创建日期', | |
284 | + align:"center", | |
285 | + dataIndex: 'createTime' | |
286 | + }, | |
287 | + { | |
288 | + title:'更新人', | |
289 | + align:"center", | |
290 | + dataIndex: 'updateBy' | |
291 | + }, | |
292 | + { | |
293 | + title:'更新日期', | |
294 | + align:"center", | |
295 | + dataIndex: 'updateTime' | |
296 | + }, | |
297 | + { | |
298 | + title: '操作', | |
299 | + dataIndex: 'action', | |
300 | + align:"center", | |
301 | + fixed:"right", | |
302 | + width:147, | |
303 | + scopedSlots: { customRender: 'action' } | |
304 | + } | |
305 | + ], | |
306 | + url: { | |
307 | + list: "/inventory/inventoryDetail/list", | |
308 | + delete: "/inventory/inventoryDetail/delete", | |
309 | + deleteBatch: "/inventory/inventoryDetail/deleteBatch", | |
310 | + exportXlsUrl: "/inventory/inventoryDetail/exportXls", | |
311 | + importExcelUrl: "inventory/inventoryDetail/importExcel", | |
312 | + | |
313 | + }, | |
314 | + dictOptions:{}, | |
315 | + superFieldList:[], | |
316 | + } | |
317 | + }, | |
318 | + created() { | |
319 | + this.getSuperFieldList(); | |
320 | + }, | |
321 | + computed: { | |
322 | + importExcelUrl: function(){ | |
323 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | |
324 | + }, | |
325 | + }, | |
326 | + methods: { | |
327 | + initDictConfig(){ | |
328 | + }, | |
329 | + getSuperFieldList(){ | |
330 | + let fieldList=[]; | |
331 | + fieldList.push({type:'string',value:'companyCode',text:'货主',dictCode:''}) | |
332 | + fieldList.push({type:'string',value:'zoneCode',text:'库区',dictCode:''}) | |
333 | + fieldList.push({type:'string',value:'containerCode',text:'容器编码',dictCode:''}) | |
334 | + fieldList.push({type:'string',value:'locationCode',text:'库位编码',dictCode:''}) | |
335 | + fieldList.push({type:'string',value:'materialCode',text:'物料编码',dictCode:''}) | |
336 | + fieldList.push({type:'string',value:'materialName',text:'物料名称',dictCode:''}) | |
337 | + fieldList.push({type:'string',value:'materialSpec',text:'物料规格',dictCode:''}) | |
338 | + fieldList.push({type:'string',value:'materialUnit',text:'物料单位',dictCode:''}) | |
339 | + fieldList.push({type:'BigDecimal',value:'qty',text:'数量',dictCode:''}) | |
340 | + fieldList.push({type:'BigDecimal',value:'taskQty',text:'任务锁定数量',dictCode:''}) | |
341 | + fieldList.push({type:'string',value:'inventoryStatus',text:'库存状态',dictCode:'inventory_status'}) | |
342 | + fieldList.push({type:'string',value:'batch',text:'批次',dictCode:''}) | |
343 | + fieldList.push({type:'string',value:'uniqueCode',text:'唯一号',dictCode:''}) | |
344 | + fieldList.push({type:'datetime',value:'receiptDate',text:'入库日期'}) | |
345 | + fieldList.push({type:'int',value:'inventoryAge',text:'库龄(天)',dictCode:''}) | |
346 | + fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''}) | |
347 | + fieldList.push({type:'datetime',value:'createTime',text:'创建日期'}) | |
348 | + fieldList.push({type:'string',value:'updateBy',text:'更新人',dictCode:''}) | |
349 | + fieldList.push({type:'datetime',value:'updateTime',text:'更新日期'}) | |
350 | + this.superFieldList = fieldList | |
351 | + } | |
352 | + } | |
353 | + } | |
354 | +</script> | |
355 | +<style scoped> | |
356 | + @import '~@assets/less/common.less'; | |
357 | +</style> | |
0 | 358 | \ No newline at end of file |
... | ... |
ant-design-vue-jeecg/src/views/system/inventory/modules/SimpleInventoryDetailForm.vue
0 → 100644
1 | +<template> | |
2 | + <a-spin :spinning="confirmLoading"> | |
3 | + <j-form-container :disabled="formDisabled"> | |
4 | + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> | |
5 | + <a-row> | |
6 | + <a-col :span="24"> | |
7 | + <a-form-model-item label="货主" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCode"> | |
8 | + <a-input v-model="model.companyCode" placeholder="请输入货主" ></a-input> | |
9 | + </a-form-model-item> | |
10 | + </a-col> | |
11 | + <a-col :span="24"> | |
12 | + <a-form-model-item label="库区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zoneCode"> | |
13 | + <a-input v-model="model.zoneCode" placeholder="请输入库区" ></a-input> | |
14 | + </a-form-model-item> | |
15 | + </a-col> | |
16 | + <a-col :span="24"> | |
17 | + <a-form-model-item label="容器编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
18 | + <a-input v-model="model.containerCode" placeholder="请输入容器编码" ></a-input> | |
19 | + </a-form-model-item> | |
20 | + </a-col> | |
21 | + <a-col :span="24"> | |
22 | + <a-form-model-item label="库位编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationCode"> | |
23 | + <a-input v-model="model.locationCode" placeholder="请输入库位编码" ></a-input> | |
24 | + </a-form-model-item> | |
25 | + </a-col> | |
26 | + <a-col :span="24"> | |
27 | + <a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode"> | |
28 | + <a-input v-model="model.materialCode" placeholder="请输入物料编码" ></a-input> | |
29 | + </a-form-model-item> | |
30 | + </a-col> | |
31 | + <a-col :span="24"> | |
32 | + <a-form-model-item label="物料名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialName"> | |
33 | + <a-input v-model="model.materialName" placeholder="请输入物料名称" ></a-input> | |
34 | + </a-form-model-item> | |
35 | + </a-col> | |
36 | + <a-col :span="24"> | |
37 | + <a-form-model-item label="物料规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialSpec"> | |
38 | + <a-input v-model="model.materialSpec" placeholder="请输入物料规格" ></a-input> | |
39 | + </a-form-model-item> | |
40 | + </a-col> | |
41 | + <a-col :span="24"> | |
42 | + <a-form-model-item label="物料单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialUnit"> | |
43 | + <a-input v-model="model.materialUnit" placeholder="请输入物料单位" ></a-input> | |
44 | + </a-form-model-item> | |
45 | + </a-col> | |
46 | + <a-col :span="24"> | |
47 | + <a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qty"> | |
48 | + <a-input-number v-model="model.qty" placeholder="请输入数量" style="width: 100%" /> | |
49 | + </a-form-model-item> | |
50 | + </a-col> | |
51 | + <a-col :span="24"> | |
52 | + <a-form-model-item label="任务锁定数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="taskQty"> | |
53 | + <a-input-number v-model="model.taskQty" placeholder="请输入任务锁定数量" style="width: 100%" /> | |
54 | + </a-form-model-item> | |
55 | + </a-col> | |
56 | + <a-col :span="24"> | |
57 | + <a-form-model-item label="库存状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventoryStatus"> | |
58 | + <j-dict-select-tag type="list" v-model="model.inventoryStatus" dictCode="inventory_status" placeholder="请选择库存状态" /> | |
59 | + </a-form-model-item> | |
60 | + </a-col> | |
61 | + <a-col :span="24"> | |
62 | + <a-form-model-item label="批次" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="batch"> | |
63 | + <a-input v-model="model.batch" placeholder="请输入批次" ></a-input> | |
64 | + </a-form-model-item> | |
65 | + </a-col> | |
66 | + </a-row> | |
67 | + </a-form-model> | |
68 | + </j-form-container> | |
69 | + </a-spin> | |
70 | +</template> | |
71 | + | |
72 | +<script> | |
73 | + | |
74 | + import { httpAction, getAction } from '@/api/manage' | |
75 | + import { validateDuplicateValue } from '@/utils/util' | |
76 | + | |
77 | + export default { | |
78 | + name: 'SimpleInventoryDetailForm', | |
79 | + components: { | |
80 | + }, | |
81 | + props: { | |
82 | + //表单禁用 | |
83 | + disabled: { | |
84 | + type: Boolean, | |
85 | + default: false, | |
86 | + required: false | |
87 | + } | |
88 | + }, | |
89 | + data () { | |
90 | + return { | |
91 | + model:{ | |
92 | + }, | |
93 | + labelCol: { | |
94 | + xs: { span: 24 }, | |
95 | + sm: { span: 5 }, | |
96 | + }, | |
97 | + wrapperCol: { | |
98 | + xs: { span: 24 }, | |
99 | + sm: { span: 16 }, | |
100 | + }, | |
101 | + confirmLoading: false, | |
102 | + validatorRules: { | |
103 | + containerCode: [ | |
104 | + { required: true, message: '请输入容器编码!'}, | |
105 | + ], | |
106 | + materialCode: [ | |
107 | + { required: true, message: '请输入物料编码!'}, | |
108 | + ], | |
109 | + }, | |
110 | + url: { | |
111 | + add: "/inventory/inventoryDetail/add", | |
112 | + edit: "/inventory/inventoryDetail/edit", | |
113 | + queryById: "/inventory/inventoryDetail/queryById" | |
114 | + } | |
115 | + } | |
116 | + }, | |
117 | + computed: { | |
118 | + formDisabled(){ | |
119 | + return this.disabled | |
120 | + }, | |
121 | + }, | |
122 | + created () { | |
123 | + //备份model原始值 | |
124 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | |
125 | + }, | |
126 | + methods: { | |
127 | + add () { | |
128 | + this.edit(this.modelDefault); | |
129 | + }, | |
130 | + edit (record) { | |
131 | + this.model = Object.assign({}, record); | |
132 | + this.visible = true; | |
133 | + }, | |
134 | + submitForm () { | |
135 | + const that = this; | |
136 | + // 触发表单验证 | |
137 | + this.$refs.form.validate(valid => { | |
138 | + if (valid) { | |
139 | + that.confirmLoading = true; | |
140 | + let httpurl = ''; | |
141 | + let method = ''; | |
142 | + if(!this.model.id){ | |
143 | + httpurl+=this.url.add; | |
144 | + method = 'post'; | |
145 | + }else{ | |
146 | + httpurl+=this.url.edit; | |
147 | + method = 'put'; | |
148 | + } | |
149 | + httpAction(httpurl,this.model,method).then((res)=>{ | |
150 | + if(res.success){ | |
151 | + that.$message.success(res.message); | |
152 | + that.$emit('ok'); | |
153 | + }else{ | |
154 | + that.$message.warning(res.message); | |
155 | + } | |
156 | + }).finally(() => { | |
157 | + that.confirmLoading = false; | |
158 | + }) | |
159 | + } | |
160 | + | |
161 | + }) | |
162 | + }, | |
163 | + } | |
164 | + } | |
165 | +</script> | |
0 | 166 | \ No newline at end of file |
... | ... |
ant-design-vue-jeecg/src/views/system/inventory/modules/SimpleInventoryDetailModal.Style#Drawer.vue
0 → 100644
1 | +<template> | |
2 | + <a-drawer | |
3 | + :title="title" | |
4 | + :width="width" | |
5 | + placement="right" | |
6 | + :closable="false" | |
7 | + @close="close" | |
8 | + destroyOnClose | |
9 | + :visible="visible"> | |
10 | + <inventory-detail-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></inventory-detail-form> | |
11 | + <div class="drawer-footer"> | |
12 | + <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button> | |
13 | + <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button> | |
14 | + </div> | |
15 | + </a-drawer> | |
16 | +</template> | |
17 | + | |
18 | +<script> | |
19 | + | |
20 | + import SimpleInventoryDetailForm from './SimpleInventoryDetailForm' | |
21 | + | |
22 | + export default { | |
23 | + name: 'SimpleInventoryDetailModal', | |
24 | + components: { | |
25 | + SimpleInventoryDetailForm | |
26 | + }, | |
27 | + data () { | |
28 | + return { | |
29 | + title:"操作", | |
30 | + width:800, | |
31 | + visible: false, | |
32 | + disableSubmit: false | |
33 | + } | |
34 | + }, | |
35 | + methods: { | |
36 | + add () { | |
37 | + this.visible=true | |
38 | + this.$nextTick(()=>{ | |
39 | + this.$refs.realForm.add(); | |
40 | + }) | |
41 | + }, | |
42 | + edit (record) { | |
43 | + this.visible=true | |
44 | + this.$nextTick(()=>{ | |
45 | + this.$refs.realForm.edit(record); | |
46 | + }); | |
47 | + }, | |
48 | + close () { | |
49 | + this.$emit('close'); | |
50 | + this.visible = false; | |
51 | + }, | |
52 | + submitCallback(){ | |
53 | + this.$emit('ok'); | |
54 | + this.visible = false; | |
55 | + }, | |
56 | + handleOk () { | |
57 | + this.$refs.realForm.submitForm(); | |
58 | + }, | |
59 | + handleCancel () { | |
60 | + this.close() | |
61 | + } | |
62 | + } | |
63 | + } | |
64 | +</script> | |
65 | + | |
66 | +<style lang="less" scoped> | |
67 | +/** Button按钮间距 */ | |
68 | + .ant-btn { | |
69 | + margin-left: 30px; | |
70 | + margin-bottom: 30px; | |
71 | + float: right; | |
72 | + } | |
73 | + .drawer-footer{ | |
74 | + position: absolute; | |
75 | + bottom: -8px; | |
76 | + width: 100%; | |
77 | + border-top: 1px solid #e8e8e8; | |
78 | + padding: 10px 16px; | |
79 | + text-align: right; | |
80 | + left: 0; | |
81 | + background: #fff; | |
82 | + border-radius: 0 0 2px 2px; | |
83 | + } | |
84 | +</style> | |
0 | 85 | \ No newline at end of file |
... | ... |
ant-design-vue-jeecg/src/views/system/inventory/modules/SimpleInventoryDetailModal.vue
0 → 100644
1 | +<template> | |
2 | + <j-modal | |
3 | + :title="title" | |
4 | + :width="width" | |
5 | + :visible="visible" | |
6 | + switchFullscreen | |
7 | + @ok="handleOk" | |
8 | + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" | |
9 | + @cancel="handleCancel" | |
10 | + cancelText="关闭"> | |
11 | + <inventory-detail-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></inventory-detail-form> | |
12 | + </j-modal> | |
13 | +</template> | |
14 | + | |
15 | +<script> | |
16 | + | |
17 | + import SimpleInventoryDetailForm from './SimpleInventoryDetailForm' | |
18 | + export default { | |
19 | + name: 'SimpleInventoryDetailModal', | |
20 | + components: { | |
21 | + SimpleInventoryDetailForm | |
22 | + }, | |
23 | + data () { | |
24 | + return { | |
25 | + title:'', | |
26 | + width:800, | |
27 | + visible: false, | |
28 | + disableSubmit: false | |
29 | + } | |
30 | + }, | |
31 | + methods: { | |
32 | + add () { | |
33 | + this.visible=true | |
34 | + this.$nextTick(()=>{ | |
35 | + this.$refs.realForm.add(); | |
36 | + }) | |
37 | + }, | |
38 | + edit (record) { | |
39 | + this.visible=true | |
40 | + this.$nextTick(()=>{ | |
41 | + this.$refs.realForm.edit(record); | |
42 | + }) | |
43 | + }, | |
44 | + close () { | |
45 | + this.$emit('close'); | |
46 | + this.visible = false; | |
47 | + }, | |
48 | + handleOk () { | |
49 | + this.$refs.realForm.submitForm(); | |
50 | + }, | |
51 | + submitCallback(){ | |
52 | + this.$emit('ok'); | |
53 | + this.visible = false; | |
54 | + }, | |
55 | + handleCancel () { | |
56 | + this.close() | |
57 | + } | |
58 | + } | |
59 | + } | |
60 | +</script> | |
0 | 61 | \ No newline at end of file |
... | ... |
ant-design-vue-jeecg/src/views/system/monitor/OperationLog.vue
ant-design-vue-jeecg/src/views/system/receipt/ReceiptHeaderList.vue
ant-design-vue-jeecg/src/views/system/task/AgvTaskList.vue
ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue
ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue
ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryDetail/controller/InventoryDetailController.java
0 → 100644
1 | +package org.jeecg.modules.wms.inventory.inventoryDetail.controller; | |
2 | + | |
3 | +import java.util.Arrays; | |
4 | + | |
5 | +import javax.servlet.http.HttpServletRequest; | |
6 | +import javax.servlet.http.HttpServletResponse; | |
7 | + | |
8 | +import org.jeecg.common.api.vo.Result; | |
9 | +import org.jeecg.common.aspect.annotation.AutoLog; | |
10 | +import org.jeecg.common.system.base.controller.JeecgController; | |
11 | +import org.jeecg.common.system.query.QueryGenerator; | |
12 | +import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; | |
13 | +import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; | |
14 | +import org.springframework.beans.factory.annotation.Autowired; | |
15 | +import org.springframework.web.bind.annotation.*; | |
16 | +import org.springframework.web.servlet.ModelAndView; | |
17 | + | |
18 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |
19 | +import com.baomidou.mybatisplus.core.metadata.IPage; | |
20 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
21 | + | |
22 | +import io.swagger.annotations.Api; | |
23 | +import io.swagger.annotations.ApiOperation; | |
24 | +import lombok.extern.slf4j.Slf4j; | |
25 | + | |
26 | +/** | |
27 | + * @Description: 库存详情 | |
28 | + * @Author: jeecg-boot | |
29 | + * @Date: 2023-03-09 | |
30 | + * @Version: V1.0 | |
31 | + */ | |
32 | +@Api(tags = "库存详情") | |
33 | +@RestController | |
34 | +@RequestMapping("/inventory/inventoryDetail") | |
35 | +@Slf4j | |
36 | +public class InventoryDetailController extends JeecgController<InventoryDetail, IInventoryDetailService> { | |
37 | + @Autowired | |
38 | + private IInventoryDetailService inventoryDetailService; | |
39 | + | |
40 | + /** | |
41 | + * 分页列表查询 | |
42 | + * @param inventoryDetail | |
43 | + * @param pageNo | |
44 | + * @param pageSize | |
45 | + * @param req | |
46 | + * @return | |
47 | + */ | |
48 | + // @AutoLog(value = "库存详情-分页列表查询") | |
49 | + @ApiOperation(value = "库存详情-分页列表查询", notes = "库存详情-分页列表查询") | |
50 | + @GetMapping(value = "/list") | |
51 | + public Result<IPage<InventoryDetail>> queryPageList(InventoryDetail inventoryDetail, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | |
52 | + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { | |
53 | + QueryWrapper<InventoryDetail> queryWrapper = QueryGenerator.initQueryWrapper(inventoryDetail, req.getParameterMap()); | |
54 | + Page<InventoryDetail> page = new Page<InventoryDetail>(pageNo, pageSize); | |
55 | + IPage<InventoryDetail> pageList = inventoryDetailService.page(page, queryWrapper); | |
56 | + return Result.OK(pageList); | |
57 | + } | |
58 | + | |
59 | + /** | |
60 | + * 添加 | |
61 | + * @param inventoryDetail | |
62 | + * @return | |
63 | + */ | |
64 | + @AutoLog(value = "库存详情-添加") | |
65 | + @ApiOperation(value = "库存详情-添加", notes = "库存详情-添加") | |
66 | + @PostMapping(value = "/add") | |
67 | + public Result<String> add(@RequestBody InventoryDetail inventoryDetail) { | |
68 | + inventoryDetailService.save(inventoryDetail); | |
69 | + return Result.OK("添加成功!"); | |
70 | + } | |
71 | + | |
72 | + /** | |
73 | + * 编辑 | |
74 | + * @param inventoryDetail | |
75 | + * @return | |
76 | + */ | |
77 | + @AutoLog(value = "库存详情-编辑") | |
78 | + @ApiOperation(value = "库存详情-编辑", notes = "库存详情-编辑") | |
79 | + @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) | |
80 | + public Result<String> edit(@RequestBody InventoryDetail inventoryDetail) { | |
81 | + inventoryDetailService.updateById(inventoryDetail); | |
82 | + return Result.OK("编辑成功!"); | |
83 | + } | |
84 | + | |
85 | + /** | |
86 | + * 通过id删除 | |
87 | + * @param id | |
88 | + * @return | |
89 | + */ | |
90 | + @AutoLog(value = "库存详情-通过id删除") | |
91 | + @ApiOperation(value = "库存详情-通过id删除", notes = "库存详情-通过id删除") | |
92 | + @DeleteMapping(value = "/delete") | |
93 | + public Result<String> delete(@RequestParam(name = "id", required = true) String id) { | |
94 | + inventoryDetailService.removeById(id); | |
95 | + return Result.OK("删除成功!"); | |
96 | + } | |
97 | + | |
98 | + /** | |
99 | + * 批量删除 | |
100 | + * @param ids | |
101 | + * @return | |
102 | + */ | |
103 | + @AutoLog(value = "库存详情-批量删除") | |
104 | + @ApiOperation(value = "库存详情-批量删除", notes = "库存详情-批量删除") | |
105 | + @DeleteMapping(value = "/deleteBatch") | |
106 | + public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { | |
107 | + this.inventoryDetailService.removeByIds(Arrays.asList(ids.split(","))); | |
108 | + return Result.OK("批量删除成功!"); | |
109 | + } | |
110 | + | |
111 | + /** | |
112 | + * 通过id查询 | |
113 | + * @param id | |
114 | + * @return | |
115 | + */ | |
116 | + // @AutoLog(value = "库存详情-通过id查询") | |
117 | + @ApiOperation(value = "库存详情-通过id查询", notes = "库存详情-通过id查询") | |
118 | + @GetMapping(value = "/queryById") | |
119 | + public Result<InventoryDetail> queryById(@RequestParam(name = "id", required = true) String id) { | |
120 | + InventoryDetail inventoryDetail = inventoryDetailService.getById(id); | |
121 | + if (inventoryDetail == null) { | |
122 | + return Result.error("未找到对应数据"); | |
123 | + } | |
124 | + return Result.OK(inventoryDetail); | |
125 | + } | |
126 | + | |
127 | + /** | |
128 | + * 导出excel | |
129 | + * @param request | |
130 | + * @param inventoryDetail | |
131 | + */ | |
132 | + @RequestMapping(value = "/exportXls") | |
133 | + public ModelAndView exportXls(HttpServletRequest request, InventoryDetail inventoryDetail) { | |
134 | + return super.exportXls(request, inventoryDetail, InventoryDetail.class, "库存详情"); | |
135 | + } | |
136 | + | |
137 | + /** | |
138 | + * 通过excel导入数据 | |
139 | + * @param request | |
140 | + * @param response | |
141 | + * @return | |
142 | + */ | |
143 | + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) | |
144 | + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { | |
145 | + return super.importExcel(request, response, InventoryDetail.class); | |
146 | + } | |
147 | + | |
148 | +} | |
... | ... |