Commit b732916b9494b093f29226d22a42450f448f724c

Authored by yihao.liu
2 parents d32910af 0b60e3cb

Merge remote-tracking branch 'origin/develop' into develop

Showing 24 changed files with 940 additions and 1095 deletions
src/main/java/com/huaheng/pc/config/carrier/controller/CarrierController.java
... ... @@ -16,6 +16,8 @@ import com.huaheng.framework.web.page.TableDataInfo;
16 16 import com.huaheng.framework.web.page.TableSupport;
17 17 import com.huaheng.pc.config.carrier.domain.Carrier;
18 18 import com.huaheng.pc.config.carrier.service.CarrierService;
  19 +import com.huaheng.pc.config.warehouse.domain.Warehouse;
  20 +import com.huaheng.pc.config.warehouse.service.WarehouseService;
19 21 import io.swagger.annotations.ApiOperation;
20 22 import io.swagger.annotations.ApiParam;
21 23 import org.apache.shiro.authz.annotation.RequiresPermissions;
... ... @@ -26,6 +28,7 @@ import org.springframework.web.bind.annotation.*;
26 28 import javax.annotation.Resource;
27 29 import java.util.ArrayList;
28 30 import java.util.List;
  31 +import java.util.Map;
29 32  
30 33 /**
31 34 * 承运商
... ... @@ -38,6 +41,8 @@ public class CarrierController extends BaseController {
38 41  
39 42 @Resource
40 43 private CarrierService carrierService;
  44 + @Resource
  45 + private WarehouseService warehouseService;
41 46  
42 47 @RequiresPermissions("config:carrier:view")
43 48 @GetMapping()
... ... @@ -48,13 +53,13 @@ public class CarrierController extends BaseController {
48 53 /**
49 54 * 查询承运商列表
50 55 */
51   - @ApiOperation(value="查看承运商列表", notes="根据承运商编码、名称、创建时间获取承运商信息", httpMethod = "POST")
  56 + @ApiOperation(value = "查看承运商列表", notes = "根据承运商编码、名称、创建时间获取承运商信息", httpMethod = "POST")
