|
@@ -1,14 +1,195 @@
|
|
|
+<%@ page import="com.thinkgem.jeesite.common.config.Global" %>
|
|
|
<%@ page contentType="text/html;charset=UTF-8" %>
|
|
|
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
|
|
|
<html>
|
|
|
<head>
|
|
|
<title>产品管理</title>
|
|
|
<meta name="decorator" content="default"/>
|
|
|
+ <style>
|
|
|
+ .titleClass{
|
|
|
+ font-weight: bolder;
|
|
|
+ margin-left: -40px;
|
|
|
+ }
|
|
|
+ .keyClass{
|
|
|
+ font-weight: bolder;
|
|
|
+ }
|
|
|
+ .paramRow {
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+ <style>
|
|
|
+ .clearfix::after{
|
|
|
+ content: "";
|
|
|
+ display: block;
|
|
|
+ clear: both;
|
|
|
+ }
|
|
|
+ .iconBox{
|
|
|
+ font-size: 0;
|
|
|
+ }/*
|
|
|
+ .controls{
|
|
|
+ margin-left: 0 !important;
|
|
|
+ }*/
|
|
|
+ .controls .conList{
|
|
|
+ display: inline-block;
|
|
|
+ margin-right: 15px;
|
|
|
+ }
|
|
|
+ .conList .btn:nth-of-type(1){
|
|
|
+ margin-left: 25px;
|
|
|
+ }
|
|
|
+ .select2-choice{
|
|
|
+ width: 100px;
|
|
|
+ }
|
|
|
+ .upload-content {
|
|
|
+ float: left;
|
|
|
+ margin-top: -100px;
|
|
|
+ margin-right: -40px;
|
|
|
+ }
|
|
|
+ .upload-content .conList .btn:nth-of-type(1) {
|
|
|
+ width: 90px;
|
|
|
+ height: 100px;
|
|
|
+ border: 2px solid #eee;
|
|
|
+ background: #fff;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ .upload-content .conList .btn:nth-of-type(1)>div {
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 50%;
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ color: #666;
|
|
|
+ }
|
|
|
+ .upload-content .conList .btn:nth-of-type(1) span {
|
|
|
+ font-size: 35px;
|
|
|
+ }
|
|
|
+ .upload-content .conList .btn:nth-of-type(1) h5 {
|
|
|
+ color: #666;
|
|
|
+ }
|
|
|
+ .cancel-upload {
|
|
|
+ background: transparent;
|
|
|
+ border: none;
|
|
|
+ box-shadow: none;
|
|
|
+ position: relative;
|
|
|
+ top: -38px;
|
|
|
+ left: -25px;
|
|
|
+ cursor: pointer;
|
|
|
+ z-index: 100;
|
|
|
+ }
|
|
|
+ .upload-content .conList ol li {
|
|
|
+ width: 114px;
|
|
|
+ min-height: 80px;
|
|
|
+ text-align: center;
|
|
|
+ background: #fff;
|
|
|
+ position: relative;
|
|
|
+ top: 120px;
|
|
|
+ margin-left: 2px;
|
|
|
+ height: 100px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
+ .hide-pic {
|
|
|
+ display: none !important;
|
|
|
+ }
|
|
|
+ .upload-image-list{
|
|
|
+ width: 660px;
|
|
|
+ float: left;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+ <style>
|
|
|
+ .iconBox{
|
|
|
+ font-size: 0;
|
|
|
+ }
|
|
|
+ .controls .conList{
|
|
|
+ display: inline-block;
|
|
|
+ margin-right: 15px;
|
|
|
+ }
|
|
|
+ .conList .btn:nth-of-type(1){
|
|
|
+ margin-left: 25px;
|
|
|
+ }
|
|
|
+ .select2-choice{
|
|
|
+ width: 100px;
|
|
|
+ }
|
|
|
+ .upload-content {
|
|
|
+ float: left;
|
|
|
+ margin-top: -70px;
|
|
|
+ margin-left: 20px !important;
|
|
|
+ }
|
|
|
+ .upload-content .conList .btn:nth-of-type(1) {
|
|
|
+ width: 90px;
|
|
|
+ height: 100px;
|
|
|
+ border: 2px solid #eee;
|
|
|
+ background: #fff;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ .upload-content .conList .btn:nth-of-type(1)>div {
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 50%;
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ color: #666;
|
|
|
+ }
|
|
|
+ .upload-content .conList .btn:nth-of-type(1) span {
|
|
|
+ font-size: 35px;
|
|
|
+ }
|
|
|
+ .upload-content .conList .btn:nth-of-type(1) h5 {
|
|
|
+ color: #666;
|
|
|
+ }
|
|
|
+ .cancel-upload {
|
|
|
+ background: transparent;
|
|
|
+ border: none;
|
|
|
+ box-shadow: none;
|
|
|
+ position: relative;
|
|
|
+ top: -38px;
|
|
|
+ left: -25px;
|
|
|
+ cursor: pointer;
|
|
|
+ z-index: 100;
|
|
|
+ }
|
|
|
+ .hide-pic {
|
|
|
+ display: none !important;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
<script type="text/javascript">
|
|
|
$(document).ready(function() {
|
|
|
//$("#name").focus();
|
|
|
$("#inputForm").validate({
|
|
|
submitHandler: function(form){
|
|
|
+ var commodityType = '${commodityType}';
|
|
|
+ var discription = $("#discription").val().trim();
|
|
|
+ var advantage = $("#advantage").val().trim();
|
|
|
+ var disadvantage = $("#disadvantage").val().trim();
|
|
|
+ var principle = $("#principle").val().trim();
|
|
|
+ var adaptiveMan = $("#adaptiveMan").val().trim();
|
|
|
+ var unAdaptiveMan = $("#unAdaptiveMan").val().trim();
|
|
|
+ var aroundOperation = $("#aroundOperation").val().trim();
|
|
|
+ if (discription === '') {
|
|
|
+ alertx("请输入" + commodityType + "概述");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (advantage === '') {
|
|
|
+ alertx("请输入" + commodityType + "优点");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (disadvantage === '') {
|
|
|
+ alertx("请输入" + commodityType + "缺点");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (principle === '') {
|
|
|
+ alertx("请输入" + commodityType + "原理");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (adaptiveMan === '') {
|
|
|
+ alertx("请输入适应人群");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (unAdaptiveMan === '') {
|
|
|
+ alertx("请输入不适应人群");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (aroundOperation === '') {
|
|
|
+ alertx("请输入术前术后");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
loading('正在提交,请稍等...');
|
|
|
form.submit();
|
|
|
},
|
|
@@ -27,142 +208,607 @@
|
|
|
</head>
|
|
|
<body>
|
|
|
<ul class="nav nav-tabs">
|
|
|
- <li><a href="${ctx}/baike/cmBaikeProduct/">产品列表</a></li>
|
|
|
- <li class="active"><a href="${ctx}/baike/cmBaikeProduct/form?id=${cmBaikeProduct.id}">产品${not empty cmBaikeProduct.id?'编辑':'添加'}查看</a></li>
|
|
|
+ <li><a href="${ctx}/baike/cmBaikeProduct/?commodityType=${cmBaikeProduct.commodityType}">${commodityType}</a></li>
|
|
|
+ <li class="active"><a href="${ctx}/baike/cmBaikeProduct/form?id=${cmBaikeProduct.id}&commodityType=${cmBaikeProduct.commodityType}">${commodityType}${not empty cmBaikeProduct.id?'编辑':'添加'}</a></li>
|
|
|
</ul><br/>
|
|
|
<form:form id="inputForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/save" method="post" class="form-horizontal">
|
|
|
<form:hidden path="id"/>
|
|
|
- <sys:message content="${message}"/>
|
|
|
+ <form:hidden path="commodityType"/>
|
|
|
+ <sys:message content="${message}"/>
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="control-label titleClass"><font color="red">*</font>${commodityType}简述</label>
|
|
|
+ </div>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label">名称:</label>
|
|
|
+ <label class="control-label"><font color="red">*</font>${commodityType}名称:</label>
|
|
|
<div class="controls">
|
|
|
<form:input path="name" htmlEscape="false" maxlength="50" class="input-xlarge "/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label">别名:</label>
|
|
|
+ <label class="control-label"><font color="red">*</font>${commodityType}别名:</label>
|
|
|
<div class="controls">
|
|
|
- <form:input path="alias" htmlEscape="false" maxlength="50" class="input-xlarge "/>
|
|
|
+ <form:input path="alias" htmlEscape="false" maxlength="50" class="input-xlarge " placeholder="输入英文名或者其他名称"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label">描述:</label>
|
|
|
- <div class="controls">
|
|
|
- <form:input path="discription" htmlEscape="false" maxlength="300" class="input-xlarge "/>
|
|
|
+ <label class="control-label"><font color="red">*</font>${commodityType}概述:</label>
|
|
|
+ <div class="controls" style="width:812px">
|
|
|
+ <form:textarea path="discription" htmlEscape="false" class="input-xlarge required hide" />
|
|
|
+ <div id="discriptionEditor" class="contentEditor">${cmBaikeProduct.discription}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label">图片:</label>
|
|
|
- <div class="controls">
|
|
|
- <form:input path="image" htmlEscape="false" class="input-xlarge "/>
|
|
|
+ <label class="control-label"><font color="red">*</font>${commodityType}图片:</label>
|
|
|
+ <div class="main-image-list" style="display: flex;flex-wrap: wrap">
|
|
|
+ <div class="controls upload-content iconBox mainImageBox" id="mainImageBox">
|
|
|
+ <div class="conList">
|
|
|
+ <form:hidden id="image" path="image" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
|
|
|
+ <sys:ckfinder input="image" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100"
|
|
|
+ maxHeight="100"/>
|
|
|
+ <br>
|
|
|
+ <label style="margin-left: 150px">建议图片分辨率210px*210px</label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="control-group paramList">
|
|
|
+ <label class="control-label titleClass"><font color="red">*</font>${commodityType}参数</label>
|
|
|
+ <button class="btn btn-primary" type="button" style="margin-left: 500px" onclick="addParam()">添加参数</button>
|
|
|
+ <div class="controls paramRow" id="paramRow0">
|
|
|
+ <input name="paramList[0].name" htmlEscape="false" class="input-small required" maxlength="15"
|
|
|
+ placeholder="例如:型号">
|
|
|
+ <input name="paramList[0].content" htmlEscape="false" class="input-xlarge required" maxlength="50"
|
|
|
+ placeholder="输入参数信息">
|
|
|
+ </div>
|
|
|
+ <div class="controls paramRow" id="paramRow1">
|
|
|
+ <input name="paramList[1].name" htmlEscape="false" class="input-small required" maxlength="15"
|
|
|
+ placeholder="例如:性质类型">
|
|
|
+ <input name="paramList[1].content" htmlEscape="false" class="input-xlarge required" maxlength="50"
|
|
|
+ placeholder="输入参数信息">
|
|
|
+ <a onclick="deleteParam(1)" style="cursor: pointer">删除</a>
|
|
|
+ </div>
|
|
|
+ <div class="controls paramRow" id="paramRow2">
|
|
|
+ <input name="paramList[2].name" htmlEscape="false" class="input-small required" maxlength="15"
|
|
|
+ placeholder="例如:成分">
|
|
|
+ <input name="paramList[2].content" htmlEscape="false" class="input-xlarge required" maxlength="50"
|
|
|
+ placeholder="输入参数信息">
|
|
|
+ <a onclick="deleteParam(2)" style="cursor: pointer">删除</a>
|
|
|
+ </div>
|
|
|
+ <div class="controls paramRow" id="paramRow3">
|
|
|
+ <input name="paramList[3].name" htmlEscape="false" class="input-small required" maxlength="15"
|
|
|
+ placeholder="例如:规格">
|
|
|
+ <input name="paramList[3].content" htmlEscape="false" class="input-xlarge required" maxlength="50"
|
|
|
+ placeholder="输入参数信息">
|
|
|
+ <a onclick="deleteParam(3)" style="cursor: pointer">删除</a>
|
|
|
+ </div>
|
|
|
+ <div class="controls paramRow" id="paramRow4">
|
|
|
+ <input name="paramList[4].name" htmlEscape="false" class="input-small required" maxlength="15"
|
|
|
+ placeholder="例如:性质类型">
|
|
|
+ <input name="paramList[4].content" htmlEscape="false" class="input-xlarge required" maxlength="50"
|
|
|
+ placeholder="输入参数信息">
|
|
|
+ <a onclick="deleteParam(4)" style="cursor: pointer">删除</a>
|
|
|
+ </div>
|
|
|
+ <div class="controls paramRow" id="paramRow5">
|
|
|
+ <input name="paramList[5].name" htmlEscape="false" class="input-small required" maxlength="15"
|
|
|
+ placeholder="例如:性质类型">
|
|
|
+ <input name="paramList[5].content" htmlEscape="false" class="input-xlarge required" maxlength="50"
|
|
|
+ placeholder="输入参数信息">
|
|
|
+ <a onclick="deleteParam(5)" style="cursor: pointer">删除</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label">优点:</label>
|
|
|
- <div class="controls">
|
|
|
- <form:input path="advantage" htmlEscape="false" maxlength="500" class="input-xlarge "/>
|
|
|
+ <label class="control-label keyClass"><font color="red">*</font>${commodityType}优点:</label>
|
|
|
+ <div class="controls" style="width:812px">
|
|
|
+ <form:textarea path="advantage" htmlEscape="false" class="input-xlarge required hide" />
|
|
|
+ <div id="advantageEditor" class="contentEditor">${cmBaikeProduct.advantage}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label">缺点:</label>
|
|
|
- <div class="controls">
|
|
|
- <form:input path="disadvantage" htmlEscape="false" maxlength="500" class="input-xlarge "/>
|
|
|
+ <label class="control-label keyClass"><font color="red">*</font>${commodityType}缺点:</label>
|
|
|
+ <div class="controls" style="width:812px">
|
|
|
+ <form:textarea path="disadvantage" htmlEscape="false" class="input-xlarge required hide" />
|
|
|
+ <div id="disadvantageEditor" class="contentEditor">${cmBaikeProduct.disadvantage}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label">原理:</label>
|
|
|
- <div class="controls">
|
|
|
- <form:input path="principle" htmlEscape="false" maxlength="500" class="input-xlarge "/>
|
|
|
+ <label class="control-label keyClass"><font color="red">*</font>${commodityType}原理:</label>
|
|
|
+ <div class="controls" style="width:812px">
|
|
|
+ <form:textarea path="principle" htmlEscape="false" class="input-xlarge required hide" />
|
|
|
+ <div id="principleEditor" class="contentEditor">${cmBaikeProduct.principle}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label">品牌:</label>
|
|
|
+ <label class="control-label titleClass"><font color="red">*</font>${commodityType}档案</label>
|
|
|
+ </div>
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="control-label"><font color="red">*</font>品牌:</label>
|
|
|
<div class="controls">
|
|
|
<form:input path="brand" htmlEscape="false" maxlength="50" class="input-xlarge "/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label">产地:</label>
|
|
|
+ <label class="control-label"><font color="red">*</font>产地:</label>
|
|
|
<div class="controls">
|
|
|
<form:input path="producePlace" htmlEscape="false" maxlength="50" class="input-xlarge "/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label">上市时间:</label>
|
|
|
+ <label class="control-label"><font color="red">*</font>上市时间:</label>
|
|
|
<div class="controls">
|
|
|
<input name="marketTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
|
|
|
value="<fmt:formatDate value="${cmBaikeProduct.marketTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
|
|
|
- onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
|
|
|
+ onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label">公司/供应商:</label>
|
|
|
+ <label class="control-label"><font color="red">*</font>公司/厂商:</label>
|
|
|
<div class="controls">
|
|
|
<form:input path="company" htmlEscape="false" maxlength="50" class="input-xlarge "/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label">NMPA认证时间:</label>
|
|
|
+ <label class="control-label"><font color="red">*</font>NMPA认证时间:</label>
|
|
|
<div class="controls">
|
|
|
<input name="nmpaTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
|
|
|
value="<fmt:formatDate value="${cmBaikeProduct.nmpaTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
|
|
|
- onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
|
|
|
+ onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="control-group" style="width: 1000px">
|
|
|
+ <label class="control-label keyClass"><font color="red">*</font>产品认证:</label>
|
|
|
+ <div class="auth-image-list" style="display: flex;flex-wrap: wrap">
|
|
|
+ <c:forEach items="${cmBaikeProduct.authImageList}" var="authImage" varStatus="index">
|
|
|
+ <div class="controls upload-content iconBox" id="authImageBox${index.index}">
|
|
|
+ <div class="conList">
|
|
|
+ <form:hidden id="authImage${index.index}" path="authImageList[${index.index}]" htmlEscape="false"
|
|
|
+ maxlength="255"
|
|
|
+ class="input-xlarge required"/>
|
|
|
+ <sys:ckfinder input="authImage${index.index}" type="images" uploadPath="/photo"
|
|
|
+ selectMultiple="false"
|
|
|
+ maxWidth="100" maxHeight="100"/><br>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </c:forEach>
|
|
|
+ <c:set var="size" value="${empty cmBaikeProduct.authImageList?0:cmBaikeProduct.authImageList.size()}"/>
|
|
|
+ <c:forEach var="emptyIndex" begin="${size}" end="${7}">
|
|
|
+ <div class="controls upload-content iconBox conList ${emptyIndex eq 0?'':'hide-pic'}" id="authImageBox${emptyIndex}" >
|
|
|
+ <div class="conList">
|
|
|
+ <form:hidden id="authImage${emptyIndex}" path="authImageList[${emptyIndex}]" htmlEscape="false"
|
|
|
+ maxlength="255"
|
|
|
+ class="input-xlarge required"/>
|
|
|
+ <sys:ckfinder input="authImage${emptyIndex}" type="images" uploadPath="/photo"
|
|
|
+ selectMultiple="false"
|
|
|
+ maxWidth="100" maxHeight="100"/><br>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </c:forEach>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label">适应人群:</label>
|
|
|
- <div class="controls">
|
|
|
- <form:input path="adaptiveMan" htmlEscape="false" maxlength="500" class="input-xlarge "/>
|
|
|
+ <label class="control-label keyClass"><font color="red">*</font>适应人群:</label>
|
|
|
+ <div class="controls" style="width:812px">
|
|
|
+ <form:textarea path="adaptiveMan" htmlEscape="false" class="input-xlarge required hide" />
|
|
|
+ <div id="adaptiveManEditor" class="contentEditor">${cmBaikeProduct.adaptiveMan}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label">不适应人群:</label>
|
|
|
- <div class="controls">
|
|
|
- <form:input path="unAdaptiveMan" htmlEscape="false" maxlength="500" class="input-xlarge "/>
|
|
|
+ <label class="control-label keyClass"><font color="red">*</font>不适应人群:</label>
|
|
|
+ <div class="controls" style="width:812px">
|
|
|
+ <form:textarea path="unAdaptiveMan" htmlEscape="false" class="input-xlarge required hide" />
|
|
|
+ <div id="unAdaptiveManEditor" class="contentEditor">${cmBaikeProduct.unAdaptiveMan}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label">术前术后:</label>
|
|
|
- <div class="controls">
|
|
|
- <form:input path="aroundOperation" htmlEscape="false" maxlength="500" class="input-xlarge "/>
|
|
|
+ <label class="control-label keyClass"><font color="red">*</font>术前术后:</label>
|
|
|
+ <div class="controls" style="width:812px">
|
|
|
+ <form:textarea path="aroundOperation" htmlEscape="false" class="input-xlarge required hide" />
|
|
|
+ <div id="aroundOperationEditor" class="contentEditor">${cmBaikeProduct.aroundOperation}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="control-group" style="width: 1000px">
|
|
|
+ <label class="control-label keyClass"><font color="red">*</font>效果展示:</label>
|
|
|
+ <div class="display-image-list" style="display: flex;flex-wrap: wrap">
|
|
|
+ <c:forEach items="${cmBaikeProduct.displayImageList}" var="displayImage" varStatus="index">
|
|
|
+ <div class="controls upload-content iconBox" id="displayImageBox${index.index}">
|
|
|
+ <div class="conList">
|
|
|
+ <form:hidden id="displayImage${index.index}" path="displayImageList[${index.index}]" htmlEscape="false"
|
|
|
+ maxlength="255"
|
|
|
+ class="input-xlarge required"/>
|
|
|
+ <sys:ckfinder input="displayImage${index.index}" type="images" uploadPath="/photo"
|
|
|
+ selectMultiple="false"
|
|
|
+ maxWidth="100" maxHeight="100"/><br>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </c:forEach>
|
|
|
+ <c:set var="size" value="${empty cmBaikeProduct.displayImageList?0:cmBaikeProduct.displayImageList.size()}"/>
|
|
|
+ <c:forEach var="emptyIndex" begin="${size}" end="${5}">
|
|
|
+ <div class="controls upload-content iconBox conList ${emptyIndex eq 0?'':'hide-pic'}" id="displayImageBox${emptyIndex}" >
|
|
|
+ <div class="conList">
|
|
|
+ <form:hidden id="displayImage${emptyIndex}" path="displayImageList[${emptyIndex}]" htmlEscape="false"
|
|
|
+ maxlength="255"
|
|
|
+ class="input-xlarge required"/>
|
|
|
+ <sys:ckfinder input="displayImage${emptyIndex}" type="images" uploadPath="/photo"
|
|
|
+ selectMultiple="false"
|
|
|
+ maxWidth="100" maxHeight="100"/><br>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </c:forEach>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="questionList">
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="control-label keyClass"><font color="red">*</font>常见问题:</label>
|
|
|
+ <button class="btn btn-primary" type="button" style="margin-left: 500px" onclick="addQuestion()">添加问题</button>
|
|
|
+ </div>
|
|
|
+ <div class="control-group" id="questionRow0">
|
|
|
+ <label class="control-label"><font color="red">*</font>问题1:</label>
|
|
|
+ <div class="controls">
|
|
|
+ <input name="questionList[0].question" style="width: 550px" htmlEscape="false" class="input-xlarge required" maxlength="150">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="control-group" id="answerRow0">
|
|
|
+ <label class="control-label"><font color="red">*</font>答:</label>
|
|
|
+ <div class="controls">
|
|
|
+ <input name="questionList[0].answer" style="width: 550px" htmlEscape="false" class="input-xlarge required" maxlength="150">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="control-group" id="questionRow1">
|
|
|
+ <label class="control-label"><font color="red">*</font>问题2:</label>
|
|
|
+ <div class="controls">
|
|
|
+ <input name="questionList[1].question" style="width: 550px" htmlEscape="false" class="input-xlarge required questionInput" maxlength="150">
|
|
|
+ <a id="questionDelBtn1" onclick="deleteQuestion(1)" style="cursor: pointer">删除</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="control-group" id="answerRow1">
|
|
|
+ <label class="control-label"><font color="red">*</font>答:</label>
|
|
|
+ <div class="controls">
|
|
|
+ <input name="questionList[1].answer" style="width: 550px" htmlEscape="false" class="input-xlarge required questionInput" maxlength="150">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label">发布时间:</label>
|
|
|
+ <label class="control-label keyClass"><font color="red">*</font>发布时间:</label>
|
|
|
<div class="controls">
|
|
|
<input name="publishTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
|
|
|
value="<fmt:formatDate value="${cmBaikeProduct.publishTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
|
|
|
- onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
|
|
|
+ onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label">基础浏览量:</label>
|
|
|
+ <label class="control-label keyClass"><font color="red">*</font>基础浏览量:</label>
|
|
|
<div class="controls">
|
|
|
- <form:input path="basePv" htmlEscape="false" class="input-xlarge digits"/>
|
|
|
+ <form:input path="basePv" htmlEscape="false" onkeyup="onlynum(this)" class="input-xlarge digits"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label">分类id:</label>
|
|
|
+ <label class="control-label keyClass">产品类别:</label>
|
|
|
<div class="controls">
|
|
|
<form:select path="typeId" class="input-xlarge ">
|
|
|
- <form:option value="" label=""/>
|
|
|
- <form:options items="${fns:getDictList('')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
|
|
|
+ <form:options items="${typeList}" itemLabel="name" itemValue="id" htmlEscape="false"/>
|
|
|
</form:select>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label">状态:0停用,1启用:</label>
|
|
|
+ <label class="control-label keyClass">状态:</label>
|
|
|
<div class="controls">
|
|
|
<form:select path="status" class="input-xlarge ">
|
|
|
- <form:option value="" label=""/>
|
|
|
- <form:options items="${fns:getDictList('')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
|
|
|
+ <form:option value="1" label="启用"/>
|
|
|
+ <form:option value="0" label="停用"/>
|
|
|
</form:select>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-actions">
|
|
|
- <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>
|
|
|
+ <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存" onclick="checkInfo()"/>
|
|
|
<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
|
|
|
</div>
|
|
|
</form:form>
|
|
|
+
|
|
|
+<% request.setAttribute("caimeiCore", Global.getConfig("caimei.core"));%>
|
|
|
+<script type="text/javascript" src="${ctxStatic}/ckeditor5-new/ckeditor.js"></script>
|
|
|
+<script>
|
|
|
+ var paramIndex = 6;
|
|
|
+ var questionIndex = 2;
|
|
|
+ $(function () {
|
|
|
+ $('.upload-content .conList .btn:nth-of-type(1)').html('<div><span>+</span><h5>选择图片</h5></div>');
|
|
|
+ $('.upload-content .conList .btn:nth-of-type(2)').after('<img class="cancel-upload" src="/static/images/close-btn1.png">').remove();
|
|
|
+ $('.upload-content .conList').find('.cancel-upload').hide();
|
|
|
+ var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
|
|
|
+ var MutationObserverConfig = {
|
|
|
+ childList: true,
|
|
|
+ subtree: true,
|
|
|
+ characterData: true
|
|
|
+ };
|
|
|
+ var observer = new MutationObserver(function (mutations) {
|
|
|
+ $.each(mutations, function (index, item) {
|
|
|
+ debugger
|
|
|
+ if (item.type === 'childList') {
|
|
|
+ // 在创建新的 element 时调用
|
|
|
+ var target = $(item.target),
|
|
|
+ thisWrapper = target.closest('.conList'),
|
|
|
+ nextEle = thisWrapper.parents('.controls').next();
|
|
|
+ thisWrapper.find('li').css('z-index', 99);
|
|
|
+ thisWrapper.find('.cancel-upload').show();
|
|
|
+ if (nextEle.hasClass('hide-pic')) {
|
|
|
+ nextEle.removeClass('hide-pic');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+ var observeEle1 = document.getElementsByClassName('main-image-list')[0];
|
|
|
+ var observeEle2 = document.getElementsByClassName('auth-image-list')[0];
|
|
|
+ var observeEle3 = document.getElementsByClassName('display-image-list')[0];
|
|
|
+ observer.observe(observeEle1, MutationObserverConfig);
|
|
|
+ observer.observe(observeEle2, MutationObserverConfig);
|
|
|
+ observer.observe(observeEle3, MutationObserverConfig);
|
|
|
+
|
|
|
+ $('body').on('click', '.cancel-upload',function() {
|
|
|
+ var wrapper = $(this).closest('.controls');
|
|
|
+ var controlsId = wrapper.attr('id');
|
|
|
+ wrapper.find('li').css('z-index','-1');
|
|
|
+ wrapper.find('input').val('');
|
|
|
+ $(this).hide();
|
|
|
+ if (controlsId == 'mainImageBox') {
|
|
|
+ wrapper.removeClass("hide-pic");
|
|
|
+ }else if (controlsId.indexOf('authImageBox') != -1) {
|
|
|
+ if ($('.auth-image-list .cancel-upload:visible').length < 8) {
|
|
|
+ wrapper.addClass("hide-pic");
|
|
|
+ }else{
|
|
|
+ wrapper.removeClass("hide-pic");
|
|
|
+ }
|
|
|
+ }else if (controlsId.indexOf('displayImageBox') != -1) {
|
|
|
+ if ($('.display-image-list .cancel-upload:visible').length < 6) {
|
|
|
+ wrapper.addClass("hide-pic");
|
|
|
+ }else{
|
|
|
+ wrapper.removeClass("hide-pic");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ wrapper.parent().append(wrapper.clone());
|
|
|
+ wrapper.remove();
|
|
|
+ $(".controls").each(function(i,ele){
|
|
|
+ if($(ele).find("input.input-xlarge").val()){
|
|
|
+ $(ele).next().removeClass("hide-pic")
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+
|
|
|
+ $('body').on('click','.upload-content li',function() {
|
|
|
+ var index = $(this).closest('.conList').index() + 1,
|
|
|
+ str = 'image'+index+'FinderOpen';
|
|
|
+ eval(str+'()');
|
|
|
+ });
|
|
|
+
|
|
|
+ $(window).on("load", function () {
|
|
|
+ setTimeout(function () {
|
|
|
+ $("#mainImageBox").find("input.input-xlarge").each(function (i, ele) {
|
|
|
+ if ($(ele).val()) {
|
|
|
+ $(ele).next().find("li").css("z-index", "99");
|
|
|
+ $(ele).parents(".conList").find(".cancel-upload").show();
|
|
|
+ $(ele).parent().parents(".controls").next().removeClass("hide-pic")
|
|
|
+ }
|
|
|
+ })
|
|
|
+ for (var i = 0; i < 8; i++) {
|
|
|
+ $("#authImageBox"+i).find("input.input-xlarge").each(function (i, ele) {
|
|
|
+ if ($(ele).val()) {
|
|
|
+ $(ele).next().find("li").css("z-index", "99");
|
|
|
+ $(ele).parents(".conList").find(".cancel-upload").show();
|
|
|
+ $(ele).parent().parents(".controls").next().removeClass("hide-pic")
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ for (var i = 0; i < 6; i++) {
|
|
|
+ $("#displayImageBox"+i).find("input.input-xlarge").each(function (i, ele) {
|
|
|
+ if ($(ele).val()) {
|
|
|
+ $(ele).next().find("li").css("z-index", "99");
|
|
|
+ $(ele).parents(".conList").find(".cancel-upload").show();
|
|
|
+ $(ele).parent().parents(".controls").next().removeClass("hide-pic")
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }, 200);
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ // 初始化参数
|
|
|
+ var paramListSize = ${empty cmBaikeProduct.paramList.size() ? 0: cmBaikeProduct.paramList.size()};
|
|
|
+ paramIndex = paramListSize > 0 ? paramListSize : paramIndex;
|
|
|
+ if (paramListSize > 6) {
|
|
|
+ var index = 6;
|
|
|
+ while (index < paramListSize) {
|
|
|
+ $(".paramList").append("<div class=\"controls paramRow\" id=\"paramRow" + index + "\">\n" +
|
|
|
+ "\t\t\t\t<input name=\"paramList[" + index + "].name\" htmlEscape=\"false\" class=\"input-small required\" maxlength=\"15\" placeholder=\"参数名称\">\n" +
|
|
|
+ "\t\t\t\t<input name=\"paramList[" + index + "].content\" htmlEscape=\"false\" class=\"input-xlarge required\" maxlength=\"50\" placeholder=\"输入参数信息\">\n" +
|
|
|
+ "\t\t\t\t<a onclick=\"deleteParam(" + index + ")\" style=\"cursor: pointer\">删除</a>\n" +
|
|
|
+ " </div>");
|
|
|
+ index = index + 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var nameArray = new Array();
|
|
|
+ var contentArray = new Array();
|
|
|
+ <c:forEach items="${cmBaikeProduct.paramList}" var="item">
|
|
|
+ nameArray.push('${item.name}')
|
|
|
+ contentArray.push('${item.content}')
|
|
|
+ </c:forEach>
|
|
|
+ for (var i = 0; i < nameArray.length; i++) {
|
|
|
+ var nameInput = "paramList[" + i + "].name";
|
|
|
+ var contentInput = "paramList[" + i + "].content";
|
|
|
+ $('input[name="' + nameInput + '"]').val(nameArray[i]);
|
|
|
+ $('input[name="' + contentInput + '"]').val(contentArray[i]);
|
|
|
+ }
|
|
|
+
|
|
|
+ debugger
|
|
|
+ // 初始化问题
|
|
|
+ var questionListSize = ${empty cmBaikeProduct.questionList.size() ? 0: cmBaikeProduct.questionList.size()};
|
|
|
+ questionIndex = questionListSize > 0 ? questionListSize : questionIndex;
|
|
|
+ if (questionListSize > 2) {
|
|
|
+ var index = 2;
|
|
|
+ while (index < questionListSize) {
|
|
|
+ $(".questionList").append("" +
|
|
|
+ "<div class=\"control-group\" id=\"questionRow" + index + "\">\n" +
|
|
|
+ " <label class=\"control-label\"><font color=\"red\">*</font>问题" + (index+1) + ":</label>\n" +
|
|
|
+ " <div class=\"controls\">\n" +
|
|
|
+ " <input name=\"questionList[" + index + "].question\" style=\"width: 550px\" htmlEscape=\"false\" class=\"input-xlarge required\" maxlength=\"150\">\n" +
|
|
|
+ "\t\t\t\t<a id=\"questionDelBtn" + index + "\" onclick=\"deleteQuestion(" + index + ")\" style=\"cursor: pointer\">删除</a>\n" +
|
|
|
+ " </div>\n" +
|
|
|
+ " </div>\n" +
|
|
|
+ " <div class=\"control-group\" id=\"answerRow" + index + "\">\n" +
|
|
|
+ " <label class=\"control-label\"><font color=\"red\">*</font>答:</label>\n" +
|
|
|
+ " <div class=\"controls\">\n" +
|
|
|
+ " <input name=\"questionList[" + index + "].answer\" style=\"width: 550px\" htmlEscape=\"false\" class=\"input-xlarge required\" maxlength=\"150\">\n" +
|
|
|
+ " </div>\n" +
|
|
|
+ " </div>");
|
|
|
+ index = index + 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var questionArray = new Array();
|
|
|
+ var answerArray = new Array();
|
|
|
+ <c:forEach items="${cmBaikeProduct.questionList}" var="item">
|
|
|
+ questionArray.push('${item.question}')
|
|
|
+ answerArray.push('${item.answer}')
|
|
|
+ </c:forEach>
|
|
|
+ for (var i = 0; i < questionArray.length; i++) {
|
|
|
+ var questionInput = "questionList[" + i + "].question";
|
|
|
+ var answerInput = "questionList[" + i + "].answer";
|
|
|
+ $('input[name="' + questionInput + '"]').val(questionArray[i]);
|
|
|
+ $('input[name="' + answerInput + '"]').val(answerArray[i]);
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ //删除参数
|
|
|
+ function deleteParam(index) {
|
|
|
+ $("#paramRow" + index).remove();
|
|
|
+ }
|
|
|
+
|
|
|
+ //添加参数
|
|
|
+ function addParam() {
|
|
|
+ $(".paramList").append("<div class=\"controls paramRow\" id=\"paramRow" + paramIndex + "\">\n" +
|
|
|
+ "\t\t\t\t<input name=\"paramList[" + paramIndex + "].name\" htmlEscape=\"false\" class=\"input-small required\" maxlength=\"10\" placeholder=\"例如:性质类型\">\n" +
|
|
|
+ "\t\t\t\t<input name=\"paramList[" + paramIndex + "].content\" htmlEscape=\"false\" class=\"input-xlarge required\" maxlength=\"50\" placeholder=\"输入参数信息\">\n" +
|
|
|
+ "\t\t\t\t<a onclick=\"deleteParam(" + paramIndex + ")\" style=\"cursor: pointer\">删除</a>\n" +
|
|
|
+ " </div>")
|
|
|
+ paramIndex = paramIndex + 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ //删除问题
|
|
|
+ function deleteQuestion(index) {
|
|
|
+ $("#questionRow" + index).remove();
|
|
|
+ $("#answerRow" + index).remove();
|
|
|
+ questionIndex--;
|
|
|
+ $("#questionDelBtn" + (questionIndex - 1)).attr("style", "cursor: pointer");
|
|
|
+ }
|
|
|
+
|
|
|
+ //添加问题
|
|
|
+ function addQuestion() {
|
|
|
+ $(".questionList").append("" +
|
|
|
+ "<div class=\"control-group\" id=\"questionRow" + questionIndex + "\">\n" +
|
|
|
+ " <label class=\"control-label\"><font color=\"red\">*</font>问题" + (questionIndex+1) + ":</label>\n" +
|
|
|
+ " <div class=\"controls\">\n" +
|
|
|
+ " <input name=\"questionList[" + questionIndex + "].question\" style=\"width: 550px\" htmlEscape=\"false\" class=\"input-xlarge required\" maxlength=\"150\">\n" +
|
|
|
+ "\t\t\t\t<a id=\"questionDelBtn" + questionIndex + "\" onclick=\"deleteQuestion(" + questionIndex + ")\" style=\"cursor: pointer\">删除</a>\n" +
|
|
|
+ " </div>\n" +
|
|
|
+ " </div>\n" +
|
|
|
+ " <div class=\"control-group\" id=\"answerRow" + questionIndex + "\">\n" +
|
|
|
+ " <label class=\"control-label\"><font color=\"red\">*</font>答:</label>\n" +
|
|
|
+ " <div class=\"controls\">\n" +
|
|
|
+ " <input name=\"questionList[" + questionIndex + "].answer\" style=\"width: 550px\" htmlEscape=\"false\" class=\"input-xlarge required\" maxlength=\"150\">\n" +
|
|
|
+ " </div>\n" +
|
|
|
+ " </div>")
|
|
|
+ $("#questionDelBtn" + (questionIndex - 1)).attr("style", "display:none;cursor: pointer");
|
|
|
+ questionIndex = questionIndex + 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ $(document).ready(function () {
|
|
|
+ //富文本框
|
|
|
+ ClassicEditor.create(document.querySelector('#discriptionEditor'), {
|
|
|
+ ckfinder: {
|
|
|
+ uploadUrl: '${caimeiCore}/tools/image/upload/ckeditor'
|
|
|
+ }
|
|
|
+ }).then(function (editor) {
|
|
|
+ window.discriptionEditor = editor;
|
|
|
+ }).catch(function (error) {
|
|
|
+ console.log(error);
|
|
|
+ });
|
|
|
+ ClassicEditor.create(document.querySelector('#advantageEditor'), {
|
|
|
+ ckfinder: {
|
|
|
+ uploadUrl: '${caimeiCore}/tools/image/upload/ckeditor'
|
|
|
+ }
|
|
|
+ }).then(function (editor) {
|
|
|
+ window.advantageEditor = editor;
|
|
|
+ }).catch(function (error) {
|
|
|
+ console.log(error);
|
|
|
+ });
|
|
|
+ ClassicEditor.create(document.querySelector('#disadvantageEditor'), {
|
|
|
+ ckfinder: {
|
|
|
+ uploadUrl: '${caimeiCore}/tools/image/upload/ckeditor'
|
|
|
+ }
|
|
|
+ }).then(function (editor) {
|
|
|
+ window.disadvantageEditor = editor;
|
|
|
+ }).catch(function (error) {
|
|
|
+ console.log(error);
|
|
|
+ });
|
|
|
+ ClassicEditor.create(document.querySelector('#principleEditor'), {
|
|
|
+ ckfinder: {
|
|
|
+ uploadUrl: '${caimeiCore}/tools/image/upload/ckeditor'
|
|
|
+ }
|
|
|
+ }).then(function (editor) {
|
|
|
+ window.principleEditor = editor;
|
|
|
+ }).catch(function (error) {
|
|
|
+ console.log(error);
|
|
|
+ });
|
|
|
+ ClassicEditor.create(document.querySelector('#adaptiveManEditor'), {
|
|
|
+ ckfinder: {
|
|
|
+ uploadUrl: '${caimeiCore}/tools/image/upload/ckeditor'
|
|
|
+ }
|
|
|
+ }).then(function (editor) {
|
|
|
+ window.adaptiveManEditor = editor;
|
|
|
+ }).catch(function (error) {
|
|
|
+ console.log(error);
|
|
|
+ });
|
|
|
+ ClassicEditor.create(document.querySelector('#unAdaptiveManEditor'), {
|
|
|
+ ckfinder: {
|
|
|
+ uploadUrl: '${caimeiCore}/tools/image/upload/ckeditor'
|
|
|
+ }
|
|
|
+ }).then(function (editor) {
|
|
|
+ window.unAdaptiveManEditor = editor;
|
|
|
+ }).catch(function (error) {
|
|
|
+ console.log(error);
|
|
|
+ });
|
|
|
+ ClassicEditor.create(document.querySelector('#aroundOperationEditor'), {
|
|
|
+ ckfinder: {
|
|
|
+ uploadUrl: '${caimeiCore}/tools/image/upload/ckeditor'
|
|
|
+ }
|
|
|
+ }).then(function (editor) {
|
|
|
+ window.aroundOperationEditor = editor;
|
|
|
+ }).catch(function (error) {
|
|
|
+ console.log(error);
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ //富文本框编辑
|
|
|
+ function checkInfo(){
|
|
|
+ var discription=discriptionEditor.getData();
|
|
|
+ var advantage=advantageEditor.getData();
|
|
|
+ var disadvantage=disadvantageEditor.getData();
|
|
|
+ var principle=principleEditor.getData();
|
|
|
+ var adaptiveMan=adaptiveManEditor.getData();
|
|
|
+ var unAdaptiveMan=unAdaptiveManEditor.getData();
|
|
|
+ var aroundOperation=aroundOperationEditor.getData();
|
|
|
+ $("#discription").val(discription);
|
|
|
+ $("#advantage").val(advantage);
|
|
|
+ $("#disadvantage").val(disadvantage);
|
|
|
+ $("#principle").val(principle);
|
|
|
+ $("#adaptiveMan").val(adaptiveMan);
|
|
|
+ $("#unAdaptiveMan").val(unAdaptiveMan);
|
|
|
+ $("#aroundOperation").val(aroundOperation);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param obj
|
|
|
+ * jquery控制input只能输入数字
|
|
|
+ */
|
|
|
+ function onlynum(obj) {
|
|
|
+ obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
|
|
|
+ }
|
|
|
+</script>
|
|
|
</body>
|
|
|
</html>
|