tudc преди 3 години
родител
ревизия
3b06df1a28
променени са 100 файла, в които са добавени 2238 реда и са изтрити 343 реда
  1. 104 172
      adm/src/main/java/com/minpay/common/util/ChineseNumber.java
  2. 27 10
      adm/src/main/java/com/minpay/guomao/templateexport/action/TemplateExportAction.java
  3. 2 5
      adm/src/main/java/com/minpay/guomao/warehousemanage/action/WarehouseInventoryAction.java
  4. 1 1
      adm/src/main/resources/com/minpay/db/table/own/mapper/PurchaseAndSalesManageMapper.xml
  5. 3 42
      adm/src/main/webapp/admin/contactManage/addContact.html
  6. 2 3
      adm/src/main/webapp/admin/contactManage/contactManage.html
  7. 8 57
      adm/src/main/webapp/admin/contactManage/editContact.html
  8. 90 19
      adm/src/main/webapp/admin/longcontractManage/longpcManage.html
  9. 0 2
      adm/src/main/webapp/js/min-loader-next.js
  10. 1525 2
      adm/src/main/webapp/layui/css/layui.css
  11. 29 2
      adm/src/main/webapp/layui/css/modules/code.css
  12. 16 0
      adm/src/main/webapp/layui/css/modules/laydate/default/font.css
  13. 152 2
      adm/src/main/webapp/layui/css/modules/laydate/default/laydate.css
  14. 179 2
      adm/src/main/webapp/layui/css/modules/layer/default/layer.css
  15. BIN
      adm/src/main/webapp/layui/font/iconfont.eot
  16. 100 8
      adm/src/main/webapp/layui/font/iconfont.svg
  17. BIN
      adm/src/main/webapp/layui/font/iconfont.ttf
  18. BIN
      adm/src/main/webapp/layui/font/iconfont.woff
  19. BIN
      adm/src/main/webapp/layui/font/iconfont.woff2
  20. BIN
      adm/src/main/webapp/layui/images/face/0.gif
  21. BIN
      adm/src/main/webapp/layui/images/face/1.gif
  22. BIN
      adm/src/main/webapp/layui/images/face/10.gif
  23. BIN
      adm/src/main/webapp/layui/images/face/11.gif
  24. BIN
      adm/src/main/webapp/layui/images/face/12.gif
  25. BIN
      adm/src/main/webapp/layui/images/face/13.gif
  26. BIN
      adm/src/main/webapp/layui/images/face/14.gif
  27. BIN
      adm/src/main/webapp/layui/images/face/15.gif
  28. BIN
      adm/src/main/webapp/layui/images/face/16.gif
  29. BIN
      adm/src/main/webapp/layui/images/face/17.gif
  30. BIN
      adm/src/main/webapp/layui/images/face/18.gif
  31. BIN
      adm/src/main/webapp/layui/images/face/19.gif
  32. BIN
      adm/src/main/webapp/layui/images/face/2.gif
  33. BIN
      adm/src/main/webapp/layui/images/face/20.gif
  34. BIN
      adm/src/main/webapp/layui/images/face/21.gif
  35. BIN
      adm/src/main/webapp/layui/images/face/22.gif
  36. BIN
      adm/src/main/webapp/layui/images/face/23.gif
  37. BIN
      adm/src/main/webapp/layui/images/face/24.gif
  38. BIN
      adm/src/main/webapp/layui/images/face/25.gif
  39. BIN
      adm/src/main/webapp/layui/images/face/26.gif
  40. BIN
      adm/src/main/webapp/layui/images/face/27.gif
  41. BIN
      adm/src/main/webapp/layui/images/face/28.gif
  42. BIN
      adm/src/main/webapp/layui/images/face/29.gif
  43. BIN
      adm/src/main/webapp/layui/images/face/3.gif
  44. BIN
      adm/src/main/webapp/layui/images/face/30.gif
  45. BIN
      adm/src/main/webapp/layui/images/face/31.gif
  46. BIN
      adm/src/main/webapp/layui/images/face/32.gif
  47. BIN
      adm/src/main/webapp/layui/images/face/33.gif
  48. BIN
      adm/src/main/webapp/layui/images/face/34.gif
  49. BIN
      adm/src/main/webapp/layui/images/face/35.gif
  50. BIN
      adm/src/main/webapp/layui/images/face/36.gif
  51. BIN
      adm/src/main/webapp/layui/images/face/37.gif
  52. BIN
      adm/src/main/webapp/layui/images/face/38.gif
  53. BIN
      adm/src/main/webapp/layui/images/face/39.gif
  54. BIN
      adm/src/main/webapp/layui/images/face/4.gif
  55. BIN
      adm/src/main/webapp/layui/images/face/40.gif
  56. BIN
      adm/src/main/webapp/layui/images/face/41.gif
  57. BIN
      adm/src/main/webapp/layui/images/face/42.gif
  58. BIN
      adm/src/main/webapp/layui/images/face/43.gif
  59. BIN
      adm/src/main/webapp/layui/images/face/44.gif
  60. BIN
      adm/src/main/webapp/layui/images/face/45.gif
  61. BIN
      adm/src/main/webapp/layui/images/face/46.gif
  62. BIN
      adm/src/main/webapp/layui/images/face/47.gif
  63. BIN
      adm/src/main/webapp/layui/images/face/48.gif
  64. BIN
      adm/src/main/webapp/layui/images/face/49.gif
  65. BIN
      adm/src/main/webapp/layui/images/face/5.gif
  66. BIN
      adm/src/main/webapp/layui/images/face/50.gif
  67. BIN
      adm/src/main/webapp/layui/images/face/51.gif
  68. BIN
      adm/src/main/webapp/layui/images/face/52.gif
  69. BIN
      adm/src/main/webapp/layui/images/face/53.gif
  70. BIN
      adm/src/main/webapp/layui/images/face/54.gif
  71. BIN
      adm/src/main/webapp/layui/images/face/55.gif
  72. BIN
      adm/src/main/webapp/layui/images/face/56.gif
  73. BIN
      adm/src/main/webapp/layui/images/face/57.gif
  74. BIN
      adm/src/main/webapp/layui/images/face/58.gif
  75. BIN
      adm/src/main/webapp/layui/images/face/59.gif
  76. BIN
      adm/src/main/webapp/layui/images/face/6.gif
  77. BIN
      adm/src/main/webapp/layui/images/face/60.gif
  78. BIN
      adm/src/main/webapp/layui/images/face/61.gif
  79. BIN
      adm/src/main/webapp/layui/images/face/62.gif
  80. BIN
      adm/src/main/webapp/layui/images/face/63.gif
  81. BIN
      adm/src/main/webapp/layui/images/face/64.gif
  82. BIN
      adm/src/main/webapp/layui/images/face/65.gif
  83. BIN
      adm/src/main/webapp/layui/images/face/66.gif
  84. BIN
      adm/src/main/webapp/layui/images/face/67.gif
  85. BIN
      adm/src/main/webapp/layui/images/face/68.gif
  86. BIN
      adm/src/main/webapp/layui/images/face/69.gif
  87. BIN
      adm/src/main/webapp/layui/images/face/7.gif
  88. BIN
      adm/src/main/webapp/layui/images/face/70.gif
  89. BIN
      adm/src/main/webapp/layui/images/face/71.gif
  90. BIN
      adm/src/main/webapp/layui/images/face/8.gif
  91. BIN
      adm/src/main/webapp/layui/images/face/9.gif
  92. 0 2
      adm/src/main/webapp/layui/lay/modules/carousel.js
  93. 0 2
      adm/src/main/webapp/layui/lay/modules/code.js
  94. 0 2
      adm/src/main/webapp/layui/lay/modules/element.js
  95. 0 2
      adm/src/main/webapp/layui/lay/modules/flow.js
  96. 0 2
      adm/src/main/webapp/layui/lay/modules/form.js
  97. 0 2
      adm/src/main/webapp/layui/lay/modules/laydate.js
  98. 0 2
      adm/src/main/webapp/layui/lay/modules/layedit.js
  99. 0 2
      adm/src/main/webapp/layui/lay/modules/layer.js
  100. 0 0
      adm/src/main/webapp/layui/lay/modules/laypage.js

