瀏覽代碼

修改随访表单

bzd_wsp 3 月之前
父節點
當前提交
b0a188973e
共有 1 個文件被更改,包括 359 次插入199 次删除
  1. 359 199
      health-admin/src/main/resources/templates/dtp/followUp/followUpEdit.html

+ 359 - 199
health-admin/src/main/resources/templates/dtp/followUp/followUpEdit.html

@@ -190,7 +190,13 @@
     .radio-item label {
         margin-left: 5px;
     }
+    .hidden {
+        display: none;
+    }
 
+    .shown {
+        display: block;
+    }
 </style>
 <script>
 
@@ -198,10 +204,31 @@
 <body>
 <div class="">
     <div class="ibox">
+        <form id="form-followUp-edit1">
         <div class="ibox-title">
             <button class="btn btn-w-m btn-primary"  onclick="editArchives()">完善档案</button>
             <button type="button" class="btn btn-sm btn-danger pull-right" onclick="closeItem()">返回上一级</button>
         </div>
+
+        <input type="hidden" id="id" name="id" th:value="${id}">
+        <div class="customize-form-group">
+            <label>姓名:</label>
+            <input name="name" id="name"   class="select-input" type="text"  th:value="${name}" disabled="true"/>
+            &nbsp; <i class="fa" th:class="${realNameStatus == 1 ? 'fa fa-check' : 'fa fa-close'}" id="checkName"  ></i>
+            <input name="realNameStatus" id="realNameStatus" class="status" type="text"   th:value="${realNameStatus == 1 ? '已实名' : (realNameStatus == 0 ? '未实名' : '')}" readonly>
+            <label>性别:</label>
+            <select name="gender" class="select-input" th:with="type=${@dict.getType('sys_user_sex')}" disabled="true" />
+                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
+                        th:selected="${dict.dictValue} == ${gender}" ></option>
+            </select>
+            <span class="span_line" readonly></span>
+            <label>出生年月:</label>
+            <input name="dateBirth" id="dateBirth" placeholder="出生年月" class="select-input"  type="text"    th:value="${dateBirth}" disabled="true" />
+            <span class="status" style="width: 66px">
+            <input  name="age" type="text" id="age" th:value="${age}" style="text-align: center;width: 30px;border: none;" readonly />岁</span>
+        </div>
+
+
         <div class="ibox-content">
             <div>
                 <span>信息完整度:已完善---></span>
@@ -211,6 +238,7 @@
                 </div>
             </div>
         </div>
+     </form>
     </div>
     <div class="ui-layout-center">
         <div class="row">
@@ -226,31 +254,8 @@
                     </ul>
                     <div class="tab-content">
                         <div id="tab-1" class="tab-pane active">
-                                <form class="customize-search-form" id="form-hz-info" >
-                                    <input type="hidden" id="id"  class="styled-input" name="id" th:value="${id}">
-                                    <div class="customize-form-group edit">
-                                        <label>姓名:</label>
-                                        <input name="name" id="name"   class="styled-input"  type="text" maxlength="30" th:value="${name}" disabled="true">
-                                        &nbsp; <i class="fa" th:class="${realNameStatus == 1 ? 'fa fa-check' : 'fa fa-close'}" id="checkName"  ></i>
-                                        &nbsp;
-                                        <input name="realNameStatus" id="realNameStatus" class="status" type="text"   th:value="${realNameStatus == 1 ? '已实名' : (realNameStatus == 0 ? '未实名' : '')}" readonly>
-                                    </div>
-                                    <div class="customize-form-group edit">
-                                        <label>性别:</label>
-                                        <select name="gender" class="styled-input" th:with="type=${@dict.getType('sys_user_sex')}" disabled="true">
-                                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
-                                                    th:selected="${dict.dictValue} == ${gender}" ></option>
-                                        </select>
-                                        <span class="span_line" readonly></span>
-                                    </div>
-                                    <div class="customize-form-group edit">
-                                        <label>出生年月:</label>
-                                        <input name="dateBirth" id="dateBirth" placeholder="出生年月" class="styled-input"  type="text"    th:value="${dateBirth}" disabled="true">
-                                        <span class="status" style="width: 66px">
-                                                <input  name="age" type="text" id="age" th:value="${age}" style="text-align: center;width: 30px;border: none;" readonly>
-                                                岁
-                                            </span>
-                                    </div>
+                                <form class="customize-search-form" id="form-followUp-edit2" >
+
                                     <div class="customize-form-group edit">
                                         <label>手机号码:</label>
                                         <input name="phoneNumber" id="phoneNumber" class="styled-input" type="text" maxlength="30" th:value="${phoneNumber}" disabled="true">
@@ -336,15 +341,15 @@
                                             </div>
                                     </div>
                         </div>
-                        <div id="tab-3" class="tab-pane">
+                    <div id="tab-3" class="tab-pane">
                             <div class="task-follow-up">
                                 <div class="follow-up-person">
