| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
- <%@ page language="java" 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"></t:base>
- </head>
- <body style="overflow-y: hidden" scroll="no">
- <t:datagrid pagination="false" name="list" title="选择" actionUrl="contractController.do?selRefDatagridByUser&projectid=${param.projectid}" idField="id" checkbox="false" showRefresh="false" fit="true" queryMode="group" onLoadSuccess="initCheck();initSearch();">
- <t:dgCol title="主键" field="id" 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="200"></t:dgCol>
- <t:dgCol title="供应商" field="partnerid" query="false" queryMode="single" width="120" dictionary="t_b_related_units,id,unit_name"></t:dgCol>
- <c:if test="${not empty pid }">
- <t:dgCol title="项目" field="projectid" query="false" queryMode="single" width="120" dictionary="t_b_project,id,abbreviation ,order by CONVERT(abbreviation USING gbk) asc" defaultVal="${pid }"></t:dgCol>
- </c:if>
- <c:if test="${empty pid }">
- <t:dgCol title="项目" field="projectid" query="false" queryMode="single" width="120" dictionary="t_b_project,id,abbreviation ,order by CONVERT(abbreviation USING gbk) asc"></t:dgCol>
- </c:if>
- <t:dgCol title="签订日期" field="signdate" hidden="true" formatter="yyyy-MM-dd" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="合同描述" field="description" hidden="false" queryMode="single" width="240"></t:dgCol>
- <t:dgCol title="合同金额(元)" field="totalamount" formatterjs="formatterNum" hidden="false" queryMode="single" width="80"></t:dgCol>
- <t:dgCol title="累计开票金额(元)" field="totalinvoice" formatterjs="formatterNum" hidden="false" queryMode="single" width="80"></t:dgCol>
- <t:dgCol title="累计付款金额(元)" field="totalpayment" formatterjs="formatterNum" hidden="false" queryMode="single" width="80"></t:dgCol>
- <t:dgCol title="累计收款金额(元)" field="totalincome" formatterjs="formatterNum" hidden="true" queryMode="single" width="80"></t:dgCol>
- <t:dgCol title="服务开始日期" field="startdate" formatter="yyyy-MM-dd" queryMode="single" width="80"></t:dgCol>
- <t:dgCol title="服务截止日期" field="enddate" formatter="yyyy-MM-dd" queryMode="single" width="80"></t:dgCol>
- <t:dgCol title="审批日期" field="auditdate" hidden="true" formatter="yyyy-MM-dd hh:mm:ss" queryMode="single" width="80"></t:dgCol>
- <t:dgCol title="第三方单位" field="thirdpartner" query="false" hidden="true" queryMode="single" width="80"></t:dgCol>
- <t:dgToolBar title="合同清单:" icon="icon-detail" funname="temp" width="100%" height="100%"></t:dgToolBar>
- </t:datagrid>
- </body>
- </html>
- <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>
- <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" value="${pname}" style="width: 157px" placeholder="请选择项目名称" onclick="openDepartmentSelect()">
- <input id="projectid" name="projectid" type="hidden" value="${pid}">
- <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>
- <td align="right" style="width: 74px;">
- <label class="Validform_label">
- 供应商:
- </label>
- </td>
- <td class="value" colspan="3">
- <input readonly="true" type="text" id="partnerName" name="partnerName" style="width: 157px" placeholder="请选择供应商" onclick="openPartnerSelect()">
- <input id="partnerid" name="partnerid" type="hidden" value="">
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="partnerSearch" onclick="openPartnerSelect()">选择</a>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="partnerRedo" onclick="callbackCleanPartner()">清空</a>
- </td>
- </tr>
- <tr height="50px">
- <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>
- <td align="right" style="width: 74px;">
- <label class="Validform_label">
- 合同描述:
- </label>
- </td>
- <td class="value">
- <input id="description" name="description" 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="listSearch" onclick="listsearch()">查询</a>
- </span>
- <span>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-reload " id="listRedo" onclick="searchReset('list')">重置</a>
- </span>
- </div>
- </div>
- <script type="text/javascript" src="plug-in/tools/money.js"></script>
- <script type="text/javascript">
- $(function() {
- var datagrid = $("#listtb");
- datagrid.prepend($("#pinjie1 div[name='pinjie2']").html());
- $("#pinjie1").html('');
-
-
- datagrid.children(".datagrid-toolbar").children("span:first").after($("#pinjiechaxun1 div[name='pinjiechaxun2']").html());
- $("#pinjiechaxun1").html('');
- });
- var hasInit = false;
- function initSearch(){
- if($('#projectid').val() && !hasInit){
- listsearch();
- }
- hasInit = true;
- }
- function initCheck(data){
- var ids = "${ids}";
- var idArr = ids.split(",");
- for(var i=0;i<idArr.length;i++){
- if(idArr[i]!=""){
- $("#list").datagrid("selectRecord",idArr[i]);
- }
- }
- }
- //编写自定义JS代码获得输入框中的值等父级页面调用取值
- function getReason(){
- var strShiftid="";
- var strShiftCode="";
- var selectRows = $("#list").datagrid('getSelections');
- //console.log(selectRows.length);
- //console.log(selectRows);
- for(var i=0;i<selectRows.length;i++){
- for(var key in selectRows[i]){
- //console.log(key+"======="+selectRows[i][key]);
- if(key=="id"){
- if(strShiftid.length>0){
- strShiftid+=","+selectRows[i][key];
- }else{
- strShiftid=selectRows[i][key];
- }
- }
- if(key=="name"){
- if(strShiftCode.length>0){
- strShiftCode+=","+selectRows[i][key];
- }else{
- strShiftCode=selectRows[i][key];
- }
- }
- }
- }
- var strData='[{"id":"'+strShiftid+'","code":"'+strShiftCode+'"}]';
- return strData;
- }
- //选择项目名称,列表================
- function openDepartmentSelect() {
- //$.dialog.setting.zIndex = getzIndex();
- var orgIds = $("#projectid").val();
- /* var orgCode = $("#orgCode").val();*/
- $.dialog({
- content: 'url:publicpageController.do?projectSelect&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=="strId"){
- $("#projectid").val(strData[0][key]);
- }else if(key=="strName"){
- $("#projectName").val(strData[0][key]);
- }
- }
- }
- }, focus: true},
- {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
-
- ]}).zindex();
- }
- function callbackClean(){
- $('#projectName').val('');
- $('#projectid').val('');
- }
- //选择供应商
- function openPartnerSelect() {
- //$.dialog.setting.zIndex = getzIndex();
- var partnerIds = $("#partnerid").val();
- /* var orgCode = $("#orgCode").val();*/
- $.dialog({
- content: 'url:partnerController.do?supplierAll&ids='+partnerIds, 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=="strId"){
- $("#partnerid").val(strData[0][key]);
- }else if(key=="strPartnerName"){
- $("#partnerName").val(strData[0][key]);
- }
- }
- }
- }, focus: true},
- {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
-
- ]}).zindex();
- }
- function callbackCleanPartner(){
- $('#partnerName').val('');
- $('#partnerid').val('');
- }
- function temp(){
- }
- function getSelectedRow(){
- var selectRows = $("#list").datagrid('getSelections');
- return selectRows;
- }
- </script>
|