|
@@ -473,7 +473,7 @@ $(function () {
|
|
|
var tableData = $("#tb_table_western_medicine").bootstrapTable('getData');
|
|
|
if (tableData != null && tableData.length > 0 && dataIndex != null) {
|
|
|
var trData = tableData[dataIndex];
|
|
|
- checkYpInfo(trData.code, trData.serial, trData.ypType, true);
|
|
|
+ checkYpInfo(trData.code, trData.serial, trData.ypType, true,null);
|
|
|
$("#western_medicine_name").click();
|
|
|
}
|
|
|
} else {
|
|
@@ -2489,7 +2489,7 @@ function editPrescription(jsonData, type) {
|
|
|
$("#groupId").selectpicker('val', groupOrder);
|
|
|
$('#groupId').selectpicker('refresh');
|
|
|
|
|
|
- checkYpInfo(code, serial, groupNo, false);
|
|
|
+ checkYpInfo(code, serial, groupNo, false,mzChargeDetail.orderNo);
|
|
|
// 给药方式 同组药品给药方式相同
|
|
|
$("#supplyType").selectpicker('val', mzChargeDetail.supplyCode);
|
|
|
$('#supplyType').selectpicker('refresh');
|
|
@@ -4438,18 +4438,6 @@ function calculateTotalAmount() {
|
|
|
$(arrs[i]).html(res.data.amountList[i].toFixed(1));
|
|
|
}
|
|
|
}
|
|
|
- // var arrs = $("#xyTabContent").find("span.cf_amount");
|
|
|
- // for (var i = 0; i < arrs.length; i++) {
|
|
|
- // $(arrs[i]).html(res.data.xyAmount.toFixed(1));
|
|
|
- // }
|
|
|
- // $("#zyTabContent").find("span.cf_amount").html(res.data.zyAmount.toFixed(1));
|
|
|
- // if (res.data.yjAmount != null) {
|
|
|
- // //如果
|
|
|
- // if ($("#zlTab").find("li") == null || $("#zlTab").find("li").length == 0) {
|
|
|
- // initNavTabs(2);
|
|
|
- // }
|
|
|
- // $("#zlTabContent").find("span.cf_amount").html(res.data.yjAmount.toFixed(1));
|
|
|
- // }
|
|
|
} else {
|
|
|
errorMesage(res);
|
|
|
}
|
|
@@ -5510,7 +5498,7 @@ function loadYpList(index, event) {
|
|
|
onClickRow: function (row, $element) {
|
|
|
$('#' + MedicineName).webuiPopover('hide');
|
|
|
if (index == 0) {
|
|
|
- checkYpInfo(row.code, row.serial, row.ypType, true);
|
|
|
+ checkYpInfo(row.code, row.serial, row.ypType, true,null);
|
|
|
}
|
|
|
if (index == 1) {
|
|
|
checkZyInfo(row.code, row.serial, true);
|
|
@@ -5526,8 +5514,9 @@ function loadYpList(index, event) {
|
|
|
* @param serial
|
|
|
* @param groupNo
|
|
|
* @param needNotice 是否需要提示 当用户操作的时候 true 需要提示, 范文和处方回写的时候false不需要提示
|
|
|
+ * @param orderNo 处方号,回写的时候需要用,因为有的处方没有满5个
|
|
|
*/
|
|
|
-function checkYpInfo(code, serial, groupNo, needNotice) {
|
|
|
+function checkYpInfo(code, serial, groupNo, needNotice,orderNo) {
|
|
|
//判断是否有重复的项目 返回true 说明有重复的
|
|
|
if (verifyRepeat(code, serial, null, 0)) {
|
|
|
return;
|
|
@@ -5630,8 +5619,20 @@ function checkYpInfo(code, serial, groupNo, needNotice) {
|
|
|
}
|
|
|
//当前编辑的处方非普通西药处方
|
|
|
} else {
|
|
|
- $("#xyTab li.active").find("a").find("small.cfdesc").text("(" + cfdesc + ")");
|
|
|
- fitWesternMedicine(res, groupNo);
|
|
|
+ //修改药品
|
|
|
+ if(orderNo!=null){
|
|
|
+ //西药处方数量
|
|
|
+ var xyTabLiLength=$("#xyTab li").length;
|
|
|
+ if(xyTabLiLength<orderNo){
|
|
|
+ refreshNavTabs(0, groupNo);
|
|
|
+ }else {
|
|
|
+ $("#xyTab li.active").find("a").find("small.cfdesc").text("(" + cfdesc + ")");
|
|
|
+ }
|
|
|
+ fitWesternMedicine(res, groupNo);
|
|
|
+ }else {
|
|
|
+ $("#xyTab li.active").find("a").find("small.cfdesc").text("(" + cfdesc + ")");
|
|
|
+ fitWesternMedicine(res, groupNo);
|
|
|
+ }
|
|
|
}
|
|
|
// if (needNotice) {
|
|
|
// //选中药品后,光标默认到用法
|