-                                    <label for="followUpPerson" style="padding-left: 50px;">任务跟进人:</label>
+                                    <label for="followUpPerson" style="padding-left: 50px;">随访跟进人:</label>
                                     <input type="text" id="followUpPerson" value="蒋娟" style="border: none; width: 40px; color: red;" />
+                                    <input type="hidden" id="followUpPersonId" name="followUpPersonId"/>
                                     <a href="#" onclick="editGenJinRen()">修改<i class="glyphicon glyphicon-pencil"></i></a>
                                 </div>
                                 <div class="plan-buttons">
-                                     <button class="btn btn-w-m btn-primary" onclick="createPlan()">创建计划</button>
                                     <button class="btn btn-w-m btn-primary" onclick="showAllPlan()">查看全部计划</button>
                                 </div>
                             </div>
@@ -352,15 +357,14 @@
                                 <div class="ibox-content">
                                     <div class="ibox-title2">
                                              <code style="font-size: 1.5rem;padding-right: 30px;">
-                                                 甲磺酸仑伐替尼胶囊
+                                                 甲磺酸仑伐替尼胶囊药名
                                                  <a onclick="editGenJinRen()"><i class="glyphicon glyphicon-pencil"></i></a>
                                              </code>
+                                        <code style="font-size: 1.5rem; padding-right: 30px;">
+                                            20mg(1ml)/瓶
+                                        </code>
                                         <code style="font-size: 1.5rem;color: #00B83F;padding-right: 30px;"><i class="glyphicon glyphicon-ice-lolly">常规随访</i></code>
-                                            <button style="color: #00B83F;padding-right: 30px;" >进行中</button>
-                                        <code style="font-size: 1.5rem;padding-right: 30px;">甲磺酸仑伐替尼胶囊</code>
-                                        <code style="font-size: 1.5rem;padding-right: 30px;">(乐卫玛)甲磺酸仑伐替尼胶囊(13%)</code>
-                                        <code style="font-size: 1.5rem;padding-right: 30px;">4mgx10粒x3板,Eisai Co</code>
-                                        <code style="font-size: 1.5rem;padding-right: 30px;"> Ltd</code>
+                                        <code style="font-size: 1.5rem;color: #00B83F;padding-right: 30px;">进行中</code>
                                         <a onclick="closePlane()" href="javascript:void(0)" class="right-aligned-link">关闭计划</a>
                                     </div>
                                     </div>
@@ -387,12 +391,14 @@
                                 <div class="ibox-content">
                                     <div class="ibox-title2">
                                         <code style="font-size: 1.5rem; padding-right: 30px;">
-                                            甲磺酸仑伐替尼胶囊
+                                            甲磺酸仑伐替尼胶囊药名
                                             <a onclick="editGenJinRen()"><i class="glyphicon glyphicon-pencil"></i> </a>
                                         </code>
-
+                                        <code style="font-size: 1.5rem; padding-right: 30px;">
+                                            20mg(1ml)/瓶
+                                        </code>
                                         <code style="font-size: 1.5rem; color:#ec971f;padding-right: 30px;"><i class="glyphicon glyphicon-ice-lolly-tasted">脱落召回</i></code>
-                                        <button style="color: #00B83F;padding-right: 30px;" >进行中</button>
+                                        <code style="font-size: 1.5rem;color: #00B83F;padding-right: 30px;">进行中</code>
                                         <a onclick="closePlane()" href="javascript:void(0)" class="right-aligned-link">关闭计划</a>
                                     </div>
                                 </div>
@@ -428,14 +434,14 @@
                     <span style="font-size:15px;">任务名称:
                         <span style="font-size:15px;">随访</span>
                     </span>
-                        <span style="font-size:15px;">任务主题:
-                            <span>
-                                <select name="taskTheme" class="styled-input" th:with="type=${@dict.getType('sys_select_dtp_sfrw_rwzt')}">
-                                    <option value="">请选择</option>
-                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"></option>
-                                </select>
-                           </span>
-                       </span>
+<!--                        <span style="font-size:15px;">任务主题:-->
+<!--                            <span>-->
+<!--                                <select name="taskTheme" class="styled-input" th:with="type=${@dict.getType('sys_select_dtp_sfrw_rwzt')}">-->
+<!--                                    <option value="">请选择</option>-->
+<!--                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"></option>-->
+<!--                                </select>-->
+<!--                           </span>-->
+<!--                       </span>-->
                     <span style="font-size:15px;">任务跟进人:
                         <span style="color: #2E2D3C;font-size:15px;"><code style="font-size: 1.4rem;font-size:15px;">蒋娟</code>
                        <a onclick="editGenJinRen()" style="font-size:15px;"> 修改 <i class="glyphicon glyphicon-pencil"></i></a>
@@ -443,11 +449,11 @@
                     </span>
                 </div>
                 <div class="task-buttons">
