| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411 |
- <%@ 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">
- <input id="documentTitle" type="hidden" name="documentTitle" value="blank"/>
- <input id="fileUrl" type="hidden"/>
- <input id="fileName" type="hidden"/>
- <div region="center" style="padding:0px;border:0px">
- <t:datagrid name="contractSaleInvoiceList" checkbox="false" pageSize="20" sortName="createDate" sortOrder="desc" pagination="true" fitColumns="true" title="销售开票" actionUrl="contractSaleInvoiceController.do?datagrid" 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="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="contractid" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="合同名" field="contractname" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="开票金额" field="invoiceamount" formatterjs="formatterNum" queryMode="single" align="right" width="80"></t:dgCol>
- <t:dgCol title="开票日期" field="invoicedate" formatter="yyyy-MM-dd" align="center" queryMode="group" width="80"></t:dgCol>
- <t:dgCol title="收款金额" field="incomeamount" formatterjs="formatterNum" align="right" queryMode="single" width="80"></t:dgCol>
- <t:dgCol title="最新收款日期" field="incomedate" align="center" formatter="yyyy-MM-dd" queryMode="single" width="80"></t:dgCol>
- <t:dgCol title="开票操作人" field="invoiceopt" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="开票操作人" field="invoiceoptname" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="收款操作人" field="incomeopt" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="收款操作人" field="incomeoptname" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="开票抬头" field="customername" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="项目" field="projectid" hidden="true" queryMode="single" width="180"></t:dgCol>
- <t:dgCol title="项目名" field="projectname" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="客户名" field="customerid" 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="busstatus" queryMode="single" dictionary="contractstatus" align="center" width="80"></t:dgCol>
- <t:dgCol title="操作" field="opt"></t:dgCol>
- <t:dgDelOpt exp="contractid#empty#true" title="删除" url="contractSaleInvoiceController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>
- <t:dgFunOpt exp="busstatus#eq#21&&contractid#empty#false" title="收款" funname="doIncome(id)" urlclass="ace_button" urlfont="fa-rmb"/>
- <t:dgFunOpt exp="incomedate#empty#true&&contractid#empty#false&&busstatus#ne#23" title="作废发票" funname="doCancel(id)" urlclass="ace_button" urlStyle="background-color:#FF6347" urlfont="fa-bitbucket"/>
- <t:dgOpenOpt exp="incomedate#empty#false&&contractid#empty#false" title="收款明细" url="contractSaleIncomeController.do?list&invoiceid={id}" urlclass="ace_button" urlfont="fa-trash-o" width="400" height="300"/>
- <t:dgFunOpt exp="incomedate#empty#false" title="取消收款" funname="doCancelIncome(id)" urlclass="ace_button" urlStyle="background-color:#FF6347" urlfont="fa-trash-o"/>
- <t:dgToolBar title="选取合同开票" icon="icon-add" operationCode="add" url="contractSaleController.do?selectlist" funname="selectContract"></t:dgToolBar>
- <t:dgToolBar title="修改" icon="icon-edit" operationCode="edit" url="contractSaleInvoiceController.do?goUpdate" funname="update" height="100%" width="1000"></t:dgToolBar>
- <t:dgToolBar title="查看" icon="icon-search" url="contractSaleInvoiceController.do?goUpdate" funname="detail" height="100%" width="1000"></t:dgToolBar>
- <t:dgToolBar title="导入发票信息" icon="icon-put" operationCode="put" funname="commonUpload"></t:dgToolBar>
- <t:dgToolBar title="导出" icon="icon-put" operationCode="put" funname="ExportXls"></t:dgToolBar>
- </t:datagrid>
- </div>
- </div>
- <script src = "webpage/cn/com/lzt/contractsaleinvoice/contractSaleInvoiceList.js"></script>
- <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 = $("#contractSaleInvoiceListtb");
- 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" colspan="3">
- <input id="invoiceamount" name="invoiceamount" type="text" style="width: 157px" class="inputxt" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/"
- onKeyUp="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')" ignore="checked" placeholder="请输入金额"/>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">销售额(价税合计)</label>
- </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="contractSaleInvoiceListSearch" onclick="contractSaleInvoiceListsearch()">查询</a>
- </span>
- <span>
- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-reload " id="contractSaleInvoiceListRedo" onclick="searchReset('contractSaleInvoiceList')">重置</a>
- </span>
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript">
- $(document).ready(function(){
- });
-
-
-
- //导入
- function ImportXls() {
- openuploadwin('Excel导入', 'contractSaleInvoiceController.do?upload', "contractSaleInvoiceList");
- }
- //导出
- function ExportXls() {
- JeecgExcelExport("contractSaleInvoiceController.do?exportXls","contractSaleInvoiceList");
- }
- //模板下载
- function ExportXlsByT() {
- JeecgExcelExport("contractSaleInvoiceController.do?exportXlsByT","contractSaleInvoiceList");
- }
- function selectContract(){
- var url = 'contractSaleController.do?selectlist';
- $.dialog({
- title:'选取销售合同',
- content: 'url:'+ url,
- zIndex: getzIndex(),
- lock: true,
- width: window.top.document.body.offsetWidth-200 ,
- height: window.top.document.body.offsetHeight-200,
- 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 cID="";
- for(var key in strData[0]){
- if(key=="id"){
- cID=strData[0][key];
- }
- }
- if(cID.length > 0)
- {
- addByContractID(cID);
- }
- }
- },
- focus: true
- },
- {
- name: '<t:mutiLang langKey="common.cancel"/>',
- callback: function(){
- refresh();
- }
- }
- ]
- });
- }
- function addByContractID(cid)
- {
- var width = window.top.document.body.offsetWidth-400 ;
- var height= window.top.document.body.offsetHeight-200;
- add('销售开票','contractSaleInvoiceController.do?goAdd&contractid='+cid,'contractSaleInvoiceList',width,height)
- }
- //修改
- function update(title,url, id,width,height){
- gridname=id;
- var rowsData = $('#'+id).datagrid('getSelections');
- url +="&id="+rowsData[0].id;
- if(rowsData[0].busstatus != null && rowsData[0].busstatus =='21'){
- createwindow("开票申请修改",url, width,height);
- }else{
- $.messager.alert('提示信息',"已支付或作废的发票不能进行修改");
- return;
- }
- }
- function doIncome(id) {
- /* var url = "contractSaleInvoiceController.do?doIncome&id="+id;
- $.dialog.setting.zIndex = getzIndex(true);
- $.dialog.confirm('确定已收款吗', function(){
- doAction(url);
- }, function(){
- }); */
- var url="contractSaleIncomeController.do?goAdd&invoiceid="+id;
- createwindow("销售收款", url,"500px","200px");
- }
- function doCancelIncome(id){
- var url="contractSaleIncomeController.do?doDel&invoiceid="+id;
- $.dialog.setting.zIndex = getzIndex(true);
- $.dialog.confirm('确定取消收款吗', function(){
- doAction(url);
- }, function(){
- });
- }
- function doCancel(id) {
- var url = "contractSaleInvoiceController.do?doCancel&id="+id;
- $.dialog.setting.zIndex = getzIndex(true);
- $.dialog.confirm('确定作废发票吗', function(){
- doAction(url);
- }, function(){
- });
- }
- /**
- * 执行
- *
- * @param url
- * @param index
- */
- function doAction(url) {
- $.ajax({
- async : false,
- cache : false,
- type : 'POST',
- url : url,// 请求的action路径
- error : function() {// 请求失败处理函数
- },
- success : function(data) {
- var d = data; // ------ $.parseJSON(data);
- if (d.success) {
- var msg = d.msg;
- tip(msg);
- reloadTable();
- }
- else{
- var msg = d.msg;
- tip(msg);
- }
- }
- });
- }
- function xmlupload(){
- $.dialog({
- content: 'url:publicpageController.do?fileUploader&busiId=111&busiTable=t_b_contract_sale_invoice&extensions=xml&bizType=contractsaleinvoice', zIndex: getzIndex(), title: '上传发票xml文件', lock: true, width: '800px', height: '600px', opacity: 0.4, button: [
- {name: '<t:mutiLang langKey="common.close"/>', callback: function (){}}
-
- ]}).zindex();
- }
- </script>
- <script type="text/javascript" src="plug-in/uploadify/jquery.uploadify-3.1.js"></script>
- <script type="text/javascript" src="plug-in/tools/Map.js"></script>
- <script type="text/javascript">
- var flag = false;
- var fileitem = "";
- var fileKey = "";
- var serverMsg = "";
- var uploadsuccessflag = false;
- var m = new Map();
- $(function() {
- $('#instruction')
- .uploadify(
- {
- buttonText : '导入发票xml文件',
- auto : true,
- progressData : 'speed',
- multi : false,
- height : 25,
- overrideEvents : [ 'onDialogClose' ],
- fileTypeDesc : '文件格式:',
- queueID : 'instructionfile',
- fileTypeExts : 'xml',
- fileSizeLimit : '1MB',
- swf : 'plug-in/uploadify/uploadify.swf',
- uploader : 'contractSaleInvoiceController.do?importExcel',//'cgUploadController.do?ajaxSaveFile',
- onUploadStart : function(file) {
- var documentTitle = $('#documentTitle').val();
- $('#instruction').uploadify("settings",
- "formData", {
- 'documentTitle' : documentTitle
- });
- },
- onQueueComplete : function(queueData) {
- },
- onUploadSuccess : function(file, data, response) {
- var d = data; // ------ $.parseJSON(data);
- uploadSuccess(d, file, response);
- uploadsuccessflag = d.success;
- serverMsg = d.msg;
- if (d.success) {
- var win = frameElement.api.opener;
- }
- },
- onFallback : function() {
- tip("您未安装FLASH控件,无法上传图片!请安装FLASH控件后再试")
- },
- onSelectError : function(file, errorCode, errorMsg) {
- switch (errorCode) {
- case -100:
- tip("上传的文件数量已经超出系统限制的"
- + $('#instruction').uploadify(
- 'settings',
- 'queueSizeLimit') + "个文件!");
- break;
- case -110:
- tip("文件 ["
- + file.name
- + "] 大小超出系统限制的"
- + $('#instruction')
- .uploadify('settings',
- 'fileSizeLimit')
- + "大小!");
- break;
- case -120:
- tip("文件 [" + file.name + "] 大小异常!");
- break;
- case -130:
- tip("文件 [" + file.name + "] 类型不正确!");
- break;
- }
- },
- onUploadProgress : function(file, bytesUploaded,
- bytesTotal, totalBytesUploaded,
- totalBytesTotal) {
- }
- });
- });
- function upload() {
- $('#instruction').uploadify('upload', '*');
- return flag;
- }
- function cancel() {
- $('#instruction').uploadify('cancel', '*');
- }
- function uploadSuccess(d,file,response){
- $("#fileUrl").val(d.attributes.url);
- $("#fileName").val(d.attributes.name);
- var url = $("#fileUrl").val();
- var html="";
- if(url.indexOf(".gif")!=-1 ||
- url.indexOf(".jpg")!=-1 ||
- url.indexOf(".png")!=-1 ||
- url.indexOf(".bmp")!=-1){
- html += "<img src='"+url+"' width =400 height=300 />";
- }else{
- html += "<a href='"+url+"' target=_blank >下载:"+d.attributes.name+"</a>";
- }
- $("#fileShow").html(html);
- }
- function uploadCallback(callback,inputId){
- var url = $("#fileUrl").val();
- var name= $("#fileName").val();
- callback(url,name,inputId);
-
- }
- </script>
- <span id="instructionspan"><input type="file" name="instruction"
- id="instruction" /></span>
- <!-- update--end--author:zhangjiaqiang date:20170601 for:切换上传资源的保存路径 -->
|