Commit dbc446e16492f58fd1a646277ca91f5f6ec8cbe7
1 parent
60c30d9c
添加入库单历史
Showing
8 changed files
with
709 additions
and
434 deletions
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: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 | - //} | |
142 | + @ApiOperation(value="删除入库单 ", notes="删除入库单 ", httpMethod = "POST") | |
143 | + @RequiresPermissions("receipt:receiptDetail:remove") | |
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
0 → 100644
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/receiptDetail") | |
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/receiptHeader/controller/ReceiptHeaderController.java
... | ... | @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | 4 | import com.baomidou.mybatisplus.core.metadata.IPage; |
5 | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
6 | 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
7 | +import com.huaheng.common.support.Convert; | |
7 | 8 | import com.huaheng.common.utils.StringUtils; |
8 | 9 | import com.huaheng.common.utils.security.ShiroUtils; |
9 | 10 | import com.huaheng.framework.aspectj.lang.annotation.Log; |
... | ... | @@ -15,6 +16,8 @@ import com.huaheng.framework.web.page.TableDataInfo; |
15 | 16 | import com.huaheng.framework.web.page.TableSupport; |
16 | 17 | import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader; |
17 | 18 | import com.huaheng.pc.receipt.receiptHeader.service.ReceiptHeaderService; |
19 | +import com.huaheng.pc.receipt.receiptHeaderHistory.domain.ReceiptHeaderHistory; | |
20 | +import com.huaheng.pc.receipt.receiptHeaderHistory.service.ReceiptHeaderHistoryService; | |
18 | 21 | import io.swagger.annotations.Api; |
19 | 22 | import io.swagger.annotations.ApiModel; |
20 | 23 | import io.swagger.annotations.ApiOperation; |
... | ... | @@ -25,6 +28,7 @@ import org.springframework.ui.ModelMap; |
25 | 28 | import org.springframework.web.bind.annotation.*; |
26 | 29 | |
27 | 30 | import javax.annotation.Resource; |
31 | +import java.util.ArrayList; | |
28 | 32 | import java.util.List; |
29 | 33 | |
30 | 34 | @Api(tags = "入库单") |
... | ... | @@ -36,6 +40,8 @@ public class ReceiptHeaderController extends BaseController { |
36 | 40 | |
37 | 41 | @Resource |
38 | 42 | private ReceiptHeaderService receiptHeaderService; |
43 | + @Resource | |
44 | + private ReceiptHeaderHistoryService receiptHeaderHistoryService; | |
39 | 45 | |
40 | 46 | @RequiresPermissions("receipt:receiptHeader:view") |
41 | 47 | @GetMapping() |
... | ... | @@ -163,4 +169,19 @@ public class ReceiptHeaderController extends BaseController { |
163 | 169 | receiptHeader.setLastStatus(5); |
164 | 170 | return toAjax(receiptHeaderService.updateById(receiptHeader)); |
165 | 171 | } |
172 | + | |
173 | + /** | |
174 | + * 删除入库单 | |
175 | + */ | |
176 | + @ApiOperation(value="提交审核入库单", notes="提交审核入库单", httpMethod = "POST") | |
177 | + @RequiresPermissions("receipt:receiptHeader:remove") | |
178 | + @Log(title = "入库-入库单 ",operating = "提交审核入库单 ", action = BusinessType.UPDATE) | |
179 | + @PostMapping("/remove") | |
180 | + @ResponseBody | |
181 | + public AjaxResult remove(@ApiParam(name = "id", value = "入库头表id字符串")Integer id){ | |
182 | + if (StringUtils.isNull(id)){ | |
183 | + return AjaxResult.error("id为空"); | |
184 | + } | |
185 | + return receiptHeaderHistoryService.add(id); | |
186 | + } | |
166 | 187 | } |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptHeaderHistory/controller/ReceiptHeaderHistoryController.java
0 → 100644
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.utils.security.ShiroUtils; | |
6 | +import com.huaheng.framework.web.domain.AjaxResult; | |
7 | +import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail; | |
8 | +import com.huaheng.pc.receipt.receiptDetail.service.ReceiptDetailService; | |
9 | +import com.huaheng.pc.receipt.receiptDetailHistory.domain.ReceiptDetailHistory; | |
10 | +import com.huaheng.pc.receipt.receiptDetailHistory.service.ReceiptDetailHistoryService; | |
11 | +import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader; | |
12 | +import com.huaheng.pc.receipt.receiptHeader.service.ReceiptHeaderService; | |
13 | +import org.apache.commons.beanutils.BeanUtils; | |
14 | +import org.apache.wml.WMLSetvarElement; | |
3 | 15 | import org.springframework.stereotype.Service; |
4 | 16 | import javax.annotation.Resource; |
17 | +import java.lang.reflect.InvocationTargetException; | |
18 | +import java.util.ArrayList; | |
5 | 19 | import java.util.List; |
6 | 20 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
7 | 21 | import com.huaheng.pc.receipt.receiptHeaderHistory.domain.ReceiptHeaderHistory; |
8 | 22 | import com.huaheng.pc.receipt.receiptHeaderHistory.mapper.ReceiptHeaderHistoryMapper; |
23 | +import org.springframework.transaction.annotation.Transactional; | |
24 | + | |
9 | 25 | @Service |
10 | 26 | public class ReceiptHeaderHistoryService extends ServiceImpl<ReceiptHeaderHistoryMapper, ReceiptHeaderHistory> { |
11 | 27 | |
28 | + @Resource | |
29 | + private ReceiptHeaderService receiptHeaderService; | |
30 | + @Resource | |
31 | + private ReceiptDetailService receiptDetailService; | |
32 | + @Resource | |
33 | + private ReceiptDetailHistoryService receiptDetailHistoryService; | |
34 | + | |
35 | + @Transactional | |
36 | + public AjaxResult add(Integer id){ | |
37 | + ReceiptHeader receiptHeader = receiptHeaderService.getById(id); | |
38 | + if (receiptHeader == null) return AjaxResult.success(""); | |
39 | + if(receiptHeader.getFirstStatus()>=800 && receiptHeader.getLastStatus()>=800){ | |
40 | + ReceiptHeaderHistory receiptHeaderHistory = new ReceiptHeaderHistory(); | |
41 | + List<ReceiptDetailHistory> receiptDetailHistory = new ArrayList<>(); | |
42 | + //查询入库单明细 | |
43 | + LambdaQueryWrapper<ReceiptDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
44 | + lambdaQueryWrapper.eq(ReceiptDetail::getReceiptId, id); | |
45 | + List<ReceiptDetail> list = receiptDetailService.list(lambdaQueryWrapper); | |
46 | + try { | |
47 | + //复制到入库历史实体 | |
48 | + BeanUtils.copyProperties(receiptHeader, receiptHeaderHistory); | |
49 | + BeanUtils.copyProperties(list, receiptDetailHistory); | |
50 | + } catch (IllegalAccessException e) { | |
51 | + e.printStackTrace(); | |
52 | + } catch (InvocationTargetException e) { | |
53 | + e.printStackTrace(); | |
54 | + } | |
55 | + | |
56 | + receiptHeaderHistory.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
57 | + receiptHeaderService.removeById(receiptHeader.getId()); | |
58 | + //删除入库明细 | |
59 | + List<Integer> ids = new ArrayList<>(); | |
60 | + for (int i=0; i<receiptDetailHistory.size();i++){ | |
61 | + receiptDetailHistory.get(i).setLastUpdatedBy(ShiroUtils.getLoginName()); | |
62 | + ids.add(receiptHeaderHistory.getId()); | |
63 | + } | |
64 | + receiptDetailService.removeByIds(ids); | |
65 | + receiptDetailHistoryService.saveBatch(receiptDetailHistory); | |
66 | + this.save(receiptHeaderHistory); | |
67 | + }else { | |
68 | + return AjaxResult.success("入库单没有完成,无法删除"); | |
69 | + } | |
70 | + return AjaxResult.success("删除成功"); | |
71 | + } | |
12 | 72 | } |
... | ... |
src/main/resources/templates/receipt/receiptDetailHistory/receiptDetailHistory.html
... | ... | @@ -2,145 +2,228 @@ |
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 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> | |
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> | |
15 | 30 | </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" | |
31 | + </form> | |
32 | +</div> | |
22 | 33 | |
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 | - }, | |
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 | + }, | |
37 | 83 | { |
38 | - field : 'id', | |
39 | - title : '入库明细id' | |
84 | + field : 'materialName', | |
85 | + title : '物料名称' | |
40 | 86 | }, |
41 | 87 | { |
42 | - field : 'sourceLine', | |
43 | - title : '上游系统行号' | |
88 | + field : 'materialSpec', | |
89 | + title : '物料规格' | |
44 | 90 | }, |
45 | 91 | { |
46 | - field : 'receiptId', | |
47 | - title : '入库单id' | |
92 | + field : 'materialUnit', | |
93 | + title : '物料单位' | |
48 | 94 | }, |
49 | 95 | { |
50 | - field : 'receiptCode', | |
51 | - title : '入库单编码' | |
96 | + field : 'supplierCode', | |
97 | + title : '供应商编码' | |
52 | 98 | }, |
53 | 99 | { |
54 | - field : 'materialId', | |
55 | - title : '物料Id' | |
100 | + field : 'batch', | |
101 | + title : '批次' | |
56 | 102 | }, |
57 | 103 | { |
58 | - field : 'materialCode', | |
59 | - title : '存货编码' | |
104 | + field : 'lot', | |
105 | + title : '批号' , | |
106 | + visible:false | |
60 | 107 | }, |
61 | 108 | { |
62 | - field : 'batch', | |
63 | - title : '批次' | |
109 | + field : 'qcCheck', | |
110 | + title : '是否质检' | |
64 | 111 | }, |
65 | 112 | { |
66 | - field : 'lot', | |
67 | - title : '批号' | |
113 | + field : 'projectNo', | |
114 | + title : '项目号' | |
68 | 115 | }, |
69 | 116 | { |
70 | - field : 'project', | |
71 | - title : '项目号' | |
117 | + field : 'manufactureDate', | |
118 | + title : '生产日期' , | |
119 | + visible:false | |
72 | 120 | }, |
73 | 121 | { |
74 | - field : 'manufactureDate', | |
75 | - title : '生产日期' | |
122 | + field : 'expirationDate', | |
123 | + title : '失效日期' , | |
124 | + visible:false | |
76 | 125 | }, |
77 | 126 | { |
78 | - field : 'expirationDate', | |
79 | - title : '失效日期' | |
127 | + field : 'agingDate', | |
128 | + title : '入库日期' , | |
129 | + visible:false | |
80 | 130 | }, |
81 | 131 | { |
82 | - field : 'inventoryStatus', | |
83 | - title : '库存状态' | |
132 | + field : 'totalQty', | |
133 | + title : '总数量' | |
84 | 134 | }, |
85 | 135 | { |
86 | - field : 'qty', | |
87 | - title : '收货数量' | |
136 | + field : 'openQty', | |
137 | + title : '未收数量' | |
88 | 138 | }, |
89 | 139 | { |
90 | - field : 'price', | |
91 | - title : '单价' | |
140 | + field : 'referCode', | |
141 | + title : 'ERP单号', | |
142 | + visible : false | |
92 | 143 | }, |
93 | 144 | { |
94 | - field : 'created', | |
95 | - title : '创建时间' | |
145 | + field : 'referId', | |
146 | + title : 'ERP内部号', | |
147 | + visible : false | |
96 | 148 | }, |
97 | 149 | { |
98 | - field : 'createdBy', | |
99 | - title : '创建用户' | |
150 | + field : 'referLineNum', | |
151 | + title : 'ERP行号', | |
152 | + visible : false | |
100 | 153 | }, |
101 | 154 | { |
102 | - field : 'lastUpdated', | |
103 | - title : '最后修改时间' | |
155 | + field : 'locatingRule', | |
156 | + title : '定位规则' | |
104 | 157 | }, |
105 | 158 | { |
106 | - field : 'lastUpdatedBy', | |
107 | - title : '更新用户' | |
159 | + field : 'inventorySts', | |
160 | + title : '库存状态', | |
161 | + visible : false | |
108 | 162 | }, |
109 | 163 | { |
110 | - field : 'deleted', | |
111 | - title : '是否删除' | |
164 | + field : 'itemListPrice', | |
165 | + title : '标价' | |
112 | 166 | }, |
113 | 167 | { |
114 | - field : 'userDef1', | |
115 | - title : '自定义字段1' | |
168 | + field : 'itemNetPrice', | |
169 | + title : '净价' | |
116 | 170 | }, |
117 | 171 | { |
118 | - field : 'userDef2', | |
119 | - title : '自定义字段2' | |
172 | + field : 'price', | |
173 | + title : '单价' , | |
174 | + visible:false | |
120 | 175 | }, |
121 | 176 | { |
122 | - field : 'userDef3', | |
123 | - title : '自定义字段3' | |
177 | + field : 'isVirtualBom', | |
178 | + title : '是否虚拟套件', | |
179 | + formatter: function(value, row, index) { | |
180 | + return $.table.selectDictLabel(datas, value); | |
181 | + } | |
124 | 182 | }, |
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 | - }); | |
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 | + }; | |
138 | 226 | |
139 | - function queryParams(params) { | |
140 | - return { | |
141 | - receiptId: $("#receiptId").val() | |
142 | - }; | |
143 | - } | |
144 | - </script> | |
227 | +</script> | |
145 | 228 | </body> |
146 | 229 | </html> |
147 | 230 | \ No newline at end of file |
... | ... |
src/main/resources/templates/receipt/receiptHeaderHistory/edit.html deleted
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,162 +3,281 @@ |
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"> | |
9 | 6 | |
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> | |
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> | |
15 | 73 | </div> |
16 | 74 | </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/receiptHeaderHistory" | |
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 | + }); | |
22 | 265 | |
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 | - }); | |
266 | + function detail(id, code) { | |
267 | + var url = prefix1+"/list/" + id; | |
268 | + createtable(url); | |
269 | + } | |
156 | 270 | |
157 | - /*入库单列表-详细*/ | |
158 | - function detail(receiptId) { | |
159 | - var url = 'receipt/receiptDetailHistory/' + receiptId; | |
160 | - createMenuItem(url, "入库单据历史明细"); | |
161 | - } | |
162 | - </script> | |
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> | |
163 | 282 | </body> |
164 | 283 | </html> |
165 | 284 | \ No newline at end of file |
... | ... |