| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@include file="/context/mytags.jsp"%>
- <t:base type="jquery,easyui,tools,DatePicker"></t:base>
- <div id="main_service_list" class="easyui-layout" fit="true">
- <div region="center" style="padding:0px;border:0px">
- <t:datagrid name="projectServiceList" checkbox="${param.checkbox?param.checkbox:false}" pageSize="20" pagination="true" fitColumns="true" title="项目外包服务"
- actionUrl="projectServiceController.do?datagrid&projectid=${projectid }&servicetypedetail=${param.servicetypedetail}&id=${param.projectServiceId}"
- idField="id" fit="true" queryMode="group">
- <t:dgCol title="主键" field="id" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="项目" field="projectid" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="项目" field="projectName" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="服务类型" field="servicetypedetail" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="服务编码" field="code" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="服务名称" field="name" queryMode="single" width="120"></t:dgCol>
- <%-- <t:dgCol title="操作" field="opt"></t:dgCol>
- <t:dgFunOpt funname="showDeviceList(id,projectid)" title="查看设备" urlclass="ace_button" urlfont="fa-user"></t:dgFunOpt> --%>
- <t:dgToolBar title="服务列表    " funname="none" width="100%" height="100%"></t:dgToolBar>
- </t:datagrid>
- </div>
- </div>
- <script src = "webpage/cn/com/lzt/projectservice/projectServiceList.js"></script>
- <script type="text/javascript">
- $(function() {
- var datagrid = $("#projectServiceListtb");
- datagrid.prepend($("#pinjie1 div[name='pinjie2']").html());
- $("#pinjie1").html('');
-
-
- datagrid.children(".datagrid-toolbar").children("span:first").after($("#pinjiechaxun1 div[name='pinjiechaxun2']").html());
- $("#pinjiechaxun1").html('');
- });
- </script>
- <c:set var="hiddenProjectSearch">${empty param.hiddenProjectSearch?false:true}</c:set>
- <div id="pinjie1">
- <div name="pinjie2" style="padding:3px; height: auto" class="datagrid-toolbar">
- <div name="searchColums" style="margin:23px 0 18px 0;margin-top: 15px;margin-bottom: 8px;">
- <%-- <input type="hidden" id="orgCode" name="orgCode" value="${orgCode}"> --%>
- <table style="padding:0px" cellpadding="0" cellspacing="1" >
- <tbody>
- <tr>
- <c:if test="${!hiddenProjectSearch}">
- <td align="right" style="width: 74px;">
- <label class="Validform_label">
- 项目名称:
- </label>
- </td>
- <td class="value" colspan="3">
- <input readonly="true" type="text" id="projectName" name="projectName" style="width: 157px" placeholder="请选择项目名称" onclick="openDepartmentSelect()">
- <input id="projectid" name="projectid" type="hidden" value="">
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openDepartmentSelect()">选择</a>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="departRedo" onclick="callbackClean()">清空</a>
- </td>
- </c:if>
- <td align="right" style="width: 74px;">
- <label class="Validform_label">
- 服务编码:
- </label>
- </td>
- <td class="value">
- <input id="code" name="code" type="text" style="width: 157px; " class="inputxt" placeholder="服务编码">
- </td>
- <td align="right" style="width: 74px;">
- <label class="Validform_label">
- 服务名称:
- </label>
- </td>
- <td class="value">
- <input id="name" name="name" type="text" style="width: 157px; " class="inputxt" placeholder="服务名称">
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
-
- <div id="pinjiechaxun1">
- <div name="pinjiechaxun2" style="padding:3px; height: auto" class="datagrid-toolbar">
- <span style="float:right;margin-bottom:4px;">
- <span>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-search" id="projectServiceListSearch" onclick="projectServiceListsearch()">查询</a>
- </span>
- <span>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-reload " id="projectServiceListRedo" onclick="searchReset('projectServiceList')">重置</a>
- </span>
- </div>
- </div>
-
- <%-- function showDeviceList(id,pid){
- var title = '设备明细';
- if(li_east == 0 || $('#main_service_list').layout('panel','east').panel('options').title != title){
- $('#main_service_list').layout('expand','east');
- }
- $('#eastPanel').panel('setTitle','<t:mutiLang langKey="member.list"/>');
- $('#main_service_list').layout('panel','east').panel('setTitle', title);
- $('#main_service_list').layout('panel','east').panel('resize', {width: 300});
- $('#deviceListpanel').panel("refresh", "projectServiceDeviceController.do?list&serviceid=" + id+"&projectid="+pid);
- } --%>
- <script type="text/javascript">
- function initCheck(data){
- var ids = "${ids}";
- var idArr = ids.split(",");
- for(var i=0;i<idArr.length;i++){
- if(idArr[i]!=""){
- $("#projectServiceList").datagrid("selectRecord",idArr[i]);
- }
- }
- }
- //编写自定义JS代码获得输入框中的值等父级页面调用取值
- function getReason(){
- var strId="";
- var strName="";
- var servicetypedetail = "";
- var selectRows = $("#projectServiceList").datagrid('getSelections');
- for(var i=0;i<selectRows.length;i++){
- for(var key in selectRows[i]){
- //console.log(key+"======="+selectRows[i][key]);
- if(key=="id"){
- if(strId.length>0){
- strId+=","+selectRows[i][key];
- }else{
- strId=selectRows[i][key];
- }
- }
-
- if(key=="name"){
- if(strName.length>0){
- strName+=","+selectRows[i][key];
- }else{
- strName=selectRows[i][key];
- }
- }
- if(key=="servicetypedetail"){
- if(servicetypedetail.length>0){
- servicetypedetail+=","+selectRows[i][key];
- }else{
- servicetypedetail=selectRows[i][key];
- }
- }
- }
- }
- //var strData='[{"strShiftid":"'+strShiftid+'","strShiftName":"'+strShiftName+'","strShiftType":"'+strShiftType+'"}]';
- var strData='[{"strId":"'+strId+'","strName":"'+strName+'","servicetypedetail":"'+servicetypedetail+'"}]';
- return strData;
- }
- //选择项目名称,列表================
- function openDepartmentSelect() {
- //$.dialog.setting.zIndex = getzIndex();
- var orgIds = $("#projectid").val();
- /* var orgCode = $("#orgCode").val();*/
- $.dialog({
- content: 'url:userWageController.do?projectDepartTableAll&ids='+orgIds, zIndex: getzIndex(), title: '项目名称列表', lock: true, width: '600px', height: '350px', opacity: 0.4, button: [
- {name: '<t:mutiLang langKey="common.confirm"/>', callback: function (){
- var iframe = this.iframe.contentWindow;
- if(iframe.getReason().length>0){
- var strData=eval(iframe.getReason());
- for(var key in strData[0]){
- if(key=="strPId"){
- $("#projectid").val(strData[0][key]);
- }else if(key=="strDepartName"){
- $("#projectName").val(strData[0][key]);
- }
- }
- }
- }, focus: true},
- {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
-
- ]}).zindex();
- }
- function callbackClean(){
- $('#projectName').val('');
- $('#projectid').val('');
- }
- function none(){}
- function getSelectedRow(){
- var selectRows = $("#projectServiceList").datagrid('getSelections');
- return selectRows;
- }
- </script>
|