contractSaleList.jsp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  4. <div id="main_contract_list" class="easyui-layout" fit="true">
  5. <div region="center" style="padding:0px;border:0px">
  6. <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">
  7. <t:dgCol title="主键" field="id" hidden="true" queryMode="single" width="120"></t:dgCol>
  8. <t:dgCol title="创建人名称" field="createName" hidden="true" queryMode="single" width="120"></t:dgCol>
  9. <t:dgCol title="创建人登录名称" field="createBy" hidden="true" queryMode="single" width="120"></t:dgCol>
  10. <t:dgCol title="创建日期" field="createDate" formatter="yyyy-MM-dd" hidden="true" queryMode="single" width="120"></t:dgCol>
  11. <t:dgCol title="更新人名称" field="updateName" hidden="true" queryMode="single" width="120"></t:dgCol>
  12. <t:dgCol title="更新人登录名称" field="updateBy" hidden="true" queryMode="single" width="120"></t:dgCol>
  13. <t:dgCol title="更新日期" field="updateDate" formatter="yyyy-MM-dd" hidden="true" queryMode="single" width="120"></t:dgCol>
  14. <t:dgCol title="所属部门" field="sysOrgCode" hidden="true" queryMode="single" width="120"></t:dgCol>
  15. <t:dgCol title="所属公司" field="sysCompanyCode" hidden="true" queryMode="single" width="120"></t:dgCol>
  16. <t:dgCol title="合同号" field="code" queryMode="single" width="120"></t:dgCol>
  17. <t:dgCol title="合同名" field="name" queryMode="single" width="200"></t:dgCol>
  18. <t:dgCol title="类型" field="type" hidden="true" queryMode="single" width="120"></t:dgCol>
  19. <t:dgCol title="签订日期" field="signdate" formatter="yyyy-MM-dd" hidden="true" queryMode="single" width="120"></t:dgCol>
  20. <t:dgCol title="招标提醒日期" field="nextbiddingdate" formatter="yyyy-MM-dd" hidden="true" queryMode="single" width="120"></t:dgCol>
  21. <t:dgCol title="开始日期" field="startdate" formatter="yyyy-MM-dd" queryMode="single" width="120"></t:dgCol>
  22. <t:dgCol title="截止日期" field="enddate" formatter="yyyy-MM-dd" queryMode="single" width="120"></t:dgCol>
  23. <t:dgCol title="合同金额" field="totalamount" formatterjs="formatterNum" align="right" queryMode="single" width="80"></t:dgCol>
  24. <t:dgCol title="补充协议金额" field="totaladd" formatterjs="formatterNum" align="right" queryMode="single" width="80"></t:dgCol>
  25. <t:dgCol title="总金额" field="totaladdandamount" formatterjs="formatterNum" align="right" queryMode="single" width="100"></t:dgCol>
  26. <t:dgCol title="累计开票金额" field="totalinvoice" hidden="true" formatterjs="formatterNum" align="right" queryMode="single" width="80"></t:dgCol>
  27. <t:dgCol title="累计收款金额" field="totalincome" hidden="true" formatterjs="formatterNum" align="right" queryMode="single" width="80"></t:dgCol>
  28. <t:dgCol title="服务内容" field="servicecontent" hidden="true" queryMode="single" width="120"></t:dgCol>
  29. <t:dgCol title="审批日期" field="auditdate" hidden="true" queryMode="single" width="120"></t:dgCol>
  30. <t:dgCol title="合同状态" field="busstatus" dictionary="contractstatus" queryMode="single" width="80"></t:dgCol>
  31. <t:dgCol title="流程状态" field="bpmStatus" queryMode="single" dictionary="bpm_status" width="80"></t:dgCol>
  32. <t:dgCol title="客户" field="customerid" hidden="true" queryMode="single" width="120"></t:dgCol>
  33. <t:dgCol title="客户名" field="customername" hidden="true" queryMode="single" width="120"></t:dgCol>
  34. <t:dgCol title="项目" field="projectid" hidden="true" queryMode="single" width="120"></t:dgCol>
  35. <t:dgCol title="项目名" field="projectname" hidden="true" queryMode="single" width="120"></t:dgCol>
  36. <t:dgCol title="付款模式" field="paytype" hidden="true" queryMode="single" width="120"></t:dgCol>
  37. <t:dgCol title="合同描述" field="description" hidden="true" queryMode="single" width="120"></t:dgCol>
  38. <t:dgCol title="流程实例" field="procInstId" hidden="true" queryMode="single" width="120"></t:dgCol>
  39. <t:dgCol title="流程当前阶段" field="stepName" hidden="true" queryMode="single" width="120"></t:dgCol>
  40. <t:dgCol title="补充协议简述" field="supplemental" hidden="true" queryMode="single" width="120"></t:dgCol>
  41. <t:dgCol title="原合同" field="contractid" hidden="true" queryMode="single" width="120"></t:dgCol>
  42. <t:dgCol title="操作" field="opt"></t:dgCol>
  43. <t:dgDelOpt exp="bpmStatus#eq#1" title="删除" url="contractSaleController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>
  44. <t:dgFunOpt exp="bpmStatus#eq#3" funname="qryInvoice(id)" title="查看发票" urlclass="ace_button" urlfont="fa-indent"></t:dgFunOpt>
  45. <t:dgFunOpt exp="bpmStatus#eq#3" funname="qryPayment(id)" title="查看收款" urlclass="ace_button" urlfont="fa-jpy"></t:dgFunOpt>
  46. <t:dgFunOpt exp="bpmStatus#ne#1" urlclass="ace_button" urlfont="fa-history" funname="startus(id,procInstId)" title="查看流程" />
  47. <t:dgFunOpt operationCode="startProcess" exp="bpmStatus#eq#1" urlclass="ace_button" urlfont="fa-cloud-upload" funname="startUserDefinedProcess(id,bpmStatus,handlerPersonId)" title="提交流程" />
  48. <t:dgFunOpt operationCode="rollbackProcess" exp="bpmStatus#eq#2" urlclass="ace_button" urlStyle="background-color:#FF6347" urlfont="fa-exchange"
  49. funname="startusr(id,procInstId,bpmStatus,processObject,handlerPersonId)" title="撤回流程" />
  50. <t:dgFunOpt exp="bpmStatus#eq#3&&busstatus#ne#1" funname="renew(id,name)" title="续签" urlclass="ace_button" urlfont="fa-file-text"></t:dgFunOpt>
  51. <t:dgToolBar title="录入" icon="icon-add" operationCode="add" url="contractSaleController.do?goAdd" funname="add" width="100%" height="100%"></t:dgToolBar>
  52. <t:dgToolBar title="修改" icon="icon-edit" operationCode="edit" url="contractSaleController.do?goUpdate" funname="update" width="100%" height="100%"></t:dgToolBar>
  53. <%-- <t:dgToolBar title="批量删除" icon="icon-remove" operationCode="remove" url="contractSaleController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar> --%>
  54. <t:dgToolBar title="查看" icon="icon-search" url="contractSaleController.do?goUpdate" funname="detail" width="100%" height="100%"></t:dgToolBar>
  55. <t:dgToolBar title="物业服务需求" icon="icon-detail" funname="yunying" width="100%" height="100%"></t:dgToolBar>
  56. <t:dgToolBar title="商务报价" icon="icon-detail" funname="shangwu" width="100%" height="100%"></t:dgToolBar>
  57. <t:dgToolBar title="合同附件" icon="icon-detail" funname="fileList" width="100%" height="100%"></t:dgToolBar>
  58. <t:dgToolBar title="录入补充协议" icon="icon-add" operationCode="add" url="contractSaleController.do?goModifyAdd&contractid=" funname="addModify" width="100%" height="100%"></t:dgToolBar>
  59. <t:dgToolBar title="补充协议清单" icon="icon-edit" operationCode="edit" funname="modifyList" width="100%" height="100%"></t:dgToolBar>
  60. <t:dgToolBar title="导出" icon="icon-put" operationCode="put" funname="ExportXls"></t:dgToolBar>
  61. <%-- <t:dgToolBar title="导入" icon="icon-putout" operationCode="put" funname="ImportXls"></t:dgToolBar>
  62. <t:dgToolBar title="模板下载" icon="icon-putout" operationCode="putout" funname="ExportXlsByT"></t:dgToolBar> --%>
  63. </t:datagrid>
  64. </div>
  65. </div>
  66. <div data-options="region:'east',
  67. title:'开票明细',
  68. collapsed:true,
  69. split:true,
  70. border:false,
  71. onExpand : function(){
  72. li_east = 1;
  73. },
  74. onCollapse : function() {
  75. li_east = 0;
  76. }"
  77. style="width: 600px; overflow: hidden;" id="eastPanel">
  78. <div class="easyui-panel" style="padding:0px;border:0px" fit="true" border="false" id="userListpanel"></div>
  79. </div>
  80. <script src = "webpage/cn/com/lzt/contractsale/contractSaleList.js"></script>
  81. <script type="text/javascript" src="plug-in/tools/money.js"></script>
  82. <script>
  83. $(function() {
  84. var datagrid = $("#contractSaleListtb");
  85. datagrid.prepend($("#pinjie1 div[name='pinjie2']").html());
  86. $("#pinjie1").html('');
  87. datagrid.children(".datagrid-toolbar").children("span:first").after($("#pinjiechaxun1 div[name='pinjiechaxun2']").html());
  88. $("#pinjiechaxun1").html('');
  89. });
  90. </script>
  91. <div id="pinjie1">
  92. <div name="pinjie2" style="padding:3px; height: auto" class="datagrid-toolbar">
  93. <div name="searchColums" style="margin:23px 0 18px 0;margin-top: 15px;margin-bottom: 8px;">
  94. <%-- <input type="hidden" id="orgCode" name="orgCode" value="${orgCode}"> --%>
  95. <table style="padding:0px" cellpadding="0" cellspacing="1" >
  96. <tbody>
  97. <tr>
  98. <td align="right" style="width: 74px;">
  99. <label class="Validform_label">
  100. 项目:
  101. </label>
  102. </td>
  103. <td class="value" colspan="3">
  104. <input readonly="true" type="text" id="projectname" name=""projectname"" style="width: 157px" placeholder="请选择项目名称" onclick="openProjectSelect()">
  105. <input id="projectid" name="projectid" type="hidden" value="">
  106. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openProjectSelect()">选择</a>
  107. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="departRedo" onclick="callbackCleanProject()">清空</a>
  108. </td>
  109. <td align="right" style="width: 74px;">
  110. <label class="Validform_label">
  111. 客户:
  112. </label>
  113. </td>
  114. <td class="value" colspan="3">
  115. <input readonly="true" type="text" id="customername" name="customername" style="width: 157px" placeholder="请选择客户" onclick="openCustomerSelect()">
  116. <input id="customerid" name="customerid" type="hidden" value="">
  117. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="customerSearch" onclick="openCustomerSelect()">选择</a>
  118. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="customerRedo" onclick="callbackCleanCustomer()">清空</a>
  119. </td>
  120. <td align="right" style="width: 74px;">
  121. <label class="Validform_label">
  122. 截止月份:
  123. </label>
  124. </td>
  125. <td class="value">
  126. <input id="endDateMonth" name="endDateMonth" type="text" readonly="readonly" style="width: 150px" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM'})"/>
  127. </td>
  128. </tr>
  129. <tr height="50px">
  130. <td align="right" style="width: 74px;">
  131. <label class="Validform_label">
  132. 合同号:
  133. </label>
  134. </td>
  135. <td class="value">
  136. <input id="code" name="code" type="text" style="width: 157px; " class="inputxt" placeholder="合同编码">
  137. </td>
  138. <td align="right" style="width: 74px;">
  139. <label class="Validform_label">
  140. 合同名称:
  141. </label>
  142. </td>
  143. <td class="value">
  144. <input id="name" name="name" type="text" style="width: 157px; " class="inputxt" placeholder="合同名称">
  145. </td>
  146. <td align="right" style="width: 74px;">
  147. <label class="Validform_label">
  148. 合同描述:
  149. </label>
  150. </td>
  151. <td class="value">
  152. <input id="description" name="description" type="text" style="width: 157px; " class="inputxt" placeholder="合同描述">
  153. </td>
  154. <td align="right" style="width: 74px;">
  155. <label class="Validform_label">
  156. 所属区域:
  157. </label>
  158. </td>
  159. <td class="value">
  160. <t:dictSelect field="zone" type="list" dictTable="t_b_zone" dictField="id" dictText="name" hasLabel="false" title="所属区域" ></t:dictSelect>
  161. </td>
  162. </tr>
  163. </tbody>
  164. </table>
  165. </div>
  166. </div>
  167. </div>
  168. <div id="pinjiechaxun1">
  169. <div name="pinjiechaxun2" style="padding:3px; height: auto" class="datagrid-toolbar">
  170. <span style="float:right;margin-bottom:4px;">
  171. <span>
  172. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-search" id="contractSaleListSearch" onclick="contractSaleListsearch()">查询</a>
  173. </span>
  174. <span>
  175. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-reload " id="contractSaleListRedo" onclick="searchReset('contractSaleList')">重置</a>
  176. </span>
  177. </div>
  178. </div>
  179. </div>
  180. </div>
  181. <script type="text/javascript">
  182. //导入
  183. function ImportXls() {
  184. openuploadwin('Excel导入', 'contractSaleController.do?upload', "contractSaleList");
  185. }
  186. //导出
  187. function ExportXls() {
  188. JeecgExcelExport("contractSaleController.do?exportXls","contractSaleList");
  189. }
  190. //模板下载
  191. function ExportXlsByT() {
  192. JeecgExcelExport("contractSaleController.do?exportXlsByT","contractSaleList");
  193. }
  194. function qryInvoice(id){
  195. var title = '开票明细';
  196. if(li_east == 0 || $('#main_contract_list').layout('panel','east').panel('options').title != title){
  197. $('#main_contract_list').layout('expand','east');
  198. }
  199. <%--$('#eastPanel').panel('setTitle','<t:mutiLang langKey="member.list"/>');--%>
  200. $('#main_contract_list').layout('panel','east').panel('setTitle', title);
  201. $('#main_contract_list').layout('panel','east').panel('resize', {width: 600});
  202. $('#userListpanel').panel("refresh", "contractSaleInvoiceController.do?listByContractid&contractid=" + id);
  203. }
  204. function qryPayment(id){
  205. var title = '收款明细';
  206. if(li_east == 0 || $('#main_contract_list').layout('panel','east').panel('options').title != title){
  207. $('#main_contract_list').layout('expand','east');
  208. }
  209. <%--$('#eastPanel').panel('setTitle','<t:mutiLang langKey="member.list"/>');--%>
  210. $('#main_contract_list').layout('panel','east').panel('setTitle', title);
  211. $('#main_contract_list').layout('panel','east').panel('resize', {width: 600});
  212. $('#userListpanel').panel("refresh", "contractSaleIncomeController.do?listByContractid&contractid=" + id);
  213. }
  214. //修改
  215. function update(title,url, id){
  216. gridname=id;
  217. var rowsData = $('#'+id).datagrid('getSelections');
  218. url +="&id="+rowsData[0].id;
  219. if(rowsData[0].bpmStatus != null && rowsData[0].bpmStatus =='1'){
  220. createwindow("合同修改",url, "100%","100%");
  221. }else{
  222. $.messager.alert('提示信息',"审批中的合同不能进行修改,请联系相关审批人驳回后再修改");
  223. return;
  224. }
  225. }
  226. function startus(id,usid){
  227. processtracking(id,usid);
  228. }
  229. //启动流程
  230. function startUserDefinedProcess(id,bpmStatus,applicantId,tableName,formUrl){
  231. if(bpmStatus == 2){
  232. layer.alert('<t:mutiLang langKey="申请处理中不可再次提交流程"/>');
  233. return;
  234. }else if(bpmStatus == 3){
  235. layer.alert('<t:mutiLang langKey="申请已完成不可再次提交流程"/>');
  236. return;
  237. }
  238. /* if(applicantId != $("#user").val()){
  239. layer.alert('您无权限操作该数据!');
  240. return;
  241. } */
  242. //业务表名
  243. var tableName = 't_b_contract_sale';
  244. //流程对应表单 URL
  245. var formUrl = 'contractSaleController.do?goView&load=detail';
  246. confirm('activitiController.do?startUserDefinedProcess&id='+id+'&tableName='+tableName+'&formUrl='+formUrl,'确定提交流程吗?','contractSaleList');
  247. }
  248. function fileList(){
  249. var rowsData = $('#contractSaleList').datagrid('getSelections');
  250. if (!rowsData || rowsData.length==0) {
  251. tip('请先选择一个合同');
  252. return;
  253. }
  254. var id = rowsData[0].id;
  255. $.dialog({
  256. 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: [
  257. {name: '<t:mutiLang langKey="common.close"/>', callback: function (){}}
  258. ]}).zindex();
  259. }
  260. function yunying(){
  261. var rowsData = $('#contractSaleList').datagrid('getSelections');
  262. if (!rowsData || rowsData.length==0) {
  263. tip('请先选择一个合同');
  264. return;
  265. }
  266. var id = rowsData[0].id;
  267. $.dialog({
  268. 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: [
  269. {name: '<t:mutiLang langKey="common.close"/>', callback: function (){}}
  270. ]}).zindex();
  271. }
  272. function shangwu(){
  273. var rowsData = $('#contractSaleList').datagrid('getSelections');
  274. if (!rowsData || rowsData.length==0) {
  275. tip('请先选择一个合同');
  276. return;
  277. }
  278. var id = rowsData[0].id;
  279. $.dialog({
  280. 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: [
  281. {name: '<t:mutiLang langKey="common.close"/>', callback: function (){}}
  282. ]}).zindex();
  283. }
  284. function startusr(id,usid,processObject,iamApplyUser,applicantId){
  285. /* if(applicantId != $("#user").val()){
  286. layer.alert('您无权限操作该数据!');
  287. return;
  288. } */
  289. /* if(bpmStatus != 2){
  290. layer.alert('<t:mutiLang langKey="只有状态为<处理中>时才可进行<流程撤回>操作"/>');
  291. return;
  292. } */
  293. //业务表名
  294. retractProcess(id,"t_b_contract_sale",usid,"contractSaleList");
  295. }
  296. function modifyList(){
  297. var rowsData = $('#contractSaleList').datagrid('getSelections');
  298. if (!rowsData || rowsData.length==0) {
  299. tip('请先选择一个合同');
  300. return;
  301. }
  302. var id = rowsData[0].id;
  303. $.dialog({
  304. 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: [
  305. {name: '<t:mutiLang langKey="common.close"/>', callback: function (){}}
  306. ]}).zindex();
  307. }
  308. function addModify(){
  309. var rowsData = $('#contractSaleList').datagrid('getSelections');
  310. if (!rowsData || rowsData.length==0) {
  311. tip('请先选择一个合同');
  312. return;
  313. }
  314. var id = rowsData[0].id;
  315. gridname='contractSaleList';
  316. createwindow("录入", "contractSaleController.do?goModifyAdd&contractid="+id,"100%","100%");
  317. }
  318. function renew(id,oralContractName){
  319. var url ="contractSaleController.do?goRenew&id="+id;
  320. createwindow("合同续签-原合同:"+oralContractName,url, "100%","100%");
  321. }
  322. function formatterNum(x) {
  323. var f = parseFloat(x);
  324. if (isNaN(f)) {
  325. return '';
  326. }
  327. var f = Math.round(x * 100) / 100;
  328. var s = f.toString();
  329. var rs = s.indexOf('.');
  330. if (rs < 0) {
  331. rs = s.length;
  332. s += '.';
  333. }
  334. while (s.length <= rs + 2) {
  335. s += '0';
  336. }
  337. return s;
  338. }
  339. </script>