| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381 |
- <%@ 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 class="easyui-layout" fit="true">
- <div region="center" style="padding:0px;border:0px">
- <t:datagrid name="contractPaymentList" fitColumns="true" pageSize="20" sortName="createDate" sortOrder="desc" title="合同支付申请" actionUrl="contractPaymentController.do?datagrid4Apply" idField="id" fit="true" queryMode="group">
- <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="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="bpmStatus" hidden="true" queryMode="single" dictionary="bpm_status" width="120"></t:dgCol>
- <t:dgCol title="服务外包合同" field="contractid" hidden="true" queryMode="single" dictionary="t_b_contract,id,name" width="120"></t:dgCol>
- <t:dgCol title="物料采购合同" field="contractid" hidden="true" queryMode="single" dictionary="t_b_contract_p,id,name" width="120"></t:dgCol>
- <t:dgCol title="申请支付金额" field="applypayamount" align="right" formatterjs="formatterNum" queryMode="single" style="color:red;" width="120"></t:dgCol>
- <t:dgCol title="合同金额" field="totalamount" align="right" formatterjs="formatterNum" queryMode="single" style="color:red;" width="120"></t:dgCol>
- <t:dgCol title="发票编号" field="invoiceno" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="本次开票金额" field="invoiceamount" formatterjs="formatterNum" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="本次开票日期" field="invoicedate" formatter="yyyy-MM-dd" 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="auditdate" hidden="true" align="center" formatter="yyyy-MM-dd" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="供应商" field="partnerid" queryMode="single" dictionary="t_b_related_units,id,unit_name" width="120"></t:dgCol>
- <t:dgCol title="项目" field="projectid" queryMode="single" dictionary="t_b_project,id,name" width="120"></t:dgCol>
- <t:dgCol title="申请人" field="applyerid" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="备注" field="remark" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="支付状态" field="paystatus" dictionary="paytype" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="支付操作员" field="payOperator" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="支付金额" field="paymentamount" formatterjs="formatterNum" queryMode="single" hidden="true" width="120"></t:dgCol>
- <t:dgCol title="支付日期" field="paydate" formatter="yyyy-MM-dd" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="评价人" field="evaluater" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="供应商评价" field="supplierevaluate" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="供应商评分" field="supplierscore" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="流程id" field="procInstId" sortable="false" align="center" queryMode="single" hidden="true" width="60"></t:dgCol>
- <t:dgCol title="操作" field="opt"></t:dgCol>
- <t:dgDelOpt exp="bpmStatus#eq#1" title="删除" url="contractPaymentController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>
- <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:dgToolBar title="选取外包服务合同" icon="icon-search" url="contractController.do?selectlist" funname="selectContract" width="100%" height="100%"></t:dgToolBar>
- <t:dgToolBar title="修改" icon="icon-edit" operationCode="edit" url="contractPaymentController.do?goUpdate" funname="update" width="100%" height="100%"></t:dgToolBar>
- <%-- <t:dgToolBar title="批量删除" icon="icon-remove" operationCode="remove" url="contractPaymentController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar> --%>
- <t:dgToolBar title="查看" icon="icon-search" url="contractPaymentController.do?goUpdate" funname="detail" width="100%" height="100%"></t:dgToolBar>
- <%-- <t:dgToolBar title="导入" icon="icon-putout" operationCode="put" funname="ImportXls"></t:dgToolBar>
- <t:dgToolBar title="选取物料采购合同" icon="icon-search" url="contractPController.do?selectlist" funname="selectContract" width="100%" height="100%" operationCode="pcontratselect"></t:dgToolBar>
- <t:dgToolBar title="导出" icon="icon-put" operationCode="put" funname="ExportXls"></t:dgToolBar>
- <t:dgToolBar title="模板下载" icon="icon-putout" operationCode="putout" funname="ExportXlsByT"></t:dgToolBar> --%>
- </t:datagrid>
- </div>
- </div>
- <script src = "webpage/cn/com/lzt/contractpayment/contractPaymentList.js"></script>
- <script type="text/javascript" src="plug-in/tools/money.js"></script>
- <script>
- $(function() {
- var datagrid = $("#contractPaymentListtb");
- 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;">
- <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="openDepartmentSelect()">
- <input id="projectid" name="projectid" type="hidden" value="">
- <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>
- </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="contractPaymentListSearch" onclick="contractPaymentListsearch()">查询</a>
- </span>
- <span>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-reload " id="contractPaymentListRedo" onclick="searchReset('contractPaymentList')">重置</a>
- </span>
- </div>
- </div>
- </div>
- </div>
-
- <script type="text/javascript">
- var needServiceSelect = false;
- var contractSelectQueryPid = '';
- var contractSelectQueryPname = '';
-
- 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_payment';
- //流程对应表单 URL
- var formUrl = 'contractPaymentController.do?goView';
- confirm('activitiController.do?startUserDefinedProcess&id='+id+'&tableName='+tableName+'&formUrl='+formUrl,'确定提交流程吗?','contractPaymentList');
- }
-
- //修改
- 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 ImportXls() {
- openuploadwin('Excel导入', 'contractPaymentController.do?upload', "contractPaymentList");
- }
- //导出
- function ExportXls() {
- JeecgExcelExport("contractPaymentController.do?exportXls","contractPaymentList");
- }
- //模板下载
- function ExportXlsByT() {
- JeecgExcelExport("contractPaymentController.do?exportXlsByT","contractPaymentList");
- }
- function selectContract(title,url){
- var contractType = 'service';
- if(url.indexOf('contractPController') > -1){
- contractType = 'purchase';
- }
- if(contractSelectQueryPid != null && contractSelectQueryPid.trim() != ''){
- url+='&projectid='+contractSelectQueryPid+'&projectName='+encodeURI(contractSelectQueryPname);
- }
- /* width: window.top.document.body.offsetWidth ,
- cache:false,
- height: window.top.document.body.offsetHeight-50, */
- $.dialog({
- title:'选取合同',
- content: 'url:'+ url,
- zIndex: getzIndex(),
- lock: true,
- width: window.top.document.body.offsetWidth ,
- height: window.top.document.body.offsetHeight-100,
- cache:false,
- button: [
- {
- name: '<t:mutiLang langKey="common.confirm"/>',
- callback: function(){
- //获得子页面getReason()方法中的值
- var iframe = this.iframe.contentWindow;
- var retStr = iframe.getReason();
- console.log(retStr);
- if(retStr.length>0){
- contractSelectQueryPid = $('#projectid',iframe.document).val();
- contractSelectQueryPname = $('#projectName',iframe.document).val();
- var strData=eval(retStr);
- var cID="";
- for(var key in strData[0]){
- if(key=="id"){
- cID=strData[0][key];
- }
- }
- if(cID.length > 0)
- {
- addByContractID(cID,contractType);
- }
- }
- },
- focus: true
- },
- {
- name: '<t:mutiLang langKey="common.cancel"/>',
- callback: function(){
- refresh();
- }
- }
- ]
- });
- }
- function addByContractID(cid,contractType)
- {
- if(contractType == 'service' && needServiceSelect){
- maintainBillSelect(cid,contractType);
- }else{
- addApply(cid,contractType);
- }
- /* $.dialog({
- title:'新增付款申请',
- content: 'url:'+'contractController.do?goAdd&cid='+cid,
- zIndex: getzIndex(),
- lock: true, width: '100%', height: '100%',
- cache:false,
-
- }); */
- }
- function addApply(cid,contractType,maintainids)
- {
-
- addContract('合同支付申请','contractPaymentController.do?goAdd&cid='+cid+'&contractType='+contractType+'&maintainids='+maintainids,'contractPaymentList','100%','100%');
- /* $.dialog({
- title:'新增付款申请',
- content: 'url:'+'contractController.do?goAdd&cid='+cid,
- zIndex: getzIndex(),
- lock: true, width: '100%', height: '100%',
- cache:false,
-
- }); */
- }
- function addContract(title,addurl,gname,width,height) {
- gridname=gname;
- mycreatewindow(title, addurl,width,height);
- }
- function mycreatewindow(title, addurl,width,height) {
- width = width?width:700;
- height = height?height:400;
- if(width=="100%" ){
- width = window.top.document.body.offsetWidth;
- }
- if( height=="100%"){
- height =window.top.document.body.offsetHeight-100;
- }
- //--author:JueYue---------date:20140427---------for:弹出bug修改,设置了zindex()函数
- if(typeof(windowapi) == 'undefined'){
- $.dialog({
- content: 'url:'+addurl,
- lock : true,
- zIndex: getzIndex(),
- width:width,
- height:height,
- title:title,
- opacity : 0.3,
- cache:false,
- okVal:'保存并关闭',
- ok: function(){
- iframe = this.iframe.contentWindow;
- //用来给子界面判断是否要打开选合同dialog
- $('#doadd', iframe.document).val('0');
- saveObj();
- //此参数清空,不在传入选合同的dialog界面
- contractSelectQueryPid = '';
- contractSelectQueryPname = '';
- return false;
- },
- cancelVal: '关闭',
- cancel: function(){
- //此参数清空,不在传入选合同的dialog界面
- contractSelectQueryPid = '';
- contractSelectQueryPname = '';
- }, /*为true等价于function(){}*/
- button: [
- {
- name: '保存并继续申请',
- callback: function(){
- iframe = this.iframe.contentWindow;
- //用来给子界面判断是否要打开选合同dialog
- $('#doadd', iframe.document).val('1');
- saveObj();
- return false;
- },
- class:"ui_state_highlight",
- focus: true
- }
- ]
- });
- }
- }
- function maintainBillSelect(cid,contractType){
- var url = 'maintainBillController.do?maintainbillSelect&cid='+cid;
- $.dialog({
- title:'选取供方服务记录',
- content: 'url:'+ url,
- zIndex: getzIndex(),
- lock: true,
- width: window.top.document.body.offsetWidth ,
- height: window.top.document.body.offsetHeight-100,
- cache:false,
- button: [
- {
- name: '<t:mutiLang langKey="common.confirm"/>',
- callback: function(){
- //获得子页面getReason()方法中的值
- var iframe = this.iframe.contentWindow;
- if(iframe.getReason().length>0){
- var strData=eval(iframe.getReason());
- var maintainids="";
- for(var key in strData[0]){
- if(key=="id"){
- maintainids=strData[0][key];
- }
- }
- if(maintainids.length > 0)
- {
- addApply(cid,contractType,maintainids);
- }
- }
- },
- focus: true
- },
- {
- name: '<t:mutiLang langKey="common.cancel"/>',
- callback: function(){
- refresh();
- }
- }
- ]
- });
- }
- //刷新表格数据
- function refresh(){
- reloadTable();
- }
- 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_payment",usid,"contractPaymentList");
- }
- function nopay(value, row, index) {
- return row.totalamount - row.applypayamount;
- }
- </script>
|