فهرست منبع

Merge branch 'dev' of huangwenjie/patient-co-management into dev

yeshijie 7 سال پیش
والد
کامیت
89bb717168

+ 11 - 4
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/datastatic/PrescriptionStaticController.java

@ -7,10 +7,7 @@ import jxl.Workbook;
import jxl.write.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@ -35,6 +32,16 @@ public class PrescriptionStaticController extends BaseController {
		return "prescription/prescription_list";
	}
	
	@RequestMapping(value = "infoInit/{code}",method = RequestMethod.GET)
	public String infoInit(@PathVariable(value = "code") String code){
		return "prescription/prescription_info";
	}
	
	@RequestMapping(value = "orderInit/{code}",method = RequestMethod.GET)
	public String orderInit(@PathVariable(value = "code") String code){
		return "prescription/prescription_order";
	}
	
	@RequestMapping(value = "list")
	@ResponseBody
	public String searchPatientList(

+ 246 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_info.jsp

@ -0,0 +1,246 @@
<%@ page contentType="text/html; charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <%@ include file="../head/page_head.jsp"%>
    <title>续方详情</title>
</head>
<style>
    .m-form-group label.label_title {
        width: 100px
    }
    .fd-label{
        font-size: 12px;
        font-weight: bold!important;
    }
    .fd-input{
        width: 150px;
        border: none;
        font-size: 12px;
        height: 30px;
        margin-bottom: 5px;
    }
    .fd-padl{
        margin-left: 24px;
    }
    .fd-autoh{
        height: auto;
    }
    .fd-pd{
        padding: 35px 35px 10px 35px;
    }
    .fd-group{
        display: -webkit-box;
        display: -moz-box;
        display: -ms-flexbox;
        display: flex;
    }
    .fd-img img{
        width: 100px;
        height: 100px;
        margin-right: 20px;
    }
    .fd-img img:last-child{
        margin-right: 0px;
    }
    .fd-file{
        font-size: 12px;
        font-weight: bold;
        padding-left: 35px;
        padding-right: 10px;
        display: -webkit-box;
        -webkit-box-align: center;
        display: -moz-box;
        -moz-box-align: center;
        display: -ms-flexbox;
        -ms-flex-align: center;
        display: flex;
        align-items: center;
    }
    .no-img{
        display: -webkit-box;
        -webkit-box-align: center;
        display: -moz-box;
        -moz-box-align: center;
        display: -ms-flexbox;
        -ms-flex-align: center;
        display: flex;
        align-items: center;
    }
    .fd-bttn{
        width: 100px;
        height: 35px;
        display: block;
        margin:40px auto 0px;
        background-color: #b9c8d2;
        color: #fff;
        line-height: 35px;
        text-align: center;
    }
    .ad-padd{
        height: 280px;
        width: 100%;
        padding: 10px;
        border: solid 1px #dcdcdc;
        border-radius: 2px;
        font-size: 12px;
    }
    .ad-padd::-webkit-input-placeholder{
        color:#ccc;
    }
    .ad-padd::-moz-placeholder{
        color:#ccc;
    }
    .ad-padd:-moz-placeholder{
        color:#ccc;
    }
    .ad-padd:-ms-input-placeholder{
        color:#ccc;
    }
    .ad-result{
        margin: 20px 35px 0px 35px;
        border-top: solid 1px #ccc;
        padding-top:10px ;
    }
    .ad-label{
        text-align: left!important;
        padding-left: 0px!important;
        font-weight: bold!important;
    }
    .ad-pd{
        padding-top: 35px;
    }
</style>
<body>
<div id="div_roles_info_form" class="m-form-inline f-mt20" data-role-form>
    <div id="detail">
        <div style="margin-left:10px;">
            <label class="label_title fd-label">原处方记录</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">开方时间:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">开方医生:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="min-length-6 validate-special-char" />
            </div>
        </div>
        <div class="m-form-group" style="">
            <label class="label_title fd-label">科室/医生</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
            </div>
        </div>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">居民信息</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">续方居民:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">医保卡号:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="min-length-6 validate-special-char" />
            </div>
        </div>
        <div class="m-form-group" style="">
            <label class="label_title fd-label">身份证号</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
            </div>
        </div>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">临床诊断</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">续方居民:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
        </div>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">RP.</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">药品名称1 </label>
            <label class="label_title fd-label"> 用法:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">总量:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">规格:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
        </div>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">续方信息</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">续方状态:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">续方说明:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
        </div>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">审核记录</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">申请时间:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">审核医生:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="min-length-6 validate-special-char" />
            </div>
        </div>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">审核机构:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
            </div>
            <label class="label_title fd-label">审核医生:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
            </div>
        </div>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">结果:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
            </div>
        </div>
    </div>
</div>
</body>
<%@ include file="../head/page_foot.jsp" %>
<%@ include file="prescription_info_js.jsp" %>
</html>

+ 163 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_info_js.jsp

@ -0,0 +1,163 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<script>
    (function ($, win) {
        $(function () {
            /* ************************** 变量定义 ******************************** */
            var Util = $.Util;
            var rolesInfo = null;
            // 表单校验工具类
            var jValidation = $.jValidation;
            var dialog = frameElement.dialog;
            /* *************************** 函数定义 ******************************* */
            function pageInit() {
                rolesInfo.init();
                $('#image').on('click','img',function(){
                    var imgSrc = $(this).attr('src');
                    var html = '<img src="'+imgSrc+'" alt="."/>';
                    var imgView =  $('#fd-img-view', parent.document);
                    imgView.find('.fd-img-show').html(html);
                    imgView.show();
                })
            }
            /* *************************** 模块初始化 ***************************** */
            rolesInfo = {
                dealDialog:null,
                $type: $("#type"),//申诉类型
                $name: $("#name"),//姓名
                $identity:$("#identity"),//身份
                $phone:$("#phone"),//联系方式
                $createTime:$("#createTime"),//时间
                $idcard:$("#idcard"),//身份证
                $description:$("#description"),//申诉详情
                $result:$("#result1"),//处理结果
                $btndeal: $("#deal"),//处理按钮
                $btnclose: $("#close"),//关闭按钮
                $image:$("#image"),
                init: function () {
                    _this = this;
                    var id = $("#id").val();
                    //id不为空,初始化数据
                    if (isNoEmpty(id)) {
                        $.ajax({
                            url: ctx + "/admin/appeal/getAppealById",
                            method: "post",
                            dataType: "json",
                            data: {id: id},
                            success: function (result) {
                                if (result.status == '200') {
                                    var data = result.data;
                                    if(data.type==1){
                                        _this.$type.val("手机号变更");
                                    }else if(data.type==2){
                                        _this.$type.val("重置密码");
                                    }else{
                                        _this.$type.val("其他");
                                    }
                                    _this.$name.val(data.name);
                                    if(data.identity==1){
                                        _this.$identity.val("患者")
                                    }else{
                                        _this.$identity.val("医生")
                                    }
                                    _this.$phone.val(data.phone);
                                    _this.$idcard.val(data.idcard);
                                    _this.$createTime.val(data.createTime);
                                    _this.$description.val(data.description);
                                    if (isNoEmpty(data.result)) {
                                        _this.$result.val(data.result);
                                        $("#dealResult").show();
                                        $("#deal").hide();
                                    }
                                    if(data.images){
                                        var arr = data.images.split(',');
                                        var html="";
                                        for(var i=0;i<arr.length;i++){
                                            html += '<img src="'+data.imgUrlDomain+arr[i]+'" alt="."/>';
                                        }
                                        _this.$image.html(html);
                                    }else{
                                        var html='<span class="no-img">没有上传图片</span>';
                                        _this.$image.html(html);
                                    }
                                }else{
                                    $.Notice.error(result.msg);
                                }
                            },
                        })
                    }
                    this.bindEvents();
                },
                bindEvents: function () {
                    $("#deal").click(function () {
                        $("#dealDiv").show();
                        dialog.set('title', '处理结果');
                        $("#detail").hide();
                    });
                    $("#close").click(function () {
                        parent.window.closeParentInfoDialog();
                    });
                    $("#sure").click(function () {
                        $("#sure").css("pointer-events", "none");
                        var result = $("#result").val();
                        var id = $("#id").val();
                        if (isNoEmpty(result)) {
                            if(result.length>400){
                                $.Notice.error("最多只能填写400个字");
                                $("#sure").css("pointer-events", "");
                            }else {
                                $.ajax({
                                    url: ctx + "/admin/appeal/dealAppeal",
                                    method: "post",
                                    dataType: "json",
                                    data: {id: id,
                                        result:result
                                    },
                                    success: function (result) {
                                        if (result.status == '200') {
                                            //todo  操作成功后的处理
                                            alert("操作成功");
                                            parent.window.closeParentInfoDialog();
                                        }else{
                                            $.Notice.error(result.msg);
                                            $("#sure").css("pointer-events", "");
                                        }
                                    },
                                })
                            }
                        }else{
                            //todo
                            $.Notice.error("请输入处理结果");
                            $("#sure").css("pointer-events", "");
                        }
                    });
                    $("#cancle").click(function () {
                        $("#dealDiv").hide();
                        dialog.set('title', '查看');
                        $("#detail").show();
                    });
                }
            };
            /* ************************* Dialog页面回调接口 ************************** */
            win.reloadRolesInfoGrid = function (msg) {
                if (isNoEmpty(msg)) {
                    $.Notice.success(msg);
                }
                rolesInfo.reloadGrid(msg);
            };
            win.closeInfoDialog = function () {
                rolesInfo.dealDialog.close();
            };
            win.closeParentDealDialog = function () {
                rolesInfo.dealDialog.close();
                rolesInfo.reloadGrid();
            };
            /* *************************** 页面初始化 **************************** */
            pageInit();
        })
    })(jQuery, window);
</script>

+ 27 - 8
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_list_js.jsp

@ -26,11 +26,8 @@
            retrieve = {
                $element: $('.m-retrieve-area'),
                patientInfoDialog: null,
                remindInfoDialog:null,
                $noReply: $('#noReply'),
                $count: $('#count'),
                $rate: $('#rate'),
                prescriptionInfoDialog: null,
                prescriptionOrderDialog: null,
                grid: null,
                url: {
                    //接口链接
@ -128,7 +125,7 @@
                            {text: '支付成功/待配药', statusId: '50'},
                            {text: '配药成功/待配送', statusId: '60'},
                            {text: '配送中', statusId: '65'},
                            {text: '药品已配送', statusId: '69'},
                            {text: '药品到服务站', statusId: '69'},
                            {text: '配送到患者手中/已完成', statusId: '100'},
                            {text: '线下退费', statusId: '-4'},
                            {text: '支付超时', statusId: '-3'},
@ -223,10 +220,11 @@
                            {display: '配送方式', name: 'pay', align: "center"},
                            {display: '时间', name: 'create_time', width: '12%', align: "center"},
                            {
                                display: '操作', name: 'operator', width: '15%', align: "center", isSort: false,
                                display: '操作', name: 'operator', width: '20%', align: "center", isSort: false,
                                render: function (row) {
                                    var html = '';
                                    html += '<a  href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}'])", "patient:info:view", row.id) + '">查看</a>';
                                    html += '<a  href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}'])", "prescription:info:view", row.prescription_code) + '">续方详情</a>';
                                    html += '<a  style="margin-left:10px;" href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}'])", "prescription:order:view", row.prescription_code) + '">订单跟踪</a>';
                                    return html;
                                }
                            }
