| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <%--
- Created by IntelliJ IDEA.
- User: Future
- Date: 2021/8/9
- Time: 6:51
- To change this template use File | Settings | File Templates.
- --%>
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
- <%@include file="/context/mytags.jsp" %>
- <t:base type="jquery,easyui,tools"></t:base>
- <style>
- #clearingpointForm > span:nth-child(3) > span{
- width: 100px !important;
- }
- #clearingpointForm > span:nth-child(4) > span{
- width: 100px !important;
- }
- #clearingpointForm > span:nth-child(5) > span:nth-child(1){
- width: 110px !important;
- }
- #clearingpointForm > span:nth-child(6) > span:nth-child(1){
- width: 110px !important;
- }
- #clearingpointForm > span:nth-child(7) > span{
- width: 70px !important;
- }
- </style>
- <div class="easyui-layout" fit="true" >
- <div region="center" style="padding:0px;border:0px">
- <t:datagrid name="clearingpoint" fitColumns="true" checkbox="false" pageSize="20"
- title="清运点入场时限管理" actionUrl="ClearingPointController.do?datagrid"
- sortName="createDate" sortOrder="desc" idField="id" queryMode="group">
- <t:dgCol title="主键" field="id" hidden="true" width="120"></t:dgCol>
- <t:dgCol title="清运点编码" field="code" query="true" queryMode="single" width="100"></t:dgCol>
- <t:dgCol title="清运点名称" field="name" query="true" queryMode="single" width="100"></t:dgCol>
- <t:dgCol title="最早入场时间" field="prepTime" query="true" queryMode="single" width="110"></t:dgCol>
- <t:dgCol title="最晚入场时间" field="lateTime" query="true" queryMode="single" width="110"></t:dgCol>
- <t:dgCol title="状态" field="timeStatus" query="true" dictionary="clearing_point" queryMode="single"
- width="60"></t:dgCol>
- <t:dgToolBar title="录入" icon="icon-add" operationCode="add" url="ClearingPointController.do?goAdd" funname="add"></t:dgToolBar>
- <t:dgToolBar title="修改" icon="icon-edit" operationCode="edit" url="ClearingPointController.do?goUpdate"
- funname="update"></t:dgToolBar>
- <t:dgToolBar title="删除" icon="icon-remove" operationCode="remove" funname="delete_clean"></t:dgToolBar>
- </t:datagrid>
- </div>
- </div>
- <script>
- // 解决 小时分钟问题
- $(function () {
- $('input[name=\'prepTime\']').timespinner({
- required: false,
- showSeconds: false
- });
- $('input[name=\'lateTime\']').timespinner({
- required: false,
- showSeconds: false
- });
- });
- // 格式化 状态
- statusFormatter = (value, row, index) => {return value === 1 ? '启用' : '停用'}
- //清运点 删除 逻辑
- delete_clean = () => {
- let id = "";
- const rows = $("#clearingpoint").datagrid('getSelections');
- rows.length > 0 ? $.messager.confirm("确认", "确定要删除这条数据?", function (r) {
- if (r) {
- for (let i = 0; i < rows.length; i++) {
- id = rows[i].id;
- }
- $.ajax({
- url: "ClearingPointController.do?logicDel",
- type: 'post',
- data: JSON.stringify({id: id}),
- cache: false,
- contentType: "application/json;charset=utf-8",
- success: function (data) {
- const d = data;
- if (d.success) {
- const msg = d.msg;
- tip(msg);
- $("#clearingpoint").datagrid('reload');
- clearData();
- id = '';
- } else {
- layer.alert(d.msg);
- }
- }
- });
- }
- }) : layer.alert("请选择需要删除的数据")
- }
- </script>
|