暫無描述

seeCustomerDetails.js 3.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /**
  2. * 查看客户详情
  3. * */
  4. $(function() {
  5. var pro_id = helper.request.queryString("edit_id");
  6. getProjectDetail(pro_id);
  7. });
  8. //获取单个
  9. function getProjectDetail(ids) {
  10. $.getJSON(huayi.config.callcenter_url + "callcenterapi/api/CusUser/getsingle", {
  11. id: ids,// 是 string 客户id
  12. }, function(data) {
  13. if(data.state == "success") {
  14. var res = data.data;
  15. $('#customer_name').html(res.name); //姓名
  16. $('#customer_tel').html(res.mobilephone); //手机号码
  17. $('#customer_telphone').html(res.telephone);// 是 string 固话号码
  18. $('#customer_sex').html(res.sex); //性别
  19. var locations = '';
  20. var address = '';
  21. if(res.provincename ){
  22. locations = res.provincename + res.cityname;
  23. }
  24. if(res.address){
  25. address = res.address;
  26. }
  27. $('#customer_address').html(locations + address); //地址
  28. $('#customer_qq').html(res.qq);// 否 string qq
  29. $('#customer_email').html(res.email);// 否 string 邮箱
  30. $('#customer_companyname').html(res.companyname);// 是 string 公司名称
  31. $('#customer_companyphone').html(res.companyphone);// 是 string 公司号码
  32. $('#customer_companyposition').html(res.companyposition);// 否 string 公司职位
  33. $('#userCode').html(res.createuser + '-' + res.createusername); //创建人
  34. $('#createTime').html(res.createtime); //创建时间
  35. // $('#order_count').html(helper.filter.content(res.content)); //内容
  36. /* var EnclosureList = res.files;
  37. if(EnclosureList && EnclosureList.length > 0) {
  38. var $list = $("#fileList");
  39. $.each(EnclosureList, function(i, v) {
  40. if(v.filesmallurl) {
  41. //原来的图片
  42. var $li = $(
  43. '<li><span class="img_mask"><a href="' + v.fileurl + '" download="filename" title="点击下载"><i class="glyphicon glyphicon-download-alt" aria-hidden="true"></i></a></span>' +
  44. '<img layer-src="' + v.fileurl + '" alt="'+ v.filename +'" src="' + v.filesmallurl + '" title="图片"/>' +
  45. '<span class="file_name">' + v.filename + '</span>' +
  46. '</li>'
  47. );
  48. $list.append($li);
  49. } else {
  50. var $liFile = $(
  51. '<li><span class="img_mask"><a href="' + v.fileurl + '" download="filename" title="点击下载"><i class="glyphicon glyphicon-download-alt" aria-hidden="true"></i></a></span>' +
  52. '<div class="noThumb" title="文件"><i class="glyphicon glyphicon-paperclip"></i><p>无法预览</p></div>' +
  53. '<span class="file_name">' + v.filename + '</span>' +
  54. '</li>'
  55. );
  56. $list.append($liFile);
  57. }
  58. });
  59. layer.photos({
  60. photos: '#fileList',
  61. anim: 5, //0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数)
  62. title: '查看图片',
  63. move: '.layui-layer-title',
  64. shadeClose: false,
  65. closeBtn: 1,
  66. area: ['80%', '90%'],
  67. tab: function(pic, layero) {
  68. $('.layui-layer-content').on("mousewheel", function(e, d) {
  69. helper.methods.zoomImg($('#layui-layer-photos').find('img[alt="' + pic.alt + '"]'), d);
  70. $('#layui-layer-photos').find('img[alt="' + pic.alt + '"]').dragging({
  71. move: "both", //拖动方向,x y both
  72. randomPosition: false //初始位置是否随机
  73. });
  74. return false;
  75. });
  76. helper.methods.initLayerPhotos('#layui-layer-photos', pic, layero);
  77. },
  78. });
  79. } else {
  80. $("#fileList").html('<p class="abnormal">暂无内容。。。</p>');
  81. }*/
  82. }
  83. });
  84. }