@ -303,6 +301,27 @@
                },
                bindEvents: function () {
                    var me = this;
                    $.subscribe('prescription:info:view', function (event, code) {
                        var title = '续方详情';
                        me.prescriptionInfoDialog = $.ligerDialog.open({
                            height: 600,
                            width: 900,
                            title: title,
                            url: ctx + '/admin/static/prescription/infoInit/' + code
                        })
                    });
                    $.subscribe('prescription:order:view', function (event, code) {
                        var title = '订单跟踪';
                        me.prescriptionOrderDialog = $.ligerDialog.open({
                            height: 600,
                            width: 900,
                            title: title,
                            url: ctx + '/admin/static/prescription/orderInit/' + code
                        })
                    });
                    //城市下拉
                    me.$inpDeviceName.on( 'change', function () {
                        me.setCityFun(me);

+ 221 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_order.jsp

@ -0,0 +1,221 @@
<%@ page contentType="text/html; charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <%@ include file="../head/page_head.jsp"%>
    <title>订单跟踪</title>
</head>
<style>
    .m-form-group label.label_title {
        width: 100px
    }
    .fd-label{
        font-size: 12px;
        font-weight: bold!important;
    }
    .fd-input{
        width: 150px;
        border: none;
        font-size: 12px;
        height: 30px;
        margin-bottom: 5px;
    }
    .fd-padl{
        margin-left: 24px;
    }
    .fd-autoh{
        height: auto;
    }
    .fd-pd{
        padding: 35px 35px 10px 35px;
    }
    .fd-group{
        display: -webkit-box;
        display: -moz-box;
        display: -ms-flexbox;
        display: flex;
    }
    .fd-img img{
        width: 100px;
        height: 100px;
        margin-right: 20px;
    }
    .fd-img img:last-child{
        margin-right: 0px;
    }
    .fd-file{
        font-size: 12px;
        font-weight: bold;
        padding-left: 35px;
        padding-right: 10px;
        display: -webkit-box;
        -webkit-box-align: center;
        display: -moz-box;
        -moz-box-align: center;
        display: -ms-flexbox;
        -ms-flex-align: center;
        display: flex;
        align-items: center;
    }
    .no-img{
        display: -webkit-box;
        -webkit-box-align: center;
        display: -moz-box;
        -moz-box-align: center;
        display: -ms-flexbox;
        -ms-flex-align: center;
        display: flex;
        align-items: center;
    }
    .fd-bttn{
        width: 100px;
        height: 35px;
        display: block;
        margin:40px auto 0px;
        background-color: #b9c8d2;
        color: #fff;
        line-height: 35px;
        text-align: center;
    }
    .ad-padd{
        height: 280px;
        width: 100%;
        padding: 10px;
        border: solid 1px #dcdcdc;
        border-radius: 2px;
        font-size: 12px;
    }
    .ad-padd::-webkit-input-placeholder{
        color:#ccc;
    }
    .ad-padd::-moz-placeholder{
        color:#ccc;
    }
    .ad-padd:-moz-placeholder{
        color:#ccc;
    }
    .ad-padd:-ms-input-placeholder{
        color:#ccc;
    }
    .ad-result{
        margin: 20px 35px 0px 35px;
        border-top: solid 1px #ccc;
        padding-top:10px ;
    }
    .ad-label{
        text-align: left!important;
        padding-left: 0px!important;
        font-weight: bold!important;
    }
    .ad-pd{
        padding-top: 35px;
    }
</style>
<body>
<div class="m-form-inline f-mt20" data-role-form>
    <div id="detail">
        <div style="margin-left:10px;">
            <label class="label_title fd-label">续方记录</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">申请时间:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">审核医生:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="min-length-6 validate-special-char" />
            </div>
        </div>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">收药信息</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">配送方式:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">配送地点:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="min-length-6 validate-special-char" />
            </div>
        </div>
        <div class="m-form-group" style="">
            <label class="label_title fd-label">居民姓名</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
            </div>
            <label class="label_title fd-label">居民电话</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
            </div>
        </div>
        <div class="m-form-group" style="">
            <label class="label_title fd-label">配送员</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
            </div>
            <label class="label_title fd-label">服务站地址</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
            </div>
        </div>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">订单记录</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">订单状态:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">订单号:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">订单跟踪:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">出药机构:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
        </div>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">药品信息.</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">药品名称1 </label>
            <label class="label_title fd-label"> 用法:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">总量:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">规格:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
        </div>
    </div>
</div>
</body>
<%@ include file="../head/page_foot.jsp" %>
<%@ include file="prescription_order_js.jsp" %>
</html>

+ 163 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_order_js.jsp

@ -0,0 +1,163 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<script>
    (function ($, win) {
        $(function () {
            /* ************************** 变量定义 ******************************** */
            var Util = $.Util;
            var rolesInfo = null;
            // 表单校验工具类
            var jValidation = $.jValidation;
            var dialog = frameElement.dialog;
            /* *************************** 函数定义 ******************************* */
            function pageInit() {
                rolesInfo.init();
                $('#image').on('click','img',function(){
                    var imgSrc = $(this).attr('src');
                    var html = '<img src="'+imgSrc+'" alt="."/>';
                    var imgView =  $('#fd-img-view', parent.document);
                    imgView.find('.fd-img-show').html(html);
                    imgView.show();
                })
            }
            /* *************************** 模块初始化 ***************************** */
            rolesInfo = {
                dealDialog:null,
                $type: $("#type"),//申诉类型
                $name: $("#name"),//姓名
                $identity:$("#identity"),//身份
                $phone:$("#phone"),//联系方式
                $createTime:$("#createTime"),//时间
                $idcard:$("#idcard"),//身份证
                $description:$("#description"),//申诉详情
                $result:$("#result1"),//处理结果
                $btndeal: $("#deal"),//处理按钮
                $btnclose: $("#close"),//关闭按钮
                $image:$("#image"),
                init: function () {
                    _this = this;
                    var id = $("#id").val();
                    //id不为空,初始化数据
                    if (isNoEmpty(id)) {
                        $.ajax({
                            url: ctx + "/admin/appeal/getAppealById",
                            method: "post",
                            dataType: "json",
                            data: {id: id},
                            success: function (result) {
                                if (result.status == '200') {
                                    var data = result.data;
                                    if(data.type==1){
                                        _this.$type.val("手机号变更");
                                    }else if(data.type==2){
                                        _this.$type.val("重置密码");
                                    }else{
                                        _this.$type.val("其他");
                                    }
                                    _this.$name.val(data.name);
                                    if(data.identity==1){
                                        _this.$identity.val("患者")
                                    }else{
                                        _this.$identity.val("医生")
                                    }
                                    _this.$phone.val(data.phone);
                                    _this.$idcard.val(data.idcard);
                                    _this.$createTime.val(data.createTime);
                                    _this.$description.val(data.description);
                                    if (isNoEmpty(data.result)) {
                                        _this.$result.val(data.result);
                                        $("#dealResult").show();
                                        $("#deal").hide();
                                    }
                                    if(data.images){
                                        var arr = data.images.split(',');
                                        var html="";
                                        for(var i=0;i<arr.length;i++){
                                            html += '<img src="'+data.imgUrlDomain+arr[i]+'" alt="."/>';
                                        }
                                        _this.$image.html(html);
                                    }else{
                                        var html='<span class="no-img">没有上传图片</span>';
                                        _this.$image.html(html);
                                    }
                                }else{
                                    $.Notice.error(result.msg);
                                }
                            },
                        })
                    }
                    this.bindEvents();
                },
                bindEvents: function () {
                    $("#deal").click(function () {
                        $("#dealDiv").show();
                        dialog.set('title', '处理结果');
                        $("#detail").hide();
                    });
                    $("#close").click(function () {
                        parent.window.closeParentInfoDialog();
                    });
                    $("#sure").click(function () {
                        $("#sure").css("pointer-events", "none");
                        var result = $("#result").val();
                        var id = $("#id").val();
                        if (isNoEmpty(result)) {
                            if(result.length>400){
                                $.Notice.error("最多只能填写400个字");
                                $("#sure").css("pointer-events", "");
                            }else {
                                $.ajax({
                                    url: ctx + "/admin/appeal/dealAppeal",
                                    method: "post",
                                    dataType: "json",
                                    data: {id: id,
                                        result:result
                                    },
                                    success: function (result) {
                                        if (result.status == '200') {
                                            //todo  操作成功后的处理
                                            alert("操作成功");
                                            parent.window.closeParentInfoDialog();
                                        }else{
                                            $.Notice.error(result.msg);
                                            $("#sure").css("pointer-events", "");
                                        }
                                    },
                                })
                            }
                        }else{
                            //todo
                            $.Notice.error("请输入处理结果");
                            $("#sure").css("pointer-events", "");
                        }
                    });
                    $("#cancle").click(function () {
                        $("#dealDiv").hide();
                        dialog.set('title', '查看');
                        $("#detail").show();
                    });
                }
            };
            /* ************************* Dialog页面回调接口 ************************** */
            win.reloadRolesInfoGrid = function (msg) {
                if (isNoEmpty(msg)) {
                    $.Notice.success(msg);
                }
                rolesInfo.reloadGrid(msg);
            };
            win.closeInfoDialog = function () {
                rolesInfo.dealDialog.close();
            };
            win.closeParentDealDialog = function () {
                rolesInfo.dealDialog.close();
                rolesInfo.reloadGrid();
            };
            /* *************************** 页面初始化 **************************** */
            pageInit();
        })
    })(jQuery, window);
</script>

+ 46 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/jimeiJkEdu/DoctorJMJkEduArticleController.java

@ -253,7 +253,7 @@ public class DoctorJMJkEduArticleController extends BaseController {
     * @param firstLevelCategoryId
     * @param secondLevelCategoryId
     * @param insertTimeStart
     * @param insertTimeEnd
     * @param insertTimeEnds
     * @param articlelevel
     * @param articleTitle
     * @return
@ -272,10 +272,10 @@ public class DoctorJMJkEduArticleController extends BaseController {
                                      @RequestParam(value = "articlelevel", required = false) String articlelevel,
                                      @ApiParam(name = "articleTitle", value = "文章标题关键字")
                                      @RequestParam(value = "articleTitle", required = false) String articleTitle,
//                                      @ApiParam(name = "currentUserRole", value = "当前登录的角色")
//                                      @RequestParam(value = "currentUserRole", required = true) String currentUserRole,
//                                      @ApiParam(name = "currentUserRoleLevel", value = "当前登录的角色级别")
//                                      @RequestParam(value = "currentUserRoleLevel", required = true )String currentUserRoleLevel,
                                      @ApiParam(name = "currentUserRole", value = "当前登录的角色")
                                      @RequestParam(value = "currentUserRole", required = true) String currentUserRole,
                                      @ApiParam(name = "currentUserRoleLevel", value = "当前登录的角色级别",defaultValue = "4")
                                      @RequestParam(value = "currentUserRoleLevel", required = false ,defaultValue = "4")String currentUserRoleLevel,
                                      @ApiParam(name = "isAuthentication", value = "是否认证")
                                      @RequestParam(value = "isAuthentication", required = false) String isAuthentication,
                                      @ApiParam(name = "isMyArticle", value = "是否过滤我的文章")
@ -287,8 +287,9 @@ public class DoctorJMJkEduArticleController extends BaseController {
        try {
            
            
            JSONObject response = jmJkEduArticleService.queryArticlePcList(firstLevelCategoryId,secondLevelCategoryId,insertTimeStart,insertTimeEnd,articlelevel,articleTitle,
                    getUID(),getCurrentRoleCode(),getCurrentRoleLevel(),isAuthentication,isMyArticle,page,pageSize);
                    getUID(),currentUserRole,currentUserRoleLevel,isAuthentication,isMyArticle,page,pageSize);
            
            return write(200,"查询成功!","data",response);
        } catch (Exception e){
@ -296,6 +297,45 @@ public class DoctorJMJkEduArticleController extends BaseController {
            return error(-1,"查询失败!");
        }
    }
    
    @RequestMapping(value = "saveArticle", method = RequestMethod.POST)
    @ApiOperation("添加文章")
    public  String saveArticle(@ApiParam(name = "articleId", value = "文章Id")
                               @RequestParam(value = "articleId", required = false) String articleId,
                               @ApiParam(name = "articleTitle", value = "文章标题")
                               @RequestParam(value = "articleTitle", required = true) String articleTitle,
                               @ApiParam(name = "articleType", value = "文章类型")
                               @RequestParam(value = "articleType", required = true) String articleType,
                               @ApiParam(name = "articlelevel", value = "文章级别")
                               @RequestParam(value = "articlelevel", required = true) Integer articlelevel,
                               @ApiParam(name = "secondLevelCategoryId", value = "文章二级分类id")
                               @RequestParam(value = "secondLevelCategoryId", required = true) String secondLevelCategoryId,
                               @ApiParam(name = "secondLevelCategoryName", value = "文章二级分类名称")
                               @RequestParam(value = "secondLevelCategoryName", required = true) String secondLevelCategoryName,
                               @ApiParam(name = "firstLevelCategoryId", value = "文章一级分类id")
                               @RequestParam(value = "firstLevelCategoryId", required = true) String firstLevelCategoryId,
                               @ApiParam(name = "firstLevelCategoryName", value = "文章一级分类名称")
                               @RequestParam(value = "firstLevelCategoryName", required = true) String firstLevelCategoryName,
                               @ApiParam(name = "content", value = "文章内容")
                               @RequestParam(value = "content", required = true) String content,
                               @ApiParam(name = "imageUrl", value = "文章封面图片地址")
                               @RequestParam(value = "imageUrl", required = true) String imageUrl,
                               @ApiParam(name = "currentUserRole", value = "当前登录的角色")
                               @RequestParam(value = "currentUserRole", required = true) String currentUserRole,
                               @ApiParam(name = "currentUserRoleLevel", value = "当前登录的角色级别",defaultValue = "4")
                               @RequestParam(value = "currentUserRoleLevel", required = false ,defaultValue = "4")String currentUserRoleLevel,
                               @ApiParam(name = "userScope", value = "使用范围(1、全市使用,2、全区使用,3、全社区使用)")
                               @RequestParam(value = "userScope", required = true) Integer userScope){
        
        try {
            jmJkEduArticleService.saveArticle(getUID(),articleTitle,articleType,articlelevel,secondLevelCategoryId,imageUrl,
                    secondLevelCategoryName,firstLevelCategoryId,firstLevelCategoryName,content,currentUserRole,currentUserRoleLevel,userScope,articleId);
            return success("添加成功!");
        }catch (Exception e){
            e.printStackTrace();
            return error(-1,"添加失败!");
        }
    }
    /*************************************************************************医生角色end***************************************************************************************************/

+ 5 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/jkEduArticle/ThirdJkEduArticleController.java

@ -1,17 +1,16 @@
package com.yihu.wlyy.web.third.jkEduArticle;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.service.third.jkEduArticle.ThirdJkEduArticleService;
import com.yihu.wlyy.web.BaseController;
import com.yihu.wlyy.web.third.gateway.service.GcEduArticleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
@ -252,6 +251,10 @@ public class ThirdJkEduArticleController extends BaseController {
                }
                if(StringUtils.isNotBlank(cid)){
                    response = thirdJkEduArticleService.getCategoryList(2,cid,"");
                    com.alibaba.fastjson.JSONObject  result =  new JSONObject();
                    result.put("cid",cid);
                    result.put("list",response);
                    return write(200,"查询成功!","data",result);
                }else{
                    response = new JSONArray();
                }