Commit 859ce7002877085a11a5fd3e92f3f1f8c8629635

Authored by mahuandong
1 parent b9abda20

添加承运商

.idea/workspace.xml
@@ -2,19 +2,13 @@ @@ -2,19 +2,13 @@
2 <project version="4"> 2 <project version="4">
3 <component name="ChangeListManager"> 3 <component name="ChangeListManager">
4 <list default="true" id="9ff7b25e-dc1a-4859-8a0c-00039489e359" name="Default Changelist" comment=""> 4 <list default="true" id="9ff7b25e-dc1a-4859-8a0c-00039489e359" name="Default Changelist" comment="">
5 - <change afterPath="$PROJECT_DIR$/src/main/resources/templates/general/bomDetail/add.html" afterDir="false" />  
6 - <change afterPath="$PROJECT_DIR$/src/main/resources/templates/general/bomDetail/bomDetail.html" afterDir="false" />  
7 - <change afterPath="$PROJECT_DIR$/src/main/resources/templates/general/bomDetail/edit.html" afterDir="false" />  
8 - <change afterPath="$PROJECT_DIR$/src/main/resources/templates/general/bomHeader/add.html" afterDir="false" />  
9 - <change afterPath="$PROJECT_DIR$/src/main/resources/templates/general/bomHeader/edit.html" afterDir="false" /> 5 + <change afterPath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/general/carrier/controller/CarrierController.java" afterDir="false" />
  6 + <change afterPath="$PROJECT_DIR$/src/main/resources/templates/general/carrier/add.html" afterDir="false" />
  7 + <change afterPath="$PROJECT_DIR$/src/main/resources/templates/general/carrier/carrier.html" afterDir="false" />
  8 + <change afterPath="$PROJECT_DIR$/src/main/resources/templates/general/carrier/edit.html" afterDir="false" />
10 <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> 9 <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
11 - <change beforePath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/config/locationType/service/LocationTypeService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/config/locationType/service/LocationTypeService.java" afterDir="false" />  
12 - <change beforePath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/config/locationType/service/LocationTypeServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/config/locationType/service/LocationTypeServiceImpl.java" afterDir="false" />  
13 - <change beforePath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/general/bom/controller/BomDetailController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/general/bom/controller/BomDetailController.java" afterDir="false" />  
14 - <change beforePath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/general/bom/controller/BomHeaderController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/general/bom/controller/BomHeaderController.java" afterDir="false" />  
15 - <change beforePath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/general/location/service/LocationServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/general/location/service/LocationServiceImpl.java" afterDir="false" />  
16 - <change beforePath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/general/material/controller/MaterialController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/general/material/controller/MaterialController.java" afterDir="false" />  
17 - <change beforePath="$PROJECT_DIR$/src/main/resources/templates/general/bomHeader/bomHeader.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/general/bomHeader/bomHeader.html" afterDir="false" /> 10 + <change beforePath="$PROJECT_DIR$/src/main/resources/templates/general/company/add.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/general/company/add.html" afterDir="false" />
  11 + <change beforePath="$PROJECT_DIR$/src/main/resources/templates/general/company/edit.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/general/company/edit.html" afterDir="false" />
18 </list> 12 </list>
19 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> 13 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
20 <option name="SHOW_DIALOG" value="false" /> 14 <option name="SHOW_DIALOG" value="false" />
@@ -54,7 +48,7 @@ @@ -54,7 +48,7 @@
54 <item name="@172.16.29.45" type="feb32156:DbDataSourceImpl" /> 48 <item name="@172.16.29.45" type="feb32156:DbDataSourceImpl" />
55 <item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" /> 49 <item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
56 <item name="wms_v2: schema" type="76f4a085:MysqlImplModel$Schema" /> 50 <item name="wms_v2: schema" type="76f4a085:MysqlImplModel$Schema" />
57 - <item name="bom_detail: table" type="285a2a93:MysqlImplModel$Table" /> 51 + <item name="carrier: table" type="285a2a93:MysqlImplModel$Table" />
58 </path> 52 </path>
59 <path> 53 <path>
60 <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" /> 54 <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
@@ -69,6 +63,7 @@ @@ -69,6 +63,7 @@
69 <component name="FileTemplateManagerImpl"> 63 <component name="FileTemplateManagerImpl">
70 <option name="RECENT_TEMPLATES"> 64 <option name="RECENT_TEMPLATES">
71 <list> 65 <list>
  66 + <option value="FxmlFile" />
