|
@@ -3099,7 +3099,7 @@ function initTemplateKindTypeSelect(templateKindTypeId) {
|
|
|
function initOrderFrequencys(id, async) {
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
- url: '/thmz/getOrderFrequencys',
|
|
|
+ url: '/thmz/getXyOrderFrequencys',
|
|
|
dataType: "json",
|
|
|
headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
async: async,
|
|
@@ -3120,6 +3120,61 @@ function initOrderFrequencys(id, async) {
|
|
|
}
|
|
|
|
|
|
|
|
|
+/**
|
|
|
+ * 初始中药频次下拉选
|
|
|
+ * @param id
|
|
|
+ * @param async 是否是异步 true 异步 false 同步
|
|
|
+ */
|
|
|
+function initZyOrderFrequencys(id, async) {
|
|
|
+ $.ajax({
|
|
|
+ type: "GET",
|
|
|
+ url: '/thmz/getZyOrderFrequencys',
|
|
|
+ dataType: "json",
|
|
|
+ headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
+ async: async,
|
|
|
+ success: function (res) {
|
|
|
+ if (res == '401' || res == 401) {
|
|
|
+ window.location.href = '/thmz/login/view'
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var html = '';
|
|
|
+ $.each(res.data, function (commentIndex, comment) {
|
|
|
+ html += '<option value="' + comment.code + '" desc="' + comment.times + '">' + comment.name + '(' + comment.code + ')' + '</option>';
|
|
|
+ });
|
|
|
+ $('#' + id).empty();
|
|
|
+ $('#' + id).html(html);
|
|
|
+ $('#' + id).selectpicker('refresh');
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 初始中药服用说明
|
|
|
+ */
|
|
|
+function initAllMzYshZdFysm() {
|
|
|
+ $.ajax({
|
|
|
+ type: "GET",
|
|
|
+ url: '/thmz/getAllMzYshZdFysm',
|
|
|
+ dataType: "json",
|
|
|
+ headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
+ async: false,
|
|
|
+ success: function (res) {
|
|
|
+ if (res == '401' || res == 401) {
|
|
|
+ window.location.href = '/thmz/login/view'
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var html = '';
|
|
|
+ $.each(res.data, function (commentIndex, comment) {
|
|
|
+ html += '<option value="' + comment.code + '">' + comment.name + '</option>';
|
|
|
+ });
|
|
|
+ $('.useType').empty();
|
|
|
+ $('.useType').html(html);
|
|
|
+ $('.useType').selectpicker('refresh');
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* 初始用药方式下拉选
|
|
|
*/
|
|
@@ -5716,7 +5771,7 @@ function checkZyInfo(code, serial, async) {
|
|
|
//如果
|
|
|
if ($("#zyTab").find("li") == null || $("#zyTab").find("li").length == 0) {
|
|
|
initNavTabs(1);
|
|
|
- $("input.zyfs").val(1);
|
|
|
+ //$("input.zyfs").val(1);
|
|
|
}
|
|
|
$("#chinese_medicine_name").val(res.data.name);
|
|
|
$("#chinese_medicine_name").blur();
|
|
@@ -6394,13 +6449,14 @@ function initNavTabs(index) {
|
|
|
html += '</div></div></div>';
|
|
|
$("#" + tabContentId).html(html);
|
|
|
if (index == 1) {
|
|
|
- var useType = '<option value="1">饭前温服</option><option value="2">饭后温服</option><option value="3">饭前凉服</option><option value="4">饭后凉服</option><option value="5">顿服</option><option value="6">冲服</option><option value="7">外用</option>';
|
|
|
- $('.useType').html(useType);
|
|
|
- $('.useType').selectpicker('refresh');
|
|
|
+ // var useType = '<option value="1">饭前温服</option><option value="2">饭后温服</option><option value="3">饭前凉服</option><option value="4">饭后凉服</option><option value="5">顿服</option><option value="6">冲服</option><option value="7">外用</option>';
|
|
|
+ // $('.useType').html(useType);
|
|
|
+ // $('.useType').selectpicker('refresh');
|
|
|
var water = '<option value="加凉水">加凉水</option><option value="加温水">加温水</option><option value="加开水">加开水</option><option value="加冰水">加冰水</option><option value="加糖水">加糖水</option>';
|
|
|
$('.water').html(water);
|
|
|
$('.water').selectpicker('refresh');
|
|
|
- initOrderFrequencys("zy_orderFrequency_1", false);
|
|
|
+ initAllMzYshZdFysm();
|
|
|
+ initZyOrderFrequencys("zy_orderFrequency_1", false);
|
|
|
initZySupplyTypes("zy_supplyType_1", false);
|
|
|
|
|
|
}
|
|
@@ -7243,6 +7299,16 @@ function getParamsForpPrescription(type) {
|
|
|
if (zyTabContents != null && zyTabContents.length > 0) {
|
|
|
orderNo++;
|
|
|
var zyfs = $("input.zyfs").val();
|
|
|
+ if (zyfs == null || zyfs == "") {
|
|
|
+ if (type == 3) {
|
|
|
+ zyfs = 1;
|
|
|
+ } else {
|
|
|
+ errorMesageSimaple("中药付数为空,请设置!");
|
|
|
+ $("#messageButton").attr("disabled", false);
|
|
|
+ throw new Error('中药付数为空,请设置!');
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
//中药的类型
|
|
|
var currentZyClassType = $("#current_zyClassType").val();
|
|
|
for (var i = 0; i < zyTabContents.length; i++) {
|
|
@@ -10070,12 +10136,12 @@ function siReadCard() {
|
|
|
function xyTableOnClick(paneId) {
|
|
|
setTimeout(function () {
|
|
|
$("#xyTabContent div.tab-pane").each(function (index, obj) {
|
|
|
- var targetId=$(obj).attr("id");
|
|
|
+ var targetId = $(obj).attr("id");
|
|
|
//如果处方内容是空的,就删除没有处方
|
|
|
- if($(obj).find("div.cf_content").children().length==0){
|
|
|
+ if ($(obj).find("div.cf_content").children().length == 0) {
|
|
|
$(obj).remove();
|
|
|
- $("[href='#"+targetId+"']").parent().remove();
|
|
|
- }else if (targetId == paneId) {
|
|
|
+ $("[href='#" + targetId + "']").parent().remove();
|
|
|
+ } else if (targetId == paneId) {
|
|
|
$(obj).addClass("active").addClass("in");
|
|
|
} else {
|
|
|
$(obj).removeClass("active").removeClass("in");
|