正在获取数据,请稍后...

';loginHtml+='';loginHtml+=''}else{loginHtml+='
';loginHtml+='
';loginHtml+='';loginHtml+='";loginHtml+='';loginHtml+="
";loginHtml+='';loginHtml+=' ';loginHtml+='

';loginHtml+=' ";loginHtml+='";loginHtml+="

";loginHtml+="
"}}}let func=AlertForm(isEnglish?"Sign in with your Google account or your Email address.":"通过手机验证码登录",loginHtml,800);if(!IsNull(GoogleOAuthClientID)&&isEnglish){try{GoogleOAuthEvent("buttonDiv",function(AjaxData){func();LoginSuccess(AjaxData);ReturnFunction(returnData.Data)})}catch(e){}ClickEdgEvent(".UseYourEmailAddressLogin","click",function(){GoogleVerificatePass=false;loginHtml='
';loginHtml+='
';loginHtml+='';loginHtml+='';loginHtml+='';loginHtml+='
';loginHtml+='';loginHtml+=' ';loginHtml+='';loginHtml+='
';loginHtml+='';let func1=AlertForm("Sign in with your Email address.",loginHtml);NormalLogin(function(){func();func1()})})}else{NormalLogin()}}else{if(IsAgainAjax==false){ReturnFunction()}else{Ajax(UseHostURL_Ajax+url+"",PostData,function(AjaxData){let returnData=JSON.parse(AjaxData);SetSessionKey(null,returnData.Token);CommonErrorAjaxResult(AjaxData,function(){ReturnFunction(returnData.Data)})})}}let phone="";function LoginClickEvent(func){try{document.querySelector(".Login_PhoneNumber").focus()}catch(e){try{document.querySelector(".Login_EmailAddress").focus()}catch(e){}}let intervalFunc;ClickEdgEvent(".Login_SendVerifivationCode","click",function(e,obj){if(isEnglish){try{if(GoogleVerificatePass){document.querySelector(".EmailForm").style.display="block";return}}catch(e){}phone=document.querySelector(".Login_EmailAddress").value.trim();if(phone==""||phone.indexOf("@")==-1){document.querySelector(".Login_MessageShow").innerHTML=isEnglish?"The email format is incorrect, please re-enter":"手机格式不正确, 请重新输入";document.querySelector(".Login_EmailAddress").focus();return}document.querySelector(".Login_SendVerifivationCode").style.display="none";document.querySelector(".ButtonClick_LoginRegister").style.display="inline-block"}else{phone=document.querySelector(".Login_PhoneNumber").value.trim();let pattern=/^1[23456789]\d{9}$/;if(!pattern.test(phone)){document.querySelector(".Login_MessageShow").innerHTML=(isEnglish?"The email format is incorrect, please re-enter":"手机格式不正确, 请重新输入");document.querySelector(".Login_PhoneNumber").focus();return}}obj.setAttribute("disabled","disabled");obj.style.display="none";document.querySelector(".Login_MessageShow").innerHTML=((isEnglish?"Sending verification code, please wait":"正在发送验证码, 请稍后")+"...");let minuteCount=60;document.querySelector(".Login_SendVerifivationCode").innerHTML=(minuteCount+(isEnglish?"seconds after resend":"秒后重新发送"));intervalFunc=setInterval(function(){minuteCount--;if(minuteCount>0){document.querySelector(".Login_SendVerifivationCode").innerHTML=(minuteCount+(isEnglish?"seconds after resend":"秒后重新发送"))}else{document.querySelector(".Login_SendVerifivationCode").removeAttribute("disabled");document.querySelector(".Login_SendVerifivationCode").innerHTML=((isEnglish?"Send verification code":"发送验证码"));clearInterval(intervalFunc);document.querySelector(".Login_SendVerifivationCode").innerHTML=((isEnglish?"Send verification code":"发送验证码"));document.querySelector(".Login_SendVerifivationCode").removeAttribute("disabled")}},1000);Ajax(UseHostURL_Ajax+"/CN_Point/SendVerification",{phone:phone,IsEmail:isEnglish?1:0},function(AjaxData){if(AjaxData.indexOf("5xwj-Error-404-Page-Show-Message")>-1){document.querySelector(".Login_MessageShow").innerHTML=((isEnglish?"System error":"系统错误")+'.');clearInterval(intervalFunc);document.querySelector(".Login_SendVerifivationCode").innerHTML=((isEnglish?"Send verification code":"发送验证码"));return}if(AjaxData=="1"){document.querySelector(".Login_MessageShow").innerHTML=((isEnglish?"The mobile phone number you entered sent too many verification codes. It is recommended to change it.":"您输入的手机号发送的验证码次数过多, 建议换一个手机号哦."));clearInterval(intervalFunc);document.querySelector(".Login_SendVerifivationCode").innerHTML=((isEnglish?"Send verification code":"发送验证码"));document.querySelector(".Login_SendVerifivationCode").removeAttribute("disabled");return}if(AjaxData=="3"){document.querySelector(".Login_MessageShow").innerHTML=((isEnglish?"The code has been sent. You can resend it in one minute":"短信已发送, 一分钟后才能重新发送哦."));clearInterval(intervalFunc);document.querySelector(".Login_SendVerifivationCode").innerHTML=((isEnglish?"Send verification code":"发送验证码"));document.querySelector(".Login_SendVerifivationCode").removeAttribute("disabled");return}if(AjaxData=="4"||AjaxData=="5"){document.querySelector(".Login_MessageShow").innerHTML=((isEnglish?"Send error":"发送失败"));clearInterval(intervalFunc);document.querySelector(".Login_SendVerifivationCode").innerHTML=((isEnglish?"Send verification code":"发送验证码"));document.querySelector(".Login_SendVerifivationCode").removeAttribute("disabled");return}if(AjaxData.indexOf("API-Error")>-1){let json=JSON.parse(AjaxData.replace("API-Error",""));clearInterval(intervalFunc);document.querySelector(".Login_SendVerifivationCode").innerHTML=((isEnglish?"Send verification code":"发送验证码"));document.querySelector(".Login_MessageShow").innerHTML=(json.Message);document.querySelector(".Login_SendVerifivationCode").removeAttribute("disabled");return}document.querySelector(".Login_MessageShow").innerHTML=((isEnglish?"The verification code has been sent and is valid for 15 minutes.":"验证码已发送, 此验证码15分钟内有效."));document.querySelector(".Login_VerifivationCode").focus();document.querySelector(".ButtonClick_LoginRegister").style.display="inline-block;"})});ClickEdgEvent(".Login_OK","click",function(){if(GoogleVerificatePass&&isEnglish){document.querySelector(".Login_CodeMessageShow").innerHTML=('Please click reCAPTCHA');return}try{if(document.querySelector(".Login_VerifivationCode").value==""){document.querySelector(".Login_CodeMessageShow").innerHTML=((isEnglish?"Please enter the verification code":"请输入验证码"));return}Ajax(UseHostURL_Ajax+"/CN_Point/VerificateMessage",{phone:document.querySelector("."+(isEnglish?"Login_EmailAddress":"Login_PhoneNumber")).value,code:document.querySelector(".Login_VerifivationCode").value},function(AjaxData){if(AjaxData=="2"){document.querySelector(".Login_CodeMessageShow").innerHTML=((isEnglish?"The verification code has expired. Please enter the latest verification code":"验证码已过期, 请输入最新的验证码"));return}if(AjaxData=="3"){document.querySelector(".Login_CodeMessageShow").innerHTML=((isEnglish?"The verification code is incorrect. Please re-enter the verification code":"验证码错误, 请重新输入验证码"));return}if(AjaxData.indexOf("5xwj-Error-404-Page-Show-Message")>-1){document.querySelector(".Login_CodeMessageShow").innerHTML=((isEnglish?"System error":"系统错误")+'.');return}clearInterval(intervalFunc);document.querySelector(".Login_SendVerifivationCode").value=((isEnglish?"Send code":"发送验证码"));LoginClickEvent();document.querySelector(".Login_SendVerifivationCode").removeAttribute("disabled");LoginSuccess(AjaxData);try{document.querySelector(".LoginForm").style.display="none"}catch(e){}document.querySelector(".LoginAndRegister").style.display="none";document.querySelector(".ProfileImformation").style.display="inline-block";func(AjaxData)})}catch(AjaxData){}});try{try{document.querySelector(".Login_PhoneNumber").removeEventListener("keyup",null)}catch(e){}document.querySelector(".Login_PhoneNumber").addEventListener("keyup",function(){document.querySelector(".Login_MessageShow").innerHTML=(' ')});try{document.querySelector(".Login_PhoneNumber").removeEventListener("paste",null)}catch(e){}document.querySelector(".Login_PhoneNumber").addEventListener("paste",function(){document.querySelector(".Login_MessageShow").innerHTML=' '});try{document.querySelector(".Login_VerifivationCode").removeEventListener("keyup",null)}catch(e){}document.querySelector(".Login_VerifivationCode").addEventListener("keyup",function(){document.querySelector(".Login_CodeMessageShow").innerHTML=(' ')});try{document.querySelector(".Login_VerifivationCode").removeEventListener("paste",null)}catch(e){}document.querySelector(".Login_VerifivationCode").addEventListener("paste",function(){document.querySelector(".Login_CodeMessageShow").innerHTML=' '})}catch(e){}ClickEdgEvent(".Login_Cancel,.LoginShadow","click",function(){document.querySelector(".LoginForm").style.display="none"})}function CommonErrorAjaxResult(str,successFunc){if(str.indexOf("5xwj-Error-404-Page-Show-Message")>-1){try{ErrorFunction()}catch(e){AlertError((isEnglish?"There's something wrong with the system":"系统似乎出了点问题")+"...")}return}if(str=="Token Empty"){try{ErrorFunction()}catch(e){AlertError((isEnglish?"There's something wrong with the system":"系统似乎出了点问题"))}return}if(str=="Token Error"){try{ErrorFunction()}catch(e){AlertError((isEnglish?"There's something wrong with the system":"系统似乎出了点问题"))}return}if(str=="TokenInvalid"){try{ErrorFunction()}catch(e){AlertError((isEnglish?"There's something wrong with the system":"系统似乎出了点问题"))}return}successFunc()}};let AlertFormCount=0;function AlertForm(title,body,width){AlertFormCount++;let html='';html+='';html+='
';html+='
';html+='
';html+=''+title+'';html+='×';html+='
';html+='
';html+=body;html+='';html+='
';html+='
';html+='
';document.querySelector("body").insertAdjacentHTML("beforeend",html);let obj=document.querySelector(".AlertForm"+AlertFormCount);function CloseFunction(){obj.remove()}ClickEdgEvent(".AlertForm"+AlertFormCount+", .AlertForm"+AlertFormCount+" .Form_Close","click",function(){obj.remove()});document.querySelectorAll(".AlertForm"+AlertFormCount+" .FormBody").forEach(function(elem){elem.removeEventListener("click",null);elem.addEventListener("click",function(e){e.stopPropagation()})});return CloseFunction}function ClickEdgEvent(className,eventName,func){document.querySelectorAll(className).forEach(function(elem){try{elem.removeEventListener(eventName,null)}catch(e){}try{elem.addEventListener(eventName,function(e){try{func(e,this)}catch(e1){}})}catch(e){}})}function IsNull(a){return!(a!=null&&a!==""&&a!=="null"&&a!==void 0&&a!=="undefined")};function LoginSuccess(AjaxData){SetSessionValue(AjaxData);document.querySelector(".LoginAndRegister").style.display="none";document.querySelector(".ProfileImformation").style.display="inline-block"}function Ajax(a,b,c){let xhr=new XMLHttpRequest;xhr.open("POST",a,true);xhr.withCredentials=true;xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xhr.onreadystatechange=function(){if(xhr.readyState===4&&xhr.status===200){c(xhr.responseText)}};let params=new URLSearchParams;for(let key in b){params.append(key,b[key])}xhr.send(params.toString())}function GetSessionJson(){try{var name="LoginToken=";var decodedCookie=decodeURIComponent(document.cookie);var ca=decodedCookie.split(';');for(var i=0;i{const observer=new IntersectionObserver(entries=>{entries.forEach(entry=>{if(entry.isIntersecting){if(img.complete&&img.naturalHeight>0){OpearteImageCover(img,index)}else{img.addEventListener("load",function handleLoad(){OpearteImageCover(img,index);img.removeEventListener("load",handleLoad)})}observer.unobserve(img)}})});observer.observe(img)});function OpearteImageCover(img,index){const possibleClasses=[".Inner_EachProduct",".CategoryImage",".Banner",".BigImage",".AllSmallImages_Span","Home_Product"];const cn=possibleClasses.find(cls=>img.closest(cls));if(!cn)return;const parent=img.closest(cn);parent.style.position="relative";if(parent.querySelector(".image-cover"))return;const span=document.createElement("span");span.classList.add("image-cover");parent.insertBefore(span,parent.firstChild);const resizeObserver=new ResizeObserver(()=>{span.style.width=img.offsetWidth+"px";span.style.height=img.offsetHeight+"px"});resizeObserver.observe(img);if(cn===".BigImage"){adjustBigImageHeight()}}function adjustBigImageHeight(){const bigImageSpan=document.querySelector(".BigImage .image-cover");if(!bigImageSpan)return;const imgs=document.querySelectorAll(".AllSmallImages img");let minRatio=Infinity;imgs.forEach(img=>{if(img.complete&&img.naturalHeight>0){checkRatio(img)}else{img.addEventListener("load",()=>checkRatio(img))}});function checkRatio(img){const ratio=img.naturalWidth/img.naturalHeight;if(ratio0){SetSessionValue(JSON.stringify(autoLoginInformationJson),null)}}catch(e){}{let loginCodeParams=GetUrlParam("LoginCode1");var isnullParams=IsNull(loginCodeParams);if(isHtml&&!isnullParams){Ajax(UseHostURL_Ajax+"/CN_Point/GetCookieWithToken",{token:loginCodeParams},function(token){SetSessionValue(token);AboutSession()})}else{AboutSession()}function AboutSession(){let session=GetSessionJson();try{let token=session.Token;document.querySelectorAll(".ProfileImformation").forEach(function(elem){elem.style.display='inline-block'});document.querySelectorAll(".LoginAndRegister").forEach(function(elem){elem.style.display='none'})}catch(AjaxData){document.querySelectorAll(".LoginAndRegister").forEach(function(elem){elem.style.display='inline-block'});document.querySelectorAll(".ProfileImformation").forEach(function(elem){elem.style.display='none'})}if(isEnglish&&IsNull(session)&&!IsNull(GoogleOAuthClientID)){let buttonDivBodyDefault=document.createElement("div");buttonDivBodyDefault.id="buttonDivBodyDefault";buttonDivBodyDefault.style.display="none";document.querySelector("body").appendChild(buttonDivBodyDefault);GoogleOAuthEvent("buttonDivBodyDefault",null)}ClickEdgEvent(".LoginAndRegister","click",function(){if(isEnglish){}CommonAfterLoginEvent(function(){})});if(!IsNull(session)){let jsonData={};try{jsonData=session.Data[0]}catch(e){}if(!IsNull(jsonData.UserID)&&!isEnglish){document.querySelectorAll(".Navigation_Product_Image, .Navigation_DetailBook").forEach(el=>{el.style.display="inline-block"})}if(!IsNull(jsonData.Portrait)||!IsNull(jsonData.UserName)){let htmlCode='';htmlCode+='';if(!IsNull(jsonData.Portrait)){htmlCode+=''}htmlCode+=''+(IsNull(jsonData.UserName)?"":jsonData.UserName)+'';document.querySelectorAll(".ProfileImformation").forEach(function(elem){elem.innerHTML=htmlCode;try{elem.closest(".Nav_Category").style.cssFloat="right"}catch(e){}})}}}}document.querySelector("section").style.minHeight=(window.innerHeight-document.querySelector("nav").offsetHeight-document.querySelector("footer").offsetHeight)+"px";PageLoadEvent();if(!isEnglish){let widthImagePolice=((window.innerWidth-parseFloat(window.getComputedStyle(document.getElementsByTagName("section")[0]).width.replace("px","")))/2-40);if(widthImagePolice>0){let fanzhaTupian='https://zyc-bucket.oss-cn-beijing.aliyuncs.com/Images/%E5%85%A8%E5%9B%BD%E7%BB%9F%E4%B8%80%E5%8F%8D%E8%AF%88%E7%83%AD%E7%BA%BF.jpg';ClickEdgEvent(".Bottom_CaseNumber, .PoliceMainImage","click",function(){AlertForm("全国统一反诈热线",'',1000)});widthImagePolice=widthImagePolice>200?200:widthImagePolice;document.querySelector('.PoliceMainImage').style.width=widthImagePolice+'px';document.querySelector('.PoliceMainImage').setAttribute("src",fanzhaTupian+"?x-oss-process=image/resize,w_"+widthImagePolice)}else{document.querySelector(".PoliceMainImage").remove()}}ClickEdgEvent(".BottomPoliceCY","click",function(){if(isEnglish){AlertForm("Initiative from Chengxi Police Station, Yiwu Public Security Bureau",'

