4
This commit is contained in:
Anfioo
2026-01-14 11:39:11 +08:00
parent f7f9df17f1
commit be079067e6
265 changed files with 1217 additions and 486 deletions

View File

@@ -168,46 +168,119 @@
vc.component.feeReceiptManageInfo.conditions.qendTime = "";
vc.component._listFeeReceipts(DEFAULT_PAGE, DEFAULT_ROWS);
},
// _getReportRrl: function (reportNamePrefix, callback) {
//
// // 外部项目接口 URL
// var targetUrl = 'http://localhost:8085/jmreport/query/report/folder?pageNo=1&pageSize=10&reportType=984302991393210368&name=&token=123456';
//
// // 使用 Java110 后端代理 callApi 来避免跨域
// var proxyUrl = '/callApi?url=' + encodeURIComponent(targetUrl);
//
// vc.http.apiGet(
// proxyUrl,
// {},
// function (json, res) {
// try {
// var reportData = JSON.parse(json);
//
// if (reportData?.result?.records) {
// var matchedReport = reportData.result.records.find(function (report) {
// return report.name && report.name.startsWith(reportNamePrefix);
// });
//
// if (matchedReport?.id) {
// callback('http://localhost:8085/jmreport/view/' + matchedReport.id);
// return;
// }
// }
//
// vc.toast("未找到报表");
// callback(null);
//
// } catch (e) {
// console.error("解析报表失败:", e);
// vc.toast("报表数据格式不正确", 2000);
// callback(null);
// }
// },
// function (err) {
// console.error("API 调用失败:", err);
// vc.toast("无法获取报表服务,请检查服务端", 2000);
// callback(null);
// }
// );
// },
//
// _printFeeReceipt: function (_receipt){
// var $that = this;
// this._getReportRrl('缴费明细',function ( url){
// if(url){
// window.open(url + '?receiptId=' + _receipt.receiptId);
// }else{
// vc.totast('获取报表配置失败', 2000);
// }
// })
// },
//
// // 打印小票收据
// _printFeeSmallReceipt: function(_receipt) {
// var $that = this;
// this._getReportUrl('缴费小票', function(url) {
// if (url) {
// window.open(url + '?receiptId=' + _receipt.receiptId);
// } else {
// // 备用方案使用原来的固定URL或提示用户
// vc.toast('无法获取打印模板,请联系管理员', 3000);
// }
// });
// },
_printFeeReceipt: function (_receipt) {
window.open('http://localhost:8085/jmreport/view/1157941533747441664?receiptId=' + _receipt.receiptId);
},
_printFeeSmallReceipt: function (_receipt) {
window.open('http://localhost:8085/jmreport/view/1158273349834502144?receiptId=' + _receipt.receiptId);
},
_printFeeReceipts: function (_conditions) {
// console.log(_conditions)
if (_conditions.roomId == null || _conditions.roomId == "") {
vc.toast("请填写收费对象", 1000);
return;
_printFeeReceipts:
function (_conditions) {
// console.log(_conditions)
if (_conditions.roomId == null || _conditions.roomId == "") {
vc.toast("请填写收费对象", 1000);
return;
}
if (_conditions.type == null || _conditions.type == "") {
vc.toast("请选择打印类型", 1000);
return;
}
// if(_conditions.month==null|| _conditions.month ==""){
// vc.toast("请选择费用月份",1000);
// return;
// }
if (_conditions.qstartTime == null || _conditions.qstartTime == "") {
vc.toast("请选择开始时间", 1000);
return;
}
if (_conditions.qendTime == null || _conditions.qendTime == "") {
vc.toast("请选择结束时间", 1000);
return;
}
// window.open("/print.html#/pages/property/printPayFees?roomName=" + _conditions.roomId+
// "&type="+_conditions.type+"&month="+_conditions.month);
window.open("/print.html#/pages/property/printPayFees?roomName=" + _conditions.roomId +
"&type=" + _conditions.type + "&qstartTime=" + _conditions.qstartTime + "&qendTime=" + _conditions.qendTime);
}
if (_conditions.type == null || _conditions.type == "") {
vc.toast("请选择打印类型", 1000);
return;
}
// if(_conditions.month==null|| _conditions.month ==""){
// vc.toast("请选择费用月份",1000);
// return;
// }
if (_conditions.qstartTime == null || _conditions.qstartTime == "") {
vc.toast("请选择开始时间", 1000);
return;
}
if (_conditions.qendTime == null || _conditions.qendTime == "") {
vc.toast("请选择结束时间", 1000);
return;
}
// window.open("/print.html#/pages/property/printPayFees?roomName=" + _conditions.roomId+
// "&type="+_conditions.type+"&month="+_conditions.month);
window.open("/print.html#/pages/property/printPayFees?roomName=" + _conditions.roomId +
"&type=" + _conditions.type + "&qstartTime=" + _conditions.qstartTime + "&qendTime=" + _conditions.qendTime);
},
,
_moreCondition: function () {
if (vc.component.feeReceiptManageInfo.moreCondition) {
vc.component.feeReceiptManageInfo.moreCondition = false;
} else {
vc.component.feeReceiptManageInfo.moreCondition = true;
}
},
}
,
_listFeePrintPages: function (_page, _rows) {
var param = {
params: {
@@ -231,7 +304,9 @@
console.log('请求失败处理');
}
);
},
}
,
}
});
})(window.vc);
})
(window.vc);