Commit bae0e162f3e857171c4a8b982741124615d7e4ef
Merge remote-tracking branch 'origin/develop' into develop
# Conflicts: # .idea/MyBatisCodeHelperDatasource.xml # src/main/java/com/huaheng/pc/receipt/receiptHeaderHistory/service/ReceiptHeaderHistoryService.java
Showing
19 changed files
with
800 additions
and
1070 deletions
.idea/MyBatisCodeHelperDatasource.xml
... | ... | @@ -5,9 +5,9 @@ |
5 | 5 | <ProjectProfile> |
6 | 6 | <option name="addSerializeUid" value="true" /> |
7 | 7 | <option name="generateService" value="true" /> |
8 | - <option name="javaMapperPackage" value="com.huaheng.pc.config.configValue.mapper" /> | |
8 | + <option name="javaMapperPackage" value="com.huaheng.pc.inventory.adjust.mapper" /> | |
9 | 9 | <option name="javaMapperPath" value="$PROJECT_DIR$/src/main/java" /> |
10 | - <option name="javaModelPackage" value="com.huaheng.pc.config.configValue.domain" /> | |
10 | + <option name="javaModelPackage" value="com.huaheng.pc.inventory.adjust.domain" /> | |
11 | 11 | <option name="javaModelPath" value="$PROJECT_DIR$/src/main/java" /> |
12 | 12 | <option name="lastDatabaseCrudChooseModuleName" value="huaheng" /> |
13 | 13 | <option name="moduleNameToPackageAndPathMap"> |
... | ... | @@ -29,13 +29,13 @@ |
29 | 29 | <entry key="huaheng"> |
30 | 30 | <value> |
31 | 31 | <UserPackageAndPathInfoByModule> |
32 | - <option name="javaMapperPackage" value="com.huaheng.pc.config.configValue.mapper" /> | |
32 | + <option name="javaMapperPackage" value="com.huaheng.pc.inventory.adjust.mapper" /> | |
33 | 33 | <option name="javaMapperPath" value="$PROJECT_DIR$/src/main/java" /> |
34 | - <option name="javaModelPacakge" value="com.huaheng.pc.config.configValue.domain" /> | |
34 | + <option name="javaModelPacakge" value="com.huaheng.pc.inventory.adjust.domain" /> | |
35 | 35 | <option name="javaModelPath" value="$PROJECT_DIR$/src/main/java" /> |
36 | - <option name="javaServicePackage" value="com.huaheng.pc.config.configValue.service" /> | |
36 | + <option name="javaServicePackage" value="com.huaheng.pc.inventory.adjust.service" /> | |
37 | 37 | <option name="javaServicePath" value="$PROJECT_DIR$/src/main/java" /> |
38 | - <option name="xmlPackage" value="config" /> | |
38 | + <option name="xmlPackage" value="inventory" /> | |
39 | 39 | <option name="xmlPath" value="E:\code\wms2\src\main\resources\mybatis" /> |
40 | 40 | </UserPackageAndPathInfoByModule> |
41 | 41 | </value> |
... | ... | @@ -135,16 +135,6 @@ |
135 | 135 | </TableGenerateConfig> |
136 | 136 | </value> |
137 | 137 | </entry> |
138 | - <entry key="wms_v2:config_value"> | |
139 | - <value> | |
140 | - <TableGenerateConfig> | |
141 | - <option name="generatedKey" value="id" /> | |
142 | - <option name="javaModelName" value="ConfigValue" /> | |
143 | - <option name="moduleName" value="huaheng" /> | |
144 | - <option name="useActualColumnName" value="true" /> | |
145 | - </TableGenerateConfig> | |
146 | - </value> | |
147 | - </entry> | |
148 | 138 | <entry key="wms_v2:container"> |
149 | 139 | <value> |
150 | 140 | <TableGenerateConfig> |
... | ... | @@ -275,16 +265,6 @@ |
275 | 265 | </TableGenerateConfig> |
276 | 266 | </value> |
277 | 267 | </entry> |
278 | - <entry key="wms_v2:material_type"> | |
279 | - <value> | |
280 | - <TableGenerateConfig> | |
281 | - <option name="generatedKey" value="id" /> | |
282 | - <option name="javaModelName" value="MaterialType" /> | |
283 | - <option name="moduleName" value="huaheng" /> | |
284 | - <option name="useActualColumnName" value="true" /> | |
285 | - </TableGenerateConfig> | |
286 | - </value> | |
287 | - </entry> | |
288 | 268 | <entry key="wms_v2:material_unit"> |
289 | 269 | <value> |
290 | 270 | <TableGenerateConfig> |
... | ... | @@ -571,7 +551,7 @@ |
571 | 551 | <option name="useLomBokOnModel" value="true" /> |
572 | 552 | <option name="useSwagger" value="true" /> |
573 | 553 | <option name="userMybatisPlus" value="true" /> |
574 | - <option name="xmlMapperPackage" value="config" /> | |
554 | + <option name="xmlMapperPackage" value="inventory" /> | |
575 | 555 | <option name="xmlMapperPath" value="E:\code\wms2\src\main\resources\mybatis" /> |
576 | 556 | </ProjectProfile> |
577 | 557 | </option> |
... | ... |
.idea/WMSV1.iml deleted
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<module type="JAVA_MODULE" version="4"> | |
3 | - <component name="FacetManager"> | |
4 | - <facet type="Spring" name="Spring"> | |
5 | - <configuration /> | |
6 | - </facet> | |
7 | - <facet type="web" name="Web"> | |
8 | - <configuration> | |
9 | - <webroots /> | |
10 | - <sourceRoots> | |
11 | - <root url="file://$MODULE_DIR$/src/main/java" /> | |
12 | - <root url="file://$MODULE_DIR$/src/main/resources" /> | |
13 | - </sourceRoots> | |
14 | - </configuration> | |
15 | - </facet> | |
16 | - </component> | |
17 | -</module> | |
18 | 0 | \ No newline at end of file |
src/main/java/com/huaheng/pc/config/statusFlow/controller/StatusFlowDetailController.java
... | ... | @@ -65,7 +65,7 @@ public class StatusFlowDetailController extends BaseController { |
65 | 65 | lambdaQueryWrapper.gt(StringUtils.isNotEmpty(createdBegin), StatusFlowDetail::getCreated, createdBegin) |
66 | 66 | .lt(StringUtils.isNotEmpty(createdEnd), StatusFlowDetail::getCreated, createdEnd) |
67 | 67 | .eq(StatusFlowDetail::getWarehouseCode, ShiroUtils.getWarehouseCode()) |
68 | - .eq(StringUtils.isNotNull(statusFlowDetail.getHeaderId()), | |
68 | + .eq(StringUtils.isNull(statusFlowDetail.getHeaderId()), | |
69 | 69 | StatusFlowDetail::getHeaderId, statusFlowDetail.getHeaderId()) |
70 | 70 | .eq(StringUtils.isNotEmpty(statusFlowDetail.getFlowCode()), |
71 | 71 | StatusFlowDetail::getFlowCode, statusFlowDetail.getFlowCode()) |
... | ... |
src/main/java/com/huaheng/pc/inventory/adjustDetail/controller/adjustDetailController.java
... | ... | @@ -66,6 +66,7 @@ public class adjustDetailController extends BaseController { |
66 | 66 | .le(StringUtils.isNotEmpty(createdEnd), AdjustDetail::getCreated, createdEnd)//创建时间范围 |
67 | 67 | .eq(AdjustDetail::getWarehouseCode, ShiroUtils.getWarehouseCode()) //仓库 |
68 | 68 | .eq(adjustDetail.getId() != null, AdjustDetail::getId, adjustDetail.getId())//ID |
69 | + .eq(StringUtils.isNotEmpty(adjustDetail.getAdjustCode()),AdjustDetail::getAdjustCode,adjustDetail.getAdjustCode())//调整单编码 | |
69 | 70 | |
70 | 71 | |
71 | 72 | .orderByDesc(AdjustDetail::getId); |
... | ... |
src/main/java/com/huaheng/pc/inventory/adjustDetail/domain/AdjustDetail.java
... | ... | @@ -235,5 +235,20 @@ public class AdjustDetail implements Serializable { |
235 | 235 | @ApiModelProperty(value="处理标记") |
236 | 236 | private String processStamp; |
237 | 237 | |
238 | + /** | |
239 | + * 库位编号 | |
240 | + * */ | |
241 | + @TableField(value = "locationCode") | |
242 | + @ApiModelProperty(value = "库位") | |
243 | + private String locationCode; | |
244 | + | |
245 | + /** | |
246 | + *容器编号 | |
247 | + * */ | |
248 | + @TableField(value = "containerCode") | |
249 | + @ApiModelProperty(value = "容器编码") | |
250 | + private String containerCode; | |
251 | + | |
252 | + | |
238 | 253 | private static final long serialVersionUID = 1L; |
239 | 254 | } |
240 | 255 | \ No newline at end of file |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptDetail/controller/ReceiptDetailController.java
... | ... | @@ -139,21 +139,21 @@ public class ReceiptDetailController extends BaseController { |
139 | 139 | /** |
140 | 140 | * 删除入库单 |
141 | 141 | */ |
142 | - @ApiOperation(value="删除入库单 ", notes="删除入库单 ", httpMethod = "POST") | |
143 | - @RequiresPermissions("receipt:receiptDetail:remove") | |
144 | - @Log(title = "入库-入库单 ",operating = "删除入库单 ", action = BusinessType.INSERT) | |
145 | - @PostMapping("/remove") | |
146 | - @ResponseBody | |
147 | - public AjaxResult remove(String ids) { | |
148 | - if (StringUtils.isEmpty(ids)){ | |
149 | - return AjaxResult.error("id为空"); | |
150 | - } | |
151 | - List<Integer> list = new ArrayList<>(); | |
152 | - for (Integer id : Convert.toIntArray(ids)){ | |
153 | - list.add(id); | |
154 | - } | |
155 | - return toAjax(receiptDetailService.removeByIds(list)); | |
156 | - } | |
142 | + //@ApiOperation(value="删除入库单 ", notes="删除入库单 ", httpMethod = "POST") | |
143 | + //@RequiresPermissions("receipt:receiptDetail:add") | |
144 | + //@Log(title = "入库-入库单 ",operating = "修改入库单 ", action = BusinessType.INSERT) | |
145 | + //@PostMapping("/edit") | |
146 | + //@ResponseBody | |
147 | + //public AjaxResult remove(String ids) { | |
148 | + // if (StringUtils.isEmpty(ids)){ | |
149 | + // return AjaxResult.error("id为空"); | |
150 | + // } | |
151 | + // List<Integer> list = new ArrayList<>(); | |
152 | + // for (Integer id : Convert.toIntArray(ids)){ | |
153 | + // list.add(id); | |
154 | + // } | |
155 | + // return toAjax(receiptDetailService.removeByIds(list)); | |
156 | + //} | |
157 | 157 | |
158 | 158 | /** |
159 | 159 | * 审核入库单 |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptDetailHistory/controller/ReceiptDetailHistoryController.java deleted
1 | -package com.huaheng.pc.receipt.receiptDetailHistory.controller; | |
2 | - | |
3 | -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
4 | -import com.baomidou.mybatisplus.core.metadata.IPage; | |
5 | -import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
6 | -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
7 | -import com.huaheng.common.utils.StringUtils; | |
8 | -import com.huaheng.framework.aspectj.lang.annotation.Log; | |
9 | -import com.huaheng.framework.aspectj.lang.constant.BusinessType; | |
10 | -import com.huaheng.framework.web.controller.BaseController; | |
11 | -import com.huaheng.framework.web.page.PageDomain; | |
12 | -import com.huaheng.framework.web.page.TableDataInfo; | |
13 | -import com.huaheng.framework.web.page.TableSupport; | |
14 | -import com.huaheng.pc.receipt.receiptDetailHistory.domain.ReceiptDetailHistory; | |
15 | -import com.huaheng.pc.receipt.receiptDetailHistory.service.ReceiptDetailHistoryService; | |
16 | -import com.huaheng.pc.receipt.receiptHeaderHistory.domain.ReceiptHeaderHistory; | |
17 | -import com.huaheng.pc.receipt.receiptHeaderHistory.service.ReceiptHeaderHistoryService; | |
18 | -import io.swagger.annotations.Api; | |
19 | -import io.swagger.annotations.ApiOperation; | |
20 | -import io.swagger.annotations.ApiParam; | |
21 | -import org.apache.shiro.authz.annotation.RequiresPermissions; | |
22 | -import org.springframework.stereotype.Controller; | |
23 | -import org.springframework.ui.ModelMap; | |
24 | -import org.springframework.web.bind.annotation.*; | |
25 | - | |
26 | -import javax.annotation.Resource; | |
27 | -import java.util.List; | |
28 | - | |
29 | -@Api(tags = "历史入库明细") | |
30 | -@Controller | |
31 | -@RequestMapping("/receipt/receiptDetailHistory") | |
32 | -public class ReceiptDetailHistoryController extends BaseController { | |
33 | - | |
34 | - @Resource | |
35 | - private ReceiptDetailHistoryService receiptDetailHistoryService; | |
36 | - | |
37 | - @Resource | |
38 | - private ReceiptHeaderHistoryService receiptHeaderHistoryService; | |
39 | - | |
40 | - private String prefix = "receipt/receiptDetailHistory"; | |
41 | - | |
42 | - @RequiresPermissions("receipt:receiptDetail:view") | |
43 | - @Log(title = "入库-厉史入库详情列表", operating = "历史入库详情列表", action = BusinessType.GRANT) | |
44 | - @GetMapping("/list/{id}") | |
45 | - public String list(@PathVariable("id")Integer id, ModelMap mmap) { | |
46 | - ReceiptHeaderHistory receiptHeaderHistory = receiptHeaderHistoryService.getById(id); | |
47 | - mmap.put("receiptId", id); | |
48 | - mmap.put("receiptCode", receiptHeaderHistory.getCode()); | |
49 | - return prefix+"/receiptDetail"; | |
50 | - } | |
51 | - | |
52 | - /** | |
53 | - * 查询入库详情 | |
54 | - */ | |
55 | - @ApiOperation(value="查看入库详情", notes="根据头表id获取入库单明细信息", httpMethod = "POST") | |
56 | - @RequiresPermissions("receipt:receiptDetail:list") | |
57 | - @Log(title = "入库-入库单明细管理", operating = "查看入库单明细", action = BusinessType.GRANT) | |
58 | - @PostMapping("/list") | |
59 | - @ResponseBody | |
60 | - public TableDataInfo list(@ApiParam(name="receiptDetail",value="入库详情") ReceiptDetailHistory receiptDetail, | |
61 | - @ApiParam(name = "createdBegin", value = "起止时间") String createdBegin, | |
62 | - @ApiParam(name = "createdEnd", value = "结束时间") String createdEnd) { | |
63 | - LambdaQueryWrapper<ReceiptDetailHistory> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
64 | - PageDomain pageDomain = TableSupport.buildPageRequest(); | |
65 | - Integer pageNum = pageDomain.getPageNum(); | |
66 | - Integer pageSize = pageDomain.getPageSize(); | |
67 | - lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin), ReceiptDetailHistory::getCreated, createdBegin) | |
68 | - .le(StringUtils.isNotEmpty(createdEnd), ReceiptDetailHistory::getCreated, createdEnd) | |
69 | - .eq(ReceiptDetailHistory::getReceiptId, receiptDetail.getReceiptId()); | |
70 | - | |
71 | - if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | |
72 | - /*使用分页查询*/ | |
73 | - Page<ReceiptDetailHistory> page = new Page<>(pageNum, pageSize); | |
74 | - IPage<ReceiptDetailHistory> iPage = receiptDetailHistoryService.page(page, lambdaQueryWrapper); | |
75 | - return getMpDataTable(iPage.getRecords(), iPage.getTotal()); | |
76 | - } else { | |
77 | - List<ReceiptDetailHistory> list = receiptDetailHistoryService.list(lambdaQueryWrapper); | |
78 | - return getDataTable(list); | |
79 | - } | |
80 | - } | |
81 | -} |
src/main/java/com/huaheng/pc/receipt/receiptHeaderHistory/controller/ReceiptHeaderHistoryController.java deleted
1 | -package com.huaheng.pc.receipt.receiptHeaderHistory.controller; | |
2 | - | |
3 | -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
4 | -import com.baomidou.mybatisplus.core.metadata.IPage; | |
5 | -import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
6 | -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
7 | -import com.huaheng.common.utils.StringUtils; | |
8 | -import com.huaheng.common.utils.security.ShiroUtils; | |
9 | -import com.huaheng.framework.aspectj.lang.annotation.Log; | |
10 | -import com.huaheng.framework.aspectj.lang.constant.BusinessType; | |
11 | -import com.huaheng.framework.web.controller.BaseController; | |
12 | -import com.huaheng.framework.web.page.PageDomain; | |
13 | -import com.huaheng.framework.web.page.TableDataInfo; | |
14 | -import com.huaheng.framework.web.page.TableSupport; | |
15 | -import com.huaheng.pc.receipt.receiptHeaderHistory.domain.ReceiptHeaderHistory; | |
16 | -import com.huaheng.pc.receipt.receiptHeaderHistory.service.ReceiptHeaderHistoryService; | |
17 | -import io.swagger.annotations.Api; | |
18 | -import io.swagger.annotations.ApiParam; | |
19 | -import org.apache.shiro.authz.annotation.RequiresPermissions; | |
20 | -import org.springframework.stereotype.Controller; | |
21 | -import org.springframework.web.bind.annotation.GetMapping; | |
22 | -import org.springframework.web.bind.annotation.PostMapping; | |
23 | -import org.springframework.web.bind.annotation.RequestMapping; | |
24 | -import org.springframework.web.bind.annotation.ResponseBody; | |
25 | - | |
26 | -import javax.annotation.Resource; | |
27 | -import java.util.List; | |
28 | - | |
29 | -@Api(tags = "入库单历史") | |
30 | -@Controller | |
31 | -@RequestMapping("/receipt/receiptHeaderHistory") | |
32 | -public class ReceiptHeaderHistoryController extends BaseController { | |
33 | - | |
34 | - private String prefix="receipt/receiptHeaderHistory"; | |
35 | - | |
36 | - @Resource | |
37 | - private ReceiptHeaderHistoryService receiptHeaderHistoryService; | |
38 | - | |
39 | - @RequiresPermissions("receipt:receiptHeaderHistory:view") | |
40 | - @GetMapping() | |
41 | - public String containerCapacity() | |
42 | - { | |
43 | - return prefix + "/receiptHeaderHistory"; | |
44 | - } | |
45 | - | |
46 | - /** | |
47 | - * 查询入库单 | |
48 | - */ | |
49 | - @RequiresPermissions("receipt:receiptHeader:list") | |
50 | - @Log(title = "入库-入库单头表", operating = "查看入库单列表", action = BusinessType.GRANT) | |
51 | - @PostMapping("/list") | |
52 | - @ResponseBody | |
53 | - public TableDataInfo list(@ApiParam(name="receiptDetail",value="入库头表") ReceiptHeaderHistory receiptHeader, | |
54 | - @ApiParam(name = "createdBegin", value = "起止时间") String createdBegin, | |
55 | - @ApiParam(name = "createdEnd", value = "结束时间") String createdEnd) { | |
56 | - LambdaQueryWrapper<ReceiptHeaderHistory> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
57 | - PageDomain pageDomain = TableSupport.buildPageRequest(); | |
58 | - Integer pageNum = pageDomain.getPageNum(); | |
59 | - Integer pageSize = pageDomain.getPageSize(); | |
60 | - | |
61 | - lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin), ReceiptHeaderHistory::getCreated, createdBegin) | |
62 | - .le(StringUtils.isNotEmpty(createdEnd), ReceiptHeaderHistory::getCreated, createdEnd) | |
63 | - .in(ReceiptHeaderHistory::getCompanyCode, ShiroUtils.getCompanyCodeList()) | |
64 | - .eq(ReceiptHeaderHistory::getWarehouseCode, ShiroUtils.getWarehouseCode()) | |
65 | - .eq(StringUtils.isNotEmpty(receiptHeader.getReceiptType()), | |
66 | - ReceiptHeaderHistory::getReceiptType, receiptHeader.getReceiptType()) | |
67 | - .eq(StringUtils.isNotEmpty(receiptHeader.getCode()), ReceiptHeaderHistory::getCode, receiptHeader.getCode()) | |
68 | - .eq(StringUtils.isNotNull(receiptHeader.getFirstStatus()), | |
69 | - ReceiptHeaderHistory::getFirstStatus, receiptHeader.getFirstStatus()) | |
70 | - .eq(StringUtils.isNotNull(receiptHeader.getLastStatus()), | |
71 | - ReceiptHeaderHistory::getLastStatus, receiptHeader.getLastStatus()); | |
72 | - | |
73 | - if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | |
74 | - /** | |
75 | - * 使用分页查询 | |
76 | - */ | |
77 | - Page<ReceiptHeaderHistory> page = new Page<>(pageNum, pageSize); | |
78 | - IPage<ReceiptHeaderHistory> iPage = receiptHeaderHistoryService.page(page, lambdaQueryWrapper); | |
79 | - return getMpDataTable(iPage.getRecords(),iPage.getTotal()); | |
80 | - } else { | |
81 | - List<ReceiptHeaderHistory> list = receiptHeaderHistoryService.list(lambdaQueryWrapper); | |
82 | - return getDataTable(list); | |
83 | - } | |
84 | - } | |
85 | -} |
src/main/java/com/huaheng/pc/receipt/receiptHeaderHistory/service/ReceiptHeaderHistoryService.java
1 | 1 | package com.huaheng.pc.receipt.receiptHeaderHistory.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.exception.service.ServiceException; | |
6 | -import com.huaheng.common.utils.security.ShiroUtils; | |
7 | -import com.huaheng.framework.web.domain.AjaxResult; | |
8 | -import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail; | |
9 | -import com.huaheng.pc.receipt.receiptDetail.service.ReceiptDetailService; | |
10 | -import com.huaheng.pc.receipt.receiptDetailHistory.domain.ReceiptDetailHistory; | |
11 | -import com.huaheng.pc.receipt.receiptDetailHistory.service.ReceiptDetailHistoryService; | |
12 | -import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader; | |
13 | -import com.huaheng.pc.receipt.receiptHeader.service.ReceiptHeaderService; | |
14 | -import org.apache.commons.beanutils.BeanUtils; | |
15 | -import org.apache.commons.collections.CollectionUtils; | |
16 | -import org.apache.wml.WMLSetvarElement; | |
17 | 3 | import org.springframework.stereotype.Service; |
18 | 4 | import javax.annotation.Resource; |
19 | -import java.lang.reflect.InvocationTargetException; | |
20 | -import java.util.ArrayList; | |
21 | -import java.util.Collections; | |
22 | 5 | import java.util.List; |
23 | 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
24 | 7 | import com.huaheng.pc.receipt.receiptHeaderHistory.domain.ReceiptHeaderHistory; |
25 | 8 | import com.huaheng.pc.receipt.receiptHeaderHistory.mapper.ReceiptHeaderHistoryMapper; |
26 | -import org.springframework.transaction.annotation.Transactional; | |
27 | - | |
28 | 9 | @Service |
29 | 10 | public class ReceiptHeaderHistoryService extends ServiceImpl<ReceiptHeaderHistoryMapper, ReceiptHeaderHistory> { |
30 | 11 | |
31 | - @Resource | |
32 | - private ReceiptHeaderService receiptHeaderService; | |
33 | - @Resource | |
34 | - private ReceiptDetailService receiptDetailService; | |
35 | - @Resource | |
36 | - private ReceiptDetailHistoryService receiptDetailHistoryService; | |
37 | - | |
38 | - @Transactional | |
39 | - public AjaxResult add(Integer id){ | |
40 | - ReceiptHeader receiptHeader = receiptHeaderService.getById(id); | |
41 | - if (receiptHeader == null) return AjaxResult.success(""); | |
42 | - if(receiptHeader.getFirstStatus()>=800 && receiptHeader.getLastStatus()>=800){ | |
43 | - ReceiptHeaderHistory receiptHeaderHistory = new ReceiptHeaderHistory(); | |
44 | - List<ReceiptDetailHistory> receiptDetailHistoryList = new ArrayList<>(); | |
45 | - //查询入库单明细 | |
46 | - LambdaQueryWrapper<ReceiptDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
47 | - lambdaQueryWrapper.eq(ReceiptDetail::getReceiptId, id); | |
48 | - List<ReceiptDetail> list = receiptDetailService.list(lambdaQueryWrapper); | |
49 | - try { | |
50 | - //复制到入库历史实体 | |
51 | - BeanUtils.copyProperties(receiptHeaderHistory, receiptHeader); | |
52 | - for (ReceiptDetail receiptDetail: list) { | |
53 | - ReceiptDetailHistory receiptDetailHistory = new ReceiptDetailHistory(); | |
54 | - BeanUtils.copyProperties(receiptDetailHistory, receiptDetail); | |
55 | - receiptDetailHistoryList.add(receiptDetailHistory); | |
56 | - } | |
57 | - } catch (IllegalAccessException e) { | |
58 | - e.printStackTrace(); | |
59 | - } catch (InvocationTargetException e) { | |
60 | - e.printStackTrace(); | |
61 | - } | |
62 | - | |
63 | - receiptHeaderHistory.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
64 | - if (!receiptHeaderService.removeById(receiptHeader.getId())){ | |
65 | - throw new ServiceException("删除头表失败"); | |
66 | - } | |
67 | - //删除入库明细 | |
68 | - List<Integer> ids = new ArrayList<>(); | |
69 | - for (int i=0; i<receiptDetailHistoryList.size();i++){ | |
70 | - receiptDetailHistoryList.get(i).setLastUpdatedBy(ShiroUtils.getLoginName()); | |
71 | - ids.add(receiptDetailHistoryList.get(i).getId()); | |
72 | - } | |
73 | - if (!receiptDetailService.removeByIds(ids)) { | |
74 | - throw new ServiceException("删除明细表失败"); | |
75 | - } | |
76 | - receiptDetailHistoryService.saveBatch(receiptDetailHistoryList); | |
77 | - this.save(receiptHeaderHistory); | |
78 | - }else { | |
79 | - return AjaxResult.success("入库单没有完成,无法删除"); | |
80 | - } | |
81 | - return AjaxResult.success("删除成功"); | |
82 | - } | |
83 | 12 | } |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... | ... | @@ -8,7 +8,6 @@ import com.huaheng.common.utils.DataUtils; |
8 | 8 | import com.huaheng.common.utils.StringUtils; |
9 | 9 | import com.huaheng.common.utils.security.ShiroUtils; |
10 | 10 | import com.huaheng.framework.web.domain.AjaxResult; |
11 | -import com.huaheng.pc.config.container.domain.Container; | |
12 | 11 | import com.huaheng.pc.config.location.domain.Location; |
13 | 12 | import com.huaheng.pc.config.location.service.LocationService; |
14 | 13 | import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail; |
... | ... | @@ -17,11 +16,7 @@ import com.huaheng.pc.inventory.inventoryHeader.domain.InventoryHeader; |
17 | 16 | import com.huaheng.pc.inventory.inventoryHeader.service.InventoryHeaderService; |
18 | 17 | import com.huaheng.pc.inventory.inventoryTransaction.domain.InventoryTransaction; |
19 | 18 | import com.huaheng.pc.inventory.inventoryTransaction.service.InventoryTransactionService; |
20 | -import com.huaheng.pc.receipt.receiptContainerDetail.domain.ReceiptContainerDetail; | |
21 | -import com.huaheng.pc.receipt.receiptContainerDetail.service.ReceiptContainerDetailService; | |
22 | 19 | import com.huaheng.pc.receipt.receiptContainerHeader.domain.ReceiptContainerHeader; |
23 | -import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader; | |
24 | -import com.huaheng.pc.receipt.receiptHeader.service.ReceiptHeaderService; | |
25 | 20 | import com.huaheng.pc.shipment.shipmentContainerDetail.domain.ShipmentContainerDetail; |
26 | 21 | import com.huaheng.pc.shipment.shipmentContainerDetail.service.ShipmentContainerDetailService; |
27 | 22 | import com.huaheng.pc.shipment.shipmentContainerHeader.domain.ShipmentContainerHeader; |
... | ... | @@ -68,15 +63,6 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
68 | 63 | @Autowired |
69 | 64 | private InventoryTransactionService inventoryTransactionService; |
70 | 65 | |
71 | - @Autowired | |
72 | - private ReceiptHeaderService receiptHeaderService; | |
73 | - | |
74 | - @Autowired | |
75 | - private ReceiptContainerDetailService receiptContainerDetailService; | |
76 | - | |
77 | - | |
78 | - | |
79 | - | |
80 | 66 | @Resource |
81 | 67 | private TaskHeaderMapper taskHeaderMapper; |
82 | 68 | |
... | ... | @@ -307,6 +293,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
307 | 293 | |
308 | 294 | @Override |
309 | 295 | public AjaxResult completeReceiptTask(TaskHeader task) throws Exception { |
296 | +// String LocationCode = task.getIsDoubleIn().intValue() == 0 ? task.getDestinationLocation() : task.getSecondDestinationLocation(); | |
310 | 297 | List<Map<String, Object>> taskReceiptContainerDetail =taskHeaderMapper.getReceiptTask(task.getId()); |
311 | 298 | if (taskReceiptContainerDetail.size()<1){ |
312 | 299 | return AjaxResult.success("未找到对应任务的入库单号!!!"); |
... | ... | @@ -317,7 +304,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
317 | 304 | LambdaQueryWrapper<InventoryDetail> inventory =Wrappers.lambdaQuery(); |
318 | 305 | inventory.eq(InventoryDetail::getWarehouseCode,ShiroUtils.getWarehouseCode()) |
319 | 306 | .eq(InventoryDetail::getLocationCode,task.getLocationCode()) |
320 | - .eq(InventoryDetail::getReceiptDetailId,DataUtils.getString(map.get("receiptDetailId"))) | |
307 | + .eq(InventoryDetail::getReceiptDetailId,DataUtils.getString(map.get("id"))) | |
321 | 308 | .eq(InventoryDetail::getContainerCode,DataUtils.getString(map.get("containerCode"))); |
322 | 309 | InventoryDetail detail=inventoryDetailService.getOne(inventory); |
323 | 310 | if (detail == null) |
... | ... | @@ -345,14 +332,14 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
345 | 332 | detail.setMaterialName(DataUtils.getString(map.get("materialName")));//物料名称 |
346 | 333 | detail.setMaterialSpec(DataUtils.getString(map.get("materialSpec")));//物料规格 |
347 | 334 | detail.setReceiptCode(DataUtils.getString(map.get("receiptCode")));//入库单编码 |
348 | - detail.setReceiptDetailId(DataUtils.getInteger(map.get("receiptDetailId")));//入库单明细ID | |
335 | + detail.setReceiptDetailId(DataUtils.getInteger(map.get("id")));//入库单明细ID | |
349 | 336 | detail.setBatch(DataUtils.getString(map.get("batch")));//批次 |
350 | 337 | detail.setLot(DataUtils.getString(map.get("lot")));//批号 |
351 | 338 | detail.setInventorySts(DataUtils.getString(map.get("inventorySts")));//库存状态 |
352 | 339 | detail.setManufactureDate(DataUtils.getDateTime(map.get("manufactureDate")));//生产日期 |
353 | 340 | detail.setExpirationDate(DataUtils.getDateTime(map.get("expirationDate")));//失效日期 |
354 | 341 | detail.setQty(DataUtils.getBigDecimal(map.get("qty")));//数量 |
355 | - detail.setTaskQty(DataUtils.getBigDecimal(map.get("qty"))); | |
342 | + detail.setTaskQty(DataUtils.getBigDecimal(map.get("taskQty"))); | |
356 | 343 | detail.setCreatedBy(ShiroUtils.getLoginName());//创建人 |
357 | 344 | detail.setLastUpdatedBy(ShiroUtils.getLoginName());//创建时间 |
358 | 345 | inventoryDetailService.save(detail); |
... | ... | @@ -362,7 +349,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
362 | 349 | detail.setQty(detail.getQty().add(DataUtils.getBigDecimal(map.get("qty")))); |
363 | 350 | detail.setLastUpdatedBy(ShiroUtils.getLoginName()); |
364 | 351 | LambdaUpdateWrapper<InventoryDetail> lambdaUpdateWrapper = Wrappers.lambdaUpdate(); |
365 | - lambdaUpdateWrapper.eq(InventoryDetail::getId,DataUtils.getInteger(map.get("receiptDetailId"))); | |
352 | + lambdaUpdateWrapper.eq(InventoryDetail::getId,DataUtils.getInteger(map.get("id"))); | |
366 | 353 | inventoryDetailService.update(detail, lambdaUpdateWrapper); |
367 | 354 | } |
368 | 355 | //记录库存交易记录 |
... | ... | @@ -375,56 +362,51 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
375 | 362 | inventoryTransaction.setMaterialCode(DataUtils.getString(map.get("materialCode"))); |
376 | 363 | inventoryTransaction.setMaterialName(DataUtils.getString(map.get("materialName"))); |
377 | 364 | inventoryTransaction.setBillCode(DataUtils.getString(map.get("receiptCode"))); |
378 | - inventoryTransaction.setBillDetailId(DataUtils.getInteger(map.get("receiptDetailId"))); | |
365 | + inventoryTransaction.setBillDetailId(DataUtils.getInteger(map.get("id"))); | |
379 | 366 | inventoryTransaction.setBatch(DataUtils.getString(map.get("batch"))); |
380 | 367 | inventoryTransaction.setLot(DataUtils.getString(map.get("lot"))); |
381 | 368 | inventoryTransaction.setManufactureDate(DataUtils.getDateTime(map.get("manufactureDate"))); |
382 | 369 | inventoryTransaction.setExpirationDate(DataUtils.getDateTime(map.get("expirationDate"))); |
383 | 370 | inventoryTransaction.setInventorySts(DataUtils.getString((map.get("inventorySts")))); |
384 | - inventoryTransaction.setTaskQty(DataUtils.getInteger(map.get("qty"))); | |
371 | + inventoryTransaction.setTaskQty(DataUtils.getInteger(map.get("taskQty"))); | |
385 | 372 | inventoryTransaction.setCreated(new Date()); |
386 | 373 | inventoryTransaction.setCreatedBy(ShiroUtils.getLoginName()); |
387 | 374 | inventoryTransactionService.save(inventoryTransaction); |
388 | - //修改任务明细的状态为完成 | |
389 | - TaskDetail taskDetail = new TaskDetail(); | |
390 | - taskDetail.setStatus(100); | |
391 | - taskDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
392 | - taskDetail.setAgingDate(new Date()); //入库时间 | |
393 | - LambdaUpdateWrapper<TaskDetail> lambdaUpdateWrapper = Wrappers.lambdaUpdate(); | |
394 | - lambdaUpdateWrapper.eq(TaskDetail::getTaskId, DataUtils.getInteger(map.get("taskDetailId"))); | |
395 | - taskDetailService.update(taskDetail, lambdaUpdateWrapper); | |
396 | - //修改入库单的状态 | |
397 | - ReceiptHeader receiptHeader =new ReceiptHeader(); | |
398 | - receiptHeader.setFirstStatus(100); | |
399 | - receiptHeader.setLastStatus(100); | |
400 | - LambdaUpdateWrapper<ReceiptHeader> receiptHeaderLambdaUpdateWrapper = Wrappers.lambdaUpdate(); | |
401 | - receiptHeaderLambdaUpdateWrapper.eq(ReceiptHeader::getId, DataUtils.getInteger(map.get("receiptId"))); | |
402 | - receiptHeaderService.update(receiptHeader, receiptHeaderLambdaUpdateWrapper); | |
403 | - | |
404 | - //修改任务主表状态,因为立库任务表单头只对应一个货箱,表单详情的任务会同时完成 | |
405 | - task.setStatus(100); | |
406 | - task.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
407 | - task.setLastUpdated(new Date()); | |
408 | - LambdaUpdateWrapper<TaskHeader> taskHeaderLambdaUpdateWrapper = Wrappers.lambdaUpdate(); | |
409 | - taskHeaderLambdaUpdateWrapper.eq(TaskHeader::getId, task.getId()); | |
410 | - taskHeaderService.update(task, taskHeaderLambdaUpdateWrapper); | |
411 | - //修改库位状态和对应的容器 | |
412 | - Location location =new Location(); | |
413 | - location.setContainerCode(task.getContainerCode()); | |
414 | - location.setStatus("empty"); | |
415 | - LambdaUpdateWrapper<Location> locationLambdaUpdateWrapper = Wrappers.lambdaUpdate(); | |
416 | - locationLambdaUpdateWrapper.eq(Location::getCode, task.getLocationCode()); | |
417 | - locationService.update(location, locationLambdaUpdateWrapper); | |
418 | - //修改容器状态和对应的库位 | |
419 | - Container container =new Container(); | |
420 | - container.setLocationCode(task.getLocationCode()); | |
421 | - container.setStatus("some"); | |
422 | - //修改组盘表状态为20 | |
423 | - ReceiptContainerDetail receiptContainerDetail = new ReceiptContainerDetail(); | |
424 | - receiptContainerDetail.setStatus(20); | |
425 | - LambdaUpdateWrapper<ReceiptContainerDetail> receiptContainerDetailLambdaUpdateWrapper = Wrappers.lambdaUpdate(); | |
426 | - receiptContainerDetailLambdaUpdateWrapper.eq(ReceiptContainerDetail::getReceiptId,DataUtils.getInteger(map.get("receiptId"))); | |
427 | - receiptContainerDetailService.update(receiptContainerDetail, receiptContainerDetailLambdaUpdateWrapper); | |
375 | +// //修改任务明细的状态为完成 | |
376 | +// TaskDetail taskDetail = new TaskDetail(); | |
377 | +// taskDetail.setId(DataUtils.getInteger(map.get("taskDetailId"))); | |
378 | +// taskDetail.setStatus((short)100); | |
379 | +// taskDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
380 | +// taskDetail.setEndTime(new Date()); //完成时间 | |
381 | +// taskDetailService.updateByModel(taskDetail); | |
382 | +// //修改入库单明细的状态 | |
383 | +// receiptHeaderService.updateDetailStatus(DataUtils.getInteger(map.get("billDetailId")), (short)800); | |
384 | +// } | |
385 | +// } | |
386 | +// //更新收货单主表的首状态 | |
387 | +// taskReceiptContainerDetail.stream(). | |
388 | +// filter(X -> DataUtils.getInteger(X.get("status")) < 100). | |
389 | +// map(X -> X.get("billId")). | |
390 | +// distinct(). | |
391 | +// forEach(X -> receiptHeaderService.receiptStatusUpdate(DataUtils.getInteger(X), (short)800)); | |
392 | +// //修改任务主表状态,因为立库任务表单头只对应一个货箱,表单详情的任务会同时完成 | |
393 | +// task.setFirstStatus((short)100); | |
394 | +// task.setLastStatus((short)100); | |
395 | +// task.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
396 | +// task.setEndTime(new Date()); | |
397 | +// this.updateByModel(task); | |
398 | +// //修改库位状态和对应的容器 | |
399 | +// locationService.updateContainerCodeAndStatus(LocationCode, task.getContainerCode(),"empty"); | |
400 | +// if (task.getIsDoubleIn().intValue() != 0) { | |
401 | +// locationService.updateStatus(task.getDestinationLocation(), "empty"); | |
402 | +// } | |
403 | +// //修改容器状态和对应的库位 | |
404 | +// containerService.updateLocationCodeAndStatus(task.getContainerCode(), LocationCode, "some"); | |
405 | +// //修改组盘表状态为20 | |
406 | +// ReceiptContainerHeader receiptContainerHeader = new ReceiptContainerHeader(); | |
407 | +// receiptContainerHeader.setId(task.getAllocationHeadId()); | |
408 | +// receiptContainerHeader.setStatus((short)20); | |
409 | +// receiptContainerHeaderService.updateByModel(receiptContainerHeader); | |
428 | 410 | } |
429 | 411 | } |
430 | 412 | return AjaxResult.success("完成入库任务"); |
... | ... |
src/main/resources/mybatis/inventory/AdjustDetailMapper.xml
... | ... | @@ -13,6 +13,8 @@ |
13 | 13 | <result column="referDetailId" jdbcType="INTEGER" property="referDetailId" /> |
14 | 14 | <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" /> |
15 | 15 | <result column="companyCode" jdbcType="VARCHAR" property="companyCode" /> |
16 | + <result column="containerCode" jdbcType="VARCHAR" property="containerCode" /> | |
17 | + <result column="locationCode" jdbcType="VARCHAR" property="locationCode" /> | |
16 | 18 | <result column="materialCode" jdbcType="VARCHAR" property="materialCode" /> |
17 | 19 | <result column="materialName" jdbcType="VARCHAR" property="materialName" /> |
18 | 20 | <result column="materialSpec" jdbcType="VARCHAR" property="materialSpec" /> |
... | ... | @@ -39,7 +41,7 @@ |
39 | 41 | <sql id="Base_Column_List"> |
40 | 42 | <!--@mbg.generated--> |
41 | 43 | id, adjustCode, cycleCountCode, cycleDetailId, checkCode, checkDetailId, referCode, |
42 | - referDetailId, warehouseCode, companyCode, materialCode, materialName, | |
44 | + referDetailId, warehouseCode, companyCode, containerCode, locationCode ,materialCode, materialName, | |
43 | 45 | materialSpec, materialUnit, problemType, attributeId, fromInventorySts, toInventorySts, |
44 | 46 | fromQty, toQty, gapQty, `status`, created, createdBy, agreeTime, Remark, |
45 | 47 | version, userDef1, userDef2, userDef3, processStamp |
... | ... |
src/main/resources/mybatis/task/TaskHeaderMapper.xml
... | ... | @@ -48,13 +48,9 @@ |
48 | 48 | <result column="processStamp" jdbcType="VARCHAR" property="processStamp" /> |
49 | 49 | </resultMap> |
50 | 50 | <select id="getReceiptTask" resultType="java.util.Map"> |
51 | - SELECT rd.id receiptDetailId,rd.receiptId,td.taskId, td.warehouseCode, td.id taskDetailId, td.status, | |
52 | - td.containerCode, td.qty, td.materialCode,rd.totalQty,td.materialSpec, | |
53 | - rd.receiptCode,td.inventorySts, | |
54 | - td.materialName, rd.batch, rd.lot, | |
55 | - rd.manufactureDate, rd.expirationDate | |
56 | - FROM task_detail td | |
57 | - INNER JOIN receipt_detail rd ON rd.id = td.billDetailId AND td.taskId = #{taskId,jdbcType=INTEGER} | |
51 | + SELECT * | |
52 | + FROM task_detail td | |
53 | + INNER JOIN receipt_detail rd ON rd.id = td.billDetailId AND td.taskId = #{taskId,jdbcType=INTEGER} | |
58 | 54 | </select> |
59 | 55 | |
60 | 56 | <sql id="Base_Column_List"> |
... | ... |
src/main/resources/templates/inventory/adjustDetail/adjustDetail.html
1 | - <!DOCTYPE HTML> | |
1 | +<!DOCTYPE HTML> | |
2 | 2 | <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
3 | 3 | <meta charset="utf-8"> |
4 | 4 | <head th:include="include :: header"></head> |
... | ... | @@ -6,49 +6,99 @@ |
6 | 6 | <div class="row"> |
7 | 7 | <div class="col-sm-12"> |
8 | 8 | <div class="col-sm-12 select-info"> |
9 | - <div class="select-list" > | |
9 | + <div class="select-list"> | |
10 | 10 | <ul> |
11 | 11 | <li> |
12 | 12 | <form id="cycleHeader-form"> |
13 | - 调整单编码:<input type="text" id="cyclecountAdjustId" name="cyclecountAdjustId" /> | |
13 | + 调整主单编码:<input type="text" id="adjustCode" name="adjustCode"/> | |
14 | 14 | </form> |
15 | 15 | </li> |
16 | 16 | <li> |
17 | - 货主编码:<input id="companyCode" type="text" name="companyCode" /> | |
17 | + 调整单明细ID:<input id="id" type="text" name="id"/> | |
18 | 18 | </li> |
19 | 19 | <li> |
20 | - 调整单编码:<input id="code" type="text" name="code" /> | |
20 | + 货主编码:<input id="companyCode" type="text" name="companyCode"/> | |
21 | 21 | </li> |
22 | 22 | <li> |
23 | - 盘点单号:<input id="sourceCode" type="text" name="sourceCode" /> | |
23 | + 盘点单编码:<input id="cycleCountCode" type="text" name="cycleCountCode"/> | |
24 | 24 | </li> |
25 | 25 | <li> |
26 | - 调整单状态:<input id = "status" type="text" name="status" /> | |
26 | + 盘点明细状态:<input id="cycleDetailId" type="text" name="cycleDetailId"/> | |
27 | 27 | </li> |
28 | 28 | <li> |
29 | - 创建时间:<input id="created" type="text" name="created" /> | |
30 | - | |
29 | + 质检单编码:<input id="checkCode" type="text" name="checkCode"/> | |
30 | + </li> | |
31 | + <li> | |
32 | + 质检单明细ID:<input id="checkDetailId" type="text" name="checkDetailId"/> | |
33 | + </li> | |
34 | + <li> | |
35 | + 调整单关联单编码:<input id="referCode" type="text" name="referCode"/> | |
36 | + </li> | |
37 | + <li> | |
38 | + 调整单关联明细行号:<input id="referDetailId" type="text" name="referDetailId"/> | |
39 | + </li> | |
40 | + <li> | |
41 | + 容器:<input id="containerCode" type="text" name="containerCode"/> | |
42 | + </li> | |
43 | + <li> | |
44 | + 库位:<input id="locationCode" type="text" name="locationCode"/> | |
45 | + </li> | |
46 | + <li> | |
47 | + 物料编码:<input id="materialCode" type="text" name="materialCode"/> | |
48 | + </li> | |
49 | + <li> | |
50 | + 物料名称:<input id="materialName" type="text" name="materialName"/> | |
51 | + </li> | |
52 | + <li> | |
53 | + 调整单类型:<select name="problemType" | |
54 | + th:with="problemType=${@dict.getType('cyclecountStatus')}"> | |
55 | + <option value="">所有</option> | |
56 | + <option th:each="e : ${problemType}" th:text="${e['dictLabel']}" | |
57 | + th:value="${e['dictValue']}"></option> | |
58 | + </select> | |
59 | + </li> | |
60 | + <li> | |
61 | + 物料规格:<input id="materialSpec" type="text" name="materialSpec"/> | |
62 | + </li> | |
63 | + <li> | |
64 | + 属性号:<input id="attributeId" type="text" name="attributeId"/> | |
65 | + </li> | |
66 | + <li> | |
67 | + 调整明细状态:<select name="status" | |
68 | + th:with="status=${@dict.getType('cyclecountStatus')}"> | |
69 | + <option value="">所有</option> | |
70 | + <option th:each="e : ${status}" th:text="${e['dictLabel']}" | |
71 | + th:value="${e['dictValue']}"></option> | |
72 | + </select> | |
31 | 73 | </li> |
32 | 74 | <li> |
33 | - 创建人:<input id="createdBy" type="text" name="createdBy" /> | |
75 | + 创建人:<input id="createdBy" type="text" name="createdBy"/> | |
76 | + </li> | |
77 | + <li class="time"> | |
78 | + <label>创建时间: </label> | |
79 | + <input type="text" class="time-input" id="startTime" placeholder="开始时间" | |
80 | + name="createdBegin"/> | |
81 | + <span>-</span> | |
82 | + <input type="text" class="time-input" id="endTime" placeholder="结束时间" | |
83 | + name="createdEnd"/> | |
34 | 84 | </li> |
35 | 85 | <li> |
36 | - <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i | |
37 | - class="fa fa-search"></i> 搜索</a> | |
86 | + <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i | |
87 | + class="fa fa-search"></i> 搜索</a> | |
38 | 88 | </li> |
39 | 89 | </ul> |
40 | 90 | </div> |
41 | 91 | </div> |
42 | - <div class="btn-group hidden-xs" id="toolbar" role="group"> | |
92 | + <div class="btn-group hidden-xs" id="toolbar" role="group"> | |
43 | 93 | |
44 | - <a class="btn btn-outline btn-danger btn-rounded" onclick="addAdjust()" /> | |
45 | - <!--shiro:hasPermission="inventory:cyclecountAdjustDetail:addAdjust"--> | |
46 | - <i class="fa fa-vcard"></i>差异调整 | |
94 | + <a class="btn btn-outline btn-danger btn-rounded" onclick="addAdjust()"/> | |
95 | + <!--shiro:hasPermission="inventory:cyclecountAdjustDetail:addAdjust"--> | |
96 | + <i class="fa fa-vcard"></i>差异调整 | |
47 | 97 | </a> |
48 | - <!--<a class="btn btn-outline btn-danger btn-rounded" onclick="createCyclecountWithGapQty()" | |
49 | - shiro:hasPermission="inventoryHeader:cycleCountDetail:cyclecountRepeat"> | |
50 | - <i class="fa fa-vcard"></i> 差异复盘 | |
51 | - </a>--> | |
98 | + <!--<a class="btn btn-outline btn-danger btn-rounded" onclick="createCyclecountWithGapQty()" | |
99 | + shiro:hasPermission="inventoryHeader:cycleCountDetail:cyclecountRepeat"> | |
100 | + <i class="fa fa-vcard"></i> 差异复盘 | |
101 | + </a>--> | |
52 | 102 | <!--<a class="btn btn-outline btn-danger btn-rounded" onclick="adjust()" |
53 | 103 | shiro:hasPermission="inventoryHeader:cycleCountDetail:adjust"> |
54 | 104 | <i class="fa fa-vcard"></i> 差异库存调整 |
... | ... | @@ -65,33 +115,39 @@ |
65 | 115 | var prefix = ctx + "inventory/adjustDetail"; |
66 | 116 | var prefix_head = ctx + "inventory/adjustHeader"; |
67 | 117 | var datas = [[${@dict.getType('adjustType')}]]; |
68 | - var inventoryStatus=[[${@dict.getType('inventoryStatus')}]]; | |
69 | - var created ; | |
118 | + var inventoryStatus = [[${@dict.getType('inventoryStatus')}]]; | |
119 | + var created; | |
70 | 120 | |
71 | 121 | $(function () { |
72 | - var options = { | |
73 | - // url: prefix + "/list", | |
74 | -/* createUrl: prefix + "/add", | |
75 | - updateUrl: prefix + "/edit/{id}", | |
76 | - removeUrl: prefix + "/remove",*/ | |
122 | + update(); | |
123 | + }); | |
124 | + | |
125 | + function update() { | |
126 | + let adjustCode=null; | |
127 | + let options = { | |
128 | + url:prefix + "/list", | |
77 | 129 | modalName: "调整单明细", |
78 | 130 | sortName: "id", |
79 | 131 | sortOrder: "desc", |
80 | - showRefresh:false, | |
132 | + showRefresh: false, | |
81 | 133 | search: false, |
82 | - // pagination:false, | |
83 | 134 | columns: [ |
84 | 135 | { |
85 | - radio: true | |
86 | - }, | |
136 | + radio: true | |
137 | + }, | |
87 | 138 | { |
88 | 139 | field: 'id', |
89 | 140 | title: '明细id', |
90 | - sortable:true | |
141 | + sortable: true | |
142 | + }, | |
143 | + { | |
144 | + field: 'adjustCode', | |
145 | + title: '调整主单编码', | |
146 | + visible: true | |
91 | 147 | }, |
92 | 148 | { |
93 | - field: 'cyclecountAdjustCode', | |
94 | - title: '差异单编码', | |
149 | + field: 'warehouseCode', | |
150 | + title: '仓库', | |
95 | 151 | visible: false |
96 | 152 | }, |
97 | 153 | { |
... | ... | @@ -99,14 +155,14 @@ |
99 | 155 | title: '货主' |
100 | 156 | }, |
101 | 157 | { |
102 | - field: 'cyclecountHeadCode', | |
158 | + field: 'cycleCountCode', | |
103 | 159 | title: '盘点单编码', |
104 | 160 | }, |
105 | 161 | { |
106 | - field: 'cyclecountDetailId', | |
107 | - title: '盘点单明细id', | |
108 | - sortable:true, | |
109 | - visible: false | |
162 | + field: 'cycleDetailId', | |
163 | + title: '盘点单明细ID', | |
164 | + sortable: true, | |
165 | + visible: true | |
110 | 166 | }, |
111 | 167 | { |
112 | 168 | field: 'locationCode', |
... | ... | @@ -127,174 +183,168 @@ |
127 | 183 | |
128 | 184 | }, |
129 | 185 | { |
130 | - field: 'materialSpecification', | |
186 | + field: 'materialSpec', | |
131 | 187 | title: '物料规格', |
132 | 188 | |
133 | 189 | }, |
134 | 190 | { |
135 | - field: 'receiptCode', | |
136 | - title: '入库单编码' | |
191 | + field: 'materialUnit', | |
192 | + title: '物料单位', | |
193 | + | |
137 | 194 | }, |
138 | 195 | { |
139 | - field: 'receiptId', | |
140 | - title: '入库单id', | |
141 | - sortable:true, | |
142 | - visible: false | |
196 | + field: 'checkCode', | |
197 | + title: '质检单号', | |
198 | + visible: true | |
143 | 199 | }, |
144 | 200 | { |
145 | - field: 'receiptDetailId', | |
146 | - title: '入库单明细id', | |
147 | - sortable:true, | |
201 | + field: 'checkDetailId', | |
202 | + title: '质检单明细行号', | |
148 | 203 | visible: false |
149 | 204 | }, |
150 | 205 | { |
151 | - field: 'systemQty', | |
152 | - title: '系统数量' | |
206 | + field: 'referCode', | |
207 | + title: '调整单关联单号', | |
208 | + visible: true | |
153 | 209 | }, |
154 | 210 | { |
155 | - title: '实际盘点数量', | |
156 | - field:'countedQty' | |
211 | + field: 'referDetailId', | |
212 | + title: '调整单关联明细ID', | |
213 | + visible: false | |
157 | 214 | }, |
215 | + | |
158 | 216 | { |
159 | - title: '差异数量', | |
160 | - field: 'gapQty' | |
217 | + field: 'problemType', | |
218 | + title: '调整类型', | |
219 | + sortable: true, | |
220 | + visible: true | |
161 | 221 | }, |
162 | 222 | { |
163 | - title: '调整数量', | |
164 | - field: 'adjustQty' | |
223 | + field: 'fromQty', | |
224 | + title: '调整前数量' | |
165 | 225 | }, |
166 | 226 | { |
167 | - field: 'batch', | |
168 | - title: '批次', | |
169 | - sortable:true, | |
170 | - sortable:true | |
227 | + field: 'toQty', | |
228 | + title: '调整后数量' | |
171 | 229 | }, |
172 | 230 | { |
173 | - field: 'lot', | |
174 | - title: '批号', | |
175 | - sortable:true, | |
176 | - sortable:true | |
231 | + field: 'gapQty', | |
232 | + title: '调整数量' | |
177 | 233 | }, |
178 | 234 | { |
179 | - field: 'project', | |
180 | - title: '项目号', | |
181 | - sortable:true, | |
182 | - sortable:true | |
235 | + field: 'fromInventorySts', | |
236 | + title: '调整前状态', | |
237 | + visible: true | |
183 | 238 | }, |
184 | 239 | { |
185 | - field: 'manufactureDate', | |
186 | - title: '生产日期', | |
187 | - sortable:true, | |
188 | - visible: false | |
189 | - | |
240 | + field: 'toInventorySts', | |
241 | + title: '调整后状态', | |
242 | + visible: true | |
190 | 243 | }, |
191 | 244 | { |
192 | - field: 'expirationDate', | |
193 | - title: '失效日期', | |
194 | - sortable:true, | |
245 | + field: 'attributeId', | |
246 | + title: '属性号', | |
247 | + sortable: true, | |
195 | 248 | visible: false |
249 | + | |
196 | 250 | }, |
197 | 251 | { |
198 | - field: 'inventoryStatus', | |
252 | + field: 'inventorySts', | |
199 | 253 | title: '库存状态', |
200 | - formatter: function(value, row, index) { | |
254 | + formatter: function (value, row, index) { | |
201 | 255 | return $.table.selectDictLabel(inventoryStatus, value); |
202 | 256 | }, |
203 | - sortable:true | |
257 | + sortable: true | |
204 | 258 | }, |
205 | 259 | |
206 | 260 | { |
207 | 261 | field: 'created', |
208 | 262 | title: '创建时间', |
209 | - sortable:true | |
263 | + sortable: true | |
210 | 264 | }, |
211 | 265 | { |
212 | 266 | field: 'createdBy', |
213 | 267 | title: '创建用户' |
214 | 268 | }, |
215 | 269 | { |
216 | - field: 'lastUpdated', | |
217 | - title: '更新时间', | |
218 | - sortable:true | |
219 | - }, | |
220 | - { | |
221 | - field: 'lastUpdatedBy', | |
222 | - title: '更新用户' | |
270 | + field: 'agreeTime', | |
271 | + title: '审批时间', | |
272 | + sortable: true | |
223 | 273 | }, |
224 | 274 | { |
225 | - field: 'fromSource', | |
226 | - title: '物料来源' | |
275 | + field: 'agreeBy', | |
276 | + title: '审批人' | |
227 | 277 | }, |
228 | 278 | { |
229 | 279 | field: 'status', |
230 | 280 | title: '明细状态', |
231 | - formatter: function(value, row, index) { | |
281 | + formatter: function (value, row, index) { | |
232 | 282 | return $.table.selectDictLabel(datas, value); |
233 | 283 | }, |
234 | - sortable:true | |
235 | - }, | |
236 | - // { | |
237 | - // field: 'userDef1', | |
238 | - // title: '自定义字段1' | |
239 | - // }, | |
240 | - /*{ | |
241 | - title: '操作', | |
242 | - align: 'center', | |
243 | - formatter: function (value, row, index) { | |
244 | - var actions = []; | |
245 | - actions.push('<a class="btn btn-success btn-xs " href="#" onclick="addAdjust(\'' + row.id + '\')"><i class="fa fa-edit"></i>差异调整</a>'); | |
246 | - return actions.join(''); | |
247 | - } | |
248 | - }*/ | |
284 | + sortable: true | |
285 | + }, | |
286 | + { | |
287 | + field: 'Remark', | |
288 | + title: '备注', | |
289 | + visible: true | |
290 | + }, | |
291 | + { | |
292 | + field: 'version', | |
293 | + title: '数据版本', | |
294 | + visible: false | |
295 | + }, | |
296 | + { | |
297 | + field: 'processStamp', | |
298 | + title: '处理标记', | |
299 | + visible: false | |
300 | + }, | |
301 | + | |
302 | + | |
249 | 303 | ] |
250 | 304 | }; |
251 | - $.table.init(options); | |
252 | - update(); | |
253 | - }); | |
254 | - | |
255 | - function update() { | |
256 | - var url = location.search; //获取url中"?"符后的字串 | |
305 | + let url = location.search; //获取url中"?"符后的字串 | |
257 | 306 | if (url.indexOf("?") != -1) { //判断是否有参数 |
258 | - var str = url.substr(1); //从第一个字符开始 因为第0个是?号 获取所有除问号的所有符串 | |
259 | - strs = str.split("="); //用等号进行分隔 (因为知道只有一个参数 所以直接用等号进分隔 如果有多个参数 要用&号分隔 再用等号进行分隔) | |
260 | - $.ajax({ | |
261 | - url: prefix + "/list", | |
262 | - type:"post", | |
263 | - data:{ | |
264 | - code:strs[1] | |
265 | - }, | |
266 | - success:function (res) { | |
267 | - $("#bootstrap-table").bootstrapTable('removeAll'); | |
268 | - // $("#bootstrap-table").bootstrapTable('append', res.data); | |
269 | - for (var i = 0; i < res.data.length; i++) { | |
270 | - $("#bootstrap-table").bootstrapTable('insertRow', {index:i,row:res.data[i]}); | |
271 | - | |
272 | - } | |
273 | - } | |
274 | - }) | |
307 | + let str = url.substr(1); //从第一个字符开始 因为第0个是?号 获取所有除问号的所有符串 | |
308 | + options.queryParams=function(params) { | |
309 | + return { | |
310 | + // 传递参数查询参数 | |
311 | + adjustCode: adjustCode, | |
312 | + pageSize: params.limit, | |
313 | + pageNum: params.offset / params.limit + 1, | |
314 | + searchValue: params.search, | |
315 | + orderByColumn: params.sort, | |
316 | + isAsc: params.order | |
317 | + }; | |
318 | + }; | |
319 | + adjustCode=str.split("=")[1]; | |
320 | + $.table.init(options); | |
321 | + } | |
322 | + else{ | |
323 | + $.table.init(options); | |
275 | 324 | } |
276 | - $.ajax({ | |
277 | - url:prefix_head+ "/getHeader", | |
278 | - type:"post", | |
279 | - data:{ | |
280 | - id:$('#cyclecountAdjustId').val() | |
325 | + | |
326 | + /*$.ajax({ | |
327 | + url: prefix_head + "/getHeader", | |
328 | + type: "post", | |
329 | + data: { | |
330 | + id: $('#cyclecountAdjustId').val() | |
281 | 331 | }, |
282 | - success:function (value) { | |
332 | + success: function (value) { | |
283 | 333 | if (value.data) { |
284 | 334 | $('#code').val(value.data.code); |
285 | - // $('#type').val(value.data.typeLabel); | |
335 | + // $('#type').val(value.data.typeLabel); | |
286 | 336 | $('#status').val(value.data.statusLabel); |
287 | 337 | $('#created').val(value.data.created); |
288 | - var text_val=$('#created').val(); | |
289 | - $('#created').val(text_val.replace("T"," ")); | |
338 | + var text_val = $('#created').val(); | |
339 | + $('#created').val(text_val.replace("T", " ")); | |
290 | 340 | //$('#createdBy').val(value.data.createdBy); |
291 | 341 | $('#lastUpdated').val(value.data.lastUpdated); |
292 | - var text_val_t=$('#lastUpdated').val(); | |
293 | - $('#lastUpdated').val(text_val_t.replace("T"," ")); | |
342 | + var text_val_t = $('#lastUpdated').val(); | |
343 | + $('#lastUpdated').val(text_val_t.replace("T", " ")); | |
294 | 344 | //$('#lastUpdatedBy').val(value.data.lastUpdatedBy); |
295 | 345 | } |
296 | 346 | } |
297 | - }) | |
347 | + })*/ | |
298 | 348 | } |
299 | 349 | |
300 | 350 | /**盘点差异调整*/ |
... | ... | @@ -302,35 +352,36 @@ |
302 | 352 | var row = $('#bootstrap-table').bootstrapTable('getSelections'); |
303 | 353 | |
304 | 354 | $.modal.confirm("注意:该操作将更改库存,当实盘数量为0且库位上只剩空容器时,请手动执行空托出库任务,容器上有货则无需其他操作!", |
305 | - function() { | |
306 | - var cyclecountAdjustId = $('#cyclecountAdjustId').val(); | |
307 | - var companyCode = $('#companyCode').val(); | |
308 | - var code = $('#code').val(); | |
309 | - var cyclecountHeadCode = $('#sourceCode').val(); | |
310 | - //判断有没有选取明细条目,进的页面不同 | |
311 | - if(row.length !== 0){ | |
312 | - /*判断是否已经调整过*/ | |
313 | - if(row[0].status == 40){ | |
314 | - $.modal.msg('该条明细已调整,请勿重复调整!') | |
315 | - }else{ | |
316 | - $.modal.open("差异调整单",prefix+"/adjustEdit?id=" + row[0].id) | |
317 | - } | |
318 | - }else{ | |
319 | - $.modal.open("调整单",prefix+"/addAdjust?cyclecountAdjustId=" + cyclecountAdjustId + "&companyCode=" + companyCode + "&code=" + code + "&cyclecountHeadCode=" + cyclecountHeadCode); | |
320 | - } | |
321 | - }); | |
355 | + function () { | |
356 | + var cyclecountAdjustId = $('#cyclecountAdjustId').val(); | |
357 | + var companyCode = $('#companyCode').val(); | |
358 | + var code = $('#code').val(); | |
359 | + var cyclecountHeadCode = $('#sourceCode').val(); | |
360 | + //判断有没有选取明细条目,进的页面不同 | |
361 | + if (row.length !== 0) { | |
362 | + /*判断是否已经调整过*/ | |
363 | + if (row[0].status == 40) { | |
364 | + $.modal.msg('该条明细已调整,请勿重复调整!') | |
365 | + } else { | |
366 | + $.modal.open("差异调整单", prefix + "/adjustEdit?id=" + row[0].id) | |
367 | + } | |
368 | + } else { | |
369 | + $.modal.open("调整单", prefix + "/addAdjust?cyclecountAdjustId=" + cyclecountAdjustId + "&companyCode=" + companyCode + "&code=" + code + "&cyclecountHeadCode=" + cyclecountHeadCode); | |
370 | + } | |
371 | + }); | |
322 | 372 | } |
373 | + | |
323 | 374 | // |
324 | - function open(title, url, width, height){ | |
375 | + function open(title, url, width, height) { | |
325 | 376 | if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) { |
326 | 377 | width = 'auto'; |
327 | 378 | height = 'auto'; |
328 | 379 | } |
329 | - if (title==null){ | |
380 | + if (title == null) { | |
330 | 381 | title = false; |
331 | 382 | } |
332 | - if (url==null){ | |
333 | - url="404.html"; | |
383 | + if (url == null) { | |
384 | + url = "404.html"; | |
334 | 385 | } |
335 | 386 | if ($.common.isEmpty(width)) { |
336 | 387 | width = 800; |
... | ... | @@ -356,46 +407,46 @@ |
356 | 407 | * 差异复盘 |
357 | 408 | */ |
358 | 409 | function createCyclecountWithGapQty() { |
359 | - $.modal.confirm("确认进行差异复盘么?该操作会将有差异的明细重新生成一个新的盘点单。", function() { | |
410 | + $.modal.confirm("确认进行差异复盘么?该操作会将有差异的明细重新生成一个新的盘点单。", function () { | |
360 | 411 | var url = prefix + "/createCyclecountWithGapQty"; |
361 | - var data = { "headId": $('#headId').val() }; | |
412 | + var data = {"headId": $('#headId').val()}; | |
362 | 413 | postInner(url, data); |
363 | 414 | }); |
364 | 415 | } |
365 | 416 | |
366 | -/* //调整差异库存 | |
367 | - function adjust() { | |
368 | - $.modal.confirm("注意:该操作将更改库存,当实盘数量为0且库位上只剩空容器时,请手动执行空托出库任务,容器上有货则无需其他操作!", | |
369 | - function() { | |
370 | - var url = prefix + "/adjust"; | |
371 | - var data = { "headId": $('#headId').val() }; | |
372 | - postInner(url,data); | |
373 | - }); | |
374 | - } | |
375 | - function postInner(url,data) { | |
376 | - $.modal.loading("正在处理中,请稍后..."); | |
377 | - $.ajax({ | |
378 | - url:url, | |
379 | - type:"post", | |
380 | - data:data, | |
381 | - success:function (result) { | |
382 | - if (result.code == web_status.SUCCESS) { | |
383 | - $.modal.msgSuccess(result.msg); | |
384 | - update(); | |
385 | - } else { | |
386 | - $.modal.alertError(result.msg); | |
417 | + /* //调整差异库存 | |
418 | + function adjust() { | |
419 | + $.modal.confirm("注意:该操作将更改库存,当实盘数量为0且库位上只剩空容器时,请手动执行空托出库任务,容器上有货则无需其他操作!", | |
420 | + function() { | |
421 | + var url = prefix + "/adjust"; | |
422 | + var data = { "headId": $('#headId').val() }; | |
423 | + postInner(url,data); | |
424 | + }); | |
425 | + } | |
426 | + function postInner(url,data) { | |
427 | + $.modal.loading("正在处理中,请稍后..."); | |
428 | + $.ajax({ | |
429 | + url:url, | |
430 | + type:"post", | |
431 | + data:data, | |
432 | + success:function (result) { | |
433 | + if (result.code == web_status.SUCCESS) { | |
434 | + $.modal.msgSuccess(result.msg); | |
435 | + update(); | |
436 | + } else { | |
437 | + $.modal.alertError(result.msg); | |
438 | + } | |
439 | + $.modal.closeLoading(); | |
387 | 440 | } |
388 | - $.modal.closeLoading(); | |
389 | - } | |
390 | - }) | |
391 | - }*/ | |
441 | + }) | |
442 | + }*/ | |
392 | 443 | |
393 | -/* //下发单条盘点 | |
394 | - function outcheck(id) { | |
395 | - var url = prefix + "/createCyccoutTaskByDetailId"; | |
396 | - var data = { "detailId": id }; | |
397 | - postInner(url,data); | |
398 | - }*/ | |
444 | + /* //下发单条盘点 | |
445 | + function outcheck(id) { | |
446 | + var url = prefix + "/createCyccoutTaskByDetailId"; | |
447 | + var data = { "detailId": id }; | |
448 | + postInner(url,data); | |
449 | + }*/ | |
399 | 450 | |
400 | 451 | |
401 | 452 | </script> |
... | ... |
src/main/resources/templates/inventory/adjustHeader/adjustHeader.html
... | ... | @@ -25,10 +25,10 @@ |
25 | 25 | <div class="select-list"> |
26 | 26 | <ul> |
27 | 27 | <li> |
28 | - 调整单编号:<input type="text" name="code"/> | |
28 | + 调整单编码:<input type="text" name="code"/> | |
29 | 29 | </li> |
30 | 30 | <li> |
31 | - 盘点单号:<input type="text" name="sourceCode"/> | |
31 | + 盘点单编码:<input type="text" name="sourceCode"/> | |
32 | 32 | </li> |
33 | 33 | <li> |
34 | 34 | 盘点类型:<select name="problemType" |
... | ... | @@ -39,7 +39,7 @@ |
39 | 39 | </select> |
40 | 40 | </li> |
41 | 41 | <li> |
42 | - 质检单号:<input type="text" name="checkCode"/> | |
42 | + 质检单编码:<input type="text" name="checkCode"/> | |
43 | 43 | </li> |
44 | 44 | <li> |
45 | 45 | 上游单编码:<input type="text" name="referCode"/> |
... | ... | @@ -178,14 +178,18 @@ |
178 | 178 | }; |
179 | 179 | $.table.init(options); |
180 | 180 | $("#myTab li:eq(1)").one('click', (function () { |
181 | - var cyc_id = $("#bootstrap-table tr:eq(1) td:eq(1)").text(); | |
182 | - var cyc_code = $("#bootstrap-table tr:eq(1) td:eq(2)").text(); | |
183 | - detail(cyc_id, cyc_code); | |
181 | + // var cyc_id = $("#bootstrap-table tr:eq(1) td:eq(1)").text(); | |
182 | + // var cyc_code = $("#bootstrap-table tr:eq(1) td:eq(2)").text(); | |
183 | + // detail(cyc_id, cyc_code); | |
184 | + detail(); | |
184 | 185 | })); |
185 | 186 | }); |
186 | 187 | |
187 | 188 | function detail(id, code) { |
188 | - var url = ctx + "inventory/adjustDetail?adjustCode=" + code; | |
189 | + let url = ctx + "inventory/adjustDetail"; | |
190 | + if (id || code) { | |
191 | + url = ctx + "inventory/adjustDetail?adjustCode=" + code; | |
192 | + } | |
189 | 193 | $("#tabDetail").children().remove(); |
190 | 194 | $("#myTab li").removeClass("active"); |
191 | 195 | var height = $(document).height() - 100 + 'px'; |
... | ... |
src/main/resources/templates/inventory/cycleCountDetail/cycleCountDetail.html
... | ... | @@ -122,8 +122,12 @@ |
122 | 122 | |
123 | 123 | |
124 | 124 | $(function () { |
125 | - var options = { | |
126 | - // url: prefix + "/list", | |
125 | + update(); | |
126 | + }); | |
127 | + | |
128 | + function update() { | |
129 | + let options = { | |
130 | + url: prefix + "/list", | |
127 | 131 | createUrl: prefix + "/add", |
128 | 132 | updateUrl: prefix + "/edit/{id}", |
129 | 133 | removeUrl: prefix + "/remove", |
... | ... | @@ -132,11 +136,10 @@ |
132 | 136 | sortOrder: "desc", |
133 | 137 | showRefresh:false, |
134 | 138 | search: false, |
135 | - pagination:false, | |
136 | 139 | columns: [ |
137 | 140 | { |
138 | - checkbox: true | |
139 | - }, | |
141 | + checkbox: true | |
142 | + }, | |
140 | 143 | { |
141 | 144 | field: 'id', |
142 | 145 | title: '明细ID', |
... | ... | @@ -324,44 +327,25 @@ |
324 | 327 | return actions.join(''); |
325 | 328 | } |
326 | 329 | }] |
327 | - }; | |
328 | - $.table.init(options); | |
329 | - update(); | |
330 | - }); | |
331 | - | |
332 | - function update() { | |
333 | - let url = location.search; //获取url中"?"符后的字串 | |
330 | + },url = location.search; //获取url中"?"符后的字串 | |
334 | 331 | if (url.indexOf("?") != -1) { //判断是否有参数 |
335 | - let str = url.substr(1); //从第一个字符开始 因为第0个是?号 获取所有除问号的所有符串 | |
336 | - let strs = str.split("="); //用等号进行分隔 (因为知道只有一个参数 所以直接用等号进分隔 如果有多个参数 要用&号分隔 再用等号进行分隔) | |
337 | - $.ajax({ | |
338 | - url: prefix + "/list", | |
339 | - type:"post", | |
340 | - data:{ | |
341 | - cycleCountHeadId:strs[1] | |
342 | - }, | |
343 | - success:function (res) { | |
344 | - $("#bootstrap-table").bootstrapTable('removeAll'); | |
345 | - // $("#bootstrap-table").bootstrapTable('append', res.data); | |
346 | - for (var i = 0; i < res.data.length; i++) { | |
347 | - $("#bootstrap-table").bootstrapTable('insertRow', {index:i,row:res.data[i]}); | |
348 | - } | |
349 | - } | |
350 | - }); | |
351 | - return false | |
332 | + let strs = url.substr(1).split("="); | |
333 | + options.queryParams=function(params) { | |
334 | + return { | |
335 | + // 传递参数查询参数 | |
336 | + cycleCountHeadId:strs[1], | |
337 | + pageSize: params.limit, | |
338 | + pageNum: params.offset / params.limit + 1, | |
339 | + searchValue: params.search, | |
340 | + orderByColumn: params.sort, | |
341 | + isAsc: params.order | |
342 | + }; | |
343 | + }; | |
344 | + $.table.init(options); | |
345 | + } | |
346 | + else{ | |
347 | + $.table.init(options); | |
352 | 348 | } |
353 | - $.ajax({ | |
354 | - url: prefix + "/list", | |
355 | - type:"post", | |
356 | - data:{}, | |
357 | - success:function (res) { | |
358 | - $("#bootstrap-table").bootstrapTable('removeAll'); | |
359 | - // $("#bootstrap-table").bootstrapTable('append', res.data); | |
360 | - for (var i = 0; i < res.data.length; i++) { | |
361 | - $("#bootstrap-table").bootstrapTable('insertRow', {index:i,row:res.data[i]}); | |
362 | - } | |
363 | - } | |
364 | - }) | |
365 | 349 | } |
366 | 350 | function add() { |
367 | 351 | var cycleCountHeadId = $('#cycleCountHeadId').val(); |
... | ... |
src/main/resources/templates/inventory/inventoryDetail/inventoryDetail.html
... | ... | @@ -103,6 +103,7 @@ |
103 | 103 | |
104 | 104 | function update() { |
105 | 105 | let options = { |
106 | + url : prefix + "/inventoryDetailLook", | |
106 | 107 | createUrl: prefix + "/add", |
107 | 108 | updateUrl: prefix + "/edit/{id}", |
108 | 109 | removeUrl: prefix + "/remove", |
... | ... | @@ -306,25 +307,21 @@ |
306 | 307 | $("#locationCode").val(strs[1]); |
307 | 308 | $("#containerCode").val(strs[2]); |
308 | 309 | if (location.search.indexOf("?") === -1) { |
309 | - options.url = prefix + "/inventoryDetailLook"; | |
310 | 310 | $.table.init(options); |
311 | 311 | } |
312 | 312 | else{ |
313 | + options.queryParams=function(params) { | |
314 | + return { | |
315 | + // 传递参数查询参数 | |
316 | + inventoryHeaderId: strs[0], | |
317 | + pageSize: params.limit, | |
318 | + pageNum: params.offset / params.limit + 1, | |
319 | + searchValue: params.search, | |
320 | + orderByColumn: params.sort, | |
321 | + isAsc: params.order | |
322 | + }; | |
323 | + }; | |
313 | 324 | $.table.init(options); |
314 | - $.ajax({ | |
315 | - url: prefix + "/inventoryDetailLook", | |
316 | - type: "post", | |
317 | - data: { | |
318 | - inventoryHeaderId: strs[0] || null | |
319 | - }, | |
320 | - success: function (res) { | |
321 | - $("#bootstrap-table").bootstrapTable('removeAll'); | |
322 | - for (let i = 0; i < res.data.length; i++) { | |
323 | - $("#bootstrap-table").bootstrapTable('insertRow', {index: i, row: res.data[i]}); | |
324 | - | |
325 | - } | |
326 | - } | |
327 | - }) | |
328 | 325 | } |
329 | 326 | } |
330 | 327 | |
... | ... |
src/main/resources/templates/receipt/receiptDetailHistory/receiptDetailHistory.html
... | ... | @@ -2,228 +2,145 @@ |
2 | 2 | <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
3 | 3 | <meta charset="utf-8"> |
4 | 4 | <head th:include="include :: header"></head> |
5 | -<body> | |
6 | -<div class="col-sm-12 select-info"> | |
7 | - <form id="receiptDetail-form"> | |
8 | - <div class="select-list"> | |
9 | - <ul> | |
10 | - <li> | |
11 | - 入库单号:<input type="text" name="code"/> | |
12 | - </li> | |
13 | - <li> | |
14 | - 物料编码:<input type="text" name="materialCode"/> | |
15 | - </li> | |
16 | - <li> | |
17 | - 物料批次:<input type="text" name="batch"/> | |
18 | - </li> | |
19 | - <!--<li class="time">--> | |
20 | - <!--<label>创建时间: </label>--> | |
21 | - <!--<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>--> | |
22 | - <!--<span>-</span>--> | |
23 | - <!--<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>--> | |
24 | - <!--</li>--> | |
25 | - <li> | |
26 | - <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> | |
27 | - <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="receipt:receiptDetail:export"><i class="fa fa-download"></i> 导出</a>--> | |
28 | - </li> | |
29 | - </ul> | |
5 | +<body class="gray-bg"> | |
6 | + <div class="container-div"> | |
7 | + <div class="row"> | |
8 | + <div class="btn-group hidden-xs" id="toolbar" role="group"> | |
9 | + <input type="hidden" id="receiptId" name="receiptId" th:value="${receiptId}"/> | |
10 | + </div> | |
11 | + | |
12 | + <div class="col-sm-12 select-info"> | |
13 | + <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table> | |
14 | + </div> | |
30 | 15 | </div> |
31 | - </form> | |
32 | -</div> | |
16 | + </div> | |
17 | + <div th:include="include :: footer"></div> | |
18 | + <script th:inline="javascript"> | |
19 | + var editFlag = [[${@permission.hasPermi('receipt:history:edit')}]]; | |
20 | + var removeFlag = [[${@permission.hasPermi('receipt:history:remove')}]]; | |
21 | + var prefix = ctx + "receipt/receiptDetailHistory" | |
33 | 22 | |
34 | -<input type="hidden" id="receiptId" name="receiptId" th:value="${receiptId}"/> | |
35 | -<input type="hidden" id="receiptCode" name="receiptCode" th:value="${receiptCode}"/> | |
36 | -<div class="btn-group hidden-xs" id="toolbar" role="group"> | |
37 | - <a class="btn btn-outline btn-success btn-rounded" onclick="add()" shiro:hasPermission="receipt:receiptDetail:add"> | |
38 | - <i class="fa fa-plus"></i> 新增 | |
39 | - </a> | |
40 | - <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="receipt:receiptDetail:remove"> | |
41 | - <i class="fa fa-trash-o"></i> 删除 | |
42 | - </a> | |
43 | -</div> | |
44 | - | |
45 | -<div class="col-sm-12 select-info"> | |
46 | - <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table> | |
47 | -</div> | |
48 | - | |
49 | - | |
50 | -<div th:include="include :: footer"></div> | |
51 | -<script th:inline="javascript"> | |
52 | - var editFlag = [[${@permission.hasPermi('receipt:receiptDetail:edit')}]]; | |
53 | - var removeFlag = [[${@permission.hasPermi('receipt:receiptDetail:remove')}]]; | |
54 | - var approvalFlag = [[${@permission.hasPermi('receipt:receiptHeader:approval')}]] | |
55 | - var prefix = ctx + "receipt/receiptDetailHistory"; | |
56 | - var datas = [[${@dict.getType('isVirtualBom')}]]; | |
57 | - $(function() { | |
58 | - var options = { | |
59 | - url: prefix + "/list", | |
60 | - createUrl: prefix + "/add", | |
61 | - updateUrl: prefix + "/edit/{id}", | |
62 | - removeUrl: prefix + "/remove", | |
63 | - queryParams: queryParams, | |
64 | - modalName: "入库明细历史", | |
65 | - search: false, | |
66 | - sortName: "id", | |
67 | - sortOrder: "desc", | |
68 | - columns: [{ | |
69 | - checkbox: true | |
70 | - }, | |
71 | - { | |
72 | - field : 'id', | |
73 | - title : 'id' | |
74 | - }, | |
75 | - { | |
76 | - field : 'receiptCode', | |
77 | - title : '入库单编码' | |
78 | - }, | |
79 | - { | |
80 | - field : 'materialCode', | |
81 | - title : '物料编码' | |
82 | - }, | |
23 | + $(function() { | |
24 | + var options = { | |
25 | + url: prefix + "/list", | |
26 | + createUrl: prefix + "/add", | |
27 | + updateUrl: prefix + "/edit/{id}", | |
28 | + removeUrl: prefix + "/remove", | |
29 | + queryParams: queryParams, | |
30 | + modalName: "入库明细历史", | |
31 | + search: false, | |
32 | + sortName: "id", | |
33 | + sortOrder: "desc", | |
34 | + columns: [{ | |
35 | + checkbox: true | |
36 | + }, | |
83 | 37 | { |
84 | - field : 'materialName', | |
85 | - title : '物料名称' | |
38 | + field : 'id', | |
39 | + title : '入库明细id' | |
86 | 40 | }, |
87 | 41 | { |
88 | - field : 'materialSpec', | |
89 | - title : '物料规格' | |
42 | + field : 'sourceLine', | |
43 | + title : '上游系统行号' | |
90 | 44 | }, |
91 | 45 | { |
92 | - field : 'materialUnit', | |
93 | - title : '物料单位' | |
46 | + field : 'receiptId', | |
47 | + title : '入库单id' | |
94 | 48 | }, |
95 | 49 | { |
96 | - field : 'supplierCode', | |
97 | - title : '供应商编码' | |
50 | + field : 'receiptCode', | |
51 | + title : '入库单编码' | |
98 | 52 | }, |
99 | 53 | { |
100 | - field : 'batch', | |
101 | - title : '批次' | |
54 | + field : 'materialId', | |
55 | + title : '物料Id' | |
102 | 56 | }, |
103 | 57 | { |
104 | - field : 'lot', | |
105 | - title : '批号' , | |
106 | - visible:false | |
58 | + field : 'materialCode', | |
59 | + title : '存货编码' | |
107 | 60 | }, |
108 | 61 | { |
109 | - field : 'qcCheck', | |
110 | - title : '是否质检' | |
62 | + field : 'batch', | |
63 | + title : '批次' | |
111 | 64 | }, |
112 | 65 | { |
113 | - field : 'projectNo', | |
114 | - title : '项目号' | |
66 | + field : 'lot', | |
67 | + title : '批号' | |
115 | 68 | }, |
116 | 69 | { |
117 | - field : 'manufactureDate', | |
118 | - title : '生产日期' , | |
119 | - visible:false | |
70 | + field : 'project', | |
71 | + title : '项目号' | |
120 | 72 | }, |
121 | 73 | { |
122 | - field : 'expirationDate', | |
123 | - title : '失效日期' , | |
124 | - visible:false | |
74 | + field : 'manufactureDate', | |
75 | + title : '生产日期' | |
125 | 76 | }, |
126 | 77 | { |
127 | - field : 'agingDate', | |
128 | - title : '入库日期' , | |
129 | - visible:false | |
78 | + field : 'expirationDate', | |
79 | + title : '失效日期' | |
130 | 80 | }, |
131 | 81 | { |
132 | - field : 'totalQty', | |
133 | - title : '总数量' | |
82 | + field : 'inventoryStatus', | |
83 | + title : '库存状态' | |
134 | 84 | }, |
135 | 85 | { |
136 | - field : 'openQty', | |
137 | - title : '未收数量' | |
86 | + field : 'qty', | |
87 | + title : '收货数量' | |
138 | 88 | }, |
139 | 89 | { |
140 | - field : 'referCode', | |
141 | - title : 'ERP单号', | |
142 | - visible : false | |
90 | + field : 'price', | |
91 | + title : '单价' | |
143 | 92 | }, |
144 | 93 | { |
145 | - field : 'referId', | |
146 | - title : 'ERP内部号', | |
147 | - visible : false | |
94 | + field : 'created', | |
95 | + title : '创建时间' | |
148 | 96 | }, |
149 | 97 | { |
150 | - field : 'referLineNum', | |
151 | - title : 'ERP行号', | |
152 | - visible : false | |
98 | + field : 'createdBy', | |
99 | + title : '创建用户' | |
153 | 100 | }, |
154 | 101 | { |
155 | - field : 'locatingRule', | |
156 | - title : '定位规则' | |
102 | + field : 'lastUpdated', | |
103 | + title : '最后修改时间' | |
157 | 104 | }, |
158 | 105 | { |
159 | - field : 'inventorySts', | |
160 | - title : '库存状态', | |
161 | - visible : false | |
106 | + field : 'lastUpdatedBy', | |
107 | + title : '更新用户' | |
162 | 108 | }, |
163 | 109 | { |
164 | - field : 'itemListPrice', | |
165 | - title : '标价' | |
110 | + field : 'deleted', | |
111 | + title : '是否删除' | |
166 | 112 | }, |
167 | 113 | { |
168 | - field : 'itemNetPrice', | |
169 | - title : '净价' | |
114 | + field : 'userDef1', | |
115 | + title : '自定义字段1' | |
170 | 116 | }, |
171 | 117 | { |
172 | - field : 'price', | |
173 | - title : '单价' , | |
174 | - visible:false | |
118 | + field : 'userDef2', | |
119 | + title : '自定义字段2' | |
175 | 120 | }, |
176 | 121 | { |
177 | - field : 'isVirtualBom', | |
178 | - title : '是否虚拟套件', | |
179 | - formatter: function(value, row, index) { | |
180 | - return $.table.selectDictLabel(datas, value); | |
181 | - } | |
122 | + field : 'userDef3', | |
123 | + title : '自定义字段3' | |
182 | 124 | }, |
183 | - { | |
184 | - field : 'created', | |
185 | - title : '创建时间' | |
186 | - }, | |
187 | - { | |
188 | - field : 'createdBy', | |
189 | - title : '创建用户', | |
190 | - visible:false | |
191 | - }, | |
192 | - { | |
193 | - field : 'lastUpdated', | |
194 | - title : '最后修改时间', | |
195 | - visible:false | |
196 | - }, | |
197 | - { | |
198 | - field : 'lastUpdatedBy', | |
199 | - title : '更新用户' , | |
200 | - visible:false | |
201 | - }, | |
202 | - { | |
203 | - field : 'userDef1', | |
204 | - title : '自定义字段1' , | |
205 | - visible:false | |
206 | - }, | |
207 | - { | |
208 | - field : 'userDef2', | |
209 | - title : '自定义字段2' , | |
210 | - visible:false | |
211 | - }, | |
212 | - { | |
213 | - field : 'userDef3', | |
214 | - title : '自定义字段3' , | |
215 | - visible:false | |
216 | - }] | |
217 | - }; | |
218 | - $.table.init(options); | |
219 | - }); | |
220 | - | |
221 | - function queryParams(params) { | |
222 | - return { | |
223 | - receiptId:$("#receiptId").val() | |
224 | - }; | |
225 | - }; | |
125 | + { | |
126 | + title: '操作', | |
127 | + align: 'center', | |
128 | + formatter: function(value, row, index) { | |
129 | + var actions = []; | |
130 | + //actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); | |
131 | + // actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); | |
132 | + return actions.join(''); | |
133 | + } | |
134 | + }] | |
135 | + }; | |
136 | + $.table.init(options); | |
137 | + }); | |
226 | 138 | |
227 | -</script> | |
139 | + function queryParams(params) { | |
140 | + return { | |
141 | + receiptId: $("#receiptId").val() | |
142 | + }; | |
143 | + } | |
144 | + </script> | |
228 | 145 | </body> |
229 | 146 | </html> |
230 | 147 | \ No newline at end of file |
... | ... |
src/main/resources/templates/receipt/receiptHeaderHistory/edit.html
0 → 100644
1 | +<!DOCTYPE HTML> | |
2 | +<html lang="zh" xmlns:th="http://www.thymeleaf.org"> | |
3 | +<meta charset="utf-8"> | |
4 | +<head th:include="include :: header"></head> | |
5 | +<body class="white-bg"> | |
6 | + <div class="wrapper wrapper-content animated fadeInRight ibox-content"> | |
7 | + <form class="form-horizontal m" id="form-receiptHeaderHistory-edit" th:object="${receiptHeaderHistory}"> | |
8 | + <input id="id" name="id" th:field="*{id}" type="hidden"> | |
9 | + <div class="form-group"> | |
10 | + <label class="col-sm-3 control-label">入库单号:</label> | |
11 | + <div class="col-sm-8"> | |
12 | + <input id="code" name="code" th:field="*{code}" class="form-control" type="text"> | |
13 | + </div> | |
14 | + </div> | |
15 | + <div class="form-group"> | |
16 | + <label class="col-sm-3 control-label">货主id:</label> | |
17 | + <div class="col-sm-8"> | |
18 | + <input id="companyId" name="companyId" th:field="*{companyId}" class="form-control" type="text"> | |
19 | + </div> | |
20 | + </div> | |
21 | + <div class="form-group"> | |
22 | + <label class="col-sm-3 control-label">货主编码:</label> | |
23 | + <div class="col-sm-8"> | |
24 | + <input id="companyCode" name="companyCode" th:field="*{companyCode}" class="form-control" type="text"> | |
25 | + </div> | |
26 | + </div> | |
27 | + <div class="form-group"> | |
28 | + <label class="col-sm-3 control-label">供应商id:</label> | |
29 | + <div class="col-sm-8"> | |
30 | + <input id="supplierId" name="supplierId" th:field="*{supplierId}" class="form-control" type="text"> | |
31 | + </div> | |
32 | + </div> | |
33 | + <div class="form-group"> | |
34 | + <label class="col-sm-3 control-label">供应商编码:</label> | |
35 | + <div class="col-sm-8"> | |
36 | + <input id="supplierCode" name="supplierCode" th:field="*{supplierCode}" class="form-control" type="text"> | |
37 | + </div> | |
38 | + </div> | |
39 | + <div class="form-group"> | |
40 | + <label class="col-sm-3 control-label">入库类型:</label> | |
41 | + <div class="col-sm-8"> | |
42 | + <input id="type" name="type" th:field="*{type}" class="form-control" type="text"> | |
43 | + </div> | |
44 | + </div> | |
45 | + <div class="form-group"> | |
46 | + <label class="col-sm-3 control-label">上游系统单号:</label> | |
47 | + <div class="col-sm-8"> | |
48 | + <input id="sourceCode" name="sourceCode" th:field="*{sourceCode}" class="form-control" type="text"> | |
49 | + </div> | |
50 | + </div> | |
51 | + <div class="form-group"> | |
52 | + <label class="col-sm-3 control-label">上游平台:</label> | |
53 | + <div class="col-sm-8"> | |
54 | + <input id="sourcePlatform" name="sourcePlatform" th:field="*{sourcePlatform}" class="form-control" type="text"> | |
55 | + </div> | |
56 | + </div> | |
57 | + <div class="form-group"> | |
58 | + <label class="col-sm-3 control-label">总数量:</label> | |
59 | + <div class="col-sm-8"> | |
60 | + <input id="totalQty" name="totalQty" th:field="*{totalQty}" class="form-control" type="text"> | |
61 | + </div> | |
62 | + </div> | |
63 | + <div class="form-group"> | |
64 | + <label class="col-sm-3 control-label">总行数:</label> | |
65 | + <div class="col-sm-8"> | |
66 | + <input id="totalLines" name="totalLines" th:field="*{totalLines}" class="form-control" type="text"> | |
67 | + </div> | |
68 | + </div> | |
69 | + <div class="form-group"> | |
70 | + <label class="col-sm-3 control-label">入库单备注:</label> | |
71 | + <div class="col-sm-8"> | |
72 | + <input id="remark" name="remark" th:field="*{remark}" class="form-control" type="text"> | |
73 | + </div> | |
74 | + </div> | |
75 | + <div class="form-group"> | |
76 | + <label class="col-sm-3 control-label">上传状态:</label> | |
77 | + <div class="col-sm-8"> | |
78 | + <input id="uploadStatus" name="uploadStatus" th:field="*{uploadStatus}" class="form-control" type="text"> | |
79 | + </div> | |
80 | + </div> | |
81 | + <div class="form-group"> | |
82 | + <label class="col-sm-3 control-label">上传备注:</label> | |
83 | + <div class="col-sm-8"> | |
84 | + <input id="uploadremark" name="uploadremark" th:field="*{uploadremark}" class="form-control" type="text"> | |
85 | + </div> | |
86 | + </div> | |
87 | + <div class="form-group"> | |
88 | + <label class="col-sm-3 control-label">上传时间:</label> | |
89 | + <div class="col-sm-8"> | |
90 | + <input id="uploadTime" name="uploadTime" th:field="*{uploadTime}" class="form-control" type="text"> | |
91 | + </div> | |
92 | + </div> | |
93 | + <div class="form-group"> | |
94 | + <label class="col-sm-3 control-label">入库预约时间:</label> | |
95 | + <div class="col-sm-8"> | |
96 | + <input id="appointmentTime" name="appointmentTime" th:field="*{appointmentTime}" class="form-control" type="text"> | |
97 | + </div> | |
98 | + </div> | |
99 | + <div class="form-group"> | |
100 | + <label class="col-sm-3 control-label">单据头状态:</label> | |
101 | + <div class="col-sm-8"> | |
102 | + <input id="firstStatus" name="firstStatus" th:field="*{firstStatus}" class="form-control" type="text"> | |
103 | + </div> | |
104 | + </div> | |
105 | + <div class="form-group"> | |
106 | + <label class="col-sm-3 control-label">单据尾状态:</label> | |
107 | + <div class="col-sm-8"> | |
108 | + <input id="lastStatus" name="lastStatus" th:field="*{lastStatus}" class="form-control" type="text"> | |
109 | + </div> | |
110 | + </div> | |
111 | + <div class="form-group"> | |
112 | + <label class="col-sm-3 control-label">创建时间:</label> | |
113 | + <div class="col-sm-8"> | |
114 | + <input id="created" name="created" th:field="*{created}" class="form-control" type="text"> | |
115 | + </div> | |
116 | + </div> | |
117 | + <div class="form-group"> | |
118 | + <label class="col-sm-3 control-label">创建用户:</label> | |
119 | + <div class="col-sm-8"> | |
120 | + <input id="createdBy" name="createdBy" th:field="*{createdBy}" class="form-control" type="text"> | |
121 | + </div> | |
122 | + </div> | |
123 | + <div class="form-group"> | |
124 | + <label class="col-sm-3 control-label">最后修改时间:</label> | |
125 | + <div class="col-sm-8"> | |
126 | + <input id="lastUpdated" name="lastUpdated" th:field="*{lastUpdated}" class="form-control" type="text"> | |
127 | + </div> | |
128 | + </div> | |
129 | + <div class="form-group"> | |
130 | + <label class="col-sm-3 control-label">更新用户:</label> | |
131 | + <div class="col-sm-8"> | |
132 | + <input id="lastUpdatedBy" name="lastUpdatedBy" th:field="*{lastUpdatedBy}" class="form-control" type="text"> | |
133 | + </div> | |
134 | + </div> | |
135 | + <div class="form-group"> | |
136 | + <label class="col-sm-3 control-label">是否有效:</label> | |
137 | + <div class="col-sm-8"> | |
138 | + <input id="enable" name="enable" th:field="*{enable}" class="form-control" type="text"> | |
139 | + </div> | |
140 | + </div> | |
141 | + <div class="form-group"> | |
142 | + <label class="col-sm-3 control-label">是否删除:</label> | |
143 | + <div class="col-sm-8"> | |
144 | + <input id="deleted" name="deleted" th:field="*{deleted}" class="form-control" type="text"> | |
145 | + </div> | |
146 | + </div> | |
147 | + <div class="form-group"> | |
148 | + <label class="col-sm-3 control-label">自定义字段1:</label> | |
149 | + <div class="col-sm-8"> | |
150 | + <input id="userDef1" name="userDef1" th:field="*{userDef1}" class="form-control" type="text"> | |
151 | + </div> | |
152 | + </div> | |
153 | + <div class="form-group"> | |
154 | + <label class="col-sm-3 control-label">自定义字段2:</label> | |
155 | + <div class="col-sm-8"> | |
156 | + <input id="userDef2" name="userDef2" th:field="*{userDef2}" class="form-control" type="text"> | |
157 | + </div> | |
158 | + </div> | |
159 | + <div class="form-group"> | |
160 | + <label class="col-sm-3 control-label">自定义字段3:</label> | |
161 | + <div class="col-sm-8"> | |
162 | + <input id="userDef3" name="userDef3" th:field="*{userDef3}" class="form-control" type="text"> | |
163 | + </div> | |
164 | + </div> | |
165 | + <div class="form-group"> | |
166 | + <div class="form-control-static col-sm-offset-9"> | |
167 | + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> | |
168 | + </div> | |
169 | + </div> | |
170 | + </form> | |
171 | + </div> | |
172 | + <div th:include="include::footer"></div> | |
173 | +</body> | |
174 | +</html> | |
... | ... |
src/main/resources/templates/receipt/receiptHeaderHistory/receiptHeaderHistory.html
... | ... | @@ -3,281 +3,162 @@ |
3 | 3 | <meta charset="utf-8"> |
4 | 4 | <head th:include="include :: header"></head> |
5 | 5 | <body class="gray-bg"> |
6 | + <div class="container-div"> | |
7 | + <div class="row"> | |
8 | + <div class="btn-group hidden-xs" id="toolbar" role="group"> | |
6 | 9 | |
7 | -<div class="container-div"> | |
8 | - <div class="row"> | |
9 | - <div class="col-sm-12 select-info"> | |
10 | - <ul id="myTab" class="nav nav-tabs"> | |
11 | - <li class="active"><a href="#tabHeader" data-toggle="tab">主表</a></li> | |
12 | - <li><a href="#tabDetail" data-toggle="tab">明细</a></li> | |
13 | - </ul> | |
14 | - <div id="myTabContent" class="tab-content"> | |
15 | - <div class="tab-pane fade in active" id="tabHeader"> | |
16 | - <div class="col-sm-12 select-info"> | |
17 | - <form id="receiptHeader-form"> | |
18 | - <div class="select-list"> | |
19 | - <ul> | |
20 | - <li> | |
21 | - 入库单号:<input type="text" name="code"/> | |
22 | - </li> | |
23 | - <li> | |
24 | - <!--入库类型:<input type="text" name="sourceCode"/>--> | |
25 | - 入库类型:<select name="type" th:with="type=${@receiptTypeService.getType()}"> | |
26 | - <option value="">所有</option> | |
27 | - <option th:each="e : ${type}" th:text="${e['name']}" th:value="${e['code']}"></option></select> | |
28 | - </li> | |
29 | - <li> | |
30 | - <!--头 状 态:<input type="text" name="firstStatus"/>--> | |
31 | - 头 状 态:<select name="firstStatus" th:with="firstStatus=${@dict.getType('receiptHeaderStatus')}"> | |
32 | - <option value="">所有</option> | |
33 | - <option th:each="e : ${firstStatus}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option></select> | |
34 | - </li> | |
35 | - <li> | |
36 | - <!--尾 状 态:<input type="text" name="lastStatus"/>--> | |
37 | - 尾 状 态:<select name="lastStatus" th:with="lastStatus=${@dict.getType('receiptHeaderStatus')}"> | |
38 | - <option value="">所有</option> | |
39 | - <option th:each="e : ${lastStatus}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option></select> | |
40 | - </li> | |
41 | - <li class="time"> | |
42 | - <label>创建时间: </label> | |
43 | - <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/> | |
44 | - <span>-</span> | |
45 | - <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/> | |
46 | - </li> | |
47 | - <li> | |
48 | - <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> | |
49 | - <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="receipt:receiptHeader:export"><i class="fa fa-download"></i> 导出</a>--> | |
50 | - </li> | |
51 | - </ul> | |
52 | - </div> | |
53 | - </form> | |
54 | - </div> | |
55 | - <div class="btn-group hidden-xs" id="toolbar" role="group"> | |
56 | - <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" | |
57 | - shiro:hasPermission="receipt:receiptHeader:add"> | |
58 | - <i class="fa fa-plus"></i> 新增 | |
59 | - </a> | |
60 | - <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" | |
61 | - shiro:hasPermission="receipt:receiptHeader:remove"> | |
62 | - <i class="fa fa-trash-o"></i> 删除 | |
63 | - </a> | |
64 | - </div> | |
65 | - <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table> | |
66 | - </div> | |
67 | - | |
68 | - <div class="tab-pane fade" id="tabDetail"> | |
69 | - <table id="bootstrap-table1" data-mobile-responsive="true" | |
70 | - class="table table-bordered table-hover"></table> | |
71 | - </div> | |
72 | - </div> | |
10 | + </div> | |
11 | + | |
12 | + <div class="col-sm-12 select-info"> | |
13 | + <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table> | |
14 | + </div> | |
73 | 15 | </div> |
74 | 16 | </div> |
75 | -</div> | |
76 | -<div th:include="include :: footer"></div> | |
77 | -<script th:inline="javascript"> | |
78 | - var prefix = ctx + "receipt/receiptHeaderHistory"; | |
79 | - var prefix1 = ctx + "receipt/receiptDetailHistory"; | |
80 | - var editFlag = [[${@permission.hasPermi('receipt:receiptHeader:edit')}]]; | |
81 | - var removeFlag = [[${@permission.hasPermi('receipt:receiptHeader:remove')}]]; | |
82 | - var receiptTypes = [[${@receiptTypeService.getType()}]]; | |
83 | - var receiptHeaderStatus = [[${@dict.getType('receiptHeaderStatus')}]]; | |
84 | - var printFlag = [[${@permission.hasPermi('receipt:receiptHeader:report')}]]; | |
85 | - var addFlag= [[${@permission.hasPermi('receipt:receiptHeader:add')}]]; | |
86 | - | |
87 | - | |
88 | - $(function() { | |
89 | - var options = { | |
90 | - url: prefix + "/list", | |
91 | - createUrl: prefix + "/add", | |
92 | - updateUrl: prefix + "/edit/{id}", | |
93 | - removeUrl: prefix + "/remove", | |
94 | - modalName: "入库历史", | |
95 | - search: false, | |
96 | - sortName: "id", | |
97 | - sortOrder: "desc", | |
98 | - columns: [{ | |
99 | - checkbox: true | |
100 | - }, | |
101 | - { | |
102 | - field : 'id', | |
103 | - title : '入库单id' | |
104 | - }, | |
105 | - { | |
106 | - field : 'code', | |
107 | - title : '入库单号' | |
108 | - }, | |
109 | - { | |
110 | - field : 'referCode', | |
111 | - title : '关联单号' | |
112 | - }, | |
113 | - { | |
114 | - field : 'referId', | |
115 | - title : '关联单号(内部号)' | |
116 | - }, | |
117 | - { | |
118 | - field : 'referType', | |
119 | - title : '关联订单类型' | |
120 | - }, | |
121 | - { | |
122 | - field : 'companyCode', | |
123 | - title : '货主编码', | |
124 | - visible:false | |
125 | - }, | |
126 | - { | |
127 | - field : 'warehouseCode', | |
128 | - title : '仓库编码', | |
129 | - visible:false | |
130 | - }, | |
131 | - { | |
132 | - field : 'receiptType', | |
133 | - title : '入库类型', | |
134 | - align: 'center', | |
135 | - formatter: function(value, row, index) { | |
136 | - var actions = []; | |
137 | - $.each(receiptTypes, function(index, dict) { | |
138 | - if (dict.code == value) { | |
139 | - actions.push("<span class='badge badge-info'>" + dict.name + "</span>"); | |
140 | - return false; | |
141 | - } | |
142 | - }); | |
143 | - return actions.join(''); | |
144 | - } | |
145 | - }, | |
146 | - { | |
147 | - field : 'scheduledArriveDate', | |
148 | - title : '预计到达日期' | |
149 | - }, | |
150 | - { | |
151 | - field : 'actualArriveDate', | |
152 | - title : '实际到达日期' | |
153 | - }, | |
154 | - { | |
155 | - field : 'startCheckinDatetime', | |
156 | - title : '开始收货日期' | |
157 | - }, | |
158 | - { | |
159 | - field : 'endCheckinDatetime', | |
160 | - title : '结束收货日期' | |
161 | - }, | |
162 | - { | |
163 | - field : 'recvDock', | |
164 | - title : '月台货位' | |
165 | - }, | |
166 | - { | |
167 | - field : 'closedAt', | |
168 | - title : '关闭时间', | |
169 | - visible : false | |
170 | - }, | |
171 | - { | |
172 | - field : 'closedBy', | |
173 | - title : '强制关闭用户', | |
174 | - visible :false | |
175 | - }, | |
176 | - { | |
177 | - field : 'totalQty', | |
178 | - title : '总数量' | |
179 | - }, | |
180 | - { | |
181 | - field : 'totalLines', | |
182 | - title : '总行数' | |
183 | - }, | |
184 | - { | |
185 | - field : 'remark', | |
186 | - title : '备注', | |
187 | - visible : false | |
188 | - }, | |
189 | - { | |
190 | - field : 'uploadStatus', | |
191 | - title : '上传状态', | |
192 | - visible:false | |
193 | - }, | |
194 | - { | |
195 | - field : 'receiptNote', | |
196 | - title : '入库单备注', | |
197 | - visible:false | |
198 | - }, | |
199 | - { | |
200 | - field : 'locked', | |
201 | - title : '锁定', | |
202 | - visible:false | |
203 | - }, | |
204 | - { | |
205 | - field : 'lockedBy', | |
206 | - title : '锁定用户', | |
207 | - visible:false | |
208 | - }, | |
209 | - { | |
210 | - field : 'firstStatus', | |
211 | - title : '头状态', | |
212 | - align: 'center', | |
213 | - formatter: function(value, row, index) { | |
214 | - return $.table.selectDictLabel(receiptHeaderStatus, value); | |
215 | - } | |
216 | - }, | |
217 | - { | |
218 | - field : 'lastStatus', | |
219 | - title : '尾状态', | |
220 | - align: 'center', | |
221 | - formatter: function(value, row, index) { | |
222 | - return $.table.selectDictLabel(receiptHeaderStatus, value); | |
223 | - } | |
224 | - }, | |
225 | - { | |
226 | - field : 'created', | |
227 | - title : '创建时间', | |
228 | - sortable:true, | |
229 | - visible:false | |
230 | - }, | |
231 | - { | |
232 | - field : 'createdBy', | |
233 | - title : '创建用户', | |
234 | - visible:false | |
235 | - }, | |
236 | - { | |
237 | - field : 'lastUpdated', | |
238 | - title : '最后修改时间', | |
239 | - sortable:true, | |
240 | - visible:false | |
241 | - }, | |
242 | - { | |
243 | - field : 'lastUpdatedBy', | |
244 | - title : '更新用户', | |
245 | - visible:false | |
246 | - }, | |
247 | - { | |
248 | - field : 'userDef1', | |
249 | - title : '自定义字段1', | |
250 | - visible: false | |
251 | - }, | |
252 | - { | |
253 | - field : 'userDef2', | |
254 | - title : '自定义字段2', | |
255 | - visible: false | |
256 | - }, | |
257 | - { | |
258 | - field : 'userDef3', | |
259 | - title : '自定义字段3' , | |
260 | - visible: false | |
261 | - }] | |
262 | - }; | |
263 | - $.table.init(options); | |
264 | - }); | |
17 | + <div th:include="include :: footer"></div> | |
18 | + <script th:inline="javascript"> | |
19 | + var editFlag = [[${@permission.hasPermi('receipt:history:edit')}]]; | |
20 | + var removeFlag = [[${@permission.hasPermi('receipt:history:remove')}]]; | |
21 | + var prefix = ctx + "receipt/receiptHeaderHistory" | |
265 | 22 | |
266 | - function detail(id, code) { | |
267 | - var url = prefix1+"/list/" + id; | |
268 | - createtable(url); | |
269 | - } | |
23 | + $(function() { | |
24 | + var options = { | |
25 | + url: prefix + "/list", | |
26 | + createUrl: prefix + "/add", | |
27 | + updateUrl: prefix + "/edit/{id}", | |
28 | + removeUrl: prefix + "/remove", | |
29 | + modalName: "入库单历史", | |
30 | + search: false, | |
31 | + columns: [{ | |
32 | + checkbox: true | |
33 | + }, | |
34 | + { | |
35 | + field : 'id', | |
36 | + title : '入库id号' | |
37 | + }, | |
38 | + { | |
39 | + field : 'code', | |
40 | + title : '入库单号' | |
41 | + }, | |
42 | + { | |
43 | + field : 'companyId', | |
44 | + title : '货主id' | |
45 | + }, | |
46 | + { | |
47 | + field : 'companyCode', | |
48 | + title : '货主编码' | |
49 | + }, | |
50 | + { | |
51 | + field : 'supplierId', | |
52 | + title : '供应商id' | |
53 | + }, | |
54 | + { | |
55 | + field : 'supplierCode', | |
56 | + title : '供应商编码' | |
57 | + }, | |
58 | + { | |
59 | + field : 'type', | |
60 | + title : '入库类型' | |
61 | + }, | |
62 | + { | |
63 | + field : 'sourceCode', | |
64 | + title : '上游系统单号' | |
65 | + }, | |
66 | + { | |
67 | + field : 'sourcePlatform', | |
68 | + title : '上游平台' | |
69 | + }, | |
70 | + { | |
71 | + field : 'totalQty', | |
72 | + title : '总数量' | |
73 | + }, | |
74 | + { | |
75 | + field : 'totalLines', | |
76 | + title : '总行数' | |
77 | + }, | |
78 | + { | |
79 | + field : 'remark', | |
80 | + title : '入库单备注' | |
81 | + }, | |
82 | + { | |
83 | + field : 'uploadStatus', | |
84 | + title : '上传状态' | |
85 | + }, | |
86 | + { | |
87 | + field : 'uploadremark', | |
88 | + title : '上传备注' | |
89 | + }, | |
90 | + { | |
91 | + field : 'uploadTime', | |
92 | + title : '上传时间' | |
93 | + }, | |
94 | + { | |
95 | + field : 'appointmentTime', | |
96 | + title : '入库预约时间' | |
97 | + }, | |
98 | + { | |
99 | + field : 'firstStatus', | |
100 | + title : '单据头状态' | |
101 | + }, | |
102 | + { | |
103 | + field : 'lastStatus', | |
104 | + title : '单据尾状态' | |
105 | + }, | |
106 | + { | |
107 | + field : 'created', | |
108 | + title : '创建时间' | |
109 | + }, | |
110 | + { | |
111 | + field : 'createdBy', | |
112 | + title : '创建用户' | |
113 | + }, | |
114 | + { | |
115 | + field : 'lastUpdated', | |
116 | + title : '最后修改时间' | |
117 | + }, | |
118 | + { | |
119 | + field : 'lastUpdatedBy', | |
120 | + title : '更新用户' | |
121 | + }, | |
122 | + { | |
123 | + field : 'enable', | |
124 | + title : '是否有效' | |
125 | + }, | |
126 | + { | |
127 | + field : 'deleted', | |
128 | + title : '是否删除' | |
129 | + }, | |
130 | + { | |
131 | + field : 'userDef1', | |
132 | + title : '自定义字段1' | |
133 | + }, | |
134 | + { | |
135 | + field : 'userDef2', | |
136 | + title : '自定义字段2' | |
137 | + }, | |
138 | + { | |
139 | + field : 'userDef3', | |
140 | + title : '自定义字段3' | |
141 | + }, | |
142 | + { | |
143 | + title: '操作', | |
144 | + align: 'center', | |
145 | + formatter: function(value, row, index) { | |
146 | + var actions = []; | |
147 | + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); | |
148 | + actions.push('<a class="btn btn-info btn-xs " href="#" onclick="detail(\'' + row.id + '\')"><i class="fa fa-list-ul"></i>列表</a> '); | |
149 | + // actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); | |
150 | + return actions.join(''); | |
151 | + } | |
152 | + }] | |
153 | + }; | |
154 | + $.table.init(options); | |
155 | + }); | |
270 | 156 | |
271 | - function createtable(url) { | |
272 | - $("#tabDetail").children().remove(); | |
273 | - $("#myTab li").removeClass("active"); | |
274 | - var height = $(document).height()-100 + 'px'; | |
275 | - var str = '<iframe class="huaheng_iframe" name="iframe" width="100%" height="' + height + '" src="' + url + '" frameborder="0" data-id="' + url + '" seamless></iframe>'; | |
276 | - $("#tabDetail").append(str); | |
277 | - $(".tab-pane").removeClass("in active"); | |
278 | - $("#myTab li:eq(1)").addClass("active"); | |
279 | - $("#tabDetail").addClass("in active"); | |
280 | - } | |
281 | -</script> | |
157 | + /*入库单列表-详细*/ | |
158 | + function detail(receiptId) { | |
159 | + var url = 'receipt/receiptDetailHistory/' + receiptId; | |
160 | + createMenuItem(url, "入库单据历史明细"); | |
161 | + } | |
162 | + </script> | |
282 | 163 | </body> |
283 | 164 | </html> |
284 | 165 | \ No newline at end of file |
... | ... |