Legal Awareness Campaign | Purify the Online Environment

The cyberspace is our shared spiritual home. With the rapid development of the Internet, online rumors frequently appear, seriously misleading public opinion, undermining social trust, and wasting network resources. To maintain a healthy and clean online environment, Chengxi Police Station of Yiwu Public Security Bureau issues the following initiative:

1. Improve the ability to discern, do not spread rumors. When encountering uncertain information online, verify it through multiple channels and do not casually forward unconfirmed information; raise your media literacy and learn to identify rumors — do not become a spreader of rumors.

2. Strengthen legal awareness, do not fabricate rumors. Strictly abide by national laws and regulations; do not fabricate, publish, or spread false information. Consciously maintain order in cyberspace and jointly create a healthy, positive online environment.

3. Maintain a rational attitude, do not believe rumors. For online hot topics and sensitive information, stay rational and objective; do not blindly believe or spread them. Follow information released by authoritative departments and professional institutions to improve credibility.

Cyberspace is our common home — let us take action together to combat online rumors and cultivate a positive, healthy, and benevolent online culture.

  
',1000)}else{AlertForm("义乌市公安局城西派出所倡议",'

普法宣传|净化网络环境

网络空间是我们共同的精神家园。随着互联网的快速发展,网络谣言层出不穷,严重误导公共舆论,破坏社会信任,浪费网络资源。为维护健康、清朗的网络环境,义乌市公安局城西派出所发出以下倡议:

