Browse Source

Merge branch 'master' of http://git.iamberry.com/hexiugang/iamberry-common-parent

# Conflicts:
#	watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java
wangxiaoming 7 years ago
parent
commit
c689ed7874

+ 1 - 1
watero-rst-core/src/main/java/com.iamberry.rst.core/pts/PtsComponents.java

@@ -19,7 +19,7 @@ public class PtsComponents implements Serializable {
 
     private String componentsName;//零件名称
 
-    private Integer componentsType;//零件类型:1:塑胶件;2:五金件;3:其他;
+    private Integer componentsType;//零件类型:1:塑胶件;2:五金件;4:电子类;5:线材;6:3:其他;
 
     private double componentsCost;//零件成本(分)
 

+ 3 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/pts/MachinePartsService.java

@@ -54,4 +54,7 @@ public interface MachinePartsService {
      * EXCEL添加机器零件
      * **/
     Integer excelAddMachineParts(Sheet sheet);
+
+
+    String getComPonentsNumber(String componentsNo,Integer type);
 }

+ 50 - 4
watero-rst-service/src/main/java/com/iamberry/rst/service/pts/MachinePartsServiceImpl.java

@@ -87,7 +87,10 @@ public class MachinePartsServiceImpl implements MachinePartsService {
                 }
                 /**封装零件实体**/
                 PtsComponents ptsComponents = new PtsComponents();
-                ptsComponents.setComponentsNo(heads.get(0));
+
+                String comPonentsNo = heads.get(0);
+                String comType = "";
+
                 /**获取供应商id**/
                 PtsSupplier ptsSupplier = new PtsSupplier();
                 ptsSupplier.setSupplierNumber(heads.get(1));
@@ -102,20 +105,33 @@ public class MachinePartsServiceImpl implements MachinePartsService {
                 switch (heads.get(7)){
                     case "塑胶件":
                         type = 1;
+                        comType = "110";
                         break;
                     case "五金件":
                         type = 2;
+                        comType = "220";
                         break;
                     case "电子类":
-                        type = 3;
+                        type = 4;
+                        comType = "330";
                         break;
                     case "线材":
-                        type = 4;
+                        type = 5;
+                        comType = "440";
                         break;
                     case "辅材":
-                        type = 5;
+                        type = 6;
+                        comType = "550";
+                        break;
+                    case "其他":
+                        type = 3;
+                        comType = "660";
                         break;
                 }
+
+                /*设置编码*/
+                ptsComponents.setComponentsNo(this.getComPonentsNumber(comType +"-" + comPonentsNo,type));
+
                 ptsComponents.setComponentsType(type);
                 ptsComponents.setComponentsMbsc(heads.get(8));
                 ptsComponents.setComponentsSpecification(heads.get(9));
@@ -129,4 +145,34 @@ public class MachinePartsServiceImpl implements MachinePartsService {
 
         return 1;
     }
+
+
+    /**
+     * 生成机器零件编号
+     * @param componentsNo
+     * @param type
+     * @return
+     */
+    public String getComPonentsNumber(String componentsNo,Integer type){
+        PtsComponents compon = new PtsComponents();
+        compon.setComponentsType(type);
+        Integer number = machinePartsMapper.getmachinePartsNumber(compon) + 1;
+        String no =  String.format("%04d", number);
+        String comPonentsNo = componentsNo + "-" + no;
+
+        boolean flag = true;
+        while (flag){
+            compon = new PtsComponents();
+            compon.setComponentsNo(comPonentsNo);
+            Integer comNumber = machinePartsMapper.getmachinePartsNumber(compon);
+            if(comNumber == 0){
+                flag = false;
+            }else{
+                number ++ ;
+                no =  String.format("%04d", number);
+                comPonentsNo = componentsNo + "-" + no;
+            }
+        }
+        return comPonentsNo;
+    }
 }

+ 8 - 33
watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminMachinePartsController.java

@@ -93,7 +93,7 @@ public class AdminMachinePartsController {
         ptsComponents.setComponentsCreateTime(new Date());
 
         /* 生成机器零件编号 */
-        ptsComponents.setComponentsNo(this.getComPonentsNumber(ptsComponents.getComponentsNo(),ptsComponents.getComponentsType()));
+        ptsComponents.setComponentsNo(machinePartsService.getComPonentsNumber(ptsComponents.getComponentsNo(),ptsComponents.getComponentsType()));
 
         Integer msg =  machinePartsService.addMachineParts(ptsComponents);
         if(msg > 0){
@@ -104,34 +104,6 @@ public class AdminMachinePartsController {
         return responseJson;
     }
 
-    /**
-     * 生成机器零件编号
-     * @param componentsNo
-     * @param type
-     * @return
-     */
-    private String getComPonentsNumber(String componentsNo,Integer type){
-        PtsComponents compon = new PtsComponents();
-        compon.setComponentsType(type);
-        Integer number = machinePartsService.getmachinePartsNumber(compon) + 1;
-        String no =  String.format("%04d", number);
-        String comPonentsNo = componentsNo + "-" + no;
-
-        boolean flag = true;
-        while (flag){
-            compon = new PtsComponents();
-            compon.setComponentsNo(comPonentsNo);
-            Integer comNumber = machinePartsService.getmachinePartsNumber(compon);
-            if(comNumber == 0){
-                flag = false;
-            }else{
-                number ++ ;
-                no =  String.format("%04d", number);
-                comPonentsNo = componentsNo + "-" + no;
-            }
-        }
-        return comPonentsNo;
-    }
 
     /**
      * 导入EXCEL生产零件(图片为默认图片)
@@ -231,15 +203,18 @@ public class AdminMachinePartsController {
                 case 2:
                     type = "五金件";
                     break;
-                case 3:
+                case 4:
                     type = "电子类";
                     break;
-                case 4:
+                case 5:
                     type = "线材";
                     break;
-                case 5:
+                case 6:
                     type = "辅材";
                     break;
+                case 3:
+                    type = "其他";
+                    break;
             }
             row.add(info.getComponentsType() == null ? null:type);
             row.add(info.getComponentsMbsc() == null ? null:info.getComponentsMbsc());
@@ -348,7 +323,7 @@ public class AdminMachinePartsController {
 
         String comPonentsNos[] = ptsComponents.getComponentsNo().split("-");
         if(comPonentsNos != null && comPonentsNos.length < 3){
-            ptsComponents.setComponentsNo(this.getComPonentsNumber(ptsComponents.getComponentsNo(),ptsComponents.getComponentsType()));
+            ptsComponents.setComponentsNo(machinePartsService.getComPonentsNumber(ptsComponents.getComponentsNo(),ptsComponents.getComponentsType()));
         }
 
         Integer msg =  machinePartsService.updateParts(ptsComponents);

+ 2 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/pts/batch/batch_list.ftl

@@ -42,9 +42,9 @@
                 </#if>
             </select>
             <input type="text" class="my-input"  style="width:150px" value="${batchNo!''}" placeholder="批次编号" id="batchNo" name="batchNo">
-            <button type="submit" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
+            <button type="submit" class="my-btn-search" style="" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
 
-            <button type="button" style="cursor:pointer;" class="my-btn-search" onclick="toExcel();">导出Excel</button>
+            <button type="button" style="cursor:pointer;" class="my-btn-search" onclick="toExcel();">导出Excel</button>
         </form>
     </div>
 

+ 2 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/pts/bom/bom_list.ftl

@@ -43,8 +43,8 @@
            <#-- <input type="text" class="my-input"  style="width:150px" value="${bomId!}" placeholder="Bom单编号" id="bomId" name="bomId">-->
             <input type="text" class="my-input"  style="width:150px" value="${bomName!}" placeholder="Bom单名称" id="bomName" name="bomName">
             <input type="text" class="my-input"  style="width:150px" value="${bomRemarks!}" placeholder="Bom单备注" id="bomRemarks" name="bomRemarks">
-            <button type="submit" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
-            <input class="my-btn-search  btn" data-loading-text="请勿重复提交" type="button" value="上传EXCEL" onClick="upFiles()">
+            <button type="submit" class="my-btn-search" style="cursor:pointer;" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
+            <input class="my-btn-search" style="cursor:pointer;" data-loading-text="请勿重复提交" type="button" value="上传Excel" onClick="upFiles()">
             <button type="button" style="cursor:pointer;" class="my-btn-search" onclick="downloadExcel();">下载模板</button>
         </form>
     </div>

+ 3 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/pts/employee/employee_list.ftl

@@ -32,7 +32,7 @@
     <div class="text-c">
         <form action="${path}/admin/employee/_employee_list" method="post">
             <button type="button" style="cursor:pointer; float: left;" class="my-btn-search" onclick="toAddEmployee();">增加员工</button>
-            <button type="button" style="cursor:pointer;" class="my-btn-search" onclick="toExcel();">导出员工到EXCEL</button>
+
             <input type="text" class="my-input"  style="width:150px" value="${employeeNo!}" placeholder="员工编号" id="employeeNo" name="employeeNo">
             <input type="text" class="my-input"  style="width:150px" value="${employeeName!}" placeholder="员工姓名" id="employeeName" name="employeeName">
             <input type="text" class="my-input"  style="width:150px" value="${employeeTel!}" placeholder="员工电话" id="employeeTel" name="employeeTel">
@@ -41,7 +41,8 @@
                 <option value ="1" <#if employeeState??><#if employeeState == 1>selected="selected"</#if></#if>>在职</option>
                 <option value ="0" <#if employeeState??><#if employeeState == 0>selected="selected"</#if></#if>>离职</option>
             </select>
-            <button type="submit" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
+            <button type="submit" class="my-btn-search" style="cursor:pointer;" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
+            <button type="button" style="cursor:pointer;" class="my-btn-search" onclick="toExcel();">导出到Excel</button>
         </form>
     </div>
 

+ 9 - 18
watero-rst-web/src/main/webapp/WEB-INF/views/pts/machinePtras/parts_list.ftl

@@ -30,7 +30,7 @@
 </nav>
 <div class="page-container">
     <div class="text-c">
-        <form action="${path}/admin/machineParts/_parts_list" method="post" style="width: 55%;display: inline-block;">
+        <form action="${path}/admin/machineParts/_parts_list" method="post" style="">
             <button type="button" style="cursor:pointer; float: left;" class="my-btn-search" onclick="toAddParts();">添加机器零件</button>
 
             <select class="my-select" name="supplierId" id="supplierId" style="height: 36px;width: 130px">
@@ -43,18 +43,13 @@
                 <option value ="">暂无供应商,请到供应商列表添加供应商</option>
             </#if>
             </select>
-
-           <#-- <select class="my-select" name="produceId" style="height: 36px;width: 150px">
-                <option value ="">所有产品</option>
-                <#if produceList?? &&  (produceList?size > 0) >
-                    <#list produceList as produce>
-                        <option value ="${produce.produceId!}" <#if produceId??><#if produceId ==produce.produceId >selected="selected"</#if></#if>>${produce.produceName!}</option>
-                    </#list>
-                </#if>
-            </select>-->
             <input type="text" class="my-input"  style="width:80px" value="${componentsNo!}" placeholder="零件编号" id="componentsNo" name="componentsNo">
             <input type="text" class="my-input"  style="width:80px" value="${componentsName!}" placeholder="零件名称" id="componentsName" name="componentsName">
-            <button type="submit" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
+            <button type="submit" class="my-btn-search"  style="cursor:pointer;" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
+
+            <button onClick="upFiles();" class="my-btn-search" style="cursor:pointer;" type="button">上传Excel</button>
+            <button type="button" style="cursor:pointer;" class="my-btn-search" onclick="downloadExcel();">下载模板</button>
+            <button type="button" style="cursor:pointer;" class="my-btn-search" onclick="toExcel();">导出到Excel</button>
         </form>
         <#--<form id="sourcefile" name="sourcefile" action=""  method="post" enctype="multipart/form-data" style="width: 42%;display: inline-block;">
             <input class="my-btn-search" data-loading-text="请勿重复提交" type="button" value="上传EXCEL" onClick="upPolicy()">
@@ -62,9 +57,6 @@
             <button type="button" style="cursor:pointer;" class="my-btn-search" onclick="toExcel();">导出Excel</button>
             <button type="button" style="cursor:pointer;" class="my-btn-search" onclick="downloadExcel();">下载模板</button>
         </form>-->
-        <button onClick="upFiles();" class="btn radius" style="background: #32a3d8;color: #fff;" type="button"><i class="Hui-iconfont">&#xe632;</i> 上传Excel</button>
-        <button type="button" style="cursor:pointer;" class="my-btn-search" onclick="downloadExcel();">下载模板</button>
-        <button type="button" style="cursor:pointer;" class="my-btn-search" onclick="toExcel();">导出Excel</button>
     </div>
 
     <div class="mt-20">
@@ -105,7 +97,7 @@
                                 <#if parts.componentsType == 2>五金件</#if>
                                 <#if parts.componentsType == 4>电子类</#if>
                                 <#if parts.componentsType == 5>线材</#if>
-                                <#if parts.componentsType == 6>包装</#if>
+                                <#if parts.componentsType == 6>辅材</#if>
                                 <#if parts.componentsType == 3>其他</#if>
                             </td>
                             <td>${parts.componentsMbsc!''}</td>
@@ -153,14 +145,13 @@
             _editor.addListener('afterUpfile', function (t, arg) {
                 console.log(arg[0].url);
                 /*window.location.href=root_path + '/admin/machineParts/excelAdd?sourceFile='+arg[0].url;*/
-                layer.msg('加载中', {icon: 16,time:500000});
                 $.ajax({
                     cache: true,
                     type: "POST",
-                    data: {"sourceFile":arg[0].url},
+                    data: {},
                     contentType: false,
                     processData: false,
-                    url: "${path}/admin/machineParts/excelAdd",
+                    url: "${path}/admin/machineParts/excelAdd?sourceFile="+arg[0].url,
                     async: false,
                     success: function(data){
                         if (data) {

+ 14 - 12
watero-rst-web/src/main/webapp/WEB-INF/views/pts/supplier/add_supplier.ftl

@@ -32,43 +32,45 @@
             <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>供应商编号:</label>
             <div class="formControls col-xs-8 col-sm-9">
                 <span  style="height: 30px;    width: 10%;float: left;line-height: 30px;"><span id="comType">YNY</span></span>
-                <div class="input-box ">
-                    <select class="" style="width: 290px;" id="number" name="number">
+                <div class="input-box " style="">
+                    <select class="" style="width: 30%;" id="number" name="number">
                         <option value="A" selected>A</option>
                         <option value="B">B</option>
                         <option value="C">C</option>
                         <option value="D">D</option>
                     </select>
+                    <span style="width: 30%;">后五位流水号系统自动生成</span>
                 </div>
                 <input type="hidden" class="input-text" value="" id="supplierNumber" name="supplierNumber" >
+
             </div>
         </div>
 
         <div class="row cl">
             <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>供应商名称:</label>
             <div class="formControls col-xs-8 col-sm-9">
-				<input type="text" class="input-text" value="" id="supplierName" name="supplierName" placeholder="请输入1-30位的名称,支持中文、英文字母" datatype="/^[a-zA-Z\u4e00-\u9fa5]{1,30}$/" errormsg="供应商名称请输入1-30位的中文、英文字母!">
+				<input type="text" class="input-text" value="" id="supplierName" name="supplierName" placeholder="请输入0-30位的名称,支持中文、英文字母" datatype="/^[a-zA-Z\u4e00-\u9fa5]{1,30}$/" errormsg="供应商名称请输入0-30位的中文、英文字母!">
             </div>
         </div>
 
         <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>供应商简称:</label>
+            <label class="form-label col-xs-4 col-sm-3">供应商简称:</label>
             <div class="formControls col-xs-8 col-sm-9">
-                <input type="text" class="input-text" value="" id="supplierAbbreviation" name="supplierAbbreviation" placeholder="请输入1-10位的简称,支持中文、英文字母" datatype="/^[a-zA-Z\u4e00-\u9fa5]{1,10}$/" errormsg="供应商简称请输入1-10位的中文、英文字母!">
+                <input type="text" class="input-text" value="" id="supplierAbbreviation" name="supplierAbbreviation" placeholder="请输入0-10位的简称,支持中文、英文字母" datatype="/^\s*$/|/^[a-zA-Z\u4e00-\u9fa5]{1,10}$/" errormsg="供应商简称请输入0-10位的中文、英文字母!">
             </div>
         </div>
 
         <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>联系人姓名:</label>
+            <label class="form-label col-xs-4 col-sm-3">联系人姓名:</label>
             <div class="formControls col-xs-8 col-sm-9">
-                <input type="text" class="input-text" value="" id="supplierContactPerson" name="supplierContactPerson" placeholder="请输入1-10位的联系人姓名,支持中文、英文字母" datatype="/^[a-zA-Z\u4e00-\u9fa5]{1,10}$/" errormsg="联系人姓名请输入1-10位的中文、英文字母!">
+                <input type="text" class="input-text" value="" id="supplierContactPerson" name="supplierContactPerson" placeholder="请输入0-10位的联系人姓名,支持中文、英文字母" datatype="/^\s*$/|/^[a-zA-Z\u4e00-\u9fa5]{1,10}$/" errormsg="联系人姓名请输入0-10位的中文、英文字母!">
             </div>
         </div>
 
         <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>联系人电话:</label>
+            <label class="form-label col-xs-4 col-sm-3">联系人电话:</label>
             <div class="formControls col-xs-8 col-sm-9">
-                <input type="text" class="input-text" value="" id="supplierTel" name="supplierTel" placeholder="请输入联系人电话" datatype="m" errormsg="联系人电话格式不正确!">
+                <input type="text" class="input-text" value="" id="supplierTel" name="supplierTel" placeholder="请输入联系人电话" datatype="/^\s*$/|m" errormsg="联系人电话格式不正确!">
             </div>
         </div>
 
@@ -80,14 +82,14 @@
         </div>
 
         <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>联系人邮箱:</label>
+            <label class="form-label col-xs-4 col-sm-3">联系人邮箱:</label>
             <div class="formControls col-xs-8 col-sm-9">
-                <input type="text" class="input-text" value="" id="supplierEmail" name="supplierEmail" placeholder="请输入联系人邮箱" datatype="e" errormsg="联系人邮箱格式不正确!">
+                <input type="text" class="input-text" value="" id="supplierEmail" name="supplierEmail" placeholder="请输入联系人邮箱" datatype="/^\s*$/|e" errormsg="联系人邮箱格式不正确!">
             </div>
         </div>
 
         <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>供应商地址:</label>
+            <label class="form-label col-xs-4 col-sm-3">供应商地址:</label>
             <div class="formControls col-xs-8 col-sm-9">
                 <textarea name="supplierAddress" id="supplierAddress" cols="" rows="" class="textarea"
                           placeholder="联系人地址,最多支持100字符" onKeyUp="$.Huitextarealength(this,100)" ></textarea>

+ 2 - 3
watero-rst-web/src/main/webapp/WEB-INF/views/pts/supplier/supplier_list.ftl

@@ -35,10 +35,9 @@
             <input type="text" class="my-input"  style="width:150px" value="${supplierName!''}" placeholder="供应商名称" id="supplierName" name="supplierName">
             <input type="text" class="my-input"  style="width:150px" value="${supplierContactPerson!''}" placeholder="联系人姓名" id="supplierContactPerson" name="supplierContactPerson">
             <input type="text" class="my-input"  style="width:150px" value="${supplierTel!''}" placeholder="联系人电话" id="supplierTel" name="supplierTel">
-            <button type="submit" class="btn" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
-            <button type="button" style="cursor:pointer;" class="my-btn-search" onclick="derivationEcxcel();">导出excel</button>
+            <button type="submit" class="my-btn-search" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
+            <button type="button" class="my-btn-search" onclick="derivationEcxcel();">导出到Excel</button>
         </form>
-
     </div>
 
     <div class="mt-20">

+ 13 - 12
watero-rst-web/src/main/webapp/WEB-INF/views/pts/supplier/update_supplier.ftl

@@ -35,12 +35,13 @@
             <div class="formControls col-xs-8 col-sm-9">
                 <span  style="height: 30px;    width: 10%;float: left;line-height: 30px;"><span id="comType">YNY</span></span>
                 <div class="input-box ">
-                    <select class="" style="width: 290px;" id="number" name="number">
+                    <select class="" style="width: 30%;" id="number" name="number">
                         <option value="A" <#if ptsSupplier.supplierNumber??><#if ptsSupplier.supplierNumber == 'A'>selected</#if></#if>>A</option>
                         <option value="B" <#if ptsSupplier.supplierNumber??><#if ptsSupplier.supplierNumber == 'B'>selected</#if></#if>>B</option>
                         <option value="C" <#if ptsSupplier.supplierNumber??><#if ptsSupplier.supplierNumber == 'C'>selected</#if></#if>>C</option>
                         <option value="D" <#if ptsSupplier.supplierNumber??><#if ptsSupplier.supplierNumber == 'D'>selected</#if></#if>>D</option>
                     </select>
+                    <span style="width: 30%;">后五位流水号系统自动生成</span>
                 </div>
                 <input type="hidden" class="input-text" value="${ptsSupplier.serialNumber!''}" id="serialNumber" name="serialNumber" >
                 <input type="hidden" class="input-text" value="" id="supplierNumber" name="supplierNumber" >
@@ -50,47 +51,47 @@
         <div class="row cl">
             <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>供应商名称:</label>
             <div class="formControls col-xs-8 col-sm-9">
-				<input type="text" class="input-text" value="${ptsSupplier.supplierName!''}" id="supplierName" name="supplierName" placeholder="请输入1-30位的名称,支持中文、英文字母" datatype="/^[a-zA-Z\u4e00-\u9fa5]{1,30}$/" errormsg="供应商名称请输入1-30位的中文、英文字母!">
+				<input type="text" class="input-text" value="${ptsSupplier.supplierName!''}" id="supplierName" name="supplierName" placeholder="请输入0-30位的名称,支持中文、英文字母" datatype="/^[a-zA-Z\u4e00-\u9fa5]{1,30}$/" errormsg="供应商名称请输入0-30位的中文、英文字母!">
             </div>
         </div>
 
         <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>供应商简称:</label>
+            <label class="form-label col-xs-4 col-sm-3">供应商简称:</label>
             <div class="formControls col-xs-8 col-sm-9">
-                <input type="text" class="input-text" value="${ptsSupplier.supplierAbbreviation!''}" id="supplierAbbreviation" name="supplierAbbreviation" placeholder="请输入1-10位的简称,支持中文、英文字母" datatype="/^[a-zA-Z\u4e00-\u9fa5]{1,10}$/" errormsg="供应商简称请输入1-10位的中文、英文字母!">
+                <input type="text" class="input-text" value="${ptsSupplier.supplierAbbreviation!''}" id="supplierAbbreviation" name="supplierAbbreviation" placeholder="请输入0-10位的简称,支持中文、英文字母" datatype="/^\s*$/|/^[a-zA-Z\u4e00-\u9fa5]{1,10}$/" errormsg="供应商简称请输入0-10位的中文、英文字母!">
             </div>
         </div>
 
         <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>联系人姓名:</label>
+            <label class="form-label col-xs-4 col-sm-3">联系人姓名:</label>
             <div class="formControls col-xs-8 col-sm-9">
-                <input type="text" class="input-text" value="${ptsSupplier.supplierContactPerson!''}" id="supplierContactPerson" name="supplierContactPerson" placeholder="请输入1-10位的联系人姓名,支持中文、英文字母" datatype="/^[a-zA-Z\u4e00-\u9fa5]{1,10}$/" errormsg="联系人姓名请输入1-10位的中文、英文字母!">
+                <input type="text" class="input-text" value="${ptsSupplier.supplierContactPerson!''}" id="supplierContactPerson" name="supplierContactPerson" placeholder="请输入0-10位的联系人姓名,支持中文、英文字母" datatype="/^\s*$/|/^[a-zA-Z\u4e00-\u9fa5]{1,10}$/" errormsg="联系人姓名请输入0-10位的中文、英文字母!">
             </div>
         </div>
 
         <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>联系人电话:</label>
+            <label class="form-label col-xs-4 col-sm-3">联系人电话:</label>
             <div class="formControls col-xs-8 col-sm-9">
-                <input type="text" class="input-text" value="${ptsSupplier.supplierTel!''}" id="supplierTel" name="supplierTel" placeholder="请输入联系人电话" datatype="m" errormsg="联系人电话格式不正确!">
+                <input type="text" class="input-text" value="${ptsSupplier.supplierTel!''}" id="supplierTel" name="supplierTel" placeholder="请输入联系人电话" datatype="/^\s*$/|m" errormsg="联系人电话格式不正确!">
             </div>
         </div>
 
         <div class="row cl">
             <label class="form-label col-xs-4 col-sm-3">联系人座机:</label>
             <div class="formControls col-xs-8 col-sm-9">
-                <input type="text" class="input-text" value="${ptsSupplier.supplierPhone!''}" id="supplierPhone" name="supplierPhone" placeholder="请输入联系人座机" datatype="/^\s*$/|/^0\d{2,3}-?\d{7,8}$/" errormsg="联系人座机格式不正确!">
+                <input type="text" class="input-text" value="${ptsSupplier.supplierPhone!''}" id="supplierPhone" name="supplierPhone" placeholder="请输入联系人座机" datatype="/^\s*$/|/^\s*$/|/^0\d{2,3}-?\d{7,8}$/" errormsg="联系人座机格式不正确!">
             </div>
         </div>
 
         <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>联系人邮箱:</label>
+            <label class="form-label col-xs-4 col-sm-3">联系人邮箱:</label>
             <div class="formControls col-xs-8 col-sm-9">
-                <input type="text" class="input-text" value="${ptsSupplier.supplierEmail!''}" id="supplierEmail" name="supplierEmail" placeholder="请输入联系人邮箱" datatype="e" errormsg="联系人邮箱格式不正确!">
+                <input type="text" class="input-text" value="${ptsSupplier.supplierEmail!''}" id="supplierEmail" name="supplierEmail" placeholder="请输入联系人邮箱" datatype="/^\s*$/|e" errormsg="联系人邮箱格式不正确!">
             </div>
         </div>
 
         <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>供应商地址:</label>
+            <label class="form-label col-xs-4 col-sm-3">供应商地址:</label>
             <div class="formControls col-xs-8 col-sm-9">
                 <textarea name="supplierAddress" id="supplierAddress" cols="" rows="" class="textarea"
                           placeholder="联系人地址,最多支持100字符" onKeyUp="$.Huitextarealength(this,100)" >${ptsSupplier.supplierAddress!''}</textarea>

BIN
watero-rst-web/src/main/webapp/common/images/uploadExcel/零件上传模板.xls