630 lines
		
	
	
		
			29 KiB
		
	
	
	
		
			HTML
		
	
	
	
			
		
		
	
	
			630 lines
		
	
	
		
			29 KiB
		
	
	
	
		
			HTML
		
	
	
	
| <div class="easyui-layout" style="width:100%;height:100%;">
 | |
| 
 | |
|     <div data-options="region:'west', title:'危险废物名称', split:true, border:false" style="width: 300px;height:100%;">
 | |
|         <div id="dwasteTableBar">
 | |
|             <a onclick="addDwaste()" class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain: true">新增</a>
 | |
|             <a onclick="editDWaste()" class="easyui-linkbutton" data-options="iconCls: 'fa-pencil',plain: true">编辑</a>
 | |
|             <a onclick="delDWaste()" class="easyui-linkbutton" data-options="iconCls: 'fa-trash',plain: true">删除</a>
 | |
|         </div>
 | |
|         <table id="dwasteTable" style="height:100%"></table>
 | |
|     </div>
 | |
|     <div data-options="region:'center',split:true,border:false" style="height:100%;">
 | |
|         <div id="dwasteTT" class="easyui-tabs" style="width:100%;height:100%;">
 | |
|             <div title="一览表">
 | |
|                 <div id="dwasteMakeListTableBar">
 | |
|                     <a onclick="addDwasteMakeList()" class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain: true">新增</a>
 | |
|                     <a onclick="delDwasteMakeList()" class="easyui-linkbutton" data-options="iconCls: 'fa-trash',plain: true">删除</a>
 | |
|                 </div>
 | |
|                 <table id="dwasteMakeListTable" style="height:100%"></table>
 | |
|             </div>
 | |
|             <div title="产生环节记录">
 | |
|                 <div id="dwasteMakeRecordTableBar">
 | |
|                     <a onclick="addDwasteMakeRecord()" class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain: true">新增</a>
 | |
|                     <a onclick="delDwasteMakeRecord()" class="easyui-linkbutton" data-options="iconCls: 'fa-trash',plain: true">删除</a>
 | |
|                 </div>
 | |
|                 <table id="dwasteMakeRecordTable" style="height:100%"></table>
 | |
|             </div>
 | |
|             <div title="贮存环节记录">
 | |
|                 <div id="dwasteKeepRecordTableBar">
 | |
|                     <a onclick="addDwasteKeepRecord()" class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain: true">新增</a>
 | |
|                     <a onclick="delDwasteKeepRecord()" class="easyui-linkbutton" data-options="iconCls: 'fa-trash',plain: true">删除</a>
 | |
|                 </div>
 | |
|                 <table id="dwasteKeepRecordTable" style="height:100%"></table>
 | |
|             </div>
 | |
|             <div title="自行利用处置记录">
 | |
|                 <div id="dwasteHandleRecordTableBar">
 | |
|                     <a onclick="addDwasteHandleRecord()" class="easyui-linkbutton" data-options="iconCls: 'fa-plus',plain: true">新增</a>
 | |
|                     <a onclick="delDwasteHandleRecord()" class="easyui-linkbutton" data-options="iconCls: 'fa-trash',plain: true">删除</a>
 | |
|                 </div>
 | |
|                 <table id="dwasteHandleRecordTable" style="height:100%"></table>
 | |
|             </div>
 | |
|         </div>
 | |
|     </div>
 | |
| </div>
 | |
| <div id="dwasteDialog" class="easyui-dialog" style="width:400px;height:200px;padding:5px 15px;"
 | |
|     data-options="resizable:true,modal:true,closed:true,border:false">
 | |
|     <form method="post" id="dwasteForm">
 | |
|         <input name="id" type="hidden">
 | |
|         <input name="type" type="hidden" id="typedFormItem">
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="number" data-options="label:'废物编号'" class="easyui-textbox" style="width:300px;" required></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="name" data-options="label:'废物名称'" class="easyui-textbox" style="width:300px;"
 | |
|                 required></input>
 | |
|         </div>
 | |
|         <div style="text-align: center;">
 | |
|             <a class="easyui-linkbutton" iconCls="fa-floppy-o" onclick="saveDWaste()">保存</a>
 | |
|         </div>
 | |
|     </form>
 | |
| </div>
 | |