72 <option value="Class" /> 67 <option value="Class" />
73 <option value="HTML File" /> 68 <option value="HTML File" />
74 </list> 69 </list>
@@ -117,6 +112,7 @@ @@ -117,6 +112,7 @@
117 </component> 112 </component>
118 <component name="RecentsManager"> 113 <component name="RecentsManager">
119 <key name="MoveFile.RECENT_KEYS"> 114 <key name="MoveFile.RECENT_KEYS">
  115 + <recent name="E:\code\wms2\src\main\resources\templates\general\carrier" />
120 <recent name="E:\code\wms2\src\main\resources\mybatis\general" /> 116 <recent name="E:\code\wms2\src\main\resources\mybatis\general" />
121 <recent name="E:\code\wms2\src\main\resources\mybatis\config" /> 117 <recent name="E:\code\wms2\src\main\resources\mybatis\config" />
122 </key> 118 </key>
@@ -163,12 +159,7 @@ @@ -163,12 +159,7 @@
163 <serviceView> 159 <serviceView>
164 <option name="contentProportion" value="0.18875067" /> 160 <option name="contentProportion" value="0.18875067" />
165 <treeState> 161 <treeState>
166 - <expand>  
167 - <path>  
168 - <item name="services root" type="e789fda9:ObjectUtils$Sentinel" />  
169 - <item name="com.intellij.execution.services.ServiceModel$ServiceGroupNode@6299c693" type="7427dc5b:ServiceModel$ServiceGroupNode" />  
170 - </path>  
171 - </expand> 162 + <expand />
172 <select /> 163 <select />
173 </treeState> 164 </treeState>
174 </serviceView> 165 </serviceView>
@@ -195,7 +186,9 @@ @@ -195,7 +186,9 @@
195 <workItem from="1565587737758" duration="12961000" /> 186 <workItem from="1565587737758" duration="12961000" />
196 <workItem from="1565657307503" duration="115000" /> 187 <workItem from="1565657307503" duration="115000" />
197 <workItem from="1565657439247" duration="2447000" /> 188 <workItem from="1565657439247" duration="2447000" />
198 - <workItem from="1565662229227" duration="19207000" /> 189 + <workItem from="1565662229227" duration="20296000" />
  190 + <workItem from="1565691345079" duration="6000" />
  191 + <workItem from="1565743087352" duration="2122000" />
199 </task> 192 </task>
200 <task id="LOCAL-00001" summary="添加库位、库位类型增删改查接口"> 193 <task id="LOCAL-00001" summary="添加库位、库位类型增删改查接口">
201 <created>1565226427512</created> 194 <created>1565226427512</created>
@@ -267,7 +260,14 @@ @@ -267,7 +260,14 @@
267 <option name="project" value="LOCAL" /> 260 <option name="project" value="LOCAL" />
268 <updated>1565665525508</updated> 261 <updated>1565665525508</updated>
269 </task> 262 </task>
270 - <option name="localTasksCounter" value="11" /> 263 + <task id="LOCAL-00011" summary="添加商品、商品详情页面">
  264 + <created>1565686619774</created>
  265 + <option name="number" value="00011" />
  266 + <option name="presentableId" value="LOCAL-00011" />
  267 + <option name="project" value="LOCAL" />
  268 + <updated>1565686619774</updated>
  269 + </task>
  270 + <option name="localTasksCounter" value="12" />
