<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
|
<style>
|
#formAdvForm {
|
background-color: #f3f3f3;
|
}
|
#formAdvForm .layui-form-item {
|
margin-top: 20px;
|
margin-bottom: 0;
|
}
|
|
#formAdvForm .layui-form-item .layui-inline {
|
margin-bottom: 25px;
|
margin-right: 0;
|
}
|
|
.form-group-bottom {
|
position: fixed;
|
left: 0;
|
right: 0;
|
bottom: 0;
|
padding: 10px 20px;
|
background-color: #fff;
|
box-shadow: 0 -1px 2px 0 rgba(0, 0, 0, .05);
|
}
|
|
.card-body-item {
|
display: inline-block;
|
border-right: 1px solid #e0e0e0;
|
width: 250px;
|
padding: 0 30px 0 10px;
|
}
|
.header-desc {
|
overflow:hidden;
|
white-space: nowrap;
|
text-overflow: ellipsis;
|
-o-text-overflow:ellipsis;
|
}
|
|
</style>
|
<!-- 正文开始 -->
|
<form class="layui-form" id="formAdvForm" lay-filter="formAdvForm" style="height: 100%">
|
<div class="layui-fluid" style="padding-bottom: 75px;height: 100%; overflow: scroll;box-sizing: border-box">
|
<!-- 标题 -->
|
<div class="layui-card">
|
<div class="layui-card-header" style="padding-top: 5px; padding-bottom: 5px">
|
<div>
|
<i class="layui-icon" style="font-size: 20px;color: #1890ff;font-weight: bold"></i>
|
<span id="form-name" style="margin: 0 6px;font-size: 18px;font-weight: bold;letter-spacing: 1px"></span>
|
<span style="opacity: .5;font-size: small;margin-left: 5px">报价单</span>
|
</div>
|
</div>
|
<div class="layui-card-body" style="padding: 30px 20px">
|
|
<div class="layui-tab layui-steps">
|
<ul class="layui-tab-title" id="stepBox">
|
</ul>
|
</div>
|
|
</div>
|
</div>
|
<div class="layui-row">
|
<!-- 数据 -->
|
<!-- <div class="layui-col-md9">-->
|
<!-- <div class="layui-card">-->
|
<!-- <div class="layui-card-header">-->
|
<!-- 基本信息-->
|
<!-- </div>-->
|
<!-- <div class="layui-card-body">-->
|
|
<!-- </div>-->
|
<!-- </div>-->
|
<!-- </div>-->
|
<!-- 动态 -->
|
<!-- <div class="layui-col-md3" style="width: 24%;margin-left: 1%">-->
|
<div class="layui-col-md3" style="width: 100%;">
|
<!-- 时间线 -->
|
<div class="layui-card">
|
<div class="layui-card-header">
|
<span>流程动态</span>
|
</div>
|
<div class="layui-card-body">
|
<ul class="layui-timeline" id="timelineBox">
|
</ul>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
|
<div class="form-group-bottom text-right">
|
<button class="layui-btn" lay-filter="refresh" lay-submit><i class="layui-icon"></i> 刷新 </button>
|
</div>
|
|
</form>
|
|
<script type="text/html" id="followerTabOperate">
|
<a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="del">删除</a>
|
</script>
|
|
<!-- 跟进人 -->
|
<script type="text/html" id="followerEditDialog">
|
<form id="followerEditForm" lay-filter="followerEditForm" class="layui-form model-form">
|
<input name="experimentId" type="hidden"/>
|
<div class="layui-form-item" style="float: left;clear: none;margin-right: 20px">
|
<label class="layui-form-label">选择成员</label>
|
<div class="layui-input-block">
|
<div id="followersBox" name="followersBox">
|
</div>
|
</div>
|
</div>
|
<div class="layui-form-item text-right" style="float: left;clear: none">
|
<button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
|
<button class="layui-btn" lay-filter="followerSubmit" lay-submit>保存</button>
|
</div>
|
</form>
|
</script>
|
|
<script type="text/template" id="stepTpl">
|
{{#each list}}
|
<li id="step-{{step}}" style="pointer-events: none">
|
<i class="layui-icon layui-icon-ok">{{step}}</i>
|
<span class="layui-steps-title">{{title}}</span>
|
{{# if username}}
|
<span class="layui-steps-content">{{username}}</span>
|
{{ else }}
|
<span class="layui-steps-content"> </span>
|
{{/if}}
|
</li>
|
{{/each}}
|
</script>
|
|
<script type="text/template" id="timelineTpl">
|
{{#each list}}
|
<li class="layui-timeline-item">
|
<i class="layui-icon layui-timeline-axis"></i>
|
<div class="layui-timeline-content layui-text">
|
<h4 class="layui-timeline-title" style="display: inline;margin-right: 10px;">{{title}}</h4>
|
<span>{{time}}</span>
|
<p>
|
{{msg}}
|
</p>
|
</div>
|
</li>
|
{{/each}}
|
</script>
|
|
<script>
|
var priQuoteId = top.priQuoteByMore;
|
$('.layui-layer-close').hide();
|
layui.config({
|
base: baseUrl + "/static/layui/lay/modules/"
|
}).extend({
|
notice: 'notice/notice',
|
steps: 'steps/steps',
|
}).use(['form', 'table', 'laydate', 'notice', 'xmSelect', 'steps'], function () {
|
var $ = layui.jquery;
|
var form = layui.form;
|
var table = layui.table;
|
var laydate = layui.laydate;
|
var notice = layui.notice;
|
var xmSelect = layui.xmSelect;
|
var steps = layui.steps;
|
|
form.render('select');
|
|
init();
|
function init(){
|
notice.msg('正在载入数据......', {icon: 4, position: "topRight"});
|
$.ajax({
|
url: baseUrl + "/priQuote/" + priQuoteId + "/auth",
|
headers: {'token': localStorage.getItem('token')},
|
method: 'GET',
|
success: function (res) {
|
notice.destroy();
|
if (res.code === 200) {
|
let priQuote = res.data;
|
top.priQuoteByMore = null;
|
$("#form-name").html(priQuote.name);
|
// 进度步骤图
|
let template0 = Handlebars.compile($('#stepTpl').html());
|
$('#stepBox').html(template0({list: JSON.parse(priQuote.settleMsg)}));
|
$('#step-' + Number(priQuote.step)).addClass("layui-this");
|
|
let template1 = Handlebars.compile($('#timelineTpl').html());
|
$('#timelineBox').html(template1({list: JSON.parse(priQuote.settleMsg)}));
|
// 补充html
|
$('#customizeBox').html(priQuote.formHtml);
|
// 设备明细
|
form.val('formAdvForm', priQuote);
|
top.convertDisabled($('#formAdvForm :input'), true);
|
// 跟进人
|
// initFollowers(priQuote.id);
|
layDateRender();
|
} else if (res.code === 403) {
|
top.location.href = baseUrl + "/";
|
} else {
|
layer.msg(res.msg, {icon: 2})
|
}
|
}
|
})
|
}
|
|
/* 渲染laydate */
|
function layDateRender() {
|
laydate.render({
|
elem: '#endTime',
|
type: 'datetime'
|
});
|
}
|
layDateRender();
|
|
/* 监听表单提交 */
|
form.on('submit(refresh)', function (data) {
|
init();
|
return false;
|
});
|
|
})
|
</script>
|