Commit c01282b881891d9c957a0a5f499bc9c13710754d

Authored by mahuandong
1 parent be71744d

修改入库单数量使用BigDecimal类型,修改入库单添加、修改、物理类型添加和修改页面

Showing 23 changed files with 238 additions and 89 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/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&lt;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&lt;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&lt;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&lt;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&lt;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&lt;ReceiptDetail&gt;{
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&lt;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&lt;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&lt;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
... ... @@ -136,7 +136,7 @@ public class ReceiptHeader implements Serializable {
136 136 */
137 137 @TableField(value = "totalQty")
138 138 @ApiModelProperty(value="总数量")
139   - private Integer totalQty;
  139 + private BigDecimal totalQty;
140 140  
141 141 /**
142 142 * 总行数
... ...
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
... ... @@ -1133,7 +1133,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1133 1133 taskDetail.setBillCode(item.getReceiptCode());
1134 1134 taskDetail.setBillDetailId(item.getReceiptDetailId());
1135 1135 taskDetail.setBillCode(item.getReceiptCode());
1136   - taskDetail.setQty(BigDecimal.valueOf(item.getQty()));
  1136 + taskDetail.setQty(item.getQty());
1137 1137 taskDetail.setContainerCode(task.getContainerCode());
1138 1138 taskDetail.setFromLocation(task.getFromLocation());
1139 1139 taskDetail.setLastUpdatedBy(ShiroUtils.getLoginName());
... ...
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
... ... @@ -55,7 +55,7 @@
55 55 createUrl: prefix + "/add",
56 56 updateUrl: prefix + "/edit/{id}",
57 57 removeUrl: prefix + "/remove",
58   - modalName: "wu",
  58 + modalName: "物料单位换算",
59 59 search: false,
60 60 columns: [{
61 61 checkbox: true
... ...
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
... ... @@ -57,7 +57,7 @@
57 57 createUrl: prefix + "/add",
58 58 updateUrl: prefix + "/edit/{id}",
59 59 removeUrl: prefix + "/remove",
60   - modalName: "wu",
  60 + modalName: "物料类别",
61 61 search: false,
62 62 columns: [{
63 63 checkbox: true
... ...
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/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, //刷新
... ...