https://www.cnblogs.com/Big-Boss/p/9531235.html

/*** 服务商管理初始化*/
var invoice = {id: "invoiceTable",   //表格idseItem: null,     //选中的条目table: null,layerIndex: -1
};
/*** 初始化表格的列*/
invoice.initColumn = function () {return [{field: 'getSelections', radio: true,visible: true},{title: '工单编号', field: 'workOrderNo', visible: true, align: 'center', valign: 'middle',formatter:function(value,row,index){return "<a href='javascript:void(0)' id=\"order"+value+"\" data=\""+value+"\" onmouseover='showOrderInfo(this)' onmouseout='hideOrderInfo(this)'>"+value+"</a>";}},{title: '工单总价(元)', field: 'workOrderPrice', visible: true, align: 'center', valign: 'middle'},{title: '工单完成日期', field: 'workOrderComDate', visible: true, align: 'center', valign: 'middle'},{title: '服务人员编号', field: 'userSn', visible: true, align: 'center', valign: 'middle',formatter:function(value,row,index){return "<a href='javascript:void(0)' id=\"user"+row.workOrderNo+"\" data=\""+value+"\" data-workOrderNo=\""+row.workOrderNo+"\" onmouseover='showUserInfo(this)' onmouseout='hideUserInfo(this)'>"+value+"</a>";}},{title: '安装数量', field: 'num', visible: true, align: 'center', valign: 'middle'},{title: '服务人员应结款(元)', field: 'userPrice', visible: true, align: 'center', valign: 'middle'},{title: '合计金额(元)', field: 'userTotalPrice', visible: true, align: 'center', valign: 'middle'},{title: '工单创建时间', field: 'workOrderCreated', visible: true, align: 'center', valign: 'middle'},{title: '创建人', field: 'workOrderCreater', visible: true, align: 'center', valign: 'middle'},{title: '工单核对时间', field: 'workOrderCheckDate', visible: true, align: 'center', valign: 'middle'},{title: '核对人', field: 'workOrderChecker', visible: true, align: 'center', valign: 'middle'},{title: '备注', field: 'remark', visible: true, align: 'center', valign: 'middle',formatter:function(value,row,index){return '<a href="javascript:void(0);" onclick="invoice.agree('+row['id']+')" style="color:blue">查看备注记录</a>';}},{title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle',formatter:function(value,row,index){if (value == 0) {return "待对账";}else if (value == 1) {return "待设置";}else if (value == 2) {return "待上传凭证";}else if (value == 3) {return "已完成";}}},{title: '操作', field: '', visible: true, align: 'center', valign: 'middle',formatter:function(value,row,index){if (row.status == 0) {return '<a href="javascript:void(0);" onclick="invoice.setDz('+row['id']+')" style="color:blue">对账完成</a><br><a href="javascript:void(0);" onclick="invoice.refuse('+row['id']+')" style="color:red">添加备注</a>';}else if (row.status == 1) {return '<a href="javascript:void(0);" onclick="invoice.go_setKpf('+row['id']+')" style="color:blue">设置开票方</a><br><a href="javascript:void(0);" onclick="invoice.refuse('+row['id']+')" style="color:red">添加备注</a>'}else if (row.status == 2) {return '<a href="javascript:void(0);" onclick="invoice.go_setPz('+row['id']+')" style="color:blue">上传发票凭证</a><br><a href="javascript:void(0);" onclick="invoice.refuse('+row['id']+')" style="color:red">添加备注</a>'}else if (row.status == 3) {return '<a href="javascript:void(0);" onclick="invoice.refuse('+row['id']+')" style="color:red">添加备注</a>'}}}];
};var differentindex = 999;
function showOrderInfo(e) {var workOrderNo = $(e).attr('data');openOrderMsg(workOrderNo);
}function hideOrderInfo(e) {layer.close(differentindex);
}function openOrderMsg(workOrderNo) {var html = "";var ajax = new $ax(Feng.ctxPath + "/invoice/getWorkOrderInfo", function(data){if (data == "" || data == null || data == undefined) {html += "工单信息不存在!";}else{var value = data.workOrderStatus;var isBack = data.isBack;var status;if(value==8){if (isBack == null || isBack == 0 || isBack == 1 || isBack == 5) {status = "待指派";}else if (isBack == 3 || isBack == 4) {status = "待服务商接单";}}else if(value==9){status = '待安装师傅接单';}else if(value==10){status = '待签到';}else if(value==101){status = '待核销';}else if(value==102){status = '待回访';}else if(value==5){status = '已完成';}html += '<table width="500" border="0" cellspacing="0" cellpadding="0">'html += '<tr> 'html += '<td width="auto">客户信息</td> 'html += '<td width="auto">客户电话</td> 'html += '<td width="auto">服务地区</td> 'html += '<td width="auto">服务地址</td> 'html += '<td width="auto">产品信息</td> 'html += '<td width="auto">工单状态</td> 'html += '</tr> 'html += '<tr> 'html += '<td>'+data.buyerName+'</td> 'html += '<td>'+data.phone+'</td> 'html += '<td>'+data.buyerAddress+'</td> 'html += '<td>'+data.buyerDetailAddress+'</td> 'html += '<td>'+data.remark+'</td> 'html += '<td>'+status+'</td> 'html += '</tr> 'html += '</table>'}},function(data){html += "获取工单信息失败,请联系管理员!";});ajax.set("workOrderNo",workOrderNo);ajax.start();differentindex = layer.tips(html, '#order'+workOrderNo, {tips: [3, '#3595CC'],time: 0,area: 'width:auto;height:auto'});
}var differentindex1 = 999;
function showUserInfo(e) {var userSn = $(e).attr('data');var workOrderNo = $(e).attr('data-workOrderNo');openUserMsg(workOrderNo,userSn);
}function hideUserInfo(e) {layer.close(differentindex1);
}function openUserMsg(workOrderNo,userSn) {var html = "";var ajax = new $ax(Feng.ctxPath + "/invoice/getUserInfo", function(data){if (data == "" || data == null || data == undefined) {html += "服务人员信息不存在!";}else{var nameType;if (data.identity == 1 || data.identity == 2) {nameType = "服务商";}else if (data.identity == 3){nameType = "个人技师";}html += '<table width="250" border="0" cellspacing="0" cellpadding="0">'html += '<tr> 'html += '<td width="auto">服务人员类型</td> 'html += '<td width="auto">服务人员</td> 'html += '<td width="auto">服务人员电话</td> 'html += '</tr> 'html += '<tr> 'html += '<td>'+nameType+'</td> 'html += '<td>'+data.name+'</td> 'html += '<td>'+data.mobile+'</td> 'html += '</tr> 'html += '</table>'}},function(data){html += "获取服务人员信息失败,请联系管理员!";});ajax.set("userSn",userSn);ajax.start();differentindex1 = layer.tips(html, '#user'+workOrderNo, {tips: [3, '#3595CC'],time: 0,area: 'width:auto;height:auto'});
}/*** 设置对账成功*/
invoice.setDz = function (id) {if (id == "" || id == undefined) {Feng.info("请先选中表格中的某一记录!");return false;}var ajax = new $ax(Feng.ctxPath + "/invoice/setDz", function (data) {Feng.success("对账成功!");invoice.table.refresh();}, function (data) {Feng.error("对账失败!" + data.responseJSON.message + "!");});ajax.set("id",id);ajax.start();
};/*** 设置开票方*/
invoice.go_setKpf = function (id) {if (id == "" || id == undefined) {Feng.info("请先选中表格中的某一记录!");return false;}var index = layer.open({type: 2,title: '设置开票方',area: ['80%', '80%'], //宽高fix: false, //不固定maxmin: true,content: Feng.ctxPath + '/invoice/go_setKpf/' + id});this.layerIndex = index;
};/*** 上传凭证*/
invoice.go_setPz = function (id) {if (id == "" || id == undefined) {Feng.info("请先选中表格中的某一记录!");return false;}var index = layer.open({type: 2,title: '上传凭证',area: ['80%', '80%'], //宽高fix: false, //不固定maxmin: true,content: Feng.ctxPath + '/invoice/go_setPz/' + id});this.layerIndex = index;
};copyUrl = function(text){text=text.replace("http","https");var oInput = document.createElement('input');oInput.value = text;document.body.appendChild(oInput);oInput.select(); // 选择对象document.execCommand("Copy"); // 执行浏览器复制命令oInput.className = 'oInput';oInput.style.display='none';Feng.info("复制成功!");
}/*** 检查是否选中*/
invoice.check = function () {var selected = $('#' + this.id).bootstrapTable('getSelections');if(selected.length == 0){Feng.info("请先选中表格中的某一记录!");return false;}else{invoice.seItem = selected[0];return true;}
};/*** 跳转到装修风格添加页面*/
invoice.go_addInfo = function () {var index = layer.open({type: 2,title: '添加服务商',area: ['100%', '100%'], //宽高fix: false, //不固定maxmin: true,content: Feng.ctxPath + '/service/go_add'});this.layerIndex = index;
//  window.location.href = Feng.ctxPath + '/service/go_add';
};/*** 工单日志详情页*/
invoice.detailLog = function (id) {var index = layer.open({type: 2,title: '提现订单详情',area: ['100%', '100%'], //宽高fix: false, //不固定maxmin: true,content: Feng.ctxPath + '/invoice/detailLog/' + id});this.layerIndex = index;
//          window.location.href = Feng.ctxPath + '/service/go_update/' + id;return true;};/*** 查询服务商管理列表*/
invoice.search = function () {var queryData = {};queryData['workOrderNo'] = $("#workOrderNo").val()==undefined ? "":$("#workOrderNo").val();queryData['userInfo'] = $("#userInfo").val()==undefined ? "":$("#userInfo").val();queryData['invoiceInfo'] = $("#invoiceInfo").val()==undefined ? "":$("#invoiceInfo").val();queryData['timeType'] = $("#timeType").val()==undefined ? "":$("#timeType").val();queryData['startTime'] = $("#startTime").val()==undefined ? "":$("#startTime").val();queryData['endTime'] = $("#endTime").val()==undefined ? "":$("#endTime").val();invoice.table.refresh({query: queryData});
};$(function () {var defaultColunms = invoice.initColumn();var table = new BSTable(invoice.id, "/invoice/listPage", defaultColunms);table.setPaginationType("server");invoice.table = table.init();
});/*** 提现审核通过*/
invoice.agree = function(id) {Feng.confirm("是否确认通过?",function(){var ajax = new $ax(Feng.ctxPath + "/invoice/agree/" + id, function (data) {Feng.success("通过成功!");invoice.table.refresh();}, function (data) {Feng.error("通过失败!" + data.responseJSON.message + "!");});ajax.set("id",id);ajax.start();});return true;}/*** 提现审核拒绝*/
invoice.refuse = function(id) {Feng.confirm("是否确认拒绝?",function(){var ajax = new $ax(Feng.ctxPath + "/invoice/refuse/" + id, function (data) {Feng.success("拒绝成功!");invoice.table.refresh();}, function (data) {Feng.error("拒绝失败!" + data.responseJSON.message + "!");});ajax.set("id",id);ajax.start();});return true;}

使用layer.tips实现鼠标悬浮时触发事件提示消息实现相关推荐

  1. layui使用tips_使用layer.tips实现鼠标悬浮时触发事件提示消息实现

    代码: 你瞅啥!?过来试试! 方法一: function show(id) { layer.tips("左边么么哒", "#"+id+"", ...

  2. javascript鼠标双击时触发事件大全

    javascript事件列表解说 事件 浏览器支持 解说 一般事件 onclick IE3.N2 鼠标点击时触发此事件 ondblclick IE4.N4 鼠标双击时触发此事件 onmousedown ...

  3. CSS实现鼠标悬浮时背景图片拉近且增加遮罩层效果

    效果预览 点击查看效果   我们在浏览网站时会发现有一些图片在鼠标悬浮在上时会有放大拉近的效果.   想要实现这个效果有两种方法,第一种方法是控制背景图片,第二种方法是控制插入的图片,我们这里介绍第一 ...

  4. html旋转墙壁效果,css3实现照片墙效果,鼠标悬浮时旋转放大并摆正

    一张张照片散乱的撒在一起,鼠标悬浮时旋转放大并摆正,效果如下图(所有图片均来自网络),主要使用到的css3属性有:transition.transform(scale.rotateZ).box-sha ...

  5. web自动化时,怎么定位鼠标悬浮时才出现的元素

    web自动化时,怎么定位鼠标悬浮时才出现的元素 如图所示, 想要定位"修改密码",必须先鼠标悬浮在头像位置,才能看到 修改密码,然后按正常操作在F12里就没办法定位"修改 ...

  6. css简单实现鼠标悬浮时图片向上浮动的效果

    文章目录 前言 一.效果图 二.使用步骤 1.HTML代码 2.CSS代码 总结 前言 css简单实现鼠标悬浮时图片向上浮动的效果 一.效果图 二.使用步骤 1.HTML代码 代码如下(示例): &l ...

  7. 整理查找的鼠标悬浮移入移出事件

    鼠标的移入移出事件: 一 介绍 鼠标的移入和移出事件分别是onmouseover和onmousemove事件. 其中,onmouseover事件在鼠标移动到对象上方时触发事件处理程序,onmousem ...

  8. JS_鼠标移入移出触发事件

    js鼠标移入移出-触发事件 $(".dom").onmouseover=function(){console.log("鼠标移入"); } $(".d ...

  9. jquery:当内容发生改变时触发事件

    jquery:当内容发生改变时触发事件 (当元素的值改变时发生 change 事件(仅适用于表单字段). change() 方法触发 change 事件,或规定当发生 change 事件时运行的函数. ...

最新文章

  1. python程序设计教材浅显易懂_这些python自学技巧,你不会?
  2. TCPview 介绍
  3. 保姆级带你深入阅读NAS-BERT
  4. Android性能优化(1) 内存泄露 amp; 解决方案
  5. php中的server数组各个值详解 有利于对请求进行识别处理!
  6. 高分辨率下应用程序显示模糊的解决办法
  7. 推荐:没有项目经验,可以读一下这几个开源的企业级项目...
  8. k邻近算法-分类实操
  9. SpringCloud 微服务(一)
  10. 自己建网站时要注意哪些细节
  11. 为 VS 2012 打包 MSDN 在线文档为磁盘安装源
  12. 车轮轨迹原理_在简单地形上小车运动轨迹的数学表达(一)
  13. 部署AlphaSSL
  14. 关于java.util.concurrent.RejectedExecutionException: event executor terminated
  15. html5核心ml5图片居中,HTML5图片居中的问题
  16. 经典的71个做饭技巧,当你熟悉了,你就是二级厨师了
  17. 【基础】计算机网络相关的内容
  18. 使用PyPDF实现批量添加水印
  19. 我终于在生活中用到Python了!!!——用爬虫来揭露骗局真相
  20. Leo-IM,开源好用的IM(基于Netty开发)

热门文章

  1. 前端学习(2233):react的子传父数据传递
  2. 前端学习(2164):runtimeonly和runtimecompiler
  3. 前端学习(2159):vuecli脚手架的配置和安装
  4. oracle之基本的过滤和排序数据
  5. 前端学习(847):H5自定义属性
  6. 前端学习(566):margin auto机制
  7. 第五十八期:从0到1 手把手教你建一个区块链
  8. 第三十六期:学 Java 网络爬虫,需要哪些基础知识?
  9. python自增_python mysql自增字段AUTO_INCREMENT值的修改方式
  10. Codeforces Round #496 (Div. 3 ) E1. Median on Segments (Permutations Edition)(中位数计数)