|
@@ -119,13 +119,16 @@ KeyWordDialog.AppendNode = function(dialogObj,value){
|
|
return '<div class="keyWordGroup">'
|
|
return '<div class="keyWordGroup">'
|
|
+'<lable style="white-space:nowrap;">关键词<font>'+index+'</font></lable>'
|
|
+'<lable style="white-space:nowrap;">关键词<font>'+index+'</font></lable>'
|
|
+'<div><input type="text" onfocus="setFocus(this)" value="'+(value?value:"")+'" placeholder="示例:税务局 软件" maxlength="100"></div>'
|
|
+'<div><input type="text" onfocus="setFocus(this)" value="'+(value?value:"")+'" placeholder="示例:税务局 软件" maxlength="100"></div>'
|
|
- +'<div>'+(index==1?'':'<img src="/wxswordfish/images/delete.png" class="delete">')+'</div>'
|
|
|
|
|
|
+ +'<div><img src="/wxswordfish/images/delete.png" class="delete"'+(index==1?' style="display: none;"':'')+'></div>'
|
|
+'</div>';
|
|
+'</div>';
|
|
}
|
|
}
|
|
var count = dialogObj.find(".keyWordGroup").length;
|
|
var count = dialogObj.find(".keyWordGroup").length;
|
|
if(count >= 10){
|
|
if(count >= 10){
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ if(count > 0){
|
|
|
|
+ dialogObj.find(".keyWordGroup:first").find(".delete").show();
|
|
|
|
+ }
|
|
var obj = $(getHtml(count+1,value));
|
|
var obj = $(getHtml(count+1,value));
|
|
dialogObj.find(".addKeyWordArea").before(obj);
|
|
dialogObj.find(".addKeyWordArea").before(obj);
|
|
//自动滚动到底部
|
|
//自动滚动到底部
|
|
@@ -136,6 +139,9 @@ KeyWordDialog.AppendNode = function(dialogObj,value){
|
|
dialogObj.find(".keyWordGroup").each(function(i){
|
|
dialogObj.find(".keyWordGroup").each(function(i){
|
|
$(this).children("lable").children("font").text(i+1);
|
|
$(this).children("lable").children("font").text(i+1);
|
|
});
|
|
});
|
|
|
|
+ if(dialogObj.find(".keyWordGroup").length == 1){
|
|
|
|
+ dialogObj.find(".keyWordGroup:first").find(".delete").hide();
|
|
|
|
+ }
|
|
});
|
|
});
|
|
if(typeof(value) == "undefined" || value == ""){
|
|
if(typeof(value) == "undefined" || value == ""){
|
|
obj.find("[type='text']").focus();
|
|
obj.find("[type='text']").focus();
|
|
@@ -499,22 +505,18 @@ $(function(){
|
|
$("body").append($("#tender-keyword").clone().removeAttr("id").attr("id","bid-keyword"))
|
|
$("body").append($("#tender-keyword").clone().removeAttr("id").attr("id","bid-keyword"))
|
|
.append($("#tender-scope").clone().removeAttr("id").attr("id","bid-scope"));
|
|
.append($("#tender-scope").clone().removeAttr("id").attr("id","bid-scope"));
|
|
var searchnameIsExsit = false;
|
|
var searchnameIsExsit = false;
|
|
- if(msgset == ""){
|
|
|
|
- if(typeof(searchname) != "undefined" && searchname.length > 0 ){
|
|
|
|
|
|
+ if(typeof(searchname) != "undefined" && searchname.length > 0 ){
|
|
|
|
+ searchname = searchname.replace(/\s+/g,"+");
|
|
|
|
+ if(msgset == ""){
|
|
msgset = {};
|
|
msgset = {};
|
|
msgset[s_type] = {"a_key":[searchname],"s_scope":"A"};
|
|
msgset[s_type] = {"a_key":[searchname],"s_scope":"A"};
|
|
- }
|
|
|
|
- }else{
|
|
|
|
- if (typeof(searchname) != "undefined" && searchname.length > 0 ){
|
|
|
|
|
|
+ }else{
|
|
if(typeof(msgset[s_type]) != "undefined"){
|
|
if(typeof(msgset[s_type]) != "undefined"){
|
|
var keywordes = msgset[s_type].a_key;
|
|
var keywordes = msgset[s_type].a_key;
|
|
if(typeof(keywordes) != "undefined" && keywordes.length > 0){
|
|
if(typeof(keywordes) != "undefined" && keywordes.length > 0){
|
|
for(var i=0;i<keywordes.length;i++){
|
|
for(var i=0;i<keywordes.length;i++){
|
|
- var keywordesArr = keywordes[i].split("+");
|
|
|
|
- for(var k=0;k<keywordesArr.length;k++){
|
|
|
|
- if(keywordesArr[k] == searchname){
|
|
|
|
- searchnameIsExsit = true;
|
|
|
|
- }
|
|
|
|
|
|
+ if(keywordes[i] == searchname){
|
|
|
|
+ searchnameIsExsit = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if(!searchnameIsExsit){
|
|
if(!searchnameIsExsit){
|