Commit 64c0c195c70b97711936a452d7e15628eb5ce9e5

Authored by 谭毅彬
2 parents 6ed35dc2 07cd7e15

Merge branch 'develop' of http://www.huahengrobot.com:90/wms/wms4.git into develop

Showing 39 changed files with 575 additions and 172 deletions
ant-design-vue-jeecg/public/index.html
... ... @@ -6,7 +6,7 @@
6 6 <meta http-equiv="X-UA-Compatible" content="IE=edge">
7 7 <meta name="viewport" content="width=device-width,initial-scale=1.0">
8 8 <title>华恒仓储管理系统</title>
9   - <link rel="icon" href="<%= BASE_URL %>logo.png">
  9 + <link rel="icon" href="<%= BASE_URL %>logo.ico">
10 10 <script src="<%= BASE_URL %>cdn/babel-polyfill/polyfill_7_2_5.js"></script>
11 11 <style>
12 12 html,
... ...
ant-design-vue-jeecg/public/logo.ico 0 → 100644
No preview for this file type
ant-design-vue-jeecg/public/logo.png renamed to ant-design-vue-jeecg/public/logo2.png

8.72 KB

ant-design-vue-jeecg/src/assets/logo.ico 0 → 100644
No preview for this file type
ant-design-vue-jeecg/src/views/system/DictList.vue
... ... @@ -47,14 +47,13 @@
47 47 @change="handleTableChange">
48 48 <span slot="action" slot-scope="text, record">
49 49 <a @click="handleEdit(record)" v-has="'dict:edit'">
50   - <a-icon type="edit"/>
51   - 编辑
  50 + <a-button icon="edit" type="default">编辑</a-button>
52 51 </a>
53 52 <a-divider type="vertical"/>
54   - <a v-has="'dict:config'" @click="editDictItem(record)"><a-icon type="setting"/> 字典配置</a>
  53 + <a v-has="'dict:config'" @click="editDictItem(record)"><a-button type="primary" icon="setting">字典配置</a-button> </a>
55 54 <a-divider type="vertical"/>
56 55 <a-popconfirm title="确定删除吗?" @confirm="() =>handleDelete(record.id)">
57   - <a v-has="'dict:delete'">删除</a>
  56 + <a v-has="'dict:delete'"><a-button type="danger">删除</a-button></a>
58 57 </a-popconfirm>
59 58 </span>
60 59 </a-table>
... ...
ant-design-vue-jeecg/src/views/system/config/ContainerList.vue
... ... @@ -309,7 +309,7 @@ export default {
309 309 '空盘': 'lightgray',
310 310 '有货': 'purple',
311 311 '满盘': 'red',
312   - default: 'default'
  312 + default: 'blue'
313 313 };
314 314 return colors[status] || colors.default;
315 315 },
... ...
ant-design-vue-jeecg/src/views/system/config/LocationList.vue
... ... @@ -405,7 +405,7 @@ export default {
405 405  
406 406 '高库位': 'red',
407 407 '低库位': 'green',
408   - default: 'default'
  408 + default: 'blue'
409 409 };
410 410 return colors[status] || colors.default;
411 411 },
... ...
ant-design-vue-jeecg/src/views/system/config/ParameterConfigurationList.vue
... ... @@ -38,9 +38,9 @@
38 38  
39 39 <!-- 操作按钮区域 -->
40 40 <div class="table-operator">
41   - <a-button @click="handleAdd" v-has="'ParameterConfiguration:add'" type="primary" icon="plus">新增</a-button>
42   - <a-button v-has="'ParameterConfiguration:export'" type="primary" icon="download" @click="handleExportXls('参数配置')">导出</a-button>
43   - <a-upload v-has="'ParameterConfiguration:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
  41 + <a-button @click="handleAdd" v-has="'parameterConfiguration:add'" type="primary" icon="plus">新增</a-button>
  42 + <a-button v-has="'parameterConfiguration:export'" type="primary" icon="download" @click="handleExportXls('参数配置')">导出</a-button>
  43 + <a-upload v-has="'parameterConfiguration:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
44 44 @change="handleImportExcel">
45 45 <a-button type="primary" icon="import">导入</a-button>
46 46 </a-upload>
... ...
ant-design-vue-jeecg/src/views/system/config/PortList.vue
... ... @@ -249,7 +249,7 @@ export default {
249 249 '入库口': 'green',
250 250 '出库口': 'purple',
251 251 '出入口': 'red',
252   - default: 'default'
  252 + default: 'blue'
253 253 };
254 254 return colors[status] || colors.default;
255 255 },
... ...
ant-design-vue-jeecg/src/views/system/inventory/InventoryDetailList.vue
... ... @@ -4,7 +4,8 @@
4 4 <div class="table-operator" v-if="mainId">
5 5 <a-button v-has="'inventoryDetail:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button>
6 6 <a-button v-has="'inventoryDetail:export'" type="primary" icon="download" @click="handleExportXls('库存详情')"
7   - >导出</a-button
  7 + >导出
  8 + </a-button
8 9 >
9 10 <a-upload
10 11 v-has="'inventoryDetail:import'"
... ... @@ -20,13 +21,13 @@
20 21 <a-dropdown v-if="selectedRowKeys.length > 0">
21 22 <a-menu slot="overlay" v-has="'inventoryDetail:deleteBatch'">
22 23 <a-menu-item key="1" @click="batchDel">
23   - <a-icon type="delete" />
  24 + <a-icon type="delete"/>
24 25 删除
25 26 </a-menu-item>
26 27 </a-menu>
27 28 <a-button style="margin-left: 8px">
28 29 批量操作
29   - <a-icon type="down" />
  30 + <a-icon type="down"/>
30 31 </a-button>
31 32 </a-dropdown>
32 33 </div>
... ... @@ -52,6 +53,12 @@
52 53 :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
53 54 @change="handleTableChange"
54 55 >
  56 + <span slot="inventoryStatus_dictText" slot-scope="inventoryStatus_dictText">
  57 + <a-tag :key="inventoryStatus_dictText" :color="getStatusColor(inventoryStatus_dictText)">
  58 + {{ inventoryStatus_dictText }}
  59 + </a-tag>
  60 + </span>
  61 +
55 62 <span slot="companyCode" slot-scope="companyCode">
56 63 <a-tag :key="companyCode" color="blue">
57 64 {{ solutionCompany(companyCode) }}
... ... @@ -92,14 +99,14 @@
92 99 </template>
93 100  
94 101 <script>
95   -import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  102 +import {JeecgListMixin} from '@/mixins/JeecgListMixin'
96 103 import InventoryDetailModal from './modules/InventoryDetailModal'
97   -import { getCompanyList } from '@/api/api'
  104 +import {getCompanyList, getZoneList} from '@/api/api'
