<form id="app-form-add" lay-filter="app-form-add" class="layui-form model-form custome-height">
|
<input name="id" type="hidden"/>
|
<div style="display:flex">
|
<div class="layui-form-item">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 75px;">ID</label>
|
<div class="layui-input-block" id="id" />
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label">类型</label>
|
<div class="layui-input-block" id="leixing"/>
|
</div>
|
</div>
|
</div>
|
<div style="display:flex">
|
<div class="layui-form-item">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 75px;">创建时间</label>
|
<div class="layui-input-block" id="createTime" style="width: 245px;"/>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label">咨询状态</label>
|
<div class="layui-input-block" id="service"/>
|
</div>
|
</div>
|
</div>
|
<div style="display:flex">
|
<div class="layui-form-item">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 80px;">咨询医生</label>
|
<div class="layui-input-block" id="doctor" style="width: 245px;"/>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 80px;">咨询客户</label>
|
<div class="layui-input-block" id="customer"/>
|
</div>
|
</div>
|
</div>
|
<div style="display:flex">
|
<div class="layui-form-item">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 80px;">问题描述</label>
|
<div style="width: 500px; padding-left: 40px; overflow: auto; max-height: 100px" id="problem"/>
|
</div>
|
</div>
|
</div>
|
<div style="display:flex">
|
<div class="layui-form-item">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 10px;"></label>
|
<div style="width: 450px;max-height:100px; min-height: 10px; padding-left: 40px; text-align: left" id="img"/>
|
</div>
|
</div>
|
</div>
|
<div style="display:flex">
|
<div class="layui-form-item">
|
<div class="layui-inline">
|
<label class="layui-form-label">档案信息</label><br/>
|
<div class="layui-input-block" style="width: 500px;margin-left:40px;">
|
<table border="1" style="width:100%; margin-top: 15px;">
|
<tr>
|
<td style="text-align: center">年龄/性别</td>
|
<td style="text-align: center">靶身高/百分位</td>
|
<td style="text-align: center">身高/百分位</td>
|
<td style="text-align: center">体重/bmi</td>
|
<td style="text-align: center">预测身高</td>
|
</tr>
|
<tr>
|
<td style="text-align: center" id="one"></td>
|
<td style="text-align: center" id="two"></td>
|
<td style="text-align: center" id="three"></td>
|
<td style="text-align: center" id="four"></td>
|
<td style="text-align: center" id="five"></td>
|
</tr>
|
</table>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div style="display:flex">
|
<div class="layui-form-item">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 80px;">预约时间</label>
|
<div class="layui-input-block" style="width: 200px;" id="appointmentTime">
|
</div>
|
</div>
|
</div>
|
</div>
|
<div style="display:flex">
|
<div class="layui-form-item">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 80px;">支付状态</label>
|
<div class="layui-input-block" id="pay">
|
</div>
|
</div>
|
</div>
|
</div>
|
<div style="display:flex">
|
<div class="layui-form-item">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 80px;">用户评价</label>
|
<div class="layui-input-block" id="pj">
|
</div>
|
</div>
|
</div>
|
</div>
|
<div style="display:flex">
|
<div class="layui-form-item">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 80px;">用户电话</label>
|
<div class="layui-input-block" id="phone">
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="layui-form-item model-form-footer">
|
<button class="layui-btn layui-btn-primary" ew-event="closeDialog" type="button">关闭</button>
|
</div>
|
</form>
|
|
<script>
|
layui.use(['form', 'laydate', 'util', 'config', 'admin', 'autocomplete', 'formSelects'], function () {
|
var form = layui.form;
|
var admin = layui.admin;
|
var $ = layui.jquery;
|
|
form.render();
|
|
var adisory = admin.getTempData('t_adisory');
|
if (adisory) {
|
$("#id").html(adisory.advisoryId);
|
|
if (adisory.type == 1) {
|
$("#leixing").html("图文");
|
} else if (adisory.type == 2) {
|
$("#leixing").html("电话");
|
} else {
|
$("#leixing").html("图文/电话");
|
}
|
|
$("#createTime").html(adisory.createTime);
|
|
if (adisory.consultationStatus == 1) {
|
$("#service").html("待咨询");
|
} else if (adisory.consultationStatus == 2) {
|
$("#service").html("咨询中");
|
} else if (adisory.consultationStatus == 3) {
|
$("#service").html("待完成");
|
} else if (adisory.consultationStatus == 4) {
|
$("#service").html("已完成");
|
} else if (adisory.consultationStatus == -1) {
|
$("#service").html("已取消");
|
}
|
|
$("#doctor").html(adisory.doctorName);
|
$("#customer").html(adisory.userName);
|
$("#problem").html(adisory.question);
|
|
var content = '';
|
if (adisory.img !== null) {
|
var url = adisory.img.split(",");
|
for (var i = 0; i < url.length; i++) {
|
if(url[i] != ''){
|
content += "<img src='" + url[i] + "' style='width: 25%;max-height: 120px;cursor:pointer;' onclick='tipImg(this,1)'/> ";
|
}
|
}
|
}
|
$("#img").html(content);
|
|
$("#one").html(adisory.age + "/" + adisory.childSex == 0 ? "女" : "男");
|
$("#two").html(keepOneDecimal(adisory.targetHeight) + "/" + keepOneDecimal(adisory.targetHeightPer));
|
$("#three").html(keepOneDecimal(adisory.height) + "/" + keepOneDecimal(adisory.heightPer));
|
$("#four").html(keepOneDecimal(adisory.weight) + "/" + keepOneDecimal(adisory.bmi));
|
$("#five").html(keepOneDecimal(adisory.foreastHeight));
|
|
if(adisory.type == 2) {
|
$("#appointmentTime").html(adisory.appointmentTime);
|
var b = '';
|
if (adisory.payStatus == 0) {
|
b = "待支付";
|
} else if (adisory.payStatus == 1) {
|
b = "已支付";
|
} else {
|
b = "已退款";
|
}
|
$("#pay").html((adisory.money / 100) + " " + b);
|
}
|
$("#phone").html(adisory.moblie);
|
$("#pj").html(adisory.reason);
|
|
form.render();
|
}
|
});
|
|
function tipImg(obj,level){
|
try{
|
var navigatorName = "Microsoft Internet Explorer";
|
if( navigator.appName != navigatorName ){
|
if(obj.nodeName == 'IMG'){
|
var e = window.event;
|
var src = obj.src;
|
var width = obj.naturalWidth/3;
|
var height = obj.naturalHeight/3;
|
var x = (document.documentElement.clientWidth-width)/2;
|
var y = (document.documentElement.clientHeight-height)/2;
|
var curlayer;
|
if(!level){
|
curlayer = layer;
|
}else if(level==1){
|
curlayer = parent.layer;
|
}
|
|
var img_infor = "<img width='" + width + "' height='" + height + "' border='0' src='" + src + "' />";
|
bigImgIndex = curlayer.open({
|
content:img_infor,
|
type:1,
|
offset:[y+"px",x+"px"],
|
title:false,
|
area:['auto','auto'],
|
shade:0,
|
closeBtn:1
|
});
|
}
|
}
|
}catch(e){
|
}
|
|
}
|
|
function keepOneDecimal(obj){
|
if(obj == '' || obj == null){
|
return "";
|
}
|
if(isNaN(obj)){
|
return obj;
|
}
|
return parseFloat(obj).toFixed(1);
|
}
|
</script>
|