-                    <span style="font-size:15px;">营养测评<a  data-toggle="modal" data-target="#myModalDpg" style="font-size:15px;"> 待评估 <i class="glyphicon glyphicon-edit"></i></a></span>
                     <button class="btn btn-w-m btn-primary" onclick="showDetailHistory()">查看历史随访</button>
                 </div>
             </div>
         </div>
+        <form id="form-followUp-edit3" class="form-horizontal">
             <div class="row">
                 <div class="col-sm-12">
                 <div class="panel blank-panel">
@@ -470,11 +476,13 @@
                                 <div class="customize-form-group edit">
                                     <label class="is-required">回访方式:</label>
                                     <div class="input-groups" th:with="type=${@dict.getType('sys_select_dtp_ysfw_huifangfangshi')}">
-                                        <input type="radio" class="form-check-radio"  th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"   th:checked="${dict.dictLabel}==${currentEconomicSituation}" name="currentEconomicSituation" >
+                                        <input type="radio" class="form-check-radio" name="huifanffs" id="huifanffs" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"   th:checked="${dict.dictLabel}==${currentEconomicSituation}">
                                     </div>
+
                                     <span class="status"></span>
                                 </div>
-                                <div id="weixin">
+
+                                <div id="weixin" class="hidden">
                                     <div class="customize-form-group edit">
                                         <label class="is-required" for="adverseReactionImage">回访图片:</label>
                                         <div class="custom-file-upload">
@@ -482,206 +490,203 @@
                                             <label for="adverseReactionImage"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#007bff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus-circle"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg></label>
                                         </div>
                                     </div>
-
                                 </div>
-                                <div id="mianfang">
+
+                                <div id="mianfang" class="hidden">
                                     <div class="customize-form-group edit">
                                         <label>面访记录:</label>
-                                        <div class="input-groups">
-                                            <input name="weight" id="mfjilu" placeholder="请输入面访记录" class="styled-input edit_inputs" type="text"  th:value="${weight}">
+                                        <div class="input-groups"  style="width: 50%">
+                                            <input name="mfjilu" id="mfjilu" placeholder="请输入面访记录" class="styled-input edit_inputs" type="text" th:value="${weight}">
                                         </div>
                                         <span class="status"></span>
                                     </div>
                                 </div>
-                                <div class="customize-form-group edit">
-                                    <label class="is-required">是否配合:</label>
-                                    <div class="input-groups" th:with="type=${@dict.getType('sys_yes_no')}">
-                                        <input type="radio" class="form-check-radio" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"  th:checked="${dict.dictLabel}==${followUpFeedbackDoctor}"  name="followUpFeedbackDoctor" >
-                                    </div>
-                                    <span class="status"></span>
-                                </div>
                                 <div class="customize-form-group">
                                     <label>回访对象:</label>
-                                    <select name="bloodPressureStatus" class="select-input" th:with="type=${@dict.getType('sys_select_dtp_ysfw_huifangduixaing')}">
+                                    <select name="bloodPressureStatus" class="select-input edit_inputs" th:with="type=${@dict.getType('sys_select_dtp_ysfw_huifangduixaing')}">
                                         <option value="">请选择</option>
                                         <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
                                                 th:selected="${dict.dictLabel}==${bloodPressureStatus}"></option>
                                     </select>
                                     <span class="status"></span>
                                 </div>
+                                <div class="customize-form-group edit">
+                                    <label class="is-required">是否配合:</label>
+                                    <div class="input-groups" th:with="type=${@dict.getType('sys_yes_no')}">
+                                        <input type="radio" class="form-check-radio" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"  th:checked="${dict.dictLabel}==${followUpFeedbackDoctor}"  name="followUpFeedbackDoctor" >
+                                    </div>
+                                    <span class="status"></span>
+                                </div>
                             </div>
                             <div id="tab-6" class="tab-pane active">
-                                <div class="customize-form-group edit">
-                                    <label  >是否持续用药(用药状态):</label>
-                                    <div class="input-groups" th:with="type=${@dict.getType('sys_select_dtp_ysfw_huifangduixaing')}">
-                                        <input type="radio" class="form-check-radio"  th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"   th:checked="${dict.dictLabel}==${currentEconomicSituation}" name="currentEconomicSituation" >
+                                <div class="customize-form-group edit" >
+                                    <label>用药状态:</label>
+                                    <div class="input-groups" style="width: 90%" th:with="type=${@dict.getType('sys_gxhpz_yyycx')}">
+                                        <input type="radio" class="form-check-radio" name="ischixuyystatus"  id="ischixuyystatus" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"   th:checked="${dict.dictLabel}==${currentEconomicSituation}" >
                                     </div>
                                     <span class="status"></span>
                                 </div>
                                 <div class="customize-form-group edit">
                                     <label class="is-required">确诊后首次用药日期:</label>
                                     <div class="input-groups select-time">