271 <servers /> 271 <servers />
272 </component> 272 </component>
273 <component name="TypeScriptGeneratedFilesManager"> 273 <component name="TypeScriptGeneratedFilesManager">
@@ -311,7 +311,8 @@ @@ -311,7 +311,8 @@
311 <MESSAGE value="添加商品详情" /> 311 <MESSAGE value="添加商品详情" />
312 <MESSAGE value="添加物料时判断单位是否存在,不存在则添加物料单位" /> 312 <MESSAGE value="添加物料时判断单位是否存在,不存在则添加物料单位" />
313 <MESSAGE value="添加task实体类" /> 313 <MESSAGE value="添加task实体类" />
314 - <option name="LAST_COMMIT_MESSAGE" value="添加task实体类" /> 314 + <MESSAGE value="添加商品、商品详情页面" />
  315 + <option name="LAST_COMMIT_MESSAGE" value="添加商品、商品详情页面" />
315 </component> 316 </component>
316 <component name="XDebuggerManager"> 317 <component name="XDebuggerManager">
317 <breakpoint-manager> 318 <breakpoint-manager>
src/main/java/com/huaheng/pc/general/carrier/controller/CarrierController.java 0 → 100644
  1 +package com.huaheng.pc.general.carrier.controller;
  2 +
  3 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  4 +import com.baomidou.mybatisplus.core.metadata.IPage;
  5 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  6 +import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  7 +import com.huaheng.common.support.Convert;
  8 +import com.huaheng.common.utils.StringUtils;
  9 +import com.huaheng.common.utils.security.ShiroUtils;
  10 +import com.huaheng.framework.aspectj.lang.annotation.Log;
  11 +import com.huaheng.framework.aspectj.lang.constant.BusinessType;
  12 +import com.huaheng.framework.web.controller.BaseController;
  13 +import com.huaheng.framework.web.domain.AjaxResult;
  14 +import com.huaheng.framework.web.page.PageDomain;
  15 +import com.huaheng.framework.web.page.TableDataInfo;
  16 +import com.huaheng.framework.web.page.TableSupport;
  17 +import com.huaheng.pc.general.carrier.domain.Carrier;
  18 +import com.huaheng.pc.general.carrier.service.CarrierService;
  19 +import io.swagger.annotations.ApiOperation;
  20 +import io.swagger.annotations.ApiParam;
  21 +import org.apache.shiro.authz.annotation.RequiresPermissions;
  22 +import org.springframework.stereotype.Controller;
  23 +import org.springframework.ui.ModelMap;
  24 +import org.springframework.web.bind.annotation.*;
  25 +
  26 +import javax.annotation.Resource;
  27 +import java.util.ArrayList;
  28 +import java.util.List;
  29 +
  30 +/**
  31 + * 承运商
  32 + */
  33 +@Controller
  34 +@RequestMapping("/general/carrier")
  35 +public class CarrierController extends BaseController {
  36 +
  37 + private String prefix = "general/carrier";
  38 +
  39 + @Resource
  40 + private CarrierService carrierService;
  41 +
  42 + @RequiresPermissions("general:carrier:view")
  43 + @GetMapping()
  44 + public String bomHeader() {
  45 + return prefix + "/carrier";
  46 + }
  47 +
  48 + /**
  49 + * 查询承运商列表
  50 + */
  51 + @ApiOperation(value="查看承运商列表", notes="根据承运商编码、名称、创建时间获取承运商信息", httpMethod = "POST")
  52 + @RequiresPermissions("general:carrier:list")
  53 + @Log(title = "通用-承运商管理", operating = "查看承运商列表", action = BusinessType.GRANT)
  54 + @PostMapping("/list")
  55 + @ResponseBody
  56 + public TableDataInfo list(
  57 + @ApiParam(name="carrier",value="承运商编码、名称") Carrier carrier,
  58 + @ApiParam(name = "createdBegin", value = "起止时间") String createdBegin,
  59 + @ApiParam(name = "createdEnd", value = "结束时间") String createdEnd) {
  60 + LambdaQueryWrapper<Carrier> lambdaQueryWrapper = Wrappers.lambdaQuery();
  61 + PageDomain pageDomain = TableSupport.buildPageRequest();
  62 + Integer pageNum = pageDomain.getPageNum();
  63 + Integer pageSize = pageDomain.getPageSize();
  64 + lambdaQueryWrapper.gt(StringUtils.isNotEmpty(createdBegin), Carrier::getCreated, createdBegin)
  65 + .lt(StringUtils.isNotEmpty(createdEnd), Carrier::getCreated, createdEnd)
  66 + .eq(StringUtils.isNotEmpty(carrier.getCode()), Carrier::getCode, carrier.getCode())
  67 + .eq(StringUtils.isNotEmpty(carrier.getName()), Carrier::getName, carrier.getName())
  68 + .eq(Carrier::getWarehouseCode, ShiroUtils.getWarehouseCode());
  69 +
  70 + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){
  71 + /*使用分页查询*/
  72 + Page<Carrier> page = new Page<>(pageNum, pageSize);
  73 + IPage<Carrier> iPage = carrierService.page(page, lambdaQueryWrapper);
  74 + return getMpDataTable(iPage.getRecords(), iPage.getTotal());
  75 + } else {
  76 + List<Carrier> list = carrierService.list(lambdaQueryWrapper);
  77 + return getDataTable(list);
  78 + }
  79 + }
  80 +
  81 + /**
  82 + * 新增承运商
  83 + */
  84 + @GetMapping("/add")
  85 + public String add() {
  86 + return prefix + "/add";
  87 + }
  88 +
  89 + /**
  90 + * 新增保存承运商
  91 + */
  92 + @ApiOperation(value="新增承运商", notes="新增承运商", httpMethod = "POST")
  93 + @RequiresPermissions("general:carrier:add")
  94 + @Log(title = "通用-承运商", operating = "新增承运商", action = BusinessType.INSERT)
  95 + @PostMapping("/add")
  96 + @ResponseBody
  97 + public AjaxResult addSave(@ApiParam(name = "containerType", value = "承运商", required = true)
  98 + Carrier carrier) {
  99 + carrier.setWarehouseCode(ShiroUtils.getWarehouseCode());
  100 + carrier.setCreatedBy(ShiroUtils.getLoginName());
  101 + carrier.setLastUpdatedBy(ShiroUtils.getLoginName());
  102 + return toAjax(carrierService.save(carrier));
  103 + }
  104 +
  105 + /**
  106 + * 修改承运商
  107 + */
  108 + @GetMapping("/edit/{id}")
  109 + public String edit(@PathVariable("id") Integer id, ModelMap mmap) {
  110 + mmap.put("carrier", carrierService.getById(id));
  111 + return prefix + "/edit";
  112 + }
  113 +
  114 + /**
  115 + * 修改保存承运商
  116 + */
  117 + @ApiOperation(value="修改承运商", notes="修改承运商", httpMethod = "POST")
  118 + @RequiresPermissions("general:carrier:edit")
  119 + @Log(title = "通用-承运商", operating = "修改承运商", action = BusinessType.UPDATE)
  120 + @PostMapping("/edit")
  121 + @ResponseBody
  122 + public AjaxResult editSave(
  123 + @ApiParam(name = "carrier", value = "承运商", required = true)Carrier carrier) {
  124 + carrier.setLastUpdatedBy(ShiroUtils.getLoginName());
  125 + return toAjax(carrierService.updateById(carrier));
  126 + }
  127 +
  128 + /**
  129 + * 删除承运商
  130 + */
  131 + @ApiOperation(value="删除承运商", notes="根据id批量删除承运商,参数示例1,2,3", httpMethod = "POST")
  132 + @RequiresPermissions("general:carrier:remove")
  133 + @Log(title = "通用-承运商", operating = "删除承运商", action = BusinessType.DELETE)
  134 + @PostMapping( "/remove")
  135 + @ResponseBody
  136 + public AjaxResult remove(String ids) {
  137 + if (StringUtils.isEmpty(ids)){
  138 + return AjaxResult.error("id不能为空");
  139 + }
  140 + List<Integer> list = new ArrayList<>();
  141 + for (Integer id : Convert.toIntArray(ids)) {
  142 + list.add(id);
  143 + }
  144 + return toAjax(carrierService.removeByIds(list));
  145 + }
  146 +}