52 57 @RequiresPermissions("config:carrier:list")
53 58 @Log(title = "通用-承运商管理", operating = "查看承运商列表", action = BusinessType.GRANT)
54 59 @PostMapping("/list")
55 60 @ResponseBody
56 61 public TableDataInfo list(
57   - @ApiParam(name="carrier",value="承运商编码、名称") Carrier carrier,
  62 + @ApiParam(name = "carrier", value = "承运商编码、名称") Carrier carrier,
58 63 @ApiParam(name = "createdBegin", value = "起止时间") String createdBegin,
59 64 @ApiParam(name = "createdEnd", value = "结束时间") String createdEnd) {
60 65 LambdaQueryWrapper<Carrier> lambdaQueryWrapper = Wrappers.lambdaQuery();
... ... @@ -67,7 +72,7 @@ public class CarrierController extends BaseController {
67 72 .like(StringUtils.isNotEmpty(carrier.getName()), Carrier::getName, carrier.getName())
68 73 .eq(Carrier::getWarehouseCode, ShiroUtils.getWarehouseCode());
69 74  
70   - if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){
  75 + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
71 76 /*使用分页查询*/
72 77 Page<Carrier> page = new Page<>(pageNum, pageSize);
73 78 IPage<Carrier> iPage = carrierService.page(page, lambdaQueryWrapper);
... ... @@ -82,20 +87,21 @@ public class CarrierController extends BaseController {
82 87 * 新增承运商
83 88 */
84 89 @GetMapping("/add")
85   - public String add() {
  90 + public String add(ModelMap mmap) {
  91 + mmap.put("warehouseList",warehouseService.getWarehouseMap());
86 92 return prefix + "/add";
87 93 }
88 94  
89 95 /**
90 96 * 新增保存承运商
91 97 */
92   - @ApiOperation(value="新增承运商", notes="新增承运商", httpMethod = "POST")
  98 + @ApiOperation(value = "新增承运商", notes = "新增承运商", httpMethod = "POST")
93 99 @RequiresPermissions("config:carrier:add")
94 100 @Log(title = "通用-承运商", operating = "新增承运商", action = BusinessType.INSERT)
95 101 @PostMapping("/add")
96 102 @ResponseBody
97   - public AjaxResult addSave(@ApiParam(name = "containerType", value = "承运商", required = true)
98   - Carrier carrier) {
  103 + public AjaxResult addSave(@ApiParam(name = "carrier", value = "承运商", required = true)
  104 + Carrier carrier) {
99 105 carrier.setWarehouseCode(ShiroUtils.getWarehouseCode());
100 106 carrier.setCreatedBy(ShiroUtils.getLoginName());
101 107 carrier.setLastUpdatedBy(ShiroUtils.getLoginName());
... ... @@ -108,19 +114,20 @@ public class CarrierController extends BaseController {
108 114 @GetMapping("/edit/{id}")
109 115 public String edit(@PathVariable("id") Integer id, ModelMap mmap) {
110 116 mmap.put("carrier", carrierService.getById(id));
  117 + mmap.put("warehouseList",warehouseService.getWarehouseMap());
111 118 return prefix + "/edit";
112 119 }
113 120  
114 121 /**
115 122 * 修改保存承运商
116 123 */
117   - @ApiOperation(value="修改承运商", notes="修改承运商", httpMethod = "POST")
  124 + @ApiOperation(value = "修改承运商", notes = "修改承运商", httpMethod = "POST")
118 125 @RequiresPermissions("config:carrier:edit")
119 126 @Log(title = "通用-承运商", operating = "修改承运商", action = BusinessType.UPDATE)
120 127 @PostMapping("/edit")
121 128 @ResponseBody
122 129 public AjaxResult editSave(
123   - @ApiParam(name = "carrier", value = "承运商", required = true)Carrier carrier) {
  130 + @ApiParam(name = "carrier", value = "承运商", required = true) Carrier carrier) {
124 131 carrier.setLastUpdatedBy(ShiroUtils.getLoginName());
125 132 return toAjax(carrierService.updateById(carrier));
126 133 }
... ... @@ -128,13 +135,13 @@ public class CarrierController extends BaseController {
128 135 /**
129 136 * 删除承运商
130 137 */
131   - @ApiOperation(value="删除承运商", notes="根据id批量删除承运商,参数示例1,2,3", httpMethod = "POST")
  138 + @ApiOperation(value = "删除承运商", notes = "根据id批量删除承运商,参数示例1,2,3", httpMethod = "POST")
132 139 @RequiresPermissions("config:carrier:remove")
133 140 @Log(title = "通用-承运商", operating = "删除承运商", action = BusinessType.DELETE)
134   - @PostMapping( "/remove")
  141 + @PostMapping("/remove")
135 142 @ResponseBody
136 143 public AjaxResult remove(String ids) {
137   - if (StringUtils.isEmpty(ids)){
  144 + if (StringUtils.isEmpty(ids)) {
138 145 return AjaxResult.error("id不能为空");
139 146 }
140 147 List<Integer> list = new ArrayList<>();
... ...
src/main/java/com/huaheng/pc/config/carrier/domain/Carrier.java
... ... @@ -196,4 +196,4 @@ public class Carrier implements Serializable {
196 196 public static final String COL_PROCESSSTAMP = "processStamp";
197 197  
198 198 public static final String COL_ENABLE = "enable";
199   -}
200 199 \ No newline at end of file
  200 +}
... ...
src/main/java/com/huaheng/pc/config/receiptPreference/controller/ReceiptPreferenceController.java
... ... @@ -39,8 +39,8 @@ public class ReceiptPreferenceController extends BaseController {
39 39  
40 40 @RequiresPermissions("config:receiptPreference:view")
41 41 @GetMapping()
42   - public String bomHeader() {
43   - return prefix + "/list";
  42 + public String receiptPreferenceHeader() {
  43 + return prefix + "/receiptPreference";
44 44 }
45 45  
46 46 //@ApiOperation(value="查看入库首选项", notes="根据首选项编码、名称、入库流程、 入库类型、创建时间查询入库首选项", httpMethod = "POST")
... ...
src/main/java/com/huaheng/pc/config/warehouse/service/WarehouseService.java
... ... @@ -22,5 +22,5 @@ public interface WarehouseService extends IService&lt;Warehouse&gt;{
22 22  
23 23 List<Warehouse> selectListEntityByEqual(Warehouse condition);
24 24  
25   -
  25 + List<Map<String, Object>> getWarehouseMap();
26 26 }
... ...
src/main/java/com/huaheng/pc/config/warehouse/service/WarehouseServiceImpl.java
... ... @@ -226,4 +226,15 @@ public class WarehouseServiceImpl extends ServiceImpl&lt;WarehouseMapper, Warehouse
226 226 List<Warehouse> warehouseList = list(lambdaQueryWrapper);
227 227 return warehouseList;
228 228 }
  229 +
  230 + @Override
  231 + public List<Map<String, Object>> getWarehouseMap(){
  232 + LambdaQueryWrapper<Warehouse> warehouse = Wrappers.lambdaQuery();
  233 + warehouse.select(Warehouse::getCode,Warehouse::getName,Warehouse::getEnable);
  234 + List<Map<String, Object>> warehouseList = listMaps(warehouse);
  235 + for (Map<String, Object> item : warehouseList){
  236 + item.put("value",item.get("code").toString());
  237 + }
  238 + return warehouseList;
  239 + }
229 240 }
... ...
src/main/java/com/huaheng/pc/config/zone/domain/Zone.java
... ... @@ -138,6 +138,9 @@ public class Zone implements Serializable {
138 138 @TableField(value = "processStamp")
139 139 private String processStamp;
140 140  
  141 + @TableField(value = "enable")
  142 + private String enable;
  143 +
141 144 private static final long serialVersionUID = 1L;
142 145  
143 146 public static final String COL_CODE = "code";
... ... @@ -179,4 +182,4 @@ public class Zone implements Serializable {
179 182 public static final String COL_USERDEF8 = "userDef8";
180 183  
181 184 public static final String COL_PROCESSSTAMP = "processStamp";
182   -}
183 185 \ No newline at end of file
  186 +}
... ...
src/main/java/com/huaheng/pc/shipment/shipmentContainerDetail/domain/ShipmentContainerDetail.java
... ... @@ -14,13 +14,20 @@ import java.util.Date;
14 14 @TableName(value = "shipment_container_detail")
15 15 public class ShipmentContainerDetail implements Serializable {
16 16 /**
17   - * 出库箱内部
  17 + * 出库组盘明细
18 18 */
19 19 @TableId(value = "id", type = IdType.AUTO)
20   - @ApiModelProperty(value="出库箱内部号")
  20 + @ApiModelProperty(value="出库组盘明细号")
21 21 private Integer id;
22 22  
23 23 /**
  24 + * 出库组盘头号
  25 + */
  26 + @TableField(value = "shippingContainerId")
  27 + @ApiModelProperty(value="出库组盘头号")
  28 + private Integer shippingContainerId;
  29 +
  30 + /**
24 31 * 出库箱号
25 32 */
26 33 @TableField(value = "containerCode")
... ... @@ -42,13 +49,6 @@ public class ShipmentContainerDetail implements Serializable {
42 49 private Integer inventoryId;
43 50  
44 51 /**
45   - * 出库箱头内部号
46   - */
47   - @TableField(value = "shippingContainerId")
48   - @ApiModelProperty(value="出库箱头内部号")
49   - private Integer shippingContainerId;
50   -
51   - /**
52 52 * 出库单号
53 53 */
54 54 @TableField(value = "shipmentCode")
... ... @@ -1212,4 +1212,4 @@ public class ShipmentContainerDetail implements Serializable {
1212 1212 public void setProcessStamp(String processStamp) {
1213 1213 this.processStamp = processStamp;
1214 1214 }
1215   -}
1216 1215 \ No newline at end of file
  1216 +}
... ...
src/main/java/com/huaheng/pc/shipment/shipmentContainerHeader/service/ShipmentContainerHeaderService.java
... ... @@ -35,7 +35,6 @@ public interface ShipmentContainerHeaderService extends IService&lt;ShipmentContain
35 35  
36 36 AjaxResult createTask(List<Integer> idList);
37 37  
38   -
39   -
  38 + boolean cancelShipment(Integer combineHeaderId);
40 39  
41 40 }
... ...
src/main/java/com/huaheng/pc/shipment/shipmentContainerHeader/service/ShipmentContainerHeaderServiceImpl.java
... ... @@ -505,6 +505,24 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl&lt;ShipmentCont
505 505 // search.setInventorySts(item.getInventorySts()); //物料状态
506 506  
507 507 List<InventoryDetail> inventoryList = shippingCombinationService.getInventorys(item);
  508 + //去除已锁的库存
  509 + ArrayList<InventoryDetail> lockList = new ArrayList<>();
  510 + LambdaQueryWrapper<Container> queryWrapper;
  511 + boolean lock = false;
  512 + for (InventoryDetail inventoryDetail : inventoryList) {
  513 + queryWrapper = Wrappers.lambdaQuery();
  514 + queryWrapper.eq(Container::getCode,inventoryDetail.getContainerCode());
  515 + Container container = containerService.getOne(queryWrapper);
  516 + if ("lock".equals(container.getStatus())){
  517 + lockList.add(inventoryDetail);
  518 + lock = true;
  519 + }
  520 + }
  521 + inventoryList.removeAll(lockList);
  522 + if (inventoryList.size()<1 && lock){
  523 + return AjaxResult.success("明细id为"+item.getId()+"的物料所在托盘全部处于锁定状态,请完成或取消任务后再进行组盘");
  524 + }
  525 +
508 526 if(inventoryList.size() < 1 && item.getWaveId() != 0){
509 527 Wave wave = waveService.getById(item.getWaveId());
510 528 wave.setStatus(QuantityConstant.WAVE_STATUS_ERROR);
... ... @@ -579,4 +597,30 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl&lt;ShipmentCont
579 597 return AjaxResult.success("全部生成完毕");
580 598 }
581 599  
  600 + /**
  601 + * 取消出库任务
  602 + */
  603 + @Override
  604 + @Transactional(rollbackFor = ServiceException.class)
  605 + public boolean cancelShipment(Integer combineHeaderId) {
  606 + // 回滚组盘主表状态
  607 + ShipmentContainerHeader shipmentContainerHeader = new ShipmentContainerHeader();
  608 + shipmentContainerHeader.setId(combineHeaderId);
  609 + shipmentContainerHeader.setStatus(QuantityConstant.SHIPMENT_CONTAINER_BUILD);
  610 + if (!updateById(shipmentContainerHeader)){
  611 + throw new ServiceException("更新出库组盘头表失败");
  612 + }
  613 + // 回滚组盘明细状态
  614 + LambdaQueryWrapper<ShipmentContainerDetail> queryWrapper = Wrappers.lambdaQuery();
  615 + queryWrapper.eq(ShipmentContainerDetail::getShippingContainerId,combineHeaderId);
  616 + List<ShipmentContainerDetail> shipmentContainerDetailList = shipmentContainerDetailService.list(queryWrapper);
  617 + for (ShipmentContainerDetail shipmentContainerDetail : shipmentContainerDetailList) {
  618 + shipmentContainerDetail.setStatus(QuantityConstant.SHIPMENT_CONTAINER_BUILD);
  619 + }
  620 + if (!shipmentContainerDetailService.updateBatchById(shipmentContainerDetailList)){
  621 + throw new ServiceException("更新出库组盘明细失败");
  622 + }
  623 + return true;
  624 + }
  625 +
582 626 }
... ...
src/main/java/com/huaheng/pc/shipment/shipmentDetail/domain/ShipmentDetail.java
... ... @@ -111,10 +111,10 @@ public class ShipmentDetail implements Serializable {
111 111 private BigDecimal shipQty;
112 112  
113 113 /**
114   - * 请求数量
  114 + * 已出数量
115 115 */
116 116 @TableField(value = "requestQty")
117   - @ApiModelProperty(value="请求数量")
  117 + @ApiModelProperty(value="已出数量")
118 118 private BigDecimal requestQty;
119 119  
120 120 /**
... ... @@ -1049,4 +1049,4 @@ public class ShipmentDetail implements Serializable {
1049 1049 public void setCompanyName(String companyName) {
1050 1050 this.companyName = companyName;
1051 1051 }
1052   -}
1053 1052 \ No newline at end of file
  1053 +}
... ...
src/main/java/com/huaheng/pc/shipment/shippingCombination/controller/ShippingCombinationController.java
... ... @@ -183,14 +183,14 @@ public class ShippingCombinationController extends BaseController {
183 183 }
184 184  
185 185 /**
186   - * 自动组盘
  186 + * 自动组盘并生成任务
187 187 * @param shipmentCode
188 188 * @return
189 189 */
190 190 @RequiresPermissions("shipment:shippingCombination:combination")
191   - @PostMapping("/autoCombination")
  191 + @PostMapping("/autoCombinationAndCreateTask")
192 192 @ResponseBody
193   - public AjaxResult autoCombination(String shipmentCode){
  193 + public AjaxResult autoCombinationAndCreateTask(String shipmentCode){
194 194 AjaxResult ajaxResult = shipmentContainerHeaderService.autoCombination(shipmentCode);
195 195 LambdaQueryWrapper<ShipmentContainerHeader> shipmentContainerHeader=Wrappers.lambdaQuery();
196 196 shipmentContainerHeader.eq(ShipmentContainerHeader::getStatus, QuantityConstant.SHIPMENT_CONTAINER_BUILD);
... ... @@ -206,6 +206,17 @@ public class ShippingCombinationController extends BaseController {
206 206 return ajaxResult;
207 207 }
208 208  
  209 + /**
  210 + * 自动组盘并生成任务
  211 + * @param shipmentCode
  212 + * @return
  213 + */
  214 + @RequiresPermissions("shipment:shippingCombination:combination")
  215 + @PostMapping("/autoCombination")
  216 + @ResponseBody
  217 + public AjaxResult autoCombination(String shipmentCode) {
  218 + return shipmentContainerHeaderService.autoCombination(shipmentCode);
  219 + }
209 220  
210 221  
211 222 /** 取消组盘
... ...
src/main/java/com/huaheng/pc/system/user/controller/UserController.java
... ... @@ -31,7 +31,7 @@ import java.util.Map;
31 31  
32 32 /**
33 33 * 用户信息
34   - *
  34 + *
35 35 * @author huaheng
36 36 */
37 37 @Controller
... ... @@ -103,13 +103,7 @@ public class UserController extends BaseController
103 103 lambdaQueryWrapper.eq(Company::getWarehouseCode,ShiroUtils.getWarehouseCode());
104 104 List<Company> companys = companyService.list(lambdaQueryWrapper);
105 105 mmap.put("companys", companys);
106   - LambdaQueryWrapper<Warehouse> warehouse = Wrappers.lambdaQuery();
107   - warehouse.select(Warehouse::getCode,Warehouse::getName,Warehouse::getEnable);
108   - List<Map<String, Object>> warehouseList = warehouseService.listMaps(warehouse);
109   - for (Map<String, Object> item : warehouseList){
110   - item.put("value",item.get("code").toString());
111   - }
112   - mmap.put("warehouseList",warehouseList);
  106 + mmap.put("warehouseList",warehouseService.getWarehouseMap());
113 107 return prefix + "/add";
114 108 }
115 109  
... ... @@ -252,4 +246,4 @@ public class UserController extends BaseController
252 246 }
253 247  
254 248  
255   -}
256 249 \ No newline at end of file
  250 +}
... ...
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... ... @@ -398,6 +398,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
398 398 //如果已完成则不管
399 399 if (task.getStatus().equals(QuantityConstant.TASK_STATUS_COMPLETED)) {
400 400 return AjaxResult.success("任务(" + taskIds[i] + ")任务已经是完成的!");
  401 +
401 402 }
402 403 //整盘入库,空托入库库位自动分配
403 404 //整盘入库手动完成分配库位,已分配则略过
... ... @@ -412,6 +413,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
412 413 if (StringUtils.isEmpty(task.getFromLocation()) && StringUtils.isEmpty(task.getToLocation())) {
413 414 throw new ServiceException("任务" + task.getId() + "没有库位,执行中止");
414 415 }
  416 +
415 417 this.completeTask(task);
416 418 }
417 419 return AjaxResult.success("完成任务成功!");
... ... @@ -797,4 +799,4 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
797 799 }
798 800  
799 801  
800   -}
801 802 \ No newline at end of file
  803 +}
... ...
src/main/resources/application-druid.properties
... ... @@ -6,10 +6,10 @@ spring.datasource.druid.master.url=jdbc:mysql://localhost:3306/wms_v2?useUnicode
6 6 #spring.datasource.druid.master.url=jdbc:mysql://172.16.29.45:3306/huahengExample?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
7 7 #spring.datasource.druid.master.url=jdbc:mysql://117.62.222.186:3306/wms_v2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2b8
8 8  
9   -spring.datasource.druid.master.username=softhuaheng
10   -spring.datasource.druid.master.password=HHrobot123.
11   -#spring.datasource.druid.master.username=root
12   -#spring.datasource.druid.master.password=root
  9 +#spring.datasource.druid.master.username=softhuaheng
  10 +#spring.datasource.druid.master.password=HHrobot123.
  11 +spring.datasource.druid.master.username=root
  12 +spring.datasource.druid.master.password=root
13 13 # ´Ó¿â
14 14 spring.datasource.druid.slave.open = false
15 15 spring.datasource.druid.slave.url=jdbc:mysql://117.62.222.186:3306/wms_v2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
... ...
src/main/resources/templates/config/carrier/add.html
... ... @@ -2,6 +2,7 @@
2 2 <html lang="zh" xmlns:th="http://www.thymeleaf.org">
3 3 <meta charset="utf-8">
4 4 <head th:include="include :: header"></head>
  5 +<link th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
5 6 <body class="white-bg">
6 7 <div class="wrapper wrapper-content animated fadeInRight ibox-content">
7 8 <form class="form-horizontal m" id="form-carrier-add">
... ... @@ -17,14 +18,14 @@
17 18 <input id="name" name="name" class="form-control" type="text">
18 19 </div>
19 20 </div>
20   - <!--<div class="form-group">-->
21   - <!--<label class="col-sm-3 control-label">仓库:</label>-->
22   - <!--<div class="col-sm-8">-->
23   - <!--<label th:each="warehouse:${warehouseList}" class="checkbox-inline i-checks">-->
24   - <!--<input name="warehouseCode" type="checkbox" th:value="${warehouse.value}" th:text=" ${warehouse.name}" th:disabled="${warehouse.enable == false} ">-->
25   - <!--</label>-->
26   - <!--</div>-->
27   - <!--</div>-->
  21 + <div class="form-group">
  22 + <label class="col-sm-3 control-label">仓库:</label>
  23 + <div class="col-sm-8">
  24 + <label th:each="warehouse:${warehouseList}" class="checkbox-inline i-checks">
  25 + <input name="warehouseCode" type="checkbox" th:value="${warehouse.value}" th:text=" ${warehouse.name}" th:disabled="${warehouse.enable == false} ">
  26 + </label>
  27 + </div>
  28 + </div>
28 29 <div class="form-group">
29 30 <label class="col-sm-3 control-label">运单获取地址url:</label>
30 31 <div class="col-sm-8">
... ... @@ -66,6 +67,7 @@
66 67 </form>
67 68 </div>
68 69 <div th:include="include::footer"></div>
  70 +<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
69 71 <script type="text/javascript">
70 72 var prefix = ctx + "config/carrier"
71 73 $("#form-carrier-add").validate({
... ...
src/main/resources/templates/config/carrier/edit.html
... ... @@ -2,11 +2,12 @@
2 2 <html lang="zh" xmlns:th="http://www.thymeleaf.org">
3 3 <meta charset="utf-8">
4 4 <head th:include="include :: header"></head>
  5 +<link th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
5 6 <body class="white-bg">
6 7 <div class="wrapper wrapper-content animated fadeInRight ibox-content">
7 8 <form class="form-horizontal m" id="form-company-add" th:object="${carrier}">
8 9 <div class="form-group">
9   - <input id="id" name="id" th:field="*{id}"/>
  10 + <input id="id" hidden name="id" th:field="*{id}"/>
10 11 <label class="col-sm-3 control-label">编码:</label>
11 12 <div class="col-sm-8">
12 13 <input id="code" name="code" class="form-control" type="text" th:field="*{code}" >
... ... @@ -21,9 +22,9 @@
21 22 <div class="form-group">
22 23 <label class="col-sm-3 control-label">仓库:</label>
23 24 <div class="col-sm-8">
24   - <select id="warehouseCode" name="warehouseCode" class="form-control" >
25   - <option th:each="item : ${warehouseList}" th:text="${item['name']}" th:value="${item['code']}" th:attr = " code = ${item['name']}"></option>
26   - </select>
  25 + <label th:each="warehouse:${warehouseList}" class="checkbox-inline i-checks">
  26 + <input name="warehouse" id ="warehouse" type="checkbox" th:value="${warehouse.code}" th:text="${warehouse.name}" th:checked="${warehouse.flag}" th:disabled="${warehouse.enable == true}">
  27 + </label>
27 28 </div>
28 29 </div>
29 30 <div class="form-group">
... ... @@ -67,6 +68,7 @@
67 68 </form>
68 69 </div>
69 70 <div th:include="include::footer"></div>
  71 +<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
70 72 <script type="text/javascript">
71 73 var prefix = ctx + "config/carrier";
72 74 $("#form-company-add").validate({
... ...
src/main/resources/templates/config/configValue/configValue.html
... ... @@ -56,7 +56,7 @@
56 56 createUrl: prefix + "/add",
57 57 updateUrl: prefix + "/edit/{id}",
58 58 removeUrl: prefix + "/remove",
59   - modalName: "货主",
  59 + modalName: "系统参数",
60 60 search: false,
61 61 sortName: "id",
62 62 sortOrder: "desc",
... ... @@ -145,4 +145,4 @@
145 145 });
146 146 </script>
147 147 </body>
148   -</html>
149 148 \ No newline at end of file
  149 +</html>
... ...
src/main/resources/templates/config/receiptPreference/list.html deleted
1   -<!DOCTYPE HTML>
2   -<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
3   -<meta charset="utf-8">
4   -<head th:include="include :: header">
5   - <style>
6   - .layui-input-block, .layui-input-inline{position: relative;}
7   - .layui-input-block{margin-left: 110px; min-height: 36px;}
8   - </style>
9   -</head>
10   -<body class="gray-bg">
11   -<div class="container-div">
12   - <div class="row">
13   - <div class="col-sm-12 select-info">
14   - <form id="formId">
15   - <div class="box_all">
16   - <div class="select-list box2">
17   - <ul>
18   - <li>
19   - <label>首选项代码:</label>
20   - <input type="text" name="code"/>
21   - </li>
22   - <li>
23   - <label>首选项名字:</label>
24   - <input type="text" name="name"/>
25   - </li>
26   - <li class="time">
27   - <label>创建时间:</label>
28   - <input type="text" class="time-input" id="startTime" placeholder="开始时间"
29   - name="beginCreated" />
30   - <span>-</span>
31   - <input type="text" class="time-input" id="endTime" placeholder="结束时间"
32   - name="endCreated"/>
33   - </li>
34   - <p style=" float:right;text-align: right; padding:5px 50px 0 0">
35   - <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
36   - class="fa fa-search"></i>&nbsp;搜索</a>
37   - <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
38   - class="fa fa-refresh"></i>&nbsp;重置</a>
39   - </p>
40   - <div class="div1" style="clear: both;width:16px;margin: auto"><img src="../img/down.png" onClick="test(this)"><!--this 指 img 对象 --> </div>
41   - </ul>
42   - </div>
43   - <!--下拉-->
44   - <div class="clink_more" id="div2" style="display:none;">
45   - <!--分组-->
46   - <div class="more_input">
47   - <div class="col-lg-12">
48   - <fieldset class="wms-field-title" style="margin-top: 20px;">
49   - <legend style="width:auto;padding: 0;margin-bottom: 10px;font-size: 16px;line-height: inherit;color: #333;border: 0;">通用</legend>
50   - </fieldset>
51   - </div>
52   - <div class="col-lg-12 input_list">
53   - <ul>
54   - <li>
55   - <label>入库流程:</label>
56   - <select name="receivingFlow">
57   - <option value="0">否</option>
58   - <option value="-1">是</option>
59   - </select>
60   - </li>
61   - </ul>
62   - <ul>
63   - <li>
64   - <div class="col-lg-4"><label>自动生成托盘号:</label></div>
65   - <div class="col-lg-8">
66   - <div class="onoffswitch">
67   - <input type="checkbox" class="onoffswitch-checkbox" id="autoAssignLPN" name="autoAssignLPN" checked="checked">
68   - <label class="onoffswitch-label" for="autoAssignLPN">
69   - <span class="onoffswitch-inner"></span>
70   - <span class="onoffswitch-switch"></span>
71   - </label>
72   - </div>
73   - </div>
74   - </li>
75   -<!-- <li>-->
76   -<!-- <label>托盘生成号:</label>-->
77   -<!-- <input type="text" name="autoAssignLPN" placeholder="on 就调出正则表达式" />-->
78   -<!-- </li>-->
79   - </ul>
80   - <ul>
81   - <li>
82   - <div class="col-lg-4"><label>允许超收:</label></div>
83   - <div class="col-lg-8">
84   - <div class="onoffswitch">
85   - <input type="checkbox" class="onoffswitch-checkbox" id="allowOverReceiving" name="allowOverReceiving" checked="checked">
86   - <label class="onoffswitch-label" for="allowOverReceiving">
87   - <span class="onoffswitch-inner"></span>
88   - <span class="onoffswitch-switch"></span>
89   - </label>
90   - </div>
91   - </div>
92   - </li>
93   - <li>
94   - <label>允许超收范围:</label>
95   - <input type="number" name="allowOverReceivingQty" placeholder="%" />
96   - </li>
97   - </ul>
98   - <ul>
99   - <li>
100   - <div class="col-lg-4"><label>自动定位:</label></div>
101   - <div class="col-lg-8">
102   - <div class="onoffswitch">
103   - <input type="checkbox" class="onoffswitch-checkbox" id="autoLocate" name="autoLocate" checked="checked">
104   - <label class="onoffswitch-label" for="autoLocate">
105   - <span class="onoffswitch-inner"></span>
106   - <span class="onoffswitch-switch"></span>
107   - </label>
108   - </div>
109   - </div>
110   - </li>
111   - <li>
112   - <label>定位规则:</label>
113   - <select name="locationRule">
114   - <option value="0">否</option>
115   - <option value="-1">是</option>
116   - </select>
117   - </li>
118   - <li>
119   - <label>容器选择规则:</label>
120   - <select name="checkinByPiece">
121   - <option value="0">否</option>
122   - <option value="-1">是</option>
123   - </select>
124   - </li>
125   - </ul>
126   - <ul>
127   - <li>
128   - <div class="col-lg-4"><label>快速入库:</label></div>
129   - <div class="col-lg-8">
130   - <div class="onoffswitch">
131   - <input type="checkbox" class="onoffswitch-checkbox" id="useQuickCheckIn" name="useQuickCheckIn" checked="checked">
132   - <label class="onoffswitch-label" for="useQuickCheckIn">
133   - <span class="onoffswitch-inner"></span>
134   - <span class="onoffswitch-switch"></span>
135   - </label>
136   - </div>
137   - </div>
138   - </li>
139   - </ul>
140   - </div>
141   - </div>
142   -
143   - <div class="more_input">
144   - <div class="col-lg-12">
145   - <fieldset class="wms-field-title" style="margin-top: 20px;">
146   - <legend style="width:auto;padding: 0;margin-bottom:10px;font-size: 16px;line-height: inherit;color: #333;border: 0;">RF</legend>
147   - </fieldset>
148   - </div>
149   - <div class="col-lg-12 input_list">
150   - <ul>
151   - <li>
152   - <div class="col-lg-4"><label>组车收货:</label></div>
153   - <div class="col-lg-8">
154   - <div class="onoffswitch">
155   - <input type="checkbox" class="onoffswitch-checkbox" id="groupPutaway" name="groupPutaway" checked="checked">
156   - <label class="onoffswitch-label" for="groupPutaway">
157   - <span class="onoffswitch-inner"></span>
158   - <span class="onoffswitch-switch"></span>
159   - </label>
160   - </div>
161   - </div>
162   - </li>
163   - <li>
164   - <div class="col-lg-4"><label>显示未收货数量:</label></div>
165   - <div class="col-lg-8">
166   - <div class="onoffswitch">
167   - <input type="checkbox" class="onoffswitch-checkbox" id="showOpenQty" name="showOpenQty" checked="checked">
168   - <label class="onoffswitch-label" for="showOpenQty">
169   - <span class="onoffswitch-inner"></span>
170   - <span class="onoffswitch-switch"></span>
171   - </label>
172   - </div>
173   - </div>
174   - </li>
175   - <li>
176   - <div class="col-lg-4"><label>人工组盘:</label></div>
177   - <div class="col-lg-8">
178   - <div class="onoffswitch">
179   - <input type="checkbox" class="onoffswitch-checkbox" id="manuallyBuildLPN" name="manuallyBuildLPN" checked="checked">
180   - <label class="onoffswitch-label" for="manuallyBuildLPN">
181   - <span class="onoffswitch-inner"></span>
182   - <span class="onoffswitch-switch"></span>
183   - </label>
184   - </div>
185   - </div>
186   - </li>
187   - <li>
188   - <div class="col-lg-4"><label>逐件收货:</label></div>
189   - <div class="col-lg-8">
190   - <div class="onoffswitch">
191   - <input type="checkbox" class="onoffswitch-checkbox" id="checkinByPiece" name="checkinByPiece" checked="checked">
192   - <label class="onoffswitch-label" for="checkinByPiece">
193   - <span class="onoffswitch-inner"></span>
194   - <span class="onoffswitch-switch"></span>
195   - </label>
196   - </div>
197   - </div>
198   - </li>
199   - <li>
200   - <div class="col-lg-4"><label>自动提交(平库):</label></div>
201   - <div class="col-lg-8">
202   - <div class="onoffswitch">
203   - <input type="checkbox" class="onoffswitch-checkbox" id="pieceConfirm" name="pieceConfirm" checked="checked">
204   - <label class="onoffswitch-label" for="pieceConfirm">
205   - <span class="onoffswitch-inner"></span>
206   - <span class="onoffswitch-switch"></span>
207   - </label>
208   - </div>
209   - </div>
210   - </li>
211   -
212   - </ul>
213   - </div>
214   - </div>
215   - <div class="more_input">
216   - <div class="col-lg-12">
217   - <fieldset class="wms-field-title" style="margin-top: 20px;">
218   - <legend style="width:auto;padding: 0;margin-bottom: 10px;font-size: 16px;line-height: inherit;color: #333;border: 0;">物料</legend>
219   - </fieldset>
220   - </div>
221   - <div class="col-lg-12 input_list">
222   - <ul>
223   - <li>
224   - <div class="col-lg-4"><label>ABC分类:</label></div>
225   - <div class="col-lg-8">
226   - <div class="onoffswitch">
227   - <input type="checkbox" class="onoffswitch-checkbox" id="abcClass" name="abcClass" checked="checked">
228   - <label class="onoffswitch-label" for="abcClass">
229   - <span class="onoffswitch-inner"></span>
230   - <span class="onoffswitch-switch"></span>
231   - </label>
232   - </div>
233   - </div>
234   - </li>
235   - <li>
236   - <label>属性模板:</label>
237   - <select name="attributeTemplateCode">
238   - <option value="0">否</option>
239   - <option value="1">是</option>
240   - </select>
241   - </li>
242   - </ul>
243   - <ul>
244   - <li>
245   - <label>保质期(天):</label>
246   - <input type="number" name="daysToExpire"/>
247   - </li>
248   - <li>
249   - <label>临期预警(天):</label>
250   - <input type="number" name="expiringDays"/>
251   - </li>
252   - <li>
253   - <label>收货预警(天):</label>
254   - <input type="number" name="minShelfLifeDays"/>
255   - </li>
256   - </ul>
257   - </div>
258   - </div>
259   - <!--分组//-->
260   - </div>
261   - <!--下拉//-->
262   - </div>
263   - <!--<div class="boxdown"></div>-->
264   - </form>
265   - </div>
266   - <div class="btn-group hidden-xs" id="toolbar" role="group">
267   - <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()"
268   - shiro:hasPermission="config:receiptPreference:add">
269   - <i class="fa fa-plus"></i> 新增
270   - </a>
271   - <a class="btn btn-outline btn-primary " onclick="$.operate.editUrl()"
272   - shiro:hasPermission="config:receiptPreference:edit">
273   - <i class="fa fa-edit"></i> 修改
274   - </a>
275   - <a class="btn btn-outline btn-danger btn-rounded " onclick="$.operate.batRemove()"
276   - shiro:hasPermission="config:receiptPreference:remove">
277   - <i class="fa fa-trash-o"></i> 删除
278   - </a>
279   - </div>
280   -
281   - <div class="col-sm-12 select-info table-striped">
282   - <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover text-nowrap"></table>
283   - </div>
284   - </div>
285   -
286   -</div>
287   -<div th:include="include :: footer"></div>
288   -
289   -<script th:inline="javascript">
290   - var editFlag = [[${@permission.hasPermi('task:receiptPreference:edit')}]];
291   - var removeFlag = [[${@permission.hasPermi('task:receiptPreference:remove')}]];
292   - var prefix = ctx + "config/receiptPreference"
293   -
294   - $(function () {
295   - var options = {
296   - url: prefix + "/list",
297   - createUrl: prefix + "/add",
298   - updateUrl: prefix + "/edit/{id}",
299   - removeUrl: prefix + "/remove",
300   - modalName: "入库首选",
301   - columns: [{
302   - checkbox: true
303   - },
304   - {
305   - field: 'id',
306   - title: 'ID',
307   - visible: false
308   - },
309   - {
310   - field: 'warehouseCode',
311   - title: '仓库'
312   - },
313   - {
314   - field: 'code',
315   - title: '首选项代码'
316   - },
317   - {
318   - field: 'name',
319   - title: '首选项名字',
320   - formatter: function (value, row, index) {
321   - var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
322   - return html;
323   - }
324   - },
325   - {
326   - field: 'receivingFlow',
327   - title: '入库流程',
328   - formatter: function (value, row, index) {
329   - var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
330   - return html;
331   - }
332   - },
333   - {
334   - field: 'autoAssignLPN',
335   - title: '自动生成托盘号',
336   - formatter: function (value, row, index) {
337   - var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
338   - return html;
339   - }
340   - },
341   - {
342   - field: 'allowOverReceiving',
343   - title: '允许超收',
344   - formatter: function (value, row, index) {
345   - var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
346   - return html;
347   - }
348   - },
349   - {
350   - field: 'allowOverReceivingQty',
351   - title: '允许超收范围',
352   - formatter: function (value, row, index) {
353   - var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
354   - return html;
355   - }
356   - },
357   - {
358   - field: 'autoLocate',
359   - title: '自动定位',
360   - formatter: function (value, row, index) {
361   - var isCheck = value == 1 ? 'checked' : '';
362   - var html = $.common.sprintf("<label class='check-box'><input type='checkbox' name='columns[%s].isInsert' value='1' %s></label>", index, isCheck);
363   - return html;
364   - }
365   - },
366   - {
367   - field: 'showOpenQty',
368   - title: 'RF显示未收数量',
369   - formatter: function (value, row, index) {
370   - var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
371   - return html;
372   - }
373   - },
374   - {
375   - field: 'groupPutaway',
376   - title: 'RF组车收货',
377   - align: 'center',
378   - formatter: function (value, row, index) {
379   - var isCheck = value == 1 ? 'checked' : '';
380   - var html = $.common.sprintf("<label class='check-box'><input type='checkbox' name='columns[%s].isInsert' value='1' %s></label>", index, isCheck);
381   - return html;
382   - }
383   - },
384   - {
385   - field: 'manuallyBuildLPN',
386   - title: '人工组盘',
387   - formatter: function (value, row, index) {
388   - var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
389   - return html;
390   - }
391   - },
392   - {
393   - field: 'locationRule',
394   - title: '定位规则',
395   - formatter: function (value, row, index) {
396   - var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
397   - return html;
398   - }
399   - },
400   - {
401   - field: 'listingRules',
402   - title: '上架规则',
403   - formatter: function (value, row, index) {
404   - var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
405   - return html;
406   - }
407   - },
408   - {
409   - field: 'emptyLocRule',
410   - title: '空库位规则',
411   - formatter: function (value, row, index) {
412   - var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
413   - return html;
414   - }
415   - },
416   - {
417   - field: 'checkinByPiece',
418   - title: 'RF逐件收货',
419   - formatter: function (value, row, index) {
420   - var isCheck = value == 1 ? 'checked' : '';
421   - var html = $.common.sprintf("<label class='check-box'><input type='checkbox' name='columns[%s].isInsert' value='1' %s></label>", index, isCheck);
422   - return html;
423   - }
424   - },
425   - {
426   - field: 'pieceConfirm',
427   - title: 'RF自动提交收货',
428   - formatter: function (value, row, index) {
429   - var isCheck = value == 1 ? 'checked' : '';
430   - var html = $.common.sprintf("<label class='check-box'><input type='checkbox' name='columns[%s].isInsert' value='1' %s></label>", index, isCheck);
431   - return html;
432   - }
433   - },
434   - {
435   - field: 'abcClass',
436   - title: 'abc分类',
437   - formatter: function (value, row, index) {
438   - var isCheck = value == 1 ? 'checked' : '';
439   - var html = $.common.sprintf("<label class='check-box'><input type='checkbox' name='columns[%s].isInsert' value='1' %s></label>", index, isCheck);
440   - return html;
441   - }
442   - },
443   - {
444   - field: 'daysToExpire',
445   - title: '保质期',
446   - formatter: function (value, row, index) {
447   - var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
448   - return html;
449   - }
450   - },
451   - {
452   - field: 'expiringDays',
453   - title: '临期预警',
454   - formatter: function (value, row, index) {
455   - var isCheck = value == 1 ? 'checked' : '';
456   - var html = $.common.sprintf("<label class='check-box'><input type='checkbox' name='columns[%s].isInsert' value='1' %s></label>", index, isCheck);
457   - return html;
458   - }
459   - },
460   - {
461   - field: 'minShelfLifeDays',
462   - title: '收货预警(天)',
463   - formatter: function (value, row, index) {
464   - var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
465   - return html;
466   - }
467   - },
468   - {
469   - field: 'allowQuickPutaway',
470   - title: 'RF快速上架',
471   - formatter: function (value, row, index) {
472   - var isCheck = value == 1 ? 'checked' : '';
473   - var html = $.common.sprintf("<label class='check-box'><input type='checkbox' name='columns[%s].isInsert' value='1' %s></label>", index, isCheck);
474   - return html;
475   - }
476   - },
477   - {
478   - field: 'attributeTemplateCode',
479   - title: '属性模板',
480   - formatter: function (value, row, index) {
481   - var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
482   - return html;
483   - }
484   - },
485   - {
486   - field: 'useQuickCheckIn',
487   - title: '快速入库',
488   - formatter: function (value, row, index) {
489   - var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
490   - return html;
491   - }
492   - },
493   - {
494   - field: 'created',
495   - title: '创建时间'
496   - },
497   - {
498   - field: 'createdBy',
499   - title: '创建用户',
500   - formatter: function (value, row, index) {
501   - var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
502   - return html;
503   - }
504   - },
505   - {
506   - field: 'lastUpdated',
507   - title: '更新用户',
508   - formatter: function (value, row, index) {
509   - var isCheck = value == 1 ? 'checked' : '';
510   - var html = $.common.sprintf("<label class='check-box'><input type='checkbox' name='columns[%s].isInsert' value='1' %s></label>", index, isCheck);
511   - return html;
512   - }
513   - },
514   - {
515   - title: '操作',
516   - align: 'center',
517   - formatter: function (value, row, index) {
518   - var actions = [];
519   -
520   - return actions.join('');
521   - }
522   - }]
523   - };
524   - $.table.init(options);
525   -
526   - let a =$(".box2 ul li:gt(3):not(:last)");
527   - a.hide();
528   - $(".boxdown").click(function(){
529   - if(a.is(':visible')){
530   - a.slideUp('fast');
531   - $(this).removeClass('up');
532   - }else{
533   - a.slideDown('fast').show();
534   - $(this).addClass('up');
535   - }
536   - });
537   -
538   -
539   - $.ajax({
540   - url: "../getWarehouseByUserCode",
541   - type: 'post',
542   - dataType: "json",
543   - data: {
544   - username: [[${@permission.getPrincipalProperty('id')}]]
545   - },
546   - success: function (value) {
547   - // console.log(value.data);
548   - $("#warehouse").contents().remove();
549   - if (value != null && value.data.length >= 1)
550   - for (var i = 0; i < value.data.length; i++) {
551   - $('<option value=' + value.data[i].id + ' code=' + value.data[i].code + '>' + value.data[i].name + '</option>').appendTo('#warehouse');
552   - }
553   - }
554   - })
555   -
556   - });
557   -
558   -</script>
559   -<script type="text/javascript">
560   - function test(obj){
561   - var div1=document.getElementById("div2");
562   - if(div1.style.display=="block"){
563   - div1.style.display="none";
564   - obj.src="../img/down.png";
565   - }else{
566   - div1.style.display="block";
567   - obj.src="../img/up.png";
568   - }
569   - }
570   -</script>
571   -</body>
572   -</html>
573 0 \ No newline at end of file
src/main/resources/templates/config/receiptPreference/receiptPreference.html
1 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   -<head th:include="include :: header"></head>
  4 +<head th:include="include :: header">
  5 + <style>
  6 + .layui-input-block, .layui-input-inline{position: relative;}
  7 + .layui-input-block{margin-left: 110px; min-height: 36px;}
  8 + </style>
  9 +</head>
5 10 <body class="gray-bg">
6 11 <div class="container-div">
7 12 <div class="row">
8 13 <div class="col-sm-12 select-info">
9   - <form id="receiptPreference-form">
10   - <div class="select-list">
11   - <ul>
12   - <li>
13   - 编码:<input type="text" name="code"/>
14   - </li>
15   - <li>
16   - 名称:<input type="text" name="name"/>
17   - </li>
18   - <li>
19   - 入库流程:<input type="text" name="receivingFlow"/>
20   - </li>
21   - <!--<li>-->
22   - <!--入库类型:<input type="text" name="receiptTypes"/>-->
23   - <!--</li>-->
24   - <!--<li class="time">-->
25   - <!--<label>创建时间: </label>-->
26   - <!--<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="createdBegin"/>-->
27   - <!--<span>-</span>-->
28   - <!--<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="createdEnd"/>-->
29   - <!--</li>-->
30   - <li>
31   - <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
32   - <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('receiptPreference-form')"><i class="fa fa-refresh"></i>&nbsp;重置</a>
33   - <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i>&nbsp;导出</a>-->
34   - </li>
35   - </ul>
  14 + <form id="formId">
  15 + <div class="box_all">
  16 + <div class="select-list box2">
  17 + <ul>
  18 + <li>
  19 + <label>首选项代码:</label>
  20 + <input type="text" name="code"/>
  21 + </li>
  22 + <li>
  23 + <label>首选项名字:</label>
  24 + <input type="text" name="name"/>
  25 + </li>
  26 + <li class="time">
  27 + <label>创建时间:</label>
  28 + <input type="text" class="time-input" id="startTime" placeholder="开始时间"
  29 + name="beginCreated" />
  30 + <span>-</span>
  31 + <input type="text" class="time-input" id="endTime" placeholder="结束时间"
  32 + name="endCreated"/>
  33 + </li>
  34 + <p style=" float:right;text-align: right; padding:5px 50px 0 0">
  35 + <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
  36 + class="fa fa-search"></i>&nbsp;搜索</a>
  37 + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
  38 + class="fa fa-refresh"></i>&nbsp;重置</a>
  39 + </p>
  40 + <div class="div1" style="clear: both;width:16px;margin: auto"><img src="../img/down.png" onClick="test(this)"><!--this 指 img 对象 --> </div>
  41 + </ul>
  42 + </div>
  43 + <!--下拉-->
  44 + <div class="clink_more" id="div2" style="display:none;">
  45 + <!--分组-->
  46 + <div class="more_input">
  47 + <div class="col-lg-12">
  48 + <fieldset class="wms-field-title" style="margin-top: 20px;">
  49 + <legend style="width:auto;padding: 0;margin-bottom: 10px;font-size: 16px;line-height: inherit;color: #333;border: 0;">通用</legend>
  50 + </fieldset>
  51 + </div>
  52 + <div class="col-lg-12 input_list">
  53 + <ul>
  54 + <li>
  55 + <label>入库流程:</label>
  56 + <select name="receivingFlow">
  57 + <option value="0">否</option>
  58 + <option value="-1">是</option>
  59 + </select>
  60 + </li>
  61 + </ul>
  62 + <ul>
  63 + <li>
  64 + <div class="col-lg-4"><label>自动生成托盘号:</label></div>
  65 + <div class="col-lg-8">
  66 + <div class="onoffswitch">
  67 + <input type="checkbox" class="onoffswitch-checkbox" id="autoAssignLPN" name="autoAssignLPN" checked="checked">
  68 + <label class="onoffswitch-label" for="autoAssignLPN">
  69 + <span class="onoffswitch-inner"></span>
  70 + <span class="onoffswitch-switch"></span>
  71 + </label>
  72 + </div>
  73 + </div>
  74 + </li>
  75 +<!-- <li>-->
  76 +<!-- <label>托盘生成号:</label>-->
  77 +<!-- <input type="text" name="autoAssignLPN" placeholder="on 就调出正则表达式" />-->
  78 +<!-- </li>-->
  79 + </ul>
  80 + <ul>
  81 + <li>
  82 + <div class="col-lg-4"><label>允许超收:</label></div>
  83 + <div class="col-lg-8">
  84 + <div class="onoffswitch">
  85 + <input type="checkbox" class="onoffswitch-checkbox" id="allowOverReceiving" name="allowOverReceiving" checked="checked">
  86 + <label class="onoffswitch-label" for="allowOverReceiving">
  87 + <span class="onoffswitch-inner"></span>
  88 + <span class="onoffswitch-switch"></span>
  89 + </label>
  90 + </div>
  91 + </div>
  92 + </li>
  93 + <li>
  94 + <label>允许超收范围:</label>
  95 + <input type="number" name="allowOverReceivingQty" placeholder="%" />
  96 + </li>
  97 + </ul>
  98 + <ul>
  99 + <li>
  100 + <div class="col-lg-4"><label>自动定位:</label></div>
  101 + <div class="col-lg-8">
  102 + <div class="onoffswitch">
  103 + <input type="checkbox" class="onoffswitch-checkbox" id="autoLocate" name="autoLocate" checked="checked">
  104 + <label class="onoffswitch-label" for="autoLocate">
  105 + <span class="onoffswitch-inner"></span>
  106 + <span class="onoffswitch-switch"></span>
  107 + </label>
  108 + </div>
  109 + </div>
  110 + </li>
  111 + <li>
  112 + <label>定位规则:</label>
  113 + <select name="locationRule">
  114 + <option value="0">否</option>
  115 + <option value="-1">是</option>
  116 + </select>
  117 + </li>
  118 + <li>
  119 + <label>容器选择规则:</label>
  120 + <select name="checkinByPiece">
  121 + <option value="0">否</option>
  122 + <option value="-1">是</option>
  123 + </select>
  124 + </li>
  125 + </ul>
  126 + <ul>
  127 + <li>
  128 + <div class="col-lg-4"><label>快速入库:</label></div>
  129 + <div class="col-lg-8">
  130 + <div class="onoffswitch">
  131 + <input type="checkbox" class="onoffswitch-checkbox" id="useQuickCheckIn" name="useQuickCheckIn" checked="checked">
  132 + <label class="onoffswitch-label" for="useQuickCheckIn">
  133 + <span class="onoffswitch-inner"></span>
  134 + <span class="onoffswitch-switch"></span>
  135 + </label>
  136 + </div>
  137 + </div>
  138 + </li>
  139 + </ul>
  140 + </div>
  141 + </div>
  142 +
  143 + <div class="more_input">
  144 + <div class="col-lg-12">
  145 + <fieldset class="wms-field-title" style="margin-top: 20px;">
  146 + <legend style="width:auto;padding: 0;margin-bottom:10px;font-size: 16px;line-height: inherit;color: #333;border: 0;">RF</legend>
  147 + </fieldset>
  148 + </div>
  149 + <div class="col-lg-12 input_list">
  150 + <ul>
  151 + <li>
  152 + <div class="col-lg-4"><label>组车收货:</label></div>
  153 + <div class="col-lg-8">
  154 + <div class="onoffswitch">
  155 + <input type="checkbox" class="onoffswitch-checkbox" id="groupPutaway" name="groupPutaway" checked="checked">
  156 + <label class="onoffswitch-label" for="groupPutaway">
  157 + <span class="onoffswitch-inner"></span>
  158 + <span class="onoffswitch-switch"></span>
  159 + </label>
  160 + </div>
  161 + </div>
  162 + </li>
  163 + <li>
  164 + <div class="col-lg-4"><label>显示未收货数量:</label></div>
  165 + <div class="col-lg-8">
  166 + <div class="onoffswitch">
  167 + <input type="checkbox" class="onoffswitch-checkbox" id="showOpenQty" name="showOpenQty" checked="checked">
  168 + <label class="onoffswitch-label" for="showOpenQty">
  169 + <span class="onoffswitch-inner"></span>
  170 + <span class="onoffswitch-switch"></span>
  171 + </label>
  172 + </div>
  173 + </div>
  174 + </li>
  175 + <li>
  176 + <div class="col-lg-4"><label>人工组盘:</label></div>
  177 + <div class="col-lg-8">
  178 + <div class="onoffswitch">
  179 + <input type="checkbox" class="onoffswitch-checkbox" id="manuallyBuildLPN" name="manuallyBuildLPN" checked="checked">
  180 + <label class="onoffswitch-label" for="manuallyBuildLPN">
  181 + <span class="onoffswitch-inner"></span>
  182 + <span class="onoffswitch-switch"></span>
  183 + </label>
  184 + </div>
  185 + </div>
  186 + </li>
  187 + <li>
  188 + <div class="col-lg-4"><label>逐件收货:</label></div>
  189 + <div class="col-lg-8">
  190 + <div class="onoffswitch">
  191 + <input type="checkbox" class="onoffswitch-checkbox" id="checkinByPiece" name="checkinByPiece" checked="checked">
  192 + <label class="onoffswitch-label" for="checkinByPiece">
  193 + <span class="onoffswitch-inner"></span>
  194 + <span class="onoffswitch-switch"></span>
  195 + </label>
  196 + </div>
  197 + </div>
  198 + </li>
  199 + <li>
  200 + <div class="col-lg-4"><label>自动提交(平库):</label></div>
  201 + <div class="col-lg-8">
  202 + <div class="onoffswitch">
  203 + <input type="checkbox" class="onoffswitch-checkbox" id="pieceConfirm" name="pieceConfirm" checked="checked">
  204 + <label class="onoffswitch-label" for="pieceConfirm">
  205 + <span class="onoffswitch-inner"></span>
  206 + <span class="onoffswitch-switch"></span>
  207 + </label>
  208 + </div>
  209 + </div>
  210 + </li>
  211 +
  212 + </ul>
  213 + </div>
  214 + </div>
  215 + <div class="more_input">
  216 + <div class="col-lg-12">
  217 + <fieldset class="wms-field-title" style="margin-top: 20px;">
  218 + <legend style="width:auto;padding: 0;margin-bottom: 10px;font-size: 16px;line-height: inherit;color: #333;border: 0;">物料</legend>
  219 + </fieldset>
  220 + </div>
  221 + <div class="col-lg-12 input_list">
  222 + <ul>
  223 + <li>
  224 + <div class="col-lg-4"><label>ABC分类:</label></div>
  225 + <div class="col-lg-8">
  226 + <div class="onoffswitch">
  227 + <input type="checkbox" class="onoffswitch-checkbox" id="abcClass" name="abcClass" checked="checked">
  228 + <label class="onoffswitch-label" for="abcClass">
  229 + <span class="onoffswitch-inner"></span>
  230 + <span class="onoffswitch-switch"></span>
  231 + </label>
  232 + </div>
  233 + </div>
  234 + </li>
  235 + <li>
  236 + <label>属性模板:</label>
  237 + <select name="attributeTemplateCode">
  238 + <option value="0">否</option>
  239 + <option value="1">是</option>
  240 + </select>
  241 + </li>
  242 + </ul>
  243 + <ul>
  244 + <li>
  245 + <label>保质期(天):</label>
  246 + <input type="number" name="daysToExpire"/>
  247 + </li>
  248 + <li>
  249 + <label>临期预警(天):</label>
  250 + <input type="number" name="expiringDays"/>
  251 + </li>
  252 + <li>
  253 + <label>收货预警(天):</label>
  254 + <input type="number" name="minShelfLifeDays"/>
  255 + </li>
  256 + </ul>
  257 + </div>
  258 + </div>
  259 + <!--分组//-->
  260 + </div>
  261 + <!--下拉//-->
36 262 </div>
  263 + <!--<div class="boxdown"></div>-->
37 264 </form>
38 265 </div>
39 266 <div class="btn-group hidden-xs" id="toolbar" role="group">
40   - <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="config:receiptPreference:add">
  267 + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()"
  268 + shiro:hasPermission="config:receiptPreference:add">
41 269 <i class="fa fa-plus"></i> 新增
42 270 </a>
43   - <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="config:receiptPreference:remove">
  271 + <a class="btn btn-outline btn-danger btn-rounded " onclick="$.operate.batRemove()"
  272 + shiro:hasPermission="config:receiptPreference:remove">
44 273 <i class="fa fa-trash-o"></i> 删除
45 274 </a>
46 275 </div>
47 276  
48   - <div class="col-sm-12 select-info">
  277 + <div class="col-sm-12 select-info table-striped">
49 278 <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover text-nowrap"></table>
50 279 </div>
51   - <div>
52   - </div>
53   - <div th:include="include :: footer"></div>
54   - <script th:inline="javascript">
55   - var editFlag = [[${@permission.hasPermi('config:receiptPreference:edit')}]];
56   - var removeFlag = [[${@permission.hasPermi('config:receiptPreference:remove')}]];
57   - var prefix = ctx + "config/receiptPreference";
58   - var datas = [[${@dict.getType('sys_normal_disable')}]];
59   - $(function() {
60   - var options = {
61   - url: prefix + "/list",
62   - createUrl: prefix + "/add",
63   - updateUrl: prefix + "/edit/{id}",
64   - removeUrl: prefix + "/remove",
65   - modalName: "入库首选项",
66   - search: false,
67   - columns: [{
68   - checkbox: true
69   - },
70   - {
71   - field : 'id',
72   - title : 'ID'
73   - },
74   - {
75   - field : 'code',
76   - title : '首选项编码'
77   - },
78   - {
79   - field : 'name',
80   - title : '名称'
81   - },
82   - {
83   - field : 'receivingFlow',
84   - title : '入库流程'
85   - },
86   - {
87   - field : 'warehouseCode',
88   - title : '仓库编码',
89   - visible : false
90   - },
91   - {
92   - field : 'autoAssignLPN',
93   - title : '自动生成托盘号',
94   - align : "center",
95   - formatter : function(value, row, index) {
96   - return $.table.selectWhetherLabel(value);
97   - },
98   - },
99   - {
100   - field : 'allowOverReceiving',
101   - title : '允许超收',
102   - align : "center",
103   - formatter : function(value, row, index) {
104   - if (value){return "<span class='badge badge-primary'>是</span>";} else {return "<span class='badge badge-danger'>否</span>";}
105   - },
106   - },
107   - {
108   - field : 'allowOverReceivingQty',
109   - title : '允许超收范围'
110   - },
111   - {
112   - field : 'autoLocate',
113   - title : '自动定位',
114   - align : "center",
115   - formatter : function(value, row, index) {
116   - return $.table.selectWhetherLabel(value);
117   - },
118   - },
119   - {
120   - field : 'showOpenQty',
121   - title : 'RF显示未收数量',
122   - align : "center",
123   - formatter : function(value, row, index) {
124   - return $.table.selectWhetherLabel(value);
125   - },
126   - },
127   - {
128   - field : 'receiptTypes',
129   - title : '入库单类型'
130   - },
131   - {
132   - field : 'groupPutaway',
133   - title : 'RF组车收货',
134   - align : "center",
135   - formatter : function(value, row, index) {
136   - return $.table.selectWhetherLabel(value);
137   - },
138   - },
139   - {
140   - field : 'manuallyBuildLPN',
141   - title : '人工组盘',
142   - align : "center",
143   - formatter : function(value, row, index) {
144   - return $.table.selectWhetherLabel(value);
145   - },
146   - },
147   - {
148   - field : 'locationRule',
149   - title : '定位规则'
150   - },
151   - {
152   - field : 'emptyLocRule',
153   - title : '空库位规则'
154   - },
155   - {
156   - field : 'checkinByPiece',
157   - title : 'RF逐件收货',
158   - align : "center",
159   - formatter : function(value, row, index) {
160   - return $.table.selectWhetherLabel(value);
161   - },
162   - },
163   - {
164   - field : 'pieceConfirm',
165   - title : 'RF自动提交收货',
166   - align : "center",
167   - formatter : function(value, row, index) {
168   - return $.table.selectWhetherLabel(value);
169   - },
170   - },
171   - {
172   - field : 'abcClass',
173   - title : 'abc分类'
174   - },
175   - {
176   - field : 'daysToExpire',
177   - title : '保质期(天)'
178   - },
179   - {
180   - field : 'expiringDays',
181   - title : '临期预警(天)'
182   - },
183   - {
184   - field : 'minShelfLifeDays',
185   - title : '收货预警(天)'
186   - },
187   - {
188   - field : 'allowQuickPutaway',
189   - title : 'RF快速上架',
190   - align : "center",
191   - formatter : function(value, row, index) {
192   - return $.table.selectWhetherLabel(value);
193   - },
194   - },
195   - {
196   - field : 'attributeTemplateCode',
197   - title : '属性模板'
198   - },
199   - {
200   - field : 'useQuickCheckIn',
201   - title : '快速入库',
202   - align : "center",
203   - formatter : function(value, row, index) {
204   - return $.table.selectWhetherLabel(value);
205   - },
206   - },
207   - {
208   - field : 'created',
209   - title : '创建时间',
210   - visible : false
211   - },
212   - {
213   - field : 'createdBy',
214   - title : '创建用户',
215   - visible : false
216   - },
217   - {
218   - field : 'lastUpdated',
219   - title : '更新时间',
220   - visible : false
221   - },
222   - {
223   - field : 'lastUpdatedBy',
224   - title : '更新用户',
225   - visible : false
226   - },
227   - {
228   - field : 'version',
229   - title : '数据版本',
230   - visible : false
231   - },
232   - {
233   - field : 'processStamp',
234   - title : '处理标记',
235   - visible : false
236   - },
237   - {
238   - field : 'userDef1',
239   - title : '自定义字段1' ,
240   - visible:false
241   - },
242   - {
243   - field : 'userDef2',
244   - title : '自定义字段2' ,
245   - visible:false
246   - },
247   - {
248   - field : 'userDef3',
249   - title : '自定义字段3' ,
250   - visible:false
251   - },
252   - {
253   - field : 'userDef4',
254   - title : '自定义字段4' ,
255   - visible:false
256   - },
257   - {
258   - field : 'userDef5',
259   - title : '自定义字段5' ,
260   - visible:false
261   - },
262   - {
263   - title: '操作',
264   - align: 'center',
265   - formatter: function(value, row, index) {
266   - var actions = [];
267   - actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')" ><i class="fa fa-edit"></i>编辑</a> ');
268   - actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')" ><i class="fa fa-trash-o"></i>删除</a>');
269   - return actions.join('');
270   - }
271   - }]
272   - };
273   - $.table.init(options);
274   - });
275   - </script>
276 280 </div>
  281 +
277 282 </div>
  283 +<div th:include="include :: footer"></div>
  284 +
  285 +<script th:inline="javascript">
  286 + var editFlag = [[${@permission.hasPermi('config:receiptPreference:edit')}]];
  287 + var removeFlag = [[${@permission.hasPermi('config:receiptPreference:remove')}]];
  288 + var prefix = ctx + "config/receiptPreference"
  289 +
  290 + $(function () {
  291 + var options = {
  292 + url: prefix + "/list",
  293 + createUrl: prefix + "/add",
  294 + updateUrl: prefix + "/edit/{id}",
  295 + removeUrl: prefix + "/remove",
  296 + modalName: "入库首选",
  297 + columns: [{
  298 + checkbox: true
  299 + },
  300 + {
  301 + field: 'id',
  302 + title: 'ID',
  303 + visible: false
  304 + },
  305 + {
  306 + field: 'warehouseCode',
  307 + title: '仓库'
  308 + },
  309 + {
  310 + field: 'code',
  311 + title: '首选项代码'
  312 + },
  313 + {
  314 + field: 'name',
  315 + title: '首选项名字',
  316 + formatter: function (value, row, index) {
  317 + var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
  318 + return html;
  319 + }
  320 + },
  321 + {
  322 + field: 'receivingFlow',
  323 + title: '入库流程',
  324 + formatter: function (value, row, index) {
  325 + var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
  326 + return html;
  327 + }
  328 + },
  329 + {
  330 + field: 'autoAssignLPN',
  331 + title: '自动生成托盘号',
  332 + formatter: function (value, row, index) {
  333 + var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
  334 + return html;
  335 + }
  336 + },
  337 + {
  338 + field: 'allowOverReceiving',
  339 + title: '允许超收',
  340 + formatter: function (value, row, index) {
  341 + var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
  342 + return html;
  343 + }
  344 + },
  345 + {
  346 + field: 'allowOverReceivingQty',
  347 + title: '允许超收范围',
  348 + formatter: function (value, row, index) {
  349 + var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
  350 + return html;
  351 + }
  352 + },
  353 + {
  354 + field: 'autoLocate',
  355 + title: '自动定位',
  356 + formatter: function (value, row, index) {
  357 + var isCheck = value == 1 ? 'checked' : '';
  358 + var html = $.common.sprintf("<label class='check-box'><input type='checkbox' name='columns[%s].isInsert' value='1' %s></label>", index, isCheck);
  359 + return html;
  360 + }
  361 + },
  362 + {
  363 + field: 'showOpenQty',
  364 + title: 'RF显示未收数量',
  365 + formatter: function (value, row, index) {
  366 + var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
  367 + return html;
  368 + }
  369 + },
  370 + {
  371 + field: 'groupPutaway',
  372 + title: 'RF组车收货',
  373 + align: 'center',
  374 + formatter: function (value, row, index) {
  375 + var isCheck = value == 1 ? 'checked' : '';
  376 + var html = $.common.sprintf("<label class='check-box'><input type='checkbox' name='columns[%s].isInsert' value='1' %s></label>", index, isCheck);
  377 + return html;
  378 + }
  379 + },
  380 + {
  381 + field: 'manuallyBuildLPN',
  382 + title: '人工组盘',
  383 + formatter: function (value, row, index) {
  384 + var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
  385 + return html;
  386 + }
  387 + },
  388 + {
  389 + field: 'locationRule',
  390 + title: '定位规则',
  391 + formatter: function (value, row, index) {
  392 + var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
  393 + return html;
  394 + }
  395 + },
  396 + {
  397 + field: 'listingRules',
  398 + title: '上架规则',
  399 + formatter: function (value, row, index) {
  400 + var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
  401 + return html;
  402 + }
  403 + },
  404 + {
  405 + field: 'emptyLocRule',
  406 + title: '空库位规则',
  407 + formatter: function (value, row, index) {
  408 + var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
  409 + return html;
  410 + }
  411 + },
  412 + {
  413 + field: 'checkinByPiece',
  414 + title: 'RF逐件收货',
  415 + formatter: function (value, row, index) {
  416 + var isCheck = value == 1 ? 'checked' : '';
  417 + var html = $.common.sprintf("<label class='check-box'><input type='checkbox' name='columns[%s].isInsert' value='1' %s></label>", index, isCheck);
  418 + return html;
  419 + }
  420 + },
  421 + {
  422 + field: 'pieceConfirm',
  423 + title: 'RF自动提交收货',
  424 + formatter: function (value, row, index) {
  425 + var isCheck = value == 1 ? 'checked' : '';
  426 + var html = $.common.sprintf("<label class='check-box'><input type='checkbox' name='columns[%s].isInsert' value='1' %s></label>", index, isCheck);
  427 + return html;
  428 + }
  429 + },
  430 + {
  431 + field: 'abcClass',
  432 + title: 'abc分类',
  433 + formatter: function (value, row, index) {
  434 + var isCheck = value == 1 ? 'checked' : '';
  435 + var html = $.common.sprintf("<label class='check-box'><input type='checkbox' name='columns[%s].isInsert' value='1' %s></label>", index, isCheck);
  436 + return html;
  437 + }
  438 + },
  439 + {
  440 + field: 'daysToExpire',
  441 + title: '保质期',
  442 + formatter: function (value, row, index) {
  443 + var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
  444 + return html;
  445 + }
  446 + },
  447 + {
  448 + field: 'expiringDays',
  449 + title: '临期预警',
  450 + formatter: function (value, row, index) {
  451 + var isCheck = value == 1 ? 'checked' : '';
  452 + var html = $.common.sprintf("<label class='check-box'><input type='checkbox' name='columns[%s].isInsert' value='1' %s></label>", index, isCheck);
  453 + return html;
  454 + }
  455 + },
  456 + {
  457 + field: 'minShelfLifeDays',
  458 + title: '收货预警(天)',
  459 + formatter: function (value, row, index) {
  460 + var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
  461 + return html;
  462 + }
  463 + },
  464 + {
  465 + field: 'allowQuickPutaway',
  466 + title: 'RF快速上架',
  467 + formatter: function (value, row, index) {
  468 + var isCheck = value == 1 ? 'checked' : '';
  469 + var html = $.common.sprintf("<label class='check-box'><input type='checkbox' name='columns[%s].isInsert' value='1' %s></label>", index, isCheck);
  470 + return html;
  471 + }
  472 + },
  473 + {
  474 + field: 'attributeTemplateCode',
  475 + title: '属性模板',
  476 + formatter: function (value, row, index) {
  477 + var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
  478 + return html;
  479 + }
  480 + },
  481 + {
  482 + field: 'useQuickCheckIn',
  483 + title: '快速入库',
  484 + formatter: function (value, row, index) {
  485 + var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
  486 + return html;
  487 + }
  488 + },
  489 + {
  490 + field: 'created',
  491 + title: '创建时间'
  492 + },
  493 + {
  494 + field: 'createdBy',
  495 + title: '创建用户',
  496 + formatter: function (value, row, index) {
  497 + var html = $.common.sprintf("<input class='form-control' type='text' name='columns[%s].columnComment' value='%s'>", index, $.common.nullToStr(value));
  498 + return html;
  499 + }
  500 + },
  501 + {
  502 + field: 'lastUpdated',
  503 + title: '更新用户',
  504 + formatter: function (value, row, index) {
  505 + var isCheck = value == 1 ? 'checked' : '';
  506 + var html = $.common.sprintf("<label class='check-box'><input type='checkbox' name='columns[%s].isInsert' value='1' %s></label>", index, isCheck);
  507 + return html;
  508 + }
  509 + },
  510 + {
  511 + title: '操作',
  512 + align: 'center',
  513 + formatter: function (value, row, index) {
  514 + var actions = [];
  515 + actions.push('<a class="btn btn-success btn-xs' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')" ><i class="fa fa-edit"></i>编辑</a> ');
  516 + actions.push('<a class="btn btn-danger btn-xs' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')" ><i class="fa fa-trash-o"></i>删除</a>');
  517 + return actions.join('');
  518 + }
  519 + }]
  520 + };
  521 + $.table.init(options);
  522 +
  523 + let a =$(".box2 ul li:gt(3):not(:last)");
  524 + a.hide();
  525 + $(".boxdown").click(function(){
  526 + if(a.is(':visible')){
  527 + a.slideUp('fast');
  528 + $(this).removeClass('up');
  529 + }else{
  530 + a.slideDown('fast').show();
  531 + $(this).addClass('up');
  532 + }
  533 + });
  534 +
  535 +
  536 + $.ajax({
  537 + url: "../getWarehouseByUserCode",
  538 + type: 'post',
  539 + dataType: "json",
  540 + data: {
  541 + username: [[${@permission.getPrincipalProperty('id')}]]
  542 + },
  543 + success: function (value) {
  544 + // console.log(value.data);
  545 + $("#warehouse").contents().remove();
  546 + if (value != null && value.data.length >= 1)
  547 + for (var i = 0; i < value.data.length; i++) {
  548 + $('<option value=' + value.data[i].id + ' code=' + value.data[i].code + '>' + value.data[i].name + '</option>').appendTo('#warehouse');
  549 + }
  550 + }
  551 + })
  552 +
  553 + });
  554 +
  555 +</script>
  556 +<script type="text/javascript">
  557 + function test(obj){
  558 + var div1=document.getElementById("div2");
  559 + if(div1.style.display=="block"){
  560 + div1.style.display="none";
  561 + obj.src="../img/down.png";
  562 + }else{
  563 + div1.style.display="block";
  564 + obj.src="../img/up.png";
  565 + }
  566 + }
  567 +</script>
278 568 </body>
279   -</html>
280 569 \ No newline at end of file
  570 +</html>
... ...
src/main/resources/templates/shipment/shipmentHeader/shipmentHeader.html
... ... @@ -10,10 +10,11 @@
10 10 }
11 11  
12 12  
13   - .bg-orange{
  13 + .bg-orange {
14 14 background: #BEBEBE;
15 15 }
16   - .bg-blue{
  16 +
  17 + .bg-blue {
17 18 }
18 19 </style>
19 20 <body class="gray-bg">
... ... @@ -35,7 +36,8 @@
35 36 </li>
36 37 <li>
37 38 <!--入库类型:<input type="text" name="sourceCode"/>-->
38   - 出库类型:<select name="shipmentType" th:with="shipmentType=${@ShipmentTypeService.getType()}">
  39 + 出库类型:<select name="shipmentType"
  40 + th:with="shipmentType=${@ShipmentTypeService.getType()}">
39 41 <option value="">所有</option>
40 42 <option th:each="e : ${shipmentType}" th:text="${e['name']}"
41 43 th:value="${e['code']}"></option>
... ... @@ -43,9 +45,12 @@
43 45 </li>
44 46 <li>
45 47 货主:
46   - <select id="companyCode" name="companyCode" th:with="list=${@companyService.getCode()}">
  48 + <select id="companyCode" name="companyCode"
  49 + th:with="list=${@companyService.getCode()}">
47 50 <option value="">所有</option>
48   - <option th:each="item : ${list}" th:text="${item['name']}" th:value="${item['code']}" th:attr = " code = ${item['code']}"></option>
  51 + <option th:each="item : ${list}" th:text="${item['name']}"
  52 + th:value="${item['code']}"
  53 + th:attr=" code = ${item['code']}"></option>
49 54 </select>
50 55 </li>
51 56 <li>
... ... @@ -86,7 +91,8 @@
86 91 <li>
87 92 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
88 93 class="fa fa-search"></i>&nbsp;搜索</a>
89   - <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('receiptHeader-form')"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  94 + <a class="btn btn-warning btn-rounded btn-sm"
  95 + onclick="$.form.reset('receiptHeader-form')"><i class="fa fa-refresh"></i>&nbsp;重置</a>
90 96 <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="receipt:receiptHeader:export"><i class="fa fa-download"></i>&nbsp;导出</a>-->
91 97 </li>
92 98 </ul>
... ... @@ -111,14 +117,15 @@
111 117 <i class="fa fa-plus"></i> 加入波次
112 118 </a>
113 119 </div>
114   - <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover text-nowrap"></table>
  120 + <table id="bootstrap-table" data-mobile-responsive="true"
  121 + class="table table-bordered table-hover text-nowrap"></table>
115 122 </div>
116 123 <div class="tab-pane fade" id="tabDetail">
117 124 <div class="col-sm-12 select-info">
118   - <form id = "shipmentHeadForm" >
  125 + <form id="shipmentHeadForm">
119 126 <ul id="tabHead" class="nav nav-tabs">
120 127 <li class="active"><a href="#tabBase" data-toggle="tab">基础数据</a></li>
121   - <li role="presentation" ><a href="#tabCustomer" data-toggle="tab">客户信息</a></li>
  128 + <li role="presentation"><a href="#tabCustomer" data-toggle="tab">客户信息</a></li>
122 129 <li><a href="#tabExcute" data-toggle="tab">执行信息</a></li>
123 130 <li><a href="#tabOther" data-toggle="tab">其他信息</a></li>
124 131 <li><a href="#tabSystem" data-toggle="tab">系统信息</a></li>
... ... @@ -127,19 +134,28 @@
127 134 <div class="tab-pane fade in active" id="tabBase">
128 135 <div class="select-list">
129 136 <ul>
130   - <li>出库单id:<input type="text" name="shipmentId" id="shipmentId"><li>
131   - <li>出库单号:<input type="text" name="shipmentCode" id="shipmentCode"></li>
132   - <input type="hidden" name="shipmentWarehouseId" id = "shipmentWarehouseId">
133   - <li>仓库编码:<input type="text" name="shipmentWarehouseCode" id="shipmentWarehouseCode"></li>
  137 + <li>出库单id:<input type="text" name="shipmentId" id="shipmentId">
  138 + <li>
  139 + <li>出库单号:<input type="text" name="shipmentCode" id="shipmentCode"></li>
  140 + <input type="hidden" name="shipmentWarehouseId" id="shipmentWarehouseId">
  141 + <li>仓库编码:<input type="text" name="shipmentWarehouseCode"
  142 + id="shipmentWarehouseCode"></li>
134 143 <input type="hidden" name="shipmentCompanyId" id="shipmentCompanyId">
135   - <li>货主:<input type="text" name="shipmentCompanyCode" id="shipmentCompanyCode"></li>
136   - <li>上游订单号:<input type="text" name="shipmentSourceCode" id="shipmentSourceCode"></li>
137   - <li>订单平台:<input type="text" name="shipmentSourcePlatform" id="shipmentSourcePlatform"></li>
138   - <li>出库单类型:<input type="text" name="shipmentType" id = "shipmentType"></li>
139   - <li>总数量:<input type="text" name="shipmentTotalQty" id="shipmentTotalQty"></li>
140   - <li>总行数:<input type="text" name="shipmentTotalLines" id="shipmentTotalLines"></li>
141   - <li>单据头状态:<input type="text" name="shipmentFirstStatus" id="shipmentFirstStatus"></li>
142   - <li>单据尾状态:<input type="text" name="shipmentLastStatus" id="shipmentLastStatus"></li>
  144 + <li>货主:<input type="text" name="shipmentCompanyCode"
  145 + id="shipmentCompanyCode"></li>
  146 + <li>上游订单号:<input type="text" name="shipmentSourceCode"
  147 + id="shipmentSourceCode"></li>
  148 + <li>订单平台:<input type="text" name="shipmentSourcePlatform"
  149 + id="shipmentSourcePlatform"></li>
  150 + <li>出库单类型:<input type="text" name="shipmentType" id="shipmentType"></li>
  151 + <li>总数量:<input type="text" name="shipmentTotalQty" id="shipmentTotalQty">
  152 + </li>
  153 + <li>总行数:<input type="text" name="shipmentTotalLines"
  154 + id="shipmentTotalLines"></li>
  155 + <li>单据头状态:<input type="text" name="shipmentFirstStatus"
  156 + id="shipmentFirstStatus"></li>
  157 + <li>单据尾状态:<input type="text" name="shipmentLastStatus"
  158 + id="shipmentLastStatus"></li>
143 159 </ul>
144 160 </div>
145 161 </div>
... ... @@ -153,7 +169,8 @@
153 169 <div class="tab-pane fade" id="tabExcute">
154 170 <div class="select-list">
155 171 <ul>
156   - <li>优先级:<input type="text" name="shipmentPriority" id="shipmentPriority"></li>
  172 + <li>优先级:<input type="text" name="shipmentPriority" id="shipmentPriority">
  173 + </li>
157 174 <li></li>
158 175 </ul>
159 176 </div>
... ... @@ -161,9 +178,12 @@
161 178 <div class="tab-pane fade" id="tabOther">
162 179 <div class="select-list">
163 180 <ul>
164   - <li>扩展属性1:<input type="text" name="shipmentUserDef1" id="shipmentUserDef1"></li>
165   - <li>扩展属性2:<input type="text" name="shipmentUserDef2" id="shipmentUserDef2"></li>
166   - <li>扩展属性3:<input type="text" name="shipmentUserDef3" id="shipmentUserDef3"></li>
  181 + <li>扩展属性1:<input type="text" name="shipmentUserDef1" id="shipmentUserDef1">
  182 + </li>
  183 + <li>扩展属性2:<input type="text" name="shipmentUserDef2" id="shipmentUserDef2">
  184 + </li>
  185 + <li>扩展属性3:<input type="text" name="shipmentUserDef3" id="shipmentUserDef3">
  186 + </li>
167 187  
168 188 </ul>
169 189 </div>
... ... @@ -171,11 +191,16 @@
171 191 <div class="tab-pane fade" id="tabSystem">
172 192 <div class="select-list">
173 193 <ul>
174   - <li>创建时间:<input type="text" name="shipmentCreated" id="shipmentCreated"></li>
175   - <li>创建用户:<input type="text" name="shipmentCreatedBy" id="shipmentCreatedBy"></li>
176   - <li>最后修改时间:<input type="text" name="shipmentLastUpdated" id="shipmentLastUpdated"></li>
177   - <li>更新用户:<input type="text" name=" shipmentLastUpdatedBy" id="shipmentLastUpdatedBy"></li>
178   - <li>是否删除:<input type="text" name="shipmentDeleted" id="shipmentDeleted"></li>
  194 + <li>创建时间:<input type="text" name="shipmentCreated" id="shipmentCreated">
  195 + </li>
  196 + <li>创建用户:<input type="text" name="shipmentCreatedBy" id="shipmentCreatedBy">
  197 + </li>
  198 + <li>最后修改时间:<input type="text" name="shipmentLastUpdated"
  199 + id="shipmentLastUpdated"></li>
  200 + <li>更新用户:<input type="text" name=" shipmentLastUpdatedBy"
  201 + id="shipmentLastUpdatedBy"></li>
  202 + <li>是否删除:<input type="text" name="shipmentDeleted" id="shipmentDeleted">
  203 + </li>
179 204 </ul>
180 205 </div>
181 206 </div>
... ... @@ -184,32 +209,42 @@
184 209 </div>
185 210 <div class="btn-group hidden-xs" id="toolbar-detail" role="group" style="padding:20px 0;">
186 211  
187   - <a class="btn btn-outline btn-success btn-rounded" onclick="add()" shiro:hasPermission="shipment:bill:add">
188   - <i class="fa fa-plus"></i> 新增
189   - </a>
190   - <a class="btn btn-outline btn-danger btn-rounded" onclick="batRemove()" shiro:hasPermission="shipment:bill:remove">
191   - <i class="fa fa-trash-o"></i> 删除
192   - </a>
193   - <a class="btn btn-outline btn-default btn-rounded" onclick="loadDetail()">
194   - <i class="fa fa-refresh"></i> 刷新
195   - </a>
196   - <a class="btn btn-outline btn-success btn-rounded" onclick="shipmentDetailPrint()" shiro:hasPermission="shipment:bill:report">
197   - <i class="fa fa-print"></i> 打印
198   - </a>
199   - <!--<a class="btn btn-outline btn-success btn-rounded" onclick="autoZone()" shiro:hasPermission="shipment:bill:add">-->
200   - <!--<i class="fa fa-plus"></i> 自动分配库区-->
201   - <!--</a>-->
202   - <!--<a class="btn btn-outline btn-success btn-rounded" onclick="addzone()" shiro:hasPermission="shipment:bill:add">-->
203   - <!--<i class="fa fa-plus"></i> 分配库区-->
204   - <!--</a>-->
205   - <a class="btn btn-outline btn-primary btn-rounded to-receive" onclick="Toshipping(false)" shiro:hasPermission="shipment:shippingCombination:combination">
206   - <i class="fa fa-hand-lizard-o"></i> 手动组盘
207   - </a>
208   - <a class="btn btn-outline btn-primary btn-rounded auto-shipment" onclick="Toshipping(true)" shiro:hasPermission="shipment:shippingCombination:combination">
209   - <i class="fa fa-code-fork"></i> 自动组盘
210   - </a>
211   - </div>
212   - <table id="bootstrap-table-detail" data-row-style="rowStyle" data-mobile-responsive="true" class="table table-bordered table-hover text-nowrap"></table>
  212 + <a class="btn btn-outline btn-success btn-rounded" onclick="add()"
  213 + shiro:hasPermission="shipment:bill:add">
  214 + <i class="fa fa-plus"></i> 新增
  215 + </a>
  216 + <a class="btn btn-outline btn-danger btn-rounded" onclick="batRemove()"
  217 + shiro:hasPermission="shipment:bill:remove">
  218 + <i class="fa fa-trash-o"></i> 删除
  219 + </a>
  220 + <a class="btn btn-outline btn-default btn-rounded" onclick="loadDetail()">
  221 + <i class="fa fa-refresh"></i> 刷新
  222 + </a>
  223 + <a class="btn btn-outline btn-success btn-rounded" onclick="shipmentDetailPrint()"
  224 + shiro:hasPermission="shipment:bill:report">
  225 + <i class="fa fa-print"></i> 打印
  226 + </a>
  227 + <!--<a class="btn btn-outline btn-success btn-rounded" onclick="autoZone()" shiro:hasPermission="shipment:bill:add">-->
  228 + <!--<i class="fa fa-plus"></i> 自动分配库区-->
  229 + <!--</a>-->
  230 + <!--<a class="btn btn-outline btn-success btn-rounded" onclick="addzone()" shiro:hasPermission="shipment:bill:add">-->
  231 + <!--<i class="fa fa-plus"></i> 分配库区-->
  232 + <!--</a>-->
  233 + <a class="btn btn-outline btn-primary btn-rounded to-receive" onclick="Toshipping(0)"
  234 + shiro:hasPermission="shipment:shippingCombination:combination">
  235 + <i class="fa fa-hand-lizard-o"></i> 手动组盘
  236 + </a>
  237 + <a class="btn btn-outline btn-primary btn-rounded auto-shipment" onclick="Toshipping(1)"
  238 + shiro:hasPermission="shipment:shippingCombination:combination">
  239 + <i class="fa fa-code-fork"></i> 自动组盘
  240 + </a>
  241 + <a class="btn btn-outline btn-primary btn-rounded auto-shipment-task" onclick="Toshipping(2)"
  242 + shiro:hasPermission="shipment:shippingCombination:combination">
  243 + <i class="fa fa-code-fork"></i> 自动组盘并生成任务
  244 + </a>
  245 + </div>
  246 + <table id="bootstrap-table-detail" data-row-style="rowStyle" data-mobile-responsive="true"
  247 + class="table table-bordered table-hover text-nowrap"></table>
213 248 </div>
214 249 </div>
215 250 </div>
... ... @@ -223,21 +258,21 @@
223 258 var prefix = ctx + "shipment/shipmentHeader";
224 259 var prefix_detail = ctx + "shipment/shipmentDetail";
225 260 var datas = [[${@dict.getType('sys_normal_disable')}]];
226   - var shipmentTypes=[[${@ShipmentTypeService.getType()}]];
227   - var company =[[${@companyService.getCode()}]];
228   - var customer =[[${@CustomerService.getCode()}]];
229   - var shipmentHeaderStatus=[[${@dict.getType('shipmentHeaderStatus')}]];
  261 + var shipmentTypes = [[${@ShipmentTypeService.getType()}]];
  262 + var company = [[${@companyService.getCode()}]];
  263 + var customer = [[${@CustomerService.getCode()}]];
  264 + var shipmentHeaderStatus = [[${@dict.getType('shipmentHeaderStatus')}]];
230 265 var stations = [[${@dict.getType('station')}]];
231   - var uploadStatus=[[${@dict.getType('uploadStatus')}]];
232   - var detailCreateUrl=prefix_detail+"/add";
233   - var detailRemoveUrl=prefix_detail+"/remove";
234   - var reviewUrl=prefix+"/review";
235   - var analysisUrl=prefix+"/analysis";
236   - var inventoryStatus=[[${@dict.getType('inventorySts')}]];
  266 + var uploadStatus = [[${@dict.getType('uploadStatus')}]];
  267 + var detailCreateUrl = prefix_detail + "/add";
  268 + var detailRemoveUrl = prefix_detail + "/remove";
  269 + var reviewUrl = prefix + "/review";
  270 + var analysisUrl = prefix + "/analysis";
  271 + var inventoryStatus = [[${@dict.getType('inventorySts')}]];
237 272 var rossDoccking = [[${@permission.hasPermi('shipment:bill:rossDoccking')}]];
238   - var rossDocckingUrl =prefix_detail+"/rossDoccking";
  273 + var rossDocckingUrl = prefix_detail + "/rossDoccking";
239 274 var shipmentId = "";
240   - var shipmentCode="";
  275 + var shipmentCode = "";
241 276  
242 277 $(function () {
243 278 var options = {
... ... @@ -251,31 +286,31 @@
251 286 search: false,
252 287 columns: [
253 288 {
254   - checkbox: true
255   - },
  289 + checkbox: true
  290 + },
256 291 {
257 292 field: 'id',
258 293 title: '出库单id',
259   - sortable:true
  294 + sortable: true
260 295 },
261 296 {
262 297 field: 'createdBy',
263 298 title: '创建用户',
264   - sortable:true
  299 + sortable: true
265 300 },
266 301 {
267 302 field: 'code',
268 303 title: '出库单号',
269   - sortable:true
  304 + sortable: true
270 305 },
271 306 {
272 307 field: 'companyCode',
273 308 title: '货主',
274 309 align: 'center',
275   - sortable:true,
276   - formatter: function(value, row, index) {
  310 + sortable: true,
  311 + formatter: function (value, row, index) {
277 312 var actions = [];
278   - $.each(company, function(index, dict) {
  313 + $.each(company, function (index, dict) {
279 314 if (dict.code == value) {
280 315 actions.push("<span class='badge badge-info'>" + dict.name + "</span>");
281 316 return false;
... ... @@ -287,22 +322,22 @@
287 322 {
288 323 field: 'referCode',
289 324 title: '上游订单号',
290   - sortable:true
  325 + sortable: true
291 326 },
292 327 {
293 328 field: 'referCodeType',
294 329 title: '上游订单内部号',
295   - sortable:true,
296   - visible:false
  330 + sortable: true,
  331 + visible: false
297 332 },
298 333 {
299 334 field: 'shipmentType',
300 335 title: '出库类型',
301 336 align: 'center',
302   - sortable:true,
303   - formatter: function(value, row, index) {
  337 + sortable: true,
  338 + formatter: function (value, row, index) {
304 339 var actions = [];
305   - $.each(shipmentTypes, function(index, dict) {
  340 + $.each(shipmentTypes, function (index, dict) {
306 341 if (dict.code == value) {
307 342 actions.push("<span class='badge badge-info'>" + dict.name + "</span>");
308 343 return false;
... ... @@ -315,9 +350,9 @@
315 350 field: 'customerCode',
316 351 title: '客户',
317 352 align: 'center',
318   - formatter: function(value, row, index) {
  353 + formatter: function (value, row, index) {
319 354 var actions = [];
320   - $.each(customer, function(index, dict) {
  355 + $.each(customer, function (index, dict) {
321 356 if (dict.code == value) {
322 357 actions.push("<span class='badge badge-info'>" + dict.name + "</span>");
323 358 return false;
... ... @@ -329,17 +364,17 @@
329 364 {
330 365 field: 'priority',
331 366 title: '优先级',
332   - visible:false
  367 + visible: false
333 368 },
334 369 {
335 370 field: 'route',
336 371 title: '路线',
337   - visible:false,
338   - sortable:true
  372 + visible: false,
  373 + sortable: true
339 374 },
340 375 {
341   - field: 'waveId',
342   - title: '波次号'
  376 + field: 'waveId',
  377 + title: '波次号'
343 378 },
344 379 {
345 380 field: 'totalQty',
... ... @@ -352,18 +387,18 @@
352 387 {
353 388 field: 'firstStatus',
354 389 title: '头状态',
355   - formatter: function(value, row, index) {
  390 + formatter: function (value, row, index) {
356 391 return $.table.selectDictLabel(shipmentHeaderStatus, value);
357 392 },
358   - sortable:true
  393 + sortable: true
359 394 },
360 395 {
361 396 field: 'lastStatus',
362 397 title: '尾状态',
363   - formatter: function(value, row, index) {
  398 + formatter: function (value, row, index) {
364 399 return $.table.selectDictLabel(shipmentHeaderStatus, value);
365 400 },
366   - sortable:true
  401 + sortable: true
367 402 },
368 403 {
369 404 field: 'created',
... ... @@ -373,12 +408,12 @@
373 408 {
374 409 field: 'lastUpdated',
375 410 title: '最后修改时间',
376   - visible:false
  411 + visible: false
377 412 },
378 413 {
379 414 field: 'lastUpdatedBy',
380 415 title: '更新用户',
381   - visible:false
  416 + visible: false
382 417 },
383 418 {
384 419 title: '操作',
... ... @@ -386,8 +421,8 @@
386 421 formatter: function (value, row, index) {
387 422 var actions = [];
388 423 actions.push('<a id="table_edit" class="btn btn-success btn-xs ' + printFlag + '" href="#" onclick="receiptPrint(\'' + row.id + '\')"><i class="fa fa-print"></i>打印</a> ');
389   - // actions.push('<a class="btn btn-info btn-xs " href="#" onclick="detail(\'' + row.id + '\',\'' + row.code + '\')"><i class="fa fa-list-ul"></i>列表</a> ');
390   - if (row.firstStatus < 100){
  424 + // actions.push('<a class="btn btn-info btn-xs " href="#" onclick="detail(\'' + row.id + '\',\'' + row.code + '\')"><i class="fa fa-list-ul"></i>列表</a> ');
  425 + if (row.firstStatus < 100) {
391 426 actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
392 427 }
393 428 return actions.join('');
... ... @@ -441,12 +476,12 @@
441 476 {
442 477 field: 'batch',
443 478 title: '批次',
444   - visible:false
  479 + visible: false
445 480 },
446 481 {
447 482 field: 'lot',
448 483 title: '批号',
449   - visible:false
  484 + visible: false
450 485 },
451 486 {
452 487 field: 'projectNo',
... ... @@ -463,22 +498,22 @@
463 498 {
464 499 field: 'manufactureDate',
465 500 title: '生产日期',
466   - visible:false
  501 + visible: false
467 502 },
468 503 {
469 504 field: 'expirationDate',
470 505 title: '失效日期',
471   - visible:false
  506 + visible: false
472 507 },
473 508 {
474 509 field: 'agingDate',
475 510 title: '入库日期',
476   - visible:false
  511 + visible: false
477 512 },
478 513 {
479 514 field: 'inventorySts',
480 515 title: '库存状态',
481   - formatter: function(value, row, index) {
  516 + formatter: function (value, row, index) {
482 517 return $.table.selectDictLabel(inventoryStatus, value);
483 518 },
484 519 },
... ... @@ -495,18 +530,18 @@
495 530 title: '已出数量'
496 531 },
497 532 {
498   - field : 'inventoryQty',
499   - title : '库存数量'
  533 + field: 'inventoryQty',
  534 + title: '库存数量'
500 535 },
501 536 {
502   - field : 'materialUnit',
503   - title : '物料单位'
  537 + field: 'materialUnit',
  538 + title: '物料单位'
504 539 },
505 540 {
506   - field : 'status',
507   - title : '明细状态',
  541 + field: 'status',
  542 + title: '明细状态',
508 543 align: 'center',
509   - formatter: function(value, row, index) {
  544 + formatter: function (value, row, index) {
510 545 return $.table.selectDictLabel(shipmentHeaderStatus, value);
511 546 }
512 547 },
... ... @@ -542,8 +577,7 @@
542 577 );
543 578  
544 579  
545   -
546   - function submit(url, type, dataType, data,content) {
  580 + function submit(url, type, dataType, data, content) {
547 581 $.modal.loading("正在处理中,请稍后...");
548 582 var config = {
549 583 url: url,
... ... @@ -551,22 +585,20 @@
551 585 dataType: dataType,
552 586 data: data,
553 587 contentType: content,
554   - success: function(result) {
  588 + success: function (result) {
555 589 if (result.code == web_status.SUCCESS) {
556 590 if (result.data !== null) {
557 591 layer.open({
558 592 title: ''
559   - ,content: result.data,
560   - closeBtn:false
  593 + , content: result.data,
  594 + closeBtn: false
561 595 });
562 596 $("body").focus();
563   - }
564   - else {
  597 + } else {
565 598 $.modal.msg(result.msg);
566 599 }
567 600  
568   - }
569   - else {
  601 + } else {
570 602 $.modal.alertError(result.msg);
571 603 }
572 604 $("#list-btn").click();
... ... @@ -577,12 +609,10 @@
577 609 }
578 610  
579 611  
580   -
581   -
582 612 /*入库单列表-详细*/
583 613 function detail(id, code) {
584 614 shipmentId = id;
585   - shipmentCode=code;
  615 + shipmentCode = code;
586 616 $("#myTab li").removeClass("active");
587 617 $("#tabHeader").removeClass("in active");
588 618 $("#myTab li:eq(1)").addClass("active");
... ... @@ -594,22 +624,22 @@
594 624 /** 载入明细 */
595 625 function loadDetail() {
596 626 $.ajax({
597   - url:ctx + 'shipment/shipmentDetail/list',
  627 + url: ctx + 'shipment/shipmentDetail/list',
598 628 type: 'post',
599   - data:{
600   - shipmentId:shipmentId
  629 + data: {
  630 + shipmentId: shipmentId
601 631 },
602   - success : function (value) {
603   - $("#bootstrap-table-detail").bootstrapTable('load',value.data);
  632 + success: function (value) {
  633 + $("#bootstrap-table-detail").bootstrapTable('load', value.data);
604 634 }
605 635 })
606 636 $.ajax({
607   - url:"shipmentHeader/getShipmentHeader",
608   - type:"post",
609   - data:{
610   - id:shipmentId
  637 + url: "shipmentHeader/getShipmentHeader",
  638 + type: "post",
  639 + data: {
  640 + id: shipmentId
611 641 },
612   - success:function (value) {
  642 + success: function (value) {
613 643 $('#shipmentId').val(value.data.id);
614 644 $('#shipmentCode').val(value.data.code);
615 645 $('#shipmentWarehouseCode').val(value.data.warehouseCode);
... ... @@ -620,19 +650,24 @@
620 650 $('#shipmentPriority').val(value.data.priority);
621 651 $('#shipmentTotalQty').val(value.data.totalQty);
622 652 $('#shipmentTotalLines').val(value.data.totalLines);
623   - $('#shipmentFirstStatus').val(shipmentHeaderStatus.filter(function(a){return a.dictValue==value.data.firstStatus})[0].dictLabel);
624   - $('#shipmentLastStatus').val(shipmentHeaderStatus.filter(function(a){return a.dictValue==value.data.lastStatus})[0].dictLabel);
  653 + $('#shipmentFirstStatus').val(shipmentHeaderStatus.filter(function (a) {
  654 + return a.dictValue == value.data.firstStatus
  655 + })[0].dictLabel);
  656 + $('#shipmentLastStatus').val(shipmentHeaderStatus.filter(function (a) {
  657 + return a.dictValue == value.data.lastStatus
  658 + })[0].dictLabel);
625 659 $('#shipmentCreated').val(value.data.created);
626 660 $('#shipmentCreatedBy').val(value.data.createdBy);
627 661 $('#shipmentLastUpdated').val(value.data.lastUpdated);
628 662 $('#shipmentLastUpdatedBy').val(value.data.lastUpdatedBy);
629 663 //$('#shipmentEnable').val(value.data.enable);
630 664 //$('#shipmentDeleted').val(value.data.deleted);
631   - if(value.data.deleted==false){
  665 + if (value.data.deleted == false) {
632 666 $('#shipmentDeleted').val('否')
633   - }else{
  667 + } else {
634 668 $('#shipmentDeleted').val('是')
635   - };
  669 + }
  670 + ;
636 671 $('#shipmentUserDef1').val(value.data.userDef1);
637 672 $('#shipmentUserDef2').val(value.data.userDef2);
638 673 $('#shipmentUserDef3').val(value.data.userDef3);
... ... @@ -645,106 +680,115 @@
645 680 /* 添加主单据 */
646 681 function add() {
647 682 if (shipmentId == '') {
648   - $.modal.open("未选择出库单" , "404.html");
649   - }
650   - else {
651   - var url = detailCreateUrl + "?shipmentId=" + $('#shipmentId').val()
652   - + "&shipmentCode=" + $('#shipmentCode').val()
653   - + "&companyId=" + $('#shipmentCompanyId').val()
654   - + "&companyCode=" + $('#shipmentCompanyCode').val();
655   - + "&sourceCode=" + $('#shipmentSourceCode').val();
656   - $.modal.open("添加" , url);
  683 + $.modal.open("未选择出库单", "404.html");
  684 + } else {
  685 + var url = detailCreateUrl + "?shipmentId=" + $('#shipmentId').val()
  686 + + "&shipmentCode=" + $('#shipmentCode').val()
  687 + + "&companyId=" + $('#shipmentCompanyId').val()
  688 + + "&companyCode=" + $('#shipmentCompanyCode').val();
  689 + +"&sourceCode=" + $('#shipmentSourceCode').val();
  690 + $.modal.open("添加", url);
657 691 }
658 692 }
659 693  
660 694 /* 打印 */
661 695 function receiptPrint(id) {
662 696 var url = prefix + "/report/" + id;
663   - $.modal.open("出库单打印" , url);
  697 + $.modal.open("出库单打印", url);
664 698 }
665 699  
666 700 /* 编辑明细单据 */
667 701 function edit(id) {
668 702 if (shipmentId == '') {
669   - $.modal.open("未选择出库单" , "404.html");
670   - }
671   - else {
672   - var url = prefix_detail + "/edit/" + id ;
673   - $.modal.open("编辑明细" , url);
  703 + $.modal.open("未选择出库单", "404.html");
  704 + } else {
  705 + var url = prefix_detail + "/edit/" + id;
  706 + $.modal.open("编辑明细", url);
674 707 }
675 708 }
676 709  
677 710 /* 单个删除 */
678 711 function remove(id) {
679   - $.modal.confirm("确定删除该条出库单明细信息吗?", function() {
  712 + $.modal.confirm("确定删除该条出库单明细信息吗?", function () {
680 713 var url = $.common.isEmpty(id) ? detailRemoveUrl : detailRemoveUrl.replace("{id}", id);
681   - var data = { "ids": id };
  714 + var data = {"ids": id};
682 715 localSubmit(url, "post", "json", data);
683 716 });
684 717 }
685 718  
686 719 /* 批量删除 */
687 720 function batRemove() {
688   - var rows=$("#bootstrap-table-detail").bootstrapTable('getSelections');
  721 + var rows = $("#bootstrap-table-detail").bootstrapTable('getSelections');
689 722 // console.log(rows);
690 723 // var rows = $.common.isEmpty($.table._option.id) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.id);
691 724 if (rows.length == 0) {
692 725 $.modal.alertWarning("请至少选择一条记录");
693 726 return;
694 727 }
695   - $.modal.confirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
  728 + $.modal.confirm("确认要删除选中的" + rows.length + "条数据吗?", function () {
696 729 var url = detailRemoveUrl;
697   - var data = { "ids": rows.map(function(v){return v.id;}).join(',') };
  730 + var data = {
  731 + "ids": rows.map(function (v) {
  732 + return v.id;
  733 + }).join(',')
  734 + };
698 735 localSubmit(url, "post", "json", data);
699 736 });
700 737 }
701 738  
702 739 /* 订单审核 */
703 740 function review() {
704   - var rows=$("#bootstrap-table").bootstrapTable('getSelections');
  741 + var rows = $("#bootstrap-table").bootstrapTable('getSelections');
705 742 if (rows.length == 0) {
706 743 $.modal.alertWarning("请至少选择一条记录");
707 744 return;
708 745 }
709   - var url = reviewUrl;
710   - var data = { "ids": rows.map(function(v){return v.id;}).join(',') };
  746 + var url = reviewUrl;
  747 + var data = {
  748 + "ids": rows.map(function (v) {
  749 + return v.id;
  750 + }).join(',')
  751 + };
711 752 localHeaderSubmit(url, "post", "json", data);
712 753  
713 754 }
714 755  
715 756  
716   -
717 757 //子单打印
718 758 function shipmentDetailPrint() {
719   - let rows=$("#bootstrap-table-detail").bootstrapTable('getSelections');
  759 + let rows = $("#bootstrap-table-detail").bootstrapTable('getSelections');
720 760 if (rows.length === 0) {
721 761 $.modal.alertWarning("请至少选择一条记录");
722 762 return;
723 763 }
724 764 let ids = "";
725   - for(let i=0; i<rows.length; i++) {
  765 + for (let i = 0; i < rows.length; i++) {
726 766 ids = ids + rows[i].id + ","
727 767 }
728 768  
729 769 let url = prefix_detail + "/report/" + ids;
730   - $.modal.open("出库单铭牌打印" , url);
  770 + $.modal.open("出库单铭牌打印", url);
731 771 }
732 772  
733 773 /* 订单分析 */
734 774 function analysis() {
735   - var rows=$("#bootstrap-table").bootstrapTable('getSelections');
  775 + var rows = $("#bootstrap-table").bootstrapTable('getSelections');
736 776 if (rows.length == 0) {
737 777 $.modal.alertWarning("请至少选择一条记录");
738 778 return;
739 779 }
740   - $.modal.confirm("确认要分析选中的" + rows.length + "条数据吗?", function() {
  780 + $.modal.confirm("确认要分析选中的" + rows.length + "条数据吗?", function () {
741 781 var url = detailanalysisUrl;
742   - var data = { "ids": rows.map(function(v){return v.id;}).join(',') };
  782 + var data = {
  783 + "ids": rows.map(function (v) {
  784 + return v.id;
  785 + }).join(',')
  786 + };
743 787 localHeaderSubmit(url, "post", "json", data);
744 788 });
745 789 }
746 790  
747   - function localSubmit (url, type, dataType, data) {
  791 + function localSubmit(url, type, dataType, data) {
748 792 $.modal.loading("正在处理中,请稍后...");
749 793 var config = {
750 794 url: url, type: type, dataType: dataType, data: data, success: function (result) {
... ... @@ -760,7 +804,7 @@
760 804 $.ajax(config)
761 805 }
762 806  
763   - function localHeaderSubmit (url, type, dataType, data) {
  807 + function localHeaderSubmit(url, type, dataType, data) {
764 808 $.modal.loading("正在处理中,请稍后...");
765 809 var config = {
766 810 url: url, type: type, dataType: dataType, data: data, success: function (result) {
... ... @@ -777,37 +821,40 @@
777 821 }
778 822  
779 823 /* 出库组盘 */
780   - function Toshipping(auto) {
781   - let storage=window.localStorage;
782   - storage.shipmentCode=shipmentCode;
  824 + function Toshipping(flag) {
  825 + let storage = window.localStorage;
  826 + storage.shipmentCode = shipmentCode;
783 827 let url = ctx + "shipment/shippingCombination";
784   - if(auto){
785   - storage.auto = auto;
  828 + if (flag == 2) {
  829 + storage.auto = flag;
786 830 createMenuItem(url, "出库自动组盘");
787 831 parent.$('.tabReload').click();
788   - }
789   - else{
  832 + } else if (flag == 0) {
790 833 $.ajax({
791 834 url: ctx + "shipment/shipmentDetail/shippingCombination",
792 835 type: 'post',
793   - data:{
  836 + data: {
794 837 shipmentCode
795 838 },
796   - success: function(res) {
  839 + success: function (res) {
797 840 if (res.code === 200) {
798 841 createMenuItem(url, "出库组盘");
799 842 parent.$('.tabReload').click();
800   - }
801   - else {
  843 + } else {
802 844 $.modal.alert(res.msg)
803 845 }
804 846 }
805 847 });
  848 + }else if(flag == 1){
  849 + storage.auto = flag;
  850 + createMenuItem(url, "出库自动组盘");
  851 + parent.$('.tabReload').click();
806 852 }
807 853 }
  854 +
808 855 /* 点击明细面板 */
809 856 $("#myTab li:eq(1)").click(function () {
810   - if (shipmentId == ''|| shipmentCode == '') {
  857 + if (shipmentId == '' || shipmentCode == '') {
811 858 shipmentId = $("#bootstrap-table tr:eq(1) td:eq(1)").text();
812 859 shipmentCode = $("#bootstrap-table tr:eq(1) td:eq(2)").text();
813 860 }
... ... @@ -818,27 +865,26 @@
818 865 $("#myTab li:eq(0)").click(function () {
819 866 $.ajax({
820 867 url: prefix + "/list",
821   - type:"post",
822   - success:function (value) {
  868 + type: "post",
  869 + success: function (value) {
823 870 $("#bootstrap-table").bootstrapTable('refresh', value.data);
824 871 }
825 872 })
826 873 });
827 874  
828 875 function wave() {
829   - let url=prefix+'/wave?ids=';
830   - let rows=$("#bootstrap-table").bootstrapTable('getSelections');
  876 + let url = prefix + '/wave?ids=';
  877 + let rows = $("#bootstrap-table").bootstrapTable('getSelections');
831 878 if (rows.length === 0) {
832 879 $.modal.msgWarning("请至少选择一条记录");
833   - }
834   - else {
  880 + } else {
835 881 let ids = "";
836   - for(let i=0; i<rows.length; i++) {
  882 + for (let i = 0; i < rows.length; i++) {
837 883 ids = ids + rows[i].id + ","
838 884 }
839   - ids = ids.substring(0, ids.length-1);
840   - url=url+ids;
841   - $.modal.open("加入波次",url,800,250)
  885 + ids = ids.substring(0, ids.length - 1);
  886 + url = url + ids;
  887 + $.modal.open("加入波次", url, 800, 250)
842 888 }
843 889 }
844 890  
... ... @@ -884,4 +930,4 @@
884 930  
885 931 </script>
886 932 </body>
887   -</html>
888 933 \ No newline at end of file
  934 +</html>
... ...
src/main/resources/templates/shipment/shippingCombination/shippingCombination.html
... ... @@ -301,14 +301,20 @@
301 301 let auto = localStorage.getItem("auto");
302 302 let shipmentCode = localStorage.getItem("shipmentCode");
303 303 $("#code").val(shipmentCode);
304   - if (auto == "true") {
305   - let url = prefix + "/autoCombination";
  304 + if (auto == 2) {
  305 + let url = prefix + "/autoCombinationAndCreateTask";
306 306 let type = "post";
307 307 let dataType = "json";
308 308 let data = {"shipmentCode" : shipmentCode};
309 309 submit(url,type,dataType, data);
310 310 }
311   - else{
  311 + else if (auto == 1){
  312 + let url = prefix + "/autoCombination";
  313 + let type = "post";
  314 + let dataType = "json";
  315 + let data = {"shipmentCode" : shipmentCode};
  316 + submit(url,type,dataType, data);
  317 + }else {
312 318 $("#list-btn").click();
313 319 }
314 320 localStorage.removeItem("shipmentCode");
... ... @@ -326,4 +332,4 @@
326 332  
327 333 </script>
328 334 </body>
329   -</html>
330 335 \ No newline at end of file
  336 +</html>
... ...
src/main/resources/templates/system/config/config.html
... ... @@ -3,7 +3,7 @@
3 3 <meta charset="utf-8">
4 4 <head th:include="include :: header"></head>
5 5 <body class="gray-bg">
6   -
  6 +
7 7 <div class="container-div">
8 8 <div class="row">
9 9 <div class="col-sm-12 select-info">
... ... @@ -37,7 +37,7 @@
37 37 </div>
38 38 </form>
39 39 </div>
40   -
  40 +
41 41 <div class="btn-group hidden-xs" id="toolbar" role="group">
42 42 <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="system:config:add">
43 43 <i class="fa fa-plus"></i> 新增
... ... @@ -116,4 +116,4 @@
116 116 });
117 117 </script>
118 118 </body>
119   -</html>
120 119 \ No newline at end of file
  120 +</html>
... ...
src/main/resources/templates/system/dict/data/edit.html
... ... @@ -33,7 +33,7 @@
33 33 <div class="form-group">
34 34 <label class="col-sm-3 control-label">回显样式:</label>
35 35 <div class="col-sm-8">
36   - <select name="listClass" class="form-control m-b" th:field="*{listclass}">
  36 + <select name="listClass" class="form-control m-b" th:field="*{listClass}">
37 37 <option value="">---请选择---</option>
38 38 <option value="default">默认</option>
39 39 <option value="primary">主要</option>
... ... @@ -74,7 +74,7 @@
74 74 <input id="remark" name="remark" class="form-control" type="text" th:field="*{remark}">
75 75 </div>
76 76 </div>
77   -
  77 +
78 78 <div class="form-group">
79 79 <div class="form-control-static col-sm-offset-9">
80 80 <button type="submit" class="btn btn-primary">提交</button>
... ... @@ -86,7 +86,7 @@
86 86 <div th:include="include::footer"></div>
87 87 <script type="text/javascript">
88 88 var prefix = ctx + "system/dict/data"
89   -
  89 +
90 90 $("#form-dict-edit").validate({
91 91 rules:{
92 92 dictLabel:{
... ...
src/main/resources/templates/system/user/add.html
... ... @@ -89,7 +89,7 @@
89 89 </label>
90 90 </div>
91 91 </div>
92   -
  92 +
93 93 <div class="form-group">
94 94 <div class="form-control-static col-sm-offset-9">
95 95 <button type="submit" class="btn btn-primary">提交</button>
... ...