|
@@ -201,15 +201,19 @@ $(function () {
|
|
|
return false;
|
|
|
}
|
|
|
//发送入院记录
|
|
|
- function sendRuleWarn(msg, i) {
|
|
|
+ function sendRuleWarn(msg, i, this_flaw) {
|
|
|
|
|
|
+ // console.log(i, code);
|
|
|
|
|
|
post(api.sendRuleWarn, {
|
|
|
"behospitalCode": global_id,
|
|
|
"msg": msg.msg
|
|
|
}).then(function (res) {
|
|
|
if (res.data.code === '0' && res.data.data === true) {
|
|
|
- $(".send-flaw:eq(" + i + ")").text("已发送");
|
|
|
+ this_flaw.text("已发送")
|
|
|
+ this_flaw.off('click')
|
|
|
+ // $(".send-flaw:eq(" + i + ")").text("已发送");
|
|
|
+ // $(".send-flaw:eq(" + i + ")").off('click');
|
|
|
// $(".ysend-flaw:eq(" + i + ")").css({
|
|
|
// "display": "inline"
|
|
|
// });
|
|
@@ -531,7 +535,8 @@ $(function () {
|
|
|
$("#flawTmpl").tmpl(data[k]).appendTo("#flaws .flaw-box");
|
|
|
}
|
|
|
showFlawList();
|
|
|
- $(".flaw-item .oper a").unbind("click").click(function (e) {
|
|
|
+ $(".flaw-item .oper a").not(".ysend-flaw").unbind("click").click(function (e) {
|
|
|
+
|
|
|
const i = $(".flaw-item[code=" + global_activeTab + "]").index($(this).parents(".flaw-item"));
|
|
|
const code = $(this).attr("code");
|
|
|
const isEdit = $(this).is(".edit-flaw");
|
|
@@ -557,7 +562,7 @@ $(function () {
|
|
|
// const msg = $(".send-flaw:eq(" + i + ")").parent(".oper").parent(".opers").prev(".title").text();
|
|
|
// console.log($(".send-flaw:eq(" + i + ")").parent(".oper").parent(".opers").prev(".title").text());
|
|
|
// sendRuleWarn(msg.replace(/\s/g, ""), i)
|
|
|
- showModal('4', code, i); //发送
|
|
|
+ showModal('4', $(this), i); //发送
|
|
|
}
|
|
|
else {
|
|
|
showModal('1', code, i); //删除
|
|
@@ -904,7 +909,7 @@ $(function () {
|
|
|
$("#delModal .modal-body").html('<p>确定要发送吗?</p>');
|
|
|
$("#delModal .confirm").text("确定").unbind("click").click(function () {
|
|
|
|
|
|
- sendRuleWarn(info, i)
|
|
|
+ sendRuleWarn(info, i, code)
|
|
|
|
|
|
});
|
|
|
$("#delModal .cancel").show().text("取消").unbind("click").click(function () {
|