| <div id="dwasteMakeListDialog" class="easyui-dialog" style="width:400px;height:600px;padding:5px 15px;"
 | |
|     data-options="resizable:true,modal:true,closed:true,border:false">
 | |
|     <form method="post" id="dwasteMakeListForm">
 | |
|         <input name="id" type="hidden">
 | |
|         <input name="waste" type="hidden" id="dwasteFormItem">
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input class="easyui-combobox" name="waste"
 | |
|     data-options="label:'危废', valueField:'id',textField:'name',url:'/api/enp/waste/combobox/?type=2', labelWidth:100" style="width:300px;" >
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="license" data-options="label:'许可证', labelWidth:100" class="easyui-textbox" style="width:300px;" ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="process" data-options="label:'产生工序', labelWidth:100" class="easyui-textbox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="source" data-options="label:'生产源/车间', labelWidth:100" class="easyui-textbox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="goto" data-options="label:'废物流向', labelWidth:100" class="easyui-textbox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="companyname" data-options="label:'处理企业', labelWidth:100" class="easyui-textbox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="gen_count" data-options="label:'年度产生量(吨)', labelWidth:100" class="easyui-numberbox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="text-align: center;">
 | |
|             <a class="easyui-linkbutton" iconCls="fa-floppy-o" onclick="saveDwasteMakeList()">保存</a>
 | |
|         </div>
 | |
|     </form>
 | |
| </div>
 | |
| <div id="dwasteMakeRecordDialog" class="easyui-dialog" style="width:400px;height:600px;padding:5px 15px;"
 | |
|     data-options="resizable:true,modal:true,closed:true,border:false">
 | |
|     <form method="post" id="dwasteMakeRecordForm">
 | |
|         <input name="id" type="hidden">
 | |
|         <input name="waste" type="hidden" id="dwasteMakeRecordForm_waste">
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input class="easyui-combobox" name="waste"
 | |
|     data-options="label:'危废', valueField:'id',textField:'name',url:'/api/enp/waste/combobox/?type=2', labelWidth:100" style="width:300px;" >
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="gen_time" data-options="label:'产生时间', labelWidth:100" class="easyui-datetimebox" style="width:300px;" ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="gen_count" data-options="label:'产生数量(kg)', labelWidth:100" class="easyui-numberbox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="container" data-options="label:'容器规格(kg/个)', labelWidth:110" class="easyui-textbox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="container_count" data-options="label:'容器个数', labelWidth:100" class="easyui-numberbox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="trans_time" data-options="label:'转移时间', labelWidth:100" class="easyui-datetimebox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="trans_count" data-options="label:'转移个数', labelWidth:100" class="easyui-numberbox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="goto" data-options="label:'去向', labelWidth:100" class="easyui-textbox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="text-align: center;">
 | |
|             <a class="easyui-linkbutton" iconCls="fa-floppy-o" onclick="saveDwasteMakeRecord()">保存</a>
 | |
|         </div>
 | |
|     </form>
 | |
| </div>
 | |
| <div id="dwasteKeepRecordDialog" class="easyui-dialog" style="width:400px;height:600px;padding:5px 15px;"
 | |
|     data-options="resizable:true,modal:true,closed:true,border:false">
 | |
|     <form method="post" id="dwasteKeepRecordForm">
 | |
|         <input name="id" type="hidden">
 | |
|         <input name="waste" type="hidden" id="dwasteKeepRecordForm_waste">
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input class="easyui-combobox" name="waste"
 | |
|     data-options="label:'危废', valueField:'id',textField:'name',url:'/api/enp/waste/combobox/?type=2', labelWidth:100" style="width:300px;" >
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="in_time" data-options="label:'入库时间', labelWidth:100" class="easyui-datetimebox" style="width:300px;" ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="in_count" data-options="label:'入库数量', labelWidth:100" class="easyui-numberbox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="source" data-options="label:'废物来源', labelWidth:100" class="easyui-textbox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="container" data-options="label:'容器规格(kg/个)', labelWidth:110" class="easyui-textbox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="container_count" data-options="label:'容器个数', labelWidth:100" class="easyui-numberbox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="place" data-options="label:'存放位置', labelWidth:100" class="easyui-textbox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="out_time" data-options="label:'出库时间', labelWidth:100" class="easyui-datetimebox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="out_count" data-options="label:'出库数量', labelWidth:100" class="easyui-numberbox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="goto" data-options="label:'去向', labelWidth:100" class="easyui-textbox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="text-align: center;">
 | |