98 105  
99 106 export default {
100 107 name: 'InventoryDetailList',
101 108 mixins: [JeecgListMixin],
102   - components: { InventoryDetailModal },
  109 + components: {InventoryDetailModal},
103 110 props: {
104 111 mainId: {
105 112 type: String,
... ... @@ -137,7 +144,7 @@ export default {
137 144 align: 'center',
138 145 dataIndex: 'companyCode',
139 146 key: 'companyCode',
140   - scopedSlots: { customRender: 'companyCode' }
  147 + scopedSlots: {customRender: 'companyCode'}
141 148 },
142 149 // {
143 150 // title: '库区',
... ... @@ -195,7 +202,8 @@ export default {
195 202 {
196 203 title: '库存状态',
197 204 align: 'center',
198   - dataIndex: 'inventoryStatus_dictText'
  205 + dataIndex: 'inventoryStatus_dictText',
  206 + scopedSlots: {customRender: 'inventoryStatus_dictText'}
199 207 },
200 208 {
201 209 title: '批次',
... ... @@ -243,7 +251,7 @@ export default {
243 251 align: 'center',
244 252 fixed: 'right',
245 253 width: 147,
246   - scopedSlots: { customRender: 'action' }
  254 + scopedSlots: {customRender: 'action'}
247 255 }
248 256 ],
249 257 url: {
... ... @@ -267,13 +275,38 @@ export default {
267 275 }
268 276 },
269 277 methods: {
  278 + getStatusColor(status) {
  279 + const colors = {
  280 + '良品': 'green',
  281 + '报废品': 'purple',
  282 + '待确认 ': 'grey',
  283 + '次品': 'red',
  284 + default: 'blue'
  285 + };
  286 + return colors[status] || colors.default;
  287 + },
270 288 loadFrom() {
  289 + // getZoneList().then((res) => {
  290 + // if (res.success) {
  291 + // this.zoneList = res.result
  292 + // }
  293 + // });
271 294 getCompanyList().then(res => {
272 295 if (res.success) {
273 296 this.companyList = res.result
274 297 }
275 298 })
276 299 },
  300 + // solutionZoneCode(value) {
  301 + // var actions = []
  302 + // Object.keys(this.zoneList).some((key) => {
  303 + // if (this.zoneList[key].code == ('' + value)) {
  304 + // actions.push(this.zoneList[key].name)
  305 + // return true
  306 + // }
  307 + // })
  308 + // return actions.join('')
  309 + // },
277 310 solutionCompany(value) {
278 311 var actions = []
279 312 Object.keys(this.companyList).some(key => {
... ...
ant-design-vue-jeecg/src/views/system/inventory/InventoryHeaderList.vue
... ... @@ -92,6 +92,12 @@
92 92 :customRow="clickThenSelect"
93 93 @change="handleTableChange">
94 94  
  95 + <span slot="containerStatus_dictText" slot-scope="containerStatus_dictText">
  96 + <a-tag :key="containerStatus_dictText" :color="getStatusColor(containerStatus_dictText)">
  97 + {{ containerStatus_dictText }}
  98 + </a-tag>
  99 + </span>
  100 +
95 101 <span slot="zoneCode" slot-scope="zoneCode">
96 102 <a-tag :key="zoneCode" color=blue>
97 103 {{ solutionZoneCode(zoneCode) }}
... ... @@ -190,6 +196,7 @@ export default {
190 196 title: '容器状态',
191 197 align: "center",
192 198 dataIndex: 'containerStatus_dictText',
  199 + scopedSlots: {customRender: 'containerStatus_dictText'}
193 200 },
194 201 {
195 202 title: '库位号',
... ... @@ -271,6 +278,18 @@ export default {
271 278 }
272 279 },
273 280 methods: {
  281 + getStatusColor(status) {
  282 + const colors = {
  283 + '空闲': 'green',
  284 + '锁定': 'red',
  285 + // '空盘': 'lightgray',
  286 + '有货': 'purple',
  287 + '满盘': 'blue',
  288 + default: 'blue'
  289 + };
  290 + return colors[status] || colors.default;
  291 + },
  292 +
274 293 solutionZoneCode(value) {
275 294 var actions = []
276 295 Object.keys(this.zoneList).some((key) => {
... ...
ant-design-vue-jeecg/src/views/system/inventory/InventoryTransactionList.vue
... ... @@ -57,7 +57,8 @@
57 57 </a-col>
58 58 <a-col :xl="6" :lg="7" :md="8" :sm="24">
59 59 <a-form-item label="库存状态">
60   - <j-dict-select-tag placeholder="请选择库存状态" v-model="queryParam.inventoryStatus" dictCode="inventory_status"/>
  60 + <j-dict-select-tag placeholder="请选择库存状态" v-model="queryParam.inventoryStatus"
  61 + dictCode="inventory_status"/>
61 62 </a-form-item>
62 63 </a-col>
63 64 <a-col :xl="6" :lg="7" :md="8" :sm="24">
... ... @@ -98,8 +99,11 @@
98 99 <!-- 操作按钮区域 -->
99 100 <div class="table-operator">
100 101 <a-button @click="handleAdd" v-has="'inventoryTransaction:add'" type="primary" icon="plus">新增</a-button>
101   - <a-button v-has="'inventoryTransaction:export'" type="primary" icon="download" @click="handleExportXls('库存交易记录')">导出</a-button>
102   - <a-upload v-has="'inventoryTransaction:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
  102 + <a-button v-has="'inventoryTransaction:export'" type="primary" icon="download"
  103 + @click="handleExportXls('库存交易记录')">导出
  104 + </a-button>
  105 + <a-upload v-has="'inventoryTransaction:import'" name="file" :showUploadList="false" :multiple="false"
  106 + :headers="tokenHeader" :action="importExcelUrl"
103 107 @change="handleImportExcel">
104 108 <a-button type="primary" icon="import">导入</a-button>
105 109 </a-upload>
... ... @@ -138,6 +142,12 @@
138 142 class="j-table-force-nowrap"
139 143 @change="handleTableChange">
140 144  
  145 + <span slot="inventoryStatus_dictText" slot-scope="inventoryStatus_dictText">
  146 + <a-tag :key="inventoryStatus_dictText" :color="getStatusColor(inventoryStatus_dictText)">
  147 + {{ inventoryStatus_dictText }}
  148 + </a-tag>
  149 + </span>
  150 +
141 151 <span slot="companyCode" slot-scope="companyCode">
142 152 <a-tag :key="companyCode" color=blue>
143 153 {{ solutionCompany(companyCode) }}
... ... @@ -265,7 +275,8 @@ export default {
265 275 {
266 276 title: '库存状态',
267 277 align: "center",
268   - dataIndex: 'inventoryStatus_dictText'
  278 + dataIndex: 'inventoryStatus_dictText',
  279 + scopedSlots: {customRender: 'inventoryStatus_dictText'}
269 280 },
270 281 {
271 282 title: '数量',
... ... @@ -273,6 +284,11 @@ export default {
273 284 dataIndex: 'qty'
274 285 },
275 286 {
  287 + title: '库存数量',
  288 + align: "center",
  289 + dataIndex: 'inventoryQty'
  290 + },
  291 + {
276 292 title: '批次',
277 293 align: "center",
278 294 dataIndex: 'batch'
... ... @@ -328,6 +344,16 @@ export default {
328 344 },
329 345 },
330 346 methods: {
  347 + getStatusColor(status) {
  348 + const colors = {
  349 + '良品': 'green',
  350 + '报废品': 'purple',
  351 + '待确认 ': 'grey',
  352 + '次品': 'red',
  353 + default: 'blue'
  354 + };
  355 + return colors[status] || colors.default;
  356 + },
331 357 initDictConfig() {
332 358 },
333 359 loadFrom() {
... ...
ant-design-vue-jeecg/src/views/system/inventory/SimpleInventoryDetailList.vue
... ... @@ -86,7 +86,7 @@
86 86 <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
87 87 <a @click="handleToggleSearch" style="margin-left: 8px">
88 88 {{ toggleSearchStatus ? '收起' : '展开' }}
89   - <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
  89 + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
90 90 </a>
91 91 </span>
92 92 </a-col>
... ... @@ -99,7 +99,8 @@
99 99 <div class="table-operator">
100 100 <a-button v-has="'inventoryDetail:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button>
101 101 <a-button v-has="'inventoryDetail:export'" type="primary" icon="download" @click="handleExportXls('库存详情')"
102   - >导出</a-button
  102 + >导出
  103 + </a-button
103 104 >
104 105 <a-upload
105 106 v-has="'inventoryDetail:import'"
... ... @@ -148,6 +149,24 @@
148 149 class="j-table-force-nowrap"
149 150 @change="handleTableChange"
150 151 >
  152 + <span slot="inventoryStatus_dictText" slot-scope="inventoryStatus_dictText">
  153 + <a-tag :key="inventoryStatus_dictText" :color="getStatusColor(inventoryStatus_dictText)">
  154 + {{ inventoryStatus_dictText }}
  155 + </a-tag>
  156 + </span>
  157 +
  158 + <span slot="companyCode" slot-scope="companyCode">
  159 + <a-tag :key="companyCode" color="blue">
  160 + {{ solutionCompany(companyCode) }}
  161 + </a-tag>
  162 + </span>
  163 +
  164 + <span slot="zoneCode" slot-scope="zoneCode">
  165 + <a-tag :key="zoneCode" color=blue>
  166 + {{ solutionZoneCode(zoneCode) }}
  167 + </a-tag>
  168 + </span>
  169 +
151 170 <template slot="htmlSlot" slot-scope="text">
152 171 <div v-html="text"></div>
153 172 </template>
... ... @@ -182,10 +201,11 @@
182 201  
183 202 <script>
184 203 import '@/assets/less/TableExpand.less'
185   -import { mixinDevice } from '@/utils/mixin'
186   -import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  204 +import {mixinDevice} from '@/utils/mixin'
  205 +import {JeecgListMixin} from '@/mixins/JeecgListMixin'
187 206 import SimpleInventoryDetailModal from './modules/SimpleInventoryDetailModal'
188   -import { filterMultiDictText } from '@/components/dict/JDictSelectUtil'
  207 +import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
  208 +import {getCompanyList, getZoneList} from "@api/api";
189 209  
190 210 export default {
191 211 name: 'InventoryDetailList',
... ... @@ -195,6 +215,8 @@ export default {
195 215 },
196 216 data() {
197 217 return {
  218 + zoneList: [],
  219 + companyList: [],
198 220 description: '库存详情管理页面',
199 221 // 表头
200 222 columns: [
... ... @@ -204,19 +226,23 @@ export default {
204 226 key: 'rowIndex',
205 227 width: 60,
206 228 align: 'center',
207   - customRender: function(t, r, index) {
  229 + customRender: function (t, r, index) {
208 230 return parseInt(index) + 1
209 231 }
210 232 },
211 233 {
212 234 title: '货主',
213 235 align: 'center',
214   - dataIndex: 'companyCode'
  236 + dataIndex: 'companyCode',
  237 + key: 'companyCode',
  238 + scopedSlots: {customRender: 'companyCode'}
215 239 },
216 240 {
217 241 title: '库区',
218   - align: 'center',
219   - dataIndex: 'zoneCode'
  242 + align: "center",
  243 + dataIndex: 'zoneCode',
  244 + key: 'zoneCode',
  245 + scopedSlots: {customRender: 'zoneCode'}
220 246 },
221 247 {
222 248 title: '容器编码',
... ... @@ -269,7 +295,8 @@ export default {
269 295 {
270 296 title: '库存状态',
271 297 align: 'center',
272   - dataIndex: 'inventoryStatus_dictText'
  298 + dataIndex: 'inventoryStatus_dictText',
  299 + scopedSlots: {customRender: 'inventoryStatus_dictText'}
273 300 },
274 301 {
275 302 title: '批次',
... ... @@ -317,7 +344,7 @@ export default {
317 344 align: 'center',
318 345 fixed: 'right',
319 346 width: 147,
320   - scopedSlots: { customRender: 'action' }
  347 + scopedSlots: {customRender: 'action'}
321 348 }
322 349 ],
323 350 url: {
... ... @@ -332,36 +359,81 @@ export default {
332 359 }
333 360 },
334 361 created() {
  362 + this.loadFrom()
335 363 this.getSuperFieldList()
336 364 },
337 365 computed: {
338   - importExcelUrl: function() {
  366 + importExcelUrl: function () {
339 367 return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
340 368 }
341 369 },
342 370 methods: {
343   - initDictConfig() {},
  371 + getStatusColor(status) {
  372 + const colors = {
  373 + '良品': 'green',
  374 + '报废品': 'purple',
  375 + '待确认 ': 'grey',
  376 + '次品': 'red',
  377 + default: 'blue'
  378 + };
  379 + return colors[status] || colors.default;
  380 + },
  381 + loadFrom() {
  382 + getZoneList().then((res) => {
  383 + if (res.success) {
  384 + this.zoneList = res.result
  385 + }
  386 + });
  387 + getCompanyList().then(res => {
  388 + if (res.success) {
  389 + this.companyList = res.result
  390 + }
  391 + })
  392 + },
  393 +
  394 + solutionCompany(value) {
  395 + var actions = []
  396 + Object.keys(this.companyList).some(key => {
  397 + if (this.companyList[key].code == '' + value) {
  398 + actions.push(this.companyList[key].name)
  399 + return true
  400 + }
  401 + })
  402 + return actions.join('')
  403 + },
  404 + solutionZoneCode(value) {
  405 + var actions = []
  406 + Object.keys(this.zoneList).some((key) => {
  407 + if (this.zoneList[key].code == ('' + value)) {
  408 + actions.push(this.zoneList[key].name)
  409 + return true
  410 + }
  411 + })
  412 + return actions.join('')
  413 + },
  414 + initDictConfig() {
  415 + },
344 416 getSuperFieldList() {
345 417 let fieldList = []
346   - fieldList.push({ type: 'string', value: 'companyCode', text: '货主', dictCode: '' })
347   - fieldList.push({ type: 'string', value: 'zoneCode', text: '库区', dictCode: '' })
348   - fieldList.push({ type: 'string', value: 'containerCode', text: '容器编码', dictCode: '' })
349   - fieldList.push({ type: 'string', value: 'locationCode', text: '库位编码', dictCode: '' })
350   - fieldList.push({ type: 'string', value: 'materialCode', text: '物料编码', dictCode: '' })
351   - fieldList.push({ type: 'string', value: 'materialName', text: '物料名称', dictCode: '' })
352   - fieldList.push({ type: 'string', value: 'materialSpec', text: '物料规格', dictCode: '' })
353   - fieldList.push({ type: 'string', value: 'materialUnit', text: '物料单位', dictCode: '' })
354   - fieldList.push({ type: 'BigDecimal', value: 'qty', text: '数量', dictCode: '' })
355   - fieldList.push({ type: 'BigDecimal', value: 'taskQty', text: '任务锁定数量', dictCode: '' })
356   - fieldList.push({ type: 'string', value: 'inventoryStatus', text: '库存状态', dictCode: 'inventory_status' })
357   - fieldList.push({ type: 'string', value: 'batch', text: '批次', dictCode: '' })
  418 + fieldList.push({type: 'string', value: 'companyCode', text: '货主', dictCode: ''})
  419 + fieldList.push({type: 'string', value: 'zoneCode', text: '库区', dictCode: ''})
  420 + fieldList.push({type: 'string', value: 'containerCode', text: '容器编码', dictCode: ''})
  421 + fieldList.push({type: 'string', value: 'locationCode', text: '库位编码', dictCode: ''})
  422 + fieldList.push({type: 'string', value: 'materialCode', text: '物料编码', dictCode: ''})
  423 + fieldList.push({type: 'string', value: 'materialName', text: '物料名称', dictCode: ''})
  424 + fieldList.push({type: 'string', value: 'materialSpec', text: '物料规格', dictCode: ''})
  425 + fieldList.push({type: 'string', value: 'materialUnit', text: '物料单位', dictCode: ''})
  426 + fieldList.push({type: 'BigDecimal', value: 'qty', text: '数量', dictCode: ''})
  427 + fieldList.push({type: 'BigDecimal', value: 'taskQty', text: '任务锁定数量', dictCode: ''})
  428 + fieldList.push({type: 'string', value: 'inventoryStatus', text: '库存状态', dictCode: 'inventory_status'})
  429 + fieldList.push({type: 'string', value: 'batch', text: '批次', dictCode: ''})
358 430 // fieldList.push({type:'string',value:'uniqueCode',text:'唯一号',dictCode:''})
359   - fieldList.push({ type: 'datetime', value: 'receiptDate', text: '入库日期' })
360   - fieldList.push({ type: 'int', value: 'inventoryAge', text: '库龄(天)', dictCode: '' })
361   - fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' })
362   - fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' })
363   - fieldList.push({ type: 'string', value: 'updateBy', text: '更新人', dictCode: '' })
364   - fieldList.push({ type: 'datetime', value: 'updateTime', text: '更新日期' })
  431 + fieldList.push({type: 'datetime', value: 'receiptDate', text: '入库日期'})
  432 + fieldList.push({type: 'int', value: 'inventoryAge', text: '库龄(天)', dictCode: ''})
  433 + fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''})
  434 + fieldList.push({type: 'datetime', value: 'createTime', text: '创建日期'})
  435 + fieldList.push({type: 'string', value: 'updateBy', text: '更新人', dictCode: ''})
  436 + fieldList.push({type: 'datetime', value: 'updateTime', text: '更新日期'})
365 437 this.superFieldList = fieldList
366 438 }
367 439 }
... ...
ant-design-vue-jeecg/src/views/system/inventory/subTables/InventoryDetailSubTable.vue
... ... @@ -47,6 +47,12 @@
47 47 :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
48 48 @change="handleTableChange">
49 49  
  50 + <span slot="inventoryStatus_dictText" slot-scope="inventoryStatus_dictText">
  51 + <a-tag :key="inventoryStatus_dictText" :color="getStatusColor(inventoryStatus_dictText)">
  52 + {{ inventoryStatus_dictText }}
  53 + </a-tag>
  54 + </span>
  55 +
50 56 <span slot="companyCode" slot-scope="companyCode">
51 57 <a-tag :key="companyCode" color=blue>
52 58 {{ solutionCompany(companyCode) }}
... ... @@ -181,6 +187,7 @@ export default {
181 187 title: '库存状态',
182 188 align: "center",
183 189 dataIndex: 'inventoryStatus_dictText',
  190 + scopedSlots: {customRender: 'inventoryStatus_dictText'}
184 191 },
185 192 {
186 193 title: '批次',
... ... @@ -249,6 +256,16 @@ export default {
249 256 }
250 257 },
251 258 methods: {
  259 + getStatusColor(status) {
  260 + const colors = {
  261 + '良品': 'green',
  262 + '报废品': 'purple',
  263 + '待确认 ': 'grey',
  264 + '次品': 'red',
  265 + default: 'blue'
  266 + };
  267 + return colors[status] || colors.default;
  268 + },
252 269 loadFrom() {
253 270 getCompanyList().then((res) => {
254 271 if (res.success) {
... ...
ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue
... ... @@ -112,14 +112,14 @@
112 112 </a-button>
113 113 </template>
114 114 <span slot="action" slot-scope="text, record">
115   - <a v-if="record.status == 0 && record.taskType == 200" @click="selectFillPort(record)" v-has="'receiptContainerHeader:fill'">生成任务<a-divider type="vertical"/></a>
116   - <a v-else-if="record.status == 0" @click="selectContainerStatus(record)" v-has="'receiptContainerHeader:fill'">生成任务<a-divider type="vertical"/></a>
  115 + <a v-if="record.status == 0 && record.taskType == 200" @click="selectFillPort(record)" v-has="'receiptContainerHeader:fill'"><a-button type="primary">生成任务</a-button> <a-divider type="vertical"/></a>
  116 + <a v-else-if="record.status == 0" @click="selectContainerStatus(record)" v-has="'receiptContainerHeader:fill'"><a-button type="primary">生成任务</a-button> <a-divider type="vertical"/></a>
117 117 <!-- <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a>-->
118 118 <!-- <a v-else-if="record.status == 0" @click="createTask(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a>-->
119 119 <a-popconfirm v-if="record.status == 0" v-has="'receiptContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)">
120   - <a>取消配盘<a-divider type="vertical"/></a>
  120 + <a><a-button type="danger">取消配盘</a-button> <a-divider type="vertical"/></a>
121 121 </a-popconfirm>
122   - <a v-has="'receiptContainerHeader:edit'" @click="handleEdit(record)">编辑</a>
  122 + <a v-has="'receiptContainerHeader:edit'" @click="handleEdit(record)"><a-button type="default">编辑</a-button></a>
123 123 </span>
124 124 </a-table>
125 125 </div>
... ... @@ -274,9 +274,9 @@ export default {
274 274 getStatusColor(status) {
275 275 const colors = {
276 276 '新建': 'green',
277   - '生成任务': 'purple',
  277 + '生成任务': 'blue',
278 278 '上架完成': 'gray',
279   - default: 'default'
  279 + default: 'blue'
280 280 };
281 281 return colors[status] || colors.default;
282 282 },
... ...
ant-design-vue-jeecg/src/views/system/receipt/ReceiptDetailList.vue
... ... @@ -49,6 +49,12 @@
49 49 :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
50 50 @change="handleTableChange">
51 51  
  52 + <span slot="inventoryStatus_dictText" slot-scope="inventoryStatus_dictText">
  53 + <a-tag :key="inventoryStatus_dictText" :color="getStatusColor(inventoryStatus_dictText)">
  54 + {{ inventoryStatus_dictText }}
  55 + </a-tag>
  56 + </span>
  57 +
52 58 <template slot="htmlSlot" slot-scope="text">
53 59 <div v-html="text"></div>
54 60 </template>
... ... @@ -161,6 +167,7 @@ export default {
161 167 title: '库存状态',
162 168 align: "center",
163 169 dataIndex: 'inventoryStatus_dictText',
  170 + scopedSlots: {customRender: 'inventoryStatus_dictText'}
164 171 },
165 172 {
166 173 title: '批次',
... ... @@ -222,6 +229,16 @@ export default {
222 229 }
223 230 },
224 231 methods: {
  232 + getStatusColor(status) {
  233 + const colors = {
  234 + '良品': 'green',
  235 + '报废品': 'purple',
  236 + '待确认 ': 'grey',
  237 + '次品': 'red',
  238 + default: 'blue'
  239 + };
  240 + return colors[status] || colors.default;
  241 + },
225 242 clearList() {
226 243 this.dataSource = []
227 244 this.selectedRowKeys = []
... ...
ant-design-vue-jeecg/src/views/system/receipt/ReceiptHeaderHistoryList.vue
... ... @@ -344,13 +344,13 @@ export default {
344 344 getStatusColor(status) {
345 345 const colors = {
346 346 '新建': 'green',
347   - '收货': 'yellow',
  347 + '收货': 'Skyblue',
348 348 '等待上架': 'blue',
349   - '上架': 'orange',
  349 + '上架': 'darkorange',
350 350 '过账': 'purple',
351 351 '回传': 'grey',
352 352 '回传失败': 'red',
353   - default: 'default'
  353 + default: 'blue'
354 354 };
355 355 return colors[status] || colors.default;
356 356 },
... ...
ant-design-vue-jeecg/src/views/system/receipt/ReceiptHeaderList.vue
... ... @@ -177,10 +177,10 @@
177 177  
178 178 <span slot="action" slot-scope="text, record">
179 179 <a-popconfirm v-has="'receiptHeader:back'" v-if="record.lastStatus == 800" title="确定回传吗?" @confirm="() => hanleBack(record)">
180   - <a>回传<a-divider type="vertical"/></a>
  180 + <a><a-button type="default">回传</a-button><a-divider type="vertical"/></a>
181 181 </a-popconfirm>
182   - <a v-if="record.lastStatus < 800" @click="receive(record)" v-has="'receiptHeader:receive'">组盘<a-divider type="vertical"/></a>
183   - <a v-if="record.lastStatus == 850" @click="viewReason(record)">原因<a-divider type="vertical"/></a>
  182 + <a v-if="record.lastStatus < 800" @click="receive(record)" v-has="'receiptHeader:receive'"><a-button type="primary">组盘</a-button><a-divider type="vertical"/></a>
  183 + <a v-if="record.lastStatus == 850" @click="viewReason(record)"><a-button type="danger">原因</a-button><a-divider type="vertical"/></a>
184 184 <a-dropdown>
185 185 <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
186 186 <a-menu slot="overlay">
... ... @@ -194,6 +194,7 @@
194 194 </a-menu-item>
195 195 </a-menu>
196 196 </a-dropdown>
  197 +
197 198 </span>
198 199  
199 200 </a-table>
... ... @@ -376,13 +377,13 @@ export default {
376 377 getStatusColor(status) {
377 378 const colors = {
378 379 '新建': 'green',
379   - '收货': 'yellow',
  380 + '收货': 'Skyblue',
380 381 '等待上架': 'blue',
381   - '上架': 'orange',
  382 + '上架': 'darkorange',
382 383 '过账': 'purple',
383 384 '回传': 'grey',
384 385 '回传失败': 'red',
385   - default: 'default'
  386 + default: 'blue'
386 387 };
387 388 return colors[status] || colors.default;
388 389 },
... ...
ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerHeaderList.vue
... ... @@ -126,11 +126,11 @@
126 126 </template>
127 127  
128 128 <span slot="action" slot-scope="text, record">
129   - <a v-if="record.status == 0" @click="selectPort(record)">生成任务</a>
  129 + <a v-if="record.status == 0" @click="selectPort(record)"><a-button type="primary">生成任务</a-button> </a>
130 130 <a-popconfirm v-if="record.status == 0" v-has="'shipmentContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)">
131   - <a><a-divider type="vertical"/>取消配盘</a>
  131 + <a><a-divider type="vertical"/><a-button type="danger">取消配盘</a-button> </a>
132 132 </a-popconfirm>
133   - <a v-has="'receiptContainerHeader:edit'" @click="handleEdit(record)"><a-divider type="vertical"/>编辑</a>
  133 + <a v-has="'receiptContainerHeader:edit'" @click="handleEdit(record)"><a-divider type="vertical"/><a-button type="default">编辑</a-button></a>
134 134 </span>
135 135 </a-table>
136 136 </div>
... ... @@ -272,9 +272,9 @@ export default {
272 272 getStatusColor(status) {
273 273 const colors = {
274 274 '新建': 'green',
275   - '生成任务': 'purple',
  275 + '生成任务': 'blue',
276 276 '下架完成': 'gray',
277   - default: 'default'
  277 + default: 'blue'
278 278 };
279 279 return colors[status] || colors.default;
280 280 },
... ...
ant-design-vue-jeecg/src/views/system/shipment/ShipmentDetailList.vue
... ... @@ -48,6 +48,12 @@
48 48 :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
49 49 @change="handleTableChange">
50 50  
  51 + <span slot="inventoryStatus_dictText" slot-scope="inventoryStatus_dictText">
  52 + <a-tag :key="inventoryStatus_dictText" :color="getStatusColor(inventoryStatus_dictText)">
  53 + {{ inventoryStatus_dictText }}
  54 + </a-tag>
  55 + </span>
  56 +
51 57 <template slot="htmlSlot" slot-scope="text">
52 58 <div v-html="text"></div>
53 59 </template>
... ... @@ -70,13 +76,28 @@
70 76 </template>
71 77  
72 78 <span slot="action" slot-scope="text, record">
73   - <a @click="combine(record)">配盘</a>
74   - <a-divider type="vertical"/>
75   - <a v-has="'shipmentDetail:edit'" @click="edit(record)">编辑</a>
  79 + <a @click="combine(record)"><a-button type="primary">配盘</a-button></a>
76 80 <a-divider type="vertical"/>
77   - <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
78   - <a v-has="'shipmentDetail:delete'">删除</a>
79   - </a-popconfirm>
  81 +
  82 + <a-dropdown>
  83 + <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
  84 + <a-menu slot="overlay">
  85 + <a-menu-item v-has="'shipmentDetail:edit'">
  86 + <a @click="handleEdit(record)">编辑</a>
  87 + </a-menu-item>
  88 + <a-menu-item v-has="'shipmentDetail:delete'">
  89 + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  90 + <a>删除</a>
  91 + </a-popconfirm>
  92 + </a-menu-item>
  93 + </a-menu>
  94 + </a-dropdown>
  95 +
  96 +<!-- <a v-has="'shipmentDetail:edit'" @click="edit(record)">编辑</a>-->
  97 +<!-- <a-divider type="vertical"/>-->
  98 +<!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
  99 +<!-- <a v-has="'shipmentDetail:delete'">删除</a>-->
  100 +<!-- </a-popconfirm>-->
80 101 </span>
81 102  
82 103 </a-table>
... ... @@ -177,6 +198,7 @@ export default {
177 198 title: '库存状态',
178 199 align: "center",
179 200 dataIndex: 'inventoryStatus_dictText',
  201 + scopedSlots: {customRender: 'inventoryStatus_dictText'}
180 202 },
181 203 {
182 204 title: '批次',
... ... @@ -238,6 +260,16 @@ export default {
238 260 }
239 261 },
240 262 methods: {
  263 + getStatusColor(status) {
  264 + const colors = {
  265 + '良品': 'green',
  266 + '报废品': 'purple',
  267 + '待确认 ': 'grey',
  268 + '次品': 'red',
  269 + default: 'blue'
  270 + };
  271 + return colors[status] || colors.default;
  272 + },
241 273 clearList() {
242 274 this.dataSource = []
243 275 this.selectedRowKeys = []
... ...
ant-design-vue-jeecg/src/views/system/shipment/ShipmentHeaderHistoryList.vue
... ... @@ -373,13 +373,13 @@ export default {
373 373 getStatusColor(status) {
374 374 const colors = {
375 375 '新建': 'green',
376   - '出库组盘': 'yellow',
  376 + '出库组盘': 'Skyblue',
377 377 '等待下架': 'blue',
378   - '下架': 'orange',
  378 + '下架': 'darkorange',
379 379 '过账': 'purple',
380 380 '回传': 'grey',
381 381 '回传失败': 'red',
382   - default: 'default'
  382 + default: 'blue'
383 383 };
384 384 return colors[status] || colors.default;
385 385 },
... ...
ant-design-vue-jeecg/src/views/system/shipment/ShipmentHeaderList.vue
... ... @@ -190,9 +190,9 @@
190 190 </template>
191 191 <span slot="action" slot-scope="text, record">
192 192 <a-popconfirm v-has="'shipmentHeader:back'" v-if="record.lastStatus == 800" title="确定回传吗?" @confirm="() => hanleBack(record)">
193   - <a>回传<a-divider type="vertical"/></a>
  193 + <a><a-button type="default">回传</a-button><a-divider type="vertical"/></a>
194 194 </a-popconfirm>
195   - <a v-if="record.lastStatus < 800" @click="autoShipmentCombine(record)" v-has="'shipmentHeader:autoShipmentCombine'">自动配盘<a-divider type="vertical"/></a>
  195 + <a v-if="record.lastStatus < 800" @click="autoShipmentCombine(record)" v-has="'shipmentHeader:autoShipmentCombine'"><a-button type="primary">自动配盘</a-button> <a-divider type="vertical"/></a>
196 196 <a-dropdown>
197 197 <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
198 198 <a-menu slot="overlay">
... ... @@ -384,13 +384,13 @@ export default {
384 384 getStatusColor(status) {
385 385 const colors = {
386 386 '新建': 'green',
387   - '出库组盘': 'yellow',
  387 + '出库组盘': 'Skyblue',
388 388 '等待下架': 'blue',
389   - '下架': 'orange',
  389 + '下架': 'darkorange',
390 390 '过账': 'purple',
391 391 '回传': 'grey',
392 392 '回传失败': 'red',
393   - default: 'default'
  393 + default: 'blue'
394 394 };
395 395 return colors[status] || colors.default;
396 396 },
... ...
ant-design-vue-jeecg/src/views/system/task/AgvTaskList.vue
... ... @@ -111,12 +111,14 @@
111 111 </template>
112 112  
113 113 <span slot="action" slot-scope="text, record">
114   - <a v-if="record.status == 1" v-has="'agvTask:executeTask'" @click="executeAgvTask(record)">执行<a-divider
115   - type="vertical"/></a>
  114 + <a v-if="record.status == 1" v-has="'agvTask:executeTask'" @click="executeAgvTask(record)">
  115 + <a-button type="primary">执行</a-button><a-divider type="vertical"/></a>
  116 +
116 117 <a-popconfirm v-if="record.status < 100" title="确定删除吗?" v-has="'agvTask:delete'"
117 118 @confirm="() => handleDelete(record.id)">
118   - <a>删除 <a-divider type="vertical"/></a>
  119 + <a><a-button type="danger">取消</a-button> <a-divider type="vertical"/></a>
119 120 </a-popconfirm>
  121 +
120 122 <a-dropdown>
121 123 <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
122 124 <a-menu slot="overlay">
... ... @@ -261,7 +263,7 @@ export default {
261 263 '开始执行': 'orange',
262 264 '取货完成': 'purple',
263 265 '任务完成': 'grey',
264   - default: 'default'
  266 + default: 'blue'
265 267 };
266 268 return colors[status] || colors.default;
267 269 },
... ...
ant-design-vue-jeecg/src/views/system/task/CircleTaskHeaderList.vue
... ... @@ -148,14 +148,17 @@
148 148 </template>
149 149  
150 150 <span slot="action" slot-scope="text, record">
151   - <a v-if="record.status == 1" v-has="'taskHeader:executeTask'" @click="executeTask(record)">执行<a-divider type="vertical"/></a>
152   - <a v-if="record.isEmptyOut == 1 && record.exceptionState == 1" v-has="'taskHeader:handleEmptyOutTask'" @click="handleEmptyOutTask(record)">修复空出数据
  151 + <a v-if="record.status == 1" v-has="'taskHeader:executeTask'" @click="executeTask(record)"><a-button type="primary">执行</a-button> <a-divider type="vertical"/></a>
  152 + <a v-if="record.isEmptyOut == 1 && record.exceptionState == 1" v-has="'taskHeader:handleEmptyOutTask'" @click="handleEmptyOutTask(record)"><a-button type="danger">修复空出数据</a-button>
153 153 <a-divider type="vertical"/></a>
154   - <a v-if="record.isPickupError == 1 && record.exceptionState == 1" v-has="'taskHeader:handlePickupErrorTask'" @click="handlePickupErrorTask(record)">修复取货错数据
  154 + <a v-if="record.isPickupError == 1 && record.exceptionState == 1" v-has="'taskHeader:handlePickupErrorTask'" @click="handlePickupErrorTask(record)"><a-button type="danger">修复取货错数据</a-button>
155 155 <a-divider type="vertical"/></a>
156   - <a v-if="record.isDoubleIn == 1 && record.exceptionState == 1" v-has="'taskHeader:handleDoubleInTask'" @click="handleDoubleInTask(record)">修复重入数据
  156 + <a v-if="record.isDoubleIn == 1 && record.exceptionState == 1" v-has="'taskHeader:handleDoubleInTask'" @click="handleDoubleInTask(record)"><a-button type="danger">修复重入数据</a-button>
157 157 <a-divider type="vertical"/></a>
158   - <a v-if="record.status <= 10" v-has="'taskHeader:cancelTask'" @click="cancelTask(record)">取消</a>
  158 +
  159 + <a-popconfirm v-if="record.status <= 10" v-has="'taskHeader:cancelTask'" title="确定取消任务吗?" @confirm="() => cancelTask(record)">
  160 + <a-button type="danger">取消</a-button>
  161 + </a-popconfirm>
159 162 </span>
160 163 </a-table>
161 164 </div>
... ... @@ -275,6 +278,26 @@ export default {
275 278 dataIndex: 'updateTime'
276 279 },
277 280 {
  281 + title: '执行时间',
  282 + align: "center",
  283 + dataIndex: 'executeTime'
  284 + },
  285 + {
  286 + title: '库位分配时间',
  287 + align: "center",
  288 + dataIndex: 'allocationTime'
  289 + },
  290 + {
  291 + title: '到达分拣口时间',
  292 + align: "center",
  293 + dataIndex: 'arrivalTime'
  294 + },
  295 + {
  296 + title: '完成时间',
  297 + align: "center",
  298 + dataIndex: 'completeTime'
  299 + },
  300 + {
278 301 title: '操作',
279 302 dataIndex: 'action',
280 303 align: "center",
... ... @@ -328,7 +351,7 @@ export default {
328 351 '下发任务': 'blue',
329 352 '到达拣选站台': 'orange',
330 353 '任务完成': 'grey',
331   - default: 'default'
  354 + default: 'blue'
332 355 };
333 356 return colors[status] || colors.default;
334 357 },
... ...
ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue
... ... @@ -140,16 +140,16 @@
140 140 </template>
141 141  
142 142 <span slot="action" slot-scope="text, record">
143   - <a v-if="record.status == 1" v-has="'taskHeader:executeTask'" @click="executeTask(record)">执行<a-divider type="vertical"/></a>
144   - <a v-if="record.isEmptyOut == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handleEmptyOutTask(record)">修复空出数据
  143 + <a v-if="record.status == 1" v-has="'taskHeader:executeTask'" @click="executeTask(record)"><a-button type="primary">执行</a-button> <a-divider type="vertical"/></a>
  144 + <a v-if="record.isEmptyOut == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handleEmptyOutTask(record)"><a-button type="danger">修复空出数据</a-button>
145 145 <a-divider type="vertical"/></a>
146   - <a v-if="record.isPickupError == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handlePickupErrorTask(record)">修复取货错数据
  146 + <a v-if="record.isPickupError == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handlePickupErrorTask(record)"><a-button type="danger">修复取货错数据</a-button>
147 147 <a-divider type="vertical"/></a>
148   - <a v-if="record.isDoubleIn == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handleDoubleInTask(record)">修复重入数据
  148 + <a v-if="record.isDoubleIn == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handleDoubleInTask(record)"><a-button type="danger">修复重入数据</a-button>
149 149 <a-divider type="vertical"/></a>
150   -<!-- <a v-if="record.status <= 10" v-has="'taskHeader:cancelTask'" @click="cancelTask(record)" >取消</a>-->
  150 + <!-- <a v-if="record.status <= 10" v-has="'taskHeader:cancelTask'" @click="cancelTask(record)" >取消</a>-->
151 151 <a-popconfirm v-if="record.status <= 10" v-has="'taskHeader:cancelTask'" title="确定取消任务吗?" @confirm="() => cancelTask(record)">
152   - <a>取消</a>
  152 + <a-button type="danger">取消</a-button>
153 153 </a-popconfirm>
154 154 </span>
155 155  
... ... @@ -273,6 +273,26 @@ export default {
273 273 dataIndex: 'updateTime'
274 274 },
275 275 {
  276 + title: '执行时间',
  277 + align: "center",
  278 + dataIndex: 'executeTime'
  279 + },
  280 + {
  281 + title: '库位分配时间',
  282 + align: "center",
  283 + dataIndex: 'allocationTime'
  284 + },
  285 + {
  286 + title: '到达分拣口时间',
  287 + align: "center",
  288 + dataIndex: 'arrivalTime'
  289 + },
  290 + {
  291 + title: '完成时间',
  292 + align: "center",
  293 + dataIndex: 'completeTime'
  294 + },
  295 + {
276 296 title: '操作',
277 297 dataIndex: 'action',
278 298 align: "center",
... ... @@ -327,7 +347,7 @@ export default {
327 347 '下发任务': 'blue',
328 348 '到达拣选站台': 'orange',
329 349 '任务完成': 'grey',
330   - default: 'default'
  350 + default: 'blue'
331 351 };
332 352 return colors[status] || colors.default;
333 353 },
... ...
ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue
... ... @@ -141,16 +141,16 @@
141 141 </template>
142 142  
143 143 <span slot="action" slot-scope="text, record">
144   - <a v-if="record.status == 1" v-has="'taskHeader:executeTask'" @click="executeTask(record)">执行
  144 + <a v-if="record.status == 1" v-has="'taskHeader:executeTask'" @click="executeTask(record)"><a-button type="primary">执行</a-button>
145 145 <a-divider type="vertical"/></a>
146   - <a v-if="record.isEmptyOut == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handleEmptyOutTask(record)">修复空出数据
  146 + <a v-if="record.isEmptyOut == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handleEmptyOutTask(record)"><a-button type="danger">修复空出数据</a-button>
147 147 <a-divider type="vertical"/></a>
148   - <a v-if="record.isPickupError == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handlePickupErrorTask(record)">修复取货错数据
  148 + <a v-if="record.isPickupError == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handlePickupErrorTask(record)"><a-button type="danger">修复取货错数据</a-button>
149 149 <a-divider type="vertical"/></a>
150   - <a v-if="record.isDoubleIn == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handleDoubleInTask(record)">修复重入数据
  150 + <a v-if="record.isDoubleIn == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handleDoubleInTask(record)"><a-button type="danger">修复重入数据</a-button>
151 151 <a-divider type="vertical"/></a>
152 152 <a-popconfirm v-if="record.status <= 10" v-has="'taskHeader:cancelTask'" title="确定取消任务吗?" @confirm="() => cancelTask(record)">
153   - <a>取消</a>
  153 + <a-button type="danger">取消</a-button>
154 154 </a-popconfirm>
155 155 </span>
156 156  
... ... @@ -273,6 +273,26 @@ export default {
273 273 dataIndex: 'updateTime'
274 274 },
275 275 {
  276 + title: '执行时间',
  277 + align: "center",
  278 + dataIndex: 'executeTime'
  279 + },
  280 + {
  281 + title: '库位分配时间',
  282 + align: "center",
  283 + dataIndex: 'allocationTime'
  284 + },
  285 + {
  286 + title: '到达分拣口时间',
  287 + align: "center",
  288 + dataIndex: 'arrivalTime'
  289 + },
  290 + {
  291 + title: '完成时间',
  292 + align: "center",
  293 + dataIndex: 'completeTime'
  294 + },
  295 + {
276 296 title: '操作',
277 297 dataIndex: 'action',
278 298 align: "center",
... ... @@ -326,7 +346,7 @@ export default {
326 346 '下发任务': 'blue',
327 347 '到达拣选站台': 'orange',
328 348 '任务完成': 'grey',
329   - default: 'default'
  349 + default: 'blue'
330 350 };
331 351 return colors[status] || colors.default;
332 352 },
... ...
ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue
... ... @@ -146,14 +146,14 @@
146 146 </template>
147 147  
148 148 <span slot="action" slot-scope="text, record">
149   - <a v-if="record.status == 1" v-has="'taskHeader:executeTask'" @click="executeTask(record)">执行<a-divider type="vertical"/></a>
150   - <a v-if="record.isEmptyOut == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handleEmptyOutTask(record)">修复空出数据
  149 + <a v-if="record.status == 1" v-has="'taskHeader:executeTask'" @click="executeTask(record)"><a-button type="primary">执行</a-button> <a-divider type="vertical"/></a>
  150 + <a v-if="record.isEmptyOut == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handleEmptyOutTask(record)"><a-button type="danger">修复空出数据</a-button>
151 151 <a-divider type="vertical"/></a>
152   - <a v-if="record.isPickupError == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handlePickupErrorTask(record)">修复取货错数据
  152 + <a v-if="record.isPickupError == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handlePickupErrorTask(record)"><a-button type="danger">修复取货错数据</a-button>
153 153 <a-divider type="vertical"/></a>
154   - <a v-if="record.isDoubleIn == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handleDoubleInTask(record)">修复重入数据
  154 + <a v-if="record.isDoubleIn == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handleDoubleInTask(record)"><a-button type="danger">修复重入数据</a-button>
155 155 <a-divider type="vertical"/></a>
156   - <a v-if="record.status <= 10" v-has="'taskHeader:cancelTask'" @click="cancelTask(record)">取消<a-divider type="vertical"/></a>
  156 + <a v-if="record.status <= 10" v-has="'taskHeader:cancelTask'" @click="cancelTask(record)"><a-button type="danger">取消</a-button> <a-divider type="vertical"/></a>
157 157 </span>
158 158  
159 159 </a-table>
... ... @@ -281,6 +281,26 @@ export default {
281 281 dataIndex: 'updateTime'
282 282 },
283 283 {
  284 + title: '执行时间',
  285 + align: "center",
  286 + dataIndex: 'executeTime'
  287 + },
  288 + {
  289 + title: '库位分配时间',
  290 + align: "center",
  291 + dataIndex: 'allocationTime'
  292 + },
  293 + {
  294 + title: '到达分拣口时间',
  295 + align: "center",
  296 + dataIndex: 'arrivalTime'
  297 + },
  298 + {
  299 + title: '完成时间',
  300 + align: "center",
  301 + dataIndex: 'completeTime'
  302 + },
  303 + {
284 304 title: '操作',
285 305 dataIndex: 'action',
286 306 align: "center",
... ... @@ -334,7 +354,7 @@ export default {
334 354 '下发任务': 'blue',
335 355 '到达拣选站台': 'orange',
336 356 '任务完成': 'grey',
337   - default: 'default'
  357 + default: 'blue'
338 358 };
339 359 return colors[status] || colors.default;
340 360 },
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/erp/controller/ErpController.java
... ... @@ -4,19 +4,11 @@ import javax.annotation.Resource;
4 4 import javax.servlet.http.HttpServletRequest;
5 5  
6 6 import org.jeecg.common.api.vo.Result;
7   -import org.jeecg.modules.wms.api.erp.entity.ErpCancel;
8   -import org.jeecg.modules.wms.api.erp.entity.ErpMaterial;
9   -import org.jeecg.modules.wms.api.erp.entity.ErpReceipt;
10   -import org.jeecg.modules.wms.api.erp.entity.ErpShipment;
11   -import org.jeecg.modules.wms.api.erp.entity.InventoryQueryParam;
  7 +import org.jeecg.modules.wms.api.erp.entity.*;
12 8 import org.jeecg.modules.wms.api.erp.service.IErpService;
13 9 import org.jeecg.modules.wms.framework.controller.HuahengBaseController;
14 10 import org.jeecg.utils.support.ApiLogger;
15   -import org.springframework.web.bind.annotation.PostMapping;
16   -import org.springframework.web.bind.annotation.RequestBody;
17   -import org.springframework.web.bind.annotation.RequestMapping;
18   -import org.springframework.web.bind.annotation.ResponseBody;
19   -import org.springframework.web.bind.annotation.RestController;
  11 +import org.springframework.web.bind.annotation.*;
20 12  
21 13 import io.swagger.annotations.Api;
22 14 import io.swagger.annotations.ApiOperation;
... ... @@ -32,6 +24,14 @@ public class ErpController extends HuahengBaseController {
32 24 @Resource
33 25 private IErpService erpService;
34 26  
  27 + @PostMapping("/addMaterial")
  28 + @ResponseBody
  29 + @ApiOperation("增加物料")
  30 + @ApiLogger(apiName = "增加物料", from = "ERP")
  31 + public Result addMaterial(@RequestBody ErpMaterial erpMaterial) {
  32 + return erpService.addMaterial(erpMaterial);
  33 + }
  34 +
35 35 @PostMapping("/receipt")
36 36 @ResponseBody
37 37 @ApiOperation("入库单下发")
... ... @@ -77,12 +77,4 @@ public class ErpController extends HuahengBaseController {
77 77 return result;
78 78 }
79 79  
80   - @PostMapping("/addMaterial")
81   - @ResponseBody
82   - @ApiOperation("增加物料")
83   - @ApiLogger(apiName = "增加物料", from = "ERP")
84   - public Result addMaterial(@RequestBody ErpMaterial erpMaterial) {
85   - return erpService.addMaterial(erpMaterial);
86   - }
87   -
88 80 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mobile/entity/CallBoxBean.java
... ... @@ -3,6 +3,9 @@ package org.jeecg.modules.wms.api.mobile.entity;
3 3 import io.swagger.annotations.ApiModelProperty;
4 4 import lombok.Data;
5 5  
  6 +/**
  7 + * @author 游杰
  8 + */
6 9 @Data
7 10 public class CallBoxBean {
8 11 @ApiModelProperty(value = "托盘号", required = true)
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/controller/WcsController.java
... ... @@ -171,7 +171,13 @@ public class WcsController extends HuahengBaseController {
171 171 @ApiOperation("设置物料信息")
172 172 @ApiLogger(apiName = "WCS设置物料信息", from = "WCS")
173 173 public Result setMaterialInfo(@RequestBody MaterialInfoEntity materialInfoEntity) {
174   - Result result = wcsService.setMaterialInfo(materialInfoEntity);
  174 + Result result = handleMultiProcess("setMaterialInfo", new MultiProcessListener() {
  175 + @Override
  176 + public Result<?> doProcess() {
  177 + Result result = wcsService.setMaterialInfo(materialInfoEntity);
  178 + return result;
  179 + }
  180 + });
175 181 return result;
176 182 }
177 183  
... ... @@ -184,7 +190,13 @@ public class WcsController extends HuahengBaseController {
184 190 public Result arrivedNotice(@RequestBody ArriveEntity arriveEntity) {
185 191 String taskNo = arriveEntity.getTaskNo();
186 192 String port = arriveEntity.getPort();
187   - Result result = wcsService.arrivedNotice(taskNo, port);
  193 + Result result = handleMultiProcess("arrivedNotice", new MultiProcessListener() {
  194 + @Override
  195 + public Result<?> doProcess() {
  196 + Result result = wcsService.arrivedNotice(taskNo, port);
  197 + return result;
  198 + }
  199 + });
188 200 return result;
189 201 }
190 202  
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java
... ... @@ -2,6 +2,7 @@ package org.jeecg.modules.wms.api.wcs.service;
2 2  
3 3 import java.net.SocketException;
4 4 import java.util.ArrayList;
  5 +import java.util.Date;
5 6 import java.util.List;
6 7 import java.util.stream.Collectors;
7 8  
... ... @@ -257,6 +258,7 @@ public class WcsServiceImpl implements WcsService {
257 258 taskHeader.setZoneCode(location.getZoneCode());
258 259 taskHeader.setRoadWay(location.getRoadWay());
259 260 taskHeader.setPreTaskNo(preTaskNo);
  261 + taskHeader.setAllocationTime(new Date());
260 262 taskHeader.setWeight(Integer.parseInt(warecellDomain.getWeight()));
261 263 taskHeader.setToLocationCode(locationCode);
262 264 if (!taskHeaderService.updateById(taskHeader)) {
... ... @@ -703,6 +705,10 @@ public class WcsServiceImpl implements WcsService {
703 705 if (status == QuantityConstant.TASK_STATUS_COMPLETED) {
704 706 return Result.error("任务已经完成taskNo:" + taskNo);
705 707 }
  708 + int taskId = taskHeader.getId();
  709 + taskHeader = new TaskHeader();
  710 + taskHeader.setId(taskId);
  711 + taskHeader.setArrivalTime(new Date());
706 712 taskHeader.setStatus(QuantityConstant.TASK_STATUS_ARRIVED_STATION);
707 713 taskHeader.setToPortCode(port);
708 714 boolean result = taskHeaderService.updateById(taskHeader);
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/parameterConfiguration/service/IParameterConfigurationService.java
1 1 package org.jeecg.modules.wms.config.parameterConfiguration.service;
2 2  
3   -import com.baomidou.mybatisplus.extension.service.IService;
4 3 import org.jeecg.modules.wms.config.parameterConfiguration.entity.ParameterConfiguration;
5 4  
  5 +import com.baomidou.mybatisplus.extension.service.IService;
  6 +
6 7 /**
7 8 * @Description: 参数配置
8 9 * @Author: jeecg-boot
... ... @@ -11,5 +12,7 @@ import org.jeecg.modules.wms.config.parameterConfiguration.entity.ParameterConfi
11 12 */
12 13 public interface IParameterConfigurationService extends IService<ParameterConfiguration> {
13 14  
14   - public String getValueByCode(String code);
  15 + String getValueByCode(String code);
  16 +
  17 + int getValueIntByCode(String code);
15 18 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/parameterConfiguration/service/impl/ParameterConfigurationServiceImpl.java
1 1 package org.jeecg.modules.wms.config.parameterConfiguration.service.impl;
2 2  
3   -import com.baomidou.mybatisplus.core.conditions.Wrapper;
4   -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
5   -import com.baomidou.mybatisplus.core.toolkit.Wrappers;
6 3 import org.jeecg.modules.wms.config.parameterConfiguration.entity.ParameterConfiguration;
7 4 import org.jeecg.modules.wms.config.parameterConfiguration.mapper.ParameterConfigurationMapper;
8 5 import org.jeecg.modules.wms.config.parameterConfiguration.service.IParameterConfigurationService;
9 6 import org.springframework.stereotype.Service;
10 7  
  8 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  9 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
11 10 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
12 11  
13 12 /**
... ... @@ -30,4 +29,17 @@ public class ParameterConfigurationServiceImpl extends ServiceImpl&lt;ParameterConf
30 29 String value = parameterConfiguration.getValue();
31 30 return value;
32 31 }
  32 +
  33 + @Override
  34 + public int getValueIntByCode(String code) {
  35 + LambdaQueryWrapper<ParameterConfiguration> parameterConfigurationLambdaQueryWrapper = Wrappers.lambdaQuery();
  36 + parameterConfigurationLambdaQueryWrapper.eq(ParameterConfiguration::getCode, code);
  37 + ParameterConfiguration parameterConfiguration = getOne(parameterConfigurationLambdaQueryWrapper);
  38 + if (parameterConfiguration == null) {
  39 + return 0;
  40 + }
  41 + String value = parameterConfiguration.getValue();
  42 + int valueInt = Integer.parseInt(value);
  43 + return valueInt;
  44 + }
33 45 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/IInventoryDetailService.java
... ... @@ -50,4 +50,5 @@ public interface IInventoryDetailService extends IService&lt;InventoryDetail&gt; {
50 50  
51 51 boolean updateQtyAndTaskQtyAndLocationCode(BigDecimal qty, BigDecimal taskQty, String locationCode, int id);
52 52  
  53 + boolean updateBatchLocationCodeById(List<InventoryDetail> inventoryDetailList);
53 54 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryDetailServiceImpl.java
... ... @@ -2,6 +2,7 @@ package org.jeecg.modules.wms.inventory.inventoryHeader.service.impl;
2 2  
3 3 import java.math.BigDecimal;
4 4 import java.math.RoundingMode;
  5 +import java.util.ArrayList;
5 6 import java.util.List;
6 7 import java.util.Map;
7 8 import java.util.function.Function;
... ... @@ -131,6 +132,19 @@ public class InventoryDetailServiceImpl extends ServiceImpl&lt;InventoryDetailMappe
131 132 return success;
132 133 }
133 134  
  135 + @Override
  136 + public boolean updateBatchLocationCodeById(List<InventoryDetail> inventoryDetailList) {
  137 + List<InventoryDetail> inventoryDetailList1 = new ArrayList<>();
  138 + for (InventoryDetail inventoryDetail : inventoryDetailList) {
  139 + InventoryDetail inventoryDetail1 = new InventoryDetail();
  140 + inventoryDetail1.setId(inventoryDetail.getId());
  141 + inventoryDetail1.setLocationCode(inventoryDetail.getLocationCode());
  142 + inventoryDetailList1.add(inventoryDetail1);
  143 + }
  144 + boolean success = this.updateBatchById(inventoryDetailList1);
  145 + return success;
  146 + }
  147 +
134 148 /**
135 149 * 计算库存明细托盘填充度
136 150 * @author TanYibin
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryTransaction/entity/InventoryTransaction.java
1 1 package org.jeecg.modules.wms.inventory.inventoryTransaction.entity;
2 2  
3 3 import java.io.Serializable;
4   -import java.io.UnsupportedEncodingException;
5   -import java.util.Date;
6 4 import java.math.BigDecimal;
  5 +import java.util.Date;
  6 +
  7 +import org.jeecg.common.aspect.annotation.Dict;
  8 +import org.jeecgframework.poi.excel.annotation.Excel;
  9 +
7 10 import com.baomidou.mybatisplus.annotation.IdType;
8 11 import com.baomidou.mybatisplus.annotation.TableId;
9 12 import com.baomidou.mybatisplus.annotation.TableName;
10   -import lombok.Data;
11   -import com.fasterxml.jackson.annotation.JsonFormat;
12   -import org.springframework.format.annotation.DateTimeFormat;
13   -import org.jeecgframework.poi.excel.annotation.Excel;
14   -import org.jeecg.common.aspect.annotation.Dict;
  13 +
15 14 import io.swagger.annotations.ApiModel;
16 15 import io.swagger.annotations.ApiModelProperty;
  16 +import lombok.Data;
17 17 import lombok.EqualsAndHashCode;
18 18 import lombok.experimental.Accessors;
19 19  
... ... @@ -109,6 +109,10 @@ public class InventoryTransaction implements Serializable {
109 109 @Excel(name = "数量", width = 15)
110 110 @ApiModelProperty(value = "数量")
111 111 private BigDecimal qty;
  112 + /** 库存数量 */
  113 + @Excel(name = "库存数量", width = 15)
  114 + @ApiModelProperty(value = "库存数量")
  115 + private BigDecimal inventoryQty;
112 116 /** 批次 */
113 117 @Excel(name = "批次", width = 15)
114 118 @ApiModelProperty(value = "批次")
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/entity/TaskHeader.java
... ... @@ -168,4 +168,16 @@ public class TaskHeader implements Serializable {
168 168 /** 更新日期 */
169 169 @ApiModelProperty(value = "更新日期")
170 170 private Date updateTime;
  171 + /** 执行时间(下发任务时间) */
  172 + @ApiModelProperty(value = "执行时间")
  173 + private Date executeTime;
  174 + /** 分配时间 */
  175 + @ApiModelProperty(value = "分配时间")
  176 + private Date allocationTime;
  177 + /** 到达时间(到达拣选台时间) */
  178 + @ApiModelProperty(value = "到达时间")
  179 + private Date arrivalTime;
  180 + /** 完成时间(完成任务时间) */
  181 + @ApiModelProperty(value = "完成时间")
  182 + private Date completeTime;
171 183 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
... ... @@ -62,10 +62,10 @@ import org.jeecg.utils.StringUtils;
62 62 import org.jeecg.utils.constant.QuantityConstant;
63 63 import org.springframework.beans.factory.annotation.Autowired;
64 64 import org.springframework.stereotype.Service;
  65 +import org.springframework.transaction.annotation.Propagation;
65 66 import org.springframework.transaction.annotation.Transactional;
66 67  
67 68 import com.alibaba.fastjson.JSON;
68   -import com.aliyun.oss.ServiceException;
69 69 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
70 70 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
71 71 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
... ... @@ -867,7 +867,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
867 867 }
868 868  
869 869 @Override
870   - @Transactional(rollbackFor = Exception.class)
  870 + @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW)
871 871 public Result sendTaskToWcs(Integer taskId) {
872 872 TaskHeader taskHeader = taskHeaderService.getById(taskId);
873 873 if (taskHeader == null) {
... ... @@ -1011,11 +1011,25 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1011 1011 return Result.ok("入库任务(" + taskHeader.getId() + ")已经是完成的!");
1012 1012 }
1013 1013 if (taskDetailList.isEmpty()) {
1014   - throw new JeecgBootException("完成入库任务时, 入库任务明细为空");
  1014 + int allow = parameterConfigurationService.getValueIntByCode(QuantityConstant.RULE_CALL_BOX_ALLOW_EMPTY);
  1015 + if (allow == QuantityConstant.RULE_ALLOW_EMPTY) {
  1016 + Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), taskType, containerCode,
  1017 + fromLocationCode, toLocationCode, warehouseCode);
  1018 + if (!result.isSuccess()) {
  1019 + throw new JeecgBootException(result.getMessage());
  1020 + }
  1021 + success = taskHeaderService.updateStatusById(QuantityConstant.TASK_STATUS_COMPLETED, taskHeader.getId());
  1022 + if (!success) {
  1023 + throw new JeecgBootException("完成入库任务时,保存任务头失败");
  1024 + }
  1025 + return Result.ok("完成入库任务");
  1026 + } else {
  1027 + return Result.error("完成入库任务时, 入库任务明细为空");
  1028 + }
1015 1029 }
1016 1030 Location toLocation = locationService.getLocationByCode(toLocationCode, warehouseCode);
1017 1031 if (toLocation == null) {
1018   - throw new JeecgBootException("完成入库任务时,没有找到目的库位");
  1032 + return Result.error("完成入库任务时,没有找到目的库位");
1019 1033 }
1020 1034 InventoryHeader inventoryHeader = inventoryHeaderService.getInventoryHeaderByContainerCode(containerCode, warehouseCode);
1021 1035 if (inventoryHeader != null) {
... ... @@ -1034,7 +1048,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1034 1048 inventoryDetailList1.add(inventoryDetail1);
1035 1049 }
1036 1050 if (!inventoryDetailService.updateBatchById(inventoryDetailList1)) {
1037   - throw new ServiceException("完成入库任务时,更新库存详情失败");
  1051 + throw new JeecgBootException("完成入库任务时,更新库存详情失败");
1038 1052 }
1039 1053 }
1040 1054 }
... ... @@ -1115,8 +1129,13 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1115 1129 inventoryTransaction.setProject(taskDetail.getProject());
1116 1130 inventoryTransaction.setInventoryStatus(taskDetail.getInventoryStatus());
1117 1131 inventoryTransaction.setQty(receiptQty);
  1132 + // 获得库存数量
  1133 + BigDecimal inventoryQty = inventoryDetailService.getSumQty(inventoryDetail);
  1134 + inventoryQty = inventoryQty.add(receiptQty);
  1135 + inventoryTransaction.setInventoryQty(inventoryQty);
1118 1136 inventoryTransactionList.add(inventoryTransaction);
1119 1137 }
  1138 +
1120 1139 success = receiptContainerHeaderService.updateStatusById(QuantityConstant.RECEIPT_CONTAINER_FINISHED, taskHeader.getReceiptContainerHeaderId());
1121 1140 if (!success) {
1122 1141 throw new JeecgBootException("完成入库任务时,更新入库组盘头表状态失败");
... ... @@ -1129,14 +1148,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1129 1148 if (!success) {
1130 1149 throw new JeecgBootException("完成入库任务时,保存库存交易失败");
1131 1150 }
1132   -
1133   - Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), taskType, containerCode, fromLocationCode,
1134   - toLocationCode, warehouseCode);
1135   - if (!result.isSuccess()) {
1136   - throw new JeecgBootException(result.getMessage());
1137   - }
1138 1151 if (!taskHeaderService.combineInventoryDetail(taskHeader)) {
1139   - throw new JeecgBootException("合并入库库存失败");
  1152 + throw new JeecgBootException("完成入库任务时, 合并入库库存失败");
1140 1153 }
1141 1154 if (!receiptDetailService.updateBatchById(receiptDetaiList)) {
1142 1155 throw new JeecgBootException("完成入库任务时,更新入库单详情失败");
... ... @@ -1151,9 +1164,14 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1151 1164 if (!inventoryHeaderService.updateInventoryContainerStatusByContainerCode(containerCode, warehouseCode)) {
1152 1165 throw new JeecgBootException("完成入库任务时,更新托盘状态失败");
1153 1166 }
  1167 + Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), taskType, containerCode, fromLocationCode,
  1168 + toLocationCode, warehouseCode);
  1169 + if (!result.isSuccess()) {
  1170 + throw new JeecgBootException(result.getMessage());
  1171 + }
1154 1172 success = taskHeaderService.updateStatusById(QuantityConstant.TASK_STATUS_COMPLETED, taskHeader.getId());
1155 1173 if (!success) {
1156   - throw new JeecgBootException("完成出库任务,保存任务头失败");
  1174 + throw new JeecgBootException("完成入库任务时,保存任务头失败");
1157 1175 }
1158 1176 receiptDetaiList = receiptDetaiList.stream().filter(t -> t.getStatus().equals(QuantityConstant.RECEIPT_HEADER_COMPLETED)).collect(Collectors.toList());
1159 1177 LogRecordContext.putVariable("taskHeader", taskHeader);
... ... @@ -1194,8 +1212,23 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1194 1212 if (taskHeader.getStatus().equals(QuantityConstant.TASK_STATUS_COMPLETED)) {
1195 1213 return Result.ok("完成出库任务,(" + taskHeader.getId() + ")任务已经是完成的!");
1196 1214 }
  1215 + // 如果任务详情为空,那么就是呼叫料盒,但是又没入库进去。
1197 1216 if (taskDetailList.isEmpty()) {
1198   - return Result.error("完成出库任务,任务明细为空");
  1217 + int allow = parameterConfigurationService.getValueIntByCode(QuantityConstant.RULE_CALL_BOX_ALLOW_EMPTY);
  1218 + if (allow == QuantityConstant.RULE_ALLOW_EMPTY) {
  1219 + Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), taskType, containerCode,
  1220 + fromLocationCode, toLocationCode, warehouseCode);
  1221 + if (!result.isSuccess()) {
  1222 + throw new JeecgBootException(result.getMessage());
  1223 + }
  1224 + success = taskHeaderService.updateStatusById(QuantityConstant.TASK_STATUS_COMPLETED, taskHeader.getId());
  1225 + if (!success) {
  1226 + throw new JeecgBootException("完成出库任务,保存任务头失败");
  1227 + }
  1228 + return Result.ok("完成出库任务");
  1229 + } else {
  1230 + return Result.error("完成出库任务,任务明细为空");
  1231 + }
1199 1232 }
1200 1233 if (StringUtils.isEmpty(fromLocationCode)) {
1201 1234 return Result.error("完成出库任务" + taskHeader.getId() + "没有起始库位,执行中止");
... ... @@ -1281,6 +1314,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1281 1314 inventoryTransaction.setLot(inventoryDetail.getLot());
1282 1315 inventoryTransaction.setProject(inventoryDetail.getProject());
1283 1316 inventoryTransaction.setQty(taskDetail.getQty());
  1317 + BigDecimal inventoryQty = inventoryDetailService.getSumQty(inventoryDetail);
  1318 + inventoryTransaction.setInventoryQty(inventoryQty);
1284 1319 inventoryTransactionList.add(inventoryTransaction);
1285 1320 shipmentIdList.add(taskDetail.getShipmentId());
1286 1321 }
... ... @@ -1305,11 +1340,6 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1305 1340 if (!success) {
1306 1341 throw new JeecgBootException("完成出库任务,保存库存详情失败");
1307 1342 }
1308   - Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), taskType, containerCode, fromLocationCode,
1309   - toLocationCode, warehouseCode);
1310   - if (!result.isSuccess()) {
1311   - throw new JeecgBootException(result.getMessage());
1312   - }
1313 1343 ShipmentContainerHeader shipmentContainerHeader = shipmentContainerHeaderService.getById(taskHeader.getShipmentContainerHeaderId());
1314 1344 if (shipmentContainerHeader == null) {
1315 1345 throw new JeecgBootException("完成出库任务,获取出库组盘头失败");
... ... @@ -1340,6 +1370,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1340 1370 throw new JeecgBootException("完成出库任务,更新库存状态失败");
1341 1371 }
1342 1372 }
  1373 + Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), taskType, containerCode, fromLocationCode,
  1374 + toLocationCode, warehouseCode);
  1375 + if (!result.isSuccess()) {
  1376 + throw new JeecgBootException(result.getMessage());
  1377 + }
1343 1378 success = taskHeaderService.updateStatusById(QuantityConstant.TASK_STATUS_COMPLETED, taskHeader.getId());
1344 1379 if (!success) {
1345 1380 throw new JeecgBootException("完成出库任务,保存任务头失败");
... ... @@ -2143,14 +2178,13 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2143 2178 .eq(InventoryHeader::getLocationCode, fromLocationCode);
2144 2179 InventoryHeader inventoryHeader = inventoryHeaderService.getOne(inventoryHeaderLambdaUpdateWrapper);
2145 2180 if (inventoryHeader != null) {
2146   - inventoryHeader.setLocationCode(toLocationCode);
2147   - success = inventoryHeaderService.updateById(inventoryHeader);
  2181 + success = inventoryHeaderService.updateLocationCodeById(toLocationCode, inventoryHeader.getId());
2148 2182 if (!success) {
2149 2183 throw new JeecgBootException("完成移库任务时, 更新库存头失败");
2150 2184 }
2151 2185 }
2152 2186 if (inventoryDetailList.size() != 0) {
2153   - success = inventoryDetailService.updateBatchById(inventoryDetailList);
  2187 + success = inventoryDetailService.updateBatchLocationCodeById(inventoryDetailList);
2154 2188 if (!success) {
2155 2189 throw new JeecgBootException("完成移库任务时, 更新库存详情失败");
2156 2190 }
... ... @@ -2431,6 +2465,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2431 2465 TaskHeader taskHeader = new TaskHeader();
2432 2466 taskHeader.setId(id);
2433 2467 taskHeader.setStatus(status);
  2468 + if (status == QuantityConstant.TASK_STATUS_COMPLETED) {
  2469 + taskHeader.setCompleteTime(new Date());
  2470 + } else if (status == QuantityConstant.TASK_STATUS_RELEASE) {
  2471 + taskHeader.setExecuteTime(new Date());
  2472 + }
2434 2473 boolean success = taskHeaderService.updateById(taskHeader);
2435 2474 return success;
2436 2475 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java
... ... @@ -448,6 +448,7 @@ public class QuantityConstant {
448 448 public static final String RULE_TASK_LOCATION = "taskLocationRule";
449 449 public static final String RULE_CONNECT_WCS = "connectWcs";
450 450 public static final String RULE_ALLOCATION = "allocationRule";
  451 + public static final String RULE_CALL_BOX_ALLOW_EMPTY = "callBoxAllowEmpty";
451 452 public static final String DOUBLE_FORK_RESERVE_LOCATION = "doubleForkReserveLocation";
452 453 public static final String DOUBLE_FORK_SEARCH_LOCATION = "doubleForkSearchLocation";
453 454 public static final String WAREHOUSING_WEIGHING = "warehousingWeighing";
... ... @@ -472,6 +473,9 @@ public class QuantityConstant {
472 473 public static final int RULE_TASK_PICK_SHIPMENT = 1;
473 474 public static final int RULE_TASK_WHOLE_SHIPMENT = 0;
474 475  
  476 + public static final int RULE_ALLOW_EMPTY = 1;
  477 + public static final int RULE_NOT_ALLOW_EMPTY = 0;
  478 +
475 479 public static final int RULE_WCS_CONNECT = 1;
476 480 public static final int RULE_WCS_DISCONNECT = 0;
477 481  
... ...