|
@@ -1,6 +1,5 @@
|
|
|
//招标公告
|
|
|
var Tender = {
|
|
|
- status:false,
|
|
|
keyWordDialog: null,
|
|
|
getKeyWordDialog: function(clickLi){
|
|
|
if(this.keyWordDialog == null){
|
|
@@ -18,7 +17,6 @@ var Tender = {
|
|
|
};
|
|
|
//中标公告
|
|
|
var Bid = {
|
|
|
- status:false,
|
|
|
keyWordDialog: null,
|
|
|
getKeyWordDialog: function(clickLi){
|
|
|
if(this.keyWordDialog == null){
|
|
@@ -153,10 +151,70 @@ function getCredit(){
|
|
|
}
|
|
|
var snopshot=[];
|
|
|
|
|
|
-function showSnopshot(){
|
|
|
+function showAlls(){
|
|
|
+ var n=0,str=[];
|
|
|
+ for(var i in snopshot){
|
|
|
+ if(snopshot[i]){
|
|
|
+ n++;
|
|
|
+ str.push((i=="tender")?"招标公告":"中标公告")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(n>0){
|
|
|
+ var num=getCredit();
|
|
|
+ var pay=1000*n, rem=num-pay,strs="扣除后将剩余"+rem+"积分";
|
|
|
+ if(rem<0){
|
|
|
+ $("#credit_yes").hide()
|
|
|
+ strs="请充值或去赚积分。";
|
|
|
+ }
|
|
|
+ $("#txt_tip").text("您添加了"+n+"个信息栏目("+str.join("、")+"),确认后系统将每月扣除"+pay+"积分,您目前的积分余额是"+num+"积分,"+strs)
|
|
|
+ $(".visible").show()
|
|
|
+ }else{
|
|
|
+ $(".visible").hide()
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+function showSnopshot(module,type,on){
|
|
|
//提示扣积分
|
|
|
- alert(getCredit())
|
|
|
- $(".credit-tip").show()
|
|
|
+ //alert(getCredit())
|
|
|
+ if(type==0){//初始化
|
|
|
+ //是开启状态
|
|
|
+ if (!eval("msgset."+module+".i_status")){
|
|
|
+ snopshot[module]=true
|
|
|
+ showAlls()
|
|
|
+ }
|
|
|
+ }else if(type==1){//提交修改时
|
|
|
+ if(on){
|
|
|
+ if(module=="tender"){
|
|
|
+ if(typeof(msgset.tender) != "undefined"){
|
|
|
+ if(!msgset.tender.i_status){
|
|
|
+ if (!msgset.tender.i_status){
|
|
|
+ snopshot[module]=true
|
|
|
+ }else{
|
|
|
+ snopshot[module]=false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ snopshot[module]=true
|
|
|
+ }
|
|
|
+ }else if(module=="bid"){
|
|
|
+ if(typeof(msgset.bid) != "undefined"){
|
|
|
+ if(!msgset.bid.i_status){
|
|
|
+ if (!msgset.bid.i_status){
|
|
|
+ snopshot[module]=true
|
|
|
+ }else{
|
|
|
+ snopshot[module]=false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ snopshot[module]=true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ showAlls()
|
|
|
+ }else{
|
|
|
+ snopshot[module]=false
|
|
|
+ showAlls()
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function commonAjaxReq(object,module){
|
|
@@ -167,21 +225,9 @@ function commonAjaxReq(object,module){
|
|
|
};
|
|
|
if($("#"+module+"-on-off").hasClass("open")){
|
|
|
//开服务要校验
|
|
|
- if(module=="tender"){
|
|
|
- if(typeof(msgset.tender) != "undefined"){
|
|
|
- if(!msgset.tender.i_switchstatus){
|
|
|
- snopshot["tender"]=true
|
|
|
- showSnopshot()
|
|
|
- }
|
|
|
- }
|
|
|
- }else if(module=="bid"){
|
|
|
- if(typeof(msgset.bid) != "undefined"){
|
|
|
- if(!msgset.bid.i_switchstatus){
|
|
|
- snopshot["bid"]=true
|
|
|
- showSnopshot()
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ showSnopshot(module,1,1)
|
|
|
+ }else{
|
|
|
+ showSnopshot(module,1,0)
|
|
|
}
|
|
|
var keysString = "",scopeString = "";
|
|
|
var thisClass = this;
|
|
@@ -318,7 +364,7 @@ $(function(){
|
|
|
if(msgset.tender.i_switchstatus){
|
|
|
turnOn($("#tender-on-off"));
|
|
|
//判断要不要还原提示
|
|
|
- if
|
|
|
+ showSnopshot("tender",0)
|
|
|
}
|
|
|
}
|
|
|
if(typeof(msgset.bid) != "undefined"){
|
|
@@ -327,6 +373,7 @@ $(function(){
|
|
|
if(msgset.bid.i_switchstatus){
|
|
|
turnOn($("#bid-on-off"));
|
|
|
//判断要不要还原提示
|
|
|
+ showSnopshot("bid",0)
|
|
|
}
|
|
|
}
|
|
|
//开关
|