|             <a class="easyui-linkbutton" iconCls="fa-floppy-o" onclick="saveDwasteKeepRecord()">保存</a>
 | |
|         </div>
 | |
|     </form>
 | |
| </div>
 | |
| <div id="dwasteHandleRecordDialog" class="easyui-dialog" style="width:400px;height:600px;padding:5px 15px;"
 | |
|     data-options="resizable:true,modal:true,closed:true,border:false">
 | |
|     <form method="post" id="dwasteHandleRecordForm">
 | |
|         <input name="id" type="hidden">
 | |
|         <input name="waste" type="hidden" id="dwasteHandleRecordForm_waste">
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input class="easyui-combobox" name="waste"
 | |
|     data-options="label:'危废', valueField:'id',textField:'name',url:'/api/enp/waste/combobox/?type=2', labelWidth:100" style="width:300px;" >
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="accept_time" data-options="label:'接收时间', labelWidth:100" class="easyui-datetimebox" style="width:300px;" ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="accept_count" data-options="label:'接收数量', labelWidth:100" class="easyui-numberbox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="source" data-options="label:'废物来源', labelWidth:100" class="easyui-textbox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="container" data-options="label:'容器规格(kg/个)', labelWidth:110" class="easyui-textbox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="container_count" data-options="label:'容器个数', labelWidth:100" class="easyui-numberbox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|             <input name="handle_time" data-options="label:'处置时间', labelWidth:100" class="easyui-datetimebox" style="width:300px;"
 | |
|                 ></input>
 | |
|         </div>
 | |
|         <div style="margin-bottom:10px">
 | |
|            
 | |
| 
 | |
|                 <select class="easyui-combobox" data-options="label:'处置方式' " name="handle_method" style="width:300px;">
 | |
|                     <option value="1">自行利用</option>
 | |
|                     <option value="2">委托处置</option>
 | |
|                     <option value="3">自行处置</option>
 | |
|                 </select>
 | |
| 
 | |
|         </div>
 | |
|         <div style="text-align: center;">
 | |
|             <a class="easyui-linkbutton" iconCls="fa-floppy-o" onclick="saveDwasteHandleRecord()">保存</a>
 | |
|         </div>
 | |
|     </form>
 | |
| </div>
 | |
| <script>
 | |
|     // var wasteOptions=[]
 | |
|     // $(function(){
 | |
|     //     $.get('/api/enp/waste/combobox/?type=2',function(res){
 | |
|     //         wasteOptions = res
 | |
|     //     })
 | |
|     // })
 | |
|     var dwaste_action_url = '/api/enp/waste/create/';
 | |
|     var dwasteMakeList_action_url = '';
 | |
|     var dwasteMakeRecord_action_url="";
 | |
|     var dwasteKeepRecord_action_url="";
 | |
|     var dwasteHandleRecord_action_url="";
 | |
|     $('#dwasteTable').datagrid({
 | |
|         url: '/api/enp/waste/list/?type=2',
 | |
|         rownumbers: true,
 | |
|         singleSelect: true,
 | |
|         striped: true,
 | |
|         method: 'get',
 | |
|         toolbar: '#dwasteTableBar',
 | |
|         border: false,
 | |
|         fitColumns: true,
 | |
|         columns: [[
 | |
|             { field: 'id', title: 'ID', hidden: true },
 | |
|             { field: 'number', title: '废物编号', width: 100 },
 | |
|             { field: 'name', title: '废物名称', width: 100 },
 | |
|         ]],
 | |
|         onClickRow: function (index, row) {
 | |
|             
 | |
|         }
 | |
|     });
 | |
