|
@@ -47,7 +47,8 @@
|
|
|
<input type="button" value="管理员"/>
|
|
|
</li>
|
|
|
<li>
|
|
|
- <input type="button" value="商品管理"/>
|
|
|
+ [#--<input type="button" value="商品管理"/>--]
|
|
|
+ <input type="button" value="清洗规则"/>
|
|
|
</li>
|
|
|
<li>
|
|
|
<input type="button" value="报警记录"/>
|
|
@@ -93,92 +94,124 @@
|
|
|
<input type="text" value="${equipment.sn}" name="sn" class="text" required/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
+ [#--<tr>--]
|
|
|
+ [#--<th>--]
|
|
|
+ [#--<span class="requiredField">*</span>广告规则--]
|
|
|
+ [#--</th>--]
|
|
|
+ [#--<td>--]
|
|
|
+ [#--[#if type!="管理员"]--]
|
|
|
+ [#--<input type="hidden" name="timeRuleId" value="${equipment.timeRuleId}"/>--]
|
|
|
+ [#--<input type="text" class="text" value="${ruleName}" readonly/>--]
|
|
|
+ [#--[#else ]--]
|
|
|
+ [#--<select name="timeRuleId">--]
|
|
|
+ [#--[#list timeRules as timeRule]--]
|
|
|
+ [#--<option value="${timeRule.id}"--]
|
|
|
+ [#--[#if timeRule.id == equipment.timeRuleId ]selected[/#if]>${timeRule.name}</option>--]
|
|
|
+ [#--[/#list]--]
|
|
|
+ [#--</select>--]
|
|
|
+ [#--[/#if]--]
|
|
|
+
|
|
|
+ [#--</td>--]
|
|
|
+
|
|
|
+ [#--</tr>--]
|
|
|
<tr>
|
|
|
<th>
|
|
|
- <span class="requiredField">*</span>广告规则
|
|
|
+ <span class="requiredField"></span>所属商家:
|
|
|
</th>
|
|
|
<td>
|
|
|
- [#if type!="管理员"]
|
|
|
- <input type="hidden" name="timeRuleId" value="${equipment.timeRuleId}"/>
|
|
|
- <input type="text" class="text" value="${ruleName}" readonly/>
|
|
|
- [#else ]
|
|
|
- <select name="timeRuleId">
|
|
|
- [#list timeRules as timeRule]
|
|
|
- <option value="${timeRule.id}"
|
|
|
- [#if timeRule.id == equipment.timeRuleId ]selected[/#if]>${timeRule.name}</option>
|
|
|
- [/#list]
|
|
|
- </select>
|
|
|
- [/#if]
|
|
|
-
|
|
|
+ ${equipment.adminLevel}
|
|
|
</td>
|
|
|
+ </tr>
|
|
|
|
|
|
+ [#--<tr>--]
|
|
|
+ [#--<th>--]
|
|
|
+ [#--<span class="requiredField"></span>经销商:--]
|
|
|
+ [#--</th>--]
|
|
|
+ [#--<td>--]
|
|
|
+ [#--${equipment.adminUserName}--]
|
|
|
+ [#--[#if type=="管理员"]--]
|
|
|
+ [#--    <button type="button" id="touji" >系统脱机</button>--]
|
|
|
+ [#--[/#if]--]
|
|
|
+ [#--</td>--]
|
|
|
+ [#--</tr>--]
|
|
|
+ <tr>
|
|
|
+ <th>
|
|
|
+ <span class="requiredField"></span>地区:
|
|
|
+ </th>
|
|
|
+ <td>
|
|
|
+ <input type="hidden" id="areaId" name="areaId" value="${(equipment.areaId)!}"
|
|
|
+ treePath="${(_Area(equipment.areaId).treePath)!}"/>
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th>
|
|
|
- <span class="requiredField"></span>所属商家:
|
|
|
+ <span class="requiredField"></span>机器联系人:
|
|
|
</th>
|
|
|
<td>
|
|
|
- ${equipment.adminLevel}
|
|
|
+ <input type="text" name="contactName" class="text" maxlength="200" required
|
|
|
+ value="${equipment.contactName}"/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
-
|
|
|
<tr>
|
|
|
<th>
|
|
|
- <span class="requiredField"></span>经销商:
|
|
|
+ <span class="requiredField"></span>机器联系方式:
|
|
|
</th>
|
|
|
<td>
|
|
|
- ${equipment.adminUserName}
|
|
|
- [#if type=="管理员"]
|
|
|
-     <button type="button" id="touji" >系统脱机</button>
|
|
|
- [/#if]
|
|
|
+ <input type="text" name="contactPhone" class="text" maxlength="11" required
|
|
|
+ value="${equipment.contactPhone} "/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
+ [#--<tr>--]
|
|
|
+ [#--<th>--]
|
|
|
+ [#--<span class="requiredField"></span>远程开门:--]
|
|
|
+ [#--</th>--]
|
|
|
+ [#--<td>--]
|
|
|
+ [#--<button type="button" id="openDoor" >远程开门</button>--]
|
|
|
+ [#--</td>--]
|
|
|
+ [#--</tr>--]
|
|
|
+ [#if type=="管理员"]
|
|
|
<tr>
|
|
|
<th>
|
|
|
- <span class="requiredField"></span>地区:
|
|
|
+ <span class="requiredField"></span>获取日志:
|
|
|
</th>
|
|
|
<td>
|
|
|
- <input type="hidden" id="areaId" name="areaId" value="${(equipment.areaId)!}"
|
|
|
- treePath="${(_Area(equipment.areaId).treePath)!}"/>
|
|
|
+ <input type="text" class="text" maxlength="20" id="day" placeholder="20200101" value=""/>
|
|
|
+     <button type="button" id="rizhi" >上传</button>
|
|
|
</td>
|
|
|
</tr>
|
|
|
+ [/#if]
|
|
|
<tr>
|
|
|
<th>
|
|
|
- <span class="requiredField"></span>机器联系人:
|
|
|
+ <span class=""></span>到期时间
|
|
|
</th>
|
|
|
<td>
|
|
|
- <input type="text" name="contactName" class="text" maxlength="200" required
|
|
|
- value="${equipment.contactName}"/>
|
|
|
+ <span class="green">${(equipment.overdueDate?string("yyyy-MM-dd HH:mm:ss"))!""}</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th>
|
|
|
- <span class="requiredField"></span>机器联系方式:
|
|
|
+ <span class=""></span>剩余使用次数
|
|
|
</th>
|
|
|
<td>
|
|
|
- <input type="text" name="contactPhone" class="text" maxlength="11" required
|
|
|
- value="${equipment.contactPhone} "/>
|
|
|
+ <span class="green">${equipment.remaining}</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th>
|
|
|
- <span class="requiredField"></span>远程开门:
|
|
|
+ <span class=""></span>清洁剂余量
|
|
|
</th>
|
|
|
<td>
|
|
|
- <button type="button" id="openDoor" >远程开门</button>
|
|
|
+ <span class="green">${equipment.cleaner}</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
- [#if type=="管理员"]
|
|
|
<tr>
|
|
|
<th>
|
|
|
- <span class="requiredField"></span>获取日志:
|
|
|
+ <span class=""></span>消毒水余量
|
|
|
</th>
|
|
|
<td>
|
|
|
- <input type="text" class="text" maxlength="20" id="day" placeholder="20200101" value=""/>
|
|
|
-     <button type="button" id="rizhi" >上传</button>
|
|
|
+ <span class="green">${equipment.disinfectant}</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
- [/#if]
|
|
|
<tr>
|
|
|
<th>
|
|
|
<span class="requiredField">*</span>支付方式:
|
|
@@ -243,13 +276,13 @@
|
|
|
<span class="requiredField"></span>参数
|
|
|
</th>
|
|
|
<td>
|
|
|
- <span>柜内温度:${equipment.cabinetTm}</span>
|
|
|
+ <span>室内温度:${equipment.cabinetTm}</span>
|
|
|
|
|
|
- <span>柜内湿度:${equipment.cabinetHd}</span>
|
|
|
+ <span>室内湿度:${equipment.cabinetHd}</span>
|
|
|
|
|
|
- <span>炉头温度:${equipment.furnaceTm}</span>
|
|
|
+ <span>机器温度:${equipment.furnaceTm}</span>
|
|
|
|
|
|
- <span>炉头转速:${equipment.furnaceSp}</span>
|
|
|
+ [#--<span>炉头转速:${equipment.furnaceSp}</span>--]
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
@@ -347,50 +380,50 @@
|
|
|
|
|
|
<tr>
|
|
|
<th>
|
|
|
- <a href="javascript:" class="sort" name="productName">产品名称</a>
|
|
|
- </th>
|
|
|
- <th>
|
|
|
- <a href="javascript:" class="sort" name="rmbPrice">人民币价格</a>
|
|
|
- </th>
|
|
|
- <th>
|
|
|
- <a href="javascript:" class="sort" name="CodePrice">投币价格</a>
|
|
|
- </th>
|
|
|
- <th>
|
|
|
- <a href="javascript:" class="sort" name="sellStatus">销售状态</a>
|
|
|
+ <a href="javascript:" class="sort" name="rule">清洗规则</a>
|
|
|
</th>
|
|
|
+ [#--<th>--]
|
|
|
+ [#--<a href="javascript:" class="sort" name="rmbPrice">人民币价格</a>--]
|
|
|
+ [#--</th>--]
|
|
|
+ [#--<th>--]
|
|
|
+ [#--<a href="javascript:" class="sort" name="CodePrice">投币价格</a>--]
|
|
|
+ [#--</th>--]
|
|
|
+ [#--<th>--]
|
|
|
+ [#--<a href="javascript:" class="sort" name="sellStatus">销售状态</a>--]
|
|
|
+ [#--</th>--]
|
|
|
</tr>
|
|
|
- [#list products.content as product]
|
|
|
+ <input type="hidden" name="id" value="${equipment.id}"/>
|
|
|
+ <div class="layui-inline">
|
|
|
+ <td>
|
|
|
+ <span style="color: #af0000">00:00:01为无效时间</span>
|
|
|
+ [#--class="layui-input"--]
|
|
|
+ </td>
|
|
|
+ </div>
|
|
|
+ [#list rules as list]
|
|
|
<tr>
|
|
|
- <input type="hidden" name="productId" value="${product.id}" lay-verify="required|productId"
|
|
|
- value="${product.id}"/>
|
|
|
- <input type="hidden" name="equipmentId" value="${product.equipmentId}"/>
|
|
|
+ <input type="hidden" name="equipmentId" value="${equipment.id}"/>
|
|
|
<div class="layui-inline">
|
|
|
<td>
|
|
|
- <input type="text" name="productName" lay-verify="required|productName"
|
|
|
- value="${product.productName}" class="layui-input" readonly/>
|
|
|
+ <input type="time" name="signalRule" lay-verify="required|sgnalRule"
|
|
|
+ value="${list}" class="text"/>
|
|
|
+ [#--class="layui-input"--]
|
|
|
</td>
|
|
|
</div>
|
|
|
-
|
|
|
- <td>
|
|
|
- <div class="layui-inline"></div>
|
|
|
- <input type="text" name="rmbPrice"
|
|
|
- value="${product.rmbPrice}" class="layui-input" required/>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <input type="text" name="codePrice"
|
|
|
- value="${product.codePrice}" class="layui-input" required/>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- [#if product.sellStatus=="true"]
|
|
|
-
|
|
|
- <span>正常销售</span>
|
|
|
- [#else]
|
|
|
- <span class="red">已售罄</span>
|
|
|
- [/#if]
|
|
|
- </td>
|
|
|
</tr>
|
|
|
[/#list]
|
|
|
-
|
|
|
+ [#if rules.length<10]
|
|
|
+ [#list rulesCkche as lis]
|
|
|
+ <tr>
|
|
|
+ <input type="hidden" name="equipmentId" value="${equipment.id}"/>
|
|
|
+ <div class="layui-inline">
|
|
|
+ <td>
|
|
|
+ <input type="time" name="signalRule" lay-verify="required|sgnalRule"
|
|
|
+ value="00:00:01" class="text"/>
|
|
|
+ </td>
|
|
|
+ </div>
|
|
|
+ </tr>
|
|
|
+ [/#list]
|
|
|
+ [/#if]
|
|
|
</table>
|
|
|
<div class="layui-form-item">
|
|
|
<div class="layui-input-block ">
|
|
@@ -407,6 +440,73 @@
|
|
|
</div>
|
|
|
</form>
|
|
|
</div>
|
|
|
+[#--<div class="input tabContent">--]
|
|
|
+ [#--<form class="layui-form layui-form-pane" id="editProductForm">--]
|
|
|
+
|
|
|
+ [#--<table id="listTable" class="list">--]
|
|
|
+
|
|
|
+ [#--<tr>--]
|
|
|
+ [#--<th>--]
|
|
|
+ [#--<a href="javascript:" class="sort" name="productName">产品名称</a>--]
|
|
|
+ [#--</th>--]
|
|
|
+ [#--<th>--]
|
|
|
+ [#--<a href="javascript:" class="sort" name="rmbPrice">人民币价格</a>--]
|
|
|
+ [#--</th>--]
|
|
|
+ [#--<th>--]
|
|
|
+ [#--<a href="javascript:" class="sort" name="CodePrice">投币价格</a>--]
|
|
|
+ [#--</th>--]
|
|
|
+ [#--<th>--]
|
|
|
+ [#--<a href="javascript:" class="sort" name="sellStatus">销售状态</a>--]
|
|
|
+ [#--</th>--]
|
|
|
+ [#--</tr>--]
|
|
|
+ [#--[#list products.content as product]--]
|
|
|
+ [#--<tr>--]
|
|
|
+ [#--<input type="hidden" name="productId" value="${product.id}" lay-verify="required|productId"--]
|
|
|
+ [#--value="${product.id}"/>--]
|
|
|
+ [#--<input type="hidden" name="equipmentId" value="${product.equipmentId}"/>--]
|
|
|
+ [#--<div class="layui-inline">--]
|
|
|
+ [#--<td>--]
|
|
|
+ [#--<input type="text" name="productName" lay-verify="required|productName"--]
|
|
|
+ [#--value="${product.productName}" class="layui-input" readonly/>--]
|
|
|
+ [#--</td>--]
|
|
|
+ [#--</div>--]
|
|
|
+
|
|
|
+ [#--<td>--]
|
|
|
+ [#--<div class="layui-inline"></div>--]
|
|
|
+ [#--<input type="text" name="rmbPrice"--]
|
|
|
+ [#--value="${product.rmbPrice}" class="layui-input" required/>--]
|
|
|
+ [#--</td>--]
|
|
|
+ [#--<td>--]
|
|
|
+ [#--<input type="text" name="codePrice"--]
|
|
|
+ [#--value="${product.codePrice}" class="layui-input" required/>--]
|
|
|
+ [#--</td>--]
|
|
|
+ [#--<td>--]
|
|
|
+ [#--[#if product.sellStatus=="true"]--]
|
|
|
+
|
|
|
+ [#--<span>正常销售</span>--]
|
|
|
+ [#--[#else]--]
|
|
|
+ [#--<span class="red">已售罄</span>--]
|
|
|
+ [#--[/#if]--]
|
|
|
+ [#--</td>--]
|
|
|
+ [#--</tr>--]
|
|
|
+ [#--[/#list]--]
|
|
|
+
|
|
|
+ [#--</table>--]
|
|
|
+ [#--<div class="layui-form-item">--]
|
|
|
+ [#--<div class="layui-input-block ">--]
|
|
|
+
|
|
|
+ [#--<td><input id="editProduct" type="submit" value="提交" /></td>--]
|
|
|
+ [#--<td><input type="reset" value="重置" /></td>--]
|
|
|
+ [#--<td align="center">--]
|
|
|
+ [#--<input id="editProduct" class="button" type="submit" value="提交并推送设备更新"/>--]
|
|
|
+ [#--<input type="button" class="button" value="取消"--]
|
|
|
+ [#--onclick="location.href='list.htm'"/>--]
|
|
|
+ [#--</td>--]
|
|
|
+
|
|
|
+ [#--</div>--]
|
|
|
+ [#--</div>--]
|
|
|
+ [#--</form>--]
|
|
|
+[#--</div>--]
|
|
|
<div class="input tabContent">
|
|
|
<form class="layui-form layui-upload-list" id="editProductForm">
|
|
|
|
|
@@ -1339,53 +1439,55 @@
|
|
|
$(document).ready(function () {
|
|
|
$("#editProductForm").validate({
|
|
|
rules: {
|
|
|
- rmbPrice: {
|
|
|
- required: true,
|
|
|
- number: true,
|
|
|
- min: 0
|
|
|
- },
|
|
|
- codePrice: {
|
|
|
- required: true,
|
|
|
- number: true,
|
|
|
- min: 0
|
|
|
- }
|
|
|
+ // rmbPrice: {
|
|
|
+ // required: true,
|
|
|
+ // number: true,
|
|
|
+ // min: 0
|
|
|
+ // },
|
|
|
+ // codePrice: {
|
|
|
+ // required: true,
|
|
|
+ // number: true,
|
|
|
+ // min: 0
|
|
|
+ // }
|
|
|
|
|
|
},
|
|
|
messages: {
|
|
|
- rmbPrice: {
|
|
|
- required: "人民币价格不能为空",
|
|
|
- number: "格式不对",
|
|
|
- min: "不能小于零"
|
|
|
- },
|
|
|
- codePrice: {
|
|
|
- required: "投币价格不能为空",
|
|
|
- number: "格式不对",
|
|
|
- min: "不能小于零"
|
|
|
- }
|
|
|
+ // rmbPrice: {
|
|
|
+ // required: "人民币价格不能为空",
|
|
|
+ // number: "格式不对",
|
|
|
+ // min: "不能小于零"
|
|
|
+ // },
|
|
|
+ // codePrice: {
|
|
|
+ // required: "投币价格不能为空",
|
|
|
+ // number: "格式不对",
|
|
|
+ // min: "不能小于零"
|
|
|
+ // }
|
|
|
},
|
|
|
onsubmit: true,
|
|
|
submitHandler: function (form) {
|
|
|
- var leng = $(":text[name='productName']").length;
|
|
|
- var products = new Array();
|
|
|
+ // var leng = $(":time[name='signalRule']").length;
|
|
|
+ debugger;
|
|
|
+ var leng = document.getElementsByName("signalRule").length;
|
|
|
+ var equip = new Array();
|
|
|
+ var commonParam = {};
|
|
|
for (var i = 0; i < leng; i++) {
|
|
|
- var productId = $("input:hidden[name='productId']").eq(i).val();
|
|
|
- var rPrice = $(":text[name='rmbPrice']").eq(i).val();
|
|
|
- var cPrice = $(":text[name='codePrice']").eq(i).val();
|
|
|
- var productName = $(":text[name='productName']").eq(i).val();
|
|
|
- var equipmentId = $("input:hidden[name='equipmentId']").eq(i).val();
|
|
|
- products.push({
|
|
|
- id: productId,
|
|
|
- rmbPrice: rPrice,
|
|
|
- codePrice: cPrice,
|
|
|
- productName: productName,
|
|
|
- equipmentId: equipmentId
|
|
|
- });
|
|
|
+ if(i==0){
|
|
|
+ commonParam.id = $("input:hidden[name='equipmentId']").eq(i).val();
|
|
|
+ }
|
|
|
+ // var signalRule = $(":time[name='signalRule']").eq(i).val();
|
|
|
+ var signalRule =document.getElementsByName("signalRule")[i].value;
|
|
|
+ var a=signalRule.length;
|
|
|
+ if(signalRule.length>6&&signalRule!="00:00:01"){
|
|
|
+ equip[i]=signalRule;
|
|
|
+ }
|
|
|
}
|
|
|
+ // commonParam.id = $("input:hidden[name='equipmentId']").eq(i).val();
|
|
|
+ commonParam.val = equip.join(",");
|
|
|
|
|
|
$.ajax({
|
|
|
- url: '/asl-admin/product/update.htm',
|
|
|
+ url: '/asl-admin/equipment/updateRule.htm',
|
|
|
type: 'post',
|
|
|
- data: JSON.stringify(products),
|
|
|
+ data: JSON.stringify(commonParam),
|
|
|
contentType: 'application/json;charset=utf-8',
|
|
|
success: function (msg) {
|
|
|
if (msg.type == "success") {
|
|
@@ -1398,6 +1500,40 @@
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
+ // submitHandler: function (form) {
|
|
|
+ // var leng = $(":text[name='productName']").length;
|
|
|
+ // var products = new Array();
|
|
|
+ // for (var i = 0; i < leng; i++) {
|
|
|
+ // var productId = $("input:hidden[name='productId']").eq(i).val();
|
|
|
+ // var rPrice = $(":text[name='rmbPrice']").eq(i).val();
|
|
|
+ // var cPrice = $(":text[name='codePrice']").eq(i).val();
|
|
|
+ // var productName = $(":text[name='productName']").eq(i).val();
|
|
|
+ // var equipmentId = $("input:hidden[name='equipmentId']").eq(i).val();
|
|
|
+ // products.push({
|
|
|
+ // id: productId,
|
|
|
+ // rmbPrice: rPrice,
|
|
|
+ // codePrice: cPrice,
|
|
|
+ // productName: productName,
|
|
|
+ // equipmentId: equipmentId
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // $.ajax({
|
|
|
+ // url: '/asl-admin/product/update.htm',
|
|
|
+ // type: 'post',
|
|
|
+ // data: JSON.stringify(products),
|
|
|
+ // contentType: 'application/json;charset=utf-8',
|
|
|
+ // success: function (msg) {
|
|
|
+ // if (msg.type == "success") {
|
|
|
+ // layer.msg("修改成功");
|
|
|
+ // } else {
|
|
|
+ // layer.msg("修改失败!"+msg.content);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // return false;
|
|
|
+ //
|
|
|
+ // }
|
|
|
});
|
|
|
});
|
|
|
|