-                                        <input name="timeFirstDiagnosis" placeholder="确诊后首次用药日期" class="time-input-new styled-input" type="text"  th:value="${timeFirstDiagnosis}" required>
+                                        <input name="timeFirstDiagnosis" placeholder="确诊后首次用药日期" class="time-input time-input2" type="text"  th:value="${timeFirstDiagnosis}" required>
                                     </div>
                                     <span class="status"></span>
                                 </div>
-                                <div class="customize-form-group edit">
+                                <div id="csyzyy" class="hidden">
+                                <div class="customize-form-group edit" >
                                     <label>慈善援助用药:</label>
-                                    <div class="input-groups" th:with="type=${@dict.getType('sys_yes_no')}">
+                                    <div class="input-groups" th:with="type=${@dict.getType('sys_gxhpz_chishan_yzyy')}">
                                         <input type="radio" class="form-check-radio" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"  th:checked="${dict.dictLabel}==${followUpFeedbackDoctor}"  name="followUpFeedbackDoctor" >
                                     </div>
                                     <span class="status"></span>
                                 </div>
+                                </div>
+                                <div id="yjty" class="hidden">
                                 <div class="customize-form-group edit">
                                     <label>永久停药时间:</label>
-                                    <div class="input-groups" th:with="type=${@dict.getType('sys_yes_no')}">
-                                        <input name="timeFirstDiagnosis" placeholder="永久停药时间" class="time-input-new styled-input" type="text"  th:value="${timeFirstDiagnosis}" required>
+                                    <div class="input-groups">
+                                        <input name="timeFirstDiagnosis" placeholder="永久停药时间" class="time-input time-input2" type="text"  th:value="${timeFirstDiagnosis}" required>
                                     </div>
                                     <span class="status"></span>
                                 </div>
                                 <div class="customize-form-group edit">
                                     <label>永久停药原因:</label>
-                                    <div class="input-groups" th:with="type=${@dict.getType('sys_yes_no')}">
+                                    <div class="input-groups" style="width: 90%" th:with="type=${@dict.getType('sys_gxhpz_yong_jiu_ting_yao_yuanyin')}">
                                         <input type="radio" class="form-check-radio" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"  th:checked="${dict.dictLabel}==${followUpFeedbackDoctor}"  name="followUpFeedbackDoctor" >
                                     </div>
                                     <span class="status"></span>
                                 </div>
                                 <div class="customize-form-group edit">
-                                    <label>永久停药:</label>
+                                    <label>直接永久停药:</label>
                                     <div class="input-groups" th:with="type=${@dict.getType('sys_yes_no')}">
                                         <input type="radio" class="form-check-radio" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"  th:checked="${dict.dictLabel}==${followUpFeedbackDoctor}"  name="followUpFeedbackDoctor" >
                                     </div>
                                     <span class="status"></span>
+                                    <span class="status"></span>
                                 </div>
+                                </div>
+                                <div id="qtgyqgy" class="hidden">
                                 <div class="customize-form-group edit">
                                     <label>其他渠道购药:</label>
-                                    <div class="input-groups" th:with="type=${@dict.getType('sys_yes_no')}">
+                                    <div class="input-groups" style="width: 90%" th:with="type=${@dict.getType('sys_gxhpz_othetqd_gy')}">
                                         <input type="radio" class="form-check-radio" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"  th:checked="${dict.dictLabel}==${followUpFeedbackDoctor}"  name="followUpFeedbackDoctor" >
                                     </div>
                                     <span class="status"></span>
+                                    <span class="status"></span>
                                 </div>
+                                </div>
+                                <div id="ycgyycjy" class="hidden">
                                 <div class="customize-form-group edit">
                                     <label>延迟购药(医嘱建议):</label>
-                                    <div class="input-groups" th:with="type=${@dict.getType('sys_yes_no')}">
+                                    <div class="input-groups" style="width: 90%" th:with="type=${@dict.getType('sys_gxhpz_yanchi_gy_ys_jy')}">
                                         <input type="radio" class="form-check-radio" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"  th:checked="${dict.dictLabel}==${followUpFeedbackDoctor}"  name="followUpFeedbackDoctor" >
                                     </div>
                                     <span class="status"></span>
                                 </div>