|     $('#dwasteMakeListTable').datagrid({
 | |
|         url: '/api/enp/dwastemakelist/list/',
 | |
|         rownumbers: true,
 | |
|         singleSelect: true,
 | |
|         striped: true,
 | |
|         method: 'get',
 | |
|         toolbar: '#dwasteMakeListTableBar',
 | |
|         border: false,
 | |
|         fitColumns: true,
 | |
|         columns: [[
 | |
|             { field: 'id', title: 'ID', hidden: true },
 | |
|             { field: 'waste', title: 'waste', hidden: true },
 | |
|             { field: 'waste__number', title: '废物编号', width: 100 },
 | |
|             { field: 'waste__name', title: '废物名称', width: 100 },
 | |
|             { field: 'license', title: '许可证', width: 100 },
 | |
|             { field: 'process', title: '产生工序', width: 100 },
 | |
|             { field: 'source', title: '产生源/车间', width: 100 },
 | |
|             { field: 'goto', title: '废物流向', width: 100 },
 | |
|             { field: 'companyname', title: '处置企业', width: 100 },
 | |
|             { field: 'gen_count', title: '年度产生量(吨)', width: 100 },
 | |
|             { field: 'create_time', title: '创建时间', width: 100 }
 | |
|         ]],
 | |
|         onClickRow: function (index, row) {
 | |
|             
 | |
|         }
 | |
|     });
 | |
|     $('#dwasteMakeRecordTable').datagrid({
 | |
|         url: '/api/enp/dwastemakerecord/list/',
 | |
|         rownumbers: true,
 | |
|         singleSelect: true,
 | |
|         striped: true,
 | |
|         method: 'get',
 | |
|         toolbar: '#dwasteMakeRecordTableBar',
 | |
|         border: false,
 | |
|         fitColumns: true,
 | |
|         columns: [[
 | |
|             { field: 'id', title: 'ID', hidden: true },
 | |
|             { field: 'waste', title: 'waste', hidden: true },
 | |
|             { field: 'waste__number', title: '废物编号', width: 100 },
 | |
|             { field: 'waste__name', title: '废物名称', width: 100 },
 | |
|             { field: 'gen_time', title: '产生时间', width: 100 },
 | |
|             { field: 'gen_count', title: '产生数量', width: 80 },
 | |
|             { field: 'container', title: '容器规格(kg/个)', width: 100 },
 | |
|             { field: 'container_count', title: '容器个数', width: 80 },
 | |
|             { field: 'trans_time', title: '转移时间', width: 100 },
 | |
|             { field: 'trans_count', title: '转移个数', width: 80 },
 | |
|             { field: 'gen_count', title: '年度产生量(吨)', width: 80 },
 | |
|             { field: 'goto', title: '去向', width: 100 }
 | |
|         ]],
 | |
|         onClickRow: function (index, row) {
 | |
|             
 | |
|         }
 | |
|     });
 | |
|     $('#dwasteKeepRecordTable').datagrid({
 | |
|         url: '/api/enp/dwastekeeprecord/list/',
 | |
|         rownumbers: true,
 | |
|         singleSelect: true,
 | |
|         striped: true,
 | |
|         method: 'get',
 | |
|         toolbar: '#dwasteKeepRecordTableBar',
 | |
|         border: false,
 | |
|         fitColumns: true,
 | |
|         columns: [[
 | |
|             { field: 'id', title: 'ID', hidden: true },
 | |
|             { field: 'waste', title: 'waste', hidden: true },
 | |
|             { field: 'waste__number', title: '废物编号', width: 80 },
 | |
|             { field: 'waste__name', title: '废物名称', width: 100 },
 | |
|             { field: 'in_time', title: '入库时间', width: 100 },
 | |
|             { field: 'in_count', title: '入库数量', width: 80 },
 | |
|             { field: 'source', title: '废物来源', width: 100 },
 | |
|             { field: 'container', title: '容器规格(kg/个)', width: 100 },
 | |
|             { field: 'container_count', title: '容器个数', width: 80 },
 | |
|             { field: 'place', title: '存放位置', width: 100 },
 | |
|             { field: 'out_time', title: '出库时间', width: 100 },
 | |
|             { field: 'out_count', title: '出库数量', width: 80 },
 | |
|             { field: 'goto', title: '去向', width: 100 }
 | |
|         ]],
 | |
|         onClickRow: function (index, row) {
 | |
|             
 | |
|         }
 | |
|     });
 | |
