Commit 9bf4dfa96d824c5dfaad0ba1b0faef4a4a2f13a7
Merge branch 'develop4' of http://172.16.29.40:8010/wms/wms4.git into develop4
Showing
4 changed files
with
41 additions
and
12 deletions
ant-design-vue-jeecg/src/views/system/stocktaking/modules/AdjustmentDocModal.vue
... | ... | @@ -32,7 +32,6 @@ export default { |
32 | 32 | name: "AdjustmentDocModal", |
33 | 33 | components: {}, |
34 | 34 | props: { |
35 | - id: "", | |
36 | 35 | taskHeaderId:"", |
37 | 36 | }, |
38 | 37 | data() { |
... | ... | @@ -41,7 +40,7 @@ export default { |
41 | 40 | width: 500, |
42 | 41 | visible: false, |
43 | 42 | model: { |
44 | - id:this.id, | |
43 | + id:'', | |
45 | 44 | countedQty:'', |
46 | 45 | state:this.taskHeaderId, |
47 | 46 | }, |
... | ... | @@ -78,7 +77,9 @@ export default { |
78 | 77 | add() { |
79 | 78 | this.edit(this.modelDefault); |
80 | 79 | }, |
81 | - edit() { | |
80 | + edit(id) { | |
81 | + this.model.id=id; | |
82 | + alert(this.model.id) | |
82 | 83 | this.visible = true; |
83 | 84 | }, |
84 | 85 | close() { |
... | ... |
ant-design-vue-jeecg/src/views/system/stocktaking/subTables/CycleCountDetailChildSubTable.vue
... | ... | @@ -22,8 +22,8 @@ |
22 | 22 | </template> |
23 | 23 | |
24 | 24 | <template slot="action" slot-scope="text, record"> |
25 | - <adjustment-doc-modal ref="adjustmentModal" @ok="modalFormOk" :id="record.id"/> | |
26 | - <a v-if="record.childStatus != 1" @click="createMany(record)"><a-icon />实盘登记</a> | |
25 | + <adjustment-doc-modal ref="adjustmentModal" @ok="modalFormOk"/> | |
26 | + <a v-if="record.childStatus != 1" @click="createMany(record.id)"><a-icon />实盘登记</a> | |
27 | 27 | </template> |
28 | 28 | |
29 | 29 | <template slot="fileSlot" slot-scope="text"> |
... | ... | @@ -171,8 +171,8 @@ |
171 | 171 | this.loading = false |
172 | 172 | }) |
173 | 173 | }, |
174 | - createMany() { | |
175 | - this.$refs.adjustmentModal.edit(); | |
174 | + createMany(id) { | |
175 | + this.$refs.adjustmentModal.edit(id); | |
176 | 176 | this.$refs.adjustmentModal.title = "实盘登记"; |
177 | 177 | }, |
178 | 178 | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/service/impl/CycleCountDetailServiceImpl.java
... | ... | @@ -335,8 +335,18 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
335 | 335 | return Result.error("盘点明细不存在"); |
336 | 336 | } |
337 | 337 | |
338 | + | |
339 | + if (cycleCountDetail.getEnableStatus().equals(QuantityConstant.CYCLECOUNT_STATUS_BUILD)) | |
340 | + { | |
341 | + return Result.error("当前盘点明细是新建状态 不能调整"); | |
342 | + } | |
343 | + | |
344 | + if (cycleCountDetailChild.getCountedQty().compareTo(BigDecimal.ZERO)==0) | |
345 | + { | |
346 | + return Result.error("别闹"); | |
347 | + } | |
348 | + | |
338 | 349 | cycleCountDetailChild.setCyclecountheadcode(cycleCountDetail.getCycleCountHeadCode()); |
339 | - cycleCountDetailChild.setChildStatus(QuantityConstant.CYCLECOUNT_STATUS_REGISTERED); | |
340 | 350 | cycleCountDetailChild.setLocationCode(cycleCountDetail.getLocationCode()); |
341 | 351 | cycleCountDetailChild.setContainerCode(cycleCountDetail.getContainerCode()); |
342 | 352 | |
... | ... | @@ -344,11 +354,29 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
344 | 354 | cycleCountDetailChild.setMaterialName(materialByCode.getName()); |
345 | 355 | cycleCountDetailChild.setMaterialSpec(materialByCode.getSpec()); |
346 | 356 | cycleCountDetailChild.setMaterialUnit(materialByCode.getUnit()); |
357 | + BigDecimal countedQty = cycleCountDetailChild.getCountedQty(); | |
358 | + cycleCountDetailChild.setCountedQty(null); | |
359 | + | |
360 | + | |
361 | + LambdaQueryWrapper<CycleCountDetailChild> childLambdaQueryWrapper = Wrappers.lambdaQuery(cycleCountDetailChild); | |
362 | + CycleCountDetailChild serviceImplOne = cycleCountDetailChildServiceImpl.getOne(childLambdaQueryWrapper); | |
363 | + if (serviceImplOne!=null) | |
364 | + { | |
365 | + return Result.error("这个物料明细已存在"); | |
366 | + } | |
367 | + | |
368 | + cycleCountDetailChild.setChildStatus(QuantityConstant.CYCLECOUNT_STATUS_REGISTERED); | |
347 | 369 | cycleCountDetailChild.setSystemQty(BigDecimal.ZERO); |
348 | - cycleCountDetailChild.setGapQty(BigDecimal.ZERO.subtract(cycleCountDetailChild.getCountedQty())); | |
370 | + cycleCountDetailChild.setGapQty(BigDecimal.ZERO.subtract(countedQty)); | |
371 | + cycleCountDetailChild.setCountedQty(countedQty); | |
349 | 372 | cycleCountDetailChildServiceImpl.save(cycleCountDetailChild); |
350 | 373 | |
351 | - return Result.ok("成功"); | |
374 | + Result result = new Result(); | |
375 | + result.setCode(200); | |
376 | + result.setMessage("成功"); | |
377 | + result.setResult(cycleCountDetail.getCycleCountHeadId()); | |
378 | + | |
379 | + return result; | |
352 | 380 | } |
353 | 381 | |
354 | 382 | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
... | ... | @@ -1540,9 +1540,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1540 | 1540 | //1.先拿到盘点单主单据 |
1541 | 1541 | CycleCountDetail cycleCountDetail = cycleCountDetailService.getById(taskHeader.getShipmentContainerHeaderId()); |
1542 | 1542 | |
1543 | - if (cycleCountDetail.getSystemQty().compareTo(BigDecimal.ZERO)==0) | |
1543 | + if ((cycleCountDetail.getCountedQty().add(cycleCountDetail.getGapQty())).compareTo(BigDecimal.ZERO)==0) | |
1544 | 1544 | { |
1545 | - return Result.error("盘点单据系统数量为0,不能完成 单据号+" +cycleCountDetail.getCycleCountHeadCode()); | |
1545 | + return Result.error("盘点单据系统实盘数量跟差异数量0,不能完成 单据号" +cycleCountDetail.getCycleCountHeadCode()); | |
1546 | 1546 | } |
1547 | 1547 | |
1548 | 1548 | //2.盘点单主单据查明细单据list |
... | ... |