|
|
@@ -3,6 +3,8 @@
|
|
|
var msg_list_loading = false;
|
|
|
//挂号卡片列表页面下标
|
|
|
var pageIndex = 0;
|
|
|
+//药品使用方法,天数和频次的集合
|
|
|
+var groupIdMap = null;
|
|
|
$(function () {
|
|
|
initGenderSelect();
|
|
|
initResponceTypeSelect();
|
|
|
@@ -154,6 +156,7 @@ function initGroupOrder() {
|
|
|
$('#groupId').selectpicker('refresh');
|
|
|
$("#groupId").selectpicker('val', 1);
|
|
|
$('#groupId').selectpicker('refresh');
|
|
|
+ groupIdMap = new Map();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -168,8 +171,39 @@ function appendGroupOrder() {
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
- * 关闭只能问诊弹框
|
|
|
+ * 组号改变事件
|
|
|
+ */
|
|
|
+function groupIdChange() {
|
|
|
+ var last = parseInt($("#groupId > option:last").val());
|
|
|
+ var groupId = $("#groupId").val();
|
|
|
+ if (groupId == last) {
|
|
|
+ clearWesternMedicine(true);
|
|
|
+ } else {
|
|
|
+ var map = groupIdMap.get(groupId);
|
|
|
+ if (map != null) {
|
|
|
+ var supplyType = map.get("supplyType");
|
|
|
+ var orderFrequency = map.get("orderFrequency");
|
|
|
+ var dayNum = map.get("dayNum");
|
|
|
+ //用法编码
|
|
|
+ $("#supplyType").selectpicker('val', supplyType);
|
|
|
+ $('#supplyType').selectpicker('refresh');
|
|
|
+ //$("#supplyType").attr("disabled", "disabled");
|
|
|
+ //天数
|
|
|
+ $("#dayNum").selectpicker('val', dayNum);
|
|
|
+ $('#dayNum').selectpicker('refresh');
|
|
|
+ // $("#dayNum").attr("disabled", "disabled");
|
|
|
+ //频次编码
|
|
|
+ $("#orderFrequency").selectpicker('val', orderFrequency);
|
|
|
+ $('#orderFrequency').selectpicker('refresh');
|
|
|
+ // $("#orderFrequency").attr("disabled", "disabled");
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 关闭智能问诊弹框
|
|
|
*/
|
|
|
function closePopover() {
|
|
|
//$(".popover").popover('hide');
|
|
|
@@ -1302,7 +1336,7 @@ function initSupplyTypes() {
|
|
|
var html = '';
|
|
|
$.each(res.data, function (commentIndex, comment) {
|
|
|
if (comment.groupNo === "71") {
|
|
|
- html += '<option value="' + comment.code + '">' + comment.name + '('+comment.pyCode+')'+'</option>';
|
|
|
+ html += '<option value="' + comment.code + '">' + comment.name + '(' + comment.pyCode + ')' + '</option>';
|
|
|
}
|
|
|
});
|
|
|
$('#supplyType').empty();
|
|
|
@@ -1331,7 +1365,7 @@ function initZySupplyTypes(id) {
|
|
|
$.each(res.data, function (commentIndex, comment) {
|
|
|
if (comment.groupNo === "81") {
|
|
|
// html += '<option value="' + comment.code + '">' + comment.name + '</option>';
|
|
|
- html += '<option value="' + comment.code + '">' + comment.name + '('+comment.pyCode+')'+'</option>';
|
|
|
+ html += '<option value="' + comment.code + '">' + comment.name + '(' + comment.pyCode + ')' + '</option>';
|
|
|
}
|
|
|
});
|
|
|
$('#' + id).empty();
|
|
|
@@ -1396,23 +1430,14 @@ function saveMedicine(index) {
|
|
|
$("#messageButton").off("click").on("click", function (t) {
|
|
|
$("#messageModal").modal("hide");
|
|
|
refreshNavTabs(index);
|
|
|
- if (index == 0) {
|
|
|
- saveWesternMedicine();
|
|
|
- } else if (index == 1) {
|
|
|
-
|
|
|
- } else if (index == 2) {
|
|
|
-
|
|
|
- }
|
|
|
+ saveWesternMedicine();
|
|
|
});
|
|
|
} else {
|
|
|
saveWesternMedicine();
|
|
|
}
|
|
|
} else if (index == 1) {
|
|
|
saveChineseMedicine();
|
|
|
- } else if (index == 2) {
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -1452,6 +1477,10 @@ function saveWesternMedicine() {
|
|
|
var medicalAdvice = $("#medicalAdvice").val();
|
|
|
//金额
|
|
|
var totalRetprice = parseFloat($("#totalRetprice").val());
|
|
|
+ if (currentCode == null || currentCode == '') {
|
|
|
+ errorMesageSimaple("未选择任何药品!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
var html = '<div class="form-group">';
|
|
|
html += groupId + '. ';
|
|
|
html += westernMedicineNamme + ' ';
|
|
|
@@ -1466,6 +1495,9 @@ function saveWesternMedicine() {
|
|
|
}
|
|
|
html += ' <i class="fa fa-long-arrow-left" style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>';
|
|
|
html += '<i class="fa fa-remove" style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>';
|
|
|
+ html += '<input type="hidden" class="temporary_items_code" value="' + currentCode + '"/>';
|
|
|
+ html += '<input type="hidden" class="temporary_items_serial" value="' + currentSerial + '"/>';
|
|
|
+ html += '<input type="hidden" class="temporary_items_amount" value="' + totalRetprice + '"/>';
|
|
|
html += '</div>';
|
|
|
|
|
|
var tableId = $("#xyTab li.active").find("a").attr("href");
|
|
|
@@ -1484,23 +1516,94 @@ function saveWesternMedicine() {
|
|
|
if (groupId === groupIdLast) {
|
|
|
appendGroupOrder();
|
|
|
}
|
|
|
- clearWesternMedicine();
|
|
|
+ //设置药品的用法,频次,天数
|
|
|
+ var map = groupIdMap.get(groupId);
|
|
|
+ if (map == null) {
|
|
|
+ map = new Map();
|
|
|
+ map.put("supplyType", supplyType);
|
|
|
+ map.put("orderFrequency", orderFrequency);
|
|
|
+ map.put("dayNum", dayNum);
|
|
|
+ groupIdMap.put(groupId, map);
|
|
|
+ }
|
|
|
+ clearWesternMedicine(false);
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 保存当前项目到右边处方区域
|
|
|
+ * @param
|
|
|
+ */
|
|
|
+function saveJyJcItem() {
|
|
|
+ var tableId = $("#zlTab li.active").find("a").attr("href");
|
|
|
+ //组号
|
|
|
+ var groupId = $(tableId).find("div:eq(0)").children().length + 1;
|
|
|
+ //药品名称
|
|
|
+ var jcJyItem = $("#jcJyItem").val();
|
|
|
+ //当前药品编码
|
|
|
+ var currentCode = $("#current_code").val();
|
|
|
+ //当前项目价格
|
|
|
+ var jcjyItemPrice = $("#jcjyItemPrice").val();
|
|
|
+ //备注
|
|
|
+ var remark = $("#remark").val();
|
|
|
+ if (currentCode == null || currentCode == '') {
|
|
|
+ errorMesageSimaple("未选择任何项目!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var html = '<div class="form-group">';
|
|
|
+ html += groupId + '. ';
|
|
|
+ html += jcJyItem + ' ';
|
|
|
+ if (remark != null && remark != '') {
|
|
|
+ html += '备注:' + remark;
|
|
|
+ }
|
|
|
+ html += ' <i class="fa fa-long-arrow-left" style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>';
|
|
|
+ html += '<i class="fa fa-remove" style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>';
|
|
|
+ html += '<i class="fa fa-eye" style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;" onclick="getJcJyItemChargeByCode(\'' + currentCode + '\')"></i>';
|
|
|
+ html += '<input type="hidden" class="temporary_items_code" value="' + currentCode + '"/>';
|
|
|
+ html += '<input type="hidden" class="temporary_items_amount" value="' + jcjyItemPrice + '"/>';
|
|
|
+ html += '</div>';
|
|
|
+ $(tableId).find("div:eq(0)").append(html);
|
|
|
+ //设置单张处方金额
|
|
|
+ var cfAmount = $(tableId).find("span.cf_amount").html();
|
|
|
+ if (cfAmount != null && cfAmount != "") {
|
|
|
+ cfAmount = parseFloat($(tableId).find("span.cf_amount").html());
|
|
|
+ }
|
|
|
+ cfAmount = Add(cfAmount, jcjyItemPrice);
|
|
|
+ $(tableId).find("span.cf_amount").html(cfAmount);
|
|
|
+ //设置总金额
|
|
|
+ calculateTotalAmount();
|
|
|
+ clearJyJcItem();
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 清空西药
|
|
|
+ * @param flag 是否全部清空 因为 西药有分组,同一组的药品用药方式和频率以及天数一样,不能改变。所以不换组是不能改变 并且设置成不可编辑
|
|
|
*/
|
|
|
-function clearWesternMedicine() {
|
|
|
+function clearWesternMedicine(flag) {
|
|
|
//药品名称
|
|
|
$("#western_medicine_name").val(null);
|
|
|
//当前药品编码
|
|
|
$("#current_code").val(null);
|
|
|
//当前药品规格
|
|
|
$("#current_serial").val(null);
|
|
|
- //用法编码
|
|
|
- $("#supplyType").selectpicker('val', null);
|
|
|
- $('#supplyType').selectpicker('refresh');
|
|
|
+ if (flag) {
|
|
|
+ //用法编码
|
|
|
+ $("#supplyType").selectpicker('val', null);
|
|
|
+ $('#supplyType').selectpicker('refresh');
|
|
|
+ //$("#supplyType").removeAttr("disabled");
|
|
|
+ //天数
|
|
|
+ $("#dayNum").selectpicker('val', null);
|
|
|
+ $('#dayNum').selectpicker('refresh');
|
|
|
+ // $("#dayNum").removeAttr("disabled");
|
|
|
+ //频次编码
|
|
|
+ $("#orderFrequency").selectpicker('val', null);
|
|
|
+ $('#orderFrequency').selectpicker('refresh');
|
|
|
+ // $("#orderFrequency").removeAttr("disabled");
|
|
|
+ } else {
|
|
|
+ //$("#supplyType").attr("disabled", "disabled");
|
|
|
+ //$("#dayNum").attr("disabled", "disabled");
|
|
|
+ // $("#orderFrequency").attr("disabled", "disabled");
|
|
|
+ }
|
|
|
//药品默认单次使用剂量
|
|
|
$("#drugWinDb").val(null);
|
|
|
//处方实际单次使用剂量
|
|
|
@@ -1508,12 +1611,6 @@ function clearWesternMedicine() {
|
|
|
//剂量单位
|
|
|
$("#drugWinUnit").selectpicker('val', null);
|
|
|
$('#drugWinUnit').selectpicker('refresh');
|
|
|
- //天数
|
|
|
- $("#dayNum").selectpicker('val', null);
|
|
|
- $('#dayNum').selectpicker('refresh');
|
|
|
- //频次编码
|
|
|
- $("#orderFrequency").selectpicker('val', null);
|
|
|
- $('#orderFrequency').selectpicker('refresh');
|
|
|
//总量
|
|
|
$("#gross").val(null);
|
|
|
//包装单位
|
|
|
@@ -1546,6 +1643,12 @@ function saveChineseMedicine() {
|
|
|
var zyInstructionText = $('#zyInstruction option:selected').text();
|
|
|
//单价
|
|
|
var zyPackRetprice = parseFloat($("#zy_packRetprice").val());
|
|
|
+ //当前中药的总价
|
|
|
+ var totalRetprice = Multiply(drugWin, zyPackRetprice);
|
|
|
+ if (currentCode == null || currentCode == '') {
|
|
|
+ errorMesageSimaple("未选择任何药品!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
var html = '<div class="form-group" style="float: left;">';
|
|
|
html += chineseMedicineNamme;
|
|
|
if (zyInstruction != null && zyInstruction != '') {
|
|
|
@@ -1555,12 +1658,13 @@ function saveChineseMedicine() {
|
|
|
html += drugWin + 'g';
|
|
|
html += ' <i class="fa fa-long-arrow-left" style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>';
|
|
|
html += '<i class="fa fa-remove" style="cursor: pointer;height: 20px;line-height: 20px;width: 30px;font-size: 20px;"></i>';
|
|
|
+ html += '<input type="hidden" class="temporary_items_code" value="' + currentCode + '"/>';
|
|
|
+ html += '<input type="hidden" class="temporary_items_serial" value="' + currentSerial + '"/>';
|
|
|
+ html += '<input type="hidden" class="temporary_items_amount" value="' + totalRetprice + '"/>';
|
|
|
html += '</div>';
|
|
|
|
|
|
var tableId = $("#zyTab li.active").find("a").attr("href");
|
|
|
$(tableId).find("div:eq(0)").append(html);
|
|
|
- //当前中药的总价
|
|
|
- var totalRetprice = Multiply(drugWin, zyPackRetprice);
|
|
|
//获取中药付数
|
|
|
var zyfs = $(tableId).find("input.zyfs").val();
|
|
|
//当前处方单付金额
|
|
|
@@ -1598,6 +1702,21 @@ function clearChineseMedicine() {
|
|
|
$("#zy_packRetprice").val(null);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+/**
|
|
|
+ * 清空项目
|
|
|
+ */
|
|
|
+function clearJyJcItem() {
|
|
|
+ //项目名称
|
|
|
+ $("#jcJyItem").val(null);
|
|
|
+ //当前项目编码
|
|
|
+ $("#current_code").val(null);
|
|
|
+ //单价
|
|
|
+ $("#jcjyItemPrice").val(null);
|
|
|
+ //备注
|
|
|
+ $("#remark").val(null);
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* 计算总金额
|
|
|
*/
|
|
|
@@ -2417,7 +2536,7 @@ function fitValue(value, id) {
|
|
|
var arr = value.split("/");
|
|
|
$("#pressure_high").val(arr[0]);
|
|
|
$("#pressure_floor").val(arr[1]);
|
|
|
- if($("#pressureLeftFlag").hasClass("in")){
|
|
|
+ if ($("#pressureLeftFlag").hasClass("in")) {
|
|
|
$("#pressure_high_left").val(arr[0]);
|
|
|
$("#pressure_floor_left").val(arr[1]);
|
|
|
}
|
|
|
@@ -2593,13 +2712,16 @@ function loadYpList(index) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 按照药品的编码 和药品拆零规格查询药品信息 西药
|
|
|
* @param code
|
|
|
* @param serial
|
|
|
*/
|
|
|
function checkYpInfo(code, serial) {
|
|
|
+ //判断是否有重复的项目 返回true 说明有重复的
|
|
|
+ if (verifyRepeat(code, serial, 0)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
url: '/thmz/getYpZdDictByCodeAndSerial?code=' + code + "&serial=" + serial,
|
|
|
@@ -2642,6 +2764,10 @@ function checkYpInfo(code, serial) {
|
|
|
* @param serial
|
|
|
*/
|
|
|
function checkZyInfo(code, serial) {
|
|
|
+ //判断是否有重复的项目 返回true 说明有重复的
|
|
|
+ if (verifyRepeat(code, serial, 1)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
url: '/thmz/getYpZdDictByCodeAndSerial?code=' + code + "&serial=" + serial,
|
|
|
@@ -2670,7 +2796,6 @@ function checkZyInfo(code, serial) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 加载医技与诊疗列表
|
|
|
* @param index
|
|
|
@@ -2759,12 +2884,228 @@ function loadjcJyItemList() {
|
|
|
},
|
|
|
onClickRow: function (row, $element) {
|
|
|
$('#jcJyItem').webuiPopover('hide');
|
|
|
- // checkYpInfo(row.code, row.serial);
|
|
|
+ checkJcJyItemInfo(row.code, row.name);
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 诊疗与医技选中
|
|
|
+ * @param code
|
|
|
+ */
|
|
|
+function checkJcJyItemInfo(code, name) {
|
|
|
+ //判断是否有重复的项目 返回true 说明有重复的
|
|
|
+ if (verifyRepeat(code, null, 2)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $.ajax({
|
|
|
+ type: "GET",
|
|
|
+ url: '/thmz/getJcJyItemChargeByCode?code=' + code,
|
|
|
+ contentType: "application/json;charset=UTF-8",
|
|
|
+ dataType: "json",
|
|
|
+ headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
+ success: function (res) {
|
|
|
+ if (res == '401' || res == 401) {
|
|
|
+ window.location.href = '/thmz/login/view'
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (res.code == 0) {
|
|
|
+ if (res.data != null) {
|
|
|
+ $("#jcJyItem").val(name);
|
|
|
+ $("#jcJyItem").blur();
|
|
|
+ $("#jcjyItemPrice").val(res.totalAmount);
|
|
|
+ $("#current_code").val(code);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ errorMesage(res);
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
+/**
|
|
|
+ * 查询诊疗与医技项目明细
|
|
|
+ * @param code 编码
|
|
|
+ */
|
|
|
+function getJcJyItemChargeByCode(code) {
|
|
|
+ if (code != null) {
|
|
|
+ $("#itemCodeSearch").val(code);
|
|
|
+ } else if ($("#current_code").val() == null || $("#current_code").val() == '') {
|
|
|
+ errorMesageSimaple("未选中任何项目!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $("#jcJyItemModal").modal("show");
|
|
|
+ $('#jcJyItemTable').bootstrapTable('refresh');
|
|
|
+ $('#jcJyItemTable').bootstrapTable({
|
|
|
+ url: '/thmz/getJcJyItemChargeByCode', //请求后台的URL(*)
|
|
|
+ method: 'GET', //请求方式(*)
|
|
|
+ toolbar: '#toolbar', //工具按钮用哪个容器
|
|
|
+ striped: true, //是否显示行间隔色
|
|
|
+ cache: true, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
|
|
|
+ pagination: false, //是否显示分页(*)
|
|
|
+ sortable: true, //是否启用排序
|
|
|
+ sortOrder: "asc", //排序方式
|
|
|
+ queryParams: function (params) {
|
|
|
+ var itemCodeSearch = $("#itemCodeSearch").val()
|
|
|
+ if (itemCodeSearch == null || itemCodeSearch == "") {
|
|
|
+ itemCodeSearch = $("#current_code").val();
|
|
|
+ }
|
|
|
+ var temp = {
|
|
|
+ code: itemCodeSearch
|
|
|
+ };
|
|
|
+ return temp;
|
|
|
+ }, //传递参数(*)
|
|
|
+ sidePagination: "server", //分页方式:client客户端分页,server服务端分页(*)
|
|
|
+ pageNumber: 1, //初始化加载第一页,默认第一页
|
|
|
+ pageSize: 5, //每页的记录行数(*)
|
|
|
+ pageList: [5, 10, 25, 50, 100], //可供选择的每页的行数(*)
|
|
|
+ search: false, //是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大
|
|
|
+ strictSearch: true,
|
|
|
+ showColumns: false, //是否显示所有的列
|
|
|
+ showRefresh: false, //是否显示刷新按钮
|
|
|
+ minimumCountColumns: 2, //最少允许的列数
|
|
|
+ clickToSelect: true, //是否启用点击选中行
|
|
|
+ uniqueId: "ID", //每一行的唯一标识,一般为主键列
|
|
|
+ showToggle: false, //是否显示详细视图和列表视图的切换按钮
|
|
|
+ cardView: false, //是否显示详细视图
|
|
|
+ detailView: false,
|
|
|
+ //rowStyle:rowStyle,//通过自定义函数设置行样式
|
|
|
+ ajaxOptions: {
|
|
|
+ headers: {
|
|
|
+ 'Accept': 'application/json',
|
|
|
+ 'Authorization': 'Bearer ' + localStorage.getItem("token")
|
|
|
+ }
|
|
|
+ },
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ title: '项目编码',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle',
|
|
|
+ // sortable: true
|
|
|
+ formatter: function (value, row, index) {
|
|
|
+ if (code == null || code == "") {
|
|
|
+ code = $("#current_code").val();
|
|
|
+ }
|
|
|
+ return code;
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ field: 'code',
|
|
|
+ title: '收费编码',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle',
|
|
|
+ // sortable: true
|
|
|
+ }
|
|
|
+ , {
|
|
|
+ field: 'name',
|
|
|
+ title: '收费名称',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle',
|
|
|
+ // sortable: true
|
|
|
+ }, {
|
|
|
+ field: 'num',
|
|
|
+ title: '数量',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle',
|
|
|
+ // sortable: true
|
|
|
+ }, {
|
|
|
+ field: 'chargeAmount',
|
|
|
+ title: '单价',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle',
|
|
|
+ // sortable: true
|
|
|
+ formatter: function (value, row, index) {
|
|
|
+ if (value == null || value == "") {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ return value.toFixed(2);
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ field: 'totalAmount',
|
|
|
+ title: '总金额',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle',
|
|
|
+ // sortable: true
|
|
|
+ formatter: function (value, row, index) {
|
|
|
+ if (value == null || value == "") {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ return value.toFixed(2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ responseHandler: function (res) {
|
|
|
+ if (res == '401' || res == 401) {
|
|
|
+ window.location.href = '/thmz/login/view'
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $("#itemCodeSearch").val(null);
|
|
|
+ var ress = eval(res);
|
|
|
+ if (ress.code == -1) {
|
|
|
+ errorMesage(res);
|
|
|
+ return {
|
|
|
+ "total": 0,//总页数
|
|
|
+ "rows": {} //数据
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
+ return {
|
|
|
+ "total": ress.data.length,//总页数
|
|
|
+ "rows": ress.data //数据
|
|
|
+ };
|
|
|
+ },
|
|
|
+ onClickRow: function (row, $element) {
|
|
|
+ $('#jcJyItem').webuiPopover('hide');
|
|
|
+ checkJcJyItemInfo(row.code);
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 判断是否有重复的项目 返回true 说明有重复的
|
|
|
+ * @param code
|
|
|
+ * @param serial
|
|
|
+ * @param index
|
|
|
+ */
|
|
|
+function verifyRepeat(code, serial, index) {
|
|
|
+ var tabId = null;
|
|
|
+ //西药
|
|
|
+ if (index == 0) {
|
|
|
+ tabId = "xyTab";
|
|
|
+ } else if (index == 1) {
|
|
|
+ //中成药
|
|
|
+ tabId = "zyTab";
|
|
|
+ } else if (index == 2) {
|
|
|
+ //医技与诊疗
|
|
|
+ tabId = "zlTab";
|
|
|
+ }
|
|
|
+ var tableId = $("#" + tabId + " li.active").find("a").attr("href");
|
|
|
+ var items = $(tableId).find("div:eq(0)").find("div.form-group");
|
|
|
+ if (items != null && items.length > 0) {
|
|
|
+ for (var i = 0; i < items.length; i++) {
|
|
|
+ if (serial == null) {
|
|
|
+ var temporary_items_code = $(items[i]).find("input.temporary_items_code").val();
|
|
|
+ if (code === temporary_items_code) {
|
|
|
+ errorMesageSimaple("项目与第" + numToChineseNum(i + 1) + "条重复");
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ var temporary_items_code = $(items[i]).find("input.temporary_items_code").val();
|
|
|
+ var temporary_items_serial = $(items[i]).find("input.temporary_items_serial").val();
|
|
|
+ if (code === temporary_items_code && serial === temporary_items_serial) {
|
|
|
+ errorMesageSimaple("项目与第" + numToChineseNum(i + 1) + "条重复");
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 初始化处方分页
|
|
|
* @param index 0 西药 1 中药 2 诊疗
|
|
|
@@ -2948,6 +3289,7 @@ function fitWesternMedicine(res) {
|
|
|
$("#packSize").val(res.data.packSize);
|
|
|
$("#current_code").val(res.data.code);
|
|
|
$("#current_serial").val(res.data.serial);
|
|
|
+ calculate();
|
|
|
}
|
|
|
|
|
|
/**
|