|     $('#dwasteHandleRecordTable').datagrid({
 | |
|         url: '/api/enp/dwastehandlerecord/list/',
 | |
|         rownumbers: true,
 | |
|         singleSelect: true,
 | |
|         striped: true,
 | |
|         method: 'get',
 | |
|         toolbar: '#dwasteHandleRecordTableBar',
 | |
|         border: false,
 | |
|         fitColumns: true,
 | |
|         columns: [[
 | |
|             { field: 'id', title: 'ID', hidden: true },
 | |
|             { field: 'waste', title: 'waste', hidden: true },
 | |
|             { field: 'waste__number', title: '废物编号', width: 80 },
 | |
|             { field: 'waste__name', title: '废物名称', width: 100 },
 | |
|             { field: 'accept_time', title: '接收时间', width: 100 },
 | |
|             { field: 'accept_count', title: '接收数量', width: 80 },
 | |
|             { field: 'source', title: '废物来源', width: 100 },
 | |
|             { field: 'container', title: '容器规格(kg/个)', width: 100 },
 | |
|             { field: 'container_count', title: '容器个数', width: 80 },
 | |
|             { field: 'handle_time', title: '处置时间', width: 100 },
 | |
|             {field:'handle_method',title:'处置方式', width:80,
 | |
| 			formatter: function(value,row,index){
 | |
| 				if (value=='1'){
 | |
| 					return '自行利用';
 | |
| 				} 
 | |
|                  else if (value=='2')  {
 | |
| 					return '委托处置';
 | |
| 				}
 | |
|                 else{
 | |
|                     return '自行处置';
 | |
|                 }
 | |
| 			}
 | |
| 		}
 | |
|         ]],
 | |
|         onClickRow: function (index, row) {
 | |
|             
 | |
|         }
 | |
|     });
 | |
|     function addDwaste() {
 | |
|         $('#dwasteDialog').dialog('open').dialog('setTitle', '新增危废名').window('center');
 | |
|         $('#dwasteForm').form('clear');
 | |
|         $('#typedFormItem').attr('value',2);
 | |
|         dwaste_action_url = '/api/enp/waste/create/'
 | |
|     }
 | |
|     function addDwasteMakeList(){
 | |
|         $('#dwasteMakeListDialog').dialog('open').dialog('setTitle', '新增记录').window('center');
 | |
|         $('#dwasteMakeListForm').form('clear');
 | |
|         dwasteMakeList_action_url = '/api/enp/dwastemakelist/create/'
 | |
|     }
 | |
|     function addDwasteMakeRecord(){
 | |
|         $('#dwasteMakeRecordDialog').dialog('open').dialog('setTitle', '新增记录').window('center');
 | |
|         $('#dwasteMakeRecordForm').form('clear');
 | |
|         dwasteMakeRecord_action_url = '/api/enp/dwastemakerecord/create/'
 | |
|     }
 | |
|     function addDwasteKeepRecord(){
 | |
|         $('#dwasteKeepRecordDialog').dialog('open').dialog('setTitle', '新增记录').window('center');
 | |
|         $('#dwasteKeepRecordForm').form('clear');
 | |
|         dwasteKeepRecord_action_url = '/api/enp/dwastekeeprecord/create/'
 | |
|     }
 | |
|     function addDwasteHandleRecord(){
 | |
|         $('#dwasteHandleRecordDialog').dialog('open').dialog('setTitle', '新增记录').window('center');
 | |
|         $('#dwasteHandleRecordForm').form('clear');
 | |
|         dwasteHandleRecord_action_url = '/api/enp/dwastehandlerecord/create/'
 | |
|     }
 | |
|     function saveDWaste() {
 | |
|         var data = $('#dwasteForm').serializeJSON();
 | |
|         $.ajax({
 | |
|             type: "POST",
 | |
|             url: dwaste_action_url,
 | |
|             data: JSON.stringify(data),
 | |
|             datatype: "json",
 | |
|             processData: false,
 | |
|             contentType: "application/json;charset=utf-8",
 | |
|             beforeSend: function () {
 | |
|                 return $('#dwasteForm').form('validate')
 | |
|             },
 | |
|             success: function (data) {
 | |
|                 $("#dwasteTable").datagrid('reload');
 | |
|                 $("#dwasteDialog").dialog("close");
 | |
|             },
 | |
|         });
 | |
|     }
 | |
