Commit ce704ed53fc084eeef5318b8997584bad11cd06c
Merge branch 'develop' of http://172.16.29.40:8010/wms/wms2 into develop
Showing
32 changed files
with
478 additions
and
122 deletions
src/main/java/com/huaheng/pc/check/checkDetail/domain/CheckDetail.java
... | ... | @@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableName; |
7 | 7 | import io.swagger.annotations.ApiModel; |
8 | 8 | import io.swagger.annotations.ApiModelProperty; |
9 | 9 | import java.io.Serializable; |
10 | +import java.math.BigDecimal; | |
10 | 11 | import java.util.Date; |
11 | 12 | import lombok.Data; |
12 | 13 | |
... | ... | @@ -149,7 +150,7 @@ public class CheckDetail implements Serializable { |
149 | 150 | */ |
150 | 151 | @TableField(value = "qty") |
151 | 152 | @ApiModelProperty(value="系统数量") |
152 | - private Integer qty; | |
153 | + private BigDecimal qty; | |
153 | 154 | |
154 | 155 | /** |
155 | 156 | * 质检人 |
... | ... |
src/main/java/com/huaheng/pc/check/checkDetail/service/CheckDetailService.java
... | ... | @@ -10,9 +10,12 @@ import com.huaheng.pc.check.checkHeader.domain.CheckHeader; |
10 | 10 | import com.huaheng.pc.check.checkHeader.service.CheckHeaderService; |
11 | 11 | import com.huaheng.pc.check.checkingRegister.domain.CheckingRegister; |
12 | 12 | import com.huaheng.pc.check.checkingRegister.service.CheckingRegisterService; |
13 | +import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail; | |
14 | +import com.huaheng.pc.receipt.receiptDetail.service.ReceiptDetailService; | |
13 | 15 | import org.aspectj.weaver.loadtime.Aj; |
14 | 16 | import org.springframework.stereotype.Service; |
15 | 17 | import javax.annotation.Resource; |
18 | +import java.math.BigDecimal; | |
16 | 19 | import java.util.ArrayList; |
17 | 20 | import java.util.Arrays; |
18 | 21 | import java.util.Date; |
... | ... | @@ -29,6 +32,8 @@ public class CheckDetailService extends ServiceImpl<CheckDetailMapper, CheckDeta |
29 | 32 | private CheckHeaderService checkHeaderService; |
30 | 33 | @Resource |
31 | 34 | private CheckingRegisterService checkingRegisterService; |
35 | + @Resource | |
36 | + private ReceiptDetailService receiptDetailService; | |
32 | 37 | |
33 | 38 | /** |
34 | 39 | * 质检完成 |
... | ... | @@ -47,7 +52,7 @@ public class CheckDetailService extends ServiceImpl<CheckDetailMapper, CheckDeta |
47 | 52 | |
48 | 53 | //更新传入明细id为完成质检状态 |
49 | 54 | CheckDetail checkDetail = this.getById(id); |
50 | - if ( !(total == checkDetail.getQty())){ | |
55 | + if ( checkDetail.getQty().compareTo(BigDecimal.valueOf(total)) != 0){ | |
51 | 56 | return AjaxResult.error("质检登记中总数量不等于质检明细中数量,不能完成质检"); |
52 | 57 | } |
53 | 58 | checkDetail.setCheckBy(ShiroUtils.getLoginName()); |
... | ... | @@ -79,6 +84,15 @@ public class CheckDetailService extends ServiceImpl<CheckDetailMapper, CheckDeta |
79 | 84 | if ( !checkHeaderService.updateById(checkHeader)){ |
80 | 85 | throw new ServiceException("质检头表更新失败"); |
81 | 86 | } |
87 | + | |
88 | + //更新入库单明细状态 | |
89 | + ReceiptDetail receiptDetail = receiptDetailService.queryflow(receiptDetailService.getById(checkDetail.getReceiptDetailId())); | |
90 | + if (!receiptDetailService.updateById(receiptDetail)){ | |
91 | + throw new ServiceException("入库单明细更新失败"); | |
92 | + } | |
93 | + //更新头表状态 | |
94 | + receiptDetailService.updateReceiptHeaderLastStatus(receiptDetail.getReceiptId()); | |
95 | + | |
82 | 96 | } |
83 | 97 | return AjaxResult.success("质检完成"); |
84 | 98 | } |
... | ... |
src/main/java/com/huaheng/pc/config/FilterConfigDetail/service/FilterConfigDetailService.java
... | ... | @@ -15,7 +15,7 @@ import java.util.Map; |
15 | 15 | public class FilterConfigDetailService extends ServiceImpl<FilterConfigDetailMapper, FilterConfigDetail> { |
16 | 16 | |
17 | 17 | /** |
18 | - * 查询入库定位自定义sql,供前端页面选择使用 | |
18 | + * 查询定位自定义sql,供前端页面选择使用 | |
19 | 19 | * @return |
20 | 20 | */ |
21 | 21 | public List<Map<String, Object>> queryFilterConfigDetail(String moduleType){ |
... | ... |
src/main/java/com/huaheng/pc/config/statusFlow/service/StatusFlowHeaderService.java
... | ... | @@ -2,6 +2,7 @@ package com.huaheng.pc.config.statusFlow.service; |
2 | 2 | |
3 | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
5 | +import org.springframework.aop.aspectj.AspectJPrecedenceInformation; | |
5 | 6 | import org.springframework.stereotype.Service; |
6 | 7 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
7 | 8 | import com.huaheng.pc.config.statusFlow.domain.StatusFlowHeader; |
... | ... | @@ -13,9 +14,10 @@ import java.util.Map; |
13 | 14 | @Service("StatusFlow") |
14 | 15 | public class StatusFlowHeaderService extends ServiceImpl<StatusFlowHeaderMapper, StatusFlowHeader> { |
15 | 16 | |
16 | - public List<Map<String, Object>> flowList(){ | |
17 | + public List<Map<String, Object>> flowList(String recordType){ | |
17 | 18 | LambdaQueryWrapper<StatusFlowHeader> lambda = Wrappers.lambdaQuery(); |
18 | - lambda.select(StatusFlowHeader::getCode, StatusFlowHeader::getName); | |
19 | + lambda.select(StatusFlowHeader::getCode, StatusFlowHeader::getName) | |
20 | + .eq(StatusFlowHeader::getRecordType, recordType); | |
19 | 21 | return this.listMaps(lambda); |
20 | 22 | } |
21 | 23 | } |
... | ... |
src/main/java/com/huaheng/pc/inventory/adjustDetail/controller/adjustDetailController.java
... | ... | @@ -9,6 +9,7 @@ import com.huaheng.common.utils.security.ShiroUtils; |
9 | 9 | import com.huaheng.framework.aspectj.lang.annotation.Log; |
10 | 10 | import com.huaheng.framework.aspectj.lang.constant.BusinessType; |
11 | 11 | import com.huaheng.framework.web.controller.BaseController; |
12 | +import com.huaheng.framework.web.domain.AjaxResult; | |
12 | 13 | import com.huaheng.framework.web.page.PageDomain; |
13 | 14 | import com.huaheng.framework.web.page.TableDataInfo; |
14 | 15 | import com.huaheng.framework.web.page.TableSupport; |
... | ... | @@ -16,6 +17,7 @@ import com.huaheng.pc.inventory.adjustDetail.domain.AdjustDetail; |
16 | 17 | import com.huaheng.pc.inventory.adjustDetail.service.AdjustDetailService; |
17 | 18 | import com.huaheng.pc.inventory.adjustHeader.service.AdjustHeaderService; |
18 | 19 | import org.springframework.stereotype.Controller; |
20 | +import org.springframework.ui.ModelMap; | |
19 | 21 | import org.springframework.web.bind.annotation.GetMapping; |
20 | 22 | import org.springframework.web.bind.annotation.PostMapping; |
21 | 23 | import org.springframework.web.bind.annotation.RequestMapping; |
... | ... | @@ -96,7 +98,36 @@ public class adjustDetailController extends BaseController { |
96 | 98 | } |
97 | 99 | } |
98 | 100 | |
101 | + /** | |
102 | + * 只调整数量 | |
103 | + * 修改 | |
104 | + */ | |
105 | + @GetMapping("/adjustEdit") | |
106 | + public String editAdjust(Integer id, ModelMap mmap) | |
107 | + { | |
108 | + AdjustDetail adjustDetailEdit = adjustDetailService.getById(id); | |
109 | + mmap.put("adjustDetailEdit", adjustDetailEdit); | |
110 | + return prefix + "/adjustEdit"; | |
111 | + } | |
99 | 112 | |
113 | + /** | |
114 | + * 修改保存调整数量 | |
115 | + */ | |
116 | + //@RequiresPermissions("inventory:cyclecountAdjustDetail:addAdjust") | |
117 | + @Log(title = "库存-调整单", operating = "调整单调整库存差异,调整数量", action = BusinessType.UPDATE) | |
118 | + @PostMapping("/editAdjustSave") | |
119 | + @ResponseBody | |
120 | + public AjaxResult editAdjustSave(AdjustDetail adjustDetail) | |
121 | + { | |
122 | + //未上传不允许进行明细差异调整 | |
123 | +// CyclecountAdjust cyclecountAdjust = cycleconutAdjustService.selectEntityById(cyclecountAdjustDetail.getCyclecountAdjustId()); | |
124 | +// if(cyclecountAdjust.getStatus() != 30 ){ | |
125 | +// return AjaxResult.error("单据未上传,没有调整单下发,不允许差异调整!!"); | |
126 | +// //throw new ServiceException("单据未上传,没有调整单下发,不允许差异调整!"); | |
127 | +// } | |
128 | + AjaxResult result = adjustDetailService.updateAdjustDetail(adjustDetail); | |
129 | + return result; | |
130 | + } | |
100 | 131 | |
101 | 132 | |
102 | 133 | |
... | ... |
src/main/java/com/huaheng/pc/inventory/adjustDetail/domain/AdjustDetail.java
... | ... | @@ -34,6 +34,13 @@ public class AdjustDetail implements Serializable { |
34 | 34 | private String cycleCountCode; |
35 | 35 | |
36 | 36 | /** |
37 | + * 库存明细ID | |
38 | + */ | |
39 | + @TableField(value = "inventoryDetailId") | |
40 | + @ApiModelProperty(value = "库存明细ID") | |
41 | + private Integer inventoryDetailId; | |
42 | + | |
43 | + /** | |
37 | 44 | * 盘点单号行号 |
38 | 45 | */ |
39 | 46 | @TableField(value = "cycleDetailId") |
... | ... | @@ -249,6 +256,18 @@ public class AdjustDetail implements Serializable { |
249 | 256 | @TableField(value = "containerCode") |
250 | 257 | @ApiModelProperty(value = "容器编码") |
251 | 258 | private String containerCode; |
259 | + /** | |
260 | + * 更新人 | |
261 | + * */ | |
262 | + @TableField(value = "lastUpdatedBy") | |
263 | + @ApiModelProperty(value = "更新人") | |
264 | + private String lastUpdatedBy; | |
265 | + /** | |
266 | + * 更新时间 | |
267 | + */ | |
268 | + @TableField(value = "lastUpdated") | |
269 | + @ApiModelProperty(value = "更新时间") | |
270 | + private Date lastUpdated; | |
252 | 271 | |
253 | 272 | |
254 | 273 | private static final long serialVersionUID = 1L; |
... | ... |
src/main/java/com/huaheng/pc/inventory/adjustDetail/service/AdjustDetailService.java
1 | 1 | package com.huaheng.pc.inventory.adjustDetail.service; |
2 | 2 | |
3 | 3 | import com.baomidou.mybatisplus.extension.service.IService; |
4 | +import com.huaheng.framework.web.domain.AjaxResult; | |
4 | 5 | import com.huaheng.pc.inventory.adjustDetail.domain.AdjustDetail; |
5 | 6 | |
6 | 7 | |
7 | 8 | |
8 | 9 | public interface AdjustDetailService extends IService<AdjustDetail> { |
9 | 10 | |
10 | - | |
11 | + AjaxResult updateAdjustDetail(AdjustDetail adjustDetail); | |
11 | 12 | |
12 | 13 | } |
13 | 14 | |
... | ... |
src/main/java/com/huaheng/pc/inventory/adjustDetail/service/AdjustDetailServiceImpl.java
1 | 1 | package com.huaheng.pc.inventory.adjustDetail.service; |
2 | 2 | |
3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
4 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
5 | +import com.huaheng.common.utils.security.ShiroUtils; | |
6 | +import com.huaheng.framework.web.domain.AjaxResult; | |
7 | +import com.huaheng.pc.config.container.service.ContainerService; | |
8 | +import com.huaheng.pc.config.location.service.LocationService; | |
9 | +import com.huaheng.pc.inventory.adjustHeader.domain.AdjustHeader; | |
10 | +import com.huaheng.pc.inventory.adjustHeader.service.AdjustHeaderService; | |
11 | +import com.huaheng.pc.inventory.cycleCountDetail.service.CycleCountDetailService; | |
12 | +import com.huaheng.pc.inventory.cycleCountHeader.service.CycleCountHeaderService; | |
13 | +import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail; | |
14 | +import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService; | |
15 | +import com.huaheng.pc.inventory.inventoryHeader.domain.InventoryHeader; | |
16 | +import com.huaheng.pc.inventory.inventoryHeader.service.InventoryHeaderService; | |
17 | +import com.huaheng.pc.inventory.inventoryTransaction.domain.InventoryTransaction; | |
18 | +import com.huaheng.pc.inventory.inventoryTransaction.service.InventoryTransactionService; | |
19 | +import io.swagger.models.auth.In; | |
3 | 20 | import org.springframework.stereotype.Service; |
4 | 21 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
5 | 22 | import com.huaheng.pc.inventory.adjustDetail.domain.AdjustDetail; |
6 | 23 | import com.huaheng.pc.inventory.adjustDetail.mapper.AdjustDetailMapper; |
24 | +import org.springframework.transaction.annotation.Transactional; | |
25 | + | |
26 | +import javax.annotation.Resource; | |
27 | +import java.math.BigDecimal; | |
28 | +import java.net.CacheResponse; | |
29 | +import java.util.Date; | |
30 | +import java.util.List; | |
31 | +import java.util.WeakHashMap; | |
32 | + | |
7 | 33 | @Service |
8 | 34 | public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, AdjustDetail> implements AdjustDetailService { |
9 | 35 | |
36 | + | |
37 | + @Resource | |
38 | + private AdjustHeaderService adjustHeaderService; | |
39 | + @Resource | |
40 | + private CycleCountHeaderService cycleCountHeaderService; | |
41 | + @Resource | |
42 | + private CycleCountDetailService cycleCountDetailService; | |
43 | + @Resource | |
44 | + private InventoryHeaderService inventoryHeaderService; | |
45 | + @Resource | |
46 | + private InventoryDetailService inventoryDetailService; | |
47 | + @Resource | |
48 | + private InventoryTransactionService inventoryTransactionService; | |
49 | + @Resource | |
50 | + private LocationService locationService; | |
51 | + @Resource | |
52 | + private ContainerService containerService; | |
53 | + | |
54 | + | |
55 | + | |
56 | + | |
57 | + | |
58 | + | |
59 | + | |
60 | + /** | |
61 | + * 调整库存数量 | |
62 | + * @param adjustDetail | |
63 | + * @return | |
64 | + */ | |
65 | + @Transactional | |
66 | + @Override | |
67 | + public AjaxResult updateAdjustDetail(AdjustDetail adjustDetail) { | |
68 | + /*修改库存数量,调整单据状态,写入库存交易*/ | |
69 | + | |
70 | + //已调整过不允许修改。 | |
71 | + if(adjustDetail.getStatus() == 1){ | |
72 | + AjaxResult.error("该单据已调整,不允许再次调整!" ); | |
73 | + } | |
74 | + //查询调整的库存明细 | |
75 | + InventoryDetail inventoryDetail = inventoryDetailService.getById(adjustDetail.getInventoryDetailId()); | |
76 | + /*调整后的数量写入库存*/ | |
77 | + //比较大小可以用 .compareTo()返回值 -1 小于 0 等于 1 大于 | |
78 | + //Bigdecimal 自带运算方法.add加法 .subtract减法 | |
79 | + | |
80 | + if(adjustDetail.getToQty().compareTo(BigDecimal.ZERO) == 0){ | |
81 | + //当调整后数量为0时,直接删除该条库存,并写入库存交易 | |
82 | + //删除库存,并查询当前库位还有没有其他物料,没有则删除库存头,恢复容器和库位状态 | |
83 | + InventoryDetail inv = new InventoryDetail(); | |
84 | + inv.setInventoryHeaderId(inventoryDetail.getInventoryHeaderId()); | |
85 | + inv.setLocationCode(inventoryDetail.getLocationCode()); | |
86 | + inv.setContainerCode(inventoryDetail.getContainerCode()); | |
87 | + LambdaQueryWrapper<InventoryDetail> lamdDetail = Wrappers.lambdaQuery(inv); | |
88 | + List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(lamdDetail); | |
89 | + inventoryDetailService.removeById(adjustDetail.getInventoryDetailId());//删除实际库存数量为0的库存明细 | |
90 | + if(inventoryDetailList.size() == 0){ | |
91 | + //恢复库位和容器状态,删除库存头 | |
92 | + inventoryHeaderService.removeById(inventoryDetail.getInventoryHeaderId()); | |
93 | + locationService.updateContainerCodeAndStatus(inventoryDetail.getLocationCode(),"","empty"); | |
94 | + containerService.updateLocationCodeAndStatus(inventoryDetail.getContainerCode(),"","empty"); | |
95 | + } | |
96 | + }else{ | |
97 | + //修改库存 | |
98 | + //BigDecimal temp =(adjustDetail.getFromQty()).add(adjustDetail.getGapQty()); | |
99 | + inventoryDetail.setQty(adjustDetail.getToQty());//调整后的数量 | |
100 | + inventoryDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
101 | + inventoryDetail.setLastUpdated(new Date()); | |
102 | + inventoryDetailService.saveOrUpdate(inventoryDetail); | |
103 | + | |
104 | + } | |
105 | + //写入库存交易记录 | |
106 | + InventoryTransaction inventoryTransaction = new InventoryTransaction(); | |
107 | + inventoryTransaction.setWarehouseCode(inventoryDetail.getWarehouseCode()); | |
108 | + inventoryTransaction.setCompanyCode(inventoryDetail.getCompanyCode()); | |
109 | + inventoryTransaction.setLocationCode(inventoryDetail.getLocationCode()); | |
110 | + inventoryTransaction.setContainerCode(inventoryDetail.getContainerCode()); | |
111 | + inventoryTransaction.setTransactionType(40); | |
112 | + inventoryTransaction.setMaterialCode(inventoryDetail.getMaterialCode()); | |
113 | + inventoryTransaction.setMaterialName(inventoryDetail.getMaterialName()); | |
114 | + inventoryTransaction.setMaterialSpec(inventoryDetail.getMaterialSpec()); | |
115 | + inventoryTransaction.setMaterialUnit(inventoryDetail.getMaterialUnit()); | |
116 | + inventoryTransaction.setTaskQty(inventoryDetail.getTaskQty()); | |
117 | + inventoryTransaction.setInventorySts(inventoryDetail.getInventorySts()); | |
118 | + inventoryTransaction.setReferCode(inventoryDetail.getReferCode()); | |
119 | + inventoryTransaction.setReferDetailId(inventoryDetail.getReferDetailId()); | |
120 | + inventoryTransaction.setBatch(inventoryDetail.getBatch()); | |
121 | + inventoryTransaction.setLot(inventoryDetail.getLot()); | |
122 | + inventoryTransaction.setProjectNo(inventoryDetail.getProjectNo()); | |
123 | + inventoryTransaction.setQcCheck(inventoryDetail.getQcCheck()); | |
124 | + inventoryTransaction.setWeight(inventoryDetail.getWeight()); | |
125 | + inventoryTransaction.setManufactureDate(inventoryDetail.getManufactureDate()); | |
126 | + inventoryTransaction.setExpirationDate(inventoryDetail.getExpirationDate()); | |
127 | + inventoryTransaction.setAgingDate(inventoryDetail.getCreated()); | |
128 | + inventoryTransaction.setAttributeId(inventoryDetail.getAttributeId()); | |
129 | + inventoryTransaction.setAttribute1(inventoryDetail.getAttribute1()); | |
130 | + inventoryTransaction.setAttribute2(inventoryDetail.getAttribute2()); | |
131 | + inventoryTransaction.setAttribute3(inventoryDetail.getAttribute3()); | |
132 | +// inventoryTransaction.setLockCode(inventoryDetail.getLockCode());//交易锁 | |
133 | + inventoryTransaction.setCreated(new Date()); | |
134 | + inventoryTransaction.setCreatedBy(ShiroUtils.getLoginName()); | |
135 | +// inventoryTransaction.setVersion(); | |
136 | +// inventoryTransaction.setUserDef1(); | |
137 | +// inventoryTransaction.setUserDef2(); | |
138 | +// inventoryTransaction.setUserDef3(); | |
139 | +// inventoryTransaction.setProcessStamp(); | |
140 | +// inventoryTransaction.setBillCode(); | |
141 | + inventoryTransaction.setBillDetailId(inventoryDetail.getReceiptDetailId()); | |
142 | + inventoryTransaction.setSupplierCode(inventoryDetail.getSupplierCode()); | |
143 | + inventoryTransactionService.saveOrUpdate(inventoryTransaction); | |
144 | + | |
145 | + //修改调整单明细状态 | |
146 | + adjustDetail.setStatus(1); | |
147 | + adjustDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
148 | + adjustDetail.setLastUpdated(new Date()); | |
149 | + this.saveOrUpdate(adjustDetail); | |
150 | + | |
151 | + return AjaxResult.success("调整库存数量成功!"); | |
152 | + } | |
153 | + | |
154 | + | |
155 | + | |
156 | + | |
157 | + | |
158 | + | |
159 | + | |
160 | + | |
161 | + | |
162 | + | |
163 | + | |
164 | + | |
165 | + | |
166 | + | |
10 | 167 | } |
... | ... |
src/main/java/com/huaheng/pc/inventory/cycleCountHeader/service/CycleCountHeaderServiceImpl.java
... | ... | @@ -205,6 +205,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap |
205 | 205 | adjustDetail.setAdjustCode(adjustHeader.getCode()); |
206 | 206 | adjustDetail.setWarehouseCode(adjustHeader.getWarehouseCode()); |
207 | 207 | adjustDetail.setCompanyCode(adjustHeader.getCompanyCode()); |
208 | + adjustDetail.setInventoryDetailId(item.getInventoryDetailId());//库存明细 | |
208 | 209 | adjustDetail.setLocationCode(item.getLocationCode()); |
209 | 210 | adjustDetail.setContainerCode(item.getContainerCode()); |
210 | 211 | adjustDetail.setCycleCountCode(cyclecountHeader.getCode()); |
... | ... | @@ -217,7 +218,8 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap |
217 | 218 | adjustDetail.setToInventorySts(item.getInventorySts());//盘点不涉及属性 |
218 | 219 | adjustDetail.setFromInventorySts(item.getInventorySts()); |
219 | 220 | adjustDetail.setFromQty(item.getSystemQty());//调整前数量 |
220 | - adjustDetail.setToQty(null);//调整后数量 | |
221 | + BigDecimal toqty = item.getSystemQty().add(item.getGapQty());//调整后数量 | |
222 | + adjustDetail.setToQty(toqty); | |
221 | 223 | adjustDetail.setGapQty(item.getGapQty());//调整数量 |
222 | 224 | adjustDetail.setCreated(new Date()); |
223 | 225 | adjustDetail.setCreatedBy(ShiroUtils.getLoginName()); |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryTransaction/domain/InventoryTransaction.java
... | ... | @@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableName; |
7 | 7 | import io.swagger.annotations.ApiModel; |
8 | 8 | import io.swagger.annotations.ApiModelProperty; |
9 | 9 | import java.io.Serializable; |
10 | +import java.math.BigDecimal; | |
10 | 11 | import java.util.Date; |
11 | 12 | import lombok.Data; |
12 | 13 | |
... | ... | @@ -93,7 +94,7 @@ public class InventoryTransaction implements Serializable { |
93 | 94 | */ |
94 | 95 | @TableField(value = "taskQty") |
95 | 96 | @ApiModelProperty(value="任务数量") |
96 | - private Integer taskQty; | |
97 | + private BigDecimal taskQty; | |
97 | 98 | |
98 | 99 | /** |
99 | 100 | * 库存状态 |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerDetail/domain/ReceiptContainerDetail.java
... | ... | @@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty; |
9 | 9 | import lombok.Data; |
10 | 10 | |
11 | 11 | import java.io.Serializable; |
12 | +import java.math.BigDecimal; | |
12 | 13 | import java.util.Date; |
13 | 14 | |
14 | 15 | @ApiModel(value="com.huaheng.pc.receipt.receiptContainerDetail.domain.ReceiptContainerDetail") |
... | ... | @@ -125,7 +126,7 @@ public class ReceiptContainerDetail implements Serializable { |
125 | 126 | */ |
126 | 127 | @TableField(value = "qty") |
127 | 128 | @ApiModelProperty(value="数量") |
128 | - private Integer qty; | |
129 | + private BigDecimal qty; | |
129 | 130 | |
130 | 131 | /** |
131 | 132 | * 状态 |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerDetail/service/ReceiptContainerDetailServiceImpl.java
... | ... | @@ -57,7 +57,7 @@ public class ReceiptContainerDetailServiceImpl extends ServiceImpl<ReceiptContai |
57 | 57 | if (receiptContainerDetail.getStatus() < 10){ |
58 | 58 | //回滚入库单明细收货数量 |
59 | 59 | ReceiptDetail receiptDetail = receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId()); |
60 | - receiptDetail.setOpenQty(receiptDetail.getOpenQty() - receiptContainerDetail.getQty()); | |
60 | + receiptDetail.setOpenQty(receiptDetail.getOpenQty().subtract(receiptContainerDetail.getQty())); | |
61 | 61 | |
62 | 62 | if (!receiptDetailService.updateById(receiptDetail)){throw new SecurityException("回滚入库单明细失败");} |
63 | 63 | //删除组盘明细 |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java
... | ... | @@ -29,6 +29,7 @@ import org.springframework.stereotype.Service; |
29 | 29 | import org.springframework.transaction.annotation.Transactional; |
30 | 30 | |
31 | 31 | import javax.annotation.Resource; |
32 | +import java.math.BigDecimal; | |
32 | 33 | import java.util.List; |
33 | 34 | @Service |
34 | 35 | public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContainerHeaderMapper, ReceiptContainerHeader> implements ReceiptContainerHeaderService{ |
... | ... | @@ -105,7 +106,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
105 | 106 | //根据入库单详情id查询入库详情 |
106 | 107 | ReceiptDetail receiptDetail = receiptDetailService.getById(receiptDetailId); |
107 | 108 | receiptDetail.setId(receiptDetailId); |
108 | - receiptDetail.setOpenQty(qty+receiptDetail.getOpenQty()); | |
109 | + receiptDetail.setOpenQty(new BigDecimal(qty).add(receiptDetail.getOpenQty())); | |
109 | 110 | //更新入库单详情的收货数量 |
110 | 111 | if (!receiptDetailService.updateById(receiptDetail)){ |
111 | 112 | throw new ServiceException("更新入库单详情失败"); |
... | ... | @@ -143,7 +144,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
143 | 144 | //查询入库单明细,减去已收数量,更新单据 |
144 | 145 | for (ReceiptContainerDetail receiptContainerDetail: receiptContainerDetails){ |
145 | 146 | ReceiptDetail receiptDetail = receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId()); |
146 | - receiptDetail.setOpenQty(receiptDetail.getOpenQty()-receiptContainerDetail.getQty()); | |
147 | + receiptDetail.setOpenQty(receiptDetail.getOpenQty().subtract(receiptContainerDetail.getQty())); | |
147 | 148 | if (!receiptDetailService.updateById(receiptDetail)){throw new ServiceException("回滚入库明细失败"); } |
148 | 149 | |
149 | 150 | containerDetailLambda = Wrappers.lambdaQuery(); |
... | ... | @@ -320,7 +321,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
320 | 321 | receiptContainerDetail.setMaterialName(receiptDetail.getMaterialName()); |
321 | 322 | receiptContainerDetail.setMaterialSpec(receiptDetail.getMaterialSpec()); |
322 | 323 | receiptContainerDetail.setMaterialUnit(receiptDetail.getMaterialUnit()); |
323 | - receiptContainerDetail.setQty(qty); | |
324 | + receiptContainerDetail.setQty(new BigDecimal(qty)); | |
324 | 325 | receiptContainerDetail.setSupplierCode(receiptDetail.getSupplierCode()); |
325 | 326 | receiptContainerDetail.setBatch(receiptDetail.getBatch()); |
326 | 327 | receiptContainerDetail.setLot(receiptDetail.getLot()); |
... | ... | @@ -335,7 +336,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
335 | 336 | throw new ServiceException("保存入库组盘详情失败"); |
336 | 337 | } |
337 | 338 | } else { |
338 | - receiptContainerDetail.setQty(receiptContainerDetail.getQty()+qty); | |
339 | + receiptContainerDetail.setQty(receiptContainerDetail.getQty().add(BigDecimal.valueOf(qty))); | |
339 | 340 | if (!receiptContainerDetailService.updateById(receiptContainerDetail)){ |
340 | 341 | throw new ServiceException("更新入库组盘详情失败"); |
341 | 342 | } |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptDetail/domain/ReceiptDetail.java
... | ... | @@ -171,14 +171,14 @@ public class ReceiptDetail implements Serializable { |
171 | 171 | */ |
172 | 172 | @TableField(value = "totalQty") |
173 | 173 | @ApiModelProperty(value = "总数量") |
174 | - private Integer totalQty; | |
174 | + private BigDecimal totalQty; | |
175 | 175 | |
176 | 176 | /** |
177 | 177 | * 未收数量 |
178 | 178 | */ |
179 | 179 | @TableField(value = "openQty") |
180 | 180 | @ApiModelProperty(value = "未收数量") |
181 | - private Integer openQty; | |
181 | + private BigDecimal openQty; | |
182 | 182 | |
183 | 183 | /** |
184 | 184 | * ERP单号 |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptDetail/service/ReceiptDetailService.java
... | ... | @@ -9,8 +9,19 @@ public interface ReceiptDetailService extends IService<ReceiptDetail>{ |
9 | 9 | |
10 | 10 | AjaxResult updateReceiptDetaial(ReceiptDetail receiptDetail); |
11 | 11 | |
12 | + /** | |
13 | + * 根据流程配置更新入库明细下一流程 | |
14 | + * @param receiptDetail | |
15 | + * @return | |
16 | + */ | |
12 | 17 | ReceiptDetail queryflow(ReceiptDetail receiptDetail); |
13 | 18 | |
19 | + /** | |
20 | + * @description 更新头表尾状态 | |
21 | + * 每次明细表更新后调用该方法 | |
22 | + * 当所有明细表到达该状态时,更新头表状态 | |
23 | + * @param id 头表id | |
24 | + */ | |
14 | 25 | void updateReceiptHeaderLastStatus(Integer id); |
15 | 26 | |
16 | 27 | AjaxResult approval(String ids, Integer approval); |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptDetail/service/ReceiptDetailServiceImpl.java
... | ... | @@ -91,7 +91,7 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R |
91 | 91 | ReceiptDetail receiptDetail1 = queryflow(receiptDetail); |
92 | 92 | |
93 | 93 | if (this.save(receiptDetail1)) { |
94 | - receiptHeader.setTotalQty(receiptHeader.getTotalQty()+receiptDetail1.getTotalQty()); | |
94 | + receiptHeader.setTotalQty(receiptHeader.getTotalQty().add(receiptDetail1.getTotalQty())); | |
95 | 95 | receiptHeader.setTotalLines(receiptHeader.getTotalLines()+1); |
96 | 96 | receiptHeaderService.updateById(receiptHeader); |
97 | 97 | return AjaxResult.success("新增单据明细成功"); |
... | ... | @@ -127,7 +127,7 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R |
127 | 127 | receiptDetail.setMaterialSpec(material.getSpec()); |
128 | 128 | receiptDetail.setMaterialUnit(material.getUnit()); |
129 | 129 | receiptDetail.setProcessStamp("0"); |
130 | - receiptHeader.setTotalQty(receiptHeader.getTotalQty()-originalReceiptDetail.getTotalQty()); | |
130 | + receiptHeader.setTotalQty(receiptHeader.getTotalQty().subtract(originalReceiptDetail.getTotalQty())); | |
131 | 131 | receiptHeader.setTotalLines(receiptHeader.getTotalLines()-1); |
132 | 132 | if ( !receiptHeaderService.updateById(receiptHeader)){ |
133 | 133 | return AjaxResult.error("入库头表更新失败"); |
... | ... | @@ -144,7 +144,7 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R |
144 | 144 | return AjaxResult.error("入库明细更新失败"); |
145 | 145 | } else { |
146 | 146 | |
147 | - receiptHeader.setTotalQty(receiptHeader.getTotalQty()+receiptDetail.getTotalQty()); | |
147 | + receiptHeader.setTotalQty(receiptHeader.getTotalQty().add(receiptDetail.getTotalQty())); | |
148 | 148 | receiptHeader.setTotalLines(receiptHeader.getTotalLines()+1); |
149 | 149 | receiptHeaderService.updateById(receiptHeader); |
150 | 150 | return AjaxResult.success("修改单据明细成功"); |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptHeader/domain/ReceiptHeader.java
src/main/java/com/huaheng/pc/receipt/receiving/service/ReceivingService.java
... | ... | @@ -17,6 +17,7 @@ import com.huaheng.pc.config.material.domain.Material; |
17 | 17 | import com.huaheng.pc.config.material.service.MaterialService; |
18 | 18 | import com.huaheng.pc.config.materialType.domain.MaterialType; |
19 | 19 | import com.huaheng.pc.config.materialType.service.MaterialTypeService; |
20 | +import com.huaheng.pc.config.receiptPreference.domain.ReceiptPreference; | |
20 | 21 | import com.huaheng.pc.config.receiptPreference.service.ReceiptPreferenceService; |
21 | 22 | import com.huaheng.pc.receipt.receiptContainerDetail.domain.ReceiptContainerDetail; |
22 | 23 | import com.huaheng.pc.receipt.receiptContainerDetail.service.ReceiptContainerDetailService; |
... | ... | @@ -91,28 +92,34 @@ public class ReceivingService { |
91 | 92 | String locatingRule = receiptContainerHeader.getLocatingRule(); //定位规则 |
92 | 93 | if (StringUtils.isNotEmpty(locatingRule)){ |
93 | 94 | //入库组盘头表中定位规则不为空时执行 |
94 | - } else if ((locatingRule = receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId()).getLocatingRule()) != null ){ | |
95 | + } else if (locatingRule == null){ | |
96 | + locatingRule = receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId()).getLocatingRule(); | |
95 | 97 | //入库单明细定位规则不为空时执行 |
96 | - } else { | |
97 | - //入库单明细为空时,查询物料表中是否含有定位规则 | |
98 | - LambdaQueryWrapper<Material> materialLambda = Wrappers.lambdaQuery(); | |
99 | - materialLambda.eq(Material::getCode, receiptContainerDetail.getMaterialCode()); | |
100 | - Material material = materialService.getOne(materialLambda); | |
101 | - locatingRule = material.getLocatingRule(); | |
102 | - if (locatingRule == null){ | |
103 | - //物料表中定位规则为空时,查询物料类别 | |
104 | - LambdaQueryWrapper<MaterialType> materialTypeLambda = Wrappers.lambdaQuery(); | |
105 | - materialTypeLambda.eq(MaterialType::getCode, material.getType()); | |
106 | - MaterialType materialType = materialTypeService.getOne(materialTypeLambda); | |
107 | - locatingRule = materialType.getLocatingRule(); | |
98 | + if (StringUtils.isEmpty(locatingRule)){ | |
99 | + //入库单明细为空时,查询物料表中是否含有定位规则 | |
100 | + LambdaQueryWrapper<Material> materialLambda = Wrappers.lambdaQuery(); | |
101 | + materialLambda.eq(Material::getCode, receiptContainerDetail.getMaterialCode()); | |
102 | + Material material = materialService.getOne(materialLambda); | |
103 | + locatingRule = material.getLocatingRule(); | |
104 | + | |
108 | 105 | if (locatingRule == null){ |
109 | - //物料类别中定位规则为空时,查询入库首选项 | |
110 | - LambdaQueryWrapper<ConfigValue> configValueLambda = Wrappers.lambdaQuery(); | |
111 | - configValueLambda.eq(ConfigValue::getWarehouseCode, ShiroUtils.getWarehouseCode()) | |
112 | - .eq(ConfigValue::getModuleType, "入库") | |
113 | - .eq(ConfigValue::getRecordType, "入库首选项"); | |
114 | - ConfigValue configValue = configValueService.getOne(configValueLambda); | |
115 | - locatingRule = preferenceService.getById(configValue.getId()).getLocationRule(); | |
106 | + //物料表中定位规则为空时,查询物料类别 | |
107 | + LambdaQueryWrapper<MaterialType> materialTypeLambda = Wrappers.lambdaQuery(); | |
108 | + materialTypeLambda.eq(MaterialType::getCode, material.getType()); | |
109 | + MaterialType materialType = materialTypeService.getOne(materialTypeLambda); | |
110 | + locatingRule = materialType.getLocatingRule(); | |
111 | + if (StringUtils.isEmpty(locatingRule)){ | |
112 | + //物料类别中定位规则为空时,查询入库首选项 | |
113 | + LambdaQueryWrapper<ConfigValue> configValueLambda = Wrappers.lambdaQuery(); | |
114 | + configValueLambda.eq(ConfigValue::getWarehouseCode, ShiroUtils.getWarehouseCode()) | |
115 | + .eq(ConfigValue::getModuleType, "入库") | |
116 | + .eq(ConfigValue::getRecordType, "入库首选项"); | |
117 | + ConfigValue configValue = configValueService.getOne(configValueLambda); | |
118 | + LambdaQueryWrapper<ReceiptPreference> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
119 | + lambdaQueryWrapper.eq(ReceiptPreference::getCode, configValue.getValue()); | |
120 | + ReceiptPreference receiptPreference = preferenceService.getOne(lambdaQueryWrapper); | |
121 | + locatingRule = preferenceService.getOne(lambdaQueryWrapper).getLocationRule(); | |
122 | + } | |
116 | 123 | } |
117 | 124 | } |
118 | 125 | } |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... | ... | @@ -544,7 +544,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
544 | 544 | // inventoryTransaction.setManufactureDate(new SimpleDateFormat("yyyy-MM-dd").parse(map.get("manufactureDate").toString()));//生产日期 |
545 | 545 | // inventoryTransaction.setExpirationDate(DataUtils.getDateTime(map.get("expirationDate"))); |
546 | 546 | inventoryTransaction.setInventorySts(DataUtils.getString((map.get("inventorySts")))); |
547 | - inventoryTransaction.setTaskQty(0); | |
547 | + inventoryTransaction.setTaskQty(DataUtils.getBigDecimal(map.get("qty"))); | |
548 | 548 | inventoryTransaction.setCreated(new Date()); |
549 | 549 | inventoryTransaction.setCreatedBy(ShiroUtils.getLoginName()); |
550 | 550 | if (!inventoryTransactionService.save(inventoryTransaction)) |
... | ... | @@ -777,7 +777,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
777 | 777 | inventoryTransaction.setMaterialName(item.getMaterialName()); |
778 | 778 | inventoryTransaction.setMaterialSpec(item.getMaterialSpec()); |
779 | 779 | inventoryTransaction.setMaterialUnit(item.getMaterialUnit()); |
780 | - inventoryTransaction.setTaskQty(0); | |
780 | + inventoryTransaction.setTaskQty(BigDecimal.ZERO); | |
781 | 781 | inventoryTransaction.setInventorySts(item.getInventorySts()); |
782 | 782 | //inventoryTransaction.setReferCode(); |
783 | 783 | //inventoryTransaction.setQcCheck(); |
... | ... | @@ -1136,7 +1136,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1136 | 1136 | taskDetail.setBillCode(item.getReceiptCode()); |
1137 | 1137 | taskDetail.setBillDetailId(item.getReceiptDetailId()); |
1138 | 1138 | taskDetail.setBillCode(item.getReceiptCode()); |
1139 | - taskDetail.setQty(BigDecimal.valueOf(item.getQty())); | |
1139 | + taskDetail.setQty(item.getQty()); | |
1140 | 1140 | taskDetail.setContainerCode(task.getContainerCode()); |
1141 | 1141 | taskDetail.setFromLocation(task.getFromLocation()); |
1142 | 1142 | taskDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); |
... | ... | @@ -1232,7 +1232,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1232 | 1232 | inventoryTransaction.setExpirationDate(shipmentDetail.getExpirationDate()); |
1233 | 1233 | inventoryTransaction.setInventorySts(inventoryDetail.getInventorySts()); |
1234 | 1234 | //这里取反,更符合出库的语义,同时方便对记录进行统计 |
1235 | - inventoryTransaction.setTaskQty(taskDetail.getQty().intValue()); | |
1235 | + inventoryTransaction.setTaskQty(taskDetail.getQty()); | |
1236 | 1236 | // inventoryTransaction.setCostPrice(shipmentDetail.); |
1237 | 1237 | inventoryTransaction.setCreated(null); |
1238 | 1238 | inventoryTransaction.setCreatedBy(ShiroUtils.getLoginName()); |
... | ... |
src/main/resources/mybatis/inventory/AdjustDetailMapper.xml
... | ... | @@ -6,6 +6,7 @@ |
6 | 6 | <id column="id" jdbcType="INTEGER" property="id" /> |
7 | 7 | <result column="adjustCode" jdbcType="VARCHAR" property="adjustCode" /> |
8 | 8 | <result column="cycleCountCode" jdbcType="VARCHAR" property="cycleCountCode" /> |
9 | + <result column="inventoryDetailId" jdbcType="INTEGER" property="inventoryDetailId" /> | |
9 | 10 | <result column="cycleDetailId" jdbcType="INTEGER" property="cycleDetailId" /> |
10 | 11 | <result column="checkCode" jdbcType="VARCHAR" property="checkCode" /> |
11 | 12 | <result column="checkDetailId" jdbcType="VARCHAR" property="checkDetailId" /> |
... | ... | @@ -29,6 +30,8 @@ |
29 | 30 | <result column="status" jdbcType="INTEGER" property="status" /> |
30 | 31 | <result column="createdBy" jdbcType="VARCHAR" property="createdBy" /> |
31 | 32 | <result column="created" jdbcType="TIMESTAMP" property="created" /> |
33 | + <result column="lastUpdatedBy" jdbcType="VARCHAR" property="lastUpdatedBy" /> | |
34 | + <result column="lastUpdated" jdbcType="TIMESTAMP" property="lastUpdated" /> | |
32 | 35 | <result column="agreeBy" jdbcType="VARCHAR" property="agreeBy" /> |
33 | 36 | <result column="agreeTime" jdbcType="TIMESTAMP" property="agreeTime" /> |
34 | 37 | <result column="Remark" jdbcType="VARCHAR" property="remark" /> |
... | ... | @@ -40,10 +43,10 @@ |
40 | 43 | </resultMap> |
41 | 44 | <sql id="Base_Column_List"> |
42 | 45 | <!--@mbg.generated--> |
43 | - id, adjustCode, cycleCountCode, cycleDetailId, checkCode, checkDetailId, referCode, | |
46 | + id, adjustCode, cycleCountCode, inventoryDetailId, cycleDetailId, checkCode, checkDetailId, referCode, | |
44 | 47 | referDetailId, warehouseCode, companyCode, containerCode, locationCode ,materialCode, materialName, |
45 | 48 | materialSpec, materialUnit, problemType, attributeId, fromInventorySts, toInventorySts, |
46 | - fromQty, toQty, gapQty, `status`, created, createdBy, agreeTime, Remark, | |
49 | + fromQty, toQty, gapQty, `status`, created, createdBy,lastUpdatedBy,lastUpdated, agreeTime, Remark, | |
47 | 50 | version, userDef1, userDef2, userDef3, processStamp |
48 | 51 | </sql> |
49 | 52 | </mapper> |
50 | 53 | \ No newline at end of file |
... | ... |
src/main/resources/mybatis/inventory/InventoryTransactionMapper.xml
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | <result column="materialName" jdbcType="VARCHAR" property="materialName" /> |
14 | 14 | <result column="materialSpec" jdbcType="VARCHAR" property="materialSpec" /> |
15 | 15 | <result column="materialUnit" jdbcType="VARCHAR" property="materialUnit" /> |
16 | - <result column="taskQty" jdbcType="INTEGER" property="taskQty" /> | |
16 | + <result column="taskQty" jdbcType="DECIMAL" property="taskQty" /> | |
17 | 17 | <result column="inventorySts" jdbcType="VARCHAR" property="inventorySts" /> |
18 | 18 | <result column="referCode" jdbcType="VARCHAR" property="referCode" /> |
19 | 19 | <result column="referDetailId" jdbcType="VARCHAR" property="referDetailId" /> |
... | ... |
src/main/resources/templates/config/materialMultiple/edit.html
... | ... | @@ -24,13 +24,13 @@ |
24 | 24 | <div class="form-group"> |
25 | 25 | <label class="col-sm-3 control-label">单位1:</label> |
26 | 26 | <div class="col-sm-8"> |
27 | - <input id="unit1" name="unit1" class="form-control" type="text" th:field="*{unit1}"> | |
27 | + <input id="unit1" name="unit1" class="form-control" type="text" th:field="*{unitId1}"> | |
28 | 28 | </div> |
29 | 29 | </div> |
30 | 30 | <div class="form-group"> |
31 | 31 | <label class="col-sm-3 control-label">单位2:</label> |
32 | 32 | <div class="col-sm-8"> |
33 | - <input id="unit2" name="unit2" class="form-control" type="text" th:field="*{unit2}"> | |
33 | + <input id="unit2" name="unit2" class="form-control" type="text" th:field="*{unitId2}"> | |
34 | 34 | </div> |
35 | 35 | </div> |
36 | 36 | <div class="form-group"> |
... | ... |
src/main/resources/templates/config/materialMultiple/materialMultiple.html
src/main/resources/templates/config/materialType/add.html
... | ... | @@ -40,7 +40,7 @@ |
40 | 40 | <div class="form-group"> |
41 | 41 | <label class="col-sm-3 control-label">入库流程:</label> |
42 | 42 | <div class="col-sm-8"> |
43 | - <select id="receivingFlow" name="receivingFlow" class="form-control" th:with="list=${@StatusFlow.flowList()}"> | |
43 | + <select id="receivingFlow" name="receivingFlow" class="form-control" th:with="list=${@StatusFlow.flowList('入库单')}"> | |
44 | 44 | <option value="">请选择</option> |
45 | 45 | <option th:each="flow : ${list}" th:text="${flow['name']}" th:value="${flow['code']}"></option> |
46 | 46 | </select> |
... | ... | @@ -49,7 +49,7 @@ |
49 | 49 | <div class="form-group"> |
50 | 50 | <label class="col-sm-3 control-label">出库流程:</label> |
51 | 51 | <div class="col-sm-8"> |
52 | - <select id="shippingFlow" name="shippingFlow" class="form-control" th:with="list=${@StatusFlow.flowList()}"> | |
52 | + <select id="shippingFlow" name="shippingFlow" class="form-control" th:with="list=${@StatusFlow.flowList('出库单')}"> | |
53 | 53 | <option value="">请选择</option> |
54 | 54 | <option th:each="flow : ${list}" th:text="${flow['name']}" th:value="${flow['code']}"></option> |
55 | 55 | </select> |
... | ... | @@ -67,25 +67,37 @@ |
67 | 67 | <div class="form-group"> |
68 | 68 | <label class="col-sm-3 control-label">分配规则:</label> |
69 | 69 | <div class="col-sm-8"> |
70 | - <input id="allocationRule" name="allocationRule" class="form-control" type="text"> | |
70 | + <select id="allocationRule" name="allocationRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('分配规则')}"> | |
71 | + <option value="">请选择</option> | |
72 | + <option th:each="flow : ${list}" th:text="${flow['description']}" th:value="${flow['code']}"></option> | |
73 | + </select> | |
71 | 74 | </div> |
72 | 75 | </div> |
73 | 76 | <div class="form-group"> |
74 | 77 | <label class="col-sm-3 control-label">补货规则:</label> |
75 | 78 | <div class="col-sm-8"> |
76 | - <input id="replenishmentRule" name="replenishmentRule" class="form-control" type="text"> | |
79 | + <select id="replenishmentRule" name="replenishmentRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('补货规则')}"> | |
80 | + <option value="">请选择</option> | |
81 | + <option th:each="flow : ${list}" th:text="${flow['description']}" th:value="${flow['code']}"></option> | |
82 | + </select> | |
77 | 83 | </div> |
78 | 84 | </div> |
79 | 85 | <div class="form-group"> |
80 | 86 | <label class="col-sm-3 control-label">空货位规则:</label> |
81 | 87 | <div class="col-sm-8"> |
82 | - <input id="emptyLocRule" name="emptyLocRule" class="form-control" type="text"> | |
88 | + <select id="emptyLocRule" name="emptyLocRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('空货位规则')}"> | |
89 | + <option value="">请选择</option> | |
90 | + <option th:each="flow : ${list}" th:text="${flow['description']}" th:value="${flow['code']}"></option> | |
91 | + </select> | |
83 | 92 | </div> |
84 | 93 | </div> |
85 | 94 | <div class="form-group"> |
86 | 95 | <label class="col-sm-3 control-label">拣货规则:</label> |
87 | 96 | <div class="col-sm-8"> |
88 | - <input id="pickingRule" name="pickingRule" class="form-control" type="text"> | |
97 | + <select id="pickingRule" name="pickingRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('出库')}"> | |
98 | + <option value="">请选择</option> | |
99 | + <option th:each="flow : ${list}" th:text="${flow['description']}" th:value="${flow['code']}"></option> | |
100 | + </select> | |
89 | 101 | </div> |
90 | 102 | </div> |
91 | 103 | <div class="form-group"> |
... | ... | @@ -171,6 +183,10 @@ |
171 | 183 | tableValue = formValueReplace(tableValue, "receivingFlow", $("#receivingFlow option:selected").val()); |
172 | 184 | tableValue = formValueReplace(tableValue, "shippingFlow", $("#shippingFlow option:selected").val()); |
173 | 185 | tableValue = formValueReplace(tableValue, "locatingRule", $("#locatingRule option:selected").val()); |
186 | + tableValue = formValueReplace(tableValue, "allocationRule", $("#allocationRule option:selected").val()); | |
187 | + tableValue = formValueReplace(tableValue, "replenishmentRule", $("#replenishmentRule option:selected").val()); | |
188 | + tableValue = formValueReplace(tableValue, "emptyLocRule", $("#emptyLocRule option:selected").val()); | |
189 | + tableValue = formValueReplace(tableValue, "pickingRule", $("#pickingRule option:selected").val()); | |
174 | 190 | $.operate.save(prefix + "/add", tableValue); |
175 | 191 | } |
176 | 192 | }); |
... | ... |
src/main/resources/templates/config/materialType/edit.html
... | ... | @@ -43,7 +43,7 @@ |
43 | 43 | <div class="form-group"> |
44 | 44 | <label class="col-sm-3 control-label">入库流程:</label> |
45 | 45 | <div class="col-sm-8"> |
46 | - <select id="receivingFlow" name="receivingFlow" class="form-control" th:with="list=${@StatusFlow.flowList()}" th:field="*{receivingFlow}"> | |
46 | + <select id="receivingFlow" name="receivingFlow" class="form-control" th:with="list=${@StatusFlow.flowList('入库单')}" th:field="*{receivingFlow}"> | |
47 | 47 | <option value="">请选择</option> |
48 | 48 | <option th:each="flow : ${list}" th:text="${flow['name']}" th:value="${flow['code']}"></option> |
49 | 49 | </select> |
... | ... | @@ -52,7 +52,7 @@ |
52 | 52 | <div class="form-group"> |
53 | 53 | <label class="col-sm-3 control-label">出库流程:</label> |
54 | 54 | <div class="col-sm-8"> |
55 | - <select id="shippingFlow" name="shippingFlow" class="form-control" th:with="list=${@StatusFlow.flowList()}" th:field="*{shippingFlow}"> | |
55 | + <select id="shippingFlow" name="shippingFlow" class="form-control" th:with="list=${@StatusFlow.flowList('出库单')}" th:field="*{shippingFlow}"> | |
56 | 56 | <option value="">请选择</option> |
57 | 57 | <option th:each="flow : ${list}" th:text="${flow['name']}" th:value="${flow['code']}"></option> |
58 | 58 | </select> |
... | ... | @@ -71,25 +71,41 @@ |
71 | 71 | <div class="form-group"> |
72 | 72 | <label class="col-sm-3 control-label">分配规则:</label> |
73 | 73 | <div class="col-sm-8"> |
74 | - <input id="allocationRule" name="allocationRule" class="form-control" type="text" th:field="*{allocationRule}"> | |
74 | + <select id="allocationRule" name="allocationRule" class="form-control" | |
75 | + th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('分配规则')}" th:field="*{allocationRule}"> | |
76 | + <option value="">请选择</option> | |
77 | + <option th:each="flow : ${list}" th:text="${flow['description']}" th:value="${flow['code']}"></option> | |
78 | + </select> | |
75 | 79 | </div> |
76 | 80 | </div> |
77 | 81 | <div class="form-group"> |
78 | 82 | <label class="col-sm-3 control-label">补货规则:</label> |
79 | 83 | <div class="col-sm-8"> |
80 | - <input id="replenishmentRule" name="replenishmentRule" class="form-control" type="text" th:field="*{replenishmentRule}"> | |
84 | + <select id="replenishmentRule" name="replenishmentRule" class="form-control" | |
85 | + th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('补货规则')}" th:field="*{replenishmentRule}"> | |
86 | + <option value="">请选择</option> | |
87 | + <option th:each="flow : ${list}" th:text="${flow['description']}" th:value="${flow['code']}"></option> | |
88 | + </select> | |
81 | 89 | </div> |
82 | 90 | </div> |
83 | 91 | <div class="form-group"> |
84 | 92 | <label class="col-sm-3 control-label">空货位规则:</label> |
85 | 93 | <div class="col-sm-8"> |
86 | - <input id="emptyLocRule" name="emptyLocRule" class="form-control" type="text" th:field="*{emptyLocRule}"> | |
94 | + <select id="emptyLocRule" name="emptyLocRule" class="form-control" | |
95 | + th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('空货位规则')}" th:field="*{emptyLocRule}"> | |
96 | + <option value="">请选择</option> | |
97 | + <option th:each="flow : ${list}" th:text="${flow['description']}" th:value="${flow['code']}"></option> | |
98 | + </select> | |
87 | 99 | </div> |
88 | 100 | </div> |
89 | 101 | <div class="form-group"> |
90 | 102 | <label class="col-sm-3 control-label">拣货规则:</label> |
91 | 103 | <div class="col-sm-8"> |
92 | - <input id="pickingRule" name="pickingRule" class="form-control" type="text" th:field="*{pickingRule}"> | |
104 | + <select id="pickingRule" name="pickingRule" class="form-control" | |
105 | + th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('出库')}" th:field="*{pickingRule}"> | |
106 | + <option value="">请选择</option> | |
107 | + <option th:each="flow : ${list}" th:text="${flow['description']}" th:value="${flow['code']}"></option> | |
108 | + </select> | |
93 | 109 | </div> |
94 | 110 | </div> |
95 | 111 | <div class="form-group"> |
... | ... | @@ -174,6 +190,11 @@ |
174 | 190 | tableValue = formValueReplace(tableValue, "companyCode", $("#companyCode option:selected").val()); |
175 | 191 | tableValue = formValueReplace(tableValue, "receivingFlow", $("#receivingFlow option:selected").val()); |
176 | 192 | tableValue = formValueReplace(tableValue, "shippingFlow", $("#shippingFlow option:selected").val()); |
193 | + tableValue = formValueReplace(tableValue, "locatingRule", $("#locatingRule option:selected").val()); | |
194 | + tableValue = formValueReplace(tableValue, "allocationRule", $("#allocationRule option:selected").val()); | |
195 | + tableValue = formValueReplace(tableValue, "replenishmentRule", $("#replenishmentRule option:selected").val()); | |
196 | + tableValue = formValueReplace(tableValue, "emptyLocRule", $("#emptyLocRule option:selected").val()); | |
197 | + tableValue = formValueReplace(tableValue, "pickingRule", $("#pickingRule option:selected").val()); | |
177 | 198 | $.operate.save(prefix + "/edit", tableValue); |
178 | 199 | } |
179 | 200 | }); |
... | ... |
src/main/resources/templates/config/materialType/materialType.html
src/main/resources/templates/config/receiptPreference/add.html
... | ... | @@ -20,25 +20,27 @@ |
20 | 20 | <div class="form-group"> |
21 | 21 | <label class="col-sm-3 control-label">入库流程:</label> |
22 | 22 | <div class="col-sm-8"> |
23 | - <input id="receiptFlow" name="receiptFlow" class="form-control" type="text"> | |
23 | + <select id="receiptFlow" name="receiptFlow" class="form-control" th:with="statusFlowList=${@StatusFlow.flowList('入库单')}"> | |
24 | + <option th:each="flow : ${statusFlowList}" th:text="${flow['name']}" th:value="${flow['code']}"></option> | |
25 | + </select> | |
24 | 26 | </div> |
25 | 27 | </div> |
26 | 28 | <div class="form-group"> |
27 | 29 | <label class="col-sm-3 control-label">自动生成托盘号:</label> |
28 | 30 | <div class="col-sm-8"> |
29 | - <input id="autoAssignLPN" name="autoAssignLPN" class="form-control" type="text"> | |
31 | + <select id="autoAssignLPN" name="autoAssignLPN" class="form-control"> | |
32 | + <option value="0">自动生成</option> | |
33 | + <option value="1">不自动生成</option> | |
34 | + </select> | |
30 | 35 | </div> |
31 | 36 | </div> |
32 | 37 | <div class="form-group"> |
33 | 38 | <label class="col-sm-3 control-label">允许超收:</label> |
34 | 39 | <div class="col-sm-8"> |
35 | - <div class="onoffswitch"> | |
36 | - <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="allowOverReceiving" name="allowOverReceiving"> | |
37 | - <label class="onoffswitch-label" for="allowOverReceiving"> | |
38 | - <span class="onoffswitch-inner"></span> | |
39 | - <span class="onoffswitch-switch"></span> | |
40 | - </label> | |
41 | - </div> | |
40 | + <select id="allowOverReceiving" name="allowOverReceiving" class="form-control"> | |
41 | + <option value="0">允许</option> | |
42 | + <option value="1">不允许</option> | |
43 | + </select> | |
42 | 44 | </div> |
43 | 45 | </div> |
44 | 46 | <div class="form-group"> |
... | ... | @@ -50,13 +52,19 @@ |
50 | 52 | <div class="form-group"> |
51 | 53 | <label class="col-sm-3 control-label">自动定位:</label> |
52 | 54 | <div class="col-sm-8"> |
53 | - <input id="autoLocate" name="autoLocate" class="form-control" type="text"> | |
55 | + <select id="autoLocate" name="autoLocate" class="form-control"> | |
56 | + <option value="0">是</option> | |
57 | + <option value="1">否</option> | |
58 | + </select> | |
54 | 59 | </div> |
55 | 60 | </div> |
56 | 61 | <div class="form-group"> |
57 | 62 | <label class="col-sm-3 control-label">RF显示未收数量:</label> |
58 | 63 | <div class="col-sm-8"> |
59 | - <input id="showOpenQty" name="showOpenQty" class="form-control" type="text"> | |
64 | + <select id="showOpenQty" name="showOpenQty" class="form-control"> | |
65 | + <option value="0">是</option> | |
66 | + <option value="1">否</option> | |
67 | + </select> | |
60 | 68 | </div> |
61 | 69 | </div> |
62 | 70 | <div class="form-group"> |
... | ... | @@ -74,13 +82,20 @@ |
74 | 82 | <div class="form-group"> |
75 | 83 | <label class="col-sm-3 control-label">定位规则:</label> |
76 | 84 | <div class="col-sm-8"> |
77 | - <input id="locationRule" name="locationRule" class="form-control" type="text"> | |
85 | + <select id="locatingRule" name="locatingRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('入库')}"> | |
86 | + <option value="">请选择</option> | |
87 | + <option th:each="item : ${list}" th:text="${item['description']}" th:value="${item['code']}"></option> | |
88 | + </select> | |
78 | 89 | </div> |
79 | 90 | </div> |
80 | 91 | <div class="form-group"> |
81 | 92 | <label class="col-sm-3 control-label">空库位规则:</label> |
82 | 93 | <div class="col-sm-8"> |
83 | - <input id="emptyLocRule" name="emptyLocRule" class="form-control" type="text"> | |
94 | + <select id="emptyLocRule" name="emptyLocRule" class="form-control" | |
95 | + th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('空库位规则')}"> | |
96 | + <option value="">请选择</option> | |
97 | + <option th:each="item : ${list}" th:text="${item['description']}" th:value="${item['code']}"></option> | |
98 | + </select> | |
84 | 99 | </div> |
85 | 100 | </div> |
86 | 101 | <div class="form-group"> |
... | ... | @@ -268,8 +283,14 @@ |
268 | 283 | }, |
269 | 284 | submitHandler: function(form) { |
270 | 285 | var tableValue = $.common.getTableValue("#form-receiptPreference-add"); |
271 | - tableValue = formValueReplace(tableValue, "allowOverReceiving", $("input[name='allowOverReceiving']").is(':checked')); | |
272 | - $.operate.save(prefix + "/edit", tableValue); | |
286 | + tableValue = formValueReplace(tableValue, "allowOverReceiving", $("#allowOverReceiving option:selected").val()); | |
287 | + tableValue = formValueReplace(tableValue, "receiptFlow", $("#receiptFlow option:selected").val()); | |
288 | + tableValue = formValueReplace(tableValue, "autoAssignLPN", $("#autoAssignLPN option:selected").val()); | |
289 | + tableValue = formValueReplace(tableValue, "autoLocate", $("#autoLocate option:selected").val()); | |
290 | + tableValue = formValueReplace(tableValue, "showOpenQty", $("#showOpenQty option:selected").val()); | |
291 | + tableValue = formValueReplace(tableValue, "locatingRule", $("#locatingRule option:selected").val()); | |
292 | + tableValue = formValueReplace(tableValue, "emptyLocRule", $("#emptyLocRule option:selected").val()); | |
293 | + $.operate.save(prefix + "/add", tableValue); | |
273 | 294 | } |
274 | 295 | }); |
275 | 296 | </script> |
... | ... |
src/main/resources/templates/config/receiptType/add.html
... | ... | @@ -46,7 +46,7 @@ |
46 | 46 | <div class="form-group"> |
47 | 47 | <label class="col-sm-3 control-label">入库流程:</label> |
48 | 48 | <div class="col-sm-8"> |
49 | - <select id="receiptFlow" name="receiptFlow" class="form-control" th:with="statusFlowList=${@StatusFlow.flowList()}"> | |
49 | + <select id="receiptFlow" name="receiptFlow" class="form-control" th:with="statusFlowList=${@StatusFlow.flowList('入库单')}"> | |
50 | 50 | <option th:each="flow : ${statusFlowList}" th:text="${flow['name']}" th:value="${flow['code']}"></option> |
51 | 51 | </select> |
52 | 52 | </div> |
... | ... |
src/main/resources/templates/config/receiptType/edit.html
... | ... | @@ -48,7 +48,7 @@ |
48 | 48 | <div class="form-group"> |
49 | 49 | <label class="col-sm-3 control-label">入库流程:</label> |
50 | 50 | <div class="col-sm-8"> |
51 | - <select id="receiptFlow" name="receiptFlow" class="form-control" th:with="statusFlowList=${@StatusFlow.flowList()}" th:field="*{receiptFlow}"> | |
51 | + <select id="receiptFlow" name="receiptFlow" class="form-control" th:with="statusFlowList=${@StatusFlow.flowList('入库单')}" th:field="*{receiptFlow}"> | |
52 | 52 | <option th:each="flow : ${statusFlowList}" th:text="${flow['name']}" th:value="${flow['code']}"></option> |
53 | 53 | </select> |
54 | 54 | </div> |
... | ... |
src/main/resources/templates/inventory/adjustDetail/adjustDetail.html
... | ... | @@ -94,18 +94,13 @@ |
94 | 94 | <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()"> |
95 | 95 | <i class="fa fa-plus"></i> 新增 |
96 | 96 | </a> |
97 | - <!--<a class="btn btn-outline btn-danger btn-rounded" onclick="addAdjust()"/> | |
98 | - <!–shiro:hasPermission="inventory:cyclecountAdjustDetail:addAdjust"–> | |
97 | + <a class="btn btn-outline btn-primary btn-rounded" onclick=""> | |
98 | + <i class="fa fa-edit"></i> 审核 | |
99 | + </a> | |
100 | + <a class="btn btn-outline btn-danger btn-rounded" onclick="addAdjust()"/> | |
101 | + <!--shiro:hasPermission="inventory:cyclecountAdjustDetail:addAdjust"--> | |
99 | 102 | <i class="fa fa-vcard"></i>调整 |
100 | - </a>--> | |
101 | - <!--<a class="btn btn-outline btn-danger btn-rounded" onclick="createCyclecountWithGapQty()" | |
102 | - shiro:hasPermission="inventoryHeader:cycleCountDetail:cyclecountRepeat"> | |
103 | - <i class="fa fa-vcard"></i> 差异复盘 | |
104 | - </a>--> | |
105 | - <!--<a class="btn btn-outline btn-danger btn-rounded" onclick="adjust()" | |
106 | - shiro:hasPermission="inventoryHeader:cycleCountDetail:adjust"> | |
107 | - <i class="fa fa-vcard"></i> 差异库存调整 | |
108 | - </a>--> | |
103 | + </a> | |
109 | 104 | <!--<a class="btn btn-outline btn-success btn-rounded" onclick="$.table.refresh()"> |
110 | 105 | <i class="fa fa-refresh"></i> 刷新 |
111 | 106 | </a>--> |
... | ... | @@ -138,15 +133,15 @@ |
138 | 133 | { |
139 | 134 | radio: true |
140 | 135 | }, |
141 | - { | |
136 | + /*{ | |
142 | 137 | title: '调整操作', |
143 | 138 | align: 'center', |
144 | 139 | formatter: function (value, row, index) { |
145 | 140 | var actions = []; |
146 | - actions.push('<a class="btn btn-warning btn-xs " href="#" onclick="$.operate.addAdjust()"><i class="fa fa-trash-o"></i>调整</a> '); | |
141 | + actions.push('<a class="btn btn-warning btn-xs " href="#" onclick="addAdjust(\'' + row.id + '\')"><i class="fa fa-send"></i> 调整</a> '); | |
147 | 142 | return actions.join(''); |
148 | 143 | } |
149 | - }, | |
144 | + },*/ | |
150 | 145 | { |
151 | 146 | field: 'id', |
152 | 147 | title: '明细id', |
... | ... | @@ -158,6 +153,12 @@ |
158 | 153 | visible: true |
159 | 154 | }, |
160 | 155 | { |
156 | + field: 'inventoryDetailId', | |
157 | + title: '库存明细', | |
158 | + visible: true | |
159 | + }, | |
160 | + | |
161 | + { | |
161 | 162 | field: 'warehouseCode', |
162 | 163 | title: '仓库', |
163 | 164 | visible: false |
... | ... | @@ -380,21 +381,13 @@ |
380 | 381 | |
381 | 382 | $.modal.confirm("注意:该操作将更改库存,当实盘数量为0且库位上只剩空容器时,请手动执行空托出库任务,容器上有货则无需其他操作!", |
382 | 383 | function () { |
383 | - var cyclecountAdjustId = $('#cyclecountAdjustId').val(); | |
384 | - var companyCode = $('#companyCode').val(); | |
385 | - var code = $('#code').val(); | |
386 | - var cyclecountHeadCode = $('#sourceCode').val(); | |
387 | - //判断有没有选取明细条目,进的页面不同 | |
388 | - if (row.length !== 0) { | |
389 | 384 | /*判断是否已经调整过*/ |
390 | - if (row[0].status == 40) { | |
385 | + if (row[0].status == 2) { | |
391 | 386 | $.modal.msg('该条明细已调整,请勿重复调整!') |
392 | 387 | } else { |
393 | 388 | $.modal.open("差异调整单", prefix + "/adjustEdit?id=" + row[0].id) |
394 | 389 | } |
395 | - } else { | |
396 | - $.modal.open("调整单", prefix + "/addAdjust?cyclecountAdjustId=" + cyclecountAdjustId + "&companyCode=" + companyCode + "&code=" + code + "&cyclecountHeadCode=" + cyclecountHeadCode); | |
397 | - } | |
390 | + | |
398 | 391 | }); |
399 | 392 | } |
400 | 393 | |
... | ... |
src/main/resources/templates/receipt/receiptHeader/receiptHeader.html
... | ... | @@ -95,28 +95,75 @@ |
95 | 95 | </div> |
96 | 96 | <div class="tab-pane fade" id="tabDetail"> |
97 | 97 | <div class="col-sm-12 select-info"> |
98 | - <form id = "shipmentHeadForm" > | |
98 | + <form id = "receiptDetail" > | |
99 | + <ul id="tabHead" class="nav nav-tabs"> | |
100 | + <li class="active"><a href="#tabBase" data-toggle="tab">基础数据</a></li> | |
101 | + <li role="presentation" ><a href="#tabCustomer" data-toggle="tab">客户信息</a></li> | |
102 | + <li><a href="#tabExcute" data-toggle="tab">执行信息</a></li> | |
103 | + <li><a href="#tabOther" data-toggle="tab">其他信息</a></li> | |
104 | + <li><a href="#tabSystem" data-toggle="tab">系统信息</a></li> | |
105 | + </ul> | |
99 | 106 | <div class="tab-content"> |
100 | 107 | <div class="tab-pane in active" id="tabBase"> |
101 | 108 | <div class="select-list"> |
102 | 109 | <ul> |
103 | - <!--<input type="hidden" name="warehouseId" id = "shipmentWarehouseId">--> | |
104 | 110 | <li>入库单id:<input type="text" name="receiptId" id="receiptId"></li> |
105 | 111 | <li>入库单号:<input type="text" name="receiptCode" id="receiptCode"></li> |
106 | 112 | <li>货主编码: |
107 | 113 | <input type="text" name="receiptCompanyCode" id="receiptCompanyCode"> |
114 | + <input type="hidden" name="receiptCompanyId" id="receiptCompanyId"> | |
108 | 115 | </li> |
109 | - <li>上游系统单号:<input type="text" name="receiptSourceCode" id="receiptSourceCode"></li> | |
110 | - <li>上游平台:<input type="text" name="receiptSourcePlatform" id="receiptSourcePlatform"></li> | |
111 | - <li> | |
112 | - <!--入库类型:<input type="text" name="sourceCode"/>--> | |
113 | - 入库类型:<select name="type" th:with="type=${@receiptTypeService.getType()}"> | |
114 | - <option value="">所有</option> | |
115 | - <option th:each="e : ${type}" th:text="${e['name']}" th:value="${e['code']}"></option></select> | |
116 | - </li> | |
116 | + <li>上游系统单号:<input type="text" name="referCode" id="referCode"></li> | |
117 | + <li>上游订单类型:<input type="text" name="referType" id="referType"></li> | |
118 | + <li>入库单类型:<input type="text" name="receiptType" id = "receiptType"></li> | |
117 | 119 | <li>总数量:<input type="text" name="receiptTotalQty" id="receiptTotalQty"></li> |
118 | 120 | <li>总行数:<input type="text" name="receiptTotalLines" id="receiptTotalLines"></li> |
121 | + <li>单据头状态:<input type="text" name="receiptFirstStatus" id="receiptFirstStatus"></li> | |
122 | + <li>单据尾状态:<input type="text" name="receiptLastStatus" id="receiptLastStatus"></li> | |
123 | + </ul> | |
124 | + </div> | |
125 | + </div> | |
126 | + <div class="tab-pane fade" id="tabCustomer"> | |
127 | + <div class="select-list"> | |
128 | + <ul> | |
119 | 129 | <li>供应商编码:<input type="text" name="receiptSupplierCode" id="receiptSupplierCode"></li> |
130 | + <li>入库预约时间:<input type="text" name="receiptAppointmentTime" id="receiptAppointmentTime"></li> | |
131 | + </ul> | |
132 | + </div> | |
133 | + </div> | |
134 | + <div class="tab-pane fade" id="tabExcute"> | |
135 | + <div class="select-list"> | |
136 | + <ul> | |
137 | + <li>优先级:<input type="text" name="receiptPriority" id="receiptPriority"></li> | |
138 | + <li>发货站台:<input type="text" name="receiptStation" id="receiptStation"></li> | |
139 | + <li></li> | |
140 | + </ul> | |
141 | + </div> | |
142 | + </div> | |
143 | + <div class="tab-pane fade" id="tabOther"> | |
144 | + <div class="select-list"> | |
145 | + <ul> | |
146 | + <li>备注:<input type="text" name="receiptNote" id="receiptNote"></li> | |
147 | + <li>扩展属性1:<input type="text" name="receiptUserDef1" id="receiptUserDef1"></li> | |
148 | + <li>扩展属性2:<input type="text" name="receiptUserDef2" id="receiptUserDef2"></li> | |
149 | + <li>扩展属性3:<input type="text" name="receiptUserDef3" id="receiptUserDef3"></li> | |
150 | + </ul> | |
151 | + </div> | |
152 | + </div> | |
153 | + <div class="tab-pane fade" id="tabSystem"> | |
154 | + <div class="select-list"> | |
155 | + <ul> | |
156 | + <li>上传备注:<input type="text" name="receiptUploadremark" id="receiptUploadremark"></li> | |
157 | + <li>上传时间:<input type="text" name="receiptUploadTime" id="receiptUploadTime"></li> | |
158 | + <li>上传状态:<input type="text" name="receiptUploadStatus" id="receiptUploadStatus"></li> | |
159 | + <li>创建时间:<input type="text" name="receiptCreated" id="receiptCreated"></li> | |
160 | + <li>创建用户:<input type="text" name="receiptCreatedBy" id="receiptCreatedBy"></li> | |
161 | + <li>最后修改时间:<input type="text" name="receiptLastUpdated" id="receiptLastUpdated"></li> | |
162 | + <li>更新用户:<input type="text" name="receiptLastUpdatedBy" id="receiptLastUpdatedBy"></li> | |
163 | + | |
164 | + | |
165 | + <li>是否有效:<input type="text" name="receiptEnable" id="receiptEnable"></li> | |
166 | + <li>是否删除:<input type="text" name="receiptDeleted" id="receiptDeleted"></li> | |
120 | 167 | </ul> |
121 | 168 | </div> |
122 | 169 | </div> |
... | ... | @@ -582,15 +629,25 @@ |
582 | 629 | receiptCode=value.data.code; |
583 | 630 | $('#receiptCompanyId').val(value.data.companyId); |
584 | 631 | $('#receiptCompanyCode').val(value.data.companyCode); |
585 | - $('#receiptSourceCode').val(value.data.sourceCode); | |
586 | - $('#receiptSourcePlatform').val(value.data.sourcePlatform); | |
587 | - // $('#receiptType').val(receiptTypes.filter(function (e) {return e.dictValue==value.data.type})[0].dictLabel); | |
632 | + $('#referCode').val(value.data.referCode); | |
633 | + $('#referType').val(value.data.referType); | |
588 | 634 | $('#receiptTotalQty').val(value.data.totalQty); |
589 | 635 | $('#receiptTotalLines').val(value.data.totalLines); |
590 | - // $('#receiptFirstStatus').val(receiptHeaderStatus.filter(function (e) {return e.dictValue==value.data.firstStatus})[0].dictLabel); | |
591 | - // $('#receiptLastStatus').val(receiptHeaderStatus.filter(function (e) {return e.dictValue==value.data.lastStatus})[0].dictLabel); | |
636 | + $('#receiptFirstStatus').val(receiptHeaderStatus.filter(function (e) {return e.dictValue==value.data.firstStatus})[0].dictLabel); | |
637 | + $('#receiptLastStatus').val(receiptHeaderStatus.filter(function (e) {return e.dictValue==value.data.lastStatus})[0].dictLabel); | |
592 | 638 | $('#receiptSupplierCode').val(value.data.supplierCode); |
593 | 639 | $('#receiptAppointmentTime').val(value.data.appointmentTime); |
640 | + $('#receiptStation').val(value.data.receiptStation); | |
641 | + $('#receiptNote').val(value.data.receiptNote); | |
642 | + $('#receiptUserDef1').val(value.data.userDef1); | |
643 | + $('#receiptUserDef2').val(value.data.userDef2); | |
644 | + $('#receiptUserDef13').val(value.data.userDef3); | |
645 | + $('#receiptCreated').val(value.data.created); | |
646 | + $('#receiptCreatedBy').val(value.data.createdBy); | |
647 | + $('#receiptLastUpdated').val(value.data.lastUpdated); | |
648 | + $('#receiptLastUpdatedBy').val(value.data.lastUpdatedBy); | |
649 | + $('#receiptEnable').val(value.data.enable); | |
650 | + $('#receiptDeleted').val(value.data.deleted); | |
594 | 651 | } |
595 | 652 | }) |
596 | 653 | } |
... | ... |
src/main/resources/templates/receipt/receiving/receiving.html
... | ... | @@ -257,9 +257,6 @@ |
257 | 257 | }); |
258 | 258 | |
259 | 259 | $("#bootstrap-table1").bootstrapTable({ |
260 | - // url: prefix + "/list", | |
261 | - // createUrl: prefix + "/add", | |
262 | - // updateUrl: prefix + "/edit/{id}", | |
263 | 260 | removeUrl: ctx + "receipt/receiptContainerDetail/remove", |
264 | 261 | // search: true, //搜索 |
265 | 262 | showRefresh: true, //刷新 |
... | ... |