-                                <div class="customize-form-group edit">
-                                    <label>延迟购药(患者用药不规范:</label>
-                                    <div class="input-groups" th:with="type=${@dict.getType('sys_yes_no')}">
-                                        <input type="radio" class="form-check-radio" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"  th:checked="${dict.dictLabel}==${followUpFeedbackDoctor}"  name="followUpFeedbackDoctor" >
-                                    </div>
-                                    <span class="status"></span>
                                 </div>
+                                <div id="ycgyhzyybgf" class="hidden">
                                 <div class="customize-form-group edit">
-                                    <label>更换治疗用药药品名称:</label>
-                                    <div class="input-groups" th:with="type=${@dict.getType('sys_yes_no')}">
-                                        <input type="text" class="styled-input" name="followUpFeedbackDoctor" th:value="${followUpFeedbackDoctor}">
+                                    <label>延迟购药(用药不规范):</label>
+                                    <div class="input-groups" style="width: 90%" th:with="type=${@dict.getType('sys_gxhpz_yanchi_gyhzyybgf')}">
+                                        <input type="radio" class="form-check-radio" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"  th:checked="${dict.dictLabel}==${followUpFeedbackDoctor}"  name="followUpFeedbackDoctor" >
                                     </div>
                                     <span class="status"></span>
                                 </div>
+                            </div>
                              </div>
                             <div id="tab-7" class="tab-pane active">
                                 <div class="customize-form-group edit">
                                     <label  >是否出现不良反应:</label>
                                     <div class="input-groups" th:with="type=${@dict.getType('sys_yes_no')}">
-                                        <input type="radio" class="form-check-radio"  th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"   th:checked="${dict.dictLabel}==${currentEconomicSituation}" name="currentEconomicSituation" >
+                                        <input type="radio" class="form-check-radio"  th:each="dict : ${type}"  name="blfyyesOrno" id="blfyyesOrno" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"   th:checked="${dict.dictLabel}==${currentEconomicSituation}">
                                     </div>
                                     <span class="status"></span>
                                 </div>
-                                <div id="bulfyyes">
+                                <div id="bulfydiv" class="hidden">
+
                                     <div class="customize-form-group edit">
                                         <label>不良反应时间:</label>
                                         <div class="input-groups" th:with="type=${@dict.getType('sys_yes_no')}">
-                                            <input name="nyfysj" placeholder="永久停药时间" class="time-input-new styled-input" type="text"  th:value="${timeFirstDiagnosis}" required>
+                                            <input name="nyfysj" placeholder="永久停药时间" class="time-input time-input2" type="text"  th:value="${timeFirstDiagnosis}" required>
                                         </div>
                                         <span class="status"></span>
                                     </div>
                                     <div class="customize-form-group edit">
-                                        <label>不良反应:</label>
-                                    <div class="input-groups">
-                                        <input name="weight" id="blfy" placeholder="请输入不良反应" class="styled-input edit_inputs" type="text"  th:value="${weight}">
-                                    </div>
-                                        <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal5">新增不良反应</button>
-
-                                        <div class="modal inmodal fade" id="myModal5" tabindex="-1" role="dialog" aria-hidden="true">
-                                            <div class="modal-dialog modal-lg" style="width: 1000px">
-                                                <div class="modal-content">
-                                                    <div class="modal-header">
-                                                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
-                                                        </button>
-                                                        <h4 class="modal-title">不良反应系统</h4>
-                                                        <!--<small class="font-bold">这里可以显示副标题。</small>-->
-                                                    </div>
-                                                    <div class="modal-body">
-                                                        <div id="element1" class="row">
-                                                            <div class="col-sm-2">
-                                                                <select class="province form-control m-b" data-first-title="选择不良反应">
-                                                                    <option value="">请选择</option>
-                                                                </select>
+                                    <span class="status"></span>
+                                     <div  class="tab-pane fade in active">
+                                      <div class="panel-body">
+                                        <div class="customize-search-form">
+                                            <div class="customize-form-group edit">
+                                                <div style="/*display: flex;*/">
+                                                    <label style="width: auto;">不良反应症状:</label>
+                                                    <button type="button" data-toggle="modal"  class="btn btn-xs btn-primary" data-target="#myModal5">新增不良反应</button>
+                                                    <table id="byfyTable" style="width: 340px;">
+                                                        <thead>
+                                                        <tr>
+                                                            <th>序号</th>
+                                                            <th>不良反应症状</th>
+                                                            <th>操作</th>
+                                                        </tr>
+                                                        </thead>
+                                                        <tbody id="blfyTableBody">
+                                                        <!-- 表格行将在这里动态添加 -->
+                                                        </tbody>
+                                                    </table>
+                                                </div>
+
+                                                <div class="modal inmodal fade" id="myModal5" tabindex="-1" role="dialog" aria-hidden="true">
+                                                    <div class="modal-dialog modal-lg" style="width: 1000px">
+                                                        <div class="modal-content">
+                                                            <div class="modal-header">
+                                                                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
+                                                                </button>
+                                                                <h4 class="modal-title">不良反应系统</h4>
+                                                                <!--<small class="font-bold">这里可以显示副标题。</small>-->
                                                             </div>
-                                                            <div class="col-sm-3">
-                                                                <select class="city form-control m-b" data-first-title="选择不良反应位置">
-                                                                    <option value="">请选择</option>
-                                                                </select>
+                                                            <div class="modal-body">
+                                                                <div id="element1" class="row">
+                                                                    <div class="col-sm-2">
+                                                                        <select class="province form-control m-b" data-first-title="选择不良反应">
+                                                                            <option value="">请选择</option>
+                                                                        </select>
+                                                                    </div>
+                                                                    <div class="col-sm-3">
+                                                                        <select class="city form-control m-b" data-first-title="选择不良反应位置">
+                                                                            <option value="">请选择</option>
+                                                                        </select>
+                                                                    </div>
+                                                                    <div class="col-sm-7">
+                                                                        <select class="area form-control m-b" data-first-title="选择不良反应数值">
+                                                                            <option value="">请选择</option>
+                                                                        </select>
+                                                                    </div>
+                                                                </div>
                                                             </div>
-                                                            <div class="col-sm-7">
-                                                                <select class="area form-control m-b" data-first-title="选择不良反应数值">
-                                                                    <option value="">请选择</option>
-                                                                </select>
+
+                                                            <div class="modal-footer">
+                                                                <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
+                                                                <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="selectAdverseReactions()">保存</button>
                                                             </div>
                                                         </div>
                                                     </div>
-
-                                                    <div class="modal-footer">
-                                                        <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
-                                                        <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="selectAdverseReactions()">保存</button>
-                                                    </div>
                                                 </div>
                                             </div>
                                         </div>
-                                    <span class="status"></span>
-                                    </div>
-                                    <div class="customize-form-group edit">
-                                        <label>不良反应处理方式:</label>
-                                        <div class="input-groups">
-                                            <input name="weight" id="blfyclfs" placeholder="不良反应处理方式" class="styled-input edit_inputs" type="text"  th:value="${weight}">
-                                        </div>
-                                        <span class="status"></span>
-                                    </div>
-                                </div>
-                                <div id="hbyyqtblfydiv">
-                                    <div class="customize-form-group edit">
-                                        <label>合并用药其他不良反应:</label>
-                                        <div class="input-groups">
-                                            <input name="weight" id="hbyyqtblfy" placeholder="合并用药其他不良反应" class="styled-input edit_inputs" type="text"  th:value="${weight}">
-                                        </div>
-                                        <span class="status"></span>
-                                    </div>
-                                    <div class="customize-form-group edit">
-                                        <label  for="blfyclfsImage">合并用药其他不良反应图片:</label>
-                                        <div class="custom-file-upload">
-                                            <input type="file" id="blfyclfsImage" name="blfyclfsImage" accept=".jpg,.jpeg,.png,.gif">
-                                            <label for="blfyclfsImage"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#007bff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus-circle"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg></label>
+                                            </div>
                                         </div>
-                                        <span class="status"></span>
-                                    </div>
-                                    <div class="customize-form-group edit">
-                                        <label>合并用药其他不良反应处理:</label>
-                                             <textarea id="hbyyqtqtblfy" name="hbyyqtqtblfy" class="styled-input edit_inputs textareas"
-                                                       style="width: auto;height: auto ;border: 1px solid ;"
-                                                       th:text="${accompanyingSymptoms}" placeholder="合并用药其他不良反应处理..." rows="4" cols="112" ></textarea>
-                                        <span class="status"></span>
                                     </div>
+
                                 </div>
+
                             </div>
                         </div>
                     </div>
                 </div>
             </div>
         </div>
-    </div>
+       </form>
+       </div>
     </div>
 </div>
 <form style="background-color: #f5f3f3;text-align: center;width: auto;" id="form-followUpTaskDetails">
@@ -705,13 +710,65 @@
 <script>
     var formSubmitted = true;
     var prefix = ctx + "dtp/pmService";
+    var  blfyindex=0;
     function submitHandler() {
+        var selectedValue = $('input[name="huifanffs"]:checked').val();
+
+
+
+        if (!selectedValue) {
+            alert('请选择回访方式!');
+            return;
+        }
+
+        if (selectedValue === '微信' && !$('#adverseReactionImage')[0].files.length) {
+            alert('微信回访时,回访图片为必填项!');
+            return;
+        }
+
+        if (selectedValue === '面访' && !$('#mfjilu').val()) {
+            alert('面访时,面访记录为必填项!');
+            return;
+        }
         if ($.validate.form()) {
             var data = $("#form-followUp-edit").serializeArray();
             $.operate.saveTab(prefix + "/followUpEdit", data);
         }
+
+        const byfyTableBody = document.getElementById('byfyTableBody');
+        const rows2 = byfyTableBody.getElementsByTagName('tr');
+
+
+        if (rows2.length > 0) {
+            const rowsbyfys = [];//用药情况table
+            $('#byfyTableBody tr').each(function () {
+                const row = {
+                    id:  $("#id").val(),
+                    byfyData: $(this).find('td:eq(1)').text(),
+                };
+                rowsbyfys.push(row);
+            });
+            data.push({name:"rowsbyfys",value:JSON.stringify(rowsbyfys)})
+        }
+
+
+
+
+
+    }
+    function deleteRow(button) {
+        const row = button.parentNode.parentNode;
+        row.remove();
+        updateIndices(); // 删除后更新所有行的序号
+    }
+    // 更新所有行的序号
+    function updateIndices() {
+        $('#blfyTableBody tr').each(function(index) {
+            $(this).find('td:first-child').text(index + 1); // 设置序号为当前索引加1
+        });
     }
     function selectAdverseReactions() {
+
         var province = $('.province').val();
         var city = $('.city').val();
         var area = $('.area').val();
@@ -719,6 +776,14 @@
 
         // 打印不良选择的不良反应
         console.log('Selected: ' + province + ', ' + city + ', ' + area);
+            var row = '<tr>' +
+                '<td></td>' +
+                '<td>' + province + ', ' + city + ', ' + area + '</td>' +
+                '<td><button class="btn-danger" onclick="deleteRow(this)">删除</button></td>' +
+                '</tr>';
+            $('#blfyTableBody').append(row);
+        blfyindex++; // 增加索引
+        updateIndices(); // 添加后更新所有行的序号
     };
 
     //初始化加载
@@ -730,6 +795,18 @@
             selects: ['province', 'city', 'area'],
             nodata: 'none'
         });