|     function saveDwasteMakeList() {
 | |
|         var data = $('#dwasteMakeListForm').serializeJSON();
 | |
|         $.ajax({
 | |
|             type: "POST",
 | |
|             url: dwasteMakeList_action_url,
 | |
|             data: JSON.stringify(data),
 | |
|             datatype: "json",
 | |
|             processData: false,
 | |
|             contentType: "application/json;charset=utf-8",
 | |
|             beforeSend: function () {
 | |
|                 return $('#dwasteMakeListForm').form('validate')
 | |
|             },
 | |
|             success: function (data) {
 | |
|                 $("#dwasteMakeListTable").datagrid('reload');
 | |
|                 $("#dwasteMakeListDialog").dialog("close");
 | |
|             },
 | |
|         });
 | |
|     }
 | |
|     function saveDwasteMakeRecord() {
 | |
|         var data = $('#dwasteMakeRecordForm').serializeJSON();
 | |
|         $.ajax({
 | |
|             type: "POST",
 | |
|             url: dwasteMakeRecord_action_url,
 | |
|             data: JSON.stringify(data),
 | |
|             datatype: "json",
 | |
|             processData: false,
 | |
|             contentType: "application/json;charset=utf-8",
 | |
|             beforeSend: function () {
 | |
|                 return $('#dwasteMakeRecordForm').form('validate')
 | |
|             },
 | |
|             success: function (data) {
 | |
|                 $("#dwasteMakeRecordTable").datagrid('reload');
 | |
|                 $("#dwasteMakeRecordDialog").dialog("close");
 | |
|             },
 | |
|         });
 | |
|     }
 | |
|     function saveDwasteKeepRecord() {
 | |
|         var data = $('#dwasteKeepRecordForm').serializeJSON();
 | |
|         $.ajax({
 | |
|             type: "POST",
 | |
|             url: dwasteKeepRecord_action_url,
 | |
|             data: JSON.stringify(data),
 | |
|             datatype: "json",
 | |
|             processData: false,
 | |
|             contentType: "application/json;charset=utf-8",
 | |
|             beforeSend: function () {
 | |
|                 return $('#dwasteKeepRecordForm').form('validate')
 | |
|             },
 | |
|             success: function (data) {
 | |
|                 $("#dwasteKeepRecordTable").datagrid('reload');
 | |
|                 $("#dwasteKeepRecordDialog").dialog("close");
 | |
|             },
 | |
|         });
 | |
|     }
 | |
|     function saveDwasteHandleRecord() {
 | |
|         var data = $('#dwasteHandleRecordForm').serializeJSON();
 | |
|         $.ajax({
 | |
|             type: "POST",
 | |
|             url: dwasteHandleRecord_action_url,
 | |
|             data: JSON.stringify(data),
 | |
|             datatype: "json",
 | |
|             processData: false,
 | |
|             contentType: "application/json;charset=utf-8",
 | |
|             beforeSend: function () {
 | |
|                 return $('#dwasteHandleRecordForm').form('validate')
 | |
|             },
 | |
|             success: function (data) {
 | |
|                 $("#dwasteHandleRecordTable").datagrid('reload');
 | |
|                 $("#dwasteHandleRecordDialog").dialog("close");
 | |
|             },
 | |
|         });
 | |
|     }
 | |
|     function delDwasteMakeList(){
 | |
|         var row = $('#dwasteMakeListTable').datagrid('getSelected');
 | |
|         if (row) {
 | |
|             $.messager.confirm('提示', '确定删除吗?', function (r) {
 | |
|                 if (r) {
 | |
|                     var data = { id: row.id }
 | |
|                     $.ajax({
 | |
|                         type: "POST",
 | |
|                         url: '/api/enp/dwastemakelist/delete/',
 | |
|                         data: JSON.stringify(data),
 | |
|                         datatype: "json",
 | |
|                         beforeSend: function () { },
 | |
|                         success: function (data) {
 | |
|                             if (data.code == 1) {
 | |
|                                 $("#dwasteMakeListTable").datagrid('reload');
 | |
|                             }
 | |
|                             else {
 | |
|                                 $.messager.alert('提示', '操作失败!');
 | |
|                             }
 | |
|                         },
 | |
|                     });
 | |
|                 }
 | |
|             });
 | |
|         }
 | |
|         else { $.messager.alert('提示', '请选择一条数据!'); }
 | |
|     }
 | |