src/main/resources/templates/general/carrier/add.html 0 → 100644
  1 +<!DOCTYPE HTML>
  2 +<html lang="zh" xmlns:th="http://www.thymeleaf.org">
  3 +<meta charset="utf-8">
  4 +<head th:include="include :: header"></head>
  5 +<body class="white-bg">
  6 +<div class="wrapper wrapper-content animated fadeInRight ibox-content">
  7 + <form class="form-horizontal m" id="form-company-add">
  8 + <div class="form-group">
  9 + <label class="col-sm-3 control-label">编码:</label>
  10 + <div class="col-sm-8">
  11 + <input id="code" name="code" class="form-control" type="text">
  12 + </div>
  13 + </div>
  14 + <div class="form-group">
  15 + <label class="col-sm-3 control-label">名称:</label>
  16 + <div class="col-sm-8">
  17 + <input id="name" name="name" class="form-control" type="text">
  18 + </div>
  19 + </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>
  28 + <div class="form-group">
  29 + <label class="col-sm-3 control-label">运单获取地址url:</label>
  30 + <div class="col-sm-8">
  31 + <input id="waybillServerUrl" name="waybillServerUrl" class="form-control" type="text">
  32 + </div>
  33 + </div>
  34 +
  35 + <!--<div class="form-group">
  36 + <label class="col-sm-3 control-label">数据版本:</label>
  37 + <div class="col-sm-8">
  38 + <input id="version" name="version" class="form-control" type="text">
  39 + </div>
  40 + </div>-->
  41 +
  42 + <!--<div class="form-group"> -->
  43 + <!--<label class="col-sm-3 control-label">自定义字段1:</label>-->
  44 + <!--<div class="col-sm-8">-->
  45 + <!--<input id="userDef1" name="userDef1" class="form-control" type="text">-->
  46 + <!--</div>-->
  47 + <!--</div>-->
  48 + <!--<div class="form-group"> -->
  49 + <!--<label class="col-sm-3 control-label">自定义字段2:</label>-->
  50 + <!--<div class="col-sm-8">-->
  51 + <!--<input id="userDef2" name="userDef2" class="form-control" type="text">-->
  52 + <!--</div>-->
  53 + <!--</div>-->
  54 + <!--<div class="form-group"> -->
  55 + <!--<label class="col-sm-3 control-label">自定义字段3:</label>-->
  56 + <!--<div class="col-sm-8">-->
  57 + <!--<input id="userDef3" name="userDef3" class="form-control" type="text">-->
  58 + <!--</div>-->
  59 + <!--</div>-->
  60 + <div class="form-group">
  61 + <div class="form-control-static col-sm-offset-9">
  62 + <button type="submit" class="btn btn-primary">提交</button>
  63 + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
  64 + </div>
  65 + </div>
  66 + </form>
  67 +</div>
  68 +<div th:include="include::footer"></div>
  69 +<script type="text/javascript">
  70 + var prefix = ctx + "general/company"
  71 + $("#form-company-add").validate({
  72 + rules:{
  73 + code:{
  74 + required:true
  75 + },
  76 + name:{
  77 + required:true
  78 + },
  79 + },
  80 + submitHandler: function() {
  81 + var tableValue = $("#form-bomHeader-add").serialize();
  82 + tableValue = formValueReplace(tableValue, "warehouseCode", $.form.selectCheckeds("warehouseCode"));
  83 + $.operate.save(prefix + "/add", tableValue);
  84 + }
  85 + });
  86 +</script>
  87 +</body>
  88 +</html>