+        $("#myModal5").hide();
+
+        // 初始化时设置默认显示状态
+        updateVisibility();
+
+        // 监听回访方式的选择变化
+        $('input[name="huifanffs"]').on('change', updateVisibility);
+        // 监听用药状态的选择变化
+        $('input[name="ischixuyystatus"]').on('change', updateVisibility);
+        // 监听不良反应的选择变化
+        $('input[name="blfyyesOrno"]').on('change', updateVisibility);
+
         // 监听点击事件,激活指定的选项卡
         $('#myUlTabs li a').click(function(e) {
             // 阻止默认行为
@@ -793,7 +870,84 @@
         });
 
     });
+    // 默认显示/隐藏逻辑
+    function updateVisibility() {
+        var weixinDiv = $('#weixin');
+        var mianfangDiv = $('#mianfang');
+
+        var selectedValue = $('input[name="huifanffs"]:checked').val();
+        if (selectedValue === '微信') {
+            weixinDiv.removeClass('hidden');
+            mianfangDiv.addClass('hidden');
+        } else if (selectedValue === '电话') {
+            weixinDiv.addClass('hidden');
+            mianfangDiv.addClass('hidden');
+        } else if (selectedValue === '面访') {
+            weixinDiv.addClass('hidden');
+            mianfangDiv.removeClass('hidden');
+        }
+
+        var ischixuyystatus = $('input[name="ischixuyystatus"]:checked').val();
+        var csyzyy = $('#csyzyy');//慈善援助用药
+        var yjty = $('#yjty');//永久停药
+        var qtgyqgy = $('#qtgyqgy');//其他渠道购药
+        var ycgyycjy = $('#ycgyycjy');//延迟购药(医嘱建议)
+        var ycgyhzyybgf = $('#ycgyhzyybgf');//延迟购药(患者用药不规范
+            debugger
+        if (ischixuyystatus === '持续购药') {
+            csyzyy.addClass('hidden');
+            yjty.addClass('hidden');
+            qtgyqgy.addClass('hidden');
+            ycgyycjy.addClass('hidden');
+            ycgyhzyybgf.addClass('hidden');
+        } else if (ischixuyystatus === '领取慈善赠药') {
+            csyzyy.removeClass('hidden');
+            yjty.addClass('hidden');
+            qtgyqgy.addClass('hidden');
+            ycgyycjy.addClass('hidden');
+            ycgyhzyybgf.addClass('hidden');
+        } else if (ischixuyystatus === '永久停药') {
+            yjty.removeClass('hidden');
+            csyzyy.addClass('hidden');
+            qtgyqgy.addClass('hidden');
+            ycgyycjy.addClass('hidden');
+            ycgyhzyybgf.addClass('hidden');
+        }else if (ischixuyystatus === '其他渠道购药') {
+            qtgyqgy.removeClass('hidden');
+            yjty.addClass('hidden');
+            csyzyy.addClass('hidden');
+            ycgyycjy.addClass('hidden');
+            ycgyhzyybgf.addClass('hidden');
+        }
+        else if (ischixuyystatus === '延迟用药(医嘱建议)') {
+            ycgyycjy.removeClass('hidden');
+            qtgyqgy.addClass('hidden');
+            yjty.addClass('hidden');
+            csyzyy.addClass('hidden');
+            ycgyhzyybgf.addClass('hidden');
+        }
+        else if (ischixuyystatus === '延迟购药 (患者用药不规范)') {
+            ycgyhzyybgf.removeClass('hidden');
+            qtgyqgy.addClass('hidden');
+            yjty.addClass('hidden');
+            csyzyy.addClass('hidden');
+            ycgyycjy.addClass('hidden');
+        }
+
+        //是否出现不良反应
+        var bulfydiv = $('#bulfydiv');
+        var blfyyesOrno = $('input[name="blfyyesOrno"]:checked').val();
+        if (blfyyesOrno === '是') {
+            bulfydiv.removeClass('hidden');
+        }
+        if (blfyyesOrno === '否') {
+            bulfydiv.addClass('hidden');
+        }
+    }
 
