|\ |<\/P>|\r|\n|
)*/g
var result = temp.replace(re,"");
if ((obj == null || temp == "" || temp == "
" || trim(result) == "")) {
//如果不是供应,才去判断是否必填
if(typeWay(getOfferTypeValue())!="SALE"){
document.getElementById("wrong_words_" + fieldName).innerHTML = '请填写产品信息的详细说明。';
return true;
}
} else
if (temp.length > maxCountWord) {
document.getElementById("wrong_words_" + fieldName).innerHTML = '当前' + temp.length + '字,最多' + maxCountWord + '个字,建议点此过滤垃圾代码来尝试发布,如果过滤后仍然超过' + maxCountWord + '字,请适当的减少一些内容以保证发布成功!<\/a>';
return true;
} else {
var sword = checkSensitiveWords(temp);
if (sword != "") {
document.getElementById("wrong_words_" + fieldName).innerHTML = "对不起,您的详细说明中的“" + sword + "”,属于网上禁售产品。";
return true;
}
}
return false;
}
//detail编辑器{zd0}容量
var maxCountWord = 50000;
function garbageFilter(){
var obj = document.getElementById("'txtAlirte'");
var objvalue = tinyMCE.getInstanceById('txtAlirte').getBody().innerHTML;
if(objvalue.length > 160000){
objvalue = localFilterHTML(objvalue);
if(objvalue.length > 100000){
setEditorContent(objvalue);
doOnBlur('$group.details.key', true)
return;
}
}else if(objvalue.length > maxCountWord){
objvalue = localSimpleFilterHTML(objvalue);
if(objvalue.length <= maxCountWord){
setEditorContent(objvalue);
doOnBlur('$group.details.key', true)
return;
}
}
try{
var data = "expectantValue="+maxCountWord+"&fatal=true&htmlCode="+objvalue;
var garbageFilterHttp = null;
try{
garbageFilterHttp = new ActiveXObject("Microsoft.XMLHTTP");
}catch(e){
try{
garbageFilterHttp = new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
garbageFilterHttp =new XMLHttpRequest();
}
}
try{
garbageFilterHttp.open("POST", "http:///offer/garbage_filter.htm", false);
}catch(e){
garbageFilterHttp.open("POST", "http:///offer/garbage_filter.htm", false);
}
garbageFilterHttp.setRequestHeader("Content-Type","text/html; charset=GBK");
garbageFilterHttp.Send(data);
var responseText = garbageFilterHttp.responseText;
if(responseText.length > 0){
setEditorContent(unescape(responseText));
}else if(responseText.length < 10){
setEditorContent(localFilterHTML(objvalue));
}
}catch(e){
setEditorContent(localFilterHTML(objvalue));
}
doOnBlur('$group.details.key', true);
}
function setEditorContent(content){
tinyMCE.getInstanceById('txtAlirte').getBody().innerHTML=content;
}
function localFilterHTML(oldString) {
var newString = oldString;
//清理word,excel里面复制过来的table html垃圾代码
newString = newString.replace("x:str", "");
newString = newString.replace(/(<\w+[^ >]*) ([^<>]*@[^>]*)(>)/gi, "$1$3");
newString = newString.replace(/(<\w+[^ >]*) ([^<>]*@[^>]*)(\/>)/gi, "$1$3");
newString = newString.replace("border=0", "border=1");
newString = newString.replace(/<(\w[^>]*) style="([^"]*)"/gi, "<$1")
newString = newString.replace(/<\/?SPAN[^>]*>/gi, "" ); //Remove all SPAN tags
newString = newString.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ;// Remove Lang attributes
newString = newString.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3");// Remove Class attributes
newString = newString.replace(/'/g, "
newString = newString.replace(/(<\w+[^ >]*) ([^<>]*@[^>]*)(>)/gi, "$1$3");
newString = newString.replace(/(<\w+[^ >]*) ([^<>]*@[^>]*)(\/>)/gi, "$1$3");
newString = newString.replace(/<\/?SPAN[^>]*>/gi, "" ); //Remove all SPAN tags
newString = newString.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ;// Remove Lang attributes
newString = newString.replace(/'/g, "
}else{
if((valueObj)&&(valueObj.value)&&(valueObj.value.length>0)){
rightImagObj.src = "http:///images/cn/member/icon_right_19x19.gif";
}else{
rightImagObj.src = "http:///images/cn/market/myalibaba/icon_grayright_19x19.gif";
}
}
}
}
//价格区间专用
function showTradeErrorPricerange(nameObj, show, errMsg, wb, wprice){
if(wb!=null && wprice!=null && wb.value!='' && wprice.value!=''){
var oldwrong = document.getElementById("wrong_" + nameObj);
if(show && oldwrong){
oldwrong.style.display="none";
}
var nowwrong = document.getElementById("trade_wrong_" + nameObj);
if(nowwrong){
nowwrong.innerHTML=errMsg;
if(show)
nowwrong.style.display="";
else
nowwrong.style.display="none";
}
showTradeValidPricerange(nameObj,show,wb,wprice);
}else{
var rightImagObj = document.getElementById("img_right_" + nameObj);
var valueObj = document.getElementById(nameObj);
if(rightImagObj){
rightImagObj.src = "http:///images/cn/market/myalibaba/icon_grayright_19x19.gif";
}
}
}
function showTradeValidPricerange(nameObj,show,wb,wprice){
var rightImagObj = document.getElementById("img_right_" + nameObj);
var valueObj = document.getElementById(nameObj);
if(rightImagObj){
if(show){
rightImagObj.src = "http:///images/cn/market/myalibaba/icon_grayright_19x19.gif";
}else{
if((valueObj)&&(valueObj.name)&&(valueObj.name.length>0)){
var ptn = /^\d+(.\d+)?$/;
if(wprice.value!='' && ptn.test(wprice.value) && parseFloat(wprice.value)>0){
rightImagObj.src = "http:///images/cn/member/icon_right_19x19.gif";
}else{
rightImagObj.src = "http:///images/cn/market/myalibaba/icon_grayright_19x19.gif";
}
}else{
rightImagObj.src = "http:///images/cn/market/myalibaba/icon_grayright_19x19.gif";
}
}
}
}
function getFieldFlagName(featureId){
}
//检查交易信息
function checkTradeInfo(featureId){
var nameObj;
var valueObj;
var errMsg;
var result = true;
var fieldAll = true;
var isTrade = false;
var showOther = true;
isTrade=false;
if(bizType == "WHOLESALE"){
isTrade = true;
}
nameObj = document.getElementById("fieldFlagName_unit");
if (nameObj && (!featureId || featureId.name == nameObj.value)){
valueObj = document.getElementById(nameObj.value);
if(valueObj){
var temp = trim(valueObj.value).toLowerCase();
if(temp == "" && isTrade){
showTradeError(nameObj.value, true, "带*为必填项");
result = false;
}else if(temp != "" && !isNaN(temp)){
showTradeError(nameObj.value, true, "请用汉字填写,如:\"只\"、\"件\"、\"箱\"等。");
result = false;
}else if(temp != "" && (temp.indexOf("= 0 || temp.indexOf("=0 || temp.indexOf("java") >=0)){
showTradeError(nameObj.value, true, "计量单位含有非法字符");
result = false;
}else{
showTradeError(nameObj.value, false, "计量单位含有非法字符");
}
}
}
var amountMsg;
if(bizType == "WHOLESALE"){
amountMsg = "供货总量必须大于等于最小起批";
}
else{
amountMsg = "供货总量必须大于等于最小起订量";
}
nameObj = document.getElementById("fieldFlagName_beginamount");
if(nameObj && (!featureId || featureId.name == nameObj.value)){
valueObj = document.getElementById(nameObj.value);
if(valueObj){
if(trim(valueObj.value) == "" && isTrade){
showTradeError(nameObj.value, true, "带*为必填项");
result = false;
}else if(trim(valueObj.value) != ""){
if(!isInteger(valueObj.value) || parseInt(valueObj.value) >= 1000000000){
showTradeError(nameObj.value, true, "请填写大于0小于10亿的整数");
result = false;
}else{
showTradeError(nameObj.value, false, "");
var beginamount = parseInt(valueObj.value);
nameObj = document.getElementById("fieldFlagName_amount");
if(nameObj){
valueObj = document.getElementById(nameObj.value);
if(valueObj && isInteger(valueObj.value)){
if(parseInt(valueObj.value) >= beginamount){
showTradeError(nameObj.value, false, "");
}else{
showTradeError(nameObj.value, true, "" + amountMsg + "");
result = false;
}
}
}
}
}
else{
showTradeError(nameObj.value, false, "请填写大于0小于10亿的整数");
}
}
}
nameObj = document.getElementById("fieldFlagName_amount");
if(nameObj && (!featureId || featureId.name == nameObj.value)){
valueObj = document.getElementById(nameObj.value);
if(valueObj){
if(trim(valueObj.value) == "" && isTrade){
showTradeError(nameObj.value, true, "带*为必填项");
result = false;
}else if(trim(valueObj.value) != "" ){
if(!isInteger(valueObj.value) || parseInt(valueObj.value=valueObj.value.replace(/^0+([^.]*)/,'$1')) >= 1000000000){
showTradeError(nameObj.value, true, "请填写大于0小于10亿的整数");
result = false;
}else{
valueObj.value=valueObj.value.replace(/^0+([^.]*)/,'$1');
showTradeError(nameObj.value, false, "");
var amount = parseInt(valueObj.value);
var oldnameObj = nameObj;
//最小起定量验证
nameObj = document.getElementById("fieldFlagName_beginamount");
if(nameObj){
valueObj = document.getElementById(nameObj.value);
if(valueObj && isInteger(valueObj.value) && parseInt(valueObj.value) > amount){
showTradeError(oldnameObj.value, true, "" + amountMsg + "");
result = false;
}
}
}
}
else{
showTradeError(nameObj.value, false, "请填写大于0小于10亿的整数");
}
}
}
nameObj = document.getElementById("fieldFlagName_sendlimit");
if(nameObj && (!featureId || featureId.name == nameObj.value)){
valueObj = document.getElementById(nameObj.value);
if(valueObj){
if(trim(valueObj.value) == "" && isTrade){
showTradeError(nameObj.value, true, "带*为必填项");
result = false;
}else if(trim(valueObj.value) != "" && (!isInteger(valueObj.value) || parseInt(valueObj.value) <= 0)){
showTradeError(nameObj.value, true, "发货期限必需是大于0的整数");
result = false;
}
else{
showTradeError(nameObj.value, false, "发货期限必需是大于0的整数");
}
}
}
nameObj = document.getElementById("fieldFlagName_price");
if(nameObj){
valueObj = document.getElementById(nameObj.value);
if(valueObj){
if(!featureId || featureId.name == nameObj.value){
if(trim(valueObj.value) == "" && isTrade){
showTradeError(nameObj.value, true, "带*为必填项");
result = false;
}else if(isNaN(valueObj.value) || (valueObj.value.length > 0 && trim(valueObj.value.charAt(0)) == "+") || parseFloat(valueObj.value) <= 0 || parseFloat(valueObj.value) >= 1000000000){
showTradeError(nameObj.value, true, "请填写大于0小于10亿的数字");
result = false;
}else if(valueObj.value.indexOf(".") > -1 && valueObj.value.substring(valueObj.value.indexOf(".")+1).length >2){
showTradeError(nameObj.value, true, "产品单价只能以人民币统计到小数点后 2 位");
result = false;
}else{
showTradeError(nameObj.value, false, "请填写大于0小于10亿的数字");
}
}
//关联检查
//if(!isTrade && valueObj.value.length>0){
if(valueObj.value.length>0){
showTradeValid(nameObj.value,false);
var unitNameObj = document.getElementById("fieldFlagName_unit");
var unitValueObj = document.getElementById(unitNameObj.value);
if(unitValueObj.value.length<=0 && (!featureId || featureId.name == unitNameObj.value)){
showTradeError(unitNameObj.value, true, "请填写 计量单位");
result = false;
}
}
}
}
nameObj = document.getElementById("fieldFlagName_providertype");
if (nameObj && (!featureId || featureId.name == nameObj.value)){
valueObj = document.getElementById(nameObj.value);
if(valueObj){
if(isEmptyValueObject(nameObj.value)){
showTradeError(nameObj.value, true, "请选择供应商类型");
result = false;
}else{
showTradeError(nameObj.value, false, "请选择供应商类型");
}
}
}
nameObj=document.getElementById("fieldFlagName_retailprice");
if(nameObj && (!featureId || featureId.name == nameObj.value)){
valueObj=document.getElementById(nameObj.value);
if(valueObj){
if(trim(valueObj.value) == "" && isTrade){
showTradeError(nameObj.value, true, "带*为必填项");
result = false;
}else if(trim(valueObj.value) != ""){
//var ptn = /^\d+(.\d+)?$/;
if(/^\d+(\.\d+)?$/.test(valueObj.value)){
//小数
var v=valueObj.value;
if(0.005<=v*1 && v*1<0.01){
v=0.01;
}else{
v=(v*1).toFixed(2);
}
valueObj.value=v;
if(v <= 0 || v>=1000000000){
//小于0或大于10亿
showTradeError(nameObj.value, true, "请填写大于0小于10亿的数字");
result=false;
}else{
showTradeError(nameObj.value, false, "");
}
}else{
//非小数
showTradeError(nameObj.value, true, "请填写大于0小于10亿的数字");
result=false;
}
}else if(trim(valueObj.value) == ""){
showTradeError(nameObj.value, true, "");
}
}
}
var dError=GetCT('error',document,'div'),dInfo=GetCT('info',document,'div'),
r1s=GetNT('mixWholesale',document,'input'),rset=GetCT('rset',document,'span'),
sel=GetCT('sel',document,'select'),units=GetCT('unit',document,'span');
//价格区间中起批量和供货总量验证
var amountObj=document.getElementById("fieldFlagName_amount");
if(amountObj){
var amountValueObj=document.getElementById(amountObj.value);
if(amountValueObj && amountValueObj.value != ''){
var wb1=document.getElementById("wb1");
if(wb1){
fun3(true);
}
}
}
//验证价格区间
if(!check_pricerange()) return false;
return result;
}
// 交易属性获得焦点 隐掉提示信息
function doOnFocusOfTrade(objName,type){
var trObj = document.getElementById("trade_wrong_" + objName);
if(trObj != null && typeof(trObj) == "object")
trObj.style.display="none";
var hunpiObj = document.getElementById("wrongword_hunpi");
if(hunpiObj){
hunpiObj.style.display = "none";
}
}
//检查是否满足 交易条件
function checkTradeCondition(isAwayNoShow, featureId){
//交易条件全角转半角
transferTradeNumber();
//var obj = document.getElementById("tr_AegisAlipay");
var serviceTerm = document.getElementById("serviceTerm");
var postsubmit = document.getElementById("postsubmit");
var freeMemberFlag = true;
try{
if(isFreemember)
freeMemberFlag = true;
else
freeMemberFlag = false;
}catch(e){
freeMemberFlag = false;
}
var bcanTrade = canTradeCondition(featureId);
if(!(isAwayNoShow == true) && bcanTrade && !freeMemberFlag){
//obj.style.display="";
if(serviceTerm){
serviceTerm.style.display="";
postsubmit.value="同意服务条款,我要发布";
}
}
else{
//obj.style.display="none";
if(serviceTerm){
serviceTerm.style.display="none";
postsubmit.value="一切完成,我要发布!";
}
}
}
//检查是否满足 交易条件
function canTradeCondition(featureId){
var result = checkTradeInfo(featureId);
if(!checkTradeField("fieldFlagName_unit")){
return false;
}
if(!checkTradeField("fieldFlagName_beginamount")){
return false;
}
if(!checkTradeField("fieldFlagName_price")){
return false;
}
if(!checkTradeField("fieldFlagName_amount")){
return false;
}
if(!checkTradeField("fieldFlagName_sendlimit")){
return false;
}
return result;
}
//交易条件全角转半角
function transferTradeNumber(){
var nameObj = document.getElementById("fieldFlagName_amount");
var valueObj;
if(nameObj){
valueObj = document.getElementById(nameObj.value);
if(valueObj){
valueObj.value = tot(valueObj.value);
}
}
nameObj = document.getElementById("fieldFlagName_beginamount");
if(nameObj){
valueObj = document.getElementById(nameObj.value);
if(valueObj){
valueObj.value = tot(valueObj.value);
}
}
nameObj = document.getElementById("fieldFlagName_price");
if(nameObj){
valueObj = document.getElementById(nameObj.value);
if(valueObj){
valueObj.value = tot(valueObj.value);
}
}
nameObj = document.getElementById("fieldFlagName_retailprice");
if(nameObj){
valueObj = document.getElementById(nameObj.value);
if(valueObj){
valueObj.value = tot(valueObj.value);
}
}
}
//全角转半角
function tot(mobnumber){
while(mobnumber.indexOf("。")!=-1){
mobnumber = mobnumber.replace("。",".");
}
while(mobnumber.indexOf(".")!=-1){
mobnumber = mobnumber.replace(".",".");
}
while(mobnumber.indexOf("0")!=-1){
mobnumber = mobnumber.replace("0","0");
}
while(mobnumber.indexOf("1")!=-1){
mobnumber = mobnumber.replace("1","1");}
while(mobnumber.indexOf("2")!=-1){
mobnumber = mobnumber.replace("2","2");}
while(mobnumber.indexOf("3")!=-1){
mobnumber = mobnumber.replace("3","3");}
while(mobnumber.indexOf("4")!=-1){
mobnumber = mobnumber.replace("4","4");}
while(mobnumber.indexOf("5")!=-1){
mobnumber = mobnumber.replace("5","5");}
while(mobnumber.indexOf("6")!=-1){
mobnumber = mobnumber.replace("6","6");}
while(mobnumber.indexOf("7")!=-1){
mobnumber = mobnumber.replace("7","7");}
while(mobnumber.indexOf("8")!=-1){
mobnumber = mobnumber.replace("8","8");}
while(mobnumber.indexOf("9")!=-1){
mobnumber = mobnumber.replace("9","9");}
return mobnumber;
}
function changeTradeUnit(){
setTradeUnit("price");
setTradeUnit("beginamount");
setTradeUnit("amount");
//价格区间
setTradeUnit("wb1");
setTradeUnit("wb2");
setTradeUnit("wb3");
setTradeUnit("we1");
setTradeUnit("we2");
setTradeUnit("we3");
setTradeUnit("wprice1");
setTradeUnit("wprice2");
setTradeUnit("wprice3");
}
function setTradeUnit(name){
var obj = document.getElementById("trade_unit_" + name);
if(obj){
var nameObj = document.getElementById("fieldFlagName_unit");
if(!nameObj){
return ;
}
var valueObj = document.getElementById(nameObj.value);
if(valueObj && trim(valueObj.value) != ""){
obj.innerHTML = trim(valueObj.value)
}else{
obj.innerHTML = "单位"
}
}
}
function checkTradeField(objName){
var nameObj = document.getElementById(objName);
if(!nameObj){
return false;
}
var valueObj = document.getElementById(nameObj.value);
if(!valueObj || trim(valueObj.value) == ""){
return false;
}
return true;
}
//大于0等整数
function isInteger(value){
return (!isNaN(value) && trim(value) != "" && value.indexOf(".") == -1 && parseInt(value) > 0)
}
function getHttpRequest(){
var httpRequest;
if (window.XMLHttpRequest){ // Mozilla, Safari,...
httpRequest = new XMLHttpRequest();
if (httpRequest.overrideMimeType){
httpRequest.overrideMimeType('text/xml');
}
}else if (window.ActiveXObject){ // IE
try{
httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try {
httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
}catch(e){}
}
}
return httpRequest;
}
var activedCategoryObj = null;
function activedCategoryTd(obj){
if(activedCategoryObj!=null){
if(activedCategoryObj.parentNode !=null){
activedCategoryObj.parentNode.className="defaultItem";
}
}
if(obj!=null && obj.parentNode!=null){
obj.parentNode.className="activedItem";
}
activedCategoryObj=obj;
}
/** 选择用过的类目*/
function selectUsedCategory(objCat){
if(objCat.value!=''){
var objKeyword = document.getElementById("$group.keywords.key");
selectOtherCategory();
matchCategory(objKeyword.value,objCat.value);
aliclick(null,'?tracelog=fb_sort_used');
userdCategory =1;
}else{
userdCategory =0;
}
var objUsedCategoryValue = document.getElementById('usedCategoryValue');
if(objUsedCategoryValue!=null){
objUsedCategoryValue.value = objCat.value;
}
}
/** 更新用过的类目信息 */
function refreashUsedCategory(){
var objDiv = document.getElementById('usedCategoryDiv');
if(objDiv!=null){
objDiv.innerHTML = getCategoryUsed(getSelectTypeValue());
}
var objUsedCategory = document.getElementById('usedCategory');
var objUsedCategoryValue = document.getElementById('usedCategoryValue');
if(objUsedCategory!=null && objUsedCategoryValue!=null && objUsedCategoryValue.value!=''){
for(var i=0;imax && max > 0){
error.innerHTML='订购数量超过了供货总量';
error.style.display='block';
res = false;
}
else{
error.style.display='none';
}
}
return res;
}
var alitalkParam_pay = initAlitalk($("alitalkImg"), $("alitalk"), $("alitalkTxt_alipay"), $("alitalkTxt_alink_alipay"));
function setWWClass_pay(hrefObj){
if(OnLine==1){
hrefObj.className = "alitalk-btn iconAlitalk icon-on";
}else{
hrefObj.className = "alitalk-btn iconAlitalk icon-off";
}
}
setWWClass_pay($("alitalkTxt_alink_alipay"));
function inquiryByWWTrace(){
var d = new Date();
var url = "http:///eq/enquiry/traceEnquiry.json?fromId=szqx588&toId=szqx588&offerId=591939209&source=1&cna=ICJCBLE9kjgCAe1a7HmjUekQ";
if("szqx588" != "notmember" )
if(document.images) {
(new Image()).src = url+'&time='+d.getTime();
}
return aliclick(this,'?tracelog=$tracelogWW');
}
function inquiryByWWTraceFromMemberContact(){
var d = new Date();
var url = "http:///eq/enquiry/traceEnquiry.json?fromId=szqx588&toId=szqx588&offerId=591939209&source=1&cna=ICJCBLE9kjgCAe1a7HmjUekQ";
if("szqx588" != "notmember" )
if(document.images) {
(new Image()).src = url+'&time='+d.getTime();
}
return aliclick(this,'?tracelog=tpselldetail_wangwang_21623');
}
function inquiryByWWTraceFromTradeFeedBack(){
var d = new Date();
var url = "http:///eq/enquiry/traceEnquiry.json?fromId=szqx588&toId=szqx588&offerId=591939209&source=1&cna=ICJCBLE9kjgCAe1a7HmjUekQ";
if("szqx588" != "notmember" )
if(document.images) {
(new Image()).src = url+'&time='+d.getTime();
}
return aliclick(this,'?tracelog=tpselldetail_midwangwang_21623');
}
function inquiryByFeedBackTrace(){
var d = new Date();
var url = "http:///eq/enquiry/traceCreateEnquiry.json?fromId=szqx588&toId=szqx588&offerId=591939209&source=1&cna=ICJCBLE9kjgCAe1a7HmjUekQ&sourceUrl=http%3A%2F%%2Fmessage%2Flist_received_message.htm%3F_fmme.l._0.of%3Dsale";
if(document.images) {
(new Image()).src = url+'&time='+d.getTime();
}
}
郑重声明:产品 【供应CPVC棒】由 苏州群旭塑胶材料有限公司 发布,版权归原作者及其所在单位,其原创性以及文中陈述文字和内容未经(企业库www.qiyeku.cn)证实,请读者仅作参考,并请自行核实相关内容。若本文有侵犯到您的版权, 请你提供相关证明及申请并与我们联系(qiyeku # qq.com)或 【在线投诉】,我们审核后将会尽快处理。 会员咨询QQ群:902340051 入群验证:企业库会员咨询.
类似产品
|