一、提高辨别能力,不传播谣言。在网络上遇到不确定的信息时,要多方查证,不随意转发未经证实的信息;提高自身的媒介素养,学会辨别谣言,不做谣言的传播者。

二、增强法律意识,不制造谣言。严格遵守国家法律法规,不编造、不发布、不传播虚假信息;自觉维护网络空间的秩序作文吧,共同营造一个健康、积极的网络环境。

三、保持理性态度,不相信谣言。对于网络上的热点事件和敏感信息,要保持理性和客观的态度,不盲目相信和传播;关注权威部门和专业机构发布的信息,提高信息的可信度。

四、发挥监督作用,及时举报谣言。如果发现有人在网络上散布谣言,要及时向相关部门举报,发挥群众的监督作用,让谣言无处遁形。

网络空间是我们共同的家园,让我们一起行动起来,共同打击网络谣言,共同培育积极健康、向上向善的网络文化。

  
',1000)}ClickEdgEvent(".AlertForm_Content_Bottom_Button, .AlertForm_Content_Bottom_Button","click",function(){document.querySelector(".AlertForm"+AlertFormCount).remove()})});const lazyImages=[].slice.call(document.querySelectorAll("img.lazy"));if("IntersectionObserver"in window){let lazyImageObserver=new IntersectionObserver(function(entries,observer){entries.forEach(function(entry){if(entry.isIntersecting){let lazyImage=entry.target;lazyImage.src=lazyImage.dataset.src;lazyImage.onload=()=>lazyImage.classList.add("lazy-loaded");lazyImage.classList.remove("lazy");lazyImageObserver.unobserve(lazyImage)}})});lazyImages.forEach(function(lazyImage){lazyImageObserver.observe(lazyImage)})}else{let active=false;const lazyLoad=function(){if(active===false){active=true;setTimeout(function(){lazyImages.forEach(function(lazyImage){if(lazyImage.getBoundingClientRect().top<=window.innerHeight&&lazyImage.getBoundingClientRect().bottom>=0&&getComputedStyle(lazyImage).display!=="none"){lazyImage.src=lazyImage.dataset.src;lazyImage.onload=()=>lazyImage.classList.add("lazy-loaded");lazyImage.classList.remove("lazy");lazyImages.splice(lazyImages.indexOf(lazyImage),1)}});active=false;if(lazyImages.length===0){document.removeEventListener("scroll",lazyLoad);window.removeEventListener("resize",lazyLoad);window.removeEventListener("orientationchange",lazyLoad)}},200)}};document.addEventListener("scroll",lazyLoad);window.addEventListener("resize",lazyLoad);window.addEventListener("orientationchange",lazyLoad)}document.querySelectorAll(".ProductCategorySpan").forEach(function(elem){var html='';html+='';html+='';html+='';html+='';html+='';html+='';html+='';html+='';html+='';html+='';html+='';html+='';html+='';html+='';html+='';elem.innerHTML=html})}function LogPage(page){Ajax(UseHostURL_Ajax+"/CN_Point/LogRecord",{page:page},function(AjaxData){})}function GetUrlParam(a){let b=new RegExp("(^|&)"+a+"=([^&]*)(&|$)");let c=window.location.search.substr(1).match(b);if(c!=null){return unescape(c[2])}return null};;function ShowLoading(text,backgroundColor,width,height){let htmlAdd='';try{document.querySelector(".Category_ShowLoading").remove()}catch(e){}let widthForm=IsNull(width)?500:width;let heightForm=IsNull(height)?100:height;backgroundColor=IsNull(backgroundColor)?"rgba(255,168,0,0.65)":backgroundColor;htmlAdd+='
';htmlAdd+=text;htmlAdd+='
';document.querySelector("body").insertAdjacentHTML("beforeend",htmlAdd);return function(){try{document.querySelector(".Category_ShowLoading").remove()}catch(e){}}};function ShowPrice(price){price=parseFloat(price).toFixed(8)+"";let newstr=price;let leng=price.length-price.indexOf(".")-1;if(price.indexOf(".")>-1){for(let i=leng;i>0;i--){if(newstr.lastIndexOf("0")>-1&&newstr.substr(newstr.length-1,1)==0){let k=newstr.lastIndexOf("0");if(newstr.charAt(k-1)=="."){let asasas111=newstr.substring(0,k-1);return asasas111.indexOf(".")>-1?parseFloat(asasas111):parseInt(asasas111)}else{newstr=newstr.substring(0,k)}}else{return newstr.indexOf(".")>-1?parseFloat(newstr):parseInt(newstr)}}}return price.indexOf(".")>-1?parseFloat(price):parseInt(price)};function DateDiff(sDate1,sDate2,needmtabs){let aDate,oDate1,oDate2,iDays;aDate=sDate1.split("-");oDate1=new Date(sDate1);aDate=sDate2.split("-");oDate2=new Date(sDate2);if(needmtabs=="1"){return parseInt((oDate1-oDate2)/1000/60/60/24)}iDays=parseInt(Math.abs(oDate1-oDate2)/1000/60/60/24);return iDays};function DateDiffSecondNoAbs(sDate1,sDate2){let aDate,oDate1,oDate2,iDays;aDate=sDate1.split("-");oDate1=new Date(sDate1);aDate=sDate2.split("-");oDate2=new Date(sDate2);iDays=parseInt(oDate1-oDate2)/1000;return iDays};function Boolean(bools){if(IsNull(bools)){return false}return bools==true||bools.toLowerCase()=="true"||bools=="1"};function GeneratePage(dataCount,pegeIndex,pageSize){pegeIndex=parseInt(pegeIndex);pageSize=IsNull(pageSize)?48:pageSize;let pageCount=parseInt(dataCount%pageSize==0?dataCount/pageSize:dataCount/pageSize+1);let htmlCode='';if(pageCount>1){htmlCode+='';htmlCode+="
";htmlCode+=""+(isEnglish?"Current Page":"当前页数")+":"+pegeIndex+" "+(isEnglish?"总页数":"Page Count")+":"+pageCount+" "+(isEnglish?"Total Quantity":"总数量")+":"+dataCount+"";htmlCode+="";if(pegeIndex!=1){htmlCode+=""+(isEnglish?"First Page":"首页")+""}if(pageCount<=7){for(var i=1;i<>"+i+""}else{htmlCode+=""+i+""}}}else{if(pegeIndex<4){for(var i=1;i<8;i++){if(i==pegeIndex){htmlCode+=""+i+""}else{htmlCode+=""+i+""}}}else if(pegeIndex>3&&pegeIndex<>"+i+""}else{htmlCode+=""+i+""}}}else{for(var i=pageCount-6;i<>"+i+""}else{htmlCode+=""+i+""}}}}if(pegeIndex!=pageCount){htmlCode+=""+(isEnglish?"Last page":"尾页")+""}htmlCode+="
"}return htmlCode};function PageLoadEvent(){var tabIndex=0;var Finance_Index_PageIndex=0,Finance_Index_PageSize=50;var Finance_Index_StartDate='',Finance_Index_EndDate='',Finance_Index_Product='';var Finance_Index_BookType=1;var sessionJsonInner=GetSessionJson().Data[0];var CustomerType=sessionJsonInner.Type;var recordBillData=[],recordDaybookData=[];ShowTabAccount();function ShowTabAccount(){if(tabIndex==0){CommonAjaxRunLoginPrivate("/CN_Point/GetDaybookData",{pageIndex:Finance_Index_PageIndex,pageSize:Finance_Index_PageSize,productName:Finance_Index_Product},function(productJson){if(Finance_Index_PageIndex==0){Finance_Index_PageIndex=productJson.PageIndex[0].PageIndex}GetBookDetailHtml_GrokCode(productJson);function GetBookDetailHtml_GrokCode(jsonData){var orders=jsonData.Data||[];var products=jsonData.OrderProduct||[];var bills=jsonData.Bill||[];var nextDate=jsonData.DeliveryTime.length==0?"":jsonData.DeliveryTime[0].DeliveryTime;var prodMap={};for(var i=0;inew Date(billRealLastDate[o.BID])){billRealLastDate[o.BID]=o.DeliveryDate}}}var h='';h+='
';h+='';h+='';h+='';h+='';h+='';if(orders.length==0){h+=''}else{var hasMemo=false;var insertedBills={};for(var i=0;i';if(j===0){var labels=[];if(Boolean(order.IsReturn)){labels.push('退货')}if(Boolean(order.HasPay)){labels.push('已付')}if(CustomerType=="Customer"&&order.OrderType=="2"){labels.push('代收')}if(order.BID){labels.push('已结')}h+=''}h+='';h+='';h+='';h+='';h+='';if(j===0){if(order.Memo&&order.Memo.trim())hasMemo=true;h+='';h+=''}h+='';if(isLastItem&&order.BID&&!insertedBills[order.BID]){var realLastDate=billRealLastDate[order.BID];if(realLastDate&&realLastDate===order.DeliveryDate){var billInfo=null;for(var k=0;k0&&AboutDateFunction.DateDiffSecondNoAbs(nextDate,billInfo.srd.split('T')[0])>0&&AboutDateFunction.DateDiffSecondNoAbs(nextDate,billInfo.edd.split('T')[0])>0&&AboutDateFunction.DateDiffSecondNoAbs(nextDate,billInfo.erd.split('T')[0])>0)){h+='';h+='';insertedBills[order.BID]=true}}}}}}}h+='
日期产品名称数量规格价格总金额订单备注货号
暂无订单
';h+=order.DeliveryDate;if(labels.length>0){if(labels.length===1){h+='  '+labels[0]}else{h+='
'+labels[0];for(var k=1;k<>
'+item.ProductName+''+parseInt(item.Number)+''+parseInt(item.Norm)+''+ShowPrice(item.Price)+''+ShowPrice(item.Norm*item.Price*item.Number)+''+(order.Memo||'')+''+order.OrderNumber+'
';h+=billInfo.PayTime.split('T')[0]+' 支付 ';h+=''+ShowPrice(billInfo.sp)+' 元';h+='  账单区间:'+FormatBillDate(billInfo);h+=billInfo.hct?'   已结清':'';if(billInfo.Memo)h+='  '+billInfo.Memo;h+='
';h+='
';h+='
';h+='';var count=jsonData.Count[0].Count;if(count>Finance_Index_PageSize){h+=GeneratePage(count,Finance_Index_PageIndex,Finance_Index_PageSize)}$(".MyAccount_Wrap").html(h);if(!hasMemo){$(".OrderMemo").hide()}$("html, body").animate({scrollTop:$(document).height()},300);CommonClickEvent();GeneratePageEvent(ShowTabAccount,"MyAccount_Wrap","Finance_Index_PageIndex","Finance_Index_PageSize",count);const wrap=document.querySelector(".MyAccount_Wrap");if(wrap&&wrap.offsetHeight+151>window.innerHeight){document.querySelectorAll(".Account_Nav").forEach(nav=>{nav.style.display="inline-block"})}}function GetBookDetailHtml_MyCode(jsonData){var bookData=jsonData.Data;var orderProductData=jsonData.OrderProduct;var count=jsonData.Count[0].Count;var bill=jsonData.Bill;const orderProductMap={};orderProductData.forEach(p=>{if(!orderProductMap[p.OID])orderProductMap[p.OID]=[];orderProductMap[p.OID].push(p)});bookData.forEach(order=>{order.products=orderProductMap[order.OID]||[];order.productCount=order.products.length});var colSpan=8;for(var i=0;i{const bid=order.BID||"unpaid";if(!ordersByBill[bid])ordersByBill[bid]=[];ordersByBill[bid].push(order)});var h='';h+='';var hasMemo=false;{h+='';{h+='';h+='';h+='';h+='';h+='';h+='';h+='';h+='';h+='';h+='';h+='';h+=''}h+='';if(count==0){h+=''}else if(false){var billID="";for(var i=0;i'}{h+='';if(!hasGetOrderData){h+=''}h+='';h+='';h+='';h+='';h+='';if(!IsNull(bookData[i].Memo)){hasMemo=true}if(!hasGetOrderData){h+='';h+=''}hasGetOrderData=true;h+=''}}}}}else{let hasMemo=false;let prevBID=null;bookData.forEach((order,index)=>{const currentBID=order.BID||"unpaid";var billHtml='';if(currentBID!==prevBID&&prevBID!==null&¤tBID!=="unpaid"){const billInfo=bill.find(b=>b.BID==currentBID);if(billInfo){billHtml+=''}}const products=order.products;const backgroundColor=order.BID?'efefef':order.IsReturn?'FFE2E5':order.HasPay?'E1F0FF':(CustomerType==="Customer"&&order.OrderType==="2")?'FFF4DE':'FFF';products.forEach((p,i)=>{h+='';if(i===0){h+=''}h+='';h+='';h+='';h+='';h+='';if(i===0){if(order.Memo)hasMemo=true;h+='';h+=''}h+=''});h+=billHtml;prevBID=currentBID})}h+='';h+='
日期产品名称数量规格价格总金额订单备注货号
暂无订单
';var billIndex=[];for(var k=0;k<>'+billIndex.PayTime.split('T')[0]+'';h+='支付';h+=''+ShowPrice(billIndex.sp)+'';h+='';h+='账单区间: ';h+=''+FormatBillDate(billIndex)+'';if(Boolean(billIndex.hct)){h+='已结清'}if(billIndex.Memo){h+=''+billIndex.Memo+''}h+='';h+='';h+='';h+='
';h+=deliveryDate;var CommonLabelStyle="font-size:12px;padding:2px 5px;background:red;color:#efefef;border-radius:3px;margin-left:10px;";if(Boolean(bookData[i].IsReturn)){h+='
退货'}if(Boolean(bookData[i].HasPay)){h+='已付'}if(CustomerType=="Customer"&&bookData[i].OrderType=="2"){h+='代收'}if(!IsNull(bookData[i]["BID"])&&bookData[i]["BID"]!=0){h+='已结账'}h+='
';if($(document).width()>745){h+=''+orderProductData[j].ProductName+''}else{h+=''}h+='';h+=parseInt(orderProductData[j].Number);h+='';h+=parseInt(orderProductData[j].Norm);h+='';h+=ShowPrice(orderProductData[j].Price);h+='';h+=ShowPrice(orderProductData[j].Norm*orderProductData[j].Price*orderProductData[j].Number);h+='';h+=bookData[i].Memo;h+='';h+=bookData[i].OrderNumber;h+='
';billHtml+=billInfo.PayTime.split('T')[0]+' 支付 '+ShowPrice(billInfo.sp)+' 元';billHtml+='账单区间: '+FormatBillDate(billInfo);billHtml+=billInfo.hct?'已结清':'';billHtml+=(billInfo.Memo||'');billHtml+='
'+order.DeliveryTime.split('T')[0];if(order.IsReturn)h+='
退货';if(order.HasPay)h+='
已付';if(CustomerType==="Customer"&&order.OrderType==="2")h+='
代收';if(order.BID)h+='
已结账';h+='
'+p.ProductName+''+parseInt(p.Number)+''+parseInt(p.Norm)+''+parseInt(p.Price)+''+ShowPrice(p.Norm*p.Price*p.Number)+''+(order.Memo||'')+''+order.OrderNumber+'


