| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 |
- <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
- <%@include file="/context/mytags.jsp" %>
- <!DOCTYPE html>
- <html>
- <head>
- <title>清理点</title>
- <t:base type="jquery,easyui,tools,DatePicker"></t:base>
- <script type="text/javascript">
- //编写自定义JS代码
- </script>
- <style>
- .combo{
- height: 20px !important;
- width: 145px !important;
- }
- </style>
- </head>
- <body>
- <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="clearPointScheduleController.do?doAdd">
- <table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
- <tr>
- <td align="right">
- <label class="Validform_label">
- 清运点名称:
- </label>
- </td>
- <td class="value">
- <input id="id" name="id" value="${common.id}" type="hidden"/>
- <input id="name" name="name" value="${common.name}" type="text" style="width: 150px" class="inputxt" readonly="readonly" placeholder="请选择清运点名称"
- datatype="*" ignore="checked" onclick="openUserSelect()"/>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="userSearch" onclick="openUserSelect()">选择</a>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="userRedo" onclick="callbackCleanUser()">清除</a>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">清运点名称</label>
- </td>
- </tr>
- <input id="scheduleDate" name="scheduleDate" value="${common.scheduleDate}" type="hidden"/>
- <tr>
- <td align="right">
- <label class="Validform_label">
- <c:if test="${common.scheduleArrangeType == '1'}">
- <input type="radio" name="scheduleArrangeType" value="1" checked>*作业周期(按周):
- </c:if>
- <c:if test="${common.scheduleArrangeType == '2'}">
- <input type="radio" name="scheduleArrangeType" value="1">*作业周期(按周):
- </c:if>
- </label>
- </td>
- <td class="value">
- <input id="scheduleDate1" name="scheduleDate1">
- <span id="scheduleArrangeType1wrong" class="Validform_checktip" style="display: none;">请选择作业周期类型</span>
- <span id="scheduleDate1wrong" class="Validform_checktip" style="display: none;">请选择作业周期类型</span>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">
- <c:if test="${common.scheduleArrangeType == '2'}">
- <input type="radio" name="scheduleArrangeType" value="2" checked>*作业周期(按月):
- </c:if>
- <c:if test="${common.scheduleArrangeType == '1'}">
- <input type="radio" name="scheduleArrangeType" value="2">*作业周期(按月):
- </c:if>
- </label>
- </td>
- <td class="value">
- <input id="scheduleDate2" name="scheduleDate2">
- <span id="scheduleArrangeType2wrong" class="Validform_checktip" style="display: none;">请选择作业周期类型</span>
- <span id="scheduleDate2wrong" class="Validform_checktip" style="display: none;">请选择作业周期类型</span>
- </td>
- </tr>
- <tr>
- <td align="right">
- <label class="Validform_label">
- <span color="red" class="requiredIcon">*</span>状态:
- </label>
- </td>
- <td class="value">
- <t:dictSelect field="scheduleStatus" type="list" typeGroupCode="workStatus"
- dictField="code"
- dictText="name"
- defaultVal="${common.scheduleStatus}" hasLabel="false" title="状态"></t:dictSelect>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">状态</label>
- </td>
- </tr>
- </table>
- </t:formvalid>
- </body>
- <script>
- $(function () {
- let combo1 = [
- {"NAME":"周一","CODE":"1"},
- {"NAME":"周二","CODE":"2"},
- {"NAME":"周三","CODE":"3"},
- {"NAME":"周四","CODE":"4"},
- {"NAME":"周五","CODE":"5"},
- {"NAME":"周六","CODE":"6"},
- {"NAME":"周日","CODE":"7"}
- ]
- $('#scheduleDate1').combobox({
- valueField:'CODE',
- textField:'NAME',
- multiple:true,
- data: combo1
- });
- let combo2 = new Array();
- for(var x=1;x<=31;x++){
- combo2.push({
- "NAME":x+"号","CODE":x
- });
- }
- $('#scheduleDate2').combobox({
- valueField:'CODE',
- textField:'NAME',
- multiple:true,
- data: combo2
- });
- var val= $("input[name='scheduleArrangeType']:checked").val();
- var scheduleDate = $("#scheduleDate").val();
- scheduleDate = scheduleDate.split(",");
- debugger
- for(var x=0;x<scheduleDate.length;x++){
- if(val == "1"){
- $('#scheduleDate1').combobox('select', scheduleDate[x]);
- }else if(val == "2"){
- $('#scheduleDate2').combobox('select', scheduleDate[x]);
- }
- }
- });
- function formatDate() {
- var val= $("input[name='scheduleArrangeType']:checked").val();
- var result = new Array();
- if(val == "1"){
- var list = $("input[name='scheduleDate1']");
- if(list.length == 0){
- $("#scheduleArrangeType1wrong").css("display", "none");
- $("#scheduleDate1wrong").css("display", "initial");
- return false;
- }
- for(var x = 0; x < list.length; x ++){
- result.push(list[x].value);
- }
- }else if(val == "2"){
- var list = $("input[name='scheduleDate2']");
- if(list.length == 0){
- $("#scheduleArrangeType2wrong").css("display", "none");
- $("#scheduleDate2wrong").css("display", "initial");
- return false;
- }
- for(var x = 0; x < list.length; x ++){
- result.push(list[x].value);
- }
- }else {
- $("#scheduleArrangeType1wrong").css("display", "initial");
- $("#scheduleArrangeType2wrong").css("display", "initial");
- return false;
- }
- var str = JSON.stringify(result);
- $("input[name='scheduleDate']").val(str.replaceAll("\"","").replaceAll("[","").replaceAll("]",""));
- return true;
- }
- function openUserSelect() {
- $.dialog({
- content: 'url:clearPointScheduleController.do?select',
- zIndex: getzIndex(),
- title: '清运点选择',
- lock: true,
- width: '850px',
- height: '650px',
- opacity: 0.4,
- button: [
- {
- name: '确定', callback: function () {
- const iframe = this.iframe.contentWindow;
- if (iframe.getReason().length > 0) {
- const strData = eval(iframe.getReason());
- for (const key in strData[0]) {
- if (key === "strId") {
- $("#id").val(strData[0][key]);
- } else if (key === "strName") {
- $("#name").val(strData[0][key]);
- }
- }
- $("#name").focus();
- }
- }, focus: true
- },
- {
- name: '取消', callback: function () {
- }
- }
- ]
- }).zindex();
- }
- function callbackCleanUser() {
- $('#name').val('');
- $('#id').val('');
- }
- </script>
|