| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240 |
- <%@ 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,DatePicker"></t:base>
- </head>
- <body style="overflow-y: hidden" scroll="no">
- <t:datagrid pagination="false" name="contractSaleList" pageSize="20" sortName="createDate" sortOrder="desc" title="选择销售合同" actionUrl="contractSaleController.do?selRefDatagridByUser" idField="id" checkbox="false" showRefresh="false" fit="true" queryMode="group" onLoadSuccess="initCheck">
- <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="customername" query="false" queryMode="single" width="120" ></t:dgCol>
- <t:dgCol title="项目" field="projectname" query="false" queryMode="single" width="120" ></t:dgCol>
- <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="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:dgToolBar title="查看" icon="icon-search" url="contractSaleController.do?goUpdate" funname="detail" width="100%" height="100%"></t:dgToolBar>
- </t:datagrid>
- </body>
- </html>
- <script type="text/javascript" src="plug-in/tools/money.js"></script>
- <script src = "webpage/cn/com/lzt/contractsale/contractSaleList.js"></script>
- <script>
- $(function() {
- var datagrid = $("#contractSaleListtb");
- 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>
- <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" >
- <input type="text" id="projectname" name="projectname" style="width: 157px" placeholder="请填写项目名称" >
- <!-- <input id="projectid" name="projectid" type="hidden" value="">
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openProjectSelect()">选择</a>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="departRedo" onclick="callbackCleanProject()">清空</a> -->
- </td>
- <td align="right" style="width: 74px;">
- <label class="Validform_label">
- 客户:
- </label>
- </td>
- <td class="value" >
- <input type="text" id="customername" name="customername" style="width: 157px" placeholder="请填写客户名称" >
- <!-- <input id="customerid" name="customerid" type="hidden" value="">
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="customerSearch" onclick="openCustomerSelect()">选择</a>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="customerRedo" onclick="callbackCleanCustomer()">清空</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>
- <!-- <td>
- <span style="display:-moz-inline-box;display:inline-block;">
- <span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 90px;text-align:right;text-overflow:ellipsis;-o-text-overflow:ellipsis; overflow: hidden;white-space:nowrap; "
- title="起始日期">合同生效日期:</span><input type="text" name="startdate_begin" style="width: 94px" class="Wdate" onclick="WdatePicker()">
- <span style="display:-moz-inline-box;display:inline-block;width: 8px !important;text-align:right;">~
- </span><input type="text" name="startdate_end" style="width: 94px" class="Wdate" onclick="WdatePicker()"></span>
- </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="contractSaleListSearch" onclick="contractSaleListsearch()">查询</a>
- </span>
- <span>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-reload " id="contractSaleListRedo" onclick="searchReset('contractSaleList')">重置</a>
- </span>
- </div>
- </div>
- </div>
- </div>
-
- <script type="text/javascript">
- $(function() {
- $('#projectname').bind('keyup', function(event) {
- if (event.keyCode == "13") {
- //回车执行查询
- contractSaleListsearch();
- }
- });
- $('#customername').bind('keyup', function(event) {
- if (event.keyCode == "13") {
- //回车执行查询
- contractSaleListsearch();
- }
- });
- });
- function initCheck(data){
- var ids = "${ids}";
- var idArr = ids.split(",");
- for(var i=0;i<idArr.length;i++){
- if(idArr[i]!=""){
- $("#contractSaleList").datagrid("selectRecord",idArr[i]);
- }
- }
- }
- //编写自定义JS代码获得输入框中的值等父级页面调用取值
- function getReason(){
- var strShiftid="";
- var strShiftCode="";
- var selectRows = $("#contractSaleList").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 openProjectSelect() {
- //$.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 callbackCleanProject(){
- $('#projectname').val('');
- $('#projectid').val('');
- }
- //选择供应商
- function openCustomerSelect() {
- //$.dialog.setting.zIndex = getzIndex();
- var partnerIds = $("#customerid").val();
- /* var orgCode = $("#orgCode").val();*/
- $.dialog({
- content: 'url:publicpageController.do?customerSelect&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"){
- $("#customerid").val(strData[0][key]);
- }else if(key=="strPartnerName"){
- $("#customername").val(strData[0][key]);
- }
- }
- }
- }, focus: true},
- {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
-
- ]}).zindex();
- }
- function callbackCleanCustomer(){
- $('#customername').val('');
- $('#customerid').val('');
- }
- </script>
|