|
|
@@ -2480,20 +2480,20 @@ function editPrescription(jsonData, type) {
|
|
|
}
|
|
|
callBackZlDetail(code, mzChargeDetail);
|
|
|
} else if (groupNo == "71" || groupNo == "91" || groupNo == "111" || groupNo == "131") {
|
|
|
- if (type != 0 && !isInArray(code + "_" + serial, xyArrays)) {
|
|
|
- continue;
|
|
|
- }
|
|
|
// 71 西成药 91 医材 111 精一 131 精二
|
|
|
var groupOrder = mzChargeDetail.groupOrder;
|
|
|
if (groupOrder == null || groupOrder == 'null' || groupOrder == "") {
|
|
|
groupOrder = 1;
|
|
|
}
|
|
|
+ if (type != 0 && !isInArray(code + "_" + serial + "_" + groupOrder, xyArrays)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
var lastGroupOrder = parseInt($("#groupId > option:last").val());
|
|
|
while (lastGroupOrder < groupOrder) {
|
|
|
appendGroupOrder();
|
|
|
lastGroupOrder = parseInt($("#groupId > option:last").val());
|
|
|
}
|
|
|
- appendGroupOrder()
|
|
|
+ //appendGroupOrder()
|
|
|
$("#groupId").selectpicker('val', groupOrder);
|
|
|
$('#groupId').selectpicker('refresh');
|
|
|
|
|
|
@@ -8128,31 +8128,31 @@ function setPrint() {
|
|
|
|
|
|
function setTableHtml(prescriptionDetail) {
|
|
|
//设置成组处方符号
|
|
|
- if(prescriptionDetail.length>1){
|
|
|
+ if (prescriptionDetail.length > 1) {
|
|
|
var map = new Map();
|
|
|
- var groupOrderlist =[];
|
|
|
+ var groupOrderlist = [];
|
|
|
for (var j = 0; j < prescriptionDetail.length; j++) {
|
|
|
var detail = prescriptionDetail[j];
|
|
|
var list = map.get(detail.groupOrder);
|
|
|
- if(list==null){
|
|
|
+ if (list == null) {
|
|
|
list = [];
|
|
|
- map.put(detail.groupOrder,list);
|
|
|
- groupOrderlist[groupOrderlist.length]=detail.groupOrder;
|
|
|
+ map.put(detail.groupOrder, list);
|
|
|
+ groupOrderlist[groupOrderlist.length] = detail.groupOrder;
|
|
|
}
|
|
|
- list[list.length]=detail;
|
|
|
+ list[list.length] = detail;
|
|
|
}
|
|
|
- for(var j=0;j<groupOrderlist.length;j++){
|
|
|
+ for (var j = 0; j < groupOrderlist.length; j++) {
|
|
|
var list = map.get(groupOrderlist[j]);
|
|
|
- if(list.length==1){
|
|
|
+ if (list.length == 1) {
|
|
|
continue;
|
|
|
}
|
|
|
- list[0].groupFlag="┒";
|
|
|
- list[list.length-1].groupFlag="┛";
|
|
|
- if(list.length>2){
|
|
|
- for(var t=1;t<list.length-1;t++){
|
|
|
- list[t].groupFlag="┃";
|
|
|
- }
|
|
|
- }
|
|
|
+ list[0].groupFlag = "┒";
|
|
|
+ list[list.length - 1].groupFlag = "┛";
|
|
|
+ if (list.length > 2) {
|
|
|
+ for (var t = 1; t < list.length - 1; t++) {
|
|
|
+ list[t].groupFlag = "┃";
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
var html = "";
|
|
|
@@ -8164,19 +8164,19 @@ function setTableHtml(prescriptionDetail) {
|
|
|
html += "</td>";
|
|
|
html += "<td colspan='2'></td>";
|
|
|
html += "<td>X</td>";
|
|
|
- html +="<td rowspan='2' style='height: 100%;line-height: 100%;font-size: 40px;'>";
|
|
|
- if(detail.groupFlag!=undefined && detail.groupFlag!=null){
|
|
|
- html +=detail.groupFlag;
|
|
|
+ html += "<td rowspan='2' style='height: 100%;line-height: 100%;font-size: 40px;'>";
|
|
|
+ if (detail.groupFlag != undefined && detail.groupFlag != null) {
|
|
|
+ html += detail.groupFlag;
|
|
|
}
|
|
|
html += "</td><td>" + detail.quantity + detail.packUnit + "</td>";
|
|
|
html += "</tr>";
|
|
|
html += "<tr><td></td>";
|
|
|
if (detail.tryResult != undefined && detail.tryResult != null && detail.tryResult != "null" && detail.tryResult != "") {
|
|
|
- html += "<td>" + detail.tryResult+"</td>";
|
|
|
- }else if (detail.tryFlag != undefined && detail.tryFlag != null && detail.tryFlag != "null" && detail.tryFlag != "") {
|
|
|
- html += "<td>" + detail.tryFlag+"</td>";
|
|
|
- }else {
|
|
|
- html+="<td></td>";
|
|
|
+ html += "<td>" + detail.tryResult + "</td>";
|
|
|
+ } else if (detail.tryFlag != undefined && detail.tryFlag != null && detail.tryFlag != "null" && detail.tryFlag != "") {
|
|
|
+ html += "<td>" + detail.tryFlag + "</td>";
|
|
|
+ } else {
|
|
|
+ html += "<td></td>";
|
|
|
}
|
|
|
html += "<td style='font-weight: bold;text-align: right;'>用法:</td>";
|
|
|
html += "<td>" + detail.drugQuan + detail.unitDesc + "/次</td>";
|
|
|
@@ -10069,9 +10069,13 @@ function siReadCard() {
|
|
|
*/
|
|
|
function xyTableOnClick(paneId) {
|
|
|
setTimeout(function () {
|
|
|
- $("#xyTabContent div").each(function (index, obj) {
|
|
|
- // $("#xyTab").find("a[href='#"+$(obj).attr("id")+"']").off("click").tab('show');
|
|
|
- if ($(obj).attr("id") == paneId) {
|
|
|
+ $("#xyTabContent div.tab-pane").each(function (index, obj) {
|
|
|
+ var targetId=$(obj).attr("id");
|
|
|
+ //如果处方内容是空的,就删除没有处方
|
|
|
+ if($(obj).find("div.cf_content").children().length==0){
|
|
|
+ $(obj).remove();
|
|
|
+ $("[href='#"+targetId+"']").parent().remove();
|
|
|
+ }else if (targetId == paneId) {
|
|
|
$(obj).addClass("active").addClass("in");
|
|
|
} else {
|
|
|
$(obj).removeClass("active").removeClass("in");
|