+    function addblfy() {
+        $('#myModal5').show();
+    }
     function initializeTableForTab(tabId) {
         debugger
 
@@ -851,7 +1005,9 @@
             tableElement.bootstrapTable(options);
         }
         if(tabId==='tab-3'){
-            var data3=[];
+            var tableElement4 = $('#bootstrap-table-4');
+            var data4=[];
+            var data5=[];
             // 初始化表格 getDrugPurchaseList
             $.ajax({
                 cache : true,
@@ -863,16 +1019,19 @@
                     $.modal.alertError("系统错误");
                 },
                 success : function(data) {
-                    data2=data.rows;
+                    data4=data.rows;
+                    data5=data.rows;
                     $.operate.successCallback(data);
                 }
             });
 
+
+
            var options ={
                 // 配置表格的相关属性
                 // 例如数据源、列定义等
                 // 示例配置
-                data: data3,
+                data: data4,
                 fitColumns: true,
                 striped: true,
                 autoRowHeight: true,
@@ -908,53 +1067,54 @@
                         }
                 ]
             };
-            tableElement.bootstrapTable(options);
-        }
-        if(tabId==='tab-4'){
-           var options ={
-                // 配置表格的相关属性
-                // 例如数据源、列定义等
-                // 示例配置
-                data: data4,
-                fitColumns: true,
-                striped: true,
-                autoRowHeight: true,
-                rowNumbers: true,
-                showFooter:true,  //是否显示表格底部区域。
-                clickToSelect: true, //是否启用点击行时选中整行的功能。
-                singleSelect: false, //是否仅允许选择一行
-                fixedColumns: true,
-                //fixedNumber: 3,
-                fixedRightNumber: 1,
-                columns : [
-                        { field: 'id', title: '序号' },
-                        { field: 'followUpPersonName', title: '任务名称' },
-                        { field: 'disease', title: '任务类型'},
-                        { field: 'filingDate', title: '预约时间' },
-                        { field: 'lastPurchaseDate', title: '完成时间' },
-                        { field: 'patientName', title: '任务跟进人' },
-                        { field: 'patientAssignmentStatus', title: '任务状态' },
-                        {
-                            title: '操作',
-                            align: 'center',
-                            width: '180px',
-                            formatter: function(value, row, index) {
-                                if (row.id) {
-                                    var actions = [];
-                                    actions.push('<a class="btn-xs" href="javascript:void(0)" onclick="edit(\'' + row.id + '\')">查看</a> ');
-                                    actions.push('<a class="btn-xs" href="javascript:void(0)" onclick="edit(\'' + row.id + '\')">关闭任务</a> ');
-                                    return actions.join('');
-                                } else {
-                                    return "";
+            tableElement4.bootstrapTable(options);
+
+           var tableElement5 = $('#bootstrap-table-5');
+                   var options ={
+                        // 配置表格的相关属性
+                        // 例如数据源、列定义等
+                        // 示例配置
+                        data: data5,
+                        fitColumns: true,
+                        striped: true,
+                        autoRowHeight: true,
+                        rowNumbers: true,
+                        showFooter:true,  //是否显示表格底部区域。
+                        clickToSelect: true, //是否启用点击行时选中整行的功能。
+                        singleSelect: false, //是否仅允许选择一行
+                        fixedColumns: true,
+                        //fixedNumber: 3,
+                        fixedRightNumber: 1,
+                        columns : [
+                                { field: 'id', title: '序号' },
+                                { field: 'followUpPersonName', title: '任务名称' },
+                                { field: 'disease', title: '任务类型'},
+                                { field: 'filingDate', title: '预约时间' },
+                                { field: 'lastPurchaseDate', title: '完成时间' },
+                                { field: 'patientName', title: '任务跟进人' },
+                                { field: 'patientAssignmentStatus', title: '任务状态' },
+                                {
+                                    title: '操作',
+                                    align: 'center',
+                                    width: '180px',
+                                    formatter: function(value, row, index) {
+                                        if (row.id) {
+                                            var actions = [];
+                                            actions.push('<a class="btn-xs" href="javascript:void(0)" onclick="edit(\'' + row.id + '\')">查看</a> ');
+                                            actions.push('<a class="btn-xs" href="javascript:void(0)" onclick="edit(\'' + row.id + '\')">关闭任务</a> ');
+                                            return actions.join('');
+                                        } else {
+                                            return "";
+                                        }
+                                    }
                                 }
-                            }
-                        }
-                    ]
-            };
-            tableElement.bootstrapTable(options);
-        }
+                            ]
+                    };
+                   tableElement5.bootstrapTable(options);
+             }
     }
-    var editArchives = function(){
+
+    function editArchives(){
         var id = $("#id").val();
        // table.set();
         var prefix = ctx + "dtp/pmService/archivesEdit/{id}";