|     function delDwasteMakeRecord(){
 | |
|         var row = $('#dwasteMakeRecordTable').datagrid('getSelected');
 | |
|         if (row) {
 | |
|             $.messager.confirm('提示', '确定删除吗?', function (r) {
 | |
|                 if (r) {
 | |
|                     var data = { id: row.id }
 | |
|                     $.ajax({
 | |
|                         type: "POST",
 | |
|                         url: '/api/enp/dwastemakerecord/delete/',
 | |
|                         data: JSON.stringify(data),
 | |
|                         datatype: "json",
 | |
|                         beforeSend: function () { },
 | |
|                         success: function (data) {
 | |
|                             if (data.code == 1) {
 | |
|                                 $("#dwasteMakeRecordTable").datagrid('reload');
 | |
|                             }
 | |
|                             else {
 | |
|                                 $.messager.alert('提示', '操作失败!');
 | |
|                             }
 | |
|                         },
 | |
|                     });
 | |
|                 }
 | |
|             });
 | |
|         }
 | |
|         else { $.messager.alert('提示', '请选择一条数据!'); }
 | |
|     }
 | |
|     function delDwasteKeepRecord(){
 | |
|         var row = $('#dwasteKeepRecordTable').datagrid('getSelected');
 | |
|         if (row) {
 | |
|             $.messager.confirm('提示', '确定删除吗?', function (r) {
 | |
|                 if (r) {
 | |
|                     var data = { id: row.id }
 | |
|                     $.ajax({
 | |
|                         type: "POST",
 | |
|                         url: '/api/enp/dwastekeeprecord/delete/',
 | |
|                         data: JSON.stringify(data),
 | |
|                         datatype: "json",
 | |
|                         beforeSend: function () { },
 | |
|                         success: function (data) {
 | |
|                             if (data.code == 1) {
 | |
|                                 $("#dwasteKeepRecordTable").datagrid('reload');
 | |
|                             }
 | |
|                             else {
 | |
|                                 $.messager.alert('提示', '操作失败!');
 | |
|                             }
 | |
|                         },
 | |
|                     });
 | |
|                 }
 | |
|             });
 | |
|         }
 | |
|         else { $.messager.alert('提示', '请选择一条数据!'); }
 | |
|     }
 | |
|     function delDwasteHandleRecord(){
 | |
|         var row = $('#dwasteHandleRecordTable').datagrid('getSelected');
 | |
|         if (row) {
 | |
|             $.messager.confirm('提示', '确定删除吗?', function (r) {
 | |
|                 if (r) {
 | |
|                     var data = { id: row.id }
 | |
|                     $.ajax({
 | |
|                         type: "POST",
 | |
|                         url: '/api/enp/dwastehandlerecord/delete/',
 | |
|                         data: JSON.stringify(data),
 | |
|                         datatype: "json",
 | |
|                         beforeSend: function () { },
 | |
|                         success: function (data) {
 | |
|                             if (data.code == 1) {
 | |
|                                 $("#dwasteHandleRecordTable").datagrid('reload');
 | |
|                             }
 | |
|                             else {
 | |
|                                 $.messager.alert('提示', '操作失败!');
 | |
|                             }
 | |
|                         },
 | |
|                     });
 | |
|                 }
 | |
|             });
 | |
|         }
 | |
|         else { $.messager.alert('提示', '请选择一条数据!'); }
 | |
|     }
 | |
|     function delDWaste() {
 | |
|         var row = $('#dwasteTable').datagrid('getSelected');
 | |
|         if (row) {
 | |
|             $.messager.confirm('提示', '确定删除吗?', function (r) {
 | |
|                 if (r) {
 | |
|                     var data = { id: row.id }
 | |
|                     $.ajax({
 | |
|                         type: "POST",
 | |
|                         url: '/api/enp/waste/delete/',
 | |
|                         data: JSON.stringify(data),
 | |
|                         datatype: "json",
 | |
|                         beforeSend: function () { },
 | |
|                         success: function (data) {
 | |
|                             if (data.code == 1) {
 | |
|                                 $("#dwasteTable").datagrid('reload');
 | |
|                             }
 | |
|                             else {
 | |
|                                 $.messager.alert('提示', '操作失败!');
 | |
|                             }
 | |
|                         },
 | |
|                     });
 | |
|                 }
 | |
|             });
 | |
|         }
 | |
|         else { $.messager.alert('提示', '请选择一条数据!'); }
 | |
|     }
 | |
| </script> |