|
@@ -0,0 +1,457 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html>
|
|
|
+
|
|
|
+<head>
|
|
|
+ <meta charset="utf-8">
|
|
|
+ <title>预结算单</title>
|
|
|
+ <script src="../../js/min-loader-next.js"></script>
|
|
|
+ <script src="../../js/jquery.jqprint-0.3.js"></script>
|
|
|
+ <script src="http://www.jq22.com/jquery/jquery-migrate-1.2.1.min.js"></script>
|
|
|
+ <style>
|
|
|
+ .layui-table-cell {
|
|
|
+ height: 28px;
|
|
|
+ line-height: 28px;
|
|
|
+ padding: 0 0px;
|
|
|
+ position: relative;
|
|
|
+ box-sizing: border-box;
|
|
|
+ overflow: visible !important;
|
|
|
+ text-overflow: !important;
|
|
|
+ white-space: nowrap !important;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+
|
|
|
+<body class="body-content">
|
|
|
+ <form class="layui-form" action="javascript:void(0)" id = "formName" >
|
|
|
+ </form>
|
|
|
+ <div class="shadow-content" >
|
|
|
+ <div class="gray-title demoTable" id = "buttonForm">
|
|
|
+ <button class="layui-btn left-bnt1 in-b" id="printBtn" >
|
|
|
+ 打印
|
|
|
+ </button>
|
|
|
+ <button class="layui-btn left-bnt1 in-b" id="exportFile" >
|
|
|
+ 导出
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ <div id="big">
|
|
|
+ <div id="DivHead" style="margin-bottom: 24px;">
|
|
|
+ <div style="margin: 0;width: 100%;">
|
|
|
+ <div style="font-size: 18px;font-weight: 600;text-align: center;margin: 0;">
|
|
|
+ <span id="title">预交货结算单</span>
|
|
|
+ </div>
|
|
|
+ <div style="font-size:18px;font-weight: 600;text-align: center;margin: 0;">
|
|
|
+ <span id="bianhao" style="float:left" contenteditable="true">编号:</span>
|
|
|
+ <span id="jiesuanriqi" contenteditable="true">结算日期:</span>
|
|
|
+ </div>
|
|
|
+ <br>
|
|
|
+ <div style="font-size: 18px;font-weight: 600;text-align: left;margin: 0;">
|
|
|
+ <span id="jianjie" contenteditable="true"></span>
|
|
|
+ </div>
|
|
|
+ <div style = "width:980px;margin-top: 20px;">
|
|
|
+ <table id="tableTest" lay-filter="tableFilter"></table>
|
|
|
+ <table id="tableTestPrint" style="display: none;width: 100%;" class="printChuku">
|
|
|
+ <thead style = "padding-left:24px;padding-right:24px;">
|
|
|
+ <tr>
|
|
|
+ <th>交货区域</th>
|
|
|
+ <th>交货日期</th>
|
|
|
+ <th>交货数量(吨)</th>
|
|
|
+ <th id = "dongzuoThLs">临时付款单价(元)</th>
|
|
|
+ <th id = "dongzuoTh">已付款金额(元)</th>
|
|
|
+ <th>预结算价(元)</th>
|
|
|
+ <th>预结算金额(元)</th>
|
|
|
+ <!-- <th>差额</th> -->
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id ="small" style = "padding-left:24px;padding-right:24px;">
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div id="DivFoot" style="margin: 0;padding-bottom: 24px;">
|
|
|
+ <div style="font-size: 18px;font-weight: 600;text-align: left;margin: 0;">
|
|
|
+ <span id="jianjie1"contenteditable="true"></span>
|
|
|
+ </div>
|
|
|
+ <br>
|
|
|
+ <div style="margin: 0;width: 100%;">
|
|
|
+ <div class="display5" style="font-size: 18px;font-weight: 600;float:left">
|
|
|
+ <div>卖方:</div>
|
|
|
+ <div id="sell" style="padding-right:200px;font-size: 18px;font-weight: 600;" contenteditable="true"></div>
|
|
|
+ <div>买方:</div>
|
|
|
+ <div id="buy" contenteditable="true"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+<script>
|
|
|
+ var datas = getTempVal('jieSuanInfo');
|
|
|
+ var conType = getQueryString("conType");
|
|
|
+ var tabPageId = getQueryString("tabPageId");
|
|
|
+ // 采购
|
|
|
+ var dongzuo = "";
|
|
|
+ var dongzuoThHtml = "";
|
|
|
+ if (conType == '00') {
|
|
|
+ dongzuo = "付款";
|
|
|
+ $("#dongzuoThLs").html("临时付款单价(元)");
|
|
|
+ $("#dongzuoTh").html("已付款金额(元)");
|
|
|
+ dongzuoThHtml = "付";
|
|
|
+ } else {
|
|
|
+ dongzuo = "收款";
|
|
|
+ $("#dongzuoThLs").html("临时收款单价(元)");
|
|
|
+ $("#dongzuoTh").html("已收款金额(元)");
|
|
|
+ dongzuoThHtml = "收";
|
|
|
+ }
|
|
|
+
|
|
|
+ var table;
|
|
|
+ $.request({
|
|
|
+ action : 'ExcelSomeJieSuanAction/excelSomeJiesuans',
|
|
|
+ loading : false,
|
|
|
+ data : {MINView:"JSON", jieSunDetail:JSON.stringify(datas),conType:conType,type:"00"},
|
|
|
+ success : function(res) {
|
|
|
+ var mesList = res.data;
|
|
|
+ tableData = heji(mesList);
|
|
|
+ //新增
|
|
|
+ layui.use('table', function(){
|
|
|
+ //创建一行参数
|
|
|
+ table = layui.table;
|
|
|
+ table.render({
|
|
|
+ id : 'tableTest'
|
|
|
+ ,elem: '#tableTest'
|
|
|
+ ,data : mesList
|
|
|
+ ,limit:1000
|
|
|
+ ,size: 'sm' //小尺寸的表格
|
|
|
+ ,cols : [[ //表头
|
|
|
+// {type:'numbers',title: '序号'}
|
|
|
+ {field : 'region', title: '交货区域',edit: 'text'}
|
|
|
+ ,{field : 'entryTime', title: '交货日期',edit: 'text'}
|
|
|
+ ,{field : 'detailWeight', title: '交货数量(吨)', edit: 'text',templet : function (d) {
|
|
|
+ if (isEmpty(d.detailWeight)) {
|
|
|
+ return d.weight;
|
|
|
+ } else {
|
|
|
+ return d.detailWeight;
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ ,{field : 'predictPrice', title: '临时'+dongzuoThHtml+'款单价(元)', edit: 'text'}
|
|
|
+ ,{field : 'totalPriceI', title: '已'+dongzuoThHtml+'款金额(元)', edit: 'text',templet : function (d) {
|
|
|
+ if (isEmpty(d.totalPriceI)) {
|
|
|
+ var weight = isEmpty(d.weight)?0:d.weight;
|
|
|
+ var predictPrice = isEmpty(d.predictPrice)?0:d.predictPrice;
|
|
|
+ return accMul(weight, predictPrice, 2);
|
|
|
+ } else {
|
|
|
+ return d.totalPriceI;
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ ,{field : 'realPrice', title: '预结算价(元)',edit: 'text'}
|
|
|
+ ,{field : 'totalPriceII', title: '预结算金额(元)', edit: 'text',templet : function (d) {
|
|
|
+ if (isEmpty(d.totalPriceII)) {
|
|
|
+ var detailWeight = isEmpty(d.detailWeight)?0:d.detailWeight;
|
|
|
+ var realPrice = isEmpty(d.realPrice)?0:d.realPrice;
|
|
|
+ return accMul(detailWeight, realPrice, 2);
|
|
|
+ } else {
|
|
|
+ return d.totalPriceII;
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ /* ,{field : 'chae', title: '差额',edit: 'text',templet : function (d) {
|
|
|
+ if (isEmpty(d.chae)) {
|
|
|
+ var weight = isEmpty(d.weight)?0:d.weight;
|
|
|
+ var predictPrice = isEmpty(d.predictPrice)?0:d.predictPrice;
|
|
|
+ var detailWeight = isEmpty(d.detailWeight)?0:d.detailWeight;
|
|
|
+ var realPrice = isEmpty(d.realPrice)?0:d.realPrice;
|
|
|
+ var totalPriceI = isEmpty(d.totalPriceI)?accMul(weight, predictPrice):d.totalPriceI;
|
|
|
+ var totalPriceII = isEmpty(d.totalPriceII)?accMul(detailWeight, realPrice):d.totalPriceII;
|
|
|
+ if(conType == '01'){//销售
|
|
|
+ return accSub(totalPriceI, totalPriceII, 2);
|
|
|
+ }else if(conType == '00'){//采购
|
|
|
+ return accSub(totalPriceII, totalPriceI, 2);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return d.chae;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }*/
|
|
|
+ ]]
|
|
|
+ ,page: false
|
|
|
+ ,done: function(res, curr, count){
|
|
|
+ // 处理合计行
|
|
|
+ var trs = $("tbody").find("tr");
|
|
|
+ // 最后一个tr的div
|
|
|
+ var divs = $(trs[trs.length - 1]).find("div");
|
|
|
+ $(divs[0]).html("合计");
|
|
|
+
|
|
|
+ $('#bianhao').html("编号:"+datas[0].contractNo);
|
|
|
+ $('#buy').html(datas[0].buyerNameAll+"(盖章)");
|
|
|
+ $('#sell').html(datas[0].sellerNameAll+"(盖章)");
|
|
|
+ var htYueDesc = datas[0].htYueDesc;
|
|
|
+ var riqi = htYueDesc.substr(0, 2);
|
|
|
+ riqi = accAdd(riqi, 1);
|
|
|
+ if (riqi == '13') {
|
|
|
+ riqi = '1';
|
|
|
+ }
|
|
|
+ $('#jianjie').html("根据"+datas[0].contractNo+"号长单合同的约定,第"+riqi+"个交货月("+htYueDesc+")期间卖方向买方交付铝锭货物,现双方确认预结算单价如下:");
|
|
|
+ var jiesrq = htYueDesc.substr(5, 4);
|
|
|
+ jiesrq = new Date().getFullYear() + "年" + jiesrq.substr(0,2) + "月" + jiesrq.substr(2,2) + "日";
|
|
|
+ $('#jiesuanriqi').html("结算日期:"+jiesrq);
|
|
|
+
|
|
|
+ var caeDesc = "";
|
|
|
+ /* if((parseFloat(tableData[tableData.length - 1].chae) < 0 && conType == '01') || (parseFloat(tableData[tableData.length - 1].chae) > 0 && conType == '00')){
|
|
|
+ caeDesc = "买方应补货款" + (Math.abs(tableData[tableData.length - 1].chae))+"元,";
|
|
|
+ } else if((parseFloat(tableData[tableData.length - 1].chae) > 0 && conType == '01') || (parseFloat(tableData[tableData.length - 1].chae) < 0 && conType == '00')){
|
|
|
+ caeDesc = "卖方应退货款" + (Math.abs(tableData[tableData.length - 1].chae))+"元,";
|
|
|
+ } else {
|
|
|
+ caeDesc = "";
|
|
|
+ } */
|
|
|
+ $('#jianjie1').html(riqi+"月合同执行量"+tableData[tableData.length - 1].detailWeight+"吨,已" + dongzuo + "金额"+tableData[tableData.length - 1].totalPriceI+"元,"+/* 实际结算金额"+tableData[tableData.length - 1].totalPriceII+"元, "+caeDesc */"卖方于"+riqi+"月26日前开具当月全额增值税发票。");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ table.on('edit(tableFilter)', function(obj){ //注:edit是固定事件名,test是table原始容器的属性 lay-filter="对应的值"
|
|
|
+ var index = obj.data.LAY_TABLE_INDEX;
|
|
|
+
|
|
|
+ var tableData = table.cache['tableTest'];
|
|
|
+ // 不是合计数据
|
|
|
+ if (index != (tableData.length - 1)) {
|
|
|
+ // 交货吨数
|
|
|
+ if (obj.field == 'weight') {
|
|
|
+ tableData[index].totalPriceI = null;
|
|
|
+ tableData.splice(tableData.length - 1);
|
|
|
+ tableData = heji(tableData);
|
|
|
+ table.reload('tableTest',{
|
|
|
+ data : tableData
|
|
|
+ });
|
|
|
+ } else if (obj.field == 'predictPrice') {
|
|
|
+ tableData[index].totalPriceI = null;
|
|
|
+ tableData.splice(tableData.length - 1);
|
|
|
+ tableData = heji(tableData);
|
|
|
+ table.reload('tableTest',{
|
|
|
+ data : tableData
|
|
|
+ });
|
|
|
+ // 合计金额
|
|
|
+ } else if (obj.field == 'totalPriceI') {
|
|
|
+ tableData.splice(tableData.length - 1);
|
|
|
+ tableData = heji(tableData);
|
|
|
+ table.reload('tableTest',{
|
|
|
+ data : tableData
|
|
|
+ });
|
|
|
+ } else if (obj.field == 'detailWeight') {
|
|
|
+ tableData[index].totalPriceII = null;
|
|
|
+ tableData.splice(tableData.length - 1);
|
|
|
+ tableData = heji(tableData);
|
|
|
+ table.reload('tableTest',{
|
|
|
+ data : tableData
|
|
|
+ });
|
|
|
+ } else if (obj.field == 'realPrice') {
|
|
|
+ tableData[index].totalPriceII = null;
|
|
|
+ tableData.splice(tableData.length - 1);
|
|
|
+ tableData = heji(tableData);
|
|
|
+ table.reload('tableTest',{
|
|
|
+ data : tableData
|
|
|
+ });
|
|
|
+ // 合计金额
|
|
|
+ } else if (obj.field == 'totalPriceII') {
|
|
|
+ tableData.splice(tableData.length - 1);
|
|
|
+ tableData = heji(tableData);
|
|
|
+ table.reload('tableTest',{
|
|
|
+ data : tableData
|
|
|
+ });
|
|
|
+ // 差额 暂不做处理
|
|
|
+ } else if (obj.field == 'chae') {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
+ error : function(data) {
|
|
|
+ layer.alert('操作失败!', {
|
|
|
+ icon: 5,
|
|
|
+ title: "提示"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ function heji(tableData) {
|
|
|
+ // 总重量
|
|
|
+ var totalWeight = 0;
|
|
|
+ // 总 已付款金额
|
|
|
+ var totalPriceI = 0;
|
|
|
+ // 总 结算量
|
|
|
+ var totalDetailWeight = 0;
|
|
|
+ // 总结算金额
|
|
|
+ var totalPriceII = 0;
|
|
|
+ for (var i = 0; i < tableData.length; i ++) {
|
|
|
+ var d = tableData[i];
|
|
|
+ var weight = isEmpty(d.weight)?0:d.weight;
|
|
|
+ var predictPrice = isEmpty(d.predictPrice)?0:d.predictPrice;
|
|
|
+ var detailWeight = isEmpty(d.detailWeight)?0:d.detailWeight;
|
|
|
+ var realPrice = isEmpty(d.realPrice)?0:d.realPrice;
|
|
|
+
|
|
|
+ // 总重量
|
|
|
+ totalWeight = accAdd(totalWeight, weight);
|
|
|
+ // 总 已付款金额
|
|
|
+ if (isEmpty(d.totalPriceI)) {
|
|
|
+ totalPriceI = accAdd(totalPriceI,accMul(weight, predictPrice,2));
|
|
|
+ } else {
|
|
|
+ totalPriceI = accAdd(d.totalPriceI, totalPriceI);
|
|
|
+ }
|
|
|
+ // 总 结算量
|
|
|
+ totalDetailWeight = accAdd(totalDetailWeight, detailWeight);
|
|
|
+ // 总结算金额
|
|
|
+ if (isEmpty(d.totalPriceII)) {
|
|
|
+ totalPriceII = accAdd(totalPriceII,accMul(detailWeight, realPrice));
|
|
|
+ } else {
|
|
|
+ totalPriceII = accAdd(d.totalPriceII, totalPriceII);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ var hejiMap = {};
|
|
|
+ hejiMap.weight = fomatFloat(totalWeight,4);
|
|
|
+ hejiMap.totalPriceI = fomatFloat(totalPriceI,2);
|
|
|
+ hejiMap.detailWeight = fomatFloat(totalDetailWeight,4);
|
|
|
+ hejiMap.totalPriceII = fomatFloat(totalPriceII,2);
|
|
|
+ if(conType == '01'){//销售
|
|
|
+ hejiMap.chae = fomatFloat(accSub(totalPriceI,totalPriceII),2);
|
|
|
+ }else if(conType == '00'){//采购
|
|
|
+ hejiMap.chae = fomatFloat(accSub(totalPriceII,totalPriceI),2);
|
|
|
+ }
|
|
|
+ tableData.push(hejiMap);
|
|
|
+ return tableData;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ //打印
|
|
|
+ $(document).on('click','#printBtn',function(){
|
|
|
+ var tableData = table.cache['tableTest'];
|
|
|
+ for (var i = 0; i < tableData.length; i ++) {
|
|
|
+ var d = tableData[i];
|
|
|
+ if (isEmpty(d.totalPriceI)) {
|
|
|
+ var weight = isEmpty(d.weight)?0:d.weight;
|
|
|
+ var predictPrice = isEmpty(d.predictPrice)?0:d.predictPrice;
|
|
|
+ d.totalPriceI = accMul(weight, predictPrice, 2);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (isEmpty(d.totalPriceII)) {
|
|
|
+ var detailWeight = isEmpty(d.detailWeight)?0:d.detailWeight;
|
|
|
+ var realPrice = isEmpty(d.realPrice)?0:d.realPrice;
|
|
|
+ d.totalPriceII = accMul(detailWeight, realPrice, 2);
|
|
|
+ }
|
|
|
+
|
|
|
+ /* if (isEmpty(d.chae)) {
|
|
|
+ var weight = isEmpty(d.weight)?0:d.weight;
|
|
|
+ var predictPrice = isEmpty(d.predictPrice)?0:d.predictPrice;
|
|
|
+ var detailWeight = isEmpty(d.detailWeight)?0:d.detailWeight;
|
|
|
+ var realPrice = isEmpty(d.realPrice)?0:d.realPrice;
|
|
|
+ var totalPriceI = isEmpty(d.totalPriceI)?accMul(weight, predictPrice):d.totalPriceI;
|
|
|
+ var totalPriceII = isEmpty(d.totalPriceII)?accMul(detailWeight, realPrice):d.totalPriceII;
|
|
|
+ d.chae = accSub(totalPriceII, totalPriceI, 2);
|
|
|
+ } */
|
|
|
+ // 最后一条数据
|
|
|
+ if (i == (tableData.length - 1)) {
|
|
|
+ d.region = "合计";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ var printTableHtml = '';
|
|
|
+ for (var i = 0; i < tableData.length; i ++) {
|
|
|
+ var inf = tableData[i];
|
|
|
+ inf.region = (isEmpty(inf.region)?'':inf.region);
|
|
|
+ inf.entryTime = (isEmpty(inf.entryTime)?'':inf.entryTime);
|
|
|
+ inf.predictPrice = (isEmpty(inf.predictPrice)?'':inf.predictPrice);
|
|
|
+ inf.totalPriceI = (isEmpty(inf.totalPriceI)?'':inf.totalPriceI);
|
|
|
+ inf.detailWeight = (isEmpty(inf.detailWeight)?'':inf.detailWeight);
|
|
|
+ inf.realPrice = (isEmpty(inf.realPrice)?'':inf.realPrice);
|
|
|
+ inf.totalPriceII = (isEmpty(inf.totalPriceII)?'':inf.totalPriceII);
|
|
|
+ inf.chae = (isEmpty(inf.chae)?'':inf.chae);
|
|
|
+ printTableHtml += '<tr><td>' + (inf.region) + '</td><td>' + (inf.entryTime) + '</td><td>' + (inf.weight) + '</td><td>' + ($.toCashWithCommaAndDot(inf.predictPrice)) + '</td><td>' + ($.toCashWithCommaAndDot(inf.totalPriceI)) + '</td><td>' + ($.toCashWithCommaAndDot(inf.realPrice)) + '</td><td>' + ($.toCashWithCommaAndDot(inf.totalPriceII)) + '</td>'+/* <td>' + ($.toCashWithCommaAndDot(inf.chae)) + '</td> */+'</tr>';
|
|
|
+ }
|
|
|
+ $("#small").html(printTableHtml);
|
|
|
+
|
|
|
+ $(".layui-table-view").hide();
|
|
|
+ $("#tableTestPrint").show();
|
|
|
+ $("#big").jqprint();
|
|
|
+ $("#tableTestPrint").hide();
|
|
|
+ $(".layui-table-view").show();
|
|
|
+ });
|
|
|
+
|
|
|
+ //打印
|
|
|
+ $(document).on('click','#exportFile',function(){
|
|
|
+ var tableData = table.cache['tableTest'];
|
|
|
+ for (var i = 0; i < tableData.length; i ++) {
|
|
|
+ var d = tableData[i];
|
|
|
+ if (isEmpty(d.totalPriceI)) {
|
|
|
+ var weight = isEmpty(d.weight)?0:d.weight;
|
|
|
+ var predictPrice = isEmpty(d.predictPrice)?0:d.predictPrice;
|
|
|
+ d.totalPriceI = accMul(weight, predictPrice, 2);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (isEmpty(d.totalPriceII)) {
|
|
|
+ var detailWeight = isEmpty(d.detailWeight)?0:d.detailWeight;
|
|
|
+ var realPrice = isEmpty(d.realPrice)?0:d.realPrice;
|
|
|
+ d.totalPriceII = accMul(detailWeight, realPrice, 2);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (isEmpty(d.chae)) {
|
|
|
+ var weight = isEmpty(d.weight)?0:d.weight;
|
|
|
+ var predictPrice = isEmpty(d.predictPrice)?0:d.predictPrice;
|
|
|
+ var detailWeight = isEmpty(d.detailWeight)?0:d.detailWeight;
|
|
|
+ var realPrice = isEmpty(d.realPrice)?0:d.realPrice;
|
|
|
+ var totalPriceI = isEmpty(d.totalPriceI)?accMul(weight, predictPrice):d.totalPriceI;
|
|
|
+ var totalPriceII = isEmpty(d.totalPriceII)?accMul(detailWeight, realPrice):d.totalPriceII;
|
|
|
+ d.chae = accSub(totalPriceI, totalPriceII, 2);
|
|
|
+ }
|
|
|
+ // 最后一条数据
|
|
|
+ if (i == (tableData.length - 1)) {
|
|
|
+ d.region = "合计";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ var message = {};
|
|
|
+ message.title = $("#title").html();
|
|
|
+ message.bianhao = $("#bianhao").html();
|
|
|
+ message.jiesuanriqi = $("#jiesuanriqi").html();
|
|
|
+ message.jianjie = $("#jianjie").html();
|
|
|
+ message.jianjie1 = $("#jianjie1").html();
|
|
|
+ message.sell = $("#sell").html();
|
|
|
+ message.buy = $("#buy").html();
|
|
|
+ message.tableData = tableData;
|
|
|
+ openPostWindow("../../ExcelSomeJieSuanAction/excelPreSettlement", JSON.stringify(message), "message");
|
|
|
+ });
|
|
|
+
|
|
|
+ //预结算
|
|
|
+ $(document).on('click','#preSettlement',function(){
|
|
|
+ openMainTabPageParent(tabPageId+'-01', '打印预结算', 'orderManage/someOutPrintCd.html?&tabPageId='+tabPageId+'-01&conType='+conType,'',tabPageId,null);
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 使用post方式打开画面,解决self.open传输数据get方法的传输数据量限制
|
|
|
+ */
|
|
|
+ function openPostWindow(url, data, name){
|
|
|
+ var tempForm = document.createElement("form");
|
|
|
+ tempForm.id="tempForm1";
|
|
|
+ tempForm.method="post";
|
|
|
+ tempForm.action=url;
|
|
|
+ tempForm.target=name;
|
|
|
+ var hideInput = document.createElement("input");
|
|
|
+ hideInput.type="hidden";
|
|
|
+ hideInput.name= name;
|
|
|
+ hideInput.value= data;
|
|
|
+ tempForm.appendChild(hideInput);
|
|
|
+ tempForm.addEventListener("onsubmit",function(){ openWindow(url,name); });
|
|
|
+ document.body.appendChild(tempForm);
|
|
|
+ tempForm.submit();
|
|
|
+ document.body.removeChild(tempForm);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 打开画面
|
|
|
+ */
|
|
|
+ function openWindow(url,name){
|
|
|
+ self.open(url,name,'height=400, width=400, top=0, left=0, toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes,location=yes, status=yes');
|
|
|
+ }
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+</body>
|
|
|
+
|
|
|
+</html>
|