| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356 |
- <%@ 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_contract_list" class="easyui-layout" fit="true">
- <div region="center" style="padding:0px;border:0px">
- <t:datagrid name="contractSaleList" checkbox="false" pageSize="100" sortName="createDate" sortOrder="desc" fitColumns="true" title="销售合同" actionUrl="contractSaleController.do?datagrid&containAdd=1" idField="id" fit="true" queryMode="group">
- <t:dgCol title="主键" field="id" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="创建人名称" field="createName" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="创建人登录名称" field="createBy" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="创建日期" field="createDate" formatter="yyyy-MM-dd" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="更新人名称" field="updateName" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="更新人登录名称" field="updateBy" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="更新日期" field="updateDate" formatter="yyyy-MM-dd" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="所属部门" field="sysOrgCode" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="所属公司" field="sysCompanyCode" 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="type" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="签订日期" field="signdate" formatter="yyyy-MM-dd" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="招标提醒日期" field="nextbiddingdate" formatter="yyyy-MM-dd" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="开始日期" field="startdate" formatter="yyyy-MM-dd" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="截止日期" field="enddate" formatter="yyyy-MM-dd" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="合同金额" field="totalamount" formatterjs="formatterNum" align="right" queryMode="single" width="80"></t:dgCol>
- <t:dgCol title="补充协议金额" field="totaladd" formatterjs="formatterNum" align="right" queryMode="single" width="80"></t:dgCol>
- <t:dgCol title="总金额" field="totaladdandamount" formatterjs="formatterNum" align="right" queryMode="single" width="100"></t:dgCol>
- <t:dgCol title="累计开票金额" field="totalinvoice" hidden="true" formatterjs="formatterNum" align="right" queryMode="single" width="80"></t:dgCol>
- <t:dgCol title="累计收款金额" field="totalincome" hidden="true" formatterjs="formatterNum" align="right" queryMode="single" width="80"></t:dgCol>
- <t:dgCol title="服务内容" field="servicecontent" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="审批日期" field="auditdate" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="合同状态" field="busstatus" dictionary="contractstatus" queryMode="single" width="80"></t:dgCol>
- <t:dgCol title="流程状态" field="bpmStatus" queryMode="single" dictionary="bpm_status" width="80"></t:dgCol>
- <t:dgCol title="客户" field="customerid" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="客户名" field="customername" 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" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="付款模式" field="paytype" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="合同描述" field="description" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="流程实例" field="procInstId" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="流程当前阶段" field="stepName" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="补充协议简述" field="supplemental" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="原合同" field="contractid" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="操作" field="opt"></t:dgCol>
- <t:dgDelOpt exp="bpmStatus#eq#1" title="删除" url="contractSaleController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>
- <t:dgFunOpt exp="bpmStatus#eq#3" funname="qryInvoice(id)" title="查看发票" urlclass="ace_button" urlfont="fa-indent"></t:dgFunOpt>
- <t:dgFunOpt exp="bpmStatus#eq#3" funname="qryPayment(id)" title="查看收款" urlclass="ace_button" urlfont="fa-jpy"></t:dgFunOpt>
- <t:dgFunOpt exp="bpmStatus#ne#1" urlclass="ace_button" urlfont="fa-history" funname="startus(id,procInstId)" title="查看流程" />
- <t:dgFunOpt operationCode="startProcess" exp="bpmStatus#eq#1" urlclass="ace_button" urlfont="fa-cloud-upload" funname="startUserDefinedProcess(id,bpmStatus,handlerPersonId)" title="提交流程" />
- <t:dgFunOpt operationCode="rollbackProcess" exp="bpmStatus#eq#2" urlclass="ace_button" urlStyle="background-color:#FF6347" urlfont="fa-exchange"
- funname="startusr(id,procInstId,bpmStatus,processObject,handlerPersonId)" title="撤回流程" />
- <t:dgFunOpt exp="bpmStatus#eq#3&&busstatus#ne#1" funname="renew(id,name)" title="续签" urlclass="ace_button" urlfont="fa-file-text"></t:dgFunOpt>
-
- <t:dgToolBar title="录入" icon="icon-add" operationCode="add" url="contractSaleController.do?goAdd" funname="add" width="100%" height="100%"></t:dgToolBar>
- <t:dgToolBar title="修改" icon="icon-edit" operationCode="edit" url="contractSaleController.do?goUpdate" funname="update" width="100%" height="100%"></t:dgToolBar>
- <%-- <t:dgToolBar title="批量删除" icon="icon-remove" operationCode="remove" url="contractSaleController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar> --%>
- <t:dgToolBar title="查看" icon="icon-search" url="contractSaleController.do?goUpdate" funname="detail" width="100%" height="100%"></t:dgToolBar>
- <t:dgToolBar title="物业服务需求" icon="icon-detail" funname="yunying" width="100%" height="100%"></t:dgToolBar>
- <t:dgToolBar title="商务报价" icon="icon-detail" funname="shangwu" width="100%" height="100%"></t:dgToolBar>
- <t:dgToolBar title="合同附件" icon="icon-detail" funname="fileList" width="100%" height="100%"></t:dgToolBar>
- <t:dgToolBar title="录入补充协议" icon="icon-add" operationCode="add" url="contractSaleController.do?goModifyAdd&contractid=" funname="addModify" width="100%" height="100%"></t:dgToolBar>
- <t:dgToolBar title="补充协议清单" icon="icon-edit" operationCode="edit" funname="modifyList" width="100%" height="100%"></t:dgToolBar>
- <t:dgToolBar title="导出" icon="icon-put" operationCode="put" funname="ExportXls"></t:dgToolBar>
- <%-- <t:dgToolBar title="导入" icon="icon-putout" operationCode="put" funname="ImportXls"></t:dgToolBar>
- <t:dgToolBar title="模板下载" icon="icon-putout" operationCode="putout" funname="ExportXlsByT"></t:dgToolBar> --%>
- </t:datagrid>
- </div>
- </div>
- <div data-options="region:'east',
- title:'开票明细',
- collapsed:true,
- split:true,
- border:false,
- onExpand : function(){
- li_east = 1;
- },
- onCollapse : function() {
- li_east = 0;
- }"
- style="width: 600px; overflow: hidden;" id="eastPanel">
- <div class="easyui-panel" style="padding:0px;border:0px" fit="true" border="false" id="userListpanel"></div>
- </div>
- <script src = "webpage/cn/com/lzt/contractsale/contractSaleList.js"></script>
- <script type="text/javascript" src="plug-in/tools/money.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" colspan="3">
- <input readonly="true" type="text" id="projectname" name=""projectname"" style="width: 157px" placeholder="请选择项目名称" onclick="openProjectSelect()">
- <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" colspan="3">
- <input readonly="true" type="text" id="customername" name="customername" style="width: 157px" placeholder="请选择客户" onclick="openCustomerSelect()">
- <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>
- <td align="right" style="width: 74px;">
- <label class="Validform_label">
- 截止月份:
- </label>
- </td>
- <td class="value">
- <input id="endDateMonth" name="endDateMonth" type="text" readonly="readonly" style="width: 150px" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM'})"/>
- </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 align="right" style="width: 74px;">
- <label class="Validform_label">
- 所属区域:
- </label>
- </td>
- <td class="value">
- <t:dictSelect field="zone" type="list" dictTable="t_b_zone" dictField="id" dictText="name" hasLabel="false" title="所属区域" ></t:dictSelect>
- </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 ImportXls() {
- openuploadwin('Excel导入', 'contractSaleController.do?upload', "contractSaleList");
- }
- //导出
- function ExportXls() {
- JeecgExcelExport("contractSaleController.do?exportXls","contractSaleList");
- }
- //模板下载
- function ExportXlsByT() {
- JeecgExcelExport("contractSaleController.do?exportXlsByT","contractSaleList");
- }
- function qryInvoice(id){
- var title = '开票明细';
- if(li_east == 0 || $('#main_contract_list').layout('panel','east').panel('options').title != title){
- $('#main_contract_list').layout('expand','east');
- }
- <%--$('#eastPanel').panel('setTitle','<t:mutiLang langKey="member.list"/>');--%>
- $('#main_contract_list').layout('panel','east').panel('setTitle', title);
- $('#main_contract_list').layout('panel','east').panel('resize', {width: 600});
- $('#userListpanel').panel("refresh", "contractSaleInvoiceController.do?listByContractid&contractid=" + id);
- }
- function qryPayment(id){
- var title = '收款明细';
- if(li_east == 0 || $('#main_contract_list').layout('panel','east').panel('options').title != title){
- $('#main_contract_list').layout('expand','east');
- }
- <%--$('#eastPanel').panel('setTitle','<t:mutiLang langKey="member.list"/>');--%>
- $('#main_contract_list').layout('panel','east').panel('setTitle', title);
- $('#main_contract_list').layout('panel','east').panel('resize', {width: 600});
- $('#userListpanel').panel("refresh", "contractSaleIncomeController.do?listByContractid&contractid=" + id);
- }
- //修改
- function update(title,url, id){
- gridname=id;
- var rowsData = $('#'+id).datagrid('getSelections');
- url +="&id="+rowsData[0].id;
- if(rowsData[0].bpmStatus != null && rowsData[0].bpmStatus =='1'){
- createwindow("合同修改",url, "100%","100%");
- }else{
- $.messager.alert('提示信息',"审批中的合同不能进行修改,请联系相关审批人驳回后再修改");
- return;
- }
- }
- function startus(id,usid){
- processtracking(id,usid);
- }
- //启动流程
- function startUserDefinedProcess(id,bpmStatus,applicantId,tableName,formUrl){
- if(bpmStatus == 2){
- layer.alert('<t:mutiLang langKey="申请处理中不可再次提交流程"/>');
- return;
- }else if(bpmStatus == 3){
- layer.alert('<t:mutiLang langKey="申请已完成不可再次提交流程"/>');
- return;
- }
- /* if(applicantId != $("#user").val()){
- layer.alert('您无权限操作该数据!');
- return;
- } */
- //业务表名
- var tableName = 't_b_contract_sale';
- //流程对应表单 URL
- var formUrl = 'contractSaleController.do?goView&load=detail';
- confirm('activitiController.do?startUserDefinedProcess&id='+id+'&tableName='+tableName+'&formUrl='+formUrl,'确定提交流程吗?','contractSaleList');
- }
- function fileList(){
- var rowsData = $('#contractSaleList').datagrid('getSelections');
- if (!rowsData || rowsData.length==0) {
- tip('请先选择一个合同');
- return;
- }
- var id = rowsData[0].id;
- $.dialog({
- content: 'url:publicpageController.do?tSysFileList&busiId='+id+'&busiTable=t_b_contract_sale&extensions=pdf&bizType=contractsale', zIndex: getzIndex(), title: '附件列表', lock: true, width: '800px', height: '600px', opacity: 0.4, button: [
- {name: '<t:mutiLang langKey="common.close"/>', callback: function (){}}
-
- ]}).zindex();
- }
- function yunying(){
- var rowsData = $('#contractSaleList').datagrid('getSelections');
- if (!rowsData || rowsData.length==0) {
- tip('请先选择一个合同');
- return;
- }
- var id = rowsData[0].id;
- $.dialog({
- content: 'url:publicpageController.do?tSysFileList&busiId='+id+'&busiTable=t_b_contract_sale&extensions=pdf&bizType=contractsaleyunying&encryptpdf=1', zIndex: getzIndex(), title: '物业服务需求列表', lock: true, width: '800px', height: '600px', opacity: 0.4, button: [
- {name: '<t:mutiLang langKey="common.close"/>', callback: function (){}}
-
- ]}).zindex();
- }
- function shangwu(){
- var rowsData = $('#contractSaleList').datagrid('getSelections');
- if (!rowsData || rowsData.length==0) {
- tip('请先选择一个合同');
- return;
- }
- var id = rowsData[0].id;
- $.dialog({
- content: 'url:publicpageController.do?tSysFileList&busiId='+id+'&busiTable=t_b_contract_sale&extensions=pdf&bizType=contractsaleshangwu&encryptpdf=1', zIndex: getzIndex(), title: '商务标附件列表', lock: true, width: '800px', height: '600px', opacity: 0.4, button: [
- {name: '<t:mutiLang langKey="common.close"/>', callback: function (){}}
-
- ]}).zindex();
- }
- function startusr(id,usid,processObject,iamApplyUser,applicantId){
- /* if(applicantId != $("#user").val()){
- layer.alert('您无权限操作该数据!');
- return;
- } */
- /* if(bpmStatus != 2){
- layer.alert('<t:mutiLang langKey="只有状态为<处理中>时才可进行<流程撤回>操作"/>');
- return;
- } */
- //业务表名
- retractProcess(id,"t_b_contract_sale",usid,"contractSaleList");
- }
- function modifyList(){
- var rowsData = $('#contractSaleList').datagrid('getSelections');
- if (!rowsData || rowsData.length==0) {
- tip('请先选择一个合同');
- return;
- }
- var id = rowsData[0].id;
- $.dialog({
- content: 'url:contractSaleController.do?listmodify&contractid='+id, zIndex: getzIndex(), title: '补充协议清单', lock: true, width: window.top.document.body.offsetWidth, height: window.top.document.body.offsetHeight-100, opacity: 0.4, button: [
- {name: '<t:mutiLang langKey="common.close"/>', callback: function (){}}
-
- ]}).zindex();
- }
- function addModify(){
- var rowsData = $('#contractSaleList').datagrid('getSelections');
- if (!rowsData || rowsData.length==0) {
- tip('请先选择一个合同');
- return;
- }
- var id = rowsData[0].id;
- gridname='contractSaleList';
- createwindow("录入", "contractSaleController.do?goModifyAdd&contractid="+id,"100%","100%");
- }
- function renew(id,oralContractName){
- var url ="contractSaleController.do?goRenew&id="+id;
- createwindow("合同续签-原合同:"+oralContractName,url, "100%","100%");
- }
- function formatterNum(x) {
- var f = parseFloat(x);
- if (isNaN(f)) {
- return '';
- }
- var f = Math.round(x * 100) / 100;
- var s = f.toString();
- var rs = s.indexOf('.');
- if (rs < 0) {
- rs = s.length;
- s += '.';
- }
- while (s.length <= rs + 2) {
- s += '0';
- }
- return s;
- }
- </script>
|