contractPaymentApplyList.jsp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  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 class="easyui-layout" fit="true">
  5. <div region="center" style="padding:0px;border:0px">
  6. <t:datagrid name="contractPaymentList" fitColumns="true" pageSize="20" sortName="createDate" sortOrder="desc" title="合同支付申请" actionUrl="contractPaymentController.do?datagrid4Apply" 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="code" queryMode="single" width="120"></t:dgCol>
  9. <t:dgCol title="申请人名称" field="createName" hidden="true" queryMode="single" width="120"></t:dgCol>
  10. <t:dgCol title="申请人" field="createBy" hidden="true" queryMode="single" width="120"></t:dgCol>
  11. <t:dgCol title="创建日期" field="createDate" formatter="yyyy-MM-dd" hidden="true" queryMode="single" width="120"></t:dgCol>
  12. <t:dgCol title="更新人名称" field="updateName" hidden="true" queryMode="single" width="120"></t:dgCol>
  13. <t:dgCol title="更新人登录名称" field="updateBy" hidden="true" queryMode="single" width="120"></t:dgCol>
  14. <t:dgCol title="更新日期" field="updateDate" formatter="yyyy-MM-dd" hidden="true" queryMode="single" width="120"></t:dgCol>
  15. <t:dgCol title="流程状态" field="bpmStatus" hidden="true" queryMode="single" dictionary="bpm_status" width="120"></t:dgCol>
  16. <t:dgCol title="服务外包合同" field="contractid" hidden="true" queryMode="single" dictionary="t_b_contract,id,name" width="120"></t:dgCol>
  17. <t:dgCol title="物料采购合同" field="contractid" hidden="true" queryMode="single" dictionary="t_b_contract_p,id,name" width="120"></t:dgCol>
  18. <t:dgCol title="申请支付金额" field="applypayamount" align="right" formatterjs="formatterNum" queryMode="single" style="color:red;" width="120"></t:dgCol>
  19. <t:dgCol title="合同金额" field="totalamount" align="right" formatterjs="formatterNum" queryMode="single" style="color:red;" width="120"></t:dgCol>
  20. <t:dgCol title="发票编号" field="invoiceno" hidden="true" queryMode="single" width="120"></t:dgCol>
  21. <t:dgCol title="本次开票金额" field="invoiceamount" formatterjs="formatterNum" hidden="true" queryMode="single" width="120"></t:dgCol>
  22. <t:dgCol title="本次开票日期" field="invoicedate" formatter="yyyy-MM-dd" hidden="true" queryMode="single" width="120"></t:dgCol>
  23. <t:dgCol title="支付方式" field="paytype" hidden="true" queryMode="single" width="120"></t:dgCol>
  24. <t:dgCol title="审批日期" field="auditdate" hidden="true" align="center" formatter="yyyy-MM-dd" queryMode="single" width="120"></t:dgCol>
  25. <t:dgCol title="供应商" field="partnerid" queryMode="single" dictionary="t_b_related_units,id,unit_name" width="120"></t:dgCol>
  26. <t:dgCol title="项目" field="projectid" queryMode="single" dictionary="t_b_project,id,name" width="120"></t:dgCol>
  27. <t:dgCol title="申请人" field="applyerid" hidden="true" queryMode="single" width="120"></t:dgCol>
  28. <t:dgCol title="备注" field="remark" hidden="true" queryMode="single" width="120"></t:dgCol>
  29. <t:dgCol title="支付状态" field="paystatus" dictionary="paytype" hidden="true" queryMode="single" width="120"></t:dgCol>
  30. <t:dgCol title="支付操作员" field="payOperator" hidden="true" queryMode="single" width="120"></t:dgCol>
  31. <t:dgCol title="支付金额" field="paymentamount" formatterjs="formatterNum" queryMode="single" hidden="true" width="120"></t:dgCol>
  32. <t:dgCol title="支付日期" field="paydate" formatter="yyyy-MM-dd" hidden="true" queryMode="single" width="120"></t:dgCol>
  33. <t:dgCol title="评价人" field="evaluater" hidden="true" queryMode="single" width="120"></t:dgCol>
  34. <t:dgCol title="供应商评价" field="supplierevaluate" hidden="true" queryMode="single" width="120"></t:dgCol>
  35. <t:dgCol title="供应商评分" field="supplierscore" hidden="true" queryMode="single" width="120"></t:dgCol>
  36. <t:dgCol title="流程id" field="procInstId" sortable="false" align="center" queryMode="single" hidden="true" width="60"></t:dgCol>
  37. <t:dgCol title="操作" field="opt"></t:dgCol>
  38. <t:dgDelOpt exp="bpmStatus#eq#1" title="删除" url="contractPaymentController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>
  39. <t:dgFunOpt exp="bpmStatus#ne#1" urlclass="ace_button" urlfont="fa-history" funname="startus(id,procInstId)" title="查看流程" />
  40. <t:dgFunOpt operationCode="startProcess" exp="bpmStatus#eq#1" urlclass="ace_button" urlfont="fa-cloud-upload" funname="startUserDefinedProcess(id,bpmStatus,handlerPersonId)" title="提交流程" />
  41. <t:dgFunOpt operationCode="rollbackProcess" exp="bpmStatus#eq#2" urlclass="ace_button" urlStyle="background-color:#FF6347" urlfont="fa-exchange"
  42. funname="startusr(id,procInstId,bpmStatus,processObject,handlerPersonId)" title="撤回流程" />
  43. <t:dgToolBar title="选取外包服务合同" icon="icon-search" url="contractController.do?selectlist" funname="selectContract" width="100%" height="100%"></t:dgToolBar>
  44. <t:dgToolBar title="修改" icon="icon-edit" operationCode="edit" url="contractPaymentController.do?goUpdate" funname="update" width="100%" height="100%"></t:dgToolBar>
  45. <%-- <t:dgToolBar title="批量删除" icon="icon-remove" operationCode="remove" url="contractPaymentController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar> --%>
  46. <t:dgToolBar title="查看" icon="icon-search" url="contractPaymentController.do?goUpdate" funname="detail" width="100%" height="100%"></t:dgToolBar>
  47. <%-- <t:dgToolBar title="导入" icon="icon-putout" operationCode="put" funname="ImportXls"></t:dgToolBar>
  48. <t:dgToolBar title="选取物料采购合同" icon="icon-search" url="contractPController.do?selectlist" funname="selectContract" width="100%" height="100%" operationCode="pcontratselect"></t:dgToolBar>
  49. <t:dgToolBar title="导出" icon="icon-put" operationCode="put" funname="ExportXls"></t:dgToolBar>
  50. <t:dgToolBar title="模板下载" icon="icon-putout" operationCode="putout" funname="ExportXlsByT"></t:dgToolBar> --%>
  51. </t:datagrid>
  52. </div>
  53. </div>
  54. <script src = "webpage/cn/com/lzt/contractpayment/contractPaymentList.js"></script>
  55. <script type="text/javascript" src="plug-in/tools/money.js"></script>
  56. <script>
  57. $(function() {
  58. var datagrid = $("#contractPaymentListtb");
  59. datagrid.prepend($("#pinjie1 div[name='pinjie2']").html());
  60. $("#pinjie1").html('');
  61. datagrid.children(".datagrid-toolbar").children("span:first").after($("#pinjiechaxun1 div[name='pinjiechaxun2']").html());
  62. $("#pinjiechaxun1").html('');
  63. });
  64. </script>
  65. <div id="pinjie1">
  66. <div name="pinjie2" style="padding:3px; height: auto" class="datagrid-toolbar">
  67. <div name="searchColums" style="margin:23px 0 18px 0;margin-top: 15px;margin-bottom: 8px;">
  68. <table style="padding:0px" cellpadding="0" cellspacing="1" >
  69. <tbody>
  70. <tr>
  71. <td align="right" style="width: 74px;">
  72. <label class="Validform_label">
  73. 项目名称:
  74. </label>
  75. </td>
  76. <td class="value" colspan="3">
  77. <input readonly="true" type="text" id="projectName" name="projectName" style="width: 157px" placeholder="请选择项目名称" onclick="openDepartmentSelect()">
  78. <input id="projectid" name="projectid" type="hidden" value="">
  79. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openDepartmentSelect()">选择</a>
  80. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="departRedo" onclick="callbackClean()">清空</a>
  81. </td>
  82. <td align="right" style="width: 74px;">
  83. <label class="Validform_label">
  84. 供应商:
  85. </label>
  86. </td>
  87. <td class="value" colspan="3">
  88. <input readonly="true" type="text" id="partnerName" name="partnerName" style="width: 157px" placeholder="请选择供应商" onclick="openPartnerSelect()">
  89. <input id="partnerid" name="partnerid" type="hidden" value="">
  90. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="partnerSearch" onclick="openPartnerSelect()">选择</a>
  91. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="partnerRedo" onclick="callbackCleanPartner()">清空</a>
  92. </td>
  93. </tr>
  94. <tr height="50px">
  95. <td align="right" style="width: 74px;">
  96. <label class="Validform_label">
  97. 申请单号:
  98. </label>
  99. </td>
  100. <td class="value">
  101. <input id="code" name="code" type="text" style="width: 157px; " class="inputxt" placeholder="支付申请单号">
  102. </td>
  103. </tr>
  104. </tbody>
  105. </table>
  106. </div>
  107. </div>
  108. </div>
  109. <div id="pinjiechaxun1">
  110. <div name="pinjiechaxun2" style="padding:3px; height: auto" class="datagrid-toolbar">
  111. <span style="float:right;margin-bottom:4px;">
  112. <span>
  113. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-search" id="contractPaymentListSearch" onclick="contractPaymentListsearch()">查询</a>
  114. </span>
  115. <span>
  116. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-reload " id="contractPaymentListRedo" onclick="searchReset('contractPaymentList')">重置</a>
  117. </span>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. <script type="text/javascript">
  123. var needServiceSelect = false;
  124. var contractSelectQueryPid = '';
  125. var contractSelectQueryPname = '';
  126. function startus(id,usid){
  127. processtracking(id,usid);
  128. }
  129. //启动流程
  130. function startUserDefinedProcess(id,bpmStatus,applicantId,tableName,formUrl){
  131. if(bpmStatus == 2){
  132. layer.alert('<t:mutiLang langKey="申请处理中不可再次提交流程"/>');
  133. return;
  134. }else if(bpmStatus == 3){
  135. layer.alert('<t:mutiLang langKey="申请已完成不可再次提交流程"/>');
  136. return;
  137. }
  138. /* if(applicantId != $("#user").val()){
  139. layer.alert('您无权限操作该数据!');
  140. return;
  141. } */
  142. //业务表名
  143. var tableName = 't_b_contract_payment';
  144. //流程对应表单 URL
  145. var formUrl = 'contractPaymentController.do?goView';
  146. confirm('activitiController.do?startUserDefinedProcess&id='+id+'&tableName='+tableName+'&formUrl='+formUrl,'确定提交流程吗?','contractPaymentList');
  147. }
  148. //修改
  149. function update(title,url, id){
  150. gridname=id;
  151. var rowsData = $('#'+id).datagrid('getSelections');
  152. url +="&id="+rowsData[0].id;
  153. if(rowsData[0].bpmStatus != null && rowsData[0].bpmStatus =='1'){
  154. createwindow("付款申请修改",url, "100%","100%");
  155. }else{
  156. $.messager.alert('提示信息',"审批中的付款申请不能进行修改,请联系相关审批人驳回后再修改");
  157. return;
  158. }
  159. }
  160. //导入
  161. function ImportXls() {
  162. openuploadwin('Excel导入', 'contractPaymentController.do?upload', "contractPaymentList");
  163. }
  164. //导出
  165. function ExportXls() {
  166. JeecgExcelExport("contractPaymentController.do?exportXls","contractPaymentList");
  167. }
  168. //模板下载
  169. function ExportXlsByT() {
  170. JeecgExcelExport("contractPaymentController.do?exportXlsByT","contractPaymentList");
  171. }
  172. function selectContract(title,url){
  173. var contractType = 'service';
  174. if(url.indexOf('contractPController') > -1){
  175. contractType = 'purchase';
  176. }
  177. if(contractSelectQueryPid != null && contractSelectQueryPid.trim() != ''){
  178. url+='&projectid='+contractSelectQueryPid+'&projectName='+encodeURI(contractSelectQueryPname);
  179. }
  180. /* width: window.top.document.body.offsetWidth ,
  181. cache:false,
  182. height: window.top.document.body.offsetHeight-50, */
  183. $.dialog({
  184. title:'选取合同',
  185. content: 'url:'+ url,
  186. zIndex: getzIndex(),
  187. lock: true,
  188. width: window.top.document.body.offsetWidth ,
  189. height: window.top.document.body.offsetHeight-100,
  190. cache:false,
  191. button: [
  192. {
  193. name: '<t:mutiLang langKey="common.confirm"/>',
  194. callback: function(){
  195. //获得子页面getReason()方法中的值
  196. var iframe = this.iframe.contentWindow;
  197. var retStr = iframe.getReason();
  198. console.log(retStr);
  199. if(retStr.length>0){
  200. contractSelectQueryPid = $('#projectid',iframe.document).val();
  201. contractSelectQueryPname = $('#projectName',iframe.document).val();
  202. var strData=eval(retStr);
  203. var cID="";
  204. for(var key in strData[0]){
  205. if(key=="id"){
  206. cID=strData[0][key];
  207. }
  208. }
  209. if(cID.length > 0)
  210. {
  211. addByContractID(cID,contractType);
  212. }
  213. }
  214. },
  215. focus: true
  216. },
  217. {
  218. name: '<t:mutiLang langKey="common.cancel"/>',
  219. callback: function(){
  220. refresh();
  221. }
  222. }
  223. ]
  224. });
  225. }
  226. function addByContractID(cid,contractType)
  227. {
  228. if(contractType == 'service' && needServiceSelect){
  229. maintainBillSelect(cid,contractType);
  230. }else{
  231. addApply(cid,contractType);
  232. }
  233. /* $.dialog({
  234. title:'新增付款申请',
  235. content: 'url:'+'contractController.do?goAdd&cid='+cid,
  236. zIndex: getzIndex(),
  237. lock: true, width: '100%', height: '100%',
  238. cache:false,
  239. }); */
  240. }
  241. function addApply(cid,contractType,maintainids)
  242. {
  243. addContract('合同支付申请','contractPaymentController.do?goAdd&cid='+cid+'&contractType='+contractType+'&maintainids='+maintainids,'contractPaymentList','100%','100%');
  244. /* $.dialog({
  245. title:'新增付款申请',
  246. content: 'url:'+'contractController.do?goAdd&cid='+cid,
  247. zIndex: getzIndex(),
  248. lock: true, width: '100%', height: '100%',
  249. cache:false,
  250. }); */
  251. }
  252. function addContract(title,addurl,gname,width,height) {
  253. gridname=gname;
  254. mycreatewindow(title, addurl,width,height);
  255. }
  256. function mycreatewindow(title, addurl,width,height) {
  257. width = width?width:700;
  258. height = height?height:400;
  259. if(width=="100%" ){
  260. width = window.top.document.body.offsetWidth;
  261. }
  262. if( height=="100%"){
  263. height =window.top.document.body.offsetHeight-100;
  264. }
  265. //--author:JueYue---------date:20140427---------for:弹出bug修改,设置了zindex()函数
  266. if(typeof(windowapi) == 'undefined'){
  267. $.dialog({
  268. content: 'url:'+addurl,
  269. lock : true,
  270. zIndex: getzIndex(),
  271. width:width,
  272. height:height,
  273. title:title,
  274. opacity : 0.3,
  275. cache:false,
  276. okVal:'保存并关闭',
  277. ok: function(){
  278. iframe = this.iframe.contentWindow;
  279. //用来给子界面判断是否要打开选合同dialog
  280. $('#doadd', iframe.document).val('0');
  281. saveObj();
  282. //此参数清空,不在传入选合同的dialog界面
  283. contractSelectQueryPid = '';
  284. contractSelectQueryPname = '';
  285. return false;
  286. },
  287. cancelVal: '关闭',
  288. cancel: function(){
  289. //此参数清空,不在传入选合同的dialog界面
  290. contractSelectQueryPid = '';
  291. contractSelectQueryPname = '';
  292. }, /*为true等价于function(){}*/
  293. button: [
  294. {
  295. name: '保存并继续申请',
  296. callback: function(){
  297. iframe = this.iframe.contentWindow;
  298. //用来给子界面判断是否要打开选合同dialog
  299. $('#doadd', iframe.document).val('1');
  300. saveObj();
  301. return false;
  302. },
  303. class:"ui_state_highlight",
  304. focus: true
  305. }
  306. ]
  307. });
  308. }
  309. }
  310. function maintainBillSelect(cid,contractType){
  311. var url = 'maintainBillController.do?maintainbillSelect&cid='+cid;
  312. $.dialog({
  313. title:'选取供方服务记录',
  314. content: 'url:'+ url,
  315. zIndex: getzIndex(),
  316. lock: true,
  317. width: window.top.document.body.offsetWidth ,
  318. height: window.top.document.body.offsetHeight-100,
  319. cache:false,
  320. button: [
  321. {
  322. name: '<t:mutiLang langKey="common.confirm"/>',
  323. callback: function(){
  324. //获得子页面getReason()方法中的值
  325. var iframe = this.iframe.contentWindow;
  326. if(iframe.getReason().length>0){
  327. var strData=eval(iframe.getReason());
  328. var maintainids="";
  329. for(var key in strData[0]){
  330. if(key=="id"){
  331. maintainids=strData[0][key];
  332. }
  333. }
  334. if(maintainids.length > 0)
  335. {
  336. addApply(cid,contractType,maintainids);
  337. }
  338. }
  339. },
  340. focus: true
  341. },
  342. {
  343. name: '<t:mutiLang langKey="common.cancel"/>',
  344. callback: function(){
  345. refresh();
  346. }
  347. }
  348. ]
  349. });
  350. }
  351. //刷新表格数据
  352. function refresh(){
  353. reloadTable();
  354. }
  355. function startusr(id,usid,processObject,iamApplyUser,applicantId){
  356. /* if(applicantId != $("#user").val()){
  357. layer.alert('您无权限操作该数据!');
  358. return;
  359. } */
  360. /* if(bpmStatus != 2){
  361. layer.alert('<t:mutiLang langKey="只有状态为<处理中>时才可进行<流程撤回>操作"/>');
  362. return;
  363. } */
  364. //业务表名
  365. retractProcess(id,"t_b_contract_payment",usid,"contractPaymentList");
  366. }
  367. function nopay(value, row, index) {
  368. return row.totalamount - row.applypayamount;
  369. }
  370. </script>