src/main/resources/templates/general/carrier/carrier.html 0 → 100644
  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"></head>
  5 +<body class="gray-bg">
  6 +<div class="container-div">
  7 + <div class="row">
  8 + <div class="col-sm-12 select-info">
  9 + <form id="company-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 class="time">
  19 + <label>创建时间: </label>
  20 + <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/>
  21 + <span>-</span>
  22 + <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/>
  23 + </li>
  24 + <li>
  25 + <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  26 + </li>
  27 + </ul>
  28 + </div>
  29 + </form>
  30 + </div>
  31 + <div class="btn-group hidden-xs" id="toolbar" role="group">
  32 + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="general:carrier:add">
  33 + <i class="fa fa-plus"></i> 新增
  34 + </a>
  35 + <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="general:carrier:remove">
  36 + <i class="fa fa-trash-o"></i> 删除
  37 + </a>
  38 + </div>
  39 + <div class="col-sm-12 select-info">
  40 + <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table>
  41 + </div>
  42 + </div>
  43 +</div>
  44 +<div th:include="include :: footer"></div>
  45 +<script th:inline="javascript">
  46 + var prefix = ctx + "general/carrier";
  47 + var editFlag = [[${@permission.hasPermi('general:carrier:edit')}]];
  48 + var removeFlag = [[${@permission.hasPermi('general:carrier:remove')}]];
  49 + $(function() {
  50 + var options = {
  51 + url: prefix + "/list",
  52 + createUrl: prefix + "/add",
  53 + updateUrl: prefix + "/edit/{id}",
  54 + removeUrl: prefix + "/remove",
  55 + modalName: "承运商",
  56 + search: false,
  57 + sortName: "id",
  58 + sortOrder: "desc",
  59 + columns: [{
  60 + checkbox: true
  61 + },
  62 + {
  63 + field : 'id',
  64 + title : 'id'
  65 + },
  66 + {
  67 + field : 'code',
  68 + title : '编码'
  69 + },
  70 + {
  71 + field : 'name',
  72 + title : '名称'
  73 + },
  74 + {
  75 + field : 'warehouseCode',
  76 + title : '仓库代码'
  77 + },
  78 + {
  79 + field : 'waybillServerUrl',
  80 + title : '运单获取地址url'
  81 + },
  82 + {
  83 + field : 'created',
  84 + title : '创建时间'
  85 + },
  86 + {
  87 + field : 'createdBy',
  88 + title : '创建用户'
  89 + },
  90 + {
  91 + field : 'lastUpdated',
  92 + title : '更新时间'
  93 + },
  94 + {
  95 + field : 'lastUpdatedBy',
  96 + title : '更新用户'
  97 + },
  98 + {
  99 + field : 'userDef1',
  100 + title : '自定义字段1' ,
  101 + visible:false
  102 + },
  103 + {
  104 + field : 'userDef2',
  105 + title : '自定义字段2' ,
  106 + visible:false
  107 + },
  108 + {
  109 + field : 'userDef3',
  110 + title : '自定义字段3' ,
  111 + visible:false
  112 + },
  113 + {
  114 + title: '操作',
  115 + align: 'center',
  116 + formatter: function(value, row, index) {
  117 + var actions = [];
  118 + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
  119 + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>');
  120 + return actions.join('');
  121 + }
  122 + }]
  123 + };
  124 + $.table.init(options);
  125 + });
  126 +</script>
  127 +</body>
  128 +</html>
