From 859ce7002877085a11a5fd3e92f3f1f8c8629635 Mon Sep 17 00:00:00 2001
From: mahuandong <752432958@qq.com>
Date: Wed, 14 Aug 2019 09:14:17 +0800
Subject: [PATCH] 添加承运商

---
 .idea/workspace.xml                                                            |  45 +++++++++++++++++++++++----------------------
 src/main/java/com/huaheng/pc/general/carrier/controller/CarrierController.java | 146 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/main/resources/templates/general/carrier/add.html                          |  88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/main/resources/templates/general/carrier/carrier.html                      | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/main/resources/templates/general/carrier/edit.html                         |  89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/main/resources/templates/general/company/add.html                          |   2 --
 src/main/resources/templates/general/company/edit.html                         |   2 +-
 7 files changed, 475 insertions(+), 25 deletions(-)
 create mode 100644 src/main/java/com/huaheng/pc/general/carrier/controller/CarrierController.java
 create mode 100644 src/main/resources/templates/general/carrier/add.html
 create mode 100644 src/main/resources/templates/general/carrier/carrier.html
 create mode 100644 src/main/resources/templates/general/carrier/edit.html

diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index d9d9ec3..ca820c9 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -2,19 +2,13 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="9ff7b25e-dc1a-4859-8a0c-00039489e359" name="Default Changelist" comment="">
-      <change afterPath="$PROJECT_DIR$/src/main/resources/templates/general/bomDetail/add.html" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/src/main/resources/templates/general/bomDetail/bomDetail.html" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/src/main/resources/templates/general/bomDetail/edit.html" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/src/main/resources/templates/general/bomHeader/add.html" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/src/main/resources/templates/general/bomHeader/edit.html" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/general/carrier/controller/CarrierController.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/resources/templates/general/carrier/add.html" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/resources/templates/general/carrier/carrier.html" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/resources/templates/general/carrier/edit.html" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <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" />
-      <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" />
-      <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" />
-      <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" />
-      <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" />
-      <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" />
-      <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" />
+      <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" />
+      <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" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
@@ -54,7 +48,7 @@
         <item name="@172.16.29.45" type="feb32156:DbDataSourceImpl" />
         <item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
         <item name="wms_v2: schema" type="76f4a085:MysqlImplModel$Schema" />
-        <item name="bom_detail: table" type="285a2a93:MysqlImplModel$Table" />
+        <item name="carrier: table" type="285a2a93:MysqlImplModel$Table" />
       </path>
       <path>
         <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
@@ -69,6 +63,7 @@
   <component name="FileTemplateManagerImpl">
     <option name="RECENT_TEMPLATES">
       <list>
+        <option value="FxmlFile" />
         <option value="Class" />
         <option value="HTML File" />
       </list>
@@ -117,6 +112,7 @@
   </component>
   <component name="RecentsManager">
     <key name="MoveFile.RECENT_KEYS">
+      <recent name="E:\code\wms2\src\main\resources\templates\general\carrier" />
       <recent name="E:\code\wms2\src\main\resources\mybatis\general" />
       <recent name="E:\code\wms2\src\main\resources\mybatis\config" />
     </key>
@@ -163,12 +159,7 @@
       <serviceView>
         <option name="contentProportion" value="0.18875067" />
         <treeState>
-          <expand>
-            <path>
-              <item name="services root" type="e789fda9:ObjectUtils$Sentinel" />
-              <item name="com.intellij.execution.services.ServiceModel$ServiceGroupNode@6299c693" type="7427dc5b:ServiceModel$ServiceGroupNode" />
-            </path>
-          </expand>
+          <expand />
           <select />
         </treeState>
       </serviceView>
@@ -195,7 +186,9 @@
       <workItem from="1565587737758" duration="12961000" />
       <workItem from="1565657307503" duration="115000" />
       <workItem from="1565657439247" duration="2447000" />
-      <workItem from="1565662229227" duration="19207000" />
+      <workItem from="1565662229227" duration="20296000" />
+      <workItem from="1565691345079" duration="6000" />
+      <workItem from="1565743087352" duration="2122000" />
     </task>
     <task id="LOCAL-00001" summary="添加库位、库位类型增删改查接口">
       <created>1565226427512</created>
@@ -267,7 +260,14 @@
       <option name="project" value="LOCAL" />
       <updated>1565665525508</updated>
     </task>
