123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BindCustomerStore.aspx.cs" Inherits="LYFZ.WeixinServers.BindCustomerStore" %>
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>客片管理</title>
- <meta name="renderer" content="webkit">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="format-detection" content="telephone=no">
- <link href="/plugins/layui/css/layui.css" rel="stylesheet" />
- <script src="/build/js/jquery-2.1.1.min.js"></script>
- <script src="/plugins/layui/layui.js" type="text/javascript"></script>
- <script type="text/javascript" src="/build/js/jquery-ui.min.js"></script>
- <script type="text/javascript" src='/build/js/stopExecutionOnTimeout.js?t=1'></script>
- <script src="/build/Js/Treatment.js" type="text/javascript"></script>
- <script src="/build/js/jquery.mockjax.js" type="text/javascript"></script>
- <style>
- .layui-header {
- position: relative;
- z-index: 1000;
- height: 100px;
- border: #e6e6e6 1px solid;
- margin: 10px;
- }
- .layui-header img{
- width:80px;
- height:80px;
- margin:10px;
- float:left;
- }
- </style>
- </head>
- <body>
- <section class="layui-larry-box">
- <div class="larry-personal">
- <div class="layui-header header ">
- <img src="/build/images/defaultUser.png" />
- <div style="float:left; padding-top:28px;">
- <div style="padding:5px;"><%=userModel.UserName %></div>
- <div style="padding-left:5px;color:#AAA"> <%= string.IsNullOrEmpty(userModel.UserPhone)?
- "<a href=\"BindCustomerStorePhone.aspx?entId="+userModel.EntID+"&openId="+userModel.OpenID+"\">完善绑定>></a>":
- "<a href=\"BindCustomerStorePhone.aspx?entId="+userModel.EntID+"&openId="+userModel.OpenID+"\" style=\"color:#AAA\">已绑定>></a>" %> </div>
- </div>
- </div>
- <div style="padding-right:10px;padding-left:10px;">
- <div class="larry-personal-body clearfix">
- <div class="layui-form-item">
- <button class="layui-btn" type="button" onclick="GetOrderNumberList()" style="width: 100%; height: 50px;">客片下载</button>
- </div>
- <div id="div_ClientData"></div>
-
- </div>
- </div>
- </div>
- </section>
- <script src="/build/js/clipboard.min.js" type="text/javascript"></script>
- <script type="text/javascript">
- $(function () {
- layui.use(['form', 'layedit', 'laydate', 'laypage'], function () {
- var form = layui.form;
- var laypage = layui.laypage;
- });
- GetOrderNumberList();
- });
- function GetOrderNumberList() {
- var url = "/api/SmsConfig.ashx?type=SearchOrderNumberByTelephone2";
- var JsonData = {
-
- openId: "<%=userModel.OpenID%>"
- };
- $("#div_ClientData").text("正在加载")
- AjaxPostByHeader(
- url,
- JsonData,
- { EnterpriseID: "<%=userModel.EntID%>" },
- function () {
- //ajax加载中
- },
- function (data) {
- var txtNumber = "";
- if (data.code == 200) {
- if (data.data.length > 0) {
- for (var i = 0; i < data.data.length; i++) {
- if (data.data[i].cd_OsType == -1) {
- 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>";
- }
- else
- {
- 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>";
- }
- }
- $("#div_ClientData").html(txtNumber);
- var btns = document.querySelectorAll('span');
- var clipboard = new ClipboardJS(btns);
- clipboard.on('success', function (e) {
- console.log(e);
- SuccessAlert("提取码已复制成功<br/>等待进入百度云下载页面");
- setTimeout("OpenBaiduUrl('" + $(e.trigger).attr("tagUrl") + "')", 2000);
-
-
- });
- clipboard.on('error', function (e) {
- console.log(e);
- ErroAlert(e);
- });
- }
- else {
- ErroAlert("无相应完成的订单");
- }
- }
- else
- {
- ErroAlert(data.data);
- }
- })
- }
- function OpenBaiduUrl(url)
- {
- var urlList = url.split(':');
- if (urlList.length > 1)
- {
- url = urlList[1];
- }
- window.location.href=(url);
- }
- function GetCloudErpOrderData(orderNumber)
- {
- var url = "/api/SmsConfig.ashx?type=GetCloudErpOrderData";
- var JsonData = {
- orderNumbe: orderNumber
- };
- AjaxPostByHeader(
- url,
- JsonData,
- { EnterpriseID: "<%=userModel.EntID%>" },
- function () {
- //ajax加载中
- },
- function (data) {
- var txtNumber = "";
- if(data.code==200)
- {
-
- window.location.href=(data.data);
- }
- else
- {
- ErroAlert(data.data);
- }
-
- })
- }
- </script>
- </body>
- </html>
|