| | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.crm.manager.service.CstmrService; |
| | | import com.zy.crm.manager.service.PlanService; |
| | | import com.zy.crm.system.entity.User; |
| | | import com.zy.crm.system.service.UserService; |
| | |
| | | // return null; |
| | | // } |
| | | |
| | | public Long getCstmrId$(){ |
| | | CstmrService cstmrService = SpringUtils.getBean(CstmrService.class); |
| | | Cstmr cstmr = cstmrService.selectByName(1L, this.templateName); |
| | | if (!Cools.isEmpty(cstmr)){ |
| | | return cstmr.getId(); |
| | | } |
| | | return 0L; |
| | | } |
| | | |
| | | public String getPlanId$() { |
| | | PlanService planService = SpringUtils.getBean(PlanService.class); |
| | | Plan plan = planService.selectById(this.itemId); |
| | |
| | | import java.util.Date; |
| | | |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.crm.manager.service.CstmrService; |
| | | import com.zy.crm.manager.service.ItemService; |
| | | import com.zy.crm.manager.service.PlanService; |
| | | import com.zy.crm.system.entity.User; |
| | |
| | | this.settle = settle; |
| | | } |
| | | |
| | | public Long getCstmrId$(){ |
| | | CstmrService cstmrService = SpringUtils.getBean(CstmrService.class); |
| | | Cstmr cstmr = cstmrService.selectByName(1L, this.templateName); |
| | | if (!Cools.isEmpty(cstmr)){ |
| | | return cstmr.getId(); |
| | | } |
| | | return 0L; |
| | | } |
| | | |
| | | public String getSettle$(){ |
| | | if (null == this.settle){ return null; } |
| | | switch (this.settle){ |
| | |
| | | import java.util.Date; |
| | | |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.crm.manager.service.CstmrService; |
| | | import com.zy.crm.manager.service.ItemService; |
| | | import com.zy.crm.manager.service.PlanService; |
| | | import com.zy.crm.system.entity.User; |
| | |
| | | this.filepath = filepath; |
| | | } |
| | | |
| | | public Long getCstmrId$(){ |
| | | CstmrService cstmrService = SpringUtils.getBean(CstmrService.class); |
| | | Cstmr cstmr = cstmrService.selectByName(1L, this.templateName); |
| | | if (!Cools.isEmpty(cstmr)){ |
| | | return cstmr.getId(); |
| | | } |
| | | return 0L; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | |
| | | import java.util.Date; |
| | | |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.crm.manager.service.ItemService; |
| | | import com.zy.crm.manager.service.OrderService; |
| | | import com.zy.crm.manager.service.PlanService; |
| | | import com.zy.crm.manager.service.PriSalesService; |
| | | import com.zy.crm.manager.service.*; |
| | | import com.zy.crm.system.entity.User; |
| | | import com.zy.crm.system.service.UserService; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | |
| | | this.filepath = filepath; |
| | | } |
| | | |
| | | public Long getCstmrId$(){ |
| | | CstmrService cstmrService = SpringUtils.getBean(CstmrService.class); |
| | | Cstmr cstmr = cstmrService.selectByName(1L, this.templateName); |
| | | if (!Cools.isEmpty(cstmr)){ |
| | | return cstmr.getId(); |
| | | } |
| | | return 0L; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | |
| | | // null // 创建时间 |
| | | // ); |
| | | |
| | | public String getSettle$(){ |
| | | if (null == this.settle){ return null; } |
| | | switch (this.settle){ |
| | | case 0: |
| | | return "待提交"; |
| | | case 1: |
| | | return "等待部门经理审核"; |
| | | case 2: |
| | | return "等待结点3审核"; |
| | | case 3: |
| | | return "等待结点4审核"; |
| | | case 4: |
| | | return "等待结点5审核"; |
| | | case 5: |
| | | return "等待结点6审核"; |
| | | case 6: |
| | | return "申请通过"; |
| | | case 7: |
| | | return "申请通过"; |
| | | default: |
| | | return String.valueOf(this.settle); |
| | | } |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | |
| | | cols: [[ |
| | | {type: 'checkbox', fixed: 'left'} |
| | | ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80,hide: true} |
| | | ,{field: 'templateName', align: 'center',title: '客户名称',hide: false} |
| | | ,{field: 'templateName', align: 'center',title: '客户名称', style: 'color: #1890ff;cursor:pointer', event: 'moreCstmr', width: 350,hide: false} |
| | | ,{field: 'cstmrId$', align: 'center',title: '客户id',hide: true} |
| | | ,{field: 'orderNum', align: 'center',title: '核价单号'} |
| | | ,{field: 'planId$', align: 'center',title: '规划单号'} |
| | | ,{field: 'planId$', align: 'center',title: '规划单号', style: 'color: #1890ff;cursor:pointer', event: 'morePlan'} |
| | | ,{field: 'itemId', align: 'center',title: '规划单号', hide: true} |
| | | ,{field: 'createTime$', align: 'center',title: '创建时间'} |
| | | ,{field: 'updateTime$', align: 'center',title: '更新时间'} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | |
| | | table.on('tool(priOnline)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'moreCstmr': |
| | | top.cstmrByMore = data.cstmrId$; |
| | | admin.popupRight({ |
| | | type: 1, |
| | | window: "top", |
| | | area: "1250px", |
| | | url: "../cstmr/cstmr_more.html", |
| | | end: function () { |
| | | // $(".layui-laypage-btn")[0].click(); |
| | | } |
| | | }) |
| | | break; |
| | | case 'morePlan': |
| | | top.planByMore = data.itemId; |
| | | admin.popupRight({ |
| | | type: 1, |
| | | window: "top", |
| | | area: "1250px", |
| | | url: "../plan/plan_more_other.html", |
| | | end: function () { |
| | | // $(".layui-laypage-btn")[0].click(); |
| | | } |
| | | }) |
| | | break; |
| | | // 核价 |
| | | case 'check': |
| | | layer.open({ |
| | |
| | | cellMinWidth: 150, |
| | | cols: [[ |
| | | {type: 'checkbox', fixed: 'left'} |
| | | ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} |
| | | ,{field: 'templateName', align: 'center',title: '客户名称', width: 220,hide: false} |
| | | ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80,hide : true} |
| | | ,{field: 'templateName', align: 'center',title: '客户名称', style: 'color: #1890ff;cursor:pointer', event: 'moreCstmr', width: 350,hide: false} |
| | | ,{field: 'cstmrId$', align: 'center',title: '客户id',hide: true} |
| | | ,{field: 'inOrderNum', align: 'center',title: '报价编号',hide: false} |
| | | ,{field: 'orderNum', align: 'center',title: '报价预算单号', style: 'color: #1890ff;cursor:pointer', event: 'more',hide: false} |
| | | ,{field: 'planId$', align: 'center',title: '规划单号',hide: false} |
| | | ,{field: 'orderNum', align: 'center',title: '报价预算单号',hide: false} |
| | | ,{field: 'planId$', align: 'center',title: '规划单号', style: 'color: #1890ff;cursor:pointer', event: 'morePlan'} |
| | | ,{field: 'itemId', align: 'center',title: '规划单号', hide: true} |
| | | ,{field: 'planName$', align: 'center',title: '规划单名称',hide: false} |
| | | ,{field: 'settle$', align: 'center',title: '进度', width: 150,hide: false} |
| | | ,{field: 'settle$', align: 'center',title: '进度', style: 'color: #1890ff;cursor:pointer', event: 'more', width: 150,hide: false} |
| | | ,{field: 'createTime$', align: 'center',title: '创建时间',hide: false} |
| | | ,{field: 'updateTime$', align: 'center',title: '更新时间',hide: false} |
| | | ,{field: 'memberId$', align: 'center',title: '业务员',hide: false} |
| | |
| | | table.on('tool(priQuote)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'moreCstmr': |
| | | top.cstmrByMore = data.cstmrId$; |
| | | admin.popupRight({ |
| | | type: 1, |
| | | window: "top", |
| | | area: "1250px", |
| | | url: "../cstmr/cstmr_more.html", |
| | | end: function () { |
| | | // $(".layui-laypage-btn")[0].click(); |
| | | } |
| | | }) |
| | | break; |
| | | case 'morePlan': |
| | | top.planByMore = data.itemId; |
| | | admin.popupRight({ |
| | | type: 1, |
| | | window: "top", |
| | | area: "1250px", |
| | | url: "../plan/plan_more_other.html", |
| | | end: function () { |
| | | // $(".layui-laypage-btn")[0].click(); |
| | | } |
| | | }) |
| | | break; |
| | | case 'approval': |
| | | layer.confirm('审批通过?', { |
| | | skin: 'layui-layer-admin', |
| | |
| | | cellMinWidth: 150, |
| | | cols: [[ |
| | | {type: 'checkbox', fixed: 'left'} |
| | | ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} |
| | | ,{field: 'templateName', align: 'center',title: '客户名称'} |
| | | ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80,hide : true} |
| | | ,{field: 'templateName', align: 'center',title: '客户名称', style: 'color: #1890ff;cursor:pointer', event: 'moreCstmr', width: 350,hide: false} |
| | | ,{field: 'cstmrId$', align: 'center',title: '客户id',hide: true} |
| | | ,{field: 'inOrderNum', align: 'center',title: '预算编号'} |
| | | ,{field: 'orderNum', align: 'center',title: '产品费用明细单号'} |
| | | ,{field: 'planId$', align: 'center',title: '规划单号'} |
| | | ,{field: 'planId$', align: 'center',title: '规划单号', style: 'color: #1890ff;cursor:pointer', event: 'morePlan'} |
| | | ,{field: 'itemId', align: 'center',title: '规划单号', hide: true} |
| | | ,{field: 'createTime$', align: 'center',title: '创建时间'} |
| | | ,{field: 'updateTime$', align: 'center',title: '更新时间'} |
| | | ,{field: 'memberId$', align: 'center',title: '业务员'} |
| | |
| | | table.on('tool(priQuoteBudget)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'moreCstmr': |
| | | top.cstmrByMore = data.cstmrId$; |
| | | admin.popupRight({ |
| | | type: 1, |
| | | window: "top", |
| | | area: "1250px", |
| | | url: "../cstmr/cstmr_more.html", |
| | | end: function () { |
| | | // $(".layui-laypage-btn")[0].click(); |
| | | } |
| | | }) |
| | | break; |
| | | case 'morePlan': |
| | | top.planByMore = data.itemId; |
| | | admin.popupRight({ |
| | | type: 1, |
| | | window: "top", |
| | | area: "1250px", |
| | | url: "../plan/plan_more_other.html", |
| | | end: function () { |
| | | // $(".layui-laypage-btn")[0].click(); |
| | | } |
| | | }) |
| | | break; |
| | | case "quoteBudget": |
| | | layer.open({ |
| | | type: 2, |
| | |
| | | cellMinWidth: 150, |
| | | cols: [[ |
| | | {type: 'checkbox', fixed: 'left'} |
| | | ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} |
| | | ,{field: 'templateName', align: 'center',title: '客户名称'} |
| | | ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80,hide : true} |
| | | ,{field: 'templateName', align: 'center',title: '客户名称', style: 'color: #1890ff;cursor:pointer', event: 'moreCstmr', width: 350,hide: false} |
| | | ,{field: 'cstmrId$', align: 'center',title: '客户id',hide: true} |
| | | ,{field: 'inOrderNum', align: 'center',title: '明细编号'} |
| | | ,{field: 'orderNum', align: 'center',title: '核价单号'} |
| | | ,{field: 'planId$', align: 'center',title: '项目名'} |
| | | ,{field: 'planId$', align: 'center',title: '规划单号', style: 'color: #1890ff;cursor:pointer', event: 'morePlan'} |
| | | ,{field: 'itemId', align: 'center',title: '规划单号', hide: true} |
| | | ,{field: 'createTime$', align: 'center',title: '创建时间'} |
| | | ,{field: 'updateTime$', align: 'center',title: '更新时间'} |
| | | ,{field: 'memberId$', align: 'center',title: '业务员'} |
| | |
| | | table.on('tool(priSales)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'moreCstmr': |
| | | top.cstmrByMore = data.cstmrId$; |
| | | admin.popupRight({ |
| | | type: 1, |
| | | window: "top", |
| | | area: "1250px", |
| | | url: "../cstmr/cstmr_more.html", |
| | | end: function () { |
| | | // $(".layui-laypage-btn")[0].click(); |
| | | } |
| | | }) |
| | | break; |
| | | case 'morePlan': |
| | | top.planByMore = data.itemId; |
| | | admin.popupRight({ |
| | | type: 1, |
| | | window: "top", |
| | | area: "1250px", |
| | | url: "../plan/plan_more_other.html", |
| | | end: function () { |
| | | // $(".layui-laypage-btn")[0].click(); |
| | | } |
| | | }) |
| | | break; |
| | | case "priOnline": |
| | | layer.open({ |
| | | type: 2, |
| | |
| | | {field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80,hide: true} |
| | | ,{field: 'templateName', align: 'center',title: '报销类型',hide: false} |
| | | ,{field: 'checkData', align: 'center',title: '是否冲账',hide: false} |
| | | ,{field: 'orderNum', align: 'center',title: '报销单号',width: 320, style: 'color: #1890ff;cursor:pointer', event: 'more',hide: false} |
| | | ,{field: 'orderNum', align: 'center',title: '报销单号',width: 320,hide: false} |
| | | ,{field: 'planId$', align: 'center',title: '项目号',hide: false} |
| | | ,{field: 'name', align: 'center',title: '客户信息',hide: false} |
| | | ,{field: 'settle', align: 'center',title: '进度',hide: false} |
| | | ,{field: 'createTime$', align: 'center',title: '创建时间',hide: false} |
| | | ,{field: 'updateTime$', align: 'center',title: '更新时间',hide: false} |
| | | ,{field: 'status$', align: 'center',title: '状态',hide: false} |
| | | ,{field: 'memberId$', align: 'center',title: '业务员',hide: false} |
| | | ,{field: 'settle$', align: 'center',title: '进度', style: 'color: #1890ff;cursor:pointer', event: 'more',hide: false} |
| | | ,{field: 'user$', align: 'center',title: '创建人员',hide: false} |
| | | ,{field: 'updateUserId$', align: 'center',title: '更新人员',hide: false} |
| | | // // ,{field: 'checkDataStatus$', align: 'center',title: '报价数据'} |
New file |
| | |
| | | <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-md12"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-header"> |
| | | 基本信息 |
| | | </div> |
| | | <div class="layui-card-body"> |
| | | |
| | | <!-- 基本信息 --> |
| | | <div class="layui-form-item layui-row"> |
| | | <input name="id" type="hidden" /> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">规划单号:</label> |
| | | <div class="layui-input-block"> |
| | | <input name="uuid" class="layui-input" disabled /> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">申请日期 :</label> |
| | | <div class="layui-input-block"> |
| | | <input name="appleTime$" class="layui-input" disabled /> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">跟踪项目:</label> |
| | | <div class="layui-input-block"> |
| | | <input name="orderId$" class="layui-input" disabled /> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">客户名称:</label> |
| | | <div class="layui-input-block"> |
| | | <input name="cstmrId$" class="layui-input" disabled /> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">业务员:</label> |
| | | <div class="layui-input-block"> |
| | | <input name="userId$" class="layui-input" disabled /> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">审批状态:</label> |
| | | <div class="layui-input-block"> |
| | | <input name="settle$" class="layui-input" disabled/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">业务类型:</label> |
| | | <div class="layui-input-block"> |
| | | <input name="planType$" class="layui-input" disabled /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 其他 --> |
| | | <div class="layui-form-item layui-row"> |
| | | <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;"> |
| | | <legend style="font-size: 13px">其他</legend> |
| | | </fieldset> |
| | | <div id="customizeBox" class="formDes"> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 售前规划 --> |
| | | <div class="layui-form-item layui-row"> |
| | | <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;"> |
| | | <legend style="font-size: 13px">售前规划</legend> |
| | | </fieldset> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">规划员:</label> |
| | | <div class="layui-input-block"> |
| | | <input name="planner" class="layui-input" disabled /> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">完成时间:</label> |
| | | <div class="layui-input-block"> |
| | | <input name="finishTime$" class="layui-input" disabled /> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">更改方案:</label> |
| | | <div class="layui-input-block"> |
| | | <input name="change" class="layui-input" disabled /> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">更改次数:</label> |
| | | <div class="layui-input-block"> |
| | | <input name="changeTime" class="layui-input" disabled /> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">更改原因:</label> |
| | | <div class="layui-input-block"> |
| | | <input name="changeReason" class="layui-input" disabled /> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">规格奖金:</label> |
| | | <div class="layui-input-block"> |
| | | <input name="planBonus" class="layui-input" disabled /> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">组长奖金:</label> |
| | | <div class="layui-input-block"> |
| | | <input name="planLeaderBonus" class="layui-input" disabled /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 系统信息 --> |
| | | <div class="layui-form-item layui-row"> |
| | | <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;"> |
| | | <legend style="font-size: 13px">系统信息</legend> |
| | | </fieldset> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">添加人员:</label> |
| | | <div class="layui-input-block"> |
| | | <input name="createBy$" class="layui-input" disabled/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">修改人员:</label> |
| | | <div class="layui-input-block"> |
| | | <input name="updateBy$" class="layui-input" disabled/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">添加时间:</label> |
| | | <div class="layui-input-block"> |
| | | <input name="createTime$" class="layui-input icon-date" autocomplete="off" disabled/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">修改时间:</label> |
| | | <div class="layui-input-block"> |
| | | <input name="updateTime$" class="layui-input icon-date" autocomplete="off" disabled/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 动态 --> |
| | | <!-- <div class="layui-col-md3" style="width: 24%;margin-left: 1%">--> |
| | | <!-- 时间线 --> |
| | | <!-- <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 class="layui-card">--> |
| | | <!-- <div class="layui-card-header">--> |
| | | <!-- <span>跟进人</span>--> |
| | | <!-- <span lay-filter="followerAdd" lay-submit style="float: right;cursor: pointer;">--> |
| | | <!-- <i class="layui-icon" style="font-size: 20px;color: #1890ff;"></i>--> |
| | | <!-- </span>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="layui-card-body">--> |
| | | <!-- <table id="followersTable" lay-filter="followersTable"></table>--> |
| | | <!-- </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 planId = top.planByMore; |
| | | $('.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 + "/plan/" + planId + "/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | notice.destroy(); |
| | | if (res.code === 200) { |
| | | let plan = res.data; |
| | | top.planByMore = null; |
| | | $("#form-name").html(plan.name); |
| | | // 进度步骤图 |
| | | let template0 = Handlebars.compile($('#stepTpl').html()); |
| | | $('#stepBox').html(template0({list: JSON.parse(plan.settleMsg)})); |
| | | $('#step-' + Number(plan.step)).addClass("layui-this"); |
| | | |
| | | let template1 = Handlebars.compile($('#timelineTpl').html()); |
| | | $('#timelineBox').html(template1({list: JSON.parse(plan.settleMsg)})); |
| | | // 补充html |
| | | $('#customizeBox').html(plan.formHtml); |
| | | // 设备明细 |
| | | form.val('formAdvForm', plan); |
| | | top.convertDisabled($('#formAdvForm :input'), true); |
| | | // 跟进人 |
| | | // initFollowers(plan.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(); |
| | | |
| | | // 渲染跟进人模块 |
| | | function initFollowers(planId) { |
| | | if (!planId) { |
| | | return; |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl+"/plan/followers/table/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | planId: planId |
| | | }, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | var follTab = table.render({ |
| | | elem: '#followersTable', |
| | | data: res.data, |
| | | limit: 999, |
| | | height: 'full-408', |
| | | cols: [[ |
| | | {field: 'userName', title: '工作人员'}, |
| | | {fixed: 'right', title:'', align: 'center', toolbar: '#followerTabOperate', width: 70} |
| | | ]], |
| | | done: function (res, curr, count) { |
| | | $('#dictTable+.layui-table-view .layui-table-body tbody>tr:first').trigger('click'); |
| | | } |
| | | }); |
| | | // 监听行工具事件 |
| | | table.on('tool(followersTable)', function(obj){ |
| | | let data = obj.data; |
| | | switch (obj.event) { |
| | | case "del": |
| | | let loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/plan/followers/remove/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | planId: planId, |
| | | userId: data.userId |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | initFollowers(planId); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | break; |
| | | } |
| | | }); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 添加跟进人 |
| | | var followerLayer; |
| | | form.on('submit(followerAdd)', function (data) { |
| | | if (followerLayer) {return;} |
| | | followerLayer = admin.open({ |
| | | type: 1, |
| | | offset: '150px', |
| | | area: '600px', |
| | | title: '添加跟进人', |
| | | content: $('#followerEditDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | // 表单提交事件 |
| | | form.on('submit(followerSubmit)', function (data) { |
| | | let selectList = xmSelectIdx.getValue(); |
| | | if (selectList.length === 0) { |
| | | layer.msg("请选择至少一条数据", {icon: 3}); |
| | | return false; |
| | | } |
| | | let loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/plan/followers/add/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | planId: planId, |
| | | followerIds: selectList.map(function (d) { |
| | | return d.value; |
| | | }) |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.close(loadIndex); |
| | | initFollowers(planId); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | layer.close(dIndex); |
| | | return false; |
| | | }); |
| | | let xmSelectIdx = xmSelect.render({ |
| | | el: '#followersBox', |
| | | style: { |
| | | width: '280px', |
| | | }, |
| | | autoRow: true, |
| | | toolbar: { show: true }, |
| | | filterable: true, |
| | | remoteSearch: true, |
| | | remoteMethod: function(val, cb, show){ |
| | | $.ajax({ |
| | | url: baseUrl+"/user/all/get/kv", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | condition: val |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | cb(res.data) |
| | | } else { |
| | | cb([]); |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | // 弹窗不出现滚动条 |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | }, |
| | | end: function () { |
| | | followerLayer = null; |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | /* 监听表单提交 */ |
| | | form.on('submit(refresh)', function (data) { |
| | | init(); |
| | | return false; |
| | | }); |
| | | |
| | | }) |
| | | </script> |
| | |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/luckysheet_js/luckyexcel.umd.js"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../../static/js/luckysheet_js/pako.es5.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/luckysheet_js/base64.min.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/priOnline2/priOnline.js" charset="utf-8"></script> |
| | |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../../static/js/priQuoteBudget/priQuoteBudget.js" charset="utf-8"></script> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/priSales/priSales.js" charset="utf-8"></script> |
| | | <!-- 表单弹窗 --> |