0 \ No newline at end of file 129 \ No newline at end of file
src/main/resources/templates/general/carrier/edit.html 0 → 100644
  1 +<!DOCTYPE HTML>
  2 +<html lang="zh" xmlns:th="http://www.thymeleaf.org">
  3 +<meta charset="utf-8">
  4 +<head th:include="include :: header"></head>
  5 +<body class="white-bg">
  6 +<div class="wrapper wrapper-content animated fadeInRight ibox-content">
  7 + <form class="form-horizontal m" id="form-company-add" th:object="${carrier}">
  8 + <div class="form-group">
  9 + <input id="id" name="id" th:field="*{id}"/>
  10 + <label class="col-sm-3 control-label">编码:</label>
  11 + <div class="col-sm-8">
  12 + <input id="code" name="code" class="form-control" type="text" th:field="*{code}" >
  13 + </div>
  14 + </div>
  15 + <div class="form-group">
  16 + <label class="col-sm-3 control-label">名称:</label>
  17 + <div class="col-sm-8">
  18 + <input id="name" name="name" class="form-control" type="text" th:field="*{name}">
  19 + </div>
  20 + </div>
  21 + <div class="form-group">
  22 + <label class="col-sm-3 control-label">仓库:</label>
  23 + <div class="col-sm-8">
  24 + <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>
  27 + </div>
  28 + </div>
  29 + <div class="form-group">
  30 + <label class="col-sm-3 control-label">运单获取地址url:</label>
  31 + <div class="col-sm-8">
  32 + <input id="waybillServerUrl" name="waybillServerUrl" class="form-control" type="text" th:field="*{waybillServerUrl}">
  33 + </div>
  34 + </div>
  35 +
  36 + <!--<div class="form-group">
  37 + <label class="col-sm-3 control-label">数据版本:</label>
  38 + <div class="col-sm-8">
  39 + <input id="version" name="version" class="form-control" type="text">
  40 + </div>
  41 + </div>-->
  42 +
  43 + <!--<div class="form-group"> -->
  44 + <!--<label class="col-sm-3 control-label">自定义字段1:</label>-->
  45 + <!--<div class="col-sm-8">-->
  46 + <!--<input id="userDef1" name="userDef1" class="form-control" type="text">-->
  47 + <!--</div>-->
  48 + <!--</div>-->
  49 + <!--<div class="form-group"> -->
  50 + <!--<label class="col-sm-3 control-label">自定义字段2:</label>-->
  51 + <!--<div class="col-sm-8">-->
  52 + <!--<input id="userDef2" name="userDef2" class="form-control" type="text">-->
  53 + <!--</div>-->
  54 + <!--</div>-->
  55 + <!--<div class="form-group"> -->
  56 + <!--<label class="col-sm-3 control-label">自定义字段3:</label>-->
  57 + <!--<div class="col-sm-8">-->
  58 + <!--<input id="userDef3" name="userDef3" class="form-control" type="text">-->
  59 + <!--</div>-->
  60 + <!--</div>-->
  61 + <div class="form-group">
  62 + <div class="form-control-static col-sm-offset-9">
  63 + <button type="submit" class="btn btn-primary">提交</button>
  64 + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
  65 + </div>
  66 + </div>
  67 + </form>
  68 +</div>
  69 +<div th:include="include::footer"></div>
  70 +<script type="text/javascript">
  71 + var prefix = ctx + "general/carrier";
  72 + $("#form-company-add").validate({
  73 + rules:{
  74 + code:{
  75 + required:true
  76 + },
  77 + name:{
  78 + required:true
  79 + },
  80 + },
  81 + submitHandler: function() {
  82 + var tableValue = $("#form-bomHeader-add").serialize();
  83 + tableValue = formValueReplace(tableValue, "warehouseCode", $("#warehouseCode option:selected").val());
  84 + $.operate.save(prefix + "/edit", tableValue);
  85 + }
  86 + });
  87 +</script>
  88 +</body>
  89 +</html>
