BindCustomerStore.aspx 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BindCustomerStore.aspx.cs" Inherits="LYFZ.WeixinServers.BindCustomerStore" %>
  2. <!DOCTYPE html>
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head runat="server">
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>客片管理</title>
  7. <meta name="renderer" content="webkit">
  8. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  9. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  11. <meta name="apple-mobile-web-app-capable" content="yes">
  12. <meta name="format-detection" content="telephone=no">
  13. <link href="/plugins/layui/css/layui.css" rel="stylesheet" />
  14. <script src="/build/js/jquery-2.1.1.min.js"></script>
  15. <script src="/plugins/layui/layui.js" type="text/javascript"></script>
  16. <script type="text/javascript" src="/build/js/jquery-ui.min.js"></script>
  17. <script type="text/javascript" src='/build/js/stopExecutionOnTimeout.js?t=1'></script>
  18. <script src="/build/Js/Treatment.js" type="text/javascript"></script>
  19. <script src="/build/js/jquery.mockjax.js" type="text/javascript"></script>
  20. <style>
  21. .layui-header {
  22. position: relative;
  23. z-index: 1000;
  24. height: 100px;
  25. border: #e6e6e6 1px solid;
  26. margin: 10px;
  27. }
  28. .layui-header img{
  29. width:80px;
  30. height:80px;
  31. margin:10px;
  32. float:left;
  33. }
  34. </style>
  35. </head>
  36. <body>
  37. <section class="layui-larry-box">
  38. <div class="larry-personal">
  39. <div class="layui-header header ">
  40. <img src="/build/images/defaultUser.png" />
  41. <div style="float:left; padding-top:28px;">
  42. <div style="padding:5px;"><%=userModel.UserName %></div>
  43. <div style="padding-left:5px;color:#AAA"> <%= string.IsNullOrEmpty(userModel.UserPhone)?
  44. "<a href=\"BindCustomerStorePhone.aspx?entId="+userModel.EntID+"&openId="+userModel.OpenID+"\">完善绑定>></a>":
  45. "<a href=\"BindCustomerStorePhone.aspx?entId="+userModel.EntID+"&openId="+userModel.OpenID+"\" style=\"color:#AAA\">已绑定>></a>" %> </div>
  46. </div>
  47. </div>
  48. <div style="padding-right:10px;padding-left:10px;">
  49. <div class="larry-personal-body clearfix">
  50. <div class="layui-form-item">
  51. <button class="layui-btn" type="button" onclick="GetOrderNumberList()" style="width: 100%; height: 50px;">客片下载</button>
  52. </div>
  53. <div id="div_ClientData"></div>
  54. </div>
  55. </div>
  56. </div>
  57. </section>
  58. <script src="/build/js/clipboard.min.js" type="text/javascript"></script>
  59. <script type="text/javascript">
  60. $(function () {
  61. layui.use(['form', 'layedit', 'laydate', 'laypage'], function () {
  62. var form = layui.form;
  63. var laypage = layui.laypage;
  64. });
  65. GetOrderNumberList();
  66. });
  67. function GetOrderNumberList() {
  68. var url = "/api/SmsConfig.ashx?type=SearchOrderNumberByTelephone2";
  69. var JsonData = {
  70. openId: "<%=userModel.OpenID%>"
  71. };
  72. $("#div_ClientData").text("正在加载")
  73. AjaxPostByHeader(
  74. url,
  75. JsonData,
  76. { EnterpriseID: "<%=userModel.EntID%>" },
  77. function () {
  78. //ajax加载中
  79. },
  80. function (data) {
  81. var txtNumber = "";
  82. if (data.code == 200) {
  83. if (data.data.length > 0) {
  84. for (var i = 0; i < data.data.length; i++) {
  85. if (data.data[i].cd_OsType == -1) {
  86. txtNumber += "<div style=\"padding:5px;\" class=\"layui-form-item\"><a href=\"javascript:GetCloudErpOrderData('" + data.data[i].Ord_Number + "')\" >" + data.data[i].Ord_Number + " 点击下载</a></div>";
  87. }
  88. else
  89. {
  90. txtNumber += "<div style=\"padding:5px;\" class=\"layui-form-item\"><span tagUrl=\"" + data.data[i].cd_BaiduUrl + "\" data-clipboard-text=\"" + data.data[i].cd_BaiduCode + "\" >" + data.data[i].Ord_Number + "<br/>(百度云:提取码" + data.data[i].cd_BaiduCode + ") 点击下载</span></div>";
  91. }
  92. }
  93. $("#div_ClientData").html(txtNumber);
  94. var btns = document.querySelectorAll('span');
  95. var clipboard = new ClipboardJS(btns);
  96. clipboard.on('success', function (e) {
  97. console.log(e);
  98. SuccessAlert("提取码已复制成功<br/>等待进入百度云下载页面");
  99. setTimeout("OpenBaiduUrl('" + $(e.trigger).attr("tagUrl") + "')", 2000);
  100. });
  101. clipboard.on('error', function (e) {
  102. console.log(e);
  103. ErroAlert(e);
  104. });
  105. }
  106. else {
  107. ErroAlert("无相应完成的订单");
  108. }
  109. }
  110. else
  111. {
  112. ErroAlert(data.data);
  113. }
  114. })
  115. }
  116. function OpenBaiduUrl(url)
  117. {
  118. var urlList = url.split(':');
  119. if (urlList.length > 1)
  120. {
  121. url = urlList[1];
  122. }
  123. window.location.href=(url);
  124. }
  125. function GetCloudErpOrderData(orderNumber)
  126. {
  127. var url = "/api/SmsConfig.ashx?type=GetCloudErpOrderData";
  128. var JsonData = {
  129. orderNumbe: orderNumber
  130. };
  131. AjaxPostByHeader(
  132. url,
  133. JsonData,
  134. { EnterpriseID: "<%=userModel.EntID%>" },
  135. function () {
  136. //ajax加载中
  137. },
  138. function (data) {
  139. var txtNumber = "";
  140. if(data.code==200)
  141. {
  142. window.location.href=(data.data);
  143. }
  144. else
  145. {
  146. ErroAlert(data.data);
  147. }
  148. })
  149. }
  150. </script>
  151. </body>
  152. </html>