|
@@ -1,52 +1,89 @@
|
|
<!DOCTYPE html>
|
|
<!DOCTYPE html>
|
|
-<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
|
|
|
|
|
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
|
<head>
|
|
<head>
|
|
<th:block th:include="include :: header('随访SOP表修改')" />
|
|
<th:block th:include="include :: header('随访SOP表修改')" />
|
|
</head>
|
|
</head>
|
|
<body>
|
|
<body>
|
|
<div class="ui-layout-center">
|
|
<div class="ui-layout-center">
|
|
- <form id="form-SDtpYypzFollowUpSop-edit" class="customize-search-form">
|
|
|
|
-
|
|
|
|
- <div class="customize-form-group-container">
|
|
|
|
- <input type="hidden" id="id" name="id" th:value="${id}">
|
|
|
|
- <div class="customize-form-group">
|
|
|
|
- <label>药品:</label>
|
|
|
|
- <input name="drug" placeholder="药品" th:value="${drug}" class="styled-input" type="text" required>
|
|
|
|
- </div>
|
|
|
|
- <div class="customize-form-group">
|
|
|
|
- <label>业务归属:</label>
|
|
|
|
- <input name="businessBelonging" placeholder="业务归属" th:value="${businessBelonging}" class="styled-input" type="text">
|
|
|
|
- </div>
|
|
|
|
- <div class="customize-form-group">
|
|
|
|
- <label>模板名称:</label>
|
|
|
|
- <input name="templateName" placeholder="模板名称" th:value="${templateName}" class="styled-input" type="text" required>
|
|
|
|
- </div>
|
|
|
|
- <div class="customize-form-group">
|
|
|
|
- <label>模版ID:</label>
|
|
|
|
- <input name="templateId" placeholder="模版ID" th:value="${templateId}" class="styled-input" type="number">
|
|
|
|
- </div>
|
|
|
|
- <div class="customize-form-group">
|
|
|
|
- <label>创建人:</label>
|
|
|
|
- <input name="createdBy" placeholder="创建人" th:value="${createdBy}" class="styled-input" type="text" disabled="true">
|
|
|
|
|
|
+ <div class="col-sm-12">
|
|
|
|
+ <div class="float-e-margins">
|
|
|
|
+ <div class="ibox-title">
|
|
|
|
+ <h5>随访SOP</h5>
|
|
|
|
+ <div class="ibox-tools">
|
|
|
|
+ <a class="collapse-link">
|
|
|
|
+ <i class="fa fa-chevron-up"></i>
|
|
|
|
+ </a>
|
|
|
|
+ <a class="dropdown-toggle" data-toggle="dropdown" href="javascript:;">
|
|
|
|
+ <i class="fa fa-wrench"></i>
|
|
|
|
+ </a>
|
|
|
|
+ <ul class="dropdown-menu dropdown-user">
|
|
|
|
+ <li><a href="javascript:;">选项1</a>
|
|
|
|
+ </li>
|
|
|
|
+ <li><a href="javascript:;">选项2</a>
|
|
|
|
+ </li>
|
|
|
|
+ </ul>
|
|
|
|
+ <a class="close-link">
|
|
|
|
+ <i class="fa fa-times"></i>
|
|
|
|
+ </a>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- <div class="customize-form-group">
|
|
|
|
- <label>状态:</label>
|
|
|
|
- <input name="status" placeholder="状态:已启用,已停用,已创建" th:value="${status}" class="styled-input" type="text">
|
|
|
|
- </div>
|
|
|
|
- <div class="customize-form-group">
|
|
|
|
- <label>创建时间:</label>
|
|
|
|
- <input name="createdTime" placeholder="创建时间" th:value="${createdTime}" class="styled-input" type="text" disabled="true">
|
|
|
|
- </div>
|
|
|
|
- <div class="customize-form-group select-time">
|
|
|
|
- <label>更新时间:</label>
|
|
|
|
- <input name="updatedTime" placeholder="更新时间" th:value="${updatedTime}" class="time-input time-input2" type="text">
|
|
|
|
- </div>
|
|
|
|
- <div class="customize-form-group">
|
|
|
|
- <label>更新人:</label>
|
|
|
|
- <input name="updatedBy" placeholder="更新人" th:value="${updatedBy}" class="styled-input" type="text">
|
|
|
|
|
|
+ <div class="ibox-content">
|
|
|
|
+
|
|
|
|
+ <form id="form-SDtpYypzFollowUpSop-edit">
|
|
|
|
+ <div class="customize-form-group-row">
|
|
|
|
+ <label class="control-label is-required">随访SOP:</label>
|
|
|
|
+ <input name="phoneNumber" placeholder="随访SOP" class="styled-input input-field"
|
|
|
|
+ type="text" maxlength="30" th:value="${phoneNumber}" required>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="customize-form-group-row">
|
|
|
|
+ <label class="control-label is-required">业务归属:</label>
|
|
|
|
+ <input name="phoneNumber" placeholder="业务归属" class="styled-input input-field"
|
|
|
|
+ type="text" maxlength="30" th:value="${phoneNumber}" readonly required>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="customize-form-group-row">
|
|
|
|
+ <label class="control-label is-required">适用药品:</label>
|
|
|
|
+ 已选择2种药品 <button type="button" onclick="selectUsersToParentCallBack2()" class="btn-primary">添加药品</button>
|
|
|
|
+ <div class="form-horizontal">
|
|
|
|
+ <p class="pull-right">
|
|
|
|
+ <div class="customize-form-group select-time">
|
|
|
|
+ <div class="panel-body">
|
|
|
|
+ <strong>药品信息</strong>
|
|
|
|
+ <div class="form-group" id="formGroup">
|
|
|
|
+ <div class="col-sm-12">
|
|
|
|
+ <div class="col-sm-11" id="carGroup">
|
|
|
|
+ <div id="iboxContainer">
|
|
|
|
+ <ul class="list-group list-group-striped" id="inputList">
|
|
|
|
+ <!-- 输入框将在这里动态添加 -->
|
|
|
|
+ </ul>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </p>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="customize-form-group-row">
|
|
|
|
+ <label class="control-label is-required">节点配置:</label>
|
|
|
|
+ <div class="col-sm-6">
|
|
|
|
+ <div class="tabs-container">
|
|
|
|
+ <button type="button" onclick="addNode()" class="btn btn-outline btn-primary dim">添加节点</button>
|
|
|
|
+ <ul class="nav nav-tabs" id="addNodeSelect">
|
|
|
|
+ <!--动态添加表单数据-->
|
|
|
|
+ </ul>
|
|
|
|
+ <div class="tab-content" id="addNode">
|
|
|
|
+ <!--动态添加表单数据-->
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- </form>
|
|
|
|
|
|
+ </div>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
<div class="main-content">
|
|
<div class="main-content">
|
|
<div class="col-sm-offset-5 col-sm-10">
|
|
<div class="col-sm-offset-5 col-sm-10">
|
|
@@ -58,6 +95,7 @@
|
|
</body>
|
|
</body>
|
|
</html>
|
|
</html>
|
|
<script>
|
|
<script>
|
|
|
|
+ var prefix = ctx + "dtp/recipe";
|
|
function submitHandler() {
|
|
function submitHandler() {
|
|
var prefix = ctx + "dtp/sdtpyypzfollowupsop";
|
|
var prefix = ctx + "dtp/sdtpyypzfollowupsop";
|
|
if ($.validate.form()) {
|
|
if ($.validate.form()) {
|
|
@@ -65,4 +103,269 @@
|
|
$.operate.saveTab(prefix + "/sDtpYypzFollowUpSopEdit", data);
|
|
$.operate.saveTab(prefix + "/sDtpYypzFollowUpSopEdit", data);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ function selectUsersToParentCallBack2(){
|
|
|
|
+ var options = {
|
|
|
|
+ title: '药品信息',
|
|
|
|
+ url: prefix + "/drugInfo",
|
|
|
|
+ callBack: doSubmit2
|
|
|
|
+ };
|
|
|
|
+ $.modal.openOptions(options);
|
|
|
|
+ }
|
|
|
|
+ var flag = true ;
|
|
|
|
+ $(document).ready(function() {
|
|
|
|
+ // 绑定 change 事件
|
|
|
|
+ $(document).on('change', '#s2', function(e) {
|
|
|
|
+ var selectedValue = $(this).val();
|
|
|
|
+ debugger
|
|
|
|
+ if (selectedValue === "周期节点" && flag) {
|
|
|
|
+ flag = false;
|
|
|
|
+ $('#span').remove();
|
|
|
|
+ var addNodeOne ='<span id="span"> 每 '+
|
|
|
|
+ '<input type="number" name="specification" placeholder="请输入" class="styled-input" value="">' +
|
|
|
|
+ " 天生成任务,共执行 " +
|
|
|
|
+ '<input type="number" name="specification" placeholder="请输入" class="styled-input" value=""></span>'+
|
|
|
|
+ " 次 ";
|
|
|
|
+ $('#s3').after(addNodeOne);
|
|
|
|
+ }else {
|
|
|
|
+ flag = true;
|
|
|
|
+ $('#span').remove();
|
|
|
|
+ var addNodeOne =" <span id=\"span\">第 " +
|
|
|
|
+ '<input type="number" id="aa" name="specification" placeholder="请输入" class="styled-input" value="">' +
|
|
|
|
+ " 天生成任务 </span>" ;
|
|
|
|
+ $('#s3').after(addNodeOne);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ var count = 1;
|
|
|
|
+ /* 添加节点配置 */
|
|
|
|
+ function addNode(){
|
|
|
|
+ // 生成 ibox 容器
|
|
|
|
+ if(count===1){
|
|
|
|
+ c = "active";
|
|
|
|
+ t = "true"
|
|
|
|
+ }else{
|
|
|
|
+ c="";
|
|
|
|
+ t="false"
|
|
|
|
+ }
|
|
|
|
+ var addNode = '<div id="tab-' + count + '" class="tab-pane '+c+'">' +
|
|
|
|
+ '<div class="panel-body">'+
|
|
|
|
+ '<strong>激活节点:</strong>'+
|
|
|
|
+ " 按 " +
|
|
|
|
+ '<select name="usageMethod" id="s1" class="styled-input">' +
|
|
|
|
+ '<option value="">请选择</option>' +
|
|
|
|
+ '<option value="创建计划">创建计划</option>' +
|
|
|
|
+ '</select>' +
|
|
|
|
+ " 第 " +
|
|
|
|
+ '<input type="number" name="specification" placeholder="规格" class="styled-input" value="">' +
|
|
|
|
+ " 天激活 "+
|
|
|
|
+ '<select name="usageMethod" id="s2" class="styled-input">' +
|
|
|
|
+ '<option value="单次节点">单次节点</option>' +
|
|
|
|
+ '<option value="周期节点">周期节点</option>' +
|
|
|
|
+ '</select>' +
|
|
|
|
+ '<p>'+
|
|
|
|
+ '</p>'+
|
|
|
|
+ '<strong>生成任务:</strong>'+
|
|
|
|
+ " 按 " +
|
|
|
|
+ '<select name="usageMethod" id="s3" class="styled-input">' +
|
|
|
|
+ '<option value="">请选择</option>' +
|
|
|
|
+ '<option value="创建计划">时间条件</option>' +
|
|
|
|
+ '<option value="创建计划2">事件条件</option>' +
|
|
|
|
+ '</select>' +
|
|
|
|
+ " <span id=\"span\">第 " +
|
|
|
|
+ '<input type="number" id="aa" name="specification" placeholder="请输入" class="styled-input" value="">' +
|
|
|
|
+ " 天生成任务 </span>"+' <a href="#" >添加过滤条件</a>' +
|
|
|
|
+ '<p>'+
|
|
|
|
+ '</p>'+
|
|
|
|
+ '<strong>任务动作:   </strong>'+
|
|
|
|
+ '<select name="usageMethod" id="s4" class="styled-input">' +
|
|
|
|
+ '<option value="创建">创建</option>' +
|
|
|
|
+ '</select>' +
|
|
|
|
+ '  ' +
|
|
|
|
+ '<select name="usageMethod" id="s5" class="styled-input">' +
|
|
|
|
+ '<option value="表单任务">表单任务</option>' +
|
|
|
|
+ '<option value="触达任务">触达任务</option>' +
|
|
|
|
+ '</select>' +
|
|
|
|
+ " 类型,由角色 " +
|
|
|
|
+ '<select name="usageMethod" id="s6" class="styled-input">' +
|
|
|
|
+ '<option value="药师">药师</option>' +
|
|
|
|
+ '</select>' +
|
|
|
|
+ ' 执行 '+
|
|
|
|
+ '<p>'+
|
|
|
|
+ '</p>'+
|
|
|
|
+ '<strong>执行任务: </strong>生成后第 '+
|
|
|
|
+ '<input type="number" name="specification" placeholder="请输入" class="styled-input" value="">' +
|
|
|
|
+ ' 天 ' +
|
|
|
|
+ '<input type="number" name="specification" placeholder="请输入" class="styled-input" value="">' +
|
|
|
|
+ ' 执行任务 ' +
|
|
|
|
+ '<p>'+
|
|
|
|
+ '</p>'+
|
|
|
|
+ '<strong>     </strong>随访主题 '+
|
|
|
|
+ '<select name="usageMethod" id="s7" class="styled-input">' +
|
|
|
|
+ '<option value="">请选择</option>' +
|
|
|
|
+ '<option value="用药指导">用药指导</option>' +
|
|
|
|
+ '<option value="脱落召回">脱落召回</option>' +
|
|
|
|
+ '</select>' +
|
|
|
|
+ '<p>'+
|
|
|
|
+ '</p>'+
|
|
|
|
+ '<strong>    </strong>任务有效期 '+
|
|
|
|
+ '<input type="number" name="specification" placeholder="请输入" class="styled-input" value="">' +
|
|
|
|
+ '<p>'+
|
|
|
|
+ '</p>'+
|
|
|
|
+ '<strong>     </strong>任务素材 '+
|
|
|
|
+ '<select name="usageMethod" id="1-" class="styled-input">' +
|
|
|
|
+ '<option value="表单">表单</option>' +
|
|
|
|
+ '</select>' +
|
|
|
|
+ '<p>'+
|
|
|
|
+ '</p>'+
|
|
|
|
+ '<strong>     </strong>使用表单 '+
|
|
|
|
+ '<select name="usageMethod" id="1-" class="styled-input">' +
|
|
|
|
+ '<option value="">请选择</option>' +
|
|
|
|
+ '<option value="用药指导">用药指导</option>' +
|
|
|
|
+ '<option value="脱落召回">脱落召回</option>' +
|
|
|
|
+ '</select>' +
|
|
|
|
+ '<p>'+
|
|
|
|
+ '</p>'+
|
|
|
|
+ '<strong>     </strong>下发渠道 '+
|
|
|
|
+ '<input type="radio" name="specification" class="form-check-radio" value="短信"> 短信 ' +
|
|
|
|
+ '<input type="radio" name="specification" class="form-check-radio" value="药师工作台"> 药师工作台 ' +
|
|
|
|
+ '</div>'+
|
|
|
|
+ '</div>';
|
|
|
|
+ // 添加到容器
|
|
|
|
+ var NodeSelect = '<li id="li-' + count + '" class="'+c+'"><a data-toggle="tab" href="#tab-' + count + '" aria-expanded="'+t+'"> ' +
|
|
|
|
+ '第' + count + '个选项卡<span class="close-tab" onclick="deleteNode(\'' + count + '\')"><i class="fa fa-times"></i></span></a></li>';
|
|
|
|
+ $('#addNode').append(addNode);
|
|
|
|
+ $('#addNodeSelect').append(NodeSelect);
|
|
|
|
+ count=count+1;
|
|
|
|
+ }
|
|
|
|
+ function doSubmit2(index, layero){
|
|
|
|
+ var rows = layero.find("iframe")[0].contentWindow.selectColumns2();
|
|
|
|
+ if (rows.length == 0) {
|
|
|
|
+ $.modal.alertWarning("请至少选择一条记录");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ rows.forEach(function(item, index) {
|
|
|
|
+ // 生成 ibox 容器
|
|
|
|
+ var ibox = '<div class="ibox" id="ibox-' + item.productId + '">' +
|
|
|
|
+ '<div class="ibox-title">' +
|
|
|
|
+ '<h5>' + item.mdmCode + ' - ' + item.productName + '</h5>' +
|
|
|
|
+ '<input name="isFlipItem" placeholder="是否为上翻品" id="isFlipItem-' + item.isFlipItem + '" class="styled-input3" type="hidden" value="' + item.isFlipItem + '">' +
|
|
|
|
+ '<input name="productId" placeholder="商品id" id="productId-' + item.productId + '" class="styled-input3" type="hidden" value="' + item.productId + '">' +
|
|
|
|
+ '<input name="genericName" placeholder="商品通用名" id="genericName-' + item.genericName + '" class="styled-input3" type="hidden" value="' + item.genericName + '">' +
|
|
|
|
+ '<input name="productName" placeholder="商品名" id="productName-' + item.productName + '" class="styled-input3" type="hidden" value="' + item.productName + '">' +
|
|
|
|
+ '<input name="mdmCode" placeholder="MD编码" id="mdmCode-' + item.mdmCode + '" class="styled-input3" type="hidden" value="' + item.mdmCode + '">' +
|
|
|
|
+ '<input name="specification" placeholder="规格" id="specification-' + item.specification + '" class="styled-input3" type="hidden" value="' + item.specification + '">' +
|
|
|
|
+ '</div>' +
|
|
|
|
+ '<div class="ibox-content">' +
|
|
|
|
+ '<table class="table table-bordered">' +
|
|
|
|
+ '<tbody>' +
|
|
|
|
+ '<tr>' +
|
|
|
|
+ '<td>MD编码:' + item.mdmCode + '</td>' +
|
|
|
|
+ '<td>商品名:' + item.productName + '</td>' +
|
|
|
|
+ '<td>通用名:' + item.genericName + '</td>' +
|
|
|
|
+ '<td>厂家:没有数据</td>' +
|
|
|
|
+ '<td><button onclick="deleteRow(\'' + item.productId + '\')" class="btn btn-danger">删除</button></td>' +
|
|
|
|
+ /*'<td>规格:' + item.specification[0] + '</td>' +*/
|
|
|
|
+ '</tr>' +
|
|
|
|
+ '</tbody>' +
|
|
|
|
+ '</table>' +
|
|
|
|
+ '</div>' +
|
|
|
|
+ '</div>';
|
|
|
|
+
|
|
|
|
+ // 添加到容器
|
|
|
|
+ $('#iboxContainer').append(ibox);
|
|
|
|
+ });
|
|
|
|
+ $.modal.close(index);
|
|
|
|
+ }
|
|
|
|
+ function deleteRow(productId) {
|
|
|
|
+ // 删除 ibox 容器
|
|
|
|
+ $('#ibox-' + productId).remove();
|
|
|
|
+
|
|
|
|
+ // 更新 productId 显示
|
|
|
|
+ $('#productId').html('');
|
|
|
|
+ }
|
|
|
|
+ function deleteNode(id) {
|
|
|
|
+ // 删除 ibox 容器
|
|
|
|
+ $('#li-' + id).remove();
|
|
|
|
+ $('#tab-' + id).remove();
|
|
|
|
+ count==id;
|
|
|
|
+ // 更新 productId 显示
|
|
|
|
+ $('#productId').html('');
|
|
|
|
+ }
|
|
</script>
|
|
</script>
|
|
|
|
+<style>
|
|
|
|
+ .hidden {
|
|
|
|
+ display: none;
|
|
|
|
+ }
|
|
|
|
+ .ibox {
|
|
|
|
+ width: 700px;
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+ border: 1px solid #e7eaec;
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ }
|
|
|
|
+ .ibox-title {
|
|
|
|
+ background-color: #f3f3f4;
|
|
|
|
+ border-bottom: 1px solid #e7eaec;
|
|
|
|
+ padding: 10px 15px;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ }
|
|
|
|
+ .ibox-content {
|
|
|
|
+ padding: 15px;
|
|
|
|
+ }
|
|
|
|
+ .ibox-content h4 {
|
|
|
|
+ margin-top: 0;
|
|
|
|
+ }
|
|
|
|
+ .customize-form-group2 {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ }
|
|
|
|
+ .styled-input2 {
|
|
|
|
+ padding: 5px;
|
|
|
|
+ border: 1px solid #ccc;
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ width: 200px;
|
|
|
|
+ }
|
|
|
|
+ .styled-input3 {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ padding: 5px;
|
|
|
|
+ border: 1px solid #ccc;
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ width: 100px;
|
|
|
|
+ }
|
|
|
|
+ .styled-input4 {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ padding: 5px;
|
|
|
|
+ border: 1px solid #ccc;
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ width: 100px;
|
|
|
|
+ }
|
|
|
|
+ .col-sm-6 {
|
|
|
|
+ width: 125%;
|
|
|
|
+ }
|
|
|
|
+ .form-horizontal .form-group {
|
|
|
|
+ margin-right: 384px;
|
|
|
|
+ margin-left: 3px;
|
|
|
|
+ }
|
|
|
|
+ input[type=file] {
|
|
|
|
+ display: none;
|
|
|
|
+ }
|
|
|
|
+ .form-group {
|
|
|
|
+ margin-bottom: -1px;
|
|
|
|
+ }
|
|
|
|
+ /* 添加一些基础样式 */
|
|
|
|
+ body {
|
|
|
|
+ font-family: Arial, sans-serif;
|
|
|
|
+ }
|
|
|
|
+ table {
|
|
|
|
+ width: 400px;
|
|
|
|
+ border-collapse: collapse;
|
|
|
|
+ }
|
|
|
|
+ th, td {
|
|
|
|
+ text-align: left;
|
|
|
|
+ padding: 8px;
|
|
|
|
+ border-bottom: 1px solid #ddd;
|
|
|
|
+ }
|
|
|
|
+ tr:nth-child(even) {
|
|
|
|
+ width: 15px;
|
|
|
|
+ background-color: #f2f2f2;
|
|
|
|
+ }
|
|
|
|
+</style>
|