|
|
@@ -3839,6 +3839,30 @@ function saveWesternMedicineWithCheck(calculateTotalAmountFlag, orderNoParmams)
|
|
|
* calculateTotalAmountFlag 是否计算总金额 回写的时候一次计算
|
|
|
*/
|
|
|
function saveWesternMedicine(calculateTotalAmountFlag) {
|
|
|
+ //当前药房编码
|
|
|
+ var currentGroupNo = $("#current_groupNo").val();
|
|
|
+ //药品名称
|
|
|
+ var westernMedicineNamme = $("#western_medicine_name").val();
|
|
|
+ var tableId = $("#xyTab li.active").find("a").attr("href");
|
|
|
+ if(tableId==undefined){
|
|
|
+ refreshNavTabs(0, currentGroupNo, null);
|
|
|
+ tableId = $("#xyTab li.active").find("a").attr("href");
|
|
|
+ }
|
|
|
+ var thisGroupNo = $(tableId).find("input.current_groupNo").val();
|
|
|
+ if(currentGroupNo!=thisGroupNo){
|
|
|
+ //91 医材
|
|
|
+ var type="医材";
|
|
|
+ if (currentGroupNo == '71') {
|
|
|
+ type = "普通西成药"
|
|
|
+ } else if (currentGroupNo == '111') {
|
|
|
+ type = "麻、精一药物"
|
|
|
+ } else if (currentGroupNo == '131') {
|
|
|
+ type = "精二药物"
|
|
|
+ }
|
|
|
+ errorMesageSimaple("【"+westernMedicineNamme+"】是"+type+",无法保存到当前处方,请切换或者新增相应的处方进行保存。");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
//当前处方选项卡下标
|
|
|
var xyTabIndex = $("#xyTab li.active").index();
|
|
|
//组号
|
|
|
@@ -3865,14 +3889,10 @@ function saveWesternMedicine(calculateTotalAmountFlag) {
|
|
|
warningMesageSimaple("同一组药必须出现在同一个处方中,当前组号已经被其他处方使用,系统已自动为您重新分配组号!");
|
|
|
//return;
|
|
|
}
|
|
|
- //药品名称
|
|
|
- var westernMedicineNamme = $("#western_medicine_name").val();
|
|
|
//当前药品编码
|
|
|
var currentCode = $("#western_medicine_current_code").val();
|
|
|
//当前药品规格
|
|
|
var currentSerial = $("#western_medicine_current_serial").val();
|
|
|
- //当前药房编码
|
|
|
- var currentGroupNo = $("#current_groupNo").val();
|
|
|
//用法编码
|
|
|
var supplyType = $("#supplyType").val();
|
|
|
//用法描述
|
|
|
@@ -4843,6 +4863,22 @@ function removeYpOrProject(index, obj) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ var temporaryItemsGroupId= $(obj).parent().find("input.temporary_items_groupId").val();
|
|
|
+ var temporaryItemsGroupIds=$(obj).parent().parent().find("input.temporary_items_groupId");
|
|
|
+ if(temporaryItemsGroupIds!=null && temporaryItemsGroupIds.length>0){
|
|
|
+ var count=0;
|
|
|
+ for(var i=0;i<temporaryItemsGroupIds.length;i++){
|
|
|
+ if(temporaryItemsGroupId==$(temporaryItemsGroupIds[i]).val()){
|
|
|
+ count++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //当前删除的药品组号是最后一个的时候,清空缓存
|
|
|
+ if(count==1){
|
|
|
+ groupIdMap.remove(temporaryItemsGroupId);
|
|
|
+ gropuIdAndOrderNoMap.remove(temporaryItemsGroupId);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
$(obj).parent().remove();
|
|
|
if (index != 4) {
|
|
|
calculateTotalAmount(false);
|