src/main/resources/templates/general/company/add.html
@@ -91,8 +91,6 @@ @@ -91,8 +91,6 @@
91 <input id="email" name="email" class="form-control" type="text"> 91 <input id="email" name="email" class="form-control" type="text">
92 </div> 92 </div>
93 </div> 93 </div>
94 -  
95 - <input id="filePath" name="filePath" class="form-control" type="file">  
96 <!--<div class="form-group"> --> 94 <!--<div class="form-group"> -->
97 <!--<label class="col-sm-3 control-label">自定义字段1:</label>--> 95 <!--<label class="col-sm-3 control-label">自定义字段1:</label>-->
98 <!--<div class="col-sm-8">--> 96 <!--<div class="col-sm-8">-->
src/main/resources/templates/general/company/edit.html
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 <div class="form-group"> 21 <div class="form-group">
22 <label class="col-sm-3 control-label">仓库:</label> 22 <label class="col-sm-3 control-label">仓库:</label>
23 <div class="col-sm-8"> 23 <div class="col-sm-8">
24 - <select id="orgCode" name="orgCode" class="form-control" > 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> 25 <option th:each="item : ${warehouseList}" th:text="${item['name']}" th:value="${item['code']}" th:attr = " code = ${item['name']}"></option>
26 </select> 26 </select>
27 </div> 27 </div>