|
@@ -1,12 +1,15 @@
|
|
|
//@ sourceURL=drug_purchase_situation.js
|
|
|
var LODOP; //声明为全局变量
|
|
|
+var groupYk = window.localStorage["groupYk"];
|
|
|
$(function () {
|
|
|
- initDynamicSelect("allUnitCode", "unitCodeSearch");
|
|
|
+ if (groupYk == null) {
|
|
|
+ return errorMesageSimaple('药库参数未设置,请在发药参数设置中设置');
|
|
|
+ }
|
|
|
init_daterangepickertime();
|
|
|
setTimeout(function () {
|
|
|
getLodop();
|
|
|
}, 800);
|
|
|
- $("#jmtj_table").hide();
|
|
|
+ $("#detailed_table").hide();
|
|
|
$(".selectpicker").selectpicker({
|
|
|
dropuAuto: false
|
|
|
});
|
|
@@ -14,11 +17,7 @@ $(function () {
|
|
|
//初始化页面上面的按钮事件
|
|
|
$("#btn_search").click(function (t) {
|
|
|
$('.sjh').remove();
|
|
|
- if ($('#drugFlagSearch').val() == 0) {
|
|
|
- getSendDrugRecordData();
|
|
|
- } else {
|
|
|
- getSpiritAnestheticPrintData();
|
|
|
- }
|
|
|
+ getRecordData();
|
|
|
});
|
|
|
$('#btn_clean').click(function () {
|
|
|
cleanParams();
|
|
@@ -27,179 +26,91 @@ $(function () {
|
|
|
print();
|
|
|
});
|
|
|
$("#btn_excel").click(function (t) {
|
|
|
- let id = "qbtj_table";
|
|
|
- let name = "药品发药明细统计表";
|
|
|
- if ($("#qbtj_table").is(':hidden')) {
|
|
|
- id = "jmtj_table";
|
|
|
- let drugFlag = $("#drugFlagSearch").val();
|
|
|
- if (drugFlag == 1) {
|
|
|
- name = "麻、精一及麻黄碱类药品使用登记";
|
|
|
- } else if (drugFlag == 2) {
|
|
|
- name = "终止妊娠药统计";
|
|
|
- } else if (drugFlag == 3) {
|
|
|
- name = "精二类统计";
|
|
|
+ let classMethod = $("#classMethod").val();
|
|
|
+ let statisticalMethod = $("#statisticalMethod").val();
|
|
|
+ let id = "";
|
|
|
+ let title = "药品发药明细统计表";
|
|
|
+ if (classMethod === "0") {
|
|
|
+ id = 'sum_table';
|
|
|
+ if (statisticalMethod === "0") {
|
|
|
+ title = "药品供应商商情报告";
|
|
|
+ } else {
|
|
|
+ title = "药品购入统计表(供应商)";
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ id = 'detailed_table';
|
|
|
+ if (statisticalMethod === "0") {
|
|
|
+ title = "药品生产厂家商情报告";
|
|
|
+ } else {
|
|
|
+ title = "药品购入统计表(生产厂家)";
|
|
|
}
|
|
|
}
|
|
|
$("#" + id).table2excel({
|
|
|
exclude: ".exclHide",
|
|
|
- filename: name + "(" + getRePortRangeArr()[0].substring(0, getRePortRangeArr()[0].indexOf(" ") + 1) + ").xls"
|
|
|
+ filename: title + "(" + getRePortRangeArr()[0].substring(0, getRePortRangeArr()[0].indexOf(" ") + 1) + ").xls"
|
|
|
})
|
|
|
});
|
|
|
- $("#drugFlagSearch").change(function (t, d, e) {
|
|
|
- let drugFlag = $("#drugFlagSearch").val();
|
|
|
+ $("#classMethod,#statisticalMethod").change(function (t, d, e) {
|
|
|
+ let classMethod = $("#classMethod").val();
|
|
|
+ let statisticalMethod = $("#statisticalMethod").val();
|
|
|
let title = "";
|
|
|
- if (drugFlag == 1) {
|
|
|
- title = "麻、精一及麻黄碱类药品使用登记";
|
|
|
- $("#jmtj_table").show();
|
|
|
- $("#qbtj_table").hide();
|
|
|
- } else if (drugFlag == 2) {
|
|
|
- title = "终止妊娠药统计";
|
|
|
- $("#jmtj_table").show();
|
|
|
- $("#qbtj_table").hide();
|
|
|
- } else if (drugFlag == 3) {
|
|
|
- title = "精二类统计";
|
|
|
- $("#jmtj_table").show();
|
|
|
- $("#qbtj_table").hide();
|
|
|
- } else if (drugFlag == 0) {
|
|
|
- title = "药品发药明细统计表";
|
|
|
- $("#qbtj_table").show();
|
|
|
- $("#jmtj_table").hide();
|
|
|
+ if (classMethod === "0") {
|
|
|
+ if (statisticalMethod === "0") {
|
|
|
+ title = "药品供应商商情报告";
|
|
|
+ $("#sum_table").show();
|
|
|
+ $("#detailed_table").hide();
|
|
|
+ } else {
|
|
|
+ title = "药品购入统计表(供应商)";
|
|
|
+ $("#sum_table").hide();
|
|
|
+ $("#detailed_table").show();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (statisticalMethod === "0") {
|
|
|
+ title = "药品生产厂家商情报告";
|
|
|
+ $("#sum_table").show();
|
|
|
+ $("#detailed_table").hide();
|
|
|
+ } else {
|
|
|
+ title = "药品购入统计表(生产厂家)";
|
|
|
+ $("#sum_table").hide();
|
|
|
+ $("#detailed_table").show();
|
|
|
+ }
|
|
|
}
|
|
|
$(".title").html(title);
|
|
|
$(".dateRange").html($('#reportrange span').html());
|
|
|
$(".printDate").html(format(new Date(), "yyyy-MM-dd HH:mm"));
|
|
|
});
|
|
|
-
|
|
|
- //初始化药品查询弹出框
|
|
|
- initSearchList('<div id="medicinePopoverContent"><table id="tb_table_medicine"></table></div>',
|
|
|
- 'searchTextDrug', 700, 250);
|
|
|
- $('#searchTextDrug').on('input focus', function (e) {
|
|
|
- showDrugPopover({
|
|
|
- data: {
|
|
|
- searchTextDrug: $("#searchTextDrug").val() == "" ? null : $("#searchTextDrug").val()
|
|
|
- },
|
|
|
- columns: [
|
|
|
- {
|
|
|
- field: 'delFlag',
|
|
|
- title: '已作废',
|
|
|
- align: "center",
|
|
|
- valign: 'middle',
|
|
|
- formatter: function (value, row, index) {
|
|
|
- return value == 1 ? '<span style="color: red">是</span>' : '否';
|
|
|
- }
|
|
|
- }]
|
|
|
- });
|
|
|
- if ($('#searchTextDrug').val() == '') {
|
|
|
- $('#codeSearch').val("");
|
|
|
- $('#serialSearch').val("");
|
|
|
- }
|
|
|
- });
|
|
|
});
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * 获取精麻药统计报表
|
|
|
+ * 获取汇总药品统计报表
|
|
|
*/
|
|
|
-function getSpiritAnestheticPrintData() {
|
|
|
- $(".dateRange").html($('#reportrange span').html());
|
|
|
- $(".printDate").html(format(new Date(), "yyyy-MM-dd HH:mm"));
|
|
|
- $.ajax({
|
|
|
- type: "GET",
|
|
|
- url: '/thmz/getSpiritAnestheticPrint',
|
|
|
- contentType: "application/json;charset=UTF-8",
|
|
|
- dataType: "json",
|
|
|
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
- data: queryParams(),
|
|
|
- success: function (res) {
|
|
|
- if (res == '401' || res == 401) {
|
|
|
- window.location.href = '/thmz/login/view'
|
|
|
- return;
|
|
|
- }
|
|
|
- if (res.code == 0) {
|
|
|
- let html = '';
|
|
|
- let code = '';
|
|
|
- let number = 0;
|
|
|
- let sex;
|
|
|
- let drugFlag = $("#drugFlagSearch").val();
|
|
|
- for (var i = 0; i < res.data.length; i++) {
|
|
|
- let data = res.data[i];
|
|
|
- if (code == '') {
|
|
|
- code = data.chargeItemCode;
|
|
|
- number += parseFloat(data.quantity);
|
|
|
- } else if (code == data.chargeItemCode) {
|
|
|
- number += parseFloat(data.quantity);
|
|
|
- } else {
|
|
|
- html += '<tr class="sjh">';
|
|
|
- html += '<td colspan="15" style="text-align: center;font-weight: 700;">共计:' + number + '</td>';
|
|
|
- html += '</tr>';
|
|
|
- code = data.chargeItemCode;
|
|
|
- number = parseFloat(data.quantity);
|
|
|
- }
|
|
|
- if (data.sex == 1) {
|
|
|
- sex = "男"
|
|
|
- } else if (data.sex == 2) {
|
|
|
- sex = "女"
|
|
|
- } else {
|
|
|
- sex = "未知"
|
|
|
- }
|
|
|
- html += '<tr class="sjh">';
|
|
|
- html += '<td class="xtd" style="text-align: center;mso-number-format: \'\\@\';">' + data.chargeDate.substring(5, 11) + '</td>';
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + data.patientId + '</td>';
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + data.name + '</td>';
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + sex + '</td>';
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + data.age + '</td>';
|
|
|
- html += '<td style="mso-number-format: \'\\@\';">' + data.socialNo + '</td>';
|
|
|
- html += '<td>' + data.icdText + '</td>';
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + data.chargeItemCode + '</td>';
|
|
|
- html += '<td>' + data.drugname + '</td>';
|
|
|
- html += '<td>' + data.specification + '</td>';
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + data.quantity + '</td>';
|
|
|
- html += '<td style="text-align: center;">' + data.chargeDate + '</td>';
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + data.employeeName + '</td>';
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + data.warnDeptName + '</td>';
|
|
|
- html += '<td class="xtd" ></td>';
|
|
|
- html += '<td class="xtd" ></td>';
|
|
|
- html += '</tr>';
|
|
|
- }
|
|
|
- html += '<tr class="sjh">';
|
|
|
- html += '<td colspan="15" style="text-align: center;font-weight: 700;">共计:' + number + '</td>';
|
|
|
- html += '</tr>';
|
|
|
- $("#jmtj_table").append(html);
|
|
|
- } else if (res.code == -1) {
|
|
|
- new PNotify({
|
|
|
- title: '错误提示',
|
|
|
- text: res.message,
|
|
|
- type: 'error',
|
|
|
- hide: true,
|
|
|
- styling: 'bootstrap3'
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * 获取所有药品类型统计报表
|
|
|
- */
|
|
|
-function getSendDrugRecordData() {
|
|
|
+function getRecordData() {
|
|
|
+ let classMethod = $('#classMethod').val();
|
|
|
+ let statisticalMethod = $('#statisticalMethod').val();
|
|
|
+ let flag = '';
|
|
|
+ if (classMethod === "0") {
|
|
|
+ flag = (statisticalMethod === "0" ? 0 : 2)
|
|
|
+ } else {
|
|
|
+ flag = (statisticalMethod === "0" ? 1 : 3)
|
|
|
+ }
|
|
|
+ let data = {
|
|
|
+ 'beginDate': getRePortRangeArr()[0],
|
|
|
+ 'endDate': getRePortRangeArr()[1],
|
|
|
+ 'flag': flag,
|
|
|
+ };
|
|
|
$('#YWaitDialog').css('top', $('.xtd').offset().top);
|
|
|
$('#YWaitDialog').show();
|
|
|
$(".dateRange").html($('#reportrange span').html());
|
|
|
+ $(".groupName").html(getGroupName(groupYk));
|
|
|
$(".printDate").html(format(new Date(), "yyyy-MM-dd HH:mm"));
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
- url: '/thmz/getSendDrugRecord',
|
|
|
+ url: '/thmz/getDrugPurchaseSituation',
|
|
|
contentType: "application/json;charset=UTF-8",
|
|
|
dataType: "json",
|
|
|
headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
- data: JSON.stringify({
|
|
|
- 'beginDate': getRePortRangeArr()[0],
|
|
|
- 'endDate': getRePortRangeArr()[1],
|
|
|
- 'chargeCode': $('#codeSearch').val() == '' ? null : $('#codeSearch').val(),
|
|
|
- 'serial': $('#serialSearch').val() == '' ? null : $('#serialSearch').val(),
|
|
|
- 'warnDept': $('#unitCodeSearch').val() != null ? $('#unitCodeSearch').val()[0] : null,
|
|
|
- 'queryScope': $("#queryScopeSearch").val()
|
|
|
- }),
|
|
|
+ data: JSON.stringify(data),
|
|
|
success: function (res) {
|
|
|
$('#YWaitDialog').hide();
|
|
|
if (res == '401' || res == 401) {
|
|
@@ -207,68 +118,66 @@ function getSendDrugRecordData() {
|
|
|
return;
|
|
|
}
|
|
|
if (res.code == 0) {
|
|
|
+ console.log(res.data);
|
|
|
let html = '';
|
|
|
- let flag = '';//区分门诊住院 -1住院 其它门诊
|
|
|
- let number = 0;
|
|
|
- let totalNumber = 0;
|
|
|
- let sex;
|
|
|
+ let packRetpriceSum = 0;
|
|
|
+ let buyPriceSum = 0;
|
|
|
+ let totalPackRetpriceSum = 0;
|
|
|
+ let totalBuyPriceSum = 0;
|
|
|
for (var i = 0; i < res.data.length; i++) {
|
|
|
let data = res.data[i];
|
|
|
- if (flag == '') {
|
|
|
- flag = data.id.indexOf("-") != -1 ? '0' : '1';
|
|
|
- number += parseFloat(data.quantity);
|
|
|
- } else if (flag == (data.id.indexOf("-") != -1 ? '0' : '1')) {
|
|
|
- number += parseFloat(data.quantity);
|
|
|
- } else {
|
|
|
+ if (i > 0 && ((flag === 2 || flag === 0) ? data.supplyName : data.manuName) !== ((flag === 2 || flag === 0) ? res.data[i - 1].supplyName : res.data[i - 1].manuName)) {
|
|
|
html += '<tr class="sjh">';
|
|
|
- html += '<td colspan="11" style="text-align: right;font-weight: 700;">小计:' + number + '</td>';
|
|
|
- html += '<td colspan="5"></td>';
|
|
|
+ html += '<td colspan="4" style="text-align: right;font-weight: 700;">小计:</td>';
|
|
|
+ html += '<td style="text-align: center;">' + packRetpriceSum + '</td>';
|
|
|
+ html += '<td style="text-align: center;">' + buyPriceSum + '</td>';
|
|
|
html += '</tr>';
|
|
|
- flag = data.id.indexOf("-") != -1 ? '0' : '1';
|
|
|
- totalNumber += number;
|
|
|
- number = parseFloat(data.quantity);
|
|
|
+ totalPackRetpriceSum += packRetpriceSum;
|
|
|
+ totalBuyPriceSum += buyPriceSum;
|
|
|
+ packRetpriceSum = 0;
|
|
|
+ buyPriceSum = 0;
|
|
|
}
|
|
|
- if (data.sex == 1) {
|
|
|
- sex = "男"
|
|
|
- } else if (data.sex == 2) {
|
|
|
- sex = "女"
|
|
|
+ packRetpriceSum += data.packRetpriceSum;
|
|
|
+ buyPriceSum += data.buyPriceSum;
|
|
|
+ if (flag === 0 || flag === 1) {
|
|
|
+ html += '<tr class="sjh">';
|
|
|
+ html += '<td class="xtd" style="text-align: center;">' + (i + 1) + '</td>';
|
|
|
+ html += '<td class="xtd" style="text-align: center;">' + (flag === 0 ? data.supplyName : data.manuName) + '</td>';
|
|
|
+ html += '<td class="xtd" style="text-align: center;">' + data.reptNoSum + '</td>';
|
|
|
+ html += '<td class="xtd" style="text-align: center;">' + (isEmpty(data.inDocuNo)?'-':data.inDocuNo) + '</td>';
|
|
|
+ html += '<td class="xtd" style="text-align: center;">' + data.packRetpriceSum + '</td>';
|
|
|
+ html += '<td class="xtd" style="text-align: center;">' + data.buyPriceSum + '</td>';
|
|
|
+ html += '</tr>';
|
|
|
} else {
|
|
|
- sex = "未知"
|
|
|
+ html += '<tr class="sjh">';
|
|
|
+ html += '<td class="xtd" style="text-align: center;">' + (flag === 2 ? data.supplyName : data.manuName) + '</td>';
|
|
|
+ html += '<td class="xtd" style="text-align: center;">' + data.drugName + '</td>';
|
|
|
+ html += '<td class="xtd" style="text-align: center;">' + data.specification + '</td>';
|
|
|
+ html += '<td class="xtd" style="text-align: center;">' + data.buyAmt + '</td>';
|
|
|
+ html += '<td class="xtd" style="text-align: center;">' + data.packRetpriceSum + '</td>';
|
|
|
+ html += '<td class="xtd" style="text-align: center;">' + data.buyPriceSum + '</td>';
|
|
|
+ flag === 2 ? $(".mainName").html("供应商") : $(".mainName").html("生产厂家");
|
|
|
}
|
|
|
- let queryScope = data.id.indexOf("-") != -1 ? '门诊' : '住院';
|
|
|
- let age = data.birthDay != null ? getBirthSlot(data.birthDay, new Date()) : '';
|
|
|
- html += '<tr class="sjh">';
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + data.id + '</td>';
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + data.name + '</td>';
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + sex + '</td>';
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + age.substring(0, age.indexOf('岁')) + '</td>';
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + data.warnDeptName + '</td>';
|
|
|
- html += '<td>' + data.icdText + '</td>';
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + data.chargeCode + '</td>';
|
|
|
- html += '<td>' + data.drugName + '</td>';
|
|
|
- html += '<td>' + data.specification + '</td>';
|
|
|
- html += '<td>' + data.abbrName + '</td>';
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + data.quantity + '</td>';
|
|
|
- html += '<td style="text-align: center;">' + data.chargeDate + '</td>';
|
|
|
- let doctorName ='';
|
|
|
- if(data.employeeName!=null){
|
|
|
- doctorName = data.employeeName.trim().substring(0, 1) + new Array(data.employeeName.trim().length).join('*');
|
|
|
+ if (i + 1 === res.data.length) {
|
|
|
+ html += '<tr class="sjh">';
|
|
|
+ html += '<td colspan="4" style="text-align: right;font-weight: 700;">小计:</td>';
|
|
|
+ html += '<td style="text-align: center;">' + packRetpriceSum + '</td>';
|
|
|
+ html += '<td style="text-align: center;">' + buyPriceSum + '</td>';
|
|
|
+ html += '</tr>';
|
|
|
+ totalPackRetpriceSum += packRetpriceSum;
|
|
|
+ totalBuyPriceSum += buyPriceSum;
|
|
|
}
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + doctorName + '</td>';
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + data.supplyName + '</td>';
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + data.frequency + '</td>';
|
|
|
- html += '<td class="xtd" style="text-align: center;">' + queryScope + '</td>';
|
|
|
- html += '</tr>';
|
|
|
}
|
|
|
html += '<tr class="sjh">';
|
|
|
- html += '<td colspan="11" style="text-align: right;font-weight: 700;">小计:' + number + '</td>';
|
|
|
- html += '<td colspan="5"></td>';
|
|
|
+ html += '<td colspan="4" style="text-align: right;font-weight: 700;">总计:</td>';
|
|
|
+ html += '<td style="text-align: center;">' + totalPackRetpriceSum + '</td>';
|
|
|
+ html += '<td style="text-align: center;">' + totalBuyPriceSum + '</td>';
|
|
|
html += '</tr>';
|
|
|
- html += '<tr class="sjh">';
|
|
|
- html += '<td colspan="11" style="text-align: right;font-weight: 700;">总计:' + parseFloat(totalNumber + number) + '</td>';
|
|
|
- html += '<td colspan="5"></td>';
|
|
|
- html += '</tr>';
|
|
|
- $("#qbtj_table").append(html);
|
|
|
+ if (flag === 0 || flag === 1) {
|
|
|
+ $("#sum_table").append(html);
|
|
|
+ } else {
|
|
|
+ $("#detailed_table").append(html);
|
|
|
+ }
|
|
|
} else if (res.code == -1) {
|
|
|
new PNotify({
|
|
|
title: '错误提示',
|
|
@@ -313,20 +222,15 @@ function getRePortRangeArr() {
|
|
|
* 清空查询条件
|
|
|
*/
|
|
|
function cleanParams() {
|
|
|
- $("#queryScopeSearch").val(0);
|
|
|
- $('#queryScopeSearch').selectpicker('refresh');
|
|
|
- $('#reportrange span').html(moment().subtract(1, 'days').format("YYYY-MM-DD 14:00:00") + ' - ' + moment().format("YYYY-MM-DD 13:59:59"));
|
|
|
- $('#unitCodeSearch').empty();
|
|
|
- $('#drugFlagSearch').val(0);
|
|
|
- $('#qbtj_table').show();
|
|
|
- $('#jmtj_table').hide();
|
|
|
+ $("#classMethod").val(0);
|
|
|
+ $('#classMethod').selectpicker('refresh');
|
|
|
+ $("#statisticalMethod").val(0);
|
|
|
+ $('#statisticalMethod').selectpicker('refresh');
|
|
|
+ $('#reportrange span').html(moment().subtract(1, 'days').format("YYYY-MM-DD 00:00:00") + ' - ' + moment().subtract(1, 'days').format("YYYY-MM-DD 23:59:59"));
|
|
|
+ $('#sum_table').show();
|
|
|
+ $('#detailed_table').hide();
|
|
|
$('.sjh').remove();
|
|
|
- $('#drugFlagSearch').selectpicker('refresh');
|
|
|
- $("#unitCodeSearch").html('');
|
|
|
- $("#unitCodeSearch").selectpicker('refresh');
|
|
|
- $('#searchTextDrug').empty();
|
|
|
- $('#codeSearch').empty();
|
|
|
- $('#serialSearch').empty();
|
|
|
+ $('.title').html('药品购入统计表(供应商)');
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -336,14 +240,14 @@ function print() {
|
|
|
setDefaultPrint();
|
|
|
LODOP = getLodop();
|
|
|
LODOP.PRINT_INITA(6, 0, "210mm", "297mm", "药品发放统计表");
|
|
|
- LODOP.SET_PRINT_PAGESIZE(2, 0, 0, "A4");
|
|
|
+ LODOP.SET_PRINT_PAGESIZE(1, 0, 0, "A4");
|
|
|
//设置默认打印机
|
|
|
LODOP.SET_PRINTER_INDEX(defaultPrintIndex);
|
|
|
LODOP.SET_PRINT_STYLE("FontSize", 10); //字体大小
|
|
|
LODOP.SET_PRINT_STYLEA(0, "ItemType", 2);
|
|
|
//设置默认打印机
|
|
|
LODOP.SET_PRINTER_INDEX(defaultPrintIndex);
|
|
|
- LODOP.ADD_PRINT_TEXT('200mm', '140mm', '40mm', '40mm', '第#页/共&页');
|
|
|
+ LODOP.ADD_PRINT_TEXT('280mm', '100mm', '40mm', '40mm', '第#页/共&页');
|
|
|
LODOP.SET_PRINT_STYLEA(0, "ItemType", 2);
|
|
|
var strStyle = "<style>table,td,th {border-width: 1px;" +
|
|
|
"border-style: solid;border-collapse: collapse;table-layout:fixed;word-wrap:break-word;font-size: 14px}</style>";
|
|
@@ -351,79 +255,3 @@ function print() {
|
|
|
LODOP.PRINT();
|
|
|
//LODOP.PREVIEW();
|
|
|
}
|
|
|
-
|
|
|
-/**
|
|
|
- * 统计列表查询参数
|
|
|
- */
|
|
|
-function queryParams() {
|
|
|
- let drugFlags = new Array();
|
|
|
- let flag = $("#drugFlagSearch").val();
|
|
|
- if (flag == 1) {
|
|
|
- drugFlags[0] = 2;
|
|
|
- drugFlags[1] = 3;
|
|
|
- drugFlags[2] = 5;
|
|
|
- } else if (flag == 2) {
|
|
|
- drugFlags[0] = 6;
|
|
|
- } else if (flag == 3) {
|
|
|
- drugFlags[0] = 1;
|
|
|
- drugFlags[1] = 4;
|
|
|
- }
|
|
|
- var temp = {
|
|
|
- beginDate: getRePortRangeArr()[0],
|
|
|
- endDate: getRePortRangeArr()[1],
|
|
|
- chargeItemCode: $('#codeSearch').val(),
|
|
|
- unitCode: $('#unitCodeSearch').val() != null ? $('#unitCodeSearch').val()[0] : '',
|
|
|
- drugFlags: drugFlags,
|
|
|
- queryScope: $("#queryScopeSearch").val()
|
|
|
- };
|
|
|
- return temp;
|
|
|
-}
|
|
|
-
|
|
|
-function init_daterangepickertime() {
|
|
|
- if (typeof ($.fn.daterangepicker) === 'undefined') {
|
|
|
- return;
|
|
|
- }
|
|
|
- var optionSet1 = {
|
|
|
- startDate: moment().subtract(1, 'days').format("YYYY-MM-DD 00:00:00"),
|
|
|
- endDate: moment().subtract(1, 'days').format("YYYY-MM-DD 23:59:59"),
|
|
|
- minDate: '2012-01-01',
|
|
|
- maxDate: nowString() + ' 23:59:59',
|
|
|
- /*dateLimit: {
|
|
|
- days: 1200
|
|
|
- },//起止时间的最大间隔*/
|
|
|
- showDropdowns: true,
|
|
|
- showWeekNumbers: true,
|
|
|
- ranges: {
|
|
|
- '今天': [moment(), moment()],
|
|
|
- '昨天': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
|
|
- '最近7天': [moment().subtract(6, 'days'), moment()],
|
|
|
- '最近30天': [moment().subtract(29, 'days'), moment()],
|
|
|
- '当月': [moment().startOf('month'), moment().endOf('month')],
|
|
|
- '上个月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
|
|
- },
|
|
|
- opens: 'right',
|
|
|
- buttonClasses: ['btn btn-default'],
|
|
|
- applyClass: 'btn-small btn-primary',
|
|
|
- cancelClass: 'btn-small',
|
|
|
- timePicker: true, //显示时间
|
|
|
- timePicker24Hour: true, //时间制
|
|
|
- timePickerSeconds: true, //时间显示到秒
|
|
|
- timePickerIncrement: 1,
|
|
|
- format: 'YYYY-MM-DD HH:mm:ss',
|
|
|
- separator: ' to ',
|
|
|
- locale: {
|
|
|
- applyLabel: '确定',
|
|
|
- cancelLabel: '取消',
|
|
|
- fromLabel: 'From',
|
|
|
- toLabel: 'To',
|
|
|
- customRangeLabel: '自定义',
|
|
|
- daysOfWeek: ['天', '一', '二', '三', '四', '五', '六'],
|
|
|
- monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
|
|
|
- firstDay: 1
|
|
|
- }
|
|
|
- };
|
|
|
- $('#reportrange').daterangepicker(optionSet1, function (start, end, label) {
|
|
|
- $('#reportrange span').html(start.format('YYYY-MM-DD HH:mm:ss') + ' - ' + end.format('YYYY-MM-DD HH:mm:ss'));
|
|
|
- });
|
|
|
- $('#reportrange span').html(moment().subtract(1, 'days').format("YYYY-MM-DD 00:00:00") + ' - ' + moment().subtract(1, 'days').format("YYYY-MM-DD 23:59:59"));
|
|
|
-}
|