-    <option name="localTasksCounter" value="11" />
+    <task id="LOCAL-00011" summary="添加商品、商品详情页面">
+      <created>1565686619774</created>
+      <option name="number" value="00011" />
+      <option name="presentableId" value="LOCAL-00011" />
+      <option name="project" value="LOCAL" />
+      <updated>1565686619774</updated>
+    </task>
+    <option name="localTasksCounter" value="12" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
@@ -311,7 +311,8 @@
     <MESSAGE value="添加商品详情" />
     <MESSAGE value="添加物料时判断单位是否存在,不存在则添加物料单位" />
     <MESSAGE value="添加task实体类" />
-    <option name="LAST_COMMIT_MESSAGE" value="添加task实体类" />
+    <MESSAGE value="添加商品、商品详情页面" />
+    <option name="LAST_COMMIT_MESSAGE" value="添加商品、商品详情页面" />
   </component>
   <component name="XDebuggerManager">
     <breakpoint-manager>
diff --git a/src/main/java/com/huaheng/pc/general/carrier/controller/CarrierController.java b/src/main/java/com/huaheng/pc/general/carrier/controller/CarrierController.java
new file mode 100644
index 0000000..02d0fe9
--- /dev/null
+++ b/src/main/java/com/huaheng/pc/general/carrier/controller/CarrierController.java
@@ -0,0 +1,146 @@
+package com.huaheng.pc.general.carrier.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.huaheng.common.support.Convert;
+import com.huaheng.common.utils.StringUtils;
+import com.huaheng.common.utils.security.ShiroUtils;
+import com.huaheng.framework.aspectj.lang.annotation.Log;
+import com.huaheng.framework.aspectj.lang.constant.BusinessType;
+import com.huaheng.framework.web.controller.BaseController;
+import com.huaheng.framework.web.domain.AjaxResult;
+import com.huaheng.framework.web.page.PageDomain;
+import com.huaheng.framework.web.page.TableDataInfo;
+import com.huaheng.framework.web.page.TableSupport;
+import com.huaheng.pc.general.carrier.domain.Carrier;
+import com.huaheng.pc.general.carrier.service.CarrierService;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 承运商
+ */
+@Controller
+@RequestMapping("/general/carrier")
+public class CarrierController extends BaseController {
+
+    private String prefix = "general/carrier";
+
+    @Resource
+    private CarrierService carrierService;
+
+    @RequiresPermissions("general:carrier:view")
+    @GetMapping()
+    public String bomHeader() {
+        return prefix + "/carrier";
+    }
+
+    /**
+     * 查询承运商列表
+     */
+    @ApiOperation(value="查看承运商列表", notes="根据承运商编码、名称、创建时间获取承运商信息", httpMethod = "POST")
+    @RequiresPermissions("general:carrier:list")
+    @Log(title = "通用-承运商管理", operating = "查看承运商列表", action = BusinessType.GRANT)
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(
+            @ApiParam(name="carrier",value="承运商编码、名称") Carrier carrier,
+            @ApiParam(name = "createdBegin", value = "起止时间") String createdBegin,
+            @ApiParam(name = "createdEnd", value = "结束时间") String createdEnd) {
+        LambdaQueryWrapper<Carrier> lambdaQueryWrapper = Wrappers.lambdaQuery();
+        PageDomain pageDomain = TableSupport.buildPageRequest();
+        Integer pageNum = pageDomain.getPageNum();
+        Integer pageSize = pageDomain.getPageSize();
+        lambdaQueryWrapper.gt(StringUtils.isNotEmpty(createdBegin), Carrier::getCreated, createdBegin)
+                .lt(StringUtils.isNotEmpty(createdEnd), Carrier::getCreated, createdEnd)
+                .eq(StringUtils.isNotEmpty(carrier.getCode()), Carrier::getCode, carrier.getCode())
+                .eq(StringUtils.isNotEmpty(carrier.getName()), Carrier::getName, carrier.getName())
+                .eq(Carrier::getWarehouseCode, ShiroUtils.getWarehouseCode());
+
+        if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){
+            /*使用分页查询*/
+            Page<Carrier> page = new Page<>(pageNum, pageSize);
+            IPage<Carrier> iPage = carrierService.page(page, lambdaQueryWrapper);
+            return getMpDataTable(iPage.getRecords(), iPage.getTotal());
+        } else {
+            List<Carrier> list = carrierService.list(lambdaQueryWrapper);
+            return getDataTable(list);
+        }
+    }
+
+    /**
+     * 新增承运商
+     */
+    @GetMapping("/add")
+    public String add() {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存承运商
+     */
+    @ApiOperation(value="新增承运商", notes="新增承运商", httpMethod = "POST")
+    @RequiresPermissions("general:carrier:add")
+    @Log(title = "通用-承运商", operating = "新增承运商", action = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(@ApiParam(name = "containerType", value = "承运商", required = true)
+                                      Carrier carrier)  {
+        carrier.setWarehouseCode(ShiroUtils.getWarehouseCode());
+        carrier.setCreatedBy(ShiroUtils.getLoginName());
+        carrier.setLastUpdatedBy(ShiroUtils.getLoginName());
+        return toAjax(carrierService.save(carrier));
+    }
+
+    /**
+     * 修改承运商
+     */
+    @GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") Integer id, ModelMap mmap) {
+        mmap.put("carrier", carrierService.getById(id));
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存承运商
+     */
+    @ApiOperation(value="修改承运商", notes="修改承运商", httpMethod = "POST")
+    @RequiresPermissions("general:carrier:edit")
+    @Log(title = "通用-承运商", operating = "修改承运商", action = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(
+            @ApiParam(name = "carrier", value = "承运商", required = true)Carrier carrier) {
+        carrier.setLastUpdatedBy(ShiroUtils.getLoginName());
+        return toAjax(carrierService.updateById(carrier));
+    }
+
+    /**
+     * 删除承运商
+     */
+    @ApiOperation(value="删除承运商", notes="根据id批量删除承运商,参数示例1,2,3", httpMethod = "POST")
+    @RequiresPermissions("general:carrier:remove")
+    @Log(title = "通用-承运商", operating = "删除承运商", action = BusinessType.DELETE)
+    @PostMapping( "/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids) {
+        if (StringUtils.isEmpty(ids)){
+            return AjaxResult.error("id不能为空");
+        }
+        List<Integer> list = new ArrayList<>();
+        for (Integer id : Convert.toIntArray(ids)) {
+            list.add(id);
+        }
+        return toAjax(carrierService.removeByIds(list));
+    }
+}
diff --git a/src/main/resources/templates/general/carrier/add.html b/src/main/resources/templates/general/carrier/add.html
new file mode 100644
index 0000000..cb268b7
--- /dev/null
+++ b/src/main/resources/templates/general/carrier/add.html
@@ -0,0 +1,88 @@
+<!DOCTYPE HTML>
+<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
+<meta charset="utf-8">
+<head th:include="include :: header"></head>
+<body class="white-bg">
+<div class="wrapper wrapper-content animated fadeInRight ibox-content">
+    <form class="form-horizontal m" id="form-company-add">
+        <div class="form-group">
+            <label class="col-sm-3 control-label">编码:</label>
+            <div class="col-sm-8">
+                <input id="code" name="code" class="form-control" type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">名称:</label>
+            <div class="col-sm-8">
+                <input id="name" name="name" class="form-control" type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">仓库:</label>
+            <div class="col-sm-8">
+                <label th:each="warehouse:${warehouseList}" class="checkbox-inline i-checks">
+                    <input name="warehouseCode" type="checkbox" th:value="${warehouse.value}" th:text=" ${warehouse.name}" th:disabled="${warehouse.enable == false} ">
+                </label>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">运单获取地址url:</label>
+            <div class="col-sm-8">
+                <input id="waybillServerUrl" name="waybillServerUrl" class="form-control" type="text">
+            </div>
+        </div>
+
+        <!--<div class="form-group">
+            <label class="col-sm-3 control-label">数据版本:</label>
+            <div class="col-sm-8">
+                <input id="version" name="version" class="form-control" type="text">
+            </div>
+        </div>-->
+
+        <!--<div class="form-group">	-->
+        <!--<label class="col-sm-3 control-label">自定义字段1:</label>-->
+        <!--<div class="col-sm-8">-->
+        <!--<input id="userDef1" name="userDef1" class="form-control" type="text">-->
+        <!--</div>-->
+        <!--</div>-->
+        <!--<div class="form-group">	-->
+        <!--<label class="col-sm-3 control-label">自定义字段2:</label>-->
+        <!--<div class="col-sm-8">-->
+        <!--<input id="userDef2" name="userDef2" class="form-control" type="text">-->
+        <!--</div>-->
+        <!--</div>-->
+        <!--<div class="form-group">	-->
+        <!--<label class="col-sm-3 control-label">自定义字段3:</label>-->
+        <!--<div class="col-sm-8">-->
+        <!--<input id="userDef3" name="userDef3" class="form-control" type="text">-->
+        <!--</div>-->
+        <!--</div>-->
+        <div class="form-group">
+            <div class="form-control-static col-sm-offset-9">
+                <button type="submit" class="btn btn-primary">提交</button>
+                <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
+            </div>
+        </div>
+    </form>
+</div>
+<div th:include="include::footer"></div>
+<script type="text/javascript">
+    var prefix = ctx + "general/company"
+    $("#form-company-add").validate({
+        rules:{
+            code:{
+                required:true
+            },
+            name:{
+                required:true
+            },
+        },
+        submitHandler: function() {
+            var tableValue = $("#form-bomHeader-add").serialize();
+            tableValue = formValueReplace(tableValue, "warehouseCode", $.form.selectCheckeds("warehouseCode"));
+            $.operate.save(prefix + "/add", tableValue);
+        }
+    });
+</script>
+</body>
+</html>
diff --git a/src/main/resources/templates/general/carrier/carrier.html b/src/main/resources/templates/general/carrier/carrier.html
new file mode 100644
index 0000000..fb907d9
--- /dev/null
+++ b/src/main/resources/templates/general/carrier/carrier.html
@@ -0,0 +1,128 @@
+<!DOCTYPE HTML>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<meta charset="utf-8">
+<head th:include="include :: header"></head>
+<body class="gray-bg">
+<div class="container-div">
+    <div class="row">
+        <div class="col-sm-12 select-info">
+            <form id="company-form">
+                <div class="select-list">
+                    <ul>
+                        <li>
+                            编码:<input type="text" name="code"/>
+                        </li>
+                        <li>
+                            名称:<input type="text" name="name"/>
+                        </li>
+                        <li class="time">
+                            <label>创建时间: </label>
+                            <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/>
+                            <span>-</span>
+                            <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/>
+                        </li>
+                        <li>
+                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                        </li>
+                    </ul>
+                </div>
+            </form>
+        </div>
+        <div class="btn-group hidden-xs" id="toolbar" role="group">
+            <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="general:carrier:add">
+                <i class="fa fa-plus"></i> 新增
+            </a>
+            <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="general:carrier:remove">
+                <i class="fa fa-trash-o"></i> 删除
+            </a>
+        </div>
+        <div class="col-sm-12 select-info">
+            <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table>
+        </div>
+    </div>
+</div>
+<div th:include="include :: footer"></div>
+<script th:inline="javascript">
+    var prefix = ctx + "general/carrier";
+    var editFlag = [[${@permission.hasPermi('general:carrier:edit')}]];
+    var removeFlag = [[${@permission.hasPermi('general:carrier:remove')}]];
+    $(function() {
+        var options = {
+            url: prefix + "/list",
+            createUrl: prefix + "/add",
+            updateUrl: prefix + "/edit/{id}",
+            removeUrl: prefix + "/remove",
+            modalName: "承运商",
+            search: false,
+            sortName: "id",
+            sortOrder: "desc",
+            columns: [{
+                checkbox: true
+            },
+                {
+                    field : 'id',
+                    title : 'id'
+                },
+                {
+                    field : 'code',
+                    title : '编码'
+                },
+                {
+                    field : 'name',
+                    title : '名称'
+                },
+                {
+                    field : 'warehouseCode',
+                    title : '仓库代码'
+                },
+                {
+                    field : 'waybillServerUrl',
+                    title : '运单获取地址url'
+                },
+                {
+                    field : 'created',
+                    title : '创建时间'
+                },
+                {
+                    field : 'createdBy',
+                    title : '创建用户'
+                },
+                {
+                    field : 'lastUpdated',
+                    title : '更新时间'
+                },
+                {
+                    field : 'lastUpdatedBy',
+                    title : '更新用户'
+                },
+                {
+                    field : 'userDef1',
+                    title : '自定义字段1' ,
+                    visible:false
+                },
+                {
+                    field : 'userDef2',
+                    title : '自定义字段2'  ,
+                    visible:false
+                },
+                {
+                    field : 'userDef3',
+                    title : '自定义字段3'  ,
+                    visible:false
+                },
+                {
+                    title: '操作',
+                    align: 'center',
+                    formatter: function(value, row, index) {
+                        var actions = [];
+                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>');
+                        return actions.join('');
+                    }
+                }]
+        };
+        $.table.init(options);
+    });
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/src/main/resources/templates/general/carrier/edit.html b/src/main/resources/templates/general/carrier/edit.html
new file mode 100644
index 0000000..c86a39e
--- /dev/null
+++ b/src/main/resources/templates/general/carrier/edit.html
@@ -0,0 +1,89 @@
+<!DOCTYPE HTML>
+<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
+<meta charset="utf-8">
+<head th:include="include :: header"></head>
+<body class="white-bg">
+<div class="wrapper wrapper-content animated fadeInRight ibox-content">
+    <form class="form-horizontal m" id="form-company-add" th:object="${carrier}">
+        <div class="form-group">
+            <input id="id" name="id" th:field="*{id}"/>
+            <label class="col-sm-3 control-label">编码:</label>
+            <div class="col-sm-8">
+                <input id="code" name="code" class="form-control" type="text" th:field="*{code}" >
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">名称:</label>
+            <div class="col-sm-8">
+                <input id="name" name="name" class="form-control" type="text"  th:field="*{name}">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">仓库:</label>
+            <div class="col-sm-8">
+                <select id="warehouseCode" name="warehouseCode" class="form-control" >
+                    <option th:each="item : ${warehouseList}" th:text="${item['name']}" th:value="${item['code']}" th:attr = " code = ${item['name']}"></option>
+                </select>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">运单获取地址url:</label>
+            <div class="col-sm-8">
+                <input id="waybillServerUrl" name="waybillServerUrl" class="form-control" type="text" th:field="*{waybillServerUrl}">
+            </div>
+        </div>
+
+        <!--<div class="form-group">
+            <label class="col-sm-3 control-label">数据版本:</label>
+            <div class="col-sm-8">
+                <input id="version" name="version" class="form-control" type="text">
+            </div>
+        </div>-->
+
+        <!--<div class="form-group">	-->
+        <!--<label class="col-sm-3 control-label">自定义字段1:</label>-->
+        <!--<div class="col-sm-8">-->
+        <!--<input id="userDef1" name="userDef1" class="form-control" type="text">-->
+        <!--</div>-->
+        <!--</div>-->
+        <!--<div class="form-group">	-->
+        <!--<label class="col-sm-3 control-label">自定义字段2:</label>-->
+        <!--<div class="col-sm-8">-->
+        <!--<input id="userDef2" name="userDef2" class="form-control" type="text">-->
+        <!--</div>-->
+        <!--</div>-->
+        <!--<div class="form-group">	-->
+        <!--<label class="col-sm-3 control-label">自定义字段3:</label>-->
+        <!--<div class="col-sm-8">-->
+        <!--<input id="userDef3" name="userDef3" class="form-control" type="text">-->
+        <!--</div>-->
+        <!--</div>-->
+        <div class="form-group">
+            <div class="form-control-static col-sm-offset-9">
+                <button type="submit" class="btn btn-primary">提交</button>
+                <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
+            </div>
+        </div>
+    </form>
+</div>
+<div th:include="include::footer"></div>
+<script type="text/javascript">
+    var prefix = ctx + "general/carrier";
+    $("#form-company-add").validate({
+        rules:{
+            code:{
+                required:true
+            },
+            name:{
+                required:true
+            },
+        },
+        submitHandler: function() {
+            var tableValue = $("#form-bomHeader-add").serialize();
+            tableValue = formValueReplace(tableValue, "warehouseCode", $("#warehouseCode option:selected").val());
+            $.operate.save(prefix + "/edit", tableValue);
+        }
+    });
+</script>
+</body>
+</html>
diff --git a/src/main/resources/templates/general/company/add.html b/src/main/resources/templates/general/company/add.html
index bb1b69e..d7a7620 100644
--- a/src/main/resources/templates/general/company/add.html
+++ b/src/main/resources/templates/general/company/add.html
@@ -91,8 +91,6 @@
 					<input id="email" name="email" class="form-control" type="text">
 				</div>
 			</div>
-
-			<input id="filePath" name="filePath" class="form-control" type="file">
 			<!--<div class="form-group">	-->
 				<!--<label class="col-sm-3 control-label">自定义字段1:</label>-->
 				<!--<div class="col-sm-8">-->
diff --git a/src/main/resources/templates/general/company/edit.html b/src/main/resources/templates/general/company/edit.html
index 1af8726..de8afb8 100644
--- a/src/main/resources/templates/general/company/edit.html
+++ b/src/main/resources/templates/general/company/edit.html
@@ -21,7 +21,7 @@
             <div class="form-group">
                 <label class="col-sm-3 control-label">仓库:</label>
                 <div class="col-sm-8">
-                    <select id="orgCode" name="orgCode" class="form-control" >
+                    <select id="warehouseCode" name="warehouseCode" class="form-control" >
                         <option th:each="item : ${warehouseList}" th:text="${item['name']}" th:value="${item['code']}" th:attr = " code = ${item['name']}"></option>
                     </select>
                 </div>
--
libgit2 0.22.2