+ 104 - 172
adm/src/main/java/com/minpay/common/util/ChineseNumber.java

@@ -1,10 +1,6 @@
 package com.minpay.common.util;
  
-import java.text.DecimalFormat;
-import java.util.HashMap;
-import java.util.Map;
-
-import com.minpay.common.util.StringHelper;
+import java.math.BigDecimal;
  
 /**
 * @Package:cn.ucaner.framework.utils  
@@ -18,186 +14,122 @@ import com.minpay.common.util.StringHelper;
 * @version    V1.1
  */
 public class ChineseNumber {
-     
-    private static final String[] BEFORE_SCALE = { "万", "仟", "佰", "拾", "亿", "仟", "佰", "拾", "万", "仟", "佰", "拾", "" };
-     
-    private static final String[] AFTER_SCALE = { "角", "分" };
-     
-    private static final String DEFAULT_PATH_SEPARATOR = ".";
- 
-    private static final Map<String, String> NUMBER_MAPPING = new HashMap<String, String>();
-    static {
-        NUMBER_MAPPING.put("0", "零");
-        NUMBER_MAPPING.put("1", "壹");
-        NUMBER_MAPPING.put("2", "贰");
-        NUMBER_MAPPING.put("3", "叁");
-        NUMBER_MAPPING.put("4", "肆");
-        NUMBER_MAPPING.put("5", "伍");
-        NUMBER_MAPPING.put("6", "陆");
-        NUMBER_MAPPING.put("7", "柒");
-        NUMBER_MAPPING.put("8", "捌");
-        NUMBER_MAPPING.put("9", "玖");
-    }
- 
-    public static String getChineseNumber(String number) {
-        return getChineseNumber(number, null, null);
-    }
- 
-    public static String getChineseNumber(String number, String unit, String postfix) {
- 
-        String[] numbers = StringHelper.strToStrArray(number, DEFAULT_PATH_SEPARATOR);
-        if (numbers.length > 2) {
-            new NumberFormatException("数字格式错误!");
+    /**
+     * 汉语中数字大写
+     */
+    private static final String[] CN_UPPER_NUMBER = { "零", "壹", "贰", "叁", "肆",
+            "伍", "陆", "柒", "捌", "玖" };
+    /**
+     * 汉语中货币单位大写,这样的设计类似于占位符
+     */
+    private static final String[] CN_UPPER_MONETRAY_UNIT = { "分", "角", "元",
+            "拾", "佰", "仟", "万", "拾", "佰", "仟", "亿", "拾", "佰", "仟", "兆", "拾",
+            "佰", "仟" };
+    /**
+     * 特殊字符:整
+     */
+    private static final String CN_FULL = "整";
+    /**
+     * 特殊字符:负
+     */
+    private static final String CN_NEGATIVE = "负";
+    /**
+     * 金额的精度,默认值为2
+     */
+    private static final int MONEY_PRECISION = 2;
+    /**
+     * 特殊字符:零元整
+     */
+    private static final String CN_ZEOR_FULL = "零元" + CN_FULL;
+
+    public static String getChineseNumber(String num){
+    	return getChineseNumber(new BigDecimal(num));
+    }
+    /**
+     * 把输入的金额转换为汉语中人民币的大写
+     * 
+     * @param numberOfMoney
+     *            输入的金额
+     * @return 对应的汉语大写
+     */
+    public static String getChineseNumber(BigDecimal numberOfMoney) {
+        StringBuffer sb = new StringBuffer();
+        // -1, 0, or 1 as the value of this BigDecimal is negative, zero, or
+        // positive.
+        int signum = numberOfMoney.signum();
+        // 零元整的情况
+        if (signum == 0) {
+            return CN_ZEOR_FULL;
         }
-        int length = numbers[0].length();
-        int isZero = 0;
-        StringBuffer result = new StringBuffer();
- 
-        for (int i = 0; i < length; i++) {
-            String digit = CommonUtil.objToString(numbers[0].charAt(i));
- 
-            boolean allZero = true; // 如果后继的全部是零,则跳出
-            for (int j = i; j < length; j++) {
-                if (numbers[0].charAt(j) != '0') {
-                    allZero = false;
-                    break;
-                }
-            }
- 
-            if (allZero) {
-                boolean hasValue = false;
-                for (int z = i; z >= 0; z--) {
-                    if (numbers[0].charAt(z) != '0' && length - z <= 7 && length - z >= 5) {
-                        hasValue = true;
-                        break;
-                    }
-                }
-                // 加万单位
-                if ( ( length - i > 4 && length <= 8 ) || ( hasValue && length - i > 4 )) {
-                    result.append(BEFORE_SCALE[8]);
-                }
-                // 加亿单位
-                if (length - i >= 9) {
-                    result.append(BEFORE_SCALE[4]);
-                }
+        // 这里会进行金额的四舍五入
+        long number = numberOfMoney.movePointRight(MONEY_PRECISION)
+                .setScale(0, 4).abs().longValue();
+        // 得到小数点后两位值
+        long scale = number % 100;
+        int numUnit = 0;
+        int numIndex = 0;
+        boolean getZero = false;
+        // 判断最后两位数,一共有四中情况:00 = 0, 01 = 1, 10, 11
+        if (!(scale > 0)) {
+            numIndex = 2;
+            number = number / 100;
+            getZero = true;
+        }
+        if ((scale > 0) && (!(scale % 10 > 0))) {
+            numIndex = 1;
+            number = number / 10;
+            getZero = true;
+        }
+        int zeroSize = 0;
+        while (true) {
+            if (number <= 0) {
                 break;
             }
- 
-            if (length < 9 && length - i == 5) {
-                if (!"0".equals(digit) && isZero > 0) {
-                    result.append(NUMBER_MAPPING.get("0"));
+            // 每次获取到最后一个数
+            numUnit = (int) (number % 10);
+            if (numUnit > 0) {
+                if ((numIndex == 9) && (zeroSize >= 3)) {
+                    sb.insert(0, CN_UPPER_MONETRAY_UNIT[6]);
                 }
-                if ("0".equals(digit)) {
-                    result.append(BEFORE_SCALE[8]);
-                    if (isZero > 0) {
-                        result.append(NUMBER_MAPPING.get("0"));
-                    }
-                    continue;
+                if ((numIndex == 13) && (zeroSize >= 3)) {
+                    sb.insert(0, CN_UPPER_MONETRAY_UNIT[10]);
                 }
-            }
-            if ("0".equals(digit) && length > 9 && length - i == 9) {
-                result.append(BEFORE_SCALE[4]);
-                continue;
-            }
- 
-            if (isZero < 1 || !"0".equals(digit)) {
-                if ("0".equals(digit)) {
-                    if (length - i != 6 && length - i != 7) {
-                        result.append(NUMBER_MAPPING.get(digit));
-                    }
-                } else {
-                    result.append(NUMBER_MAPPING.get(digit));
+                sb.insert(0, CN_UPPER_MONETRAY_UNIT[numIndex]);
+                sb.insert(0, CN_UPPER_NUMBER[numUnit]);
+                getZero = false;
+                zeroSize = 0;
+            } else {
+                ++zeroSize;
+                if (!(getZero)) {
+                    sb.insert(0, CN_UPPER_NUMBER[numUnit]);
                 }
- 
-                if (!"0".equals(digit)) {
-                    result.append(BEFORE_SCALE[BEFORE_SCALE.length - length + i]);
+                if (numIndex == 2) {
+                    if (number > 0) {
+                        sb.insert(0, CN_UPPER_MONETRAY_UNIT[numIndex]);
+                    }
+                } else if (((numIndex - 2) % 4 == 0) && (number % 1000 > 0)) {
+                    sb.insert(0, CN_UPPER_MONETRAY_UNIT[numIndex]);
                 }
+                getZero = true;
             }
- 
-            if ("0".equals(digit)) {
-                isZero++;
-            } else {
-                isZero = 0;
-            }
+            // 让number每次都去掉最后一个数
+            number = number / 10;
+            ++numIndex;
         }
-        result.append(unit == null ? "圆" : result.append(unit));
- 
-        if (numbers.length == 1) {
-            result.append(postfix == null ? "整" : result.append(postfix));
-            return result.toString();
+        // 如果signum == -1,则说明输入的数字为负数,就在最前面追加特殊字符:负
+        if (signum == -1) {
+            sb.insert(0, CN_NEGATIVE);
         }
- 
-        length = numbers[1].length();
-        for (int j = 0; j < length; j++) {
-            if (j > 2) {
-                break;
-            }
-            if (numbers[1].charAt(j) == '0') {
-                continue;
-            }
-            result.append(NUMBER_MAPPING.get(CommonUtil.objToString(numbers[1].charAt(j))));
-            result.append(AFTER_SCALE[j]);
+        // 输入的数字小数点后两位为"00"的情况,则要在最后追加特殊字符:整
+        if (!(scale > 0)) {
+            sb.append(CN_FULL);
         }
- 
-        result.append(postfix == null ? "整" : result.append(postfix));
- 
-        return result.toString();
-    }
- 
-    public static String getChineseNumber(int number) {
-        return getChineseNumber(new Integer(number));
-    }
- 
-    public static String getChineseNumber(int number, String unit, String postfix) {
-        return getChineseNumber(new Integer(number), unit, postfix);
-    }
- 
-    public static String getChineseNumber(Long number) {
-        return getChineseNumber(number.toString(), null, null);
-    }
- 
-    public static String getChineseNumber(Integer number) {
-        return getChineseNumber(number.toString(), null, null);
-    }
- 
-    public static String getChineseNumber(Integer number, String unit, String postfix) {
-        return getChineseNumber(number.toString(), unit, postfix);
+        return sb.toString();
     }
- 
-    public static String getChineseNumber(Long number, String unit, String postfix) {
-        return getChineseNumber(number.toString(), unit, postfix);
-    }
- 
-    public static String getChineseNumber(long number) {
-        return getChineseNumber(new Long(number));
-    }
- 
-    public static String getChineseNumber(long number, String unit, String postfix) {
-        return getChineseNumber(new Long(number), unit, postfix);
-    }
- 
-    public static String getChineseNumber(double number, String unit, String postfix) {
-        DecimalFormat f = (DecimalFormat) DecimalFormat.getInstance();
-        f.applyLocalizedPattern("#.##");
-        return getChineseNumber(f.format(number), unit, postfix);
-    }
- 
-    public static String getChineseNumber(double number) {
-        return getChineseNumber(number, null, null);
-    }
- 
-    public static String getChineseNumber(Double number) {
-        return getChineseNumber(number.doubleValue());
-    }
- 
-    public static String getChineseNumber(Double number, String unit, String postfix) {
-        return getChineseNumber(number.doubleValue(), unit, postfix);
-    }
- 
+
     public static void main(String[] args) {
-        System.out.println(getChineseNumber(1994));
-        System.out.println(getChineseNumber(1994.1115));
-        System.out.println(getChineseNumber(19941115));
+        String s = getChineseNumber("3521.00");
+        System.out.println(s);
     }
  
 }

+ 27 - 10
adm/src/main/java/com/minpay/guomao/templateexport/action/TemplateExportAction.java

@@ -89,6 +89,9 @@ public class TemplateExportAction implements IMINAction {
 			@MINParam(key = "acicId") String acicId,
 			@MINParam(key = "conType") String conType,
 			@MINParam(key = "busiessType") String busiessType,
+			@MINParam(key = "contractName") String contractName,
+			@MINParam(key = "contractPhone") String contractPhone,
+			@MINParam(key = "address") String address,
 			HttpServletResponse response,
 			HttpServletRequest MINRequest,
 			MINSession session) throws MINBusinessException, IOException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException {
@@ -225,15 +228,6 @@ public class TemplateExportAction implements IMINAction {
 		String zhongzhiTime = CommonUtil.objToString(list.get(0).get("endDate"));
 		createTime = createTime.substring(0,8);
 		createTime = DateUtil.getDifferentTimeByMinute(createTime, 0, DateUtil.ZH_DATE_FORMAT_DB);
-		//时间转换
-//		SimpleDateFormat format = new SimpleDateFormat("yyyy年MM月dd日");
-//		Date date = null;
-//		try {
-//			date = format.parse(createTime);
-//		} catch (ParseException e) {
-//			// TODO Auto-generated catch block
-//			e.printStackTrace();
-//		}
 		//合同签订日期
 		String dates = createTime;
 		//合同单号
@@ -424,8 +418,31 @@ public class TemplateExportAction implements IMINAction {
 		        put("chineseNb", chineseNb);//中文大写
 		        put("table", new MiniTableRenderData(header, datas));// 产品表格信息
 		        Date date = new Date();
-		        SimpleDateFormat sb = new SimpleDateFormat("yyyy年/MM月/dd/日");
+		        SimpleDateFormat sb = new SimpleDateFormat("yyyy年/MM月/dd日");
 		        put("payDate", sb.format(date));//支付日期
+		        
+		        // 采购合同
+		        if("00".equals(busiessType)) {
+		        	// 卖方信息
+		        	put("sellerContractName", contractName);
+		        	put("sellerContractPhone", contractPhone);
+		        	put("sellerAddress", address);
+		        	// 买方信息
+		        	put("buyerContractName", "");
+		        	put("buyerContractPhone", "");
+		        	put("buyerAddress", "");
+		        // 销售合同
+		        } else {
+		        	// 卖方信息
+		        	put("sellerContractName", "");
+		        	put("sellerContractPhone", "");
+		        	put("sellerAddress", "");
+		        	// 买方信息
+		        	put("buyerContractName", contractName);
+		        	put("buyerContractPhone", contractPhone);
+		        	put("buyerAddress", address);
+		        }
+		        
 		}});
 		
 		response.setContentType("multipart/form-data"); 

+ 2 - 5
adm/src/main/java/com/minpay/guomao/warehousemanage/action/WarehouseInventoryAction.java

@@ -819,14 +819,11 @@ public class WarehouseInventoryAction implements IMINAction{
 				//暂估单价
 				String ygPrice = map.get("ygPrice");
 				String amount = CommonUtil.multiply(reaWeight, realPrice,2);
-				if(CommonUtil.compare("0",ygPrice) == 0){
-					amount = "0";
-				}else{
-					amount = CommonUtil.divide(amount, ygPrice,2);
+				if(CommonUtil.compare("0",amount) == 0){
+					amount = CommonUtil.multiply(reaWeight, ygPrice,2);
 				}
 				map.put("amount",amount);
 			}
-			
 			// 销售订单查询 货源方
 			if (!"00".equals(type)) {
 				Service.lookup(IGuoMaoCommonService.class).queryHuoYuanFang(resList);

+ 1 - 1
adm/src/main/resources/com/minpay/db/table/own/mapper/PurchaseAndSalesManageMapper.xml

@@ -119,7 +119,7 @@
 			and AWST_ORDER_ID  IN (${orderIdList})
 		</if>
 	  	 <if test="entyTime != null and entyTime != ''">
-			and substr(AWST_CREATE_TIME,1,8) between substr((#{entyTime, jdbcType=VARCHAR}),1,8)
+			and AWST_ENTRY_TIME between substr((#{entyTime, jdbcType=VARCHAR}),1,8)
 	       		and substr((#{entyTime, jdbcType=VARCHAR}),12,19)
 		</if>
 		

+ 3 - 42
adm/src/main/webapp/admin/contactManage/addContact.html

@@ -29,28 +29,20 @@
 			</div>
 		</div>
 		<div class="layui-inline">
-			     <label class="layui-form-label">*部门:</label>
-	             <div class="layui-input-inline" id ="brhId" >
-				 </div>
-			</div>
-	</div>
-	
-	<div class="layui-form-item">	
-		<div class="layui-inline">
 			<label class="layui-form-label">*姓名:</label>
 			<div class="layui-input-inline">
 				<input type="tel" name="accName" id="accName" maxlength=20 lay-verify="accName" autocomplete="off" placeholder="请输入联系人姓名" class="layui-input">
 			</div>
 		</div>
+	</div>
+	
+	<div class="layui-form-item">	
 		<div class="layui-inline">
 			<label class="layui-form-label">*电话:</label>
 			<div class="layui-input-inline">
 				<input type="tel" name="phone" id="phone"  autocomplete="off" lay-verify="phone" maxlength=20 placeholder="请输入联系人电话号" class="layui-input">
 			</div>
 		</div>
-	</div>
-		
-	<div class="layui-form-item">
 		<div class="layui-inline">
             	<label class="layui-form-label">备注:</label>
 	            <div class="layui-input-inline">
@@ -58,7 +50,6 @@
 	            </div>
             </div>
 	</div>
-		
 		<input type="hidden" name="id"  id ='id'>
       <div class="layui-form-item box-button">
           <div class="layui-input-block">
@@ -74,42 +65,12 @@
 			$("#aciId").val(rowData.aciId);
 			$("#aciName").val(rowData.aciName);
  	});
-      layui.use('form', function(){
-        	  var form = layui.form;
-        	  //部门下拉
-   			$.request({
-				action : 'DepartmentManageAction/branchQueryDown',
-				data : {aciId : rowData.aciId},
-				success : function(data) {
-					var selectName ="brhId";
-					var html = '<select lay-verify="brhId" name="';
-					html = html + selectName;
-					html = html + '" lay-filter="brhId';
-					html = html + '"';
-					html = html + '><option value="">请选择部门</option>';
-					$.each(data.data, function(i,j) {
-						  html = html + '<option ';
-						  html = html + 'value="';
-					      html = html + j.id + '">';
-					      html = html + j.name+ '</option>';
-					}) 
-					html = html + '</select>';
-					$("#brhId").html(html);
-					form.render();
-				},
-			});
-   		});
     layui.use(['form', 'layedit', 'laydate','layer'], function() {
         var form = layui.form,
         layer = layui.layer,
         layedit = layui.layedit,
         laydate = layui.laydate;
         form.verify({
-        	brhId: function(value) {
-        		if(isEmpty(value)){
-		    		return '请选择部门!';
-                }
-        	},
         	accName: function(value) {
         		if(isEmpty(value)){
 		    		return '请输入姓名!';

+ 2 - 3
adm/src/main/webapp/admin/contactManage/contactManage.html

@@ -68,10 +68,9 @@
 		    ,page: true //开启分页
 		    ,cols: [[ //表头
 		       {type:'numbers',title: '序号',width:"5%"}   
-		      ,{field: 'aciName', title: '客户名称', width:"15%"}
-		      ,{field: 'brhName', title: '部门', width:"10%"}
+		      ,{field: 'aciName', title: '客户名称', width:"25%"}
 		      ,{field: 'accName', title: '姓名', width:"10%"}
-		      ,{field: 'phone', title: '电话号', width:"10%"}
+		      ,{field: 'phone', title: '电话号', width:"15%"}
 		      ,{field: 'remarks', title: '备注', width:"25%"}
 		      ,{field: 'operate', title: '操作',width:"20%", toolbar: '#barDemo1'}	   
 		    ]]

+ 8 - 57
adm/src/main/webapp/admin/contactManage/editContact.html

@@ -29,34 +29,26 @@
 			</div>
 		</div>
 		<div class="layui-inline">
-			     <label class="layui-form-label">*部门:</label>
-	             <div class="layui-input-inline" id ="brhId" >
-				 </div>
-			</div>
-	</div>
-	
-	<div class="layui-form-item">	
-		<div class="layui-inline">
 			<label class="layui-form-label">*姓名:</label>
 			<div class="layui-input-inline">
 				<input type="tel" name="accName" id="accName" maxlength=20 lay-verify="accName" autocomplete="off" placeholder="请输入联系人姓名" class="layui-input">
 			</div>
 		</div>
+	</div>
+	
+	<div class="layui-form-item">	
 		<div class="layui-inline">
 			<label class="layui-form-label">*电话:</label>
 			<div class="layui-input-inline">
 				<input type="tel" name="phone" id="phone" lay-verify="phone" autocomplete="off" maxlength=20 placeholder="请输入联系人电话号" class="layui-input">
 			</div>
 		</div>
-	</div>
-		
-	<div class="layui-form-item">
 		<div class="layui-inline">
-            	<label class="layui-form-label">备注:</label>
-	            <div class="layui-input-inline">
-	                <textarea id="remarks" name="remarks" style="width: 150%;"  placeholder="请输入备注" class="layui-textarea"></textarea>
-	            </div>
-            </div>
+           <label class="layui-form-label">备注:</label>
+           <div class="layui-input-inline">
+               <textarea id="remarks" name="remarks" style="width: 150%;"  placeholder="请输入备注" class="layui-textarea"></textarea>
+           </div>
+        </div>
 	</div>
         <input type="hidden" name="id"  id ='id'>
       <div class="layui-form-item box-button">
@@ -70,43 +62,7 @@
     //反现
        layui.use('form', function(){
     	    var rowData = layui.sessionData("ROW_DATA").NOW_ROW;
-    	    var brhId;
     	    layui.each(rowData, function(index, item){ 
-    	    	if(index=="brhId"){
-    	    	layui.use('form', function(){
-    				 	var form = layui.form;
-    				 	//部门下拉
-    		      	  	$.request({
-    		      			action : 'DepartmentManageAction/branchQueryDown',
-    		      			data : {aciId : rowData.aciId},
-    		      			success : function(data) {
-    		      				var selectName ="brhId";
-    		      				var html = '<select lay-verify="brhId" name="';
-    		      				html = html + selectName;
-    		      				html = html + '" lay-filter="brhId';
-    		      				html = html + '"';
-    		      				html = html + '><option value="">请选择部门</option>';
-    		      				$.each(data.data, function(i, j) {
-    		      					 if( j.id == item){
-          						    	  html = html + '<option ';
-          								  html = html + 'selected value="';
-          							      html = html + j.id + '">';
-          							      html = html + j.name+ '</option>';
-          						      }else{
-          								  html = html + '<option ';
-          								  html = html + 'value="';
-          							      html = html + j.id + '">';
-          							      html = html + j.name+ '</option>';
-          						      }
-    		      				}) 
-    		      				html = html + '</select>';
-    		      				$("#brhId").html(html);
-    		      				form.render();
-    		      			},
-    		      		});  
-    	    	});	
-    		}
-    	    	
     	    	$("#"+index+"").val(item);
     	    })
     	});  
@@ -132,11 +88,6 @@
             
           //自定义验证规则
           form.verify({
-        	  brhId: function(value) {
-          		if(isEmpty(value)){
-  		    		return '请选择部门!';
-                  }
-          	},
           	accName: function(value) {
           		if(isEmpty(value)){
   		    		return '请输入姓名!';

+ 90 - 19
adm/src/main/webapp/admin/longcontractManage/longpcManage.html

@@ -49,17 +49,24 @@
 	       	</div>
 	  </form>
 	</div>
-		<div class="shadow-content"  >
-			<div class="gray-title demoTable">
-				<button class="layui-btn left-bnt1 in-b" data-type="addLongpc">
-	 				<i class="layui-icon">&#xe61f;</i> 添加
-	  			</button>
-	  			<button class="layui-btn left-bnt1 in-b" id="down" style="display: none;">
-	 				<i class="layui-icon">&#xe601;</i>  导出
-	  			</button>
-			</div>
-			<table id="tableTest" lay-filter="tableFilter"></table>
+	<div class="shadow-content"  >
+		<div class="gray-title demoTable">
+			<button class="layui-btn left-bnt1 in-b" data-type="addLongpc">
+ 				<i class="layui-icon">&#xe61f;</i> 添加
+  			</button>
+  			<button class="layui-btn left-bnt1 in-b" id="down" style="display: none;">
+ 				<i class="layui-icon">&#xe601;</i>  导出
+  			</button>
 		</div>
+		<table id="tableTest" lay-filter="tableFilter"></table>
+	</div>
+	
+	<div id="chooseContractAndAddress" class="shadow-content" style = "display : none;">
+		<span>选择联系人</span>
+		<table id="tableCheckContract" lay-filter="tableCheckContractFilter"></table>
+		<span>选择详细地址</span>
+		<table id="tableCheckAddress" lay-filter="tableCheckAddressFilter"></table>
+	</div>
     <!--操作功能-->
     <script type="text/html" id="barDemo">
 {{#  if(d.stt !="04"){ }}
@@ -265,17 +272,81 @@
 						conType:conType
 					},
 					success : function(resData) {
-					 var modeklist =  resData.data[0].modeklist;
-					 if(modeklist.length >0){
-						 window.open(
-									"../../TemplateExportAction/export?MINView=JSON&acicId="+ data.acicId+'&conType='+conType+'&busiessType='+type);
-					 }else{
-						 layer.alert('产品没有关联合同模板!', {
+						 var modeklist =  resData.data[0].modeklist;
+						 if(modeklist.length >0){
+							 table.render({
+								 id : 'tableCheckContract'
+							    ,elem: '#tableCheckContract'
+							    ,limit:1000
+							    ,url: 'ContactManageAction/queryContact' //数据接口
+							    ,method: 'post'
+							    ,where:{MINView:"JSON", aciId: type == '00'?data.sellerId:data.buyerId}
+							    ,page: true //开启分页
+							    ,cols: [[ //表头
+					              {type:'radio'}
+							      ,{type:'numbers',title: '序号',width:"5%"}   
+							      ,{field: 'accName', title: '姓名', width:"10%"}
+							      ,{field: 'phone', title: '电话号', width:"10%"}
+							      ,{field: 'remarks', title: '备注', width:"15%"}
+							    ]]
+							    ,done: function(res, curr, count){
+						      	}
+							    ,even: true //开启隔行背景
+							});
+							table.render({
+								 id : 'tableCheckAddress'
+							    ,elem: '#tableCheckAddress'
+							    ,limit:10
+							    ,url: 'AddressManageAction/queryAddress' //数据接口
+							    ,method: 'post'
+							    ,where:{MINView:"JSON", aciId: type == '00'?data.sellerId:data.buyerId}
+							    ,page: true //开启分页
+							    ,cols: [[ //表头
+					              {type:'radio'}
+							      ,{type:'numbers',title: '序号',width:"5%"}   
+							      ,{field: 'addressDetail', title: '具体地址', width:"15%", templet(d){
+							    	  return d.dname + d.cityName + d.areaName + d.address
+							      }}
+							      ,{field: 'shortName', title: '地址简称', width:"10%"}
+							      ,{field: 'remarks', title: '备注', width:"10%"}
+							    ]]
+							    ,done: function(res, curr, count){
+						      	}
+							    ,even: true //开启隔行背景
+							  });
+						 	layer.open({
+								  type: 1
+								  ,content: $('#chooseContractAndAddress') //这里content是一个DOM,注意:最好该元素要存放在body最外层,否则可能被其它的相对元素所影响
+								  ,area : '50%'
+								  ,btn: ['确认', '取消']
+						 	  	  ,yes: function(index, layero){
+						 	  		let tableCheckContract = table.checkStatus('tableCheckContract');
+						 	  		let contractName = "";
+						 	  		let contractPhone = "";
+						 	  		if(tableCheckContract.data.length > 0) {
+						 	  			contractName = tableCheckContract.data[0].accName;
+						 	  			contractPhone = tableCheckContract.data[0].phone;
+						 	  		}
+						 	  		let tableCheckAddress = table.checkStatus('tableCheckAddress');
+						 	  		let address = "";
+						 	  		if(tableCheckAddress.data.length > 0) {
+						 	  			address = tableCheckAddress.data[0].address;
+						 	  		}
+						 	  	 	window.open(
+									"../../TemplateExportAction/export?MINView=JSON&acicId="+ data.acicId+'&conType='+conType+'&busiessType='+type + '&contractName=' + contractName + '&contractPhone=' + contractPhone + '&address=' + address);
+						 		  }
+						 		  ,btn2: function(index, layero){
+						 			 layer.close(layer.index); 
+						 		  }
+							});
+						 	
+							
+						 }else{
+							 layer.alert('产品没有关联合同模板!', {
 								icon: 5,
 								title: "提示"
-							}); 
-					 }
-					  
+							 }); 
+						 }
 					},
 					error : function(data2){
 						layer.alert(data2.MINErrorMessage, {

+ 0 - 2
adm/src/main/webapp/js/min-loader-next.js

@@ -4,13 +4,11 @@ document.write('<link rel="stylesheet" href="../../css/font-awesome.min.css">');
 document.write('<link rel="stylesheet" href="../../css/app.css">');
 document.write('<link rel="stylesheet" href="../../css/default.css">');
 document.write('<link rel="stylesheet" href="../../css/css.css">');
-document.write('<link rel="stylesheet" href="../../layui/css/layui1.css">');
 document.write('<link rel="stylesheet" href="../../layui/css/index.css">');
 document.write('<link rel="stylesheet" href="../../font/iconfont.css">');
 document.write('<link rel="stylesheet" href="../../layui/css/master.css">');
 document.write('<script src="../../js/polyfill.min.js"></script>');
 document.write('<script src="../../layui/layui.js"></script>');
-document.write('<script src="../../layui/layui1.js"></script>');
 document.write('<script src="../../js/jquery.js"></script>');
 document.write('<script src="../../js/min.js"></script>');
 document.write('<script src="../../js/adm.js"></script>');

Файловите разлики са ограничени, защото са твърде много
+ 1525 - 2
adm/src/main/webapp/layui/css/layui.css


Файловите разлики са ограничени, защото са твърде много
+ 29 - 2
adm/src/main/webapp/layui/css/modules/code.css


+ 16 - 0
adm/src/main/webapp/layui/css/modules/laydate/default/font.css

@@ -0,0 +1,16 @@
+/** 图标字体 **/
+@font-face {font-family: 'laydate-icon';
+  src: url('./font/iconfont.eot');
+  src: url('./font/iconfont.eot#iefix') format('embedded-opentype'),
+  url('./font/iconfont.svg#iconfont') format('svg'),
+  url('./font/iconfont.woff') format('woff'),
+  url('./font/iconfont.ttf') format('truetype');
+}
+                    
+.laydate-icon{
+  font-family:"laydate-icon" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}

Файловите разлики са ограничени, защото са твърде много
+ 152 - 2
adm/src/main/webapp/layui/css/modules/laydate/default/laydate.css


Файловите разлики са ограничени, защото са твърде много
+ 179 - 2
adm/src/main/webapp/layui/css/modules/layer/default/layer.css


BIN
adm/src/main/webapp/layui/font/iconfont.eot


Файловите разлики са ограничени, защото са твърде много
+ 100 - 8
adm/src/main/webapp/layui/font/iconfont.svg


BIN
adm/src/main/webapp/layui/font/iconfont.ttf


BIN
adm/src/main/webapp/layui/font/iconfont.woff


BIN
adm/src/main/webapp/layui/font/iconfont.woff2


BIN
adm/src/main/webapp/layui/images/face/0.gif


BIN
adm/src/main/webapp/layui/images/face/1.gif


BIN
adm/src/main/webapp/layui/images/face/10.gif


BIN
adm/src/main/webapp/layui/images/face/11.gif


BIN
adm/src/main/webapp/layui/images/face/12.gif


BIN
adm/src/main/webapp/layui/images/face/13.gif


BIN
adm/src/main/webapp/layui/images/face/14.gif


BIN
adm/src/main/webapp/layui/images/face/15.gif


BIN
adm/src/main/webapp/layui/images/face/16.gif


BIN
adm/src/main/webapp/layui/images/face/17.gif


BIN
adm/src/main/webapp/layui/images/face/18.gif


BIN
adm/src/main/webapp/layui/images/face/19.gif


BIN
adm/src/main/webapp/layui/images/face/2.gif


BIN
adm/src/main/webapp/layui/images/face/20.gif


BIN
adm/src/main/webapp/layui/images/face/21.gif


BIN
adm/src/main/webapp/layui/images/face/22.gif


BIN
adm/src/main/webapp/layui/images/face/23.gif


BIN
adm/src/main/webapp/layui/images/face/24.gif


BIN
adm/src/main/webapp/layui/images/face/25.gif


BIN
adm/src/main/webapp/layui/images/face/26.gif


BIN
adm/src/main/webapp/layui/images/face/27.gif


BIN
adm/src/main/webapp/layui/images/face/28.gif


BIN
adm/src/main/webapp/layui/images/face/29.gif


BIN
adm/src/main/webapp/layui/images/face/3.gif


BIN
adm/src/main/webapp/layui/images/face/30.gif


BIN
adm/src/main/webapp/layui/images/face/31.gif


BIN
adm/src/main/webapp/layui/images/face/32.gif


BIN
adm/src/main/webapp/layui/images/face/33.gif


BIN
adm/src/main/webapp/layui/images/face/34.gif


BIN
adm/src/main/webapp/layui/images/face/35.gif


BIN
adm/src/main/webapp/layui/images/face/36.gif


BIN
adm/src/main/webapp/layui/images/face/37.gif


BIN
adm/src/main/webapp/layui/images/face/38.gif


BIN
adm/src/main/webapp/layui/images/face/39.gif


BIN
adm/src/main/webapp/layui/images/face/4.gif


BIN
adm/src/main/webapp/layui/images/face/40.gif


BIN
adm/src/main/webapp/layui/images/face/41.gif


BIN
adm/src/main/webapp/layui/images/face/42.gif


BIN
adm/src/main/webapp/layui/images/face/43.gif


BIN
adm/src/main/webapp/layui/images/face/44.gif


BIN
adm/src/main/webapp/layui/images/face/45.gif


BIN
adm/src/main/webapp/layui/images/face/46.gif


BIN
adm/src/main/webapp/layui/images/face/47.gif


BIN
adm/src/main/webapp/layui/images/face/48.gif


BIN
adm/src/main/webapp/layui/images/face/49.gif


BIN
adm/src/main/webapp/layui/images/face/5.gif


BIN
adm/src/main/webapp/layui/images/face/50.gif


BIN
adm/src/main/webapp/layui/images/face/51.gif


BIN
adm/src/main/webapp/layui/images/face/52.gif


BIN
adm/src/main/webapp/layui/images/face/53.gif


BIN
adm/src/main/webapp/layui/images/face/54.gif


BIN
adm/src/main/webapp/layui/images/face/55.gif


BIN
adm/src/main/webapp/layui/images/face/56.gif


BIN
adm/src/main/webapp/layui/images/face/57.gif


BIN
adm/src/main/webapp/layui/images/face/58.gif


BIN
adm/src/main/webapp/layui/images/face/59.gif


BIN
adm/src/main/webapp/layui/images/face/6.gif


BIN
adm/src/main/webapp/layui/images/face/60.gif


BIN
adm/src/main/webapp/layui/images/face/61.gif


BIN
adm/src/main/webapp/layui/images/face/62.gif


BIN
adm/src/main/webapp/layui/images/face/63.gif


BIN
adm/src/main/webapp/layui/images/face/64.gif


BIN
adm/src/main/webapp/layui/images/face/65.gif


BIN
adm/src/main/webapp/layui/images/face/66.gif


BIN
adm/src/main/webapp/layui/images/face/67.gif


BIN
adm/src/main/webapp/layui/images/face/68.gif


BIN
adm/src/main/webapp/layui/images/face/69.gif


BIN
adm/src/main/webapp/layui/images/face/7.gif


BIN
adm/src/main/webapp/layui/images/face/70.gif


BIN
adm/src/main/webapp/layui/images/face/71.gif


BIN
adm/src/main/webapp/layui/images/face/8.gif


BIN
adm/src/main/webapp/layui/images/face/9.gif


Файловите разлики са ограничени, защото са твърде много
+ 0 - 2
adm/src/main/webapp/layui/lay/modules/carousel.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 2
adm/src/main/webapp/layui/lay/modules/code.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 2
adm/src/main/webapp/layui/lay/modules/element.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 2
adm/src/main/webapp/layui/lay/modules/flow.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 2
adm/src/main/webapp/layui/lay/modules/form.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 2
adm/src/main/webapp/layui/lay/modules/laydate.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 2
adm/src/main/webapp/layui/lay/modules/layedit.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 2
adm/src/main/webapp/layui/lay/modules/layer.js


+ 0 - 0
adm/src/main/webapp/layui/lay/modules/laypage.js


Някои файлове не бяха показани, защото твърде много файлове са промени