';if(count>Finance_Index_PageSize){h+=GeneratePage(count,Finance_Index_PageIndex,Finance_Index_PageSize)}h+=''}$(".MyAccount_Wrap").html(h);$("html, body").scrollTop($(document).height());if(!hasMemo){$(".OrderMemo").hide();$(".BillColspanTD").each(function(){$(this).attr("colspan",7)})}CommonClickEvent()}function CommonClickEvent(){{$(".BookDetailData_BookTypeFilter").removeClass("btn-info").removeClass("btn-default").addClass("btn-default");$(".BookDetailData_BookTypeFilter[Types='"+Finance_Index_BookType+"']").removeClass("btn-info").removeClass("btn-default").addClass("btn-info");if(Finance_Index_BookType==1){$(".BookDetailData_ShowAndHideDataFilter").closest(".dropdown").show();$(".BookDetailData_ProductNameFilter").closest(".col-md-6").show()}else{$(".BookDetailData_ShowAndHideDataFilter").closest(".dropdown").hide();$(".BookDetailData_ProductNameFilter").closest(".col-md-6").hide()}}$(".BookDetailData_ShowAndHideDataFilter").unbind("click").click(function(){$(this).closest(".dropdown").find(".dropdown-menu").toggle()});$(".BookDetailData_DateFilterQuickly").unbind("click").click(function(){Finance_Index_StartDate=$(this).attr("StartDate");Finance_Index_EndDate=$(this).attr("EndDate");Finance_Index_PageIndex=0;Finance_Index_Product=$(".BookDetailData_ProductNameFilter").val();Finance_Index_DataBindEvent()});$(".BookDetailData_StartCustomnDateSearch").unbind("click").click(function(){var a=$(".BookDetailData_StartDateFilter").val();var b=$(".BookDetailData_EndDateFilter").val();if(IsNull(a)&&IsNull(b)){AlertError("起始/结束日期至少填一个");return}Finance_Index_StartDate=a;Finance_Index_EndDate=b;Finance_Index_PageIndex=0;Finance_Index_Product=$(".BookDetailData_ProductNameFilter").val();Finance_Index_DataBindEvent()});$(".BookDetailData_StartSearchButton").unbind("click").click(function(){Finance_Index_PageIndex=0;Finance_Index_StartDate=$(".BookDetailData_StartDateFilter").val();Finance_Index_EndDate=$(".BookDetailData_EndDateFilter").val();Finance_Index_Product=$(".BookDetailData_ProductNameFilter").val();Finance_Index_DataBindEvent()});$(".BookDetailData_ProductNameFilter").unbind("keyup").keyup(function(e){if(e.keyCode==13){Finance_Index_PageIndex=0;Finance_Index_StartDate=$(".BookDetailData_StartDateFilter").val();Finance_Index_EndDate=$(".BookDetailData_EndDateFilter").val();Finance_Index_Product=$(".BookDetailData_ProductNameFilter").val();Finance_Index_DataBindEvent()}});$(".BookDetailData_BookTypeFilter").unbind("click").click(function(){Finance_Index_BookType=$(this).attr("Types");Finance_Index_DataBindEvent()})}function FormatBillDate(bill){const{sdd,edd,srd,erd}=bill;const d1_s=new Date(sdd);const d1_e=new Date(edd);const d2_s=new Date(srd);const d2_e=new Date(erd);function isMonthStart(d){return d.getDate()===1}function isMonthEnd(d){const test=new Date(d.getFullYear(),d.getMonth()+1,0);return d.getDate()===test.getDate()}function isWholeMonth(ds,de){return(isMonthStart(ds)&&isMonthEnd(de)&&ds.getFullYear()===de.getFullYear()&&ds.getMonth()===de.getMonth())}function isMonthRange(ds,de){return isMonthStart(ds)&&isMonthEnd(de)&&(ds(n<10?"0"+n:n);return`${isNowYear(ds)}-${pad(ds.getMonth()+1)}-${pad(ds.getDate())}`+`~${isNowYear(de).getFullYear()}-${pad(de.getMonth()+1)}-${pad(de.getDate())}`}function formatMonth(ds){return`${isNowYear(ds)}${ds.getMonth()+1}月份`}function formatMonthShort(ds){return`${isNowYear(ds)}${ds.getMonth()+1}月`}if(sdd===srd&&edd===erd){if(isWholeMonth(d1_s,d1_e)){return formatMonthShort(d1_s)}if(isMonthRange(d1_s,d1_e)){const endYearLabel=isNowYear(d1_e);return`${isNowYear(d1_s)}${d1_s.getMonth()+1}月`+`至${endYearLabel}${d1_e.getMonth()+1}月`}return fullRange(d1_s,d1_e)}function isNowYear(dttt){const yearNow=(new Date).getFullYear();return(dttt.getFullYear()===yearNow)?"今年":`${d1_e.getFullYear()}年`}let shipStr="";let returnStr="";if(isWholeMonth(d1_s,d1_e)){shipStr=`发货:${formatMonth(d1_s)}`}else if(isMonthRange(d1_s,d1_e)){shipStr=`发货:${formatMonth(d1_s)}~${formatMonth(d1_e)}`}else{shipStr=`发货区间:${fullRange(d1_s,d1_e)}`}if(isWholeMonth(d2_s,d2_e)){returnStr=`退货:${formatMonth(d2_s)}`}else if(isMonthRange(d2_s,d2_e)){returnStr=`退货:${formatMonth(d2_s)}~${formatMonth(d2_e)}`}else{returnStr=`退货区间:${fullRange(d2_s,d2_e)}`}return`${shipStr};${returnStr}`}function GetElementWithHtml(Start,Html){return $(Start).filter(function(){return $(this).text().trim()===Html})}})}else if(tabIndex==1){if(!IsNull(recordBillData.Order)&&recordBillData.Order.length>0){GeneratData(recordBillData)}else{var func=ShowLoading("正在获取数据,请稍后...");CommonAjaxRunLoginPrivate("/CN_Point/GetTotalDataDetail",{Need:0,Return:1},function(json){func();recordBillData=json;GeneratData(recordBillData)})}function GeneratData(json){const{Order,Product,Bill,LastAmount,FD}=json;var keyword=CustomerType;var fandianSetting=FD[0].Fandian;var colSpan=8;if(false){function GenerateProductData(){const orderMap=new Map;const billMap=new Map;const monthMap=new Map;let totalAmount=0;let totalPayed=0;let totalUnPayed=0;for(let i=0;i0){totalPayed+=finalAmount}else{totalUnPayed+=finalAmount}}return{monthMap,total:{amount:Number(totalAmount.toFixed(2)),payed:Number(totalPayed.toFixed(2)),unPayed:Number(totalUnPayed.toFixed(2))}}}function renderBillTableHTML(data,options){let htmlCode='';const colCount=options.needMemo?8:7;htmlCode+='';htmlCode+=renderTableHeader(options,colCount);htmlCode+='';data.monthMap.forEach(function(rows,month){htmlCode+=renderMonthBlock(month,rows,options,colCount)});htmlCode+='';htmlCode+=renderTableFooter(data.total,colCount);htmlCode+='
';return htmlCode}function renderTableHeader(options,colCount){let html='';html+='';html+='';html+='';html+=options.customerName+' - 五星玩具 对账单';html+='';html+='';html+='';html+='日期';html+='产品';html+='数量';html+='规格';html+='单价';html+='金额';html+='货号';if(options.needMemo)html+='备注';html+='';html+='';return html}function renderMonthBlock(month,rows,options,colCount){let html='';let monthTotal=0;for(let i=0;i';html+=''+r.DeliveryDate+'';html+=''+r.ProductName+'';html+=''+r.Number+'';html+=''+r.Norm+'';html+=''+r.Price.toFixed(2)+'';html+=''+r.FinalAmount.toFixed(2)+'';html+=''+r.OrderNumber+'';if(options.needMemo)html+=''+(r.Memo||'')+'';html+=''}html+='';html+=''+month+' 月小计';html+=''+monthTotal.toFixed(2)+'';html+='';if(options.needMemo)html+='';html+='';return html}function renderTableFooter(total,colCount){let html='';html+='';html+='';html+='合计';html+=''+total.amount.toFixed(2)+'';html+='';html+='';html+='';return html}excel+=``;excel+=``;excel+=``;excel+=``;excel+=``;excel+=``;excel+=``;$(".MyAccount_Wrap").html(html)}else{var excelData=[];const orderMap=new Map(Order.map(o=>[o.OID,o]));const billMap=new Map(Bill.map(b=>[b.BID,b]));const monthMap=new Map;const allRows=[];var needOrderMemo=true;var UsedBillData=[];var F_Bill=Bill.sort((a,b)=>new Date(b.PayTime)-new Date(a.PayTime));for(var i1=0;i1b.BID));const usedProducts=[];const unusedProducts=[];for(const p of Product){const order=orderMap.get(p.OID)||"";const billID=order.BID||0;const deliveryDate=order.DeliveryTime?order.DeliveryTime.split('T')[0]:'';const month=deliveryDate?deliveryDate.slice(0,7):'未知';let fandian=1;if(keyword==='Customer'){fandian=p.SaveFandian||p.Fandian||fandianSetting||b.FanDian||1;fandian=parseFloat(fandian)}const sign=order.IsReturn?-1:1;const amount=p.Price*p.Number*p.Norm*sign;const finalAmount=amount*fandian;const row={DeliveryDate:deliveryDate,Month:month,ProductName:p.ProductName,Number:order.IsReturn?-p.Number:p.Number,Norm:p.Norm,Price:p.Price,Amount:amount,FinalAmount:finalAmount,Fandian:fandian,OrderNumber:order.OrderNumber||'',Memo:order.Memo||'',BID:order.BID||0,HasPayMoney:order.HasPayMoney||0,IsReturn:order.IsReturn||false,OrderProductID:p.OrderProductID,IsWrongReturn:p.ProductName.includes("退错")};if(billID===0||billID===''||usedBillIdSet.has(billID)){unusedProducts.push(row)}else{usedProducts.push(row)}}function renderTable(products,isPaid){let surplusTotal=0;const traceMonthSet=new Set;for(const bill of UsedBillData){surplusTotal+=(bill.SurplusAmount||bill.SurplusAmountHide||0);const addMonthsBetween=(startStr,endStr)=>{if(!startStr||!endStr)return;const start=new Date(startStr);const end=new Date(endStr);if(isNaN(start)||isNaN(end))return;let current=new Date(start.getFullYear(),start.getMonth(),1);while(current<=end){const yearMonth=current.getFullYear()+'-'+String(current.getMonth()+1).padStart(2,'0');traceMonthSet.add(yearMonth);current.setMonth(current.getMonth()+1)}};addMonthsBetween(bill.StartDeliveryDate,bill.EndDeliveryDate);addMonthsBetween(bill.StartReturnDate,bill.EndReturnDate)}const hasUnpaid=surplusTotal!==0;let insertedSummary=false;var html='';if(products.length===0)return"";const monthMap=new Map;for(const row of products){if(!monthMap.has(row.Month))monthMap.set(row.Month,[]);monthMap.get(row.Month).push(row)}const sortedMonths=Array.from(monthMap.keys()).sort();html+=`
${customerName} - 五星玩具 对账单
日期产品名称数量规格单价总金额货号备注
`;html+=``;html+=``;html+=``;html+=``;html+=``;var eachMonthAmount=[];let traceLastMonth=null;if(hasUnpaid){const traceMonths=sortedMonths.filter(m=>traceMonthSet.has(m));if(traceMonths.length>0){traceLastMonth=traceMonths[traceMonths.length-1]}}var unPaidClearAmount=0;let insertedSummaryMerge=false;for(const month of sortedMonths){const rows=monthMap.get(month);let monthTotal=0;const fandianGroups=new Map;for(const r of rows){monthTotal+=r.FinalAmount;const f=r.Fandian;if(!fandianGroups.has(f)){fandianGroups.set(f,{data:[],amount:0})}const group=fandianGroups.get(f);group.data.push(r);const sign=r.IsReturn?-1:1;const originalAmount=r.Price*Math.abs(r.Number)*r.Norm*sign;group.amount+=originalAmount}const sortedGroups=Array.from(fandianGroups.entries()).sort((a,b)=>b[1].data.length-a[1].data.length);let jishuOuShu=0;let billIdRecord=0;for(const[fandian,group]of sortedGroups){const{data:groupRows,amount:groupOriginalAmount}=group;const groupFinalAmount=groupOriginalAmount*fandian;const fandianPoints=((1-fandian)*100).toFixed(2).replace(/\.00$/,'');const chinesePoints=NumberToChineseNum(parseInt(fandianPoints));let lastDate=null;let lastOrder=null;for(let i=0;i0){if(r.BillID!==billIdRecord){jishuOuShu=1-jishuOuShu;billIdRecord=r.BillID}bgColor=jishuOuShu?'#FFF4DE':'#C9F7F5'}else if(r.HasPayMoney>0){bgColor='#efefef'}const isFirstDate=(lastDate!==r.DeliveryDate);const isFirstOrder=(lastOrder!==r.OrderNumber);let dateSpan=1,orderSpan=1;if(isFirstDate){for(let j=i+1;j`;if(isFirstDate){html+=``}html+=``;html+=``;html+=``;html+=``;html+=``;if(isFirstOrder){html+=``;if(needOrderMemo){html+=``}html+=``}lastDate=r.DeliveryDate;lastOrder=r.OrderNumber}if(keyword==='Customer'&&fandian<=1){const pointsText=chinesePoints==='零'?'不返点':`返${chinesePoints==='两'?'两':chinesePoints}个点:${ShowPrice(groupOriginalAmount)} × ${ShowPrice(fandian)}`;html+=``;html+=``;html+=``;html+=` `;html+=``}}const chineseMonth=month==='未知'?'未知':NumberToChineseNum(parseInt(month.split('-')[1]))+'月份总金额';html+=``;html+=``;html+=``;html+=``;html+=``;const traceMonths=sortedMonths.filter(m=>traceMonthSet.has(m));var hasMonth=traceMonths.some(function(item){return item===month});if(!hasMonth){if(!Boolean(isPaid))eachMonthAmount.push({Month:chineseMonth,Amount:monthTotal})}if(hasUnpaid&&!insertedSummary&&month===traceLastMonth){let summaryRows='';let traceGrandTotal=0;var isFirstMonth=true;for(const m of traceMonths){const rows=monthMap.get(m);let mTotal=0;for(const r of rows){mTotal+=r.FinalAmount}traceGrandTotal+=mTotal;const chineseM=NumberToChineseNum(parseInt(m.split('-')[1]))+'月份总金额';summaryRows+=``;summaryRows+=``;summaryRows+=``;if(isFirstMonth){summaryRows+=``}summaryRows+=``;unPaidClearAmount+=mTotal;isFirstMonth=false}const paidBills=UsedBillData.filter(b=>b.SumPrice>0).sort((a,b)=>new Date(a.PayTime)-new Date(b.PayTime));for(const bill of paidBills){let monthRange='';unPaidClearAmount=unPaidClearAmount-bill.SumPrice;summaryRows+=``;summaryRows+=``;summaryRows+=``;summaryRows+=``}const remain=Math.abs(unPaidClearAmount);const remainText=unPaidClearAmount>0?'未付清金额':'多付金额';const remainColor=unPaidClearAmount>0?'red':'green';summaryRows+=``;summaryRows+=``;summaryRows+=``;summaryRows+=``;html+=summaryRows;insertedSummary=true;if(hasUnpaid&&!insertedSummaryMerge){let traceGrandTotal=0;const traceMonths=sortedMonths.filter(m=>traceMonthSet.has(m));for(const m of traceMonths){const rows=monthMap.get(m);for(const r of rows){traceGrandTotal+=r.FinalAmount}}const startM=NumberToChineseNum(parseInt(traceMonths[0].split('-')[1]));const endM=NumberToChineseNum(parseInt(traceMonths[traceMonths.length-1].split('-')[1]));const mergeText=`${startM}~${endM}月份${remainText}`;if(!Boolean(isPaid))eachMonthAmount.push({Month:mergeText,Amount:unPaidClearAmount});insertedSummaryMerge=true}}}if(!Boolean(isPaid)){var totalAmount=0;for(var i1=0;i1`;if(i1==0){html+=``}html+=``;html+=``;html+=``;html+=``;totalAmount+=tmpdd.Amount}html+=``;html+=``;html+=``;html+=``;html+=``}html+=`
${sessionJsonInner.CustomerName} - 五星玩具 对账单
日期产品名称数量规格单价总金额货号备注
${r.DeliveryDate}${r.ProductName}${isReturn&&!isWrongReturn?-r.Number:r.Number}${r.Norm}${ShowPrice(isWrongReturn?0:r.Price)}${ShowPrice(r.FinalAmount)}${r.OrderNumber}${(r.Memo||'').replace(//gi,'
')}
${pointsText}${ShowPrice(groupFinalAmount)}
${chineseMonth}${ShowPrice(monthTotal)} 
${chineseM}${ShowPrice(mTotal)} 
`;summaryRows+=`${bill.PayTime.split('T')[0]}    付款 ${monthRange}`;summaryRows+=`-${ShowPrice(bill.SumPrice)}
${remainText}:${ShowPrice(remain.toFixed(2))}
合计${tmpdd.Month}${ShowPrice(tmpdd.Amount)} 
总计${ShowPrice(totalAmount.toFixed(2))} 
`;return html}var excel='';excel+='
';excel+='
';excel+='
';excel+=renderTable(unusedProducts,0);excel+='
';$(".MyAccount_Wrap").html(excel);$("html, body").animate({scrollTop:$(document).height()},300);const wrap=document.querySelector(".MyAccount_Wrap");if(wrap&&wrap.offsetHeight+151>window.innerHeight){document.querySelectorAll(".Account_Nav").forEach(nav=>{nav.style.display="inline-block"})}}}}document.querySelectorAll(".Account_Nav li").forEach(li=>{li.classList.remove("active")});document.querySelectorAll(".Account_Nav").forEach(nav=>{const lis=nav.querySelectorAll("li");if(lis[tabIndex]){lis[tabIndex].classList.add("active")}})}document.querySelectorAll('.Account_Nav').forEach((items,indexs)=>{items.querySelectorAll("li").forEach((item,index)=>{item.addEventListener('click',function(){tabIndex=index;ShowTabAccount()})})});function GeneratePage(count,pageIndex,pageSize){pageIndex=parseInt(pageIndex);var pageClickNumber=7;var pageCount=parseInt(count%pageSize==0?count/pageSize:count/pageSize+1);var htmlCode='';htmlCode+='';htmlCode+='
';htmlCode+='';if(pageCount>pageClickNumber){if(pageIndex>1){htmlCode+='«首页'}var centerNumber=(pageClickNumber-1)/2+1;var leftNumber=(pageClickNumber-1)/2;if(centerNumber>=pageIndex){for(var i=1;i<=pageClickNumber;i++){var isIndexClass=i==pageIndex?" active":" PageRegion_ToPage";if(i==pageIndex){htmlCode+=''+i+''}else{htmlCode+=''+i+''}}}else{if(pageIndex+leftNumber>pageCount){for(var i=pageCount-(pageClickNumber-1);i<=pageCount;i++){var isIndexClass=i==pageIndex?" active":" PageRegion_ToPage";if(i==pageIndex){htmlCode+=''+i+''}else{htmlCode+=''+i+''}}}else{for(var i=pageIndex-(pageClickNumber-1)/2;i<=pageIndex+(pageClickNumber-1)/2;i++){var isIndexClass=i==pageIndex?" active":" PageRegion_ToPage";if(i==pageIndex){htmlCode+=''+i+''}else{htmlCode+=''+i+''}}}}htmlCode+='';if(pageIndex<>尾页 »'}}else{for(var i=1;i<=pageCount;i++){var isIndexClass=i==pageIndex?" active":" PageRegion_ToPage";if(i==pageIndex){htmlCode+=''+i+''}else{htmlCode+=''+i+''}}}htmlCode+='';htmlCode+='数量:'+count+'  总页数:'+pageCount+'';htmlCode+='
';htmlCode+='';return htmlCode}function GeneratePageEvent(GetDataEvent,WrapClassName,PageIndexName,PageSizeName,DataCount,IsFirstPageDefault){var pagesize=0;eval('pagesize='+PageSizeName+';');$("."+WrapClassName+" .Page_Size_Set_Text").val(pagesize);if(DataCount>pagesize){var pageindex=0;eval('pageindex='+PageIndexName+';');$("."+WrapClassName+" .Page_Index_Set_Text").val(pageindex);if(pageindex>1){$("."+WrapClassName+" .PageRegion_FirstPage").unbind("click").click(function(){eval(PageIndexName+'=1;');try{GetDataEvent()}catch(e){}});$("."+WrapClassName+" .PageRegion_PrevPage").unbind("click").click(function(){eval(PageIndexName+'='+PageIndexName+'-1;');try{GetDataEvent()}catch(e){}})}$("."+WrapClassName+" .PageRegion_ToPage").unbind("click").click(function(){eval(PageIndexName+'='+$(this).attr("data-page")+';');try{GetDataEvent()}catch(e){}});var pageCount=DataCount%pagesize==0?parseInt(DataCount/pagesize):parseInt(DataCount/pagesize)+1;if(pageindex=pageCount?pageCount:inputValue);eval(PageIndexName+"="+inputValue+";");try{GetDataEvent()}catch(e){}}$("."+WrapClassName+" .Page_Index_Set_Text").unbind("keyup").keyup(function(e){if(e.keyCode==13){SetPageIndexWidthInput()}});$("."+WrapClassName+" .Page_Index_Set_Button").unbind("click").click(function(){SetPageIndexWidthInput()})}}function Boolean(bools){if(IsNull(bools)){return false}return bools==true||bools=="true"||bools=="True"||bools=="1"}function NumberToChineseNum(num){var needToAddJccs="";var chnNumChar=["零","一","二","三","四","五","六","七","八","九"];var chnUnitSection=["","万","亿","万亿","亿亿"];var chnUnitChar=["","十","百","千"];function SectionToChinese(section){var strIns='',chnStr='';var unitPos=0;var zero=true;while(section>0){var v=section%10;if(v===0){if(!zero){zero=true;chnStr=chnNumChar[v]+chnStr}}else{zero=false;strIns=chnNumChar[v];strIns+=chnUnitChar[unitPos];chnStr=strIns+chnStr}unitPos++;section=Math.floor(section/10)}return chnStr}var unitPos=0;var strIns='',chnStr='';var needZero=false;if(num===0){return chnNumChar[0]}while(num>0){var section=num%10000;if(needZero){chnStr=chnNumChar[0]+chnStr}strIns=SectionToChinese(section);strIns+=(section!==0)?chnUnitSection[unitPos]:chnUnitSection[0];chnStr=strIns+chnStr;needZero=(section<1000)&&(section>0);num=Math.floor(num/10000);unitPos++}if(chnStr=="一十一"||chnStr=="一十二"||chnStr=="一十三"||chnStr=="一十四"||chnStr=="一十五"||chnStr=="一十六"||chnStr=="一十七"||chnStr=="一十八"||chnStr=="一十九"){chnStr=chnStr.substring(1,3)}if(chnStr=="一十"){chnStr="十"}return chnStr}if(isHtml){LogPage("MyAccount")}};});