Commit 14cb8959fbc8e0e20d2472e2502441e85dc1012d
1 parent
2b1ee4c7
历史出入库单
Showing
34 changed files
with
3617 additions
and
0 deletions
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptDetailHistoryList.vue
0 → 100644
1 | +<template> | |
2 | + <a-card :bordered="false" :class="'cust-erp-sub-tab'"> | |
3 | + <!-- 操作按钮区域 --> | |
4 | + <div class="table-operator" v-if="mainId"> | |
5 | +<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>--> | |
6 | +<!-- <a-button type="primary" icon="download" @click="handleExportXls('历史入库单明细')">导出</a-button>--> | |
7 | + <a-upload | |
8 | + name="file" | |
9 | + :showUploadList="false" | |
10 | + :multiple="false" | |
11 | + :headers="tokenHeader" | |
12 | + :action="importExcelUrl" | |
13 | + @change="handleImportExcel"> | |
14 | +<!-- <a-button type="primary" icon="import">导入</a-button>--> | |
15 | + </a-upload> | |
16 | + <a-dropdown v-if="selectedRowKeys.length > 0"> | |
17 | + <a-menu slot="overlay"> | |
18 | + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> | |
19 | + </a-menu> | |
20 | + <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> | |
21 | + </a-dropdown> | |
22 | + </div> | |
23 | + | |
24 | + <!-- table区域-begin --> | |
25 | + <div> | |
26 | + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | |
27 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | |
28 | + <a style="margin-left: 24px" @click="onClearSelected">清空</a> | |
29 | + </div> | |
30 | + | |
31 | + <a-table | |
32 | + ref="table" | |
33 | + size="middle" | |
34 | + bordered | |
35 | + rowKey="id" | |
36 | + :scroll="{x:true}" | |
37 | + :columns="columns" | |
38 | + :dataSource="dataSource" | |
39 | + :pagination="ipagination" | |
40 | + :loading="loading" | |
41 | + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | |
42 | + @change="handleTableChange"> | |
43 | + | |
44 | + <template slot="htmlSlot" slot-scope="text"> | |
45 | + <div v-html="text"></div> | |
46 | + </template> | |
47 | + <template slot="imgSlot" slot-scope="text"> | |
48 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | |
49 | + <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> | |
50 | + </template> | |
51 | + <template slot="fileSlot" slot-scope="text"> | |
52 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |
53 | + <a-button | |
54 | + v-else | |
55 | + :ghost="true" | |
56 | + type="primary" | |
57 | + icon="download" | |
58 | + size="small" | |
59 | + @click="downloadFile(text)"> | |
60 | + 下载 | |
61 | + </a-button> | |
62 | + </template> | |
63 | + | |
64 | + <span slot="action" slot-scope="text, record"> | |
65 | + <a @click="handleEdit(record)">编辑</a> | |
66 | + <a-divider type="vertical" /> | |
67 | + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | |
68 | + <a>删除</a> | |
69 | + </a-popconfirm> | |
70 | + </span> | |
71 | + | |
72 | + </a-table> | |
73 | + </div> | |
74 | + | |
75 | + <receiptDetailHistory-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></receiptDetailHistory-modal> | |
76 | + </a-card> | |
77 | +</template> | |
78 | + | |
79 | +<script> | |
80 | + | |
81 | + import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |
82 | + import ReceiptDetailHistoryModal from './modules/ReceiptDetailHistoryModal' | |
83 | + | |
84 | + export default { | |
85 | + name: "ReceiptDetailHistoryList", | |
86 | + mixins:[JeecgListMixin], | |
87 | + components: { ReceiptDetailHistoryModal }, | |
88 | + props:{ | |
89 | + mainId:{ | |
90 | + type:String, | |
91 | + default:'', | |
92 | + required:false | |
93 | + } | |
94 | + }, | |
95 | + watch:{ | |
96 | + mainId:{ | |
97 | + immediate: true, | |
98 | + handler(val) { | |
99 | + if(!this.mainId){ | |
100 | + this.clearList() | |
101 | + }else{ | |
102 | + this.queryParam['receiptId'] = val | |
103 | + this.loadData(1); | |
104 | + } | |
105 | + } | |
106 | + } | |
107 | + }, | |
108 | + data () { | |
109 | + return { | |
110 | + description: '历史入库单管理页面', | |
111 | + disableMixinCreated:true, | |
112 | + // 表头 | |
113 | + columns: [ | |
114 | + // { | |
115 | + // title: '#', | |
116 | + // dataIndex: '', | |
117 | + // key:'rowIndex', | |
118 | + // width:60, | |
119 | + // align:"center", | |
120 | + // customRender:function (t,r,index) { | |
121 | + // return parseInt(index)+1; | |
122 | + // } | |
123 | + // }, | |
124 | + // { | |
125 | + // title:'单据详情ID', | |
126 | + // align:"center", | |
127 | + // dataIndex: 'id' | |
128 | + // }, | |
129 | + // { | |
130 | + // title:'入库单ID', | |
131 | + // align:"center", | |
132 | + // dataIndex: 'receiptId' | |
133 | + // }, | |
134 | + { | |
135 | + title:'入库单编码', | |
136 | + align:"center", | |
137 | + dataIndex: 'receiptCode' | |
138 | + }, | |
139 | + // { | |
140 | + // title:'货主编码', | |
141 | + // align:"center", | |
142 | + // dataIndex: 'companyCode' | |
143 | + // }, | |
144 | + { | |
145 | + title:'物料编码', | |
146 | + align:"center", | |
147 | + dataIndex: 'materialCode' | |
148 | + }, | |
149 | + { | |
150 | + title:'物料名称', | |
151 | + align:"center", | |
152 | + dataIndex: 'materialName' | |
153 | + }, | |
154 | + { | |
155 | + title:'物料规格', | |
156 | + align:"center", | |
157 | + dataIndex: 'materialSpec' | |
158 | + }, | |
159 | + { | |
160 | + title:'物料单位', | |
161 | + align:"center", | |
162 | + dataIndex: 'materialUnit' | |
163 | + }, | |
164 | + { | |
165 | + title:'单据数量', | |
166 | + align:"center", | |
167 | + dataIndex: 'qty' | |
168 | + }, | |
169 | + { | |
170 | + title:'已收数量', | |
171 | + align:"center", | |
172 | + dataIndex: 'taskQty' | |
173 | + }, | |
174 | + { | |
175 | + title:'库存状态', | |
176 | + align:"center", | |
177 | + dataIndex: 'inventoryStatus_dictText', | |
178 | + }, | |
179 | + { | |
180 | + title:'批次', | |
181 | + align:"center", | |
182 | + dataIndex: 'batch' | |
183 | + }, | |
184 | + { | |
185 | + title:'单据状态', | |
186 | + align:"center", | |
187 | + dataIndex: 'status_dictText' | |
188 | + }, | |
189 | + { | |
190 | + title:'上游单号', | |
191 | + align:"center", | |
192 | + dataIndex: 'referCode' | |
193 | + }, | |
194 | + { | |
195 | + title:'创建人', | |
196 | + align:"center", | |
197 | + dataIndex: 'createBy' | |
198 | + }, | |
199 | + { | |
200 | + title:'创建日期', | |
201 | + align:"center", | |
202 | + dataIndex: 'createTime' | |
203 | + }, | |
204 | + { | |
205 | + title:'更新人', | |
206 | + align:"center", | |
207 | + dataIndex: 'updateBy' | |
208 | + }, | |
209 | + { | |
210 | + title:'更新日期', | |
211 | + align:"center", | |
212 | + dataIndex: 'updateTime' | |
213 | + }, | |
214 | + { | |
215 | + title: '操作', | |
216 | + dataIndex: 'action', | |
217 | + align:"center", | |
218 | + fixed:"right", | |
219 | + width:147, | |
220 | + scopedSlots: { customRender: 'action' }, | |
221 | + } | |
222 | + ], | |
223 | + url: { | |
224 | + list: "/receipt/receiptHeaderHistory/listReceiptDetailHistoryByMainId", | |
225 | + delete: "/receipt/receiptHeaderHistory/deleteReceiptDetailHistory", | |
226 | + deleteBatch: "/receipt/receiptHeaderHistory/deleteBatchReceiptDetailHistory", | |
227 | + exportXlsUrl: "/receipt/receiptHeaderHistory/exportReceiptDetailHistory", | |
228 | + importUrl: "/receipt/receiptHeaderHistory/importReceiptDetailHistory", | |
229 | + }, | |
230 | + dictOptions:{ | |
231 | + firstStatus:[], | |
232 | + lastStatus:[], | |
233 | + } | |
234 | + } | |
235 | + }, | |
236 | + created() { | |
237 | + }, | |
238 | + computed: { | |
239 | + importExcelUrl(){ | |
240 | + return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; | |
241 | + } | |
242 | + }, | |
243 | + methods: { | |
244 | + clearList(){ | |
245 | + this.dataSource=[] | |
246 | + this.selectedRowKeys=[] | |
247 | + this.ipagination.current = 1 | |
248 | + } | |
249 | + | |
250 | + } | |
251 | + } | |
252 | +</script> | |
253 | +<style scoped> | |
254 | + @import '~@assets/less/common.less' | |
255 | +</style> | |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptHeaderHistoryList.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.code'></a-input> | |
10 | + </a-form-item> | |
11 | + </a-col> | |
12 | + | |
13 | + <a-col :xl='6' :lg='7' :md='8' :sm='24'> | |
14 | + <a-form-item label='货主'> | |
15 | + <a-select | |
16 | + show-search | |
17 | + placeholder='请选择货主' | |
18 | + option-filter-prop='children' | |
19 | + :filter-option='filterOption' | |
20 | + v-model='queryParam.companyCode'> | |
21 | + <a-select-option v-for='item in companyList' :key='item.name' :value='item.code'>{{ item.name }}</a-select-option> | |
22 | + </a-select> | |
23 | + </a-form-item> | |
24 | + </a-col> | |
25 | + | |
26 | + <a-col :xl='6' :lg='7' :md='8' :sm='24'> | |
27 | + <a-form-item label='入库单类型'> | |
28 | + <a-select | |
29 | + show-search | |
30 | + placeholder='请选择入库单类型' | |
31 | + option-filter-prop='children' | |
32 | + :filter-option='filterOption' | |
33 | + v-model='queryParam.type'> | |
34 | + <a-select-option v-for='item in receiptTypeList' :key='item.name' :value='item.code'>{{ item.name }}</a-select-option> | |
35 | + </a-select> | |
36 | + </a-form-item> | |
37 | + </a-col> | |
38 | + | |
39 | + <template v-if="toggleSearchStatus"> | |
40 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
41 | + <a-form-item label="头状态"> | |
42 | + <j-dict-select-tag placeholder="请选择头状态" v-model="queryParam.firstStatus" dictCode="receipt_status"/> | |
43 | + </a-form-item> | |
44 | + </a-col> | |
45 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
46 | + <a-form-item label="尾状态"> | |
47 | + <j-dict-select-tag placeholder="请选择尾状态" v-model="queryParam.lastStatus" dictCode="receipt_status"/> | |
48 | + </a-form-item> | |
49 | + </a-col> | |
50 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
51 | + <a-form-item label="上游单号"> | |
52 | + <a-input placeholder="请输入上游单号" v-model="queryParam.referCode"></a-input> | |
53 | + </a-form-item> | |
54 | + </a-col> | |
55 | + | |
56 | + | |
57 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
58 | + <a-form-item label="供应商"> | |
59 | + <a-select | |
60 | + show-search | |
61 | + placeholder="请选择供应商" | |
62 | + option-filter-prop="children" | |
63 | + :filter-option="filterOption" | |
64 | + v-model="queryParam.supplierCode"> | |
65 | + <a-select-option v-for="item in supplierList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | |
66 | + </a-select> | |
67 | + </a-form-item> | |
68 | + </a-col> | |
69 | + | |
70 | + <a-col :xl="10" :lg="11" :md="12" :sm="24"> | |
71 | + <a-form-item label="创建日期"> | |
72 | + <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.createTime_begin"></j-date> | |
73 | + <span class="query-group-split-cust"></span> | |
74 | + <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.createTime_end"></j-date> | |
75 | + </a-form-item> | |
76 | + </a-col> | |
77 | + </template> | |
78 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
79 | + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> | |
80 | + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> | |
81 | + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | |
82 | + <a @click="handleToggleSearch" style="margin-left: 8px"> | |
83 | + {{ toggleSearchStatus ? '收起' : '展开' }} | |
84 | + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | |
85 | + </a> | |
86 | + </span> | |
87 | + </a-col> | |
88 | + </a-row> | |
89 | + </a-form> | |
90 | + </div> | |
91 | +<!-- 查询区域-END --> | |
92 | + | |
93 | +<!-- 操作按钮区域 --> | |
94 | +<div class='table-operator'> | |
95 | +<a-upload name='file' :showUploadList='false' :multiple='false' :headers='tokenHeader' :action='importExcelUrl' | |
96 | + @change='handleImportExcel'> | |
97 | + <!-- <a-button type="primary" icon="import">导入</a-button>--> | |
98 | +</a-upload> | |
99 | +<!-- 高级查询区域 --> | |
100 | +<j-super-query :fieldList='superFieldList' ref='superQueryModal' @handleSuperQuery='handleSuperQuery'></j-super-query> | |
101 | +</div> | |
102 | + | |
103 | +<!-- table区域-begin --> | |
104 | +<div> | |
105 | +<div class='ant-alert ant-alert-info' style='margin-bottom: 16px;'> | |
106 | + <i class='anticon anticon-info-circle ant-alert-icon'></i> 已选择 <a | |
107 | + style='font-weight: 600'>{{ selectedRowKeys.length }}</a>项 | |
108 | + <a style='margin-left: 24px' @click='onClearSelected'>清空</a> | |
109 | +</div> | |
110 | + | |
111 | +<a-table | |
112 | + ref='table' | |
113 | + size='middle' | |
114 | + bordered | |
115 | + rowKey='id' | |
116 | + class='j-table-force-nowrap' | |
117 | + :scroll='{x:true}' | |
118 | + :columns='columns' | |
119 | + :dataSource='dataSource' | |
120 | + :pagination='ipagination' | |
121 | + :loading='loading' | |
122 | + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}" | |
123 | + :customRow='clickThenSelect' | |
124 | + @change='handleTableChange'> | |
125 | + | |
126 | + | |
127 | + <span slot="companyCode" slot-scope="companyCode"> | |
128 | + <a-tag :key="companyCode" color=blue> | |
129 | + {{ solutionCompany(companyCode) }} | |
130 | + </a-tag> | |
131 | + </span> | |
132 | + | |
133 | + <span slot="type" slot-scope="type"> | |
134 | + <a-tag :key="type" color=pink> | |
135 | + {{ solutionReceiptType(type) }} | |
136 | + </a-tag> | |
137 | + </span> | |
138 | + | |
139 | + <span slot="supplierCode" slot-scope="supplierCode"> | |
140 | + <a-tag :key="supplierCode" color=pink> | |
141 | + {{ solutionSupplier(supplierCode) }} | |
142 | + </a-tag> | |
143 | + </span> | |
144 | + | |
145 | + | |
146 | + <template slot='htmlSlot' slot-scope='text'> | |
147 | + <div v-html='text'></div> | |
148 | + </template> | |
149 | + <template slot='imgSlot' slot-scope='text'> | |
150 | + <span v-if='!text' style='font-size: 12px;font-style: italic;'>无图片</span> | |
151 | + <img v-else :src='getImgView(text)' height='25px' alt='' style='max-width:80px;font-size: 12px;font-style: italic;' /> | |
152 | + </template> | |
153 | + <template slot='fileSlot' slot-scope='text'> | |
154 | + <span v-if='!text' style='font-size: 12px;font-style: italic;'>无文件</span> | |
155 | + <a-button | |
156 | + v-else | |
157 | + :ghost='true' | |
158 | + type='primary' | |
159 | + icon='download' | |
160 | + size='small' | |
161 | + @click='downloadFile(text)'> | |
162 | + 下载 | |
163 | + </a-button> | |
164 | + </template> | |
165 | + | |
166 | + <span slot='action' slot-scope='text, record'> | |
167 | + <a @click='handleEdit(record)'>编辑</a> | |
168 | + | |
169 | + <a-divider type='vertical' /> | |
170 | + <a-dropdown> | |
171 | + <a class='ant-dropdown-link'>更多 <a-icon type='down' /></a> | |
172 | + <a-menu slot='overlay'> | |
173 | + <a-menu-item> | |
174 | + <a-popconfirm title='确定删除吗?' @confirm='() => handleDelete(record.id)'> | |
175 | + <a>删除</a> | |
176 | + </a-popconfirm> | |
177 | + </a-menu-item> | |
178 | + </a-menu> | |
179 | + </a-dropdown> | |
180 | + </span> | |
181 | + | |
182 | +</a-table> | |
183 | +</div> | |
184 | + | |
185 | +<a-tabs defaultActiveKey='1'> | |
186 | +<a-tab-pane tab='历史入库单明细' key='1'> | |
187 | + <ReceiptDetailHistoryList :mainId='selectedMainId' /> | |
188 | +</a-tab-pane> | |
189 | +</a-tabs> | |
190 | + | |
191 | +<receiptHeaderHistory-modal ref='modalForm' @ok='modalFormOk'></receiptHeaderHistory-modal> | |
192 | + </a-card> | |
193 | +</template> | |
194 | + | |
195 | +<script> | |
196 | + | |
197 | +import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |
198 | +import ReceiptHeaderHistoryModal from './modules/ReceiptHeaderHistoryModal' | |
199 | +import { getAction } from '@/api/manage' | |
200 | +import ReceiptDetailHistoryList from './ReceiptDetailHistoryList' | |
201 | +import { initDictOptions, filterMultiDictText } from '@/components/dict/JDictSelectUtil' | |
202 | +import '@/assets/less/TableExpand.less' | |
203 | +import { getCompanyList, getReceiptTypeList, getSupplierList } from '@api/api' | |
204 | + | |
205 | +export default { | |
206 | + name: 'ReceiptHeaderHistoryList', | |
207 | + mixins: [JeecgListMixin], | |
208 | + components: { | |
209 | + ReceiptDetailHistoryList, | |
210 | + ReceiptHeaderHistoryModal | |
211 | + }, | |
212 | + data() { | |
213 | + return { | |
214 | + description: '历史入库单管理页面', | |
215 | + companyList:[], | |
216 | + receiptTypeList:[], | |
217 | + supplierList:[], | |
218 | + // 表头 | |
219 | + columns: [ | |
220 | + { | |
221 | + title: '单据ID', | |
222 | + align: 'center', | |
223 | + dataIndex: 'id' | |
224 | + }, | |
225 | + { | |
226 | + title: '编码', | |
227 | + align: 'center', | |
228 | + dataIndex: 'code' | |
229 | + }, | |
230 | + { | |
231 | + title:'货主', | |
232 | + align:"center", | |
233 | + dataIndex: 'companyCode', | |
234 | + key: 'companyCode', | |
235 | + scopedSlots: { customRender: 'companyCode' } | |
236 | + }, | |
237 | + { | |
238 | + title:'入库单类型', | |
239 | + align:"center", | |
240 | + dataIndex: 'type', | |
241 | + key: 'type', | |
242 | + scopedSlots: { customRender: 'type' } | |
243 | + }, | |
244 | + { | |
245 | + title:'头状态', | |
246 | + align:"center", | |
247 | + dataIndex: 'firstStatus_dictText', | |
248 | + }, | |
249 | + { | |
250 | + title:'尾状态', | |
251 | + align:"center", | |
252 | + dataIndex: 'lastStatus_dictText', | |
253 | + }, | |
254 | + { | |
255 | + title: '上游单号', | |
256 | + align: 'center', | |
257 | + dataIndex: 'referCode' | |
258 | + }, | |
259 | + { | |
260 | + title:'供应商', | |
261 | + align:"center", | |
262 | + dataIndex: 'supplierCode', | |
263 | + key: 'supplierCode', | |
264 | + scopedSlots: { customRender: 'supplierCode' } | |
265 | + }, | |
266 | + { | |
267 | + title: '总数量', | |
268 | + align: 'center', | |
269 | + dataIndex: 'totalqty' | |
270 | + }, | |
271 | + { | |
272 | + title: '总行数', | |
273 | + align: 'center', | |
274 | + dataIndex: 'totallines' | |
275 | + }, | |
276 | + { | |
277 | + title: '入库单备注', | |
278 | + align: 'center', | |
279 | + dataIndex: 'remark' | |
280 | + }, | |
281 | + { | |
282 | + title: '创建人', | |
283 | + align: 'center', | |
284 | + dataIndex: 'createBy' | |
285 | + }, | |
286 | + { | |
287 | + title: '创建日期', | |
288 | + align: 'center', | |
289 | + dataIndex: 'createTime' | |
290 | + }, | |
291 | + { | |
292 | + title: '更新人', | |
293 | + align: 'center', | |
294 | + dataIndex: 'updateBy' | |
295 | + }, | |
296 | + { | |
297 | + title: '更新日期', | |
298 | + align: 'center', | |
299 | + dataIndex: 'updateTime' | |
300 | + }, | |
301 | + { | |
302 | + title: '操作', | |
303 | + dataIndex: 'action', | |
304 | + align: 'center', | |
305 | + fixed: 'right', | |
306 | + width: 147, | |
307 | + scopedSlots: { customRender: 'action' } | |
308 | + } | |
309 | + ], | |
310 | + url: { | |
311 | + list: '/receipt/receiptHeaderHistory/list', | |
312 | + delete: '/receipt/receiptHeaderHistory/delete', | |
313 | + deleteBatch: '/receipt/receiptHeaderHistory/deleteBatch', | |
314 | + exportXlsUrl: '/receipt/receiptHeaderHistory/exportXls', | |
315 | + importExcelUrl: 'receipt/receiptHeaderHistory/importExcel' | |
316 | + }, | |
317 | + dictOptions: { | |
318 | + firstStatus:[], | |
319 | + lastStatus:[], | |
320 | + }, | |
321 | + /* 分页参数 */ | |
322 | + ipagination: { | |
323 | + current: 1, | |
324 | + pageSize: 5, | |
325 | + pageSizeOptions: ['5', '10', '50'], | |
326 | + showTotal: (total, range) => { | |
327 | + return range[0] + '-' + range[1] + ' 共' + total + '条' | |
328 | + }, | |
329 | + showQuickJumper: true, | |
330 | + showSizeChanger: true, | |
331 | + total: 0 | |
332 | + }, | |
333 | + selectedMainId: '', | |
334 | + superFieldList: [] | |
335 | + } | |
336 | + }, | |
337 | + created() { | |
338 | + this.getSuperFieldList() | |
339 | + this.loadFrom(); | |
340 | + }, | |
341 | + computed: { | |
342 | + importExcelUrl: function() { | |
343 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` | |
344 | + } | |
345 | + }, | |
346 | + methods: { | |
347 | + initDictConfig() { | |
348 | + }, | |
349 | + clickThenSelect(record) { | |
350 | + return { | |
351 | + on: { | |
352 | + click: () => { | |
353 | + this.onSelectChange(record.id.split(','), [record]) | |
354 | + } | |
355 | + } | |
356 | + } | |
357 | + }, | |
358 | + onClearSelected() { | |
359 | + this.selectedRowKeys = [] | |
360 | + this.selectionRows = [] | |
361 | + this.selectedMainId = '' | |
362 | + }, | |
363 | + onSelectChange(selectedRowKeys, selectionRows) { | |
364 | + this.selectedMainId = selectedRowKeys[0] | |
365 | + this.selectedRowKeys = selectedRowKeys | |
366 | + this.selectionRows = selectionRows | |
367 | + }, | |
368 | + loadData(arg) { | |
369 | + if (!this.url.list) { | |
370 | + this.$message.error('请设置url.list属性!') | |
371 | + return | |
372 | + } | |
373 | + //加载数据 若传入参数1则加载第一页的内容 | |
374 | + if (arg === 1) { | |
375 | + this.ipagination.current = 1 | |
376 | + } | |
377 | + this.onClearSelected() | |
378 | + var params = this.getQueryParams()//查询条件 | |
379 | + this.loading = true | |
380 | + getAction(this.url.list, params).then((res) => { | |
381 | + if (res.success) { | |
382 | + this.dataSource = res.result.records | |
383 | + this.ipagination.total = res.result.total | |
384 | + } | |
385 | + if (res.code === 510) { | |
386 | + this.$message.warning(res.message) | |
387 | + } | |
388 | + this.loading = false | |
389 | + }) | |
390 | + }, | |
391 | + getSuperFieldList() { | |
392 | + let fieldList = [] | |
393 | + fieldList.push({ type: 'string', value: 'code', text: '编码', dictCode: '' }) | |
394 | + fieldList.push({ type: 'string', value: 'companyCode', text: '货主', dictCode: '' }) | |
395 | + fieldList.push({ type: 'string', value: 'type', text: '入库单类型', dictCode: '' }) | |
396 | + fieldList.push({ type: 'int', value: 'firstStatus', text: '头状态', dictCode: 'receipt_status' }) | |
397 | + fieldList.push({ type: 'int', value: 'lastStatus', text: '尾状态', dictCode: 'receipt_status' }) | |
398 | + fieldList.push({ type: 'string', value: 'referCode', text: '上游单号', dictCode: '' }) | |
399 | + fieldList.push({ type: 'string', value: 'supplierCode', text: '供应商编码', dictCode: '' }) | |
400 | + fieldList.push({ type: 'BigDecimal', value: 'totalqty', text: '总数量', dictCode: '' }) | |
401 | + fieldList.push({ type: 'int', value: 'totallines', text: '总行数', dictCode: '' }) | |
402 | + fieldList.push({ type: 'string', value: 'remark', text: '入库单备注', dictCode: '' }) | |
403 | + fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' }) | |
404 | + fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' }) | |
405 | + fieldList.push({ type: 'string', value: 'updateBy', text: '更新人', dictCode: '' }) | |
406 | + fieldList.push({ type: 'datetime', value: 'updateTime', text: '更新日期' }) | |
407 | + this.superFieldList = fieldList | |
408 | + }, | |
409 | + loadFrom() { | |
410 | + getCompanyList().then((res) => { | |
411 | + if (res.success) { | |
412 | + this.companyList = res.result | |
413 | + } | |
414 | + }) | |
415 | + getReceiptTypeList().then((res) => { | |
416 | + if (res.success) { | |
417 | + this.receiptTypeList = res.result | |
418 | + } | |
419 | + }) | |
420 | + getSupplierList().then((res) => { | |
421 | + if (res.success) { | |
422 | + this.supplierList = res.result | |
423 | + } | |
424 | + }) | |
425 | + }, | |
426 | + solutionCompany(value) { | |
427 | + var actions = [] | |
428 | + Object.keys(this.companyList).some((key) => { | |
429 | + if (this.companyList[key].code == ('' + value)) { | |
430 | + actions.push(this.companyList[key].name) | |
431 | + return true | |
432 | + } | |
433 | + }) | |
434 | + return actions.join('') | |
435 | + }, | |
436 | + solutionReceiptType(value) { | |
437 | + var actions = [] | |
438 | + Object.keys(this.receiptTypeList).some((key) => { | |
439 | + if (this.receiptTypeList[key].code == ('' + value)) { | |
440 | + actions.push(this.receiptTypeList[key].name) | |
441 | + return true | |
442 | + } | |
443 | + }) | |
444 | + return actions.join('') | |
445 | + }, | |
446 | + solutionSupplier(value) { | |
447 | + var actions = [] | |
448 | + Object.keys(this.supplierList).some((key) => { | |
449 | + if (this.supplierList[key].code == ('' + value)) { | |
450 | + actions.push(this.supplierList[key].name) | |
451 | + return true | |
452 | + } | |
453 | + }) | |
454 | + return actions.join('') | |
455 | + } | |
456 | + } | |
457 | +} | |
458 | +</script> | |
459 | +<style scoped> | |
460 | +@import '~@assets/less/common.less' | |
461 | +</style> | |
0 | 462 | \ No newline at end of file |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptDetailHistoryModal.vue
0 → 100644
1 | +<template> | |
2 | + <j-modal | |
3 | + :title="title" | |
4 | + :width="width" | |
5 | + :visible="visible" | |
6 | + :confirmLoading="confirmLoading" | |
7 | + switchFullscreen | |
8 | + @ok="handleOk" | |
9 | + @cancel="handleCancel" | |
10 | + cancelText="关闭"> | |
11 | + <a-spin :spinning="confirmLoading"> | |
12 | + <a-form-model ref="form" :model="model" :rules="validatorRules"> | |
13 | + <a-row> | |
14 | + <a-col :span="24"> | |
15 | + <a-form-model-item label="入库单ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="receiptId"> | |
16 | + <a-input-number v-model="model.receiptId"placeholder="请输入入库单ID" style="width: 100%" /> | |
17 | + </a-form-model-item> | |
18 | + </a-col> | |
19 | + <a-col :span="24"> | |
20 | + <a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode"> | |
21 | + <a-input v-model="model.materialCode"placeholder="请输入物料编码" ></a-input> | |
22 | + </a-form-model-item> | |
23 | + </a-col> | |
24 | + <a-col :span="24"> | |
25 | + <a-form-model-item label="物料名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialName"> | |
26 | + <a-input v-model="model.materialName"placeholder="请输入物料名称" ></a-input> | |
27 | + </a-form-model-item> | |
28 | + </a-col> | |
29 | + <a-col :span="24"> | |
30 | + <a-form-model-item label="单据数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qty"> | |
31 | + <a-input-number v-model="model.qty"placeholder="请输入单据数量" style="width: 100%" /> | |
32 | + </a-form-model-item> | |
33 | + </a-col> | |
34 | + <a-col :span="24"> | |
35 | + <a-form-model-item label="已收数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="taskQty"> | |
36 | + <a-input-number v-model="model.taskQty"placeholder="请输入已收数量" style="width: 100%" /> | |
37 | + </a-form-model-item> | |
38 | + </a-col> | |
39 | + <a-col :span="24"> | |
40 | + <a-form-model-item label="库存状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventoryStatus"> | |
41 | + <a-input v-model="model.inventoryStatus"placeholder="请输入库存状态" ></a-input> | |
42 | + </a-form-model-item> | |
43 | + </a-col> | |
44 | + <a-col :span="24"> | |
45 | + <a-form-model-item label="批次" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="batch"> | |
46 | + <a-input v-model="model.batch"placeholder="请输入批次" ></a-input> | |
47 | + </a-form-model-item> | |
48 | + </a-col> | |
49 | + </a-row> | |
50 | + </a-form-model> | |
51 | + </a-spin> | |
52 | + </j-modal> | |
53 | +</template> | |
54 | + | |
55 | +<script> | |
56 | + | |
57 | + import { httpAction } from '@/api/manage' | |
58 | + import { validateDuplicateValue } from '@/utils/util' | |
59 | + | |
60 | + export default { | |
61 | + name: "ReceiptDetailHistoryModal", | |
62 | + components: { | |
63 | + }, | |
64 | + props:{ | |
65 | + mainId:{ | |
66 | + type:String, | |
67 | + required:false, | |
68 | + querySource:{}, | |
69 | + default:'' | |
70 | + } | |
71 | + }, | |
72 | + data () { | |
73 | + return { | |
74 | + title:"操作", | |
75 | + width:800, | |
76 | + visible: false, | |
77 | + querySource:{}, | |
78 | + model:{ | |
79 | + }, | |
80 | + labelCol: { | |
81 | + xs: { span: 24 }, | |
82 | + sm: { span: 5 }, | |
83 | + }, | |
84 | + wrapperCol: { | |
85 | + xs: { span: 24 }, | |
86 | + sm: { span: 16 }, | |
87 | + }, | |
88 | + | |
89 | + confirmLoading: false, | |
90 | + validatorRules: { | |
91 | + }, | |
92 | + url: { | |
93 | + add: "/receipt/receiptHeaderHistory/addReceiptDetailHistory", | |
94 | + edit: "/receipt/receiptHeaderHistory/editReceiptDetailHistory", | |
95 | + } | |
96 | + | |
97 | + } | |
98 | + }, | |
99 | + created () { | |
100 | + //备份model原始值 | |
101 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | |
102 | + }, | |
103 | + methods: { | |
104 | + add () { | |
105 | + this.edit(this.modelDefault); | |
106 | + }, | |
107 | + edit (record) { | |
108 | + this.model = Object.assign({}, record); | |
109 | + this.visible = true; | |
110 | + }, | |
111 | + close () { | |
112 | + this.$emit('close'); | |
113 | + this.visible = false; | |
114 | + this.$refs.form.clearValidate(); | |
115 | + }, | |
116 | + handleOk () { | |
117 | + const that = this; | |
118 | + // 触发表单验证 | |
119 | + this.$refs.form.validate(valid => { | |
120 | + if (valid) { | |
121 | + that.confirmLoading = true; | |
122 | + let httpurl = ''; | |
123 | + let method = ''; | |
124 | + if(!this.model.id){ | |
125 | + httpurl+=this.url.add; | |
126 | + method = 'post'; | |
127 | + }else{ | |
128 | + httpurl+=this.url.edit; | |
129 | + method = 'put'; | |
130 | + } | |
131 | + this.model['receiptId'] = this.mainId | |
132 | + httpAction(httpurl,this.model,method).then((res)=>{ | |
133 | + if(res.success){ | |
134 | + that.$message.success(res.message); | |
135 | + that.$emit('ok'); | |
136 | + }else{ | |
137 | + that.$message.warning(res.message); | |
138 | + } | |
139 | + }).finally(() => { | |
140 | + that.confirmLoading = false; | |
141 | + that.close(); | |
142 | + }) | |
143 | + }else{ | |
144 | + return false | |
145 | + } | |
146 | + }) | |
147 | + }, | |
148 | + handleCancel () { | |
149 | + this.close() | |
150 | + }, | |
151 | + | |
152 | + | |
153 | + } | |
154 | + } | |
155 | +</script> | |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptHeaderHistoryModal.vue
0 → 100644
1 | +<template> | |
2 | + <j-modal | |
3 | + :title="title" | |
4 | + :width="width" | |
5 | + :visible="visible" | |
6 | + :confirmLoading="confirmLoading" | |
7 | + switchFullscreen | |
8 | + @ok="handleOk" | |
9 | + @cancel="handleCancel" | |
10 | + cancelText="关闭"> | |
11 | + <a-spin :spinning="confirmLoading"> | |
12 | + <a-form-model ref="form" :model="model" :rules="validatorRules"> | |
13 | + <a-row> | |
14 | + <a-col :span="24"> | |
15 | + <a-form-model-item label="货主" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCode"> | |
16 | + <a-select | |
17 | + show-search | |
18 | + placeholder="请选择货主" | |
19 | + option-filter-prop="children" | |
20 | + :filter-option="filterOption" | |
21 | + v-model="model.companyCode"> | |
22 | + <a-select-option v-for="item in companyList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | |
23 | + </a-select> | |
24 | + </a-form-model-item> | |
25 | + </a-col> | |
26 | + | |
27 | + <a-col :span="24"> | |
28 | + <a-form-model-item label="入库单类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type"> | |
29 | + <a-select | |
30 | + show-search | |
31 | + placeholder="请选择入库单类型" | |
32 | + option-filter-prop="children" | |
33 | + :filter-option="filterOption" | |
34 | + v-model="model.type"> | |
35 | + <a-select-option v-for="item in receiptTypeList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | |
36 | + </a-select> | |
37 | + </a-form-model-item> | |
38 | + </a-col> | |
39 | + | |
40 | + | |
41 | + <a-col :span="24"> | |
42 | + <a-form-model-item label="供应商" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierCode"> | |
43 | + <a-select | |
44 | + show-search | |
45 | + placeholder="请选择供应商" | |
46 | + option-filter-prop="children" | |
47 | + :filter-option="filterOption" | |
48 | + v-model="model.supplierCode"> | |
49 | + <a-select-option v-for="item in supplierList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | |
50 | + </a-select> | |
51 | + </a-form-model-item> | |
52 | + </a-col> | |
53 | + | |
54 | + <a-col :span="24"> | |
55 | + <a-form-model-item label="入库单备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> | |
56 | + <a-input v-model="model.remark" placeholder="请输入入库单备注" ></a-input> | |
57 | + </a-form-model-item> | |
58 | + </a-col> | |
59 | + </a-row> | |
60 | + </a-form-model> | |
61 | + </a-spin> | |
62 | + </j-modal> | |
63 | +</template> | |
64 | + | |
65 | +<script> | |
66 | + | |
67 | + import { httpAction } from '@/api/manage' | |
68 | + import { validateDuplicateValue } from '@/utils/util' | |
69 | + import {getCompanyList} from '@/api/api' | |
70 | + import {getReceiptTypeList} from '@/api/api' | |
71 | + import {getSupplierList} from '@/api/api' | |
72 | + | |
73 | + export default { | |
74 | + name: "ReceiptHeaderHistoryModal", | |
75 | + components: { | |
76 | + }, | |
77 | + data () { | |
78 | + return { | |
79 | + title:"操作", | |
80 | + width:800, | |
81 | + visible: false, | |
82 | + companyList:[], | |
83 | + receiptTypeList:[], | |
84 | + supplierList:[], | |
85 | + model:{ | |
86 | + }, | |
87 | + labelCol: { | |
88 | + xs: { span: 24 }, | |
89 | + sm: { span: 5 }, | |
90 | + }, | |
91 | + wrapperCol: { | |
92 | + xs: { span: 24 }, | |
93 | + sm: { span: 16 }, | |
94 | + }, | |
95 | + | |
96 | + confirmLoading: false, | |
97 | + validatorRules: { | |
98 | + type: [ | |
99 | + { required: true, message: '请输入入库单类型!'}, | |
100 | + ], | |
101 | + }, | |
102 | + url: { | |
103 | + add: "/receipt/receiptHeaderHistory/add", | |
104 | + edit: "/receipt/receiptHeaderHistory/edit", | |
105 | + } | |
106 | + | |
107 | + } | |
108 | + }, | |
109 | + created () { | |
110 | + //备份model原始值 | |
111 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | |
112 | + this.loadFrom(); | |
113 | + }, | |
114 | + methods: { | |
115 | + add () { | |
116 | + this.edit(this.modelDefault); | |
117 | + this.model.companyCode = this.companyList[0].code; | |
118 | + }, | |
119 | + edit (record) { | |
120 | + this.model = Object.assign({}, record); | |
121 | + this.visible = true; | |
122 | + }, | |
123 | + close () { | |
124 | + this.$emit('close'); | |
125 | + this.visible = false; | |
126 | + this.$refs.form.clearValidate(); | |
127 | + }, | |
128 | + handleOk () { | |
129 | + const that = this; | |
130 | + // 触发表单验证 | |
131 | + this.$refs.form.validate(valid => { | |
132 | + if (valid) { | |
133 | + that.confirmLoading = true; | |
134 | + let httpurl = ''; | |
135 | + let method = ''; | |
136 | + if(!this.model.id){ | |
137 | + httpurl+=this.url.add; | |
138 | + method = 'post'; | |
139 | + }else{ | |
140 | + httpurl+=this.url.edit; | |
141 | + method = 'put'; | |
142 | + } | |
143 | + httpAction(httpurl,this.model,method).then((res)=>{ | |
144 | + if(res.success){ | |
145 | + that.$message.success(res.message); | |
146 | + that.$emit('ok'); | |
147 | + }else{ | |
148 | + that.$message.warning(res.message); | |
149 | + } | |
150 | + }).finally(() => { | |
151 | + that.confirmLoading = false; | |
152 | + that.close(); | |
153 | + }) | |
154 | + }else{ | |
155 | + return false | |
156 | + } | |
157 | + }) | |
158 | + }, | |
159 | + handleCancel () { | |
160 | + this.close() | |
161 | + }, | |
162 | + loadFrom() { | |
163 | + getCompanyList().then((res) => { | |
164 | + if (res.success) { | |
165 | + this.companyList = res.result | |
166 | + } | |
167 | + }); | |
168 | + getReceiptTypeList().then((res) => { | |
169 | + if (res.success) { | |
170 | + this.receiptTypeList = res.result | |
171 | + } | |
172 | + }); | |
173 | + getSupplierList().then((res) => { | |
174 | + if (res.success) { | |
175 | + this.supplierList = res.result | |
176 | + } | |
177 | + }); | |
178 | + }, | |
179 | + | |
180 | + } | |
181 | + } | |
182 | +</script> | |
0 | 183 | \ No newline at end of file |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/ShipmentDetailHistoryList.vue
0 → 100644
1 | +<template> | |
2 | + <a-card :bordered="false" :class="'cust-erp-sub-tab'"> | |
3 | + <!-- 操作按钮区域 --> | |
4 | + <div class="table-operator" v-if="mainId"> | |
5 | +<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>--> | |
6 | +<!-- <a-button type="primary" icon="download" @click="handleExportXls('历史出库单明细')">导出</a-button>--> | |
7 | + <a-upload | |
8 | + name="file" | |
9 | + :showUploadList="false" | |
10 | + :multiple="false" | |
11 | + :headers="tokenHeader" | |
12 | + :action="importExcelUrl" | |
13 | + @change="handleImportExcel"> | |
14 | +<!-- <a-button type="primary" icon="import">导入</a-button>--> | |
15 | + </a-upload> | |
16 | + <a-dropdown v-if="selectedRowKeys.length > 0"> | |
17 | + <a-menu slot="overlay"> | |
18 | + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> | |
19 | + </a-menu> | |
20 | + <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> | |
21 | + </a-dropdown> | |
22 | + </div> | |
23 | + | |
24 | + <!-- table区域-begin --> | |
25 | + <div> | |
26 | + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | |
27 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | |
28 | + <a style="margin-left: 24px" @click="onClearSelected">清空</a> | |
29 | + </div> | |
30 | + | |
31 | + <a-table | |
32 | + ref="table" | |
33 | + size="middle" | |
34 | + bordered | |
35 | + rowKey="id" | |
36 | + :scroll="{x:true}" | |
37 | + :columns="columns" | |
38 | + :dataSource="dataSource" | |
39 | + :pagination="ipagination" | |
40 | + :loading="loading" | |
41 | + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | |
42 | + @change="handleTableChange"> | |
43 | + | |
44 | + <template slot="htmlSlot" slot-scope="text"> | |
45 | + <div v-html="text"></div> | |
46 | + </template> | |
47 | + <template slot="imgSlot" slot-scope="text"> | |
48 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | |
49 | + <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> | |
50 | + </template> | |
51 | + <template slot="fileSlot" slot-scope="text"> | |
52 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |
53 | + <a-button | |
54 | + v-else | |
55 | + :ghost="true" | |
56 | + type="primary" | |
57 | + icon="download" | |
58 | + size="small" | |
59 | + @click="downloadFile(text)"> | |
60 | + 下载 | |
61 | + </a-button> | |
62 | + </template> | |
63 | + | |
64 | + <span slot="action" slot-scope="text, record"> | |
65 | + <a @click="handleEdit(record)">编辑</a> | |
66 | + <a-divider type="vertical" /> | |
67 | + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | |
68 | + <a>删除</a> | |
69 | + </a-popconfirm> | |
70 | + </span> | |
71 | + | |
72 | + </a-table> | |
73 | + </div> | |
74 | + | |
75 | + <shipmentDetailHistory-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></shipmentDetailHistory-modal> | |
76 | + </a-card> | |
77 | +</template> | |
78 | + | |
79 | +<script> | |
80 | + | |
81 | + import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |
82 | + import ShipmentDetailHistoryModal from './modules/ShipmentDetailHistoryModal' | |
83 | + | |
84 | + export default { | |
85 | + name: "ShipmentDetailHistoryList", | |
86 | + mixins:[JeecgListMixin], | |
87 | + components: { ShipmentDetailHistoryModal }, | |
88 | + props:{ | |
89 | + mainId:{ | |
90 | + type:String, | |
91 | + default:'', | |
92 | + required:false | |
93 | + } | |
94 | + }, | |
95 | + watch:{ | |
96 | + mainId:{ | |
97 | + immediate: true, | |
98 | + handler(val) { | |
99 | + if(!this.mainId){ | |
100 | + this.clearList() | |
101 | + }else{ | |
102 | + this.queryParam['shipmentId'] = val | |
103 | + this.loadData(1); | |
104 | + } | |
105 | + } | |
106 | + } | |
107 | + }, | |
108 | + data () { | |
109 | + return { | |
110 | + description: '历史出库单管理页面', | |
111 | + disableMixinCreated:true, | |
112 | + // 表头 | |
113 | + columns: [ | |
114 | + // { | |
115 | + // title: '#', | |
116 | + // dataIndex: '', | |
117 | + // key:'rowIndex', | |
118 | + // width:60, | |
119 | + // align:"center", | |
120 | + // customRender:function (t,r,index) { | |
121 | + // return parseInt(index)+1; | |
122 | + // } | |
123 | + // }, | |
124 | + // { | |
125 | + // title:'出库单ID', | |
126 | + // align:"center", | |
127 | + // dataIndex: 'shipmentId' | |
128 | + // }, | |
129 | + { | |
130 | + title:'出库单编码', | |
131 | + align:"center", | |
132 | + dataIndex: 'shipmentCode' | |
133 | + }, | |
134 | + { | |
135 | + title:'货主编码', | |
136 | + align:"center", | |
137 | + dataIndex: 'companyCode' | |
138 | + }, | |
139 | + { | |
140 | + title:'物料编码', | |
141 | + align:"center", | |
142 | + dataIndex: 'materialCode' | |
143 | + }, | |
144 | + { | |
145 | + title:'物料名称', | |
146 | + align:"center", | |
147 | + dataIndex: 'materialName' | |
148 | + }, | |
149 | + { | |
150 | + title:'物料规格', | |
151 | + align:"center", | |
152 | + dataIndex: 'materialSpec' | |
153 | + }, | |
154 | + { | |
155 | + title:'物料单位', | |
156 | + align:"center", | |
157 | + dataIndex: 'materialUnit' | |
158 | + }, | |
159 | + { | |
160 | + title:'单据数量', | |
161 | + align:"center", | |
162 | + dataIndex: 'qty' | |
163 | + }, | |
164 | + { | |
165 | + title:'已收数量', | |
166 | + align:"center", | |
167 | + dataIndex: 'taskQty' | |
168 | + }, | |
169 | + { | |
170 | + title:'库存状态', | |
171 | + align:"center", | |
172 | + dataIndex: 'inventoryStatus_dictText' | |
173 | + }, | |
174 | + { | |
175 | + title:'批次', | |
176 | + align:"center", | |
177 | + dataIndex: 'batch' | |
178 | + }, | |
179 | + { | |
180 | + title:'单据状态', | |
181 | + align:"center", | |
182 | + dataIndex: 'status_dictText' | |
183 | + }, | |
184 | + { | |
185 | + title:'上游单号', | |
186 | + align:"center", | |
187 | + dataIndex: 'referCode' | |
188 | + }, | |
189 | + { | |
190 | + title:'上游行号', | |
191 | + align:"center", | |
192 | + dataIndex: 'referLineNum' | |
193 | + }, | |
194 | + { | |
195 | + title:'创建人', | |
196 | + align:"center", | |
197 | + dataIndex: 'createBy' | |
198 | + }, | |
199 | + { | |
200 | + title:'创建日期', | |
201 | + align:"center", | |
202 | + dataIndex: 'createTime', | |
203 | + customRender:function (text) { | |
204 | + return !text?"":(text.length>10?text.substr(0,10):text) | |
205 | + } | |
206 | + }, | |
207 | + { | |
208 | + title:'更新人', | |
209 | + align:"center", | |
210 | + dataIndex: 'updateBy' | |
211 | + }, | |
212 | + { | |
213 | + title:'更新日期', | |
214 | + align:"center", | |
215 | + dataIndex: 'updateTime', | |
216 | + customRender:function (text) { | |
217 | + return !text?"":(text.length>10?text.substr(0,10):text) | |
218 | + } | |
219 | + }, | |
220 | + { | |
221 | + title: '操作', | |
222 | + dataIndex: 'action', | |
223 | + align:"center", | |
224 | + fixed:"right", | |
225 | + width:147, | |
226 | + scopedSlots: { customRender: 'action' }, | |
227 | + } | |
228 | + ], | |
229 | + url: { | |
230 | + list: "/shipment/shipmentHeaderHistory/listShipmentDetailHistoryByMainId", | |
231 | + delete: "/shipment/shipmentHeaderHistory/deleteShipmentDetailHistory", | |
232 | + deleteBatch: "/shipment/shipmentHeaderHistory/deleteBatchShipmentDetailHistory", | |
233 | + exportXlsUrl: "/shipment/shipmentHeaderHistory/exportShipmentDetailHistory", | |
234 | + importUrl: "/shipment/shipmentHeaderHistory/importShipmentDetailHistory", | |
235 | + }, | |
236 | + dictOptions:{ | |
237 | + firstStatus:[], | |
238 | + lastStatus:[], | |
239 | + } | |
240 | + } | |
241 | + }, | |
242 | + created() { | |
243 | + }, | |
244 | + computed: { | |
245 | + importExcelUrl(){ | |
246 | + return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; | |
247 | + } | |
248 | + }, | |
249 | + methods: { | |
250 | + clearList(){ | |
251 | + this.dataSource=[] | |
252 | + this.selectedRowKeys=[] | |
253 | + this.ipagination.current = 1 | |
254 | + } | |
255 | + | |
256 | + } | |
257 | + } | |
258 | +</script> | |
259 | +<style scoped> | |
260 | + @import '~@assets/less/common.less' | |
261 | +</style> | |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/ShipmentHeaderHistoryList.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.code"></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-select | |
15 | + show-search | |
16 | + placeholder="请选择货主" | |
17 | + option-filter-prop="children" | |
18 | + :filter-option="filterOption" | |
19 | + v-model="queryParam.companyCode"> | |
20 | + <a-select-option v-for="item in companyList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | |
21 | + </a-select> | |
22 | + </a-form-item> | |
23 | + </a-col> | |
24 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
25 | + <a-form-item label="出库单类型"> | |
26 | + <a-select | |
27 | + show-search | |
28 | + placeholder="请选择出库单类型" | |
29 | + option-filter-prop="children" | |
30 | + :filter-option="filterOption" | |
31 | + v-model="queryParam.type"> | |
32 | + <a-select-option v-for="item in shipmentTypeList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | |
33 | + </a-select> | |
34 | + </a-form-item> | |
35 | + </a-col> | |
36 | + <template v-if="toggleSearchStatus"> | |
37 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
38 | + <a-form-item label="头状态"> | |
39 | + <j-dict-select-tag placeholder="请选择头状态" v-model="queryParam.firstStatus" dictCode="shipment_status"/> | |
40 | + </a-form-item> | |
41 | + </a-col> | |
42 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
43 | + <a-form-item label="尾状态"> | |
44 | + <j-dict-select-tag placeholder="请选择尾状态" v-model="queryParam.lastStatus" dictCode="shipment_status"/> | |
45 | + </a-form-item> | |
46 | + </a-col> | |
47 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
48 | + <a-form-item label="上游单号"> | |
49 | + <a-input placeholder="请输入上游单号" v-model="queryParam.referCode"></a-input> | |
50 | + </a-form-item> | |
51 | + </a-col> | |
52 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
53 | + <a-form-item label="客户"> | |
54 | + <a-select | |
55 | + show-search | |
56 | + placeholder="请选择客户" | |
57 | + option-filter-prop="children" | |
58 | + :filter-option="filterOption" | |
59 | + v-model="queryParam.customerCode"> | |
60 | + <a-select-option v-for="item in customerList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | |
61 | + </a-select> | |
62 | + </a-form-item> | |
63 | + </a-col> | |
64 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
65 | + <a-form-item label="出库单备注"> | |
66 | + <a-input placeholder="请输入出库单备注" v-model="queryParam.remark"></a-input> | |
67 | + </a-form-item> | |
68 | + </a-col> | |
69 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
70 | + <a-form-item label="创建人"> | |
71 | + <a-input placeholder="请输入创建人" v-model="queryParam.createBy"></a-input> | |
72 | + </a-form-item> | |
73 | + </a-col> | |
74 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
75 | + <a-form-item label="创建日期"> | |
76 | + <j-date placeholder="请选择创建日期" v-model="queryParam.createTime"></j-date> | |
77 | + </a-form-item> | |
78 | + </a-col> | |
79 | + </template> | |
80 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
81 | + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> | |
82 | + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> | |
83 | + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | |
84 | + <a @click="handleToggleSearch" style="margin-left: 8px"> | |
85 | + {{ toggleSearchStatus ? '收起' : '展开' }} | |
86 | + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | |
87 | + </a> | |
88 | + </span> | |
89 | + </a-col> | |
90 | + </a-row> | |
91 | + </a-form> | |
92 | + </div> | |
93 | + <!-- 查询区域-END --> | |
94 | + | |
95 | + <!-- 操作按钮区域 --> | |
96 | + <div class="table-operator"> | |
97 | +<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>--> | |
98 | +<!-- <a-button type="primary" icon="download" @click="handleExportXls('历史出库单')">导出</a-button>--> | |
99 | + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> | |
100 | +<!-- <a-button type="primary" icon="import">导入</a-button>--> | |
101 | + </a-upload> | |
102 | + <!-- 高级查询区域 --> | |
103 | + <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> | |
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 | + bordered | |
117 | + rowKey="id" | |
118 | + class="j-table-force-nowrap" | |
119 | + :scroll="{x:true}" | |
120 | + :columns="columns" | |
121 | + :dataSource="dataSource" | |
122 | + :pagination="ipagination" | |
123 | + :loading="loading" | |
124 | + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}" | |
125 | + :customRow="clickThenSelect" | |
126 | + @change="handleTableChange"> | |
127 | + | |
128 | + <template slot="htmlSlot" slot-scope="text"> | |
129 | + <div v-html="text"></div> | |
130 | + </template> | |
131 | + <template slot="imgSlot" slot-scope="text"> | |
132 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | |
133 | + <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> | |
134 | + </template> | |
135 | + <template slot="fileSlot" slot-scope="text"> | |
136 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |
137 | + <a-button | |
138 | + v-else | |
139 | + :ghost="true" | |
140 | + type="primary" | |
141 | + icon="download" | |
142 | + size="small" | |
143 | + @click="downloadFile(text)"> | |
144 | + 下载 | |
145 | + </a-button> | |
146 | + </template> | |
147 | + | |
148 | + <span slot="action" slot-scope="text, record"> | |
149 | + <a @click="handleEdit(record)">编辑</a> | |
150 | + | |
151 | + <a-divider type="vertical" /> | |
152 | + <a-dropdown> | |
153 | + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> | |
154 | + <a-menu slot="overlay"> | |
155 | + <a-menu-item> | |
156 | + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | |
157 | + <a>删除</a> | |
158 | + </a-popconfirm> | |
159 | + </a-menu-item> | |
160 | + </a-menu> | |
161 | + </a-dropdown> | |
162 | + </span> | |
163 | + | |
164 | + </a-table> | |
165 | + </div> | |
166 | + | |
167 | + <a-tabs defaultActiveKey="1"> | |
168 | + <a-tab-pane tab="历史出库单明细" key="1" > | |
169 | + <ShipmentDetailHistoryList :mainId="selectedMainId" /> | |
170 | + </a-tab-pane> | |
171 | + </a-tabs> | |
172 | + | |
173 | + <shipmentHeaderHistory-modal ref="modalForm" @ok="modalFormOk"></shipmentHeaderHistory-modal> | |
174 | + </a-card> | |
175 | +</template> | |
176 | + | |
177 | +<script> | |
178 | + | |
179 | + import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |
180 | + import ShipmentHeaderHistoryModal from './modules/ShipmentHeaderHistoryModal' | |
181 | + import { getAction } from '@/api/manage' | |
182 | + import ShipmentDetailHistoryList from './ShipmentDetailHistoryList' | |
183 | + import {initDictOptions,filterMultiDictText} from '@/components/dict/JDictSelectUtil' | |
184 | + import '@/assets/less/TableExpand.less' | |
185 | + import { getCompanyList, getCustomerList, getShipmentTypeList } from '@api/api' | |
186 | + | |
187 | + export default { | |
188 | + name: "ShipmentHeaderHistoryList", | |
189 | + mixins:[JeecgListMixin], | |
190 | + components: { | |
191 | + ShipmentDetailHistoryList, | |
192 | + ShipmentHeaderHistoryModal | |
193 | + }, | |
194 | + data () { | |
195 | + return { | |
196 | + description: '历史出库单管理页面', | |
197 | + // 表头 | |
198 | + columns: [ | |
199 | + { | |
200 | + title:'出库单编码', | |
201 | + align:"center", | |
202 | + dataIndex: 'code' | |
203 | + }, | |
204 | + { | |
205 | + title:'货主', | |
206 | + align:"center", | |
207 | + dataIndex: 'companyCode', | |
208 | + key: 'companyCode', | |
209 | + scopedSlots: { customRender: 'companyCode' } | |
210 | + }, | |
211 | + { | |
212 | + title:'出库单类型', | |
213 | + align:"center", | |
214 | + dataIndex: 'type', | |
215 | + key: 'type', | |
216 | + scopedSlots: { customRender: 'type' } | |
217 | + }, | |
218 | + { | |
219 | + title:'头状态', | |
220 | + align:"center", | |
221 | + dataIndex: 'firstStatus_dictText', | |
222 | + }, | |
223 | + { | |
224 | + title:'尾状态', | |
225 | + align:"center", | |
226 | + dataIndex: 'lastStatus_dictText', | |
227 | + }, | |
228 | + { | |
229 | + title:'上游单号', | |
230 | + align:"center", | |
231 | + dataIndex: 'referCode' | |
232 | + }, | |
233 | + { | |
234 | + title:'客户', | |
235 | + align:"center", | |
236 | + dataIndex: 'customerCode', | |
237 | + key: 'customerCode', | |
238 | + scopedSlots: { customRender: 'customerCode' } | |
239 | + }, | |
240 | + { | |
241 | + title:'总数量', | |
242 | + align:"center", | |
243 | + dataIndex: 'totalQty' | |
244 | + }, | |
245 | + { | |
246 | + title:'总行数', | |
247 | + align:"center", | |
248 | + dataIndex: 'totalLines' | |
249 | + }, | |
250 | + { | |
251 | + title:'出库单备注', | |
252 | + align:"center", | |
253 | + dataIndex: 'remark' | |
254 | + }, | |
255 | + { | |
256 | + title:'创建人', | |
257 | + align:"center", | |
258 | + dataIndex: 'createBy' | |
259 | + }, | |
260 | + { | |
261 | + title:'创建日期', | |
262 | + align:"center", | |
263 | + dataIndex: 'createTime', | |
264 | + customRender:function (text) { | |
265 | + return !text?"":(text.length>10?text.substr(0,10):text) | |
266 | + } | |
267 | + }, | |
268 | + { | |
269 | + title:'更新人', | |
270 | + align:"center", | |
271 | + dataIndex: 'updateBy' | |
272 | + }, | |
273 | + { | |
274 | + title:'更新日期', | |
275 | + align:"center", | |
276 | + dataIndex: 'updateTime', | |
277 | + customRender:function (text) { | |
278 | + return !text?"":(text.length>10?text.substr(0,10):text) | |
279 | + } | |
280 | + }, | |
281 | + { | |
282 | + title: '操作', | |
283 | + dataIndex: 'action', | |
284 | + align:"center", | |
285 | + fixed:"right", | |
286 | + width:147, | |
287 | + scopedSlots: { customRender: 'action' }, | |
288 | + } | |
289 | + ], | |
290 | + url: { | |
291 | + list: "/shipment/shipmentHeaderHistory/list", | |
292 | + delete: "/shipment/shipmentHeaderHistory/delete", | |
293 | + deleteBatch: "/shipment/shipmentHeaderHistory/deleteBatch", | |
294 | + exportXlsUrl: "/shipment/shipmentHeaderHistory/exportXls", | |
295 | + importExcelUrl: "shipment/shipmentHeaderHistory/importExcel", | |
296 | + }, | |
297 | + dictOptions:{ | |
298 | + }, | |
299 | + /* 分页参数 */ | |
300 | + ipagination:{ | |
301 | + current: 1, | |
302 | + pageSize: 5, | |
303 | + pageSizeOptions: ['5', '10', '50'], | |
304 | + showTotal: (total, range) => { | |
305 | + return range[0] + "-" + range[1] + " 共" + total + "条" | |
306 | + }, | |
307 | + showQuickJumper: true, | |
308 | + showSizeChanger: true, | |
309 | + total: 0 | |
310 | + }, | |
311 | + selectedMainId:'', | |
312 | + superFieldList:[], | |
313 | + } | |
314 | + }, | |
315 | + created() { | |
316 | + this.getSuperFieldList(); | |
317 | + this.loadFrom(); | |
318 | + }, | |
319 | + computed: { | |
320 | + importExcelUrl: function(){ | |
321 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | |
322 | + } | |
323 | + }, | |
324 | + methods: { | |
325 | + initDictConfig(){ | |
326 | + }, | |
327 | + clickThenSelect(record) { | |
328 | + return { | |
329 | + on: { | |
330 | + click: () => { | |
331 | + this.onSelectChange(record.id.split(","), [record]); | |
332 | + } | |
333 | + } | |
334 | + } | |
335 | + }, | |
336 | + onClearSelected() { | |
337 | + this.selectedRowKeys = []; | |
338 | + this.selectionRows = []; | |
339 | + this.selectedMainId='' | |
340 | + }, | |
341 | + onSelectChange(selectedRowKeys, selectionRows) { | |
342 | + this.selectedMainId=selectedRowKeys[0] | |
343 | + this.selectedRowKeys = selectedRowKeys; | |
344 | + this.selectionRows = selectionRows; | |
345 | + }, | |
346 | + loadFrom() { | |
347 | + getCompanyList().then((res) => { | |
348 | + if (res.success) { | |
349 | + this.companyList = res.result | |
350 | + } | |
351 | + }); | |
352 | + getShipmentTypeList().then((res) => { | |
353 | + if (res.success) { | |
354 | + this.shipmentTypeList = res.result | |
355 | + } | |
356 | + }); | |
357 | + getCustomerList().then((res) => { | |
358 | + if (res.success) { | |
359 | + this.customerList = res.result | |
360 | + } | |
361 | + }); | |
362 | + }, | |
363 | + solutionCompany(value) { | |
364 | + var actions = [] | |
365 | + Object.keys(this.companyList).some((key) => { | |
366 | + if (this.companyList[key].code == ('' + value)) { | |
367 | + actions.push(this.companyList[key].name) | |
368 | + return true | |
369 | + } | |
370 | + }) | |
371 | + return actions.join('') | |
372 | + }, | |
373 | + solutionShipmentType(value) { | |
374 | + var actions = [] | |
375 | + Object.keys(this.shipmentTypeList).some((key) => { | |
376 | + if (this.shipmentTypeList[key].code == ('' + value)) { | |
377 | + actions.push(this.shipmentTypeList[key].name) | |
378 | + return true | |
379 | + } | |
380 | + }) | |
381 | + return actions.join('') | |
382 | + }, | |
383 | + solutionCustomer(value) { | |
384 | + var actions = [] | |
385 | + Object.keys(this.customerList).some((key) => { | |
386 | + if (this.customerList[key].code == ('' + value)) { | |
387 | + actions.push(this.customerList[key].name) | |
388 | + return true | |
389 | + } | |
390 | + }) | |
391 | + return actions.join('') | |
392 | + }, | |
393 | + loadData(arg) { | |
394 | + if(!this.url.list){ | |
395 | + this.$message.error("请设置url.list属性!") | |
396 | + return | |
397 | + } | |
398 | + //加载数据 若传入参数1则加载第一页的内容 | |
399 | + if (arg === 1) { | |
400 | + this.ipagination.current = 1; | |
401 | + } | |
402 | + this.onClearSelected() | |
403 | + var params = this.getQueryParams();//查询条件 | |
404 | + this.loading = true; | |
405 | + getAction(this.url.list, params).then((res) => { | |
406 | + if (res.success) { | |
407 | + this.dataSource = res.result.records; | |
408 | + this.ipagination.total = res.result.total; | |
409 | + } | |
410 | + if(res.code===510){ | |
411 | + this.$message.warning(res.message) | |
412 | + } | |
413 | + this.loading = false; | |
414 | + }) | |
415 | + }, | |
416 | + getSuperFieldList(){ | |
417 | + let fieldList=[]; | |
418 | + fieldList.push({type:'string',value:'code',text:'出库单编码',dictCode:''}) | |
419 | + fieldList.push({type:'string',value:'companyCode',text:'货主',dictCode:''}) | |
420 | + fieldList.push({type:'string',value:'type',text:'出库单类型',dictCode:''}) | |
421 | + fieldList.push({type:'int',value:'firstStatus',text:'头状态',dictCode:'shipment_status'}) | |
422 | + fieldList.push({type:'int',value:'lastStatus',text:'尾状态',dictCode:'shipment_status'}) | |
423 | + fieldList.push({type:'string',value:'referCode',text:'上游单号',dictCode:''}) | |
424 | + fieldList.push({type:'string',value:'customerCode',text:'客户编码',dictCode:''}) | |
425 | + fieldList.push({type:'BigDecimal',value:'totalQty',text:'总数量',dictCode:''}) | |
426 | + fieldList.push({type:'int',value:'totalLines',text:'总行数',dictCode:''}) | |
427 | + fieldList.push({type:'string',value:'remark',text:'出库单备注',dictCode:''}) | |
428 | + fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''}) | |
429 | + fieldList.push({type:'datetime',value:'createTime',text:'创建日期'}) | |
430 | + fieldList.push({type:'string',value:'updateBy',text:'更新人',dictCode:''}) | |
431 | + fieldList.push({type:'datetime',value:'updateTime',text:'更新日期'}) | |
432 | + this.superFieldList = fieldList | |
433 | + } | |
434 | + } | |
435 | + } | |
436 | +</script> | |
437 | +<style scoped> | |
438 | + @import '~@assets/less/common.less' | |
439 | +</style> | |
0 | 440 | \ No newline at end of file |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/modules/ShipmentDetailHistoryModal.vue
0 → 100644
1 | +<template> | |
2 | + <j-modal | |
3 | + :title="title" | |
4 | + :width="width" | |
5 | + :visible="visible" | |
6 | + :confirmLoading="confirmLoading" | |
7 | + switchFullscreen | |
8 | + @ok="handleOk" | |
9 | + @cancel="handleCancel" | |
10 | + cancelText="关闭"> | |
11 | + <a-spin :spinning="confirmLoading"> | |
12 | + <a-form-model ref="form" :model="model" :rules="validatorRules"> | |
13 | + <a-row> | |
14 | + <a-col :span="24"> | |
15 | + <a-form-model-item label="出库单ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shipmentId"> | |
16 | + <a-input-number v-model="model.shipmentId"placeholder="请输入出库单ID" style="width: 100%" /> | |
17 | + </a-form-model-item> | |
18 | + </a-col> | |
19 | + <a-col :span="24"> | |
20 | + <a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode"> | |
21 | + <a-input v-model="model.materialCode"placeholder="请输入物料编码" ></a-input> | |
22 | + </a-form-model-item> | |
23 | + </a-col> | |
24 | + <a-col :span="24"> | |
25 | + <a-form-model-item label="物料名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialName"> | |
26 | + <a-input v-model="model.materialName"placeholder="请输入物料名称" ></a-input> | |
27 | + </a-form-model-item> | |
28 | + </a-col> | |
29 | + <a-col :span="24"> | |
30 | + <a-form-model-item label="单据数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qty"> | |
31 | + <a-input-number v-model="model.qty"placeholder="请输入单据数量" style="width: 100%" /> | |
32 | + </a-form-model-item> | |
33 | + </a-col> | |
34 | + <a-col :span="24"> | |
35 | + <a-form-model-item label="已收数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="taskQty"> | |
36 | + <a-input-number v-model="model.taskQty"placeholder="请输入已收数量" style="width: 100%" /> | |
37 | + </a-form-model-item> | |
38 | + </a-col> | |
39 | + <a-col :span="24"> | |
40 | + <a-form-model-item label="库存状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventoryStatus"> | |
41 | + <a-input v-model="model.inventoryStatus"placeholder="请输入库存状态" ></a-input> | |
42 | + </a-form-model-item> | |
43 | + </a-col> | |
44 | + <a-col :span="24"> | |
45 | + <a-form-model-item label="批次" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="batch"> | |
46 | + <a-input v-model="model.batch"placeholder="请输入批次" ></a-input> | |
47 | + </a-form-model-item> | |
48 | + </a-col> | |
49 | + <a-col :span="24"> | |
50 | + <a-form-model-item label="单据状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status"> | |
51 | + <a-input-number v-model="model.status"placeholder="请输入单据状态" style="width: 100%" /> | |
52 | + </a-form-model-item> | |
53 | + </a-col> | |
54 | + </a-row> | |
55 | + </a-form-model> | |
56 | + </a-spin> | |
57 | + </j-modal> | |
58 | +</template> | |
59 | + | |
60 | +<script> | |
61 | + | |
62 | + import { httpAction } from '@/api/manage' | |
63 | + import { validateDuplicateValue } from '@/utils/util' | |
64 | + | |
65 | + export default { | |
66 | + name: "ShipmentDetailHistoryModal", | |
67 | + components: { | |
68 | + }, | |
69 | + props:{ | |
70 | + mainId:{ | |
71 | + type:String, | |
72 | + required:false, | |
73 | + default:'' | |
74 | + } | |
75 | + }, | |
76 | + data () { | |
77 | + return { | |
78 | + title:"操作", | |
79 | + width:800, | |
80 | + visible: false, | |
81 | + model:{ | |
82 | + }, | |
83 | + labelCol: { | |
84 | + xs: { span: 24 }, | |
85 | + sm: { span: 5 }, | |
86 | + }, | |
87 | + wrapperCol: { | |
88 | + xs: { span: 24 }, | |
89 | + sm: { span: 16 }, | |
90 | + }, | |
91 | + | |
92 | + confirmLoading: false, | |
93 | + validatorRules: { | |
94 | + }, | |
95 | + url: { | |
96 | + add: "/shipment/shipmentHeaderHistory/addShipmentDetailHistory", | |
97 | + edit: "/shipment/shipmentHeaderHistory/editShipmentDetailHistory", | |
98 | + } | |
99 | + | |
100 | + } | |
101 | + }, | |
102 | + created () { | |
103 | + //备份model原始值 | |
104 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | |
105 | + }, | |
106 | + methods: { | |
107 | + add () { | |
108 | + this.edit(this.modelDefault); | |
109 | + }, | |
110 | + edit (record) { | |
111 | + this.model = Object.assign({}, record); | |
112 | + this.visible = true; | |
113 | + }, | |
114 | + close () { | |
115 | + this.$emit('close'); | |
116 | + this.visible = false; | |
117 | + this.$refs.form.clearValidate(); | |
118 | + }, | |
119 | + handleOk () { | |
120 | + const that = this; | |
121 | + // 触发表单验证 | |
122 | + this.$refs.form.validate(valid => { | |
123 | + if (valid) { | |
124 | + that.confirmLoading = true; | |
125 | + let httpurl = ''; | |
126 | + let method = ''; | |
127 | + if(!this.model.id){ | |
128 | + httpurl+=this.url.add; | |
129 | + method = 'post'; | |
130 | + }else{ | |
131 | + httpurl+=this.url.edit; | |
132 | + method = 'put'; | |
133 | + } | |
134 | + this.model['shipmentId'] = this.mainId | |
135 | + httpAction(httpurl,this.model,method).then((res)=>{ | |
136 | + if(res.success){ | |
137 | + that.$message.success(res.message); | |
138 | + that.$emit('ok'); | |
139 | + }else{ | |
140 | + that.$message.warning(res.message); | |
141 | + } | |
142 | + }).finally(() => { | |
143 | + that.confirmLoading = false; | |
144 | + that.close(); | |
145 | + }) | |
146 | + }else{ | |
147 | + return false | |
148 | + } | |
149 | + }) | |
150 | + }, | |
151 | + handleCancel () { | |
152 | + this.close() | |
153 | + }, | |
154 | + | |
155 | + | |
156 | + } | |
157 | + } | |
158 | +</script> | |
... | ... |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/modules/ShipmentHeaderHistoryModal.vue
0 → 100644
1 | +<template> | |
2 | + <j-modal | |
3 | + :title="title" | |
4 | + :width="width" | |
5 | + :visible="visible" | |
6 | + :confirmLoading="confirmLoading" | |
7 | + switchFullscreen | |
8 | + @ok="handleOk" | |
9 | + @cancel="handleCancel" | |
10 | + cancelText="关闭"> | |
11 | + <a-spin :spinning="confirmLoading"> | |
12 | + <a-form-model ref="form" :model="model" :rules="validatorRules"> | |
13 | + <a-row> | |
14 | + <a-col :span="24"> | |
15 | + <a-form-model-item label="货主" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCode"> | |
16 | + <a-select | |
17 | + show-search | |
18 | + placeholder="请选择货主" | |
19 | + option-filter-prop="children" | |
20 | + :filter-option="filterOption" | |
21 | + v-model="model.companyCode"> | |
22 | + <a-select-option v-for="item in companyList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | |
23 | + </a-select> | |
24 | + </a-form-model-item> | |
25 | + </a-col> | |
26 | + <a-col :span="24"> | |
27 | + <a-form-model-item label="出库单类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type"> | |
28 | + <a-select | |
29 | + show-search | |
30 | + placeholder="请选择出库单类型" | |
31 | + option-filter-prop="children" | |
32 | + :filter-option="filterOption" | |
33 | + v-model="model.type"> | |
34 | + <a-select-option v-for="item in shipmentTypeList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | |
35 | + </a-select> | |
36 | + </a-form-model-item> | |
37 | + </a-col> | |
38 | + <a-col :span="24"> | |
39 | + <a-form-model-item label="客户编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerCode"> | |
40 | + <a-select | |
41 | + show-search | |
42 | + placeholder="请选择客户编码" | |
43 | + option-filter-prop="children" | |
44 | + :filter-option="filterOption" | |
45 | + v-model="model.customerCode"> | |
46 | + <a-select-option v-for="item in customerList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | |
47 | + </a-select> | |
48 | + </a-form-model-item> | |
49 | + </a-col> | |
50 | + <a-col :span="24"> | |
51 | + <a-form-model-item label="出库单备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> | |
52 | + <a-input v-model="model.remark" placeholder="请输入出库单备注" ></a-input> | |
53 | + </a-form-model-item> | |
54 | + </a-col> | |
55 | + </a-row> | |
56 | + </a-form-model> | |
57 | + </a-spin> | |
58 | + </j-modal> | |
59 | +</template> | |
60 | + | |
61 | +<script> | |
62 | + | |
63 | + import { httpAction } from '@/api/manage' | |
64 | + import { validateDuplicateValue } from '@/utils/util' | |
65 | + import { getCompanyList, getCustomerList, getShipmentTypeList } from '@api/api' | |
66 | + | |
67 | + export default { | |
68 | + name: "ShipmentHeaderHistoryModal", | |
69 | + companyList:[], | |
70 | + shipmentTypeList:[], | |
71 | + customerList:[], | |
72 | + components: { | |
73 | + }, | |
74 | + data () { | |
75 | + return { | |
76 | + title:"操作", | |
77 | + width:800, | |
78 | + visible: false, | |
79 | + model:{ | |
80 | + }, | |
81 | + labelCol: { | |
82 | + xs: { span: 24 }, | |
83 | + sm: { span: 5 }, | |
84 | + }, | |
85 | + wrapperCol: { | |
86 | + xs: { span: 24 }, | |
87 | + sm: { span: 16 }, | |
88 | + }, | |
89 | + | |
90 | + confirmLoading: false, | |
91 | + validatorRules: { | |
92 | + type: [ | |
93 | + { required: true, message: '请输入出库单类型!'}, | |
94 | + ], | |
95 | + }, | |
96 | + url: { | |
97 | + add: "/shipment/shipmentHeaderHistory/add", | |
98 | + edit: "/shipment/shipmentHeaderHistory/edit", | |
99 | + } | |
100 | + | |
101 | + } | |
102 | + }, | |
103 | + created () { | |
104 | + //备份model原始值 | |
105 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | |
106 | + this.loadFrom(); | |
107 | + }, | |
108 | + methods: { | |
109 | + add () { | |
110 | + this.edit(this.modelDefault); | |
111 | + }, | |
112 | + edit (record) { | |
113 | + this.model = Object.assign({}, record); | |
114 | + this.visible = true; | |
115 | + }, | |
116 | + close () { | |
117 | + this.$emit('close'); | |
118 | + this.visible = false; | |
119 | + this.$refs.form.clearValidate(); | |
120 | + }, | |
121 | + handleOk () { | |
122 | + const that = this; | |
123 | + // 触发表单验证 | |
124 | + this.$refs.form.validate(valid => { | |
125 | + if (valid) { | |
126 | + that.confirmLoading = true; | |
127 | + let httpurl = ''; | |
128 | + let method = ''; | |
129 | + if(!this.model.id){ | |
130 | + httpurl+=this.url.add; | |
131 | + method = 'post'; | |
132 | + }else{ | |
133 | + httpurl+=this.url.edit; | |
134 | + method = 'put'; | |
135 | + } | |
136 | + httpAction(httpurl,this.model,method).then((res)=>{ | |
137 | + if(res.success){ | |
138 | + that.$message.success(res.message); | |
139 | + that.$emit('ok'); | |
140 | + }else{ | |
141 | + that.$message.warning(res.message); | |
142 | + } | |
143 | + }).finally(() => { | |
144 | + that.confirmLoading = false; | |
145 | + that.close(); | |
146 | + }) | |
147 | + }else{ | |
148 | + return false | |
149 | + } | |
150 | + }) | |
151 | + }, | |
152 | + handleCancel () { | |
153 | + this.close() | |
154 | + }, | |
155 | + loadFrom() { | |
156 | + getCompanyList().then((res) => { | |
157 | + if (res.success) { | |
158 | + this.companyList = res.result | |
159 | + } | |
160 | + }); | |
161 | + getShipmentTypeList().then((res) => { | |
162 | + if (res.success) { | |
163 | + this.shipmentTypeList = res.result | |
164 | + } | |
165 | + }); | |
166 | + getCustomerList().then((res) => { | |
167 | + if (res.success) { | |
168 | + this.customerList = res.result | |
169 | + } | |
170 | + }); | |
171 | + }, | |
172 | + | |
173 | + } | |
174 | + } | |
175 | +</script> | |
0 | 176 | \ No newline at end of file |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/impl/ReceiptHeaderServiceImpl.java
... | ... | @@ -14,6 +14,7 @@ import org.jeecg.modules.wms.receipt.receiptHeader.mapper.ReceiptDetailMapper; |
14 | 14 | import org.jeecg.modules.wms.receipt.receiptHeader.mapper.ReceiptHeaderMapper; |
15 | 15 | import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptDetailService; |
16 | 16 | import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptHeaderService; |
17 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.service.IReceiptHeaderHistoryService; | |
17 | 18 | import org.jeecg.utils.StringUtils; |
18 | 19 | import org.jeecg.utils.constant.QuantityConstant; |
19 | 20 | import org.springframework.stereotype.Service; |
... | ... | @@ -48,6 +49,8 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R |
48 | 49 | private IReceiptDetailService receiptDetailService; |
49 | 50 | @Resource |
50 | 51 | private IReceiptHeaderService receiptHeaderService; |
52 | + @Resource | |
53 | + private IReceiptHeaderHistoryService receiptHeaderHistoryService; | |
51 | 54 | |
52 | 55 | @Override |
53 | 56 | @Transactional |
... | ... | @@ -56,6 +59,7 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R |
56 | 59 | if(receiptHeader.getFirstStatus().intValue() > QuantityConstant.RECEIPT_HEADER_BUILD) { |
57 | 60 | throw new ServiceException("不能删除非新建状态单据"); |
58 | 61 | } |
62 | + receiptHeaderHistoryService.saveById(id); | |
59 | 63 | receiptDetailMapper.deleteByMainId(id); |
60 | 64 | receiptHeaderMapper.deleteById(id); |
61 | 65 | } |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptHeaderHistory/controller/ReceiptHeaderHistoryController.java
0 → 100644
1 | +package org.jeecg.modules.wms.receipt.receiptHeaderHistory.controller; | |
2 | + | |
3 | +import org.jeecg.common.system.query.QueryGenerator; | |
4 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |
5 | +import com.baomidou.mybatisplus.core.metadata.IPage; | |
6 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
7 | +import lombok.extern.slf4j.Slf4j; | |
8 | +import org.jeecg.common.system.base.controller.JeecgController; | |
9 | +import org.jeecg.common.api.vo.Result; | |
10 | +import org.springframework.beans.factory.annotation.Autowired; | |
11 | +import org.springframework.web.bind.annotation.*; | |
12 | +import javax.servlet.http.HttpServletRequest; | |
13 | +import java.util.Arrays; | |
14 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.entity.ReceiptDetailHistory; | |
15 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.entity.ReceiptHeaderHistory; | |
16 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.service.IReceiptHeaderHistoryService; | |
17 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.service.IReceiptDetailHistoryService; | |
18 | +import io.swagger.annotations.Api; | |
19 | +import io.swagger.annotations.ApiOperation; | |
20 | +import org.jeecg.common.aspect.annotation.AutoLog; | |
21 | + | |
22 | + /** | |
23 | + * @Description: 历史入库单 | |
24 | + * @Author: jeecg-boot | |
25 | + * @Date: 2022-12-19 | |
26 | + * @Version: V1.0 | |
27 | + */ | |
28 | +@Api(tags="历史入库单") | |
29 | +@RestController | |
30 | +@RequestMapping("/receipt/receiptHeaderHistory") | |
31 | +@Slf4j | |
32 | +public class ReceiptHeaderHistoryController extends JeecgController<ReceiptHeaderHistory, IReceiptHeaderHistoryService> { | |
33 | + | |
34 | + @Autowired | |
35 | + private IReceiptHeaderHistoryService receiptHeaderHistoryService; | |
36 | + | |
37 | + @Autowired | |
38 | + private IReceiptDetailHistoryService receiptDetailHistoryService; | |
39 | + | |
40 | + | |
41 | + /*---------------------------------主表处理-begin-------------------------------------*/ | |
42 | + | |
43 | + /** | |
44 | + * 分页列表查询 | |
45 | + * @param receiptHeaderHistory | |
46 | + * @param pageNo | |
47 | + * @param pageSize | |
48 | + * @param req | |
49 | + * @return | |
50 | + */ | |
51 | + //@AutoLog(value = "历史入库单-分页列表查询") | |
52 | + @ApiOperation(value="历史入库单-分页列表查询", notes="历史入库单-分页列表查询") | |
53 | + @GetMapping(value = "/list") | |
54 | + public Result<IPage<ReceiptHeaderHistory>> queryPageList(ReceiptHeaderHistory receiptHeaderHistory, | |
55 | + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | |
56 | + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | |
57 | + HttpServletRequest req) { | |
58 | + QueryWrapper<ReceiptHeaderHistory> queryWrapper = QueryGenerator.initQueryWrapper(receiptHeaderHistory, req.getParameterMap()); | |
59 | + Page<ReceiptHeaderHistory> page = new Page<ReceiptHeaderHistory>(pageNo, pageSize); | |
60 | + IPage<ReceiptHeaderHistory> pageList = receiptHeaderHistoryService.page(page, queryWrapper); | |
61 | + return Result.OK(pageList); | |
62 | + } | |
63 | + | |
64 | + | |
65 | + /** | |
66 | + * 编辑 | |
67 | + * @param receiptHeaderHistory | |
68 | + * @return | |
69 | + */ | |
70 | + @AutoLog(value = "历史入库单-编辑") | |
71 | + @ApiOperation(value="历史入库单-编辑", notes="历史入库单-编辑") | |
72 | + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | |
73 | + public Result<String> edit(@RequestBody ReceiptHeaderHistory receiptHeaderHistory) { | |
74 | + receiptHeaderHistoryService.updateById(receiptHeaderHistory); | |
75 | + return Result.OK("编辑成功!"); | |
76 | + } | |
77 | + | |
78 | + /** | |
79 | + * 通过id删除 | |
80 | + * @param id | |
81 | + * @return | |
82 | + */ | |
83 | + @AutoLog(value = "历史入库单-通过id删除") | |
84 | + @ApiOperation(value="历史入库单-通过id删除", notes="历史入库单-通过id删除") | |
85 | + @DeleteMapping(value = "/delete") | |
86 | + public Result<String> delete(@RequestParam(name="id",required=true) String id) { | |
87 | + receiptHeaderHistoryService.delMain(id); | |
88 | + return Result.OK("删除成功!"); | |
89 | + } | |
90 | + | |
91 | + /** | |
92 | + * 批量删除 | |
93 | + * @param ids | |
94 | + * @return | |
95 | + */ | |
96 | + @AutoLog(value = "历史入库单-批量删除") | |
97 | + @ApiOperation(value="历史入库单-批量删除", notes="历史入库单-批量删除") | |
98 | + @DeleteMapping(value = "/deleteBatch") | |
99 | + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |
100 | + this.receiptHeaderHistoryService.delBatchMain(Arrays.asList(ids.split(","))); | |
101 | + return Result.OK("批量删除成功!"); | |
102 | + } | |
103 | + | |
104 | + /*---------------------------------主表处理-end-------------------------------------*/ | |
105 | + | |
106 | + | |
107 | + /*--------------------------------子表处理-历史入库单明细-begin----------------------------------------------*/ | |
108 | + /** | |
109 | + * 通过主表ID查询 | |
110 | + * @return | |
111 | + */ | |
112 | + //@AutoLog(value = "历史入库单明细-通过主表ID查询") | |
113 | + @ApiOperation(value="历史入库单明细-通过主表ID查询", notes="历史入库单明细-通过主表ID查询") | |
114 | + @GetMapping(value = "/listReceiptDetailHistoryByMainId") | |
115 | + public Result<IPage<ReceiptDetailHistory>> listReceiptDetailHistoryByMainId(ReceiptDetailHistory receiptDetailHistory, | |
116 | + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | |
117 | + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, | |
118 | + HttpServletRequest req) { | |
119 | + QueryWrapper<ReceiptDetailHistory> queryWrapper = QueryGenerator.initQueryWrapper(receiptDetailHistory, req.getParameterMap()); | |
120 | + Page<ReceiptDetailHistory> page = new Page<ReceiptDetailHistory>(pageNo, pageSize); | |
121 | + IPage<ReceiptDetailHistory> pageList = receiptDetailHistoryService.page(page, queryWrapper); | |
122 | + return Result.OK(pageList); | |
123 | + } | |
124 | + | |
125 | + /** | |
126 | + * 编辑 | |
127 | + * @param receiptDetailHistory | |
128 | + * @return | |
129 | + */ | |
130 | + @AutoLog(value = "历史入库单明细-编辑") | |
131 | + @ApiOperation(value="历史入库单明细-编辑", notes="历史入库单明细-编辑") | |
132 | + @RequestMapping(value = "/editReceiptDetailHistory", method = {RequestMethod.PUT,RequestMethod.POST}) | |
133 | + public Result<String> editReceiptDetailHistory(@RequestBody ReceiptDetailHistory receiptDetailHistory) { | |
134 | + receiptDetailHistoryService.updateById(receiptDetailHistory); | |
135 | + return Result.OK("编辑成功!"); | |
136 | + } | |
137 | + | |
138 | + /** | |
139 | + * 通过id删除 | |
140 | + * @param id | |
141 | + * @return | |
142 | + */ | |
143 | + @AutoLog(value = "历史入库单明细-通过id删除") | |
144 | + @ApiOperation(value="历史入库单明细-通过id删除", notes="历史入库单明细-通过id删除") | |
145 | + @DeleteMapping(value = "/deleteReceiptDetailHistory") | |
146 | + public Result<String> deleteReceiptDetailHistory(@RequestParam(name="id",required=true) String id) { | |
147 | + receiptDetailHistoryService.removeById(id); | |
148 | + return Result.OK("删除成功!"); | |
149 | + } | |
150 | + | |
151 | + /** | |
152 | + * 批量删除 | |
153 | + * @param ids | |
154 | + * @return | |
155 | + */ | |
156 | + @AutoLog(value = "历史入库单明细-批量删除") | |
157 | + @ApiOperation(value="历史入库单明细-批量删除", notes="历史入库单明细-批量删除") | |
158 | + @DeleteMapping(value = "/deleteBatchReceiptDetailHistory") | |
159 | + public Result<String> deleteBatchReceiptDetailHistory(@RequestParam(name="ids",required=true) String ids) { | |
160 | + this.receiptDetailHistoryService.removeByIds(Arrays.asList(ids.split(","))); | |
161 | + return Result.OK("批量删除成功!"); | |
162 | + } | |
163 | + | |
164 | + /*--------------------------------子表处理-历史入库单明细-end----------------------------------------------*/ | |
165 | + | |
166 | + | |
167 | + | |
168 | + | |
169 | +} | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptHeaderHistory/entity/ReceiptDetailHistory.java
0 → 100644
1 | +package org.jeecg.modules.wms.receipt.receiptHeaderHistory.entity; | |
2 | + | |
3 | +import java.io.Serializable; | |
4 | +import com.baomidou.mybatisplus.annotation.IdType; | |
5 | +import com.baomidou.mybatisplus.annotation.TableId; | |
6 | +import com.baomidou.mybatisplus.annotation.TableName; | |
7 | +import org.jeecg.common.aspect.annotation.Dict; | |
8 | +import lombok.Data; | |
9 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
10 | +import org.springframework.format.annotation.DateTimeFormat; | |
11 | +import org.jeecgframework.poi.excel.annotation.Excel; | |
12 | +import java.util.Date; | |
13 | +import io.swagger.annotations.ApiModel; | |
14 | +import io.swagger.annotations.ApiModelProperty; | |
15 | +import java.io.UnsupportedEncodingException; | |
16 | + | |
17 | +/** | |
18 | + * @Description: 历史入库单明细 | |
19 | + * @Author: jeecg-boot | |
20 | + * @Date: 2022-12-19 | |
21 | + * @Version: V1.0 | |
22 | + */ | |
23 | +@Data | |
24 | +@TableName("receipt_detail_history") | |
25 | +@ApiModel(value="receipt_detail_history对象", description="历史入库单明细") | |
26 | +public class ReceiptDetailHistory implements Serializable { | |
27 | + private static final long serialVersionUID = 1L; | |
28 | + | |
29 | + /**主键*/ | |
30 | + @TableId(type = IdType.AUTO) | |
31 | + @ApiModelProperty(value = "主键") | |
32 | + private Integer id; | |
33 | + /**入库单ID*/ | |
34 | + @ApiModelProperty(value = "入库单ID") | |
35 | + private Integer receiptId; | |
36 | + /**入库单编码*/ | |
37 | + @Excel(name = "入库单编码", width = 15) | |
38 | + @ApiModelProperty(value = "入库单编码") | |
39 | + private String receiptCode; | |
40 | + /**仓库编码*/ | |
41 | + @Excel(name = "仓库编码", width = 15) | |
42 | + @ApiModelProperty(value = "仓库编码") | |
43 | + private String warehouseCode; | |
44 | + /**货主编码*/ | |
45 | + @Excel(name = "货主编码", width = 15) | |
46 | + @ApiModelProperty(value = "货主编码") | |
47 | + private String companyCode; | |
48 | + /**物料编码*/ | |
49 | + @Excel(name = "物料编码", width = 15) | |
50 | + @ApiModelProperty(value = "物料编码") | |
51 | + private String materialCode; | |
52 | + /**物料名称*/ | |
53 | + @Excel(name = "物料名称", width = 15) | |
54 | + @ApiModelProperty(value = "物料名称") | |
55 | + private String materialName; | |
56 | + /**物料规格*/ | |
57 | + @Excel(name = "物料规格", width = 15) | |
58 | + @ApiModelProperty(value = "物料规格") | |
59 | + private String materialSpec; | |
60 | + /**物料单位*/ | |
61 | + @Excel(name = "物料单位", width = 15) | |
62 | + @ApiModelProperty(value = "物料单位") | |
63 | + private String materialUnit; | |
64 | + /**单据数量*/ | |
65 | + @Excel(name = "单据数量", width = 15) | |
66 | + @ApiModelProperty(value = "单据数量") | |
67 | + private java.math.BigDecimal qty; | |
68 | + /**已收数量*/ | |
69 | + @Excel(name = "已收数量", width = 15) | |
70 | + @ApiModelProperty(value = "已收数量") | |
71 | + private java.math.BigDecimal taskQty; | |
72 | + /**库存状态*/ | |
73 | + @Excel(name = "库存状态", width = 15) | |
74 | + @Dict(dicCode = "inventory_status") | |
75 | + @ApiModelProperty(value = "库存状态") | |
76 | + private String inventoryStatus; | |
77 | + /**批次*/ | |
78 | + @Excel(name = "批次", width = 15) | |
79 | + @ApiModelProperty(value = "批次") | |
80 | + private String batch; | |
81 | + /**批号*/ | |
82 | + @Excel(name = "批号", width = 15) | |
83 | + @ApiModelProperty(value = "批号") | |
84 | + private String lot; | |
85 | + /**项目号*/ | |
86 | + @Excel(name = "项目号", width = 15) | |
87 | + @ApiModelProperty(value = "项目号") | |
88 | + private String project; | |
89 | + /**单据状态*/ | |
90 | + @Excel(name = "单据状态", width = 15) | |
91 | + @Dict(dicCode = "receipt_status") | |
92 | + @ApiModelProperty(value = "单据状态") | |
93 | + private Integer status; | |
94 | + /**上游单号*/ | |
95 | + @Excel(name = "上游单号", width = 15) | |
96 | + @ApiModelProperty(value = "上游单号") | |
97 | + private String referCode; | |
98 | + /**上游行号*/ | |
99 | + @Excel(name = "上游行号", width = 15) | |
100 | + @ApiModelProperty(value = "上游行号") | |
101 | + private String referLineNum; | |
102 | + /**备用字段1*/ | |
103 | + @Excel(name = "备用字段1", width = 15) | |
104 | + @ApiModelProperty(value = "备用字段1") | |
105 | + private String userdef1; | |
106 | + /**备用字段2*/ | |
107 | + @Excel(name = "备用字段2", width = 15) | |
108 | + @ApiModelProperty(value = "备用字段2") | |
109 | + private String userdef2; | |
110 | + /**备用字段3*/ | |
111 | + @Excel(name = "备用字段3", width = 15) | |
112 | + @ApiModelProperty(value = "备用字段3") | |
113 | + private String userdef3; | |
114 | + /**创建人*/ | |
115 | + @ApiModelProperty(value = "创建人") | |
116 | + private String createBy; | |
117 | + /**创建日期*/ | |
118 | + @ApiModelProperty(value = "创建日期") | |
119 | + private Date createTime; | |
120 | + /**更新人*/ | |
121 | + @ApiModelProperty(value = "更新人") | |
122 | + private String updateBy; | |
123 | + /**更新日期*/ | |
124 | + @ApiModelProperty(value = "更新日期") | |
125 | + private Date updateTime; | |
126 | +} | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptHeaderHistory/entity/ReceiptHeaderHistory.java
0 → 100644
1 | +package org.jeecg.modules.wms.receipt.receiptHeaderHistory.entity; | |
2 | + | |
3 | +import java.io.Serializable; | |
4 | +import java.io.UnsupportedEncodingException; | |
5 | +import java.util.Date; | |
6 | +import com.baomidou.mybatisplus.annotation.IdType; | |
7 | +import com.baomidou.mybatisplus.annotation.TableId; | |
8 | +import com.baomidou.mybatisplus.annotation.TableName; | |
9 | +import org.jeecgframework.poi.excel.annotation.Excel; | |
10 | +import lombok.Data; | |
11 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
12 | +import org.springframework.format.annotation.DateTimeFormat; | |
13 | +import org.jeecg.common.aspect.annotation.Dict; | |
14 | +import io.swagger.annotations.ApiModel; | |
15 | +import io.swagger.annotations.ApiModelProperty; | |
16 | + | |
17 | +/** | |
18 | + * @Description: 历史入库单 | |
19 | + * @Author: jeecg-boot | |
20 | + * @Date: 2022-12-19 | |
21 | + * @Version: V1.0 | |
22 | + */ | |
23 | +@Data | |
24 | +@TableName("receipt_header_history") | |
25 | +@ApiModel(value="receipt_header_history对象", description="历史入库单") | |
26 | +public class ReceiptHeaderHistory implements Serializable { | |
27 | + private static final long serialVersionUID = 1L; | |
28 | + | |
29 | + /**主键*/ | |
30 | + @TableId(type = IdType.AUTO) | |
31 | + @ApiModelProperty(value = "主键") | |
32 | + private Integer id; | |
33 | + /**编码*/ | |
34 | + @Excel(name = "编码", width = 15) | |
35 | + @ApiModelProperty(value = "编码") | |
36 | + private String code; | |
37 | + /**仓库编码*/ | |
38 | + @Excel(name = "仓库编码", width = 15) | |
39 | + @ApiModelProperty(value = "仓库编码") | |
40 | + private String warehouseCode; | |
41 | + /**货主*/ | |
42 | + @Excel(name = "货主", width = 15) | |
43 | + @ApiModelProperty(value = "货主") | |
44 | + private String companyCode; | |
45 | + /**入库单类型*/ | |
46 | + @Excel(name = "入库单类型", width = 15) | |
47 | + @ApiModelProperty(value = "入库单类型") | |
48 | + private String type; | |
49 | + /**头状态*/ | |
50 | + @Excel(name = "头状态", width = 15, dicCode = "receipt_status") | |
51 | + @Dict(dicCode = "receipt_status") | |
52 | + @ApiModelProperty(value = "头状态") | |
53 | + private Integer firstStatus; | |
54 | + /**尾状态*/ | |
55 | + @Excel(name = "尾状态", width = 15, dicCode = "receipt_status") | |
56 | + @Dict(dicCode = "receipt_status") | |
57 | + @ApiModelProperty(value = "尾状态") | |
58 | + private Integer lastStatus; | |
59 | + /**上游单号*/ | |
60 | + @Excel(name = "上游单号", width = 15) | |
61 | + @ApiModelProperty(value = "上游单号") | |
62 | + private String referCode; | |
63 | + /**供应商编码*/ | |
64 | + @Excel(name = "供应商编码", width = 15) | |
65 | + @ApiModelProperty(value = "供应商编码") | |
66 | + private String supplierCode; | |
67 | + /**总数量*/ | |
68 | + @Excel(name = "总数量", width = 15) | |
69 | + @ApiModelProperty(value = "总数量") | |
70 | + private java.math.BigDecimal totalqty; | |
71 | + /**总行数*/ | |
72 | + @Excel(name = "总行数", width = 15) | |
73 | + @ApiModelProperty(value = "总行数") | |
74 | + private Integer totallines; | |
75 | + /**入库单备注*/ | |
76 | + @Excel(name = "入库单备注", width = 15) | |
77 | + @ApiModelProperty(value = "入库单备注") | |
78 | + private String remark; | |
79 | + /**备用字段1*/ | |
80 | + @Excel(name = "备用字段1", width = 15) | |
81 | + @ApiModelProperty(value = "备用字段1") | |
82 | + private String userdef1; | |
83 | + /**备用字段2*/ | |
84 | + @Excel(name = "备用字段2", width = 15) | |
85 | + @ApiModelProperty(value = "备用字段2") | |
86 | + private String userdef2; | |
87 | + /**备用字段3*/ | |
88 | + @Excel(name = "备用字段3", width = 15) | |
89 | + @ApiModelProperty(value = "备用字段3") | |
90 | + private String userdef3; | |
91 | + /**创建人*/ | |
92 | + @ApiModelProperty(value = "创建人") | |
93 | + private String createBy; | |
94 | + /**创建日期*/ | |
95 | + @ApiModelProperty(value = "创建日期") | |
96 | + private Date createTime; | |
97 | + /**更新人*/ | |
98 | + @ApiModelProperty(value = "更新人") | |
99 | + private String updateBy; | |
100 | + /**更新日期*/ | |
101 | + @ApiModelProperty(value = "更新日期") | |
102 | + private Date updateTime; | |
103 | +} | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptHeaderHistory/mapper/ReceiptDetailHistoryMapper.java
0 → 100644
1 | +package org.jeecg.modules.wms.receipt.receiptHeaderHistory.mapper; | |
2 | + | |
3 | +import java.util.List; | |
4 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.entity.ReceiptDetailHistory; | |
5 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
6 | +import org.apache.ibatis.annotations.Param; | |
7 | + | |
8 | +/** | |
9 | + * @Description: 历史入库单明细 | |
10 | + * @Author: jeecg-boot | |
11 | + * @Date: 2022-12-19 | |
12 | + * @Version: V1.0 | |
13 | + */ | |
14 | +public interface ReceiptDetailHistoryMapper extends BaseMapper<ReceiptDetailHistory> { | |
15 | + | |
16 | + public boolean deleteByMainId(@Param("mainId") String mainId); | |
17 | + | |
18 | + public List<ReceiptDetailHistory> selectByMainId(@Param("mainId") String mainId); | |
19 | + | |
20 | +} | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptHeaderHistory/mapper/ReceiptHeaderHistoryMapper.java
0 → 100644
1 | +package org.jeecg.modules.wms.receipt.receiptHeaderHistory.mapper; | |
2 | + | |
3 | +import java.util.List; | |
4 | + | |
5 | +import org.apache.ibatis.annotations.Param; | |
6 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.entity.ReceiptHeaderHistory; | |
7 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
8 | + | |
9 | +/** | |
10 | + * @Description: 历史入库单 | |
11 | + * @Author: jeecg-boot | |
12 | + * @Date: 2022-12-19 | |
13 | + * @Version: V1.0 | |
14 | + */ | |
15 | +public interface ReceiptHeaderHistoryMapper extends BaseMapper<ReceiptHeaderHistory> { | |
16 | + | |
17 | +} | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptHeaderHistory/mapper/xml/ReceiptDetailHistoryMapper.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="org.jeecg.modules.wms.receipt.receiptHeaderHistory.mapper.ReceiptDetailHistoryMapper"> | |
4 | + | |
5 | + <delete id="deleteByMainId" parameterType="java.lang.String"> | |
6 | + DELETE | |
7 | + FROM receipt_detail_history | |
8 | + WHERE | |
9 | + receipt_id = #{mainId} | |
10 | + </delete> | |
11 | + | |
12 | + <select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.wms.receipt.receiptHeaderHistory.entity.ReceiptDetailHistory"> | |
13 | + SELECT * | |
14 | + FROM receipt_detail_history | |
15 | + WHERE | |
16 | + receipt_id = #{mainId} | |
17 | + </select> | |
18 | +</mapper> | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptHeaderHistory/mapper/xml/ReceiptHeaderHistoryMapper.xml
0 → 100644
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptHeaderHistory/service/IReceiptDetailHistoryService.java
0 → 100644
1 | +package org.jeecg.modules.wms.receipt.receiptHeaderHistory.service; | |
2 | + | |
3 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.entity.ReceiptDetailHistory; | |
4 | +import com.baomidou.mybatisplus.extension.service.IService; | |
5 | +import java.util.List; | |
6 | + | |
7 | +/** | |
8 | + * @Description: 历史入库单明细 | |
9 | + * @Author: jeecg-boot | |
10 | + * @Date: 2022-12-19 | |
11 | + * @Version: V1.0 | |
12 | + */ | |
13 | +public interface IReceiptDetailHistoryService extends IService<ReceiptDetailHistory> { | |
14 | + | |
15 | + public List<ReceiptDetailHistory> selectByMainId(String mainId); | |
16 | +} | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptHeaderHistory/service/IReceiptHeaderHistoryService.java
0 → 100644
1 | +package org.jeecg.modules.wms.receipt.receiptHeaderHistory.service; | |
2 | + | |
3 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.entity.ReceiptDetailHistory; | |
4 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.entity.ReceiptHeaderHistory; | |
5 | +import com.baomidou.mybatisplus.extension.service.IService; | |
6 | +import org.springframework.beans.factory.annotation.Autowired; | |
7 | +import java.io.Serializable; | |
8 | +import java.util.Collection; | |
9 | +import java.util.List; | |
10 | + | |
11 | +/** | |
12 | + * @Description: 历史入库单 | |
13 | + * @Author: jeecg-boot | |
14 | + * @Date: 2022-12-19 | |
15 | + * @Version: V1.0 | |
16 | + */ | |
17 | +public interface IReceiptHeaderHistoryService extends IService<ReceiptHeaderHistory> { | |
18 | + | |
19 | + /** | |
20 | + * 删除一对多 | |
21 | + */ | |
22 | + public void delMain (String id); | |
23 | + | |
24 | + /** | |
25 | + * 批量删除一对多 | |
26 | + */ | |
27 | + public void delBatchMain (Collection<? extends Serializable> idList); | |
28 | + | |
29 | + | |
30 | + /** | |
31 | + * 根据删除的入库单主表ID新增历史入库单记录 | |
32 | + * @param id | |
33 | + */ | |
34 | + void saveById(String id); | |
35 | +} | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptHeaderHistory/service/impl/ReceiptDetailHistoryServiceImpl.java
0 → 100644
1 | +package org.jeecg.modules.wms.receipt.receiptHeaderHistory.service.impl; | |
2 | + | |
3 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.entity.ReceiptDetailHistory; | |
4 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.mapper.ReceiptDetailHistoryMapper; | |
5 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.service.IReceiptDetailHistoryService; | |
6 | +import org.springframework.stereotype.Service; | |
7 | +import java.util.List; | |
8 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
9 | +import org.springframework.beans.factory.annotation.Autowired; | |
10 | + | |
11 | +/** | |
12 | + * @Description: 历史入库单明细 | |
13 | + * @Author: jeecg-boot | |
14 | + * @Date: 2022-12-19 | |
15 | + * @Version: V1.0 | |
16 | + */ | |
17 | +@Service | |
18 | +public class ReceiptDetailHistoryServiceImpl extends ServiceImpl<ReceiptDetailHistoryMapper, ReceiptDetailHistory> implements IReceiptDetailHistoryService { | |
19 | + | |
20 | + @Autowired | |
21 | + private ReceiptDetailHistoryMapper receiptDetailHistoryMapper; | |
22 | + | |
23 | + @Override | |
24 | + public List<ReceiptDetailHistory> selectByMainId(String mainId) { | |
25 | + return receiptDetailHistoryMapper.selectByMainId(mainId); | |
26 | + } | |
27 | +} | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptHeaderHistory/service/impl/ReceiptHeaderHistoryServiceImpl.java
0 → 100644
1 | +package org.jeecg.modules.wms.receipt.receiptHeaderHistory.service.impl; | |
2 | +import java.math.BigDecimal; | |
3 | +import java.util.ArrayList; | |
4 | +import java.util.Date; | |
5 | + | |
6 | +import com.aliyun.oss.ServiceException; | |
7 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
8 | +import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptDetail; | |
9 | +import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; | |
10 | +import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptDetailService; | |
11 | +import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptHeaderService; | |
12 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.entity.ReceiptHeaderHistory; | |
13 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.entity.ReceiptDetailHistory; | |
14 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.mapper.ReceiptDetailHistoryMapper; | |
15 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.mapper.ReceiptHeaderHistoryMapper; | |
16 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.service.IReceiptDetailHistoryService; | |
17 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.service.IReceiptHeaderHistoryService; | |
18 | +import org.springframework.beans.BeanUtils; | |
19 | +import org.springframework.stereotype.Service; | |
20 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
21 | +import org.springframework.beans.factory.annotation.Autowired; | |
22 | +import org.springframework.transaction.annotation.Transactional; | |
23 | + | |
24 | +import javax.annotation.Resource; | |
25 | +import java.io.Serializable; | |
26 | +import java.util.List; | |
27 | +import java.util.Collection; | |
28 | +import java.util.stream.Collectors; | |
29 | + | |
30 | +/** | |
31 | + * @Description: 历史入库单 | |
32 | + * @Author: jeecg-boot | |
33 | + * @Date: 2022-12-19 | |
34 | + * @Version: V1.0 | |
35 | + */ | |
36 | +@Service | |
37 | +public class ReceiptHeaderHistoryServiceImpl extends ServiceImpl<ReceiptHeaderHistoryMapper, ReceiptHeaderHistory> implements IReceiptHeaderHistoryService { | |
38 | + | |
39 | + @Autowired | |
40 | + private ReceiptHeaderHistoryMapper receiptHeaderHistoryMapper; | |
41 | + @Autowired | |
42 | + private ReceiptDetailHistoryMapper receiptDetailHistoryMapper; | |
43 | + | |
44 | + @Resource | |
45 | + private IReceiptHeaderService receiptHeaderService; | |
46 | + @Resource | |
47 | + private IReceiptDetailService receiptDetailService; | |
48 | + @Resource | |
49 | + private IReceiptDetailHistoryService receiptDetailHistoryService; | |
50 | + | |
51 | + @Override | |
52 | + @Transactional | |
53 | + public void delMain(String id) { | |
54 | + receiptDetailHistoryMapper.deleteByMainId(id); | |
55 | + receiptHeaderHistoryMapper.deleteById(id); | |
56 | + } | |
57 | + | |
58 | + @Override | |
59 | + @Transactional | |
60 | + public void delBatchMain(Collection<? extends Serializable> idList) { | |
61 | + for(Serializable id:idList) { | |
62 | + receiptDetailHistoryMapper.deleteByMainId(id.toString()); | |
63 | + receiptHeaderHistoryMapper.deleteById(id); | |
64 | + } | |
65 | + } | |
66 | + | |
67 | + /** | |
68 | + * 根据删除的入库单主表ID新增历史入库单记录 | |
69 | + * @param id | |
70 | + */ | |
71 | + @Override | |
72 | + public void saveById(String id) { | |
73 | + ReceiptHeader receiptHeader = receiptHeaderService.getById(id); | |
74 | + ReceiptHeaderHistory receiptHeaderHistory = new ReceiptHeaderHistory(); | |
75 | + receiptHeaderHistory.setCode(receiptHeader.getCode()); | |
76 | + receiptHeaderHistory.setWarehouseCode(receiptHeader.getWarehouseCode()); | |
77 | + receiptHeaderHistory.setCompanyCode(receiptHeader.getCompanyCode()); | |
78 | + receiptHeaderHistory.setType(receiptHeader.getType()); | |
79 | + receiptHeaderHistory.setFirstStatus(receiptHeader.getFirstStatus()); | |
80 | + receiptHeaderHistory.setLastStatus(receiptHeader.getLastStatus()); | |
81 | + receiptHeaderHistory.setReferCode(receiptHeader.getReferCode()); | |
82 | + receiptHeaderHistory.setSupplierCode(receiptHeader.getSupplierCode()); | |
83 | + receiptHeaderHistory.setTotalqty(receiptHeader.getTotalqty()); | |
84 | + receiptHeaderHistory.setTotallines(receiptHeader.getTotallines()); | |
85 | + receiptHeaderHistory.setRemark(receiptHeader.getRemark()); | |
86 | + receiptHeaderHistory.setUserdef1(receiptHeader.getUserdef1()); | |
87 | + receiptHeaderHistory.setUserdef2(receiptHeader.getUserdef2()); | |
88 | + receiptHeaderHistory.setUserdef3(receiptHeader.getUserdef3()); | |
89 | + receiptHeaderHistory.setCreateBy(receiptHeader.getCreateBy()); | |
90 | + receiptHeaderHistory.setCreateTime(receiptHeader.getCreateTime()); | |
91 | + receiptHeaderHistory.setUpdateBy(receiptHeader.getUpdateBy()); | |
92 | + receiptHeaderHistory.setUpdateTime(receiptHeader.getUpdateTime()); | |
93 | + receiptHeaderHistoryMapper.insert(receiptHeaderHistory); | |
94 | + List<ReceiptDetailHistory> receiptDetailHistoryList = new ArrayList<>(); | |
95 | + List<ReceiptDetail> receiptDetailList = receiptDetailService.list(new LambdaQueryWrapper<ReceiptDetail>().eq(ReceiptDetail::getReceiptId, receiptHeader.getId())); | |
96 | + for (ReceiptDetail detail : receiptDetailList) { | |
97 | + ReceiptDetailHistory receiptDetailHistory = new ReceiptDetailHistory(); | |
98 | + BeanUtils.copyProperties(detail, receiptDetailHistory); | |
99 | + receiptDetailHistoryList.add(receiptDetailHistory); | |
100 | + } | |
101 | + List<ReceiptDetailHistory> newList = receiptDetailHistoryList.stream().peek(detail -> detail.setReceiptId(receiptHeaderHistory.getId())).collect(Collectors.toList()); | |
102 | + if (!receiptDetailHistoryService.saveBatch(newList)){ | |
103 | + throw new ServiceException("批量新增失败"); | |
104 | + } | |
105 | + | |
106 | + } | |
107 | + | |
108 | +} | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptHeaderHistory/vo/ReceiptHeaderHistoryPage.java
0 → 100644
1 | +package org.jeecg.modules.wms.receipt.receiptHeaderHistory.vo; | |
2 | + | |
3 | +import java.util.List; | |
4 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.entity.ReceiptHeaderHistory; | |
5 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.entity.ReceiptDetailHistory; | |
6 | +import lombok.Data; | |
7 | +import org.jeecgframework.poi.excel.annotation.Excel; | |
8 | +import org.jeecgframework.poi.excel.annotation.ExcelEntity; | |
9 | +import org.jeecgframework.poi.excel.annotation.ExcelCollection; | |
10 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
11 | +import org.springframework.format.annotation.DateTimeFormat; | |
12 | +import java.util.Date; | |
13 | +import org.jeecg.common.aspect.annotation.Dict; | |
14 | +import io.swagger.annotations.ApiModel; | |
15 | +import io.swagger.annotations.ApiModelProperty; | |
16 | + | |
17 | +/** | |
18 | + * @Description: 历史入库单 | |
19 | + * @Author: jeecg-boot | |
20 | + * @Date: 2022-12-19 | |
21 | + * @Version: V1.0 | |
22 | + */ | |
23 | +@Data | |
24 | +@ApiModel(value="receipt_header_historyPage对象", description="历史入库单") | |
25 | +public class ReceiptHeaderHistoryPage { | |
26 | + | |
27 | + /**主键*/ | |
28 | + @ApiModelProperty(value = "主键") | |
29 | + private String id; | |
30 | + /**编码*/ | |
31 | + @Excel(name = "编码", width = 15) | |
32 | + @ApiModelProperty(value = "编码") | |
33 | + private String code; | |
34 | + /**仓库编码*/ | |
35 | + @Excel(name = "仓库编码", width = 15) | |
36 | + @ApiModelProperty(value = "仓库编码") | |
37 | + private String warehouseCode; | |
38 | + /**货主*/ | |
39 | + @Excel(name = "货主", width = 15) | |
40 | + @ApiModelProperty(value = "货主") | |
41 | + private String companyCode; | |
42 | + /**入库单类型*/ | |
43 | + @Excel(name = "入库单类型", width = 15) | |
44 | + @ApiModelProperty(value = "入库单类型") | |
45 | + private String type; | |
46 | + /**头状态*/ | |
47 | + @Excel(name = "头状态", width = 15) | |
48 | + @ApiModelProperty(value = "头状态") | |
49 | + private Integer firstStatus; | |
50 | + /**尾状态*/ | |
51 | + @Excel(name = "尾状态", width = 15) | |
52 | + @ApiModelProperty(value = "尾状态") | |
53 | + private Integer lastStatus; | |
54 | + /**上游单号*/ | |
55 | + @Excel(name = "上游单号", width = 15) | |
56 | + @ApiModelProperty(value = "上游单号") | |
57 | + private String referCode; | |
58 | + /**供应商编码*/ | |
59 | + @Excel(name = "供应商编码", width = 15) | |
60 | + @ApiModelProperty(value = "供应商编码") | |
61 | + private String supplierCode; | |
62 | + /**总数量*/ | |
63 | + @Excel(name = "总数量", width = 15) | |
64 | + @ApiModelProperty(value = "总数量") | |
65 | + private java.math.BigDecimal totalqty; | |
66 | + /**总行数*/ | |
67 | + @Excel(name = "总行数", width = 15) | |
68 | + @ApiModelProperty(value = "总行数") | |
69 | + private Integer totallines; | |
70 | + /**入库单备注*/ | |
71 | + @Excel(name = "入库单备注", width = 15) | |
72 | + @ApiModelProperty(value = "入库单备注") | |
73 | + private String remark; | |
74 | + /**备用字段1*/ | |
75 | + @Excel(name = "备用字段1", width = 15) | |
76 | + @ApiModelProperty(value = "备用字段1") | |
77 | + private String userdef1; | |
78 | + /**备用字段2*/ | |
79 | + @Excel(name = "备用字段2", width = 15) | |
80 | + @ApiModelProperty(value = "备用字段2") | |
81 | + private String userdef2; | |
82 | + /**备用字段3*/ | |
83 | + @Excel(name = "备用字段3", width = 15) | |
84 | + @ApiModelProperty(value = "备用字段3") | |
85 | + private String userdef3; | |
86 | + /**创建人*/ | |
87 | + @ApiModelProperty(value = "创建人") | |
88 | + private String createBy; | |
89 | + /**创建日期*/ | |
90 | + @ApiModelProperty(value = "创建日期") | |
91 | + private Date createTime; | |
92 | + /**更新人*/ | |
93 | + @ApiModelProperty(value = "更新人") | |
94 | + private String updateBy; | |
95 | + /**更新日期*/ | |
96 | + @ApiModelProperty(value = "更新日期") | |
97 | + private Date updateTime; | |
98 | + | |
99 | + @ExcelCollection(name="历史入库单明细") | |
100 | + @ApiModelProperty(value = "历史入库单明细") | |
101 | + private List<ReceiptDetailHistory> receiptDetailHistoryList; | |
102 | + | |
103 | +} | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/impl/ShipmentHeaderServiceImpl.java
... | ... | @@ -25,6 +25,7 @@ import org.jeecg.modules.wms.shipment.shipmentHeader.mapper.ShipmentDetailMapper |
25 | 25 | import org.jeecg.modules.wms.shipment.shipmentHeader.mapper.ShipmentHeaderMapper; |
26 | 26 | import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentDetailService; |
27 | 27 | import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentHeaderService; |
28 | +import org.jeecg.modules.wms.shipment.shipmentHeaderHistory.service.IShipmentHeaderHistoryService; | |
28 | 29 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; |
29 | 30 | import org.jeecg.modules.wms.task.taskHeader.service.ITaskHeaderService; |
30 | 31 | import org.jeecg.utils.StringUtils; |
... | ... | @@ -73,6 +74,8 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, |
73 | 74 | private IInventoryDetailService inventoryDetailService; |
74 | 75 | @Resource |
75 | 76 | private IParameterConfigurationService parameterConfigurationService; |
77 | + @Resource | |
78 | + private IShipmentHeaderHistoryService shipmentHeaderHistoryService; | |
76 | 79 | |
77 | 80 | @Override |
78 | 81 | @Transactional |
... | ... | @@ -81,6 +84,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, |
81 | 84 | if(shipmentHeader.getFirstStatus().intValue() > QuantityConstant.RECEIPT_HEADER_BUILD) { |
82 | 85 | throw new ServiceException("不能删除非新建状态单据"); |
83 | 86 | } |
87 | + shipmentHeaderHistoryService.saveById(id); | |
84 | 88 | shipmentDetailMapper.deleteByMainId(id); |
85 | 89 | shipmentHeaderMapper.deleteById(id); |
86 | 90 | } |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeaderHistory/controller/ShipmentHeaderHistoryController.java
0 → 100644
1 | +package org.jeecg.modules.wms.shipment.shipmentHeaderHistory.controller; | |
2 | + | |
3 | +import org.jeecg.common.system.query.QueryGenerator; | |
4 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |
5 | +import com.baomidou.mybatisplus.core.metadata.IPage; | |
6 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
7 | +import lombok.extern.slf4j.Slf4j; | |
8 | +import org.jeecg.common.system.base.controller.JeecgController; | |
9 | +import org.jeecg.common.api.vo.Result; | |
10 | +import org.springframework.beans.factory.annotation.Autowired; | |
11 | +import org.springframework.web.bind.annotation.*; | |
12 | +import javax.servlet.http.HttpServletRequest; | |
13 | +import java.util.Arrays; | |
14 | +import org.jeecg.common.util.oConvertUtils; | |
15 | +import org.jeecg.modules.wms.shipment.shipmentHeaderHistory.entity.ShipmentDetailHistory; | |
16 | +import org.jeecg.modules.wms.shipment.shipmentHeaderHistory.entity.ShipmentHeaderHistory; | |
17 | +import org.jeecg.modules.wms.shipment.shipmentHeaderHistory.service.IShipmentHeaderHistoryService; | |
18 | +import org.jeecg.modules.wms.shipment.shipmentHeaderHistory.service.IShipmentDetailHistoryService; | |
19 | +import io.swagger.annotations.Api; | |
20 | +import io.swagger.annotations.ApiOperation; | |
21 | +import org.jeecg.common.aspect.annotation.AutoLog; | |
22 | + /** | |
23 | + * @Description: 历史出库单 | |
24 | + * @Author: jeecg-boot | |
25 | + * @Date: 2022-12-19 | |
26 | + * @Version: V1.0 | |
27 | + */ | |
28 | +@Api(tags="历史出库单") | |
29 | +@RestController | |
30 | +@RequestMapping("/shipment/shipmentHeaderHistory") | |
31 | +@Slf4j | |
32 | +public class ShipmentHeaderHistoryController extends JeecgController<ShipmentHeaderHistory, IShipmentHeaderHistoryService> { | |
33 | + | |
34 | + @Autowired | |
35 | + private IShipmentHeaderHistoryService shipmentHeaderHistoryService; | |
36 | + | |
37 | + @Autowired | |
38 | + private IShipmentDetailHistoryService shipmentDetailHistoryService; | |
39 | + | |
40 | + | |
41 | + /*---------------------------------主表处理-begin-------------------------------------*/ | |
42 | + | |
43 | + /** | |
44 | + * 分页列表查询 | |
45 | + * @param shipmentHeaderHistory | |
46 | + * @param pageNo | |
47 | + * @param pageSize | |
48 | + * @param req | |
49 | + * @return | |
50 | + */ | |
51 | + //@AutoLog(value = "历史出库单-分页列表查询") | |
52 | + @ApiOperation(value="历史出库单-分页列表查询", notes="历史出库单-分页列表查询") | |
53 | + @GetMapping(value = "/list") | |
54 | + public Result<IPage<ShipmentHeaderHistory>> queryPageList(ShipmentHeaderHistory shipmentHeaderHistory, | |
55 | + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | |
56 | + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | |
57 | + HttpServletRequest req) { | |
58 | + QueryWrapper<ShipmentHeaderHistory> queryWrapper = QueryGenerator.initQueryWrapper(shipmentHeaderHistory, req.getParameterMap()); | |
59 | + Page<ShipmentHeaderHistory> page = new Page<>(pageNo, pageSize); | |
60 | + IPage<ShipmentHeaderHistory> pageList = shipmentHeaderHistoryService.page(page, queryWrapper); | |
61 | + return Result.OK(pageList); | |
62 | + } | |
63 | + | |
64 | + | |
65 | + | |
66 | + /** | |
67 | + * 编辑 | |
68 | + * @param shipmentHeaderHistory | |
69 | + * @return | |
70 | + */ | |
71 | + @AutoLog(value = "历史出库单-编辑") | |
72 | + @ApiOperation(value="历史出库单-编辑", notes="历史出库单-编辑") | |
73 | + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | |
74 | + public Result<String> edit(@RequestBody ShipmentHeaderHistory shipmentHeaderHistory) { | |
75 | + shipmentHeaderHistoryService.updateById(shipmentHeaderHistory); | |
76 | + return Result.OK("编辑成功!"); | |
77 | + } | |
78 | + | |
79 | + /** | |
80 | + * 通过id删除 | |
81 | + * @param id | |
82 | + * @return | |
83 | + */ | |
84 | + @AutoLog(value = "历史出库单-通过id删除") | |
85 | + @ApiOperation(value="历史出库单-通过id删除", notes="历史出库单-通过id删除") | |
86 | + @DeleteMapping(value = "/delete") | |
87 | + public Result<String> delete(@RequestParam(name="id",required=true) String id) { | |
88 | + shipmentHeaderHistoryService.delMain(id); | |
89 | + return Result.OK("删除成功!"); | |
90 | + } | |
91 | + | |
92 | + /** | |
93 | + * 批量删除 | |
94 | + * @param ids | |
95 | + * @return | |
96 | + */ | |
97 | + @AutoLog(value = "历史出库单-批量删除") | |
98 | + @ApiOperation(value="历史出库单-批量删除", notes="历史出库单-批量删除") | |
99 | + @DeleteMapping(value = "/deleteBatch") | |
100 | + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |
101 | + this.shipmentHeaderHistoryService.delBatchMain(Arrays.asList(ids.split(","))); | |
102 | + return Result.OK("批量删除成功!"); | |
103 | + } | |
104 | + | |
105 | + | |
106 | + /*---------------------------------主表处理-end-------------------------------------*/ | |
107 | + | |
108 | + | |
109 | + /*--------------------------------子表处理-历史出库单明细-begin----------------------------------------------*/ | |
110 | + /** | |
111 | + * 通过主表ID查询 | |
112 | + * @return | |
113 | + */ | |
114 | + //@AutoLog(value = "历史出库单明细-通过主表ID查询") | |
115 | + @ApiOperation(value="历史出库单明细-通过主表ID查询", notes="历史出库单明细-通过主表ID查询") | |
116 | + @GetMapping(value = "/listShipmentDetailHistoryByMainId") | |
117 | + public Result<IPage<ShipmentDetailHistory>> listShipmentDetailHistoryByMainId(ShipmentDetailHistory shipmentDetailHistory, | |
118 | + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | |
119 | + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, | |
120 | + HttpServletRequest req) { | |
121 | + QueryWrapper<ShipmentDetailHistory> queryWrapper = QueryGenerator.initQueryWrapper(shipmentDetailHistory, req.getParameterMap()); | |
122 | + Page<ShipmentDetailHistory> page = new Page<ShipmentDetailHistory>(pageNo, pageSize); | |
123 | + IPage<ShipmentDetailHistory> pageList = shipmentDetailHistoryService.page(page, queryWrapper); | |
124 | + return Result.OK(pageList); | |
125 | + } | |
126 | + | |
127 | + | |
128 | + | |
129 | + /** | |
130 | + * 编辑 | |
131 | + * @param shipmentDetailHistory | |
132 | + * @return | |
133 | + */ | |
134 | + @AutoLog(value = "历史出库单明细-编辑") | |
135 | + @ApiOperation(value="历史出库单明细-编辑", notes="历史出库单明细-编辑") | |
136 | + @RequestMapping(value = "/editShipmentDetailHistory", method = {RequestMethod.PUT,RequestMethod.POST}) | |
137 | + public Result<String> editShipmentDetailHistory(@RequestBody ShipmentDetailHistory shipmentDetailHistory) { | |
138 | + shipmentDetailHistoryService.updateById(shipmentDetailHistory); | |
139 | + return Result.OK("编辑成功!"); | |
140 | + } | |
141 | + | |
142 | + /** | |
143 | + * 通过id删除 | |
144 | + * @param id | |
145 | + * @return | |
146 | + */ | |
147 | + @AutoLog(value = "历史出库单明细-通过id删除") | |
148 | + @ApiOperation(value="历史出库单明细-通过id删除", notes="历史出库单明细-通过id删除") | |
149 | + @DeleteMapping(value = "/deleteShipmentDetailHistory") | |
150 | + public Result<String> deleteShipmentDetailHistory(@RequestParam(name="id",required=true) String id) { | |
151 | + shipmentDetailHistoryService.removeById(id); | |
152 | + return Result.OK("删除成功!"); | |
153 | + } | |
154 | + | |
155 | + /** | |
156 | + * 批量删除 | |
157 | + * @param ids | |
158 | + * @return | |
159 | + */ | |
160 | + @AutoLog(value = "历史出库单明细-批量删除") | |
161 | + @ApiOperation(value="历史出库单明细-批量删除", notes="历史出库单明细-批量删除") | |
162 | + @DeleteMapping(value = "/deleteBatchShipmentDetailHistory") | |
163 | + public Result<String> deleteBatchShipmentDetailHistory(@RequestParam(name="ids",required=true) String ids) { | |
164 | + this.shipmentDetailHistoryService.removeByIds(Arrays.asList(ids.split(","))); | |
165 | + return Result.OK("批量删除成功!"); | |
166 | + } | |
167 | + | |
168 | + /*--------------------------------子表处理-历史出库单明细-end----------------------------------------------*/ | |
169 | + | |
170 | + | |
171 | + | |
172 | + | |
173 | +} | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeaderHistory/entity/ShipmentDetailHistory.java
0 → 100644
1 | +package org.jeecg.modules.wms.shipment.shipmentHeaderHistory.entity; | |
2 | + | |
3 | +import java.io.Serializable; | |
4 | +import com.baomidou.mybatisplus.annotation.IdType; | |
5 | +import com.baomidou.mybatisplus.annotation.TableId; | |
6 | +import com.baomidou.mybatisplus.annotation.TableName; | |
7 | +import org.jeecg.common.aspect.annotation.Dict; | |
8 | +import lombok.Data; | |
9 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
10 | +import org.springframework.format.annotation.DateTimeFormat; | |
11 | +import org.jeecgframework.poi.excel.annotation.Excel; | |
12 | +import java.util.Date; | |
13 | +import io.swagger.annotations.ApiModel; | |
14 | +import io.swagger.annotations.ApiModelProperty; | |
15 | +import java.io.UnsupportedEncodingException; | |
16 | + | |
17 | +/** | |
18 | + * @Description: 历史出库单明细 | |
19 | + * @Author: jeecg-boot | |
20 | + * @Date: 2022-12-19 | |
21 | + * @Version: V1.0 | |
22 | + */ | |
23 | +@Data | |
24 | +@TableName("shipment_detail_history") | |
25 | +@ApiModel(value="shipment_detail_history对象", description="历史出库单明细") | |
26 | +public class ShipmentDetailHistory implements Serializable { | |
27 | + private static final long serialVersionUID = 1L; | |
28 | + | |
29 | + /**id*/ | |
30 | + @TableId(type = IdType.AUTO) | |
31 | + @ApiModelProperty(value = "id") | |
32 | + private Integer id; | |
33 | + /**出库单ID*/ | |
34 | + @ApiModelProperty(value = "出库单ID") | |
35 | + private Integer shipmentId; | |
36 | + /**出库单编码*/ | |
37 | + @Excel(name = "出库单编码", width = 15) | |
38 | + @ApiModelProperty(value = "出库单编码") | |
39 | + private String shipmentCode; | |
40 | + /**仓库编码*/ | |
41 | + @Excel(name = "仓库编码", width = 15) | |
42 | + @ApiModelProperty(value = "仓库编码") | |
43 | + private String warehouseCode; | |
44 | + /**货主编码*/ | |
45 | + @Excel(name = "货主编码", width = 15) | |
46 | + @ApiModelProperty(value = "货主编码") | |
47 | + private String companyCode; | |
48 | + /**物料编码*/ | |
49 | + @Excel(name = "物料编码", width = 15) | |
50 | + @ApiModelProperty(value = "物料编码") | |
51 | + private String materialCode; | |
52 | + /**物料名称*/ | |
53 | + @Excel(name = "物料名称", width = 15) | |
54 | + @ApiModelProperty(value = "物料名称") | |
55 | + private String materialName; | |
56 | + /**物料规格*/ | |
57 | + @Excel(name = "物料规格", width = 15) | |
58 | + @ApiModelProperty(value = "物料规格") | |
59 | + private String materialSpec; | |
60 | + /**物料单位*/ | |
61 | + @Excel(name = "物料单位", width = 15) | |
62 | + @ApiModelProperty(value = "物料单位") | |
63 | + private String materialUnit; | |
64 | + /**单据数量*/ | |
65 | + @Excel(name = "单据数量", width = 15) | |
66 | + @ApiModelProperty(value = "单据数量") | |
67 | + private java.math.BigDecimal qty; | |
68 | + /**已收数量*/ | |
69 | + @Excel(name = "已收数量", width = 15) | |
70 | + @ApiModelProperty(value = "已收数量") | |
71 | + private java.math.BigDecimal taskQty; | |
72 | + /**库存状态*/ | |
73 | + @Excel(name = "库存状态", width = 15) | |
74 | + @Dict(dicCode = "inventory_status") | |
75 | + @ApiModelProperty(value = "库存状态") | |
76 | + private String inventoryStatus; | |
77 | + /**批次*/ | |
78 | + @Excel(name = "批次", width = 15) | |
79 | + @ApiModelProperty(value = "批次") | |
80 | + private String batch; | |
81 | + /**批号*/ | |
82 | + @Excel(name = "批号", width = 15) | |
83 | + @ApiModelProperty(value = "批号") | |
84 | + private String lot; | |
85 | + /**项目号*/ | |
86 | + @Excel(name = "项目号", width = 15) | |
87 | + @ApiModelProperty(value = "项目号") | |
88 | + private String project; | |
89 | + /**单据状态*/ | |
90 | + @Excel(name = "单据状态", width = 15) | |
91 | + @Dict(dicCode = "shipment_status") | |
92 | + @ApiModelProperty(value = "单据状态") | |
93 | + private Integer status; | |
94 | + /**上游单号*/ | |
95 | + @Excel(name = "上游单号", width = 15) | |
96 | + @ApiModelProperty(value = "上游单号") | |
97 | + private String referCode; | |
98 | + /**上游行号*/ | |
99 | + @Excel(name = "上游行号", width = 15) | |
100 | + @ApiModelProperty(value = "上游行号") | |
101 | + private String referLineNum; | |
102 | + /**目标出入口*/ | |
103 | + @Excel(name = "目标出入口", width = 15) | |
104 | + @ApiModelProperty(value = "目标出入口") | |
105 | + private String toPort; | |
106 | + /**备用字段1*/ | |
107 | + @Excel(name = "备用字段1", width = 15) | |
108 | + @ApiModelProperty(value = "备用字段1") | |
109 | + private String userdef1; | |
110 | + /**备用字段2*/ | |
111 | + @Excel(name = "备用字段2", width = 15) | |
112 | + @ApiModelProperty(value = "备用字段2") | |
113 | + private String userdef2; | |
114 | + /**备用字段3*/ | |
115 | + @Excel(name = "备用字段3", width = 15) | |
116 | + @ApiModelProperty(value = "备用字段3") | |
117 | + private String userdef3; | |
118 | + /**创建人*/ | |
119 | + @ApiModelProperty(value = "创建人") | |
120 | + private String createBy; | |
121 | + /**创建日期*/ | |
122 | + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | |
123 | + @DateTimeFormat(pattern="yyyy-MM-dd") | |
124 | + @ApiModelProperty(value = "创建日期") | |
125 | + private Date createTime; | |
126 | + /**更新人*/ | |
127 | + @ApiModelProperty(value = "更新人") | |
128 | + private String updateBy; | |
129 | + /**更新日期*/ | |
130 | + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | |
131 | + @DateTimeFormat(pattern="yyyy-MM-dd") | |
132 | + @ApiModelProperty(value = "更新日期") | |
133 | + private Date updateTime; | |
134 | +} | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeaderHistory/entity/ShipmentHeaderHistory.java
0 → 100644
1 | +package org.jeecg.modules.wms.shipment.shipmentHeaderHistory.entity; | |
2 | + | |
3 | +import java.io.Serializable; | |
4 | +import java.io.UnsupportedEncodingException; | |
5 | +import java.util.Date; | |
6 | +import com.baomidou.mybatisplus.annotation.IdType; | |
7 | +import com.baomidou.mybatisplus.annotation.TableId; | |
8 | +import com.baomidou.mybatisplus.annotation.TableName; | |
9 | +import org.jeecgframework.poi.excel.annotation.Excel; | |
10 | +import lombok.Data; | |
11 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
12 | +import org.springframework.format.annotation.DateTimeFormat; | |
13 | +import org.jeecg.common.aspect.annotation.Dict; | |
14 | +import io.swagger.annotations.ApiModel; | |
15 | +import io.swagger.annotations.ApiModelProperty; | |
16 | + | |
17 | +/** | |
18 | + * @Description: 历史出库单 | |
19 | + * @Author: jeecg-boot | |
20 | + * @Date: 2022-12-19 | |
21 | + * @Version: V1.0 | |
22 | + */ | |
23 | +@Data | |
24 | +@TableName("shipment_header_history") | |
25 | +@ApiModel(value="shipment_header_history对象", description="历史出库单") | |
26 | +public class ShipmentHeaderHistory implements Serializable { | |
27 | + private static final long serialVersionUID = 1L; | |
28 | + | |
29 | + /**id*/ | |
30 | + @TableId(type = IdType.AUTO) | |
31 | + @ApiModelProperty(value = "id") | |
32 | + private Integer id; | |
33 | + /**出库单编码*/ | |
34 | + @Excel(name = "出库单编码", width = 15) | |
35 | + @ApiModelProperty(value = "出库单编码") | |
36 | + private String code; | |
37 | + /**仓库编码*/ | |
38 | + @Excel(name = "仓库编码", width = 15) | |
39 | + @ApiModelProperty(value = "仓库编码") | |
40 | + private String warehouseCode; | |
41 | + /**货主编码*/ | |
42 | + @Excel(name = "货主编码", width = 15) | |
43 | + @ApiModelProperty(value = "货主编码") | |
44 | + private String companyCode; | |
45 | + /**出库单类型*/ | |
46 | + @Excel(name = "出库单类型", width = 15) | |
47 | + @ApiModelProperty(value = "出库单类型") | |
48 | + private String type; | |
49 | + /**头状态*/ | |
50 | + @Excel(name = "头状态", width = 15, dicCode = "shipment_status") | |
51 | + @Dict(dicCode = "shipment_status") | |
52 | + @ApiModelProperty(value = "头状态") | |
53 | + private Integer firstStatus; | |
54 | + /**尾状态*/ | |
55 | + @Excel(name = "尾状态", width = 15, dicCode = "shipment_status") | |
56 | + @Dict(dicCode = "shipment_status") | |
57 | + @ApiModelProperty(value = "尾状态") | |
58 | + private Integer lastStatus; | |
59 | + /**上游单号*/ | |
60 | + @Excel(name = "上游单号", width = 15) | |
61 | + @ApiModelProperty(value = "上游单号") | |
62 | + private String referCode; | |
63 | + /**客户编码*/ | |
64 | + @Excel(name = "客户编码", width = 15) | |
65 | + @ApiModelProperty(value = "客户编码") | |
66 | + private String customerCode; | |
67 | + /**总数量*/ | |
68 | + @Excel(name = "总数量", width = 15) | |
69 | + @ApiModelProperty(value = "总数量") | |
70 | + private java.math.BigDecimal totalQty; | |
71 | + /**总行数*/ | |
72 | + @Excel(name = "总行数", width = 15) | |
73 | + @ApiModelProperty(value = "总行数") | |
74 | + private Integer totalLines; | |
75 | + /**出库单备注*/ | |
76 | + @Excel(name = "出库单备注", width = 15) | |
77 | + @ApiModelProperty(value = "出库单备注") | |
78 | + private String remark; | |
79 | + /**备用字段1*/ | |
80 | + @Excel(name = "备用字段1", width = 15) | |
81 | + @ApiModelProperty(value = "备用字段1") | |
82 | + private String userdef1; | |
83 | + /**备用字段2*/ | |
84 | + @Excel(name = "备用字段2", width = 15) | |
85 | + @ApiModelProperty(value = "备用字段2") | |
86 | + private String userdef2; | |
87 | + /**备用字段3*/ | |
88 | + @Excel(name = "备用字段3", width = 15) | |
89 | + @ApiModelProperty(value = "备用字段3") | |
90 | + private String userdef3; | |
91 | + /**创建人*/ | |
92 | + @ApiModelProperty(value = "创建人") | |
93 | + private String createBy; | |
94 | + /**创建日期*/ | |
95 | + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | |
96 | + @DateTimeFormat(pattern="yyyy-MM-dd") | |
97 | + @ApiModelProperty(value = "创建日期") | |
98 | + private Date createTime; | |
99 | + /**更新人*/ | |
100 | + @ApiModelProperty(value = "更新人") | |
101 | + private String updateBy; | |
102 | + /**更新日期*/ | |
103 | + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | |
104 | + @DateTimeFormat(pattern="yyyy-MM-dd") | |
105 | + @ApiModelProperty(value = "更新日期") | |
106 | + private Date updateTime; | |
107 | +} | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeaderHistory/mapper/ShipmentDetailHistoryMapper.java
0 → 100644
1 | +package org.jeecg.modules.wms.shipment.shipmentHeaderHistory.mapper; | |
2 | + | |
3 | +import java.util.List; | |
4 | +import org.jeecg.modules.wms.shipment.shipmentHeaderHistory.entity.ShipmentDetailHistory; | |
5 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
6 | +import org.apache.ibatis.annotations.Param; | |
7 | + | |
8 | +/** | |
9 | + * @Description: 历史出库单明细 | |
10 | + * @Author: jeecg-boot | |
11 | + * @Date: 2022-12-19 | |
12 | + * @Version: V1.0 | |
13 | + */ | |
14 | +public interface ShipmentDetailHistoryMapper extends BaseMapper<ShipmentDetailHistory> { | |
15 | + | |
16 | + public boolean deleteByMainId(@Param("mainId") String mainId); | |
17 | + | |
18 | + public List<ShipmentDetailHistory> selectByMainId(@Param("mainId") String mainId); | |
19 | + | |
20 | +} | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeaderHistory/mapper/ShipmentHeaderHistoryMapper.java
0 → 100644
1 | +package org.jeecg.modules.wms.shipment.shipmentHeaderHistory.mapper; | |
2 | + | |
3 | +import java.util.List; | |
4 | + | |
5 | +import org.apache.ibatis.annotations.Param; | |
6 | +import org.jeecg.modules.wms.shipment.shipmentHeaderHistory.entity.ShipmentHeaderHistory; | |
7 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
8 | + | |
9 | +/** | |
10 | + * @Description: 历史出库单 | |
11 | + * @Author: jeecg-boot | |
12 | + * @Date: 2022-12-19 | |
13 | + * @Version: V1.0 | |
14 | + */ | |
15 | +public interface ShipmentHeaderHistoryMapper extends BaseMapper<ShipmentHeaderHistory> { | |
16 | + | |
17 | +} | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeaderHistory/mapper/xml/ShipmentDetailHistoryMapper.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="org.jeecg.modules.wms.shipment.shipmentHeaderHistory.mapper.ShipmentDetailHistoryMapper"> | |
4 | + | |
5 | + <delete id="deleteByMainId" parameterType="java.lang.String"> | |
6 | + DELETE | |
7 | + FROM shipment_detail_history | |
8 | + WHERE | |
9 | + shipment_id = #{mainId} | |
10 | + </delete> | |
11 | + | |
12 | + <select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.wms.shipment.shipmentHeaderHistory.entity.ShipmentDetailHistory"> | |
13 | + SELECT * | |
14 | + FROM shipment_detail_history | |
15 | + WHERE | |
16 | + shipment_id = #{mainId} | |
17 | + </select> | |
18 | +</mapper> | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeaderHistory/mapper/xml/ShipmentHeaderHistoryMapper.xml
0 → 100644
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeaderHistory/service/IShipmentDetailHistoryService.java
0 → 100644
1 | +package org.jeecg.modules.wms.shipment.shipmentHeaderHistory.service; | |
2 | + | |
3 | +import org.jeecg.modules.wms.shipment.shipmentHeaderHistory.entity.ShipmentDetailHistory; | |
4 | +import com.baomidou.mybatisplus.extension.service.IService; | |
5 | +import java.util.List; | |
6 | + | |
7 | +/** | |
8 | + * @Description: 历史出库单明细 | |
9 | + * @Author: jeecg-boot | |
10 | + * @Date: 2022-12-19 | |
11 | + * @Version: V1.0 | |
12 | + */ | |
13 | +public interface IShipmentDetailHistoryService extends IService<ShipmentDetailHistory> { | |
14 | + | |
15 | + public List<ShipmentDetailHistory> selectByMainId(String mainId); | |
16 | +} | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeaderHistory/service/IShipmentHeaderHistoryService.java
0 → 100644
1 | +package org.jeecg.modules.wms.shipment.shipmentHeaderHistory.service; | |
2 | + | |
3 | +import org.jeecg.modules.wms.shipment.shipmentHeaderHistory.entity.ShipmentDetailHistory; | |
4 | +import org.jeecg.modules.wms.shipment.shipmentHeaderHistory.entity.ShipmentHeaderHistory; | |
5 | +import com.baomidou.mybatisplus.extension.service.IService; | |
6 | +import org.springframework.beans.factory.annotation.Autowired; | |
7 | +import java.io.Serializable; | |
8 | +import java.util.Collection; | |
9 | +import java.util.List; | |
10 | + | |
11 | +/** | |
12 | + * @Description: 历史出库单 | |
13 | + * @Author: jeecg-boot | |
14 | + * @Date: 2022-12-19 | |
15 | + * @Version: V1.0 | |
16 | + */ | |
17 | +public interface IShipmentHeaderHistoryService extends IService<ShipmentHeaderHistory> { | |
18 | + | |
19 | + /** | |
20 | + * 删除一对多 | |
21 | + */ | |
22 | + public void delMain (String id); | |
23 | + | |
24 | + /** | |
25 | + * 批量删除一对多 | |
26 | + */ | |
27 | + public void delBatchMain (Collection<? extends Serializable> idList); | |
28 | + | |
29 | + | |
30 | + /** | |
31 | + * 根据删除的出库单主表ID新增历史出库单记录 | |
32 | + * @param id | |
33 | + */ | |
34 | + void saveById(String id); | |
35 | +} | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeaderHistory/service/impl/ShipmentDetailHistoryServiceImpl.java
0 → 100644
1 | +package org.jeecg.modules.wms.shipment.shipmentHeaderHistory.service.impl; | |
2 | + | |
3 | +import org.jeecg.modules.wms.shipment.shipmentHeaderHistory.entity.ShipmentDetailHistory; | |
4 | +import org.jeecg.modules.wms.shipment.shipmentHeaderHistory.mapper.ShipmentDetailHistoryMapper; | |
5 | +import org.jeecg.modules.wms.shipment.shipmentHeaderHistory.service.IShipmentDetailHistoryService; | |
6 | +import org.springframework.stereotype.Service; | |
7 | +import java.util.List; | |
8 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
9 | +import org.springframework.beans.factory.annotation.Autowired; | |
10 | + | |
11 | +/** | |
12 | + * @Description: 历史出库单明细 | |
13 | + * @Author: jeecg-boot | |
14 | + * @Date: 2022-12-19 | |
15 | + * @Version: V1.0 | |
16 | + */ | |
17 | +@Service | |
18 | +public class ShipmentDetailHistoryServiceImpl extends ServiceImpl<ShipmentDetailHistoryMapper, ShipmentDetailHistory> implements IShipmentDetailHistoryService { | |
19 | + | |
20 | + @Autowired | |
21 | + private ShipmentDetailHistoryMapper shipmentDetailHistoryMapper; | |
22 | + | |
23 | + @Override | |
24 | + public List<ShipmentDetailHistory> selectByMainId(String mainId) { | |
25 | + return shipmentDetailHistoryMapper.selectByMainId(mainId); | |
26 | + } | |
27 | +} | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeaderHistory/service/impl/ShipmentHeaderHistoryServiceImpl.java
0 → 100644
1 | +package org.jeecg.modules.wms.shipment.shipmentHeaderHistory.service.impl; | |
2 | +import java.math.BigDecimal; | |
3 | +import java.util.Date; | |
4 | + | |
5 | +import com.aliyun.oss.ServiceException; | |
6 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
7 | +import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptDetail; | |
8 | +import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; | |
9 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.entity.ReceiptDetailHistory; | |
10 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.entity.ReceiptHeaderHistory; | |
11 | +import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentDetail; | |
12 | +import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentHeader; | |
13 | +import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentDetailService; | |
14 | +import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentHeaderService; | |
15 | +import org.jeecg.modules.wms.shipment.shipmentHeaderHistory.entity.ShipmentHeaderHistory; | |
16 | +import org.jeecg.modules.wms.shipment.shipmentHeaderHistory.entity.ShipmentDetailHistory; | |
17 | +import org.jeecg.modules.wms.shipment.shipmentHeaderHistory.mapper.ShipmentDetailHistoryMapper; | |
18 | +import org.jeecg.modules.wms.shipment.shipmentHeaderHistory.mapper.ShipmentHeaderHistoryMapper; | |
19 | +import org.jeecg.modules.wms.shipment.shipmentHeaderHistory.service.IShipmentDetailHistoryService; | |
20 | +import org.jeecg.modules.wms.shipment.shipmentHeaderHistory.service.IShipmentHeaderHistoryService; | |
21 | +import org.springframework.beans.BeanUtils; | |
22 | +import org.springframework.stereotype.Service; | |
23 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
24 | +import org.springframework.beans.factory.annotation.Autowired; | |
25 | +import org.springframework.transaction.annotation.Transactional; | |
26 | +import java.io.Serializable; | |
27 | +import java.util.ArrayList; | |
28 | +import java.util.List; | |
29 | +import java.util.Collection; | |
30 | +import java.util.stream.Collectors; | |
31 | + | |
32 | +/** | |
33 | + * @Description: 历史出库单 | |
34 | + * @Author: jeecg-boot | |
35 | + * @Date: 2022-12-19 | |
36 | + * @Version: V1.0 | |
37 | + */ | |
38 | +@Service | |
39 | +public class ShipmentHeaderHistoryServiceImpl extends ServiceImpl<ShipmentHeaderHistoryMapper, ShipmentHeaderHistory> implements IShipmentHeaderHistoryService { | |
40 | + | |
41 | + @Autowired | |
42 | + private ShipmentHeaderHistoryMapper shipmentHeaderHistoryMapper; | |
43 | + @Autowired | |
44 | + private ShipmentDetailHistoryMapper shipmentDetailHistoryMapper; | |
45 | + | |
46 | + @Autowired | |
47 | + private IShipmentHeaderService shipmentHeaderService; | |
48 | + @Autowired | |
49 | + private IShipmentDetailService shipmentDetailService; | |
50 | + @Autowired | |
51 | + private IShipmentDetailHistoryService shipmentDetailHistoryService; | |
52 | + | |
53 | + @Override | |
54 | + @Transactional | |
55 | + public void delMain(String id) { | |
56 | + shipmentDetailHistoryMapper.deleteByMainId(id); | |
57 | + shipmentHeaderHistoryMapper.deleteById(id); | |
58 | + } | |
59 | + | |
60 | + @Override | |
61 | + @Transactional | |
62 | + public void delBatchMain(Collection<? extends Serializable> idList) { | |
63 | + for(Serializable id:idList) { | |
64 | + shipmentDetailHistoryMapper.deleteByMainId(id.toString()); | |
65 | + shipmentHeaderHistoryMapper.deleteById(id); | |
66 | + } | |
67 | + } | |
68 | + | |
69 | + /** | |
70 | + * 根据删除的出库单主表ID新增历史出库单记录 | |
71 | + * @param id | |
72 | + */ | |
73 | + @Override | |
74 | + public void saveById(String id) { | |
75 | + ShipmentHeader shipmentHeader = shipmentHeaderService.getById(id); | |
76 | + ShipmentHeaderHistory shipmentHeaderHistory = new ShipmentHeaderHistory(); | |
77 | + shipmentHeaderHistory.setCode(shipmentHeader.getCode()); | |
78 | + shipmentHeaderHistory.setWarehouseCode(shipmentHeader.getWarehouseCode()); | |
79 | + shipmentHeaderHistory.setCompanyCode(shipmentHeader.getCompanyCode()); | |
80 | + shipmentHeaderHistory.setType(shipmentHeader.getType()); | |
81 | + shipmentHeaderHistory.setFirstStatus(shipmentHeader.getFirstStatus()); | |
82 | + shipmentHeaderHistory.setLastStatus(shipmentHeader.getLastStatus()); | |
83 | + shipmentHeaderHistory.setReferCode(shipmentHeader.getReferCode()); | |
84 | + shipmentHeaderHistory.setCustomerCode(shipmentHeader.getCompanyCode()); | |
85 | + shipmentHeaderHistory.setTotalQty(shipmentHeader.getTotalQty()); | |
86 | + shipmentHeaderHistory.setTotalLines(shipmentHeader.getTotalLines()); | |
87 | + shipmentHeaderHistory.setRemark(shipmentHeader.getRemark()); | |
88 | + shipmentHeaderHistory.setUserdef1(shipmentHeader.getUserdef1()); | |
89 | + shipmentHeaderHistory.setUserdef2(shipmentHeader.getUserdef2()); | |
90 | + shipmentHeaderHistory.setUserdef3(shipmentHeader.getUserdef3()); | |
91 | + shipmentHeaderHistory.setCreateBy(shipmentHeader.getCreateBy()); | |
92 | + shipmentHeaderHistory.setCreateTime(shipmentHeader.getCreateTime()); | |
93 | + shipmentHeaderHistory.setUpdateBy(shipmentHeader.getUpdateBy()); | |
94 | + shipmentHeaderHistory.setUpdateTime(shipmentHeader.getUpdateTime()); | |
95 | + | |
96 | + shipmentHeaderHistoryMapper.insert(shipmentHeaderHistory); | |
97 | + List<ShipmentDetailHistory> shipmentDetailHistoryList = new ArrayList<>(); | |
98 | + List<ShipmentDetail> shipmentDetailList = shipmentDetailService.list(new LambdaQueryWrapper<ShipmentDetail>().eq(ShipmentDetail::getShipmentId, shipmentHeader.getId())); | |
99 | + for (ShipmentDetail detail : shipmentDetailList) { | |
100 | + ShipmentDetailHistory shipmentDetailHistory = new ShipmentDetailHistory(); | |
101 | + BeanUtils.copyProperties(detail, shipmentDetailHistory); | |
102 | + shipmentDetailHistoryList.add(shipmentDetailHistory); | |
103 | + } | |
104 | + List<ShipmentDetailHistory> newList = shipmentDetailHistoryList.stream().peek(detail -> detail.setShipmentId(shipmentHeaderHistory.getId())).collect(Collectors.toList()); | |
105 | + if (!shipmentDetailHistoryService.saveBatch(newList)){ | |
106 | + throw new ServiceException("批量新增失败"); | |
107 | + } | |
108 | + } | |
109 | + | |
110 | +} | |
... | ... |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeaderHistory/vo/ShipmentHeaderHistoryPage.java
0 → 100644
1 | +package org.jeecg.modules.wms.shipment.shipmentHeaderHistory.vo; | |
2 | + | |
3 | +import io.swagger.annotations.ApiModel; | |
4 | +import io.swagger.annotations.ApiModelProperty; | |
5 | +import lombok.Data; | |
6 | +import org.jeecg.modules.wms.receipt.receiptHeaderHistory.entity.ReceiptDetailHistory; | |
7 | +import org.jeecgframework.poi.excel.annotation.Excel; | |
8 | +import org.jeecgframework.poi.excel.annotation.ExcelCollection; | |
9 | + | |
10 | +import java.util.Date; | |
11 | +import java.util.List; | |
12 | + | |
13 | +/** | |
14 | + * @Description: 历史出库单 | |
15 | + * @Author: jeecg-boot | |
16 | + * @Date: 2022-12-19 | |
17 | + * @Version: V1.0 | |
18 | + */ | |
19 | +@Data | |
20 | +@ApiModel(value="shipment_header_historyPage对象", description="历史出库单") | |
21 | +public class ShipmentHeaderHistoryPage { | |
22 | + | |
23 | + /**主键*/ | |
24 | + @ApiModelProperty(value = "主键") | |
25 | + private String id; | |
26 | + /**出库单ID*/ | |
27 | + @ApiModelProperty(value = "出库单ID") | |
28 | + private Integer shipmentId; | |
29 | + /**出库单编码*/ | |
30 | + @Excel(name = "出库单编码", width = 15) | |
31 | + @ApiModelProperty(value = "出库单编码") | |
32 | + private String shipmentCode; | |
33 | + /**仓库编码*/ | |
34 | + @Excel(name = "仓库编码", width = 15) | |
35 | + @ApiModelProperty(value = "仓库编码") | |
36 | + private String warehouseCode; | |
37 | + /**货主*/ | |
38 | + @Excel(name = "货主", width = 15) | |
39 | + @ApiModelProperty(value = "货主") | |
40 | + private String companyCode; | |
41 | + /**出库单类型*/ | |
42 | + @Excel(name = "出库单类型", width = 15) | |
43 | + @ApiModelProperty(value = "出库单类型") | |
44 | + private String type; | |
45 | + /**头状态*/ | |
46 | + @Excel(name = "头状态", width = 15) | |
47 | + @ApiModelProperty(value = "头状态") | |
48 | + private Integer firstStatus; | |
49 | + /**尾状态*/ | |
50 | + @Excel(name = "尾状态", width = 15) | |
51 | + @ApiModelProperty(value = "尾状态") | |
52 | + private Integer lastStatus; | |
53 | + /**上游单号*/ | |
54 | + @Excel(name = "上游单号", width = 15) | |
55 | + @ApiModelProperty(value = "上游单号") | |
56 | + private String referCode; | |
57 | + /**供应商编码*/ | |
58 | + @Excel(name = "供应商编码", width = 15) | |
59 | + @ApiModelProperty(value = "供应商编码") | |
60 | + private String supplierCode; | |
61 | + /**单据数量*/ | |
62 | + @Excel(name = "单据数量", width = 15) | |
63 | + @ApiModelProperty(value = "单据数量") | |
64 | + private java.math.BigDecimal qty; | |
65 | + /**已收数量*/ | |
66 | + @Excel(name = "已收数量", width = 15) | |
67 | + @ApiModelProperty(value = "已收数量") | |
68 | + private java.math.BigDecimal taskQty; | |
69 | + /**目标出出口*/ | |
70 | + @Excel(name = "目标出入口", width = 15) | |
71 | + @ApiModelProperty(value = "目标出入口") | |
72 | + private String toPort; | |
73 | + /**客户编码*/ | |
74 | + @Excel(name = "客户编码", width = 15) | |
75 | + @ApiModelProperty(value = "客户编码") | |
76 | + private String customerCode; | |
77 | + /**总行数*/ | |
78 | + @Excel(name = "总行数", width = 15) | |
79 | + @ApiModelProperty(value = "总行数") | |
80 | + private Integer totallines; | |
81 | + /**出库单备注*/ | |
82 | + @Excel(name = "出库单备注", width = 15) | |
83 | + @ApiModelProperty(value = "出库单备注") | |
84 | + private String remark; | |
85 | + /**备用字段1*/ | |
86 | + @Excel(name = "备用字段1", width = 15) | |
87 | + @ApiModelProperty(value = "备用字段1") | |
88 | + private String userdef1; | |
89 | + /**备用字段2*/ | |
90 | + @Excel(name = "备用字段2", width = 15) | |
91 | + @ApiModelProperty(value = "备用字段2") | |
92 | + private String userdef2; | |
93 | + /**备用字段3*/ | |
94 | + @Excel(name = "备用字段3", width = 15) | |
95 | + @ApiModelProperty(value = "备用字段3") | |
96 | + private String userdef3; | |
97 | + /**创建人*/ | |
98 | + @ApiModelProperty(value = "创建人") | |
99 | + private String createBy; | |
100 | + /**创建日期*/ | |
101 | + @ApiModelProperty(value = "创建日期") | |
102 | + private Date createTime; | |
103 | + /**更新人*/ | |
104 | + @ApiModelProperty(value = "更新人") | |
105 | + private String updateBy; | |
106 | + /**更新日期*/ | |
107 | + @ApiModelProperty(value = "更新日期") | |
108 | + private Date updateTime; | |
109 | + | |
110 | + @ExcelCollection(name="历史出库单明细") | |
111 | + @ApiModelProperty(value = "历史出库单明细") | |
112 | + private List<ReceiptDetailHistory> receiptDetailHistoryList; | |
113 | + | |
114 | +} | |
... | ... |