| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <link href="../css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
- <link href="../css/bootstrap.min.css" />
- <link rel="stylesheet" href="../css/boot/bootstrap-table.css" />
- <link href="../css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
- <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
- <link href="../css/animate.min.css" rel="stylesheet">
- <link href="../css/style.min862f.css?v=4.1.0" rel="stylesheet">
- <link href="../css/layer/need/layer.css" />
- <link rel="stylesheet" href="../css/init.css" />
-
- <title>号码导入</title>
- <style>
- .btns {
- background: #18a689;
- }
- .btns {
- color: rgb(255, 255, 255);
- font-size: 12px;
- margin-left: 15px;
- box-sizing: border-box;
- background: rgb(26, 179, 148);
- padding: 6px 10px;
- outline: none;
- border-width: 0px;
- border-style: initial;
- border-color: initial;
- border-image: initial;
- border-radius: 3px;
- }
- .fr{
- float: right;
- }
- .fr p{
- display: inline-block;
- margin-bottom: 0;
- }
- .fl{
- float: left;
- }
- .daoHang .dhLeft a {
- font-size: 14px;
- color: #999;
- }
- #tbResult thead th .th-inner{
- width: 100px;
- }
- body .demo-class .layui-layer-title{
- background: #1AB394;
- }
- .xl {
- display: inline-block;
- background: url(../img/dropDown.png) no-repeat;
- height: 100%;
- background-position: center center;
- width: 20px;
- position: absolute;
- right: 0;
- top: 0px;
- /* background-color: #f7bc8b; */
- cursor: pointer;
- }
- ul.ztree {
- /*margin-top: 10px;*/
- width: 168px;
- overflow-y: scroll;
- overflow-x: auto;
- }
- #organizer{
- height: 25px;
- width: 170px;
- display: inline-block;
- position: relative;
- }
- #menuContent{
- background: #fff;
- position: absolute;
- width: 100%;
- border: 1px solid darkgrey;
- right: 0;
- top: 21px;
- z-index: 10;
- display: none;
- overflow-y: aut
- }
- .imgs {
- width: 100px;
- cursor: pointer;
- }
- </style>
- </head>
-
- <body>
- <div class="wrapper wrapper-content animated fadeInRight">
- <div class="container-fluid">
- <div class="daoHang clearfix">
- <div class="dhLeft">
- <sapn><i class="syIcon"></i>位置:
- <a href="javaScript:;" id="ReIndex">首页</a>>
- <a href="javaScript:;">回访管理</a>>
- <a href="" style="color: #000;">回访号码导入</a>
- </sapn>
- </div>
- </div>
- <div class="fr" style="margin-bottom: 20px; text-align: right;">
- <div class="company">
- <span>店面选择</span>
- <div class="inpBox" id="organizer">
- <input id="citySel" class="inps" readonly />
- <input type="hidden" id="OPID" />
- <i class="xl xl_one" id="xl_one"></i>
- <div id="menuContent" class="menuContent">
- <ul id="treeDemo" class="ztree"></ul>
- </div>
- </div>
- <a value="搜索" class="btns Seach" />搜索</a>
-
-
- <a class="btns drBtn">导入</a>
- <!--<p style="margin-right: 10px;">
- <a href="drmb/导入模板.xlsx" download="导入模板.xlsx" title="点击下载导入模板">导入模板</a>
- </p>
- <p>
- <input class="fl" type="file" id="upFile" name="upFile" />
- <a class="btns fr" id="aa">导入</a>
- </p>-->
- </div>
- </div>
-
- <div class="treeTable clearfix">
- <div class="tableCon ">
- <table id="tbResult" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
- <thead>
- <tr>
- <th data-field="F_CusName" data-align="center">客户名称</th>
- <th data-field="F_CusTelphone" data-align="center" data-formatter="CusTelphone">手机</th>
- <th data-field="F_CusPhone" data-align="center" data-formatter="CusTelphone">电话</th>
- <th data-field="F_Sheng" data-align="center">大区</th>
- <th data-field="F_Store" data-align="center">店面</th>
- <th data-field="F_Prodate" data-align="center">出厂日期</th>
- <th data-field="F_Reciver" data-align="center">接车员</th>
- <th data-field="F_License" data-align="center">车牌号码</th>
- <th data-field="F_Brand" data-align="center">品牌</th>
- <th data-field="F_Models" data-align="center">车型</th>
- <th data-field="F_RepType" data-align="center" data-formatter="cutContent">维修类别</th>
- <th data-field="F_Extend1" data-align="center" data-formatter="cutContent">新客户到店途径</th>
- <th data-field="F_RepItem" data-formatter="cutContent" data-align="center">维修项目</th>
- <th data-field="F_TheTeam" data-align="center">班组</th>
- <th data-field="F_Elect" data-align="center">机电</th>
- <th data-field="F_Sheetmetal" data-align="center">钣金</th>
- <th data-field="F_Paint" data-align="center">喷漆</th>
- <th data-field="F_RepUser" data-align="center">维修工</th>
- <th data-field="F_WoNumber" data-align="center">工单号</th>
- <th data-field="F_NewCus" data-align="center" data-formatter="cutContent">备注</th>
- <th data-field="F_Extend2" data-align="center">字段一</th>
- <th data-field="F_Extend3" data-align="center">字段二</th>
- <th data-field="F_Extend4" data-align="center">字段三</th>
- <th data-field="F_Extend5" data-align="center">字段四</th>
- <th data-field="F_Extend5" data-align="center">字段五</th>
- </tr>
- </thead>
- <tbody id="tbody"></tbody>
- </table>
- </div>
- </div>
- </div>
- <script src="../js/jquery.min.js?v=2.1.4"></script>
- <script src="../js/jquery.cookie.js"></script>
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <script src="../js/zTree/jquery.ztree.core.js"></script>
- <script src="../js/zTree/jquery.ztree.excheck.min.js"></script>
- <script>
- var saveArrs = [];
- $(function () {
- Finish();
- $('.drBtn').click(function () {
- layer.open({
- skin: 'demo-class',
- type: 2,
- title: '导入信息',
- shadeClose: true, //是否开启点击遮罩关闭
- shade: 0.4, //遮罩
- //maxmin: true, //开启最大化最小化按钮
- id: 'LAY_layuipr',//防止重复弹出
- moveType: 1,//拖拽类型 默认的拖拽风格正如你所见到的,会有个过度的透明框。但是如果你不喜欢,你可以设定moveType: 1切换到传统的拖拽模式
- //moveOut: true, //拖拽到窗口外
- //resize: true,//是否允许拉伸
- area: ['70%', '80%'],
- //content: 'addModel.html?changeGetid='+ changes +''
- content: 'fpTemplate.html'
- });
-
- })
- //搜索
- $(".Seach").click(function () {
- store = $("#OPID").val();
- Finish(store)
- });
- });
- function Finish(store) {
- var $tableLeft = $('#tbResult');
- $tableLeft.bootstrapTable('destroy');
- //初始化表格,动态从服务器加载数据
- $tableLeft.bootstrapTable({
- method: "get", //使用get请求到服务器获取数据
- // url: huayi.config.callcenter_url + "VisitTelphone/GetResultList",
- url: huayi.config.callcenter_url+"VisitTelphone/GetList",
- striped: true, //表格显示条纹
- pagination: true, //启动分页
- pageSize:10, //每页显示的记录数
- pageNumber: 1, //当前第几页
- fixedColumns: true,
- fixedNumber: 3,
- pageList: [5, 20, 50, 100], //记录数可选列表
- search: false, //是否启用查询
- showColumns: false, //显示下拉框勾选要显示的列
- showRefresh: false, //显示刷新按钮
- sidePagination: "server", //表示服务端请求
- //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
- //设置为limit可以获取limit, offset, search, sort, order
- queryParamsType: "undefined",
- queryParams: function queryParams(params) { //设置查询参数
- var param = {
- page: params.pageNumber,
- pagesize: params.pageSize,
- store: store,
- token: $.cookie("token"),
- };
- return param;
- },
- onLoadSuccess: function() { //加载成功时执行
- // layer.msg("加载成功");
- },
- onLoadError: function() { //加载失败时执行
- //layer.msg("加载数据失败", { time: 1500, icon: 2 });
- }
- });
- }
- //限制字符串长度
- function cutContent(val) {
- if(val) {
- var str = '<div '
- if(val.length > 10) {
- str = str + ' title="' + val + '" ';
- val = val.substr(0, 10) + "...";
- }
- return str + '>' + val + '</div>';
- } else {
- return '';
- }
- }
- /*function VisitTelphone() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url+"VisitTelphone/GetList",
- dataType: 'json',
- async: true,
- data: {
- token: $.cookie("token")
- },
- success: function(data) {
- if(data.state == "success") {
- alert("成功");
- }
- }
- });
- }*/
- tree(saveArrs);
- function tree(saveArr) {
- $.get(huayi.config.callcenter_url + 'Dictionary/GetDicValueListByFlag', {
- "token": $.cookie("token"),
- flag: 'HHBBMD',
- }, function(result) {
- result = $.parseJSON(result);
- console.log(result);
- if(saveArr.length > 0) {
- for(var x = 0; x < saveArr.length; x++) {
- $(result.data).each(function(i, n) {
- if(saveArr[x] == n.F_DictionaryValueId) {
- n.checked = "true";
- }
- })
- }
- }
- $.fn.zTree.init($("#treeDemo"), setting, result.data);
- //父节点不显示checkbox
- //获取到zTree
- var zTree = $.fn.zTree.getZTreeObj("treeDemo");
- //设置只能选择最后一层的子节点
- var allNodes = zTree.transformToArray(zTree.getNodes()); //
- //去掉选框
- if(allNodes.length > 0) {
- for(var i = 0; i < allNodes.length; i++) {
- if(allNodes[i].isParent) { //找到父节点
- allNodes[i].nocheck = true; //nocheck为true表示没有选择框
- zTree.updateNode(allNodes[i]);
- }
- }
- }
- });
- }
- var setting = {
- data: {
- key: {
- name: "F_Name"
- },
- simpleData: {
- enable: true,
- idKey: "F_Sort",
- rootPId: 0
- }
- },
- check: {
- enable: true,
- chkboxType: {
- "Y": "",
- "N": ""
- }
- },
- view: {
- dblClickExpand: true,
- showIcon: false
- },
- callback: {
- beforeClick: beforeClick,
- onCheck: onCheck
- }
- };
- function beforeClick(treeId, treeNode) {
- var zTree = $.fn.zTree.getZTreeObj("treeDemo"),
- nodes = zTree.getCheckedNodes(true);
- zTree.checkNode(treeNode, !treeNode.checked, null, true);
- return false;
- }
- function onCheck(e, treeId, treeNode) {
- var zTree = $.fn.zTree.getZTreeObj("treeDemo"),
- nodes = zTree.getCheckedNodes(true);
- console.log(treeNode)
- var v = "",
- opid = '';
- for(var i = 0, l = nodes.length; i < l; i++) {
- v += nodes[i].F_Name + ",";
- console.log(v);
- opid += nodes[i].F_DictionaryValueId + ","
- }
- if(v.length > 0) v = v.substring(0, v.length - 1);
- var cityObj = $("#citySel");
- cityObj.val(v);
- console.log(opid);
- if(opid.length > 0) opid = opid.substring(0, opid.length - 1);
- $('#OPID').attr("value", opid);
- console.log($('#OPID').val());
- }
- $(".xl").click(function() {
- if($(this).parent().find(".menuContent").is(":hidden")) {
- $(this).parent().find(".menuContent").show();
- } else {
- $(this).parent().find(".menuContent").hide();
- }
- });
-
-
- //电话
- function CusTelphone(val, row) {
- return '<div class="imgs" onclick= ck(' + row.F_TelID + ')>' +
- '<img src="../img/vice.png" />' + val + '' +
- '</div>';
- }
- function ck(str) {
- // $(".shark").show();
- // $(".thjl").addClass("yc");
- // $(".phone_message").removeClass("yc");
- // $(".phoneid").val(str);
- // Hvisit();
- // Hfjl();console.log(str);
- layer.open({
- type: 2,
- content: "Commones.html?ran=" + Math.random() + "&ty=0&strs=" + str, //iframe的url,no代表不显示滚动条
- title: '详情',
- area: ['65%', '75%'], //宽高
- });
-
- }
-
-
-
-
- </script>
- </body>
- </html>
|