深圳市联网立体停车库建设项目-龙岗中心医院机械立体停车库设计采购施工总承包(EPC)钢结构防火涂料采购", "purchaserId" : "f899bb12810007eb018165ef5d3656ee", "contactName" : "雷伟华", "contactTel" : "13502437249", "contactAddr" : "深圳市龙岗区龙城街道黄阁坑社区天安(龙岗)数码创业园4栋A座402", "region" : "5", "startTime" : "2022-12-15 17:09:07", "questionEndTime" : "2022-12-20 18:08:18", "answerEndTime" : "2022-12-21 18:08:18", "finishTime" : "2022-12-22 18:08:18", "confirmEndTime" : "2022-12-24 18:08:18", "buyTime" : null, "expectTime" : null, "isPublish" : "1", "publishTime" : "2022-12-15 17:09:07", "buyType" : "2", "fundSource" : "政府投资100%", "isOk" : "1", "creationTime" : "2022-12-15 17:08:13", "buildPrjName" : null, "buildCode" : null, "buildPrjType" : null, "purchaserName" : "深圳市宝龙泰建设工程有限公司(深圳市联网立体停车库建设项目-龙岗中心医院机械立体停车库项目部)", "purchaserAuthType" : "AC0001", "materCode" : null, "countPv" : 39, "projectSort" : 100, "number" : 1, "loseNum" : 0, "ansNum" : 0, "questionNum" : 0, "headPic" : null}, projectId : '1a2047f1-31d5-418f-b69d-550c74986fa9', demandList : ko.observableArray([]), productList : ko.observableArray([]), buyQuestionList : ko.observableArray([]),//存储答疑列表 questionList : ko.observableArray([]),//存储质疑列表 proAttachFiles : ko.observableArray(), loseHistorys : ko.observableArray([]), hotProjects : ko.observableArray([]), otherProject : ko.observableArray([]), cgryList : ko.observableArray([]) }, fun : { manageProduct : function(demand) { $(".hideTr").hide(); if(viewModel.param.demandTempId){ eval('viewModel.data.'+viewModel.param.demandTempId+'=viewModel.data.productList().concat()'); viewModel.data.productList.removeAll(); } $("#tabDemand tfoot").append($("tr.productList").hide()); viewModel.param.demandTempId = 'd' + demand.id; if(eval('viewModel.data.'+viewModel.param.demandTempId)){ var rows = eval('viewModel.data.'+viewModel.param.demandTempId); for (var i = 0; i < rows.length; i++) { viewModel.data.productList.push(rows[i]); } var tr=$("#"+viewModel.param.demandTempId); $(tr).after($("tr.productList").show()); var trs=$("#"+viewModel.param.demandTempId+"s"); $(trs).show(); }else{ $.ajax({ url : '/xjcg/buyList/i/getBuyListsByBuyDemandId', data : { id : demand.id }, type : 'POST', dataType : "json", success : function(data) { var rows = data; for (var i = 0; i < rows.length; i++) { rows[i]["pNo"]= i+1; viewModel.data.productList.push(rows[i]); } var tr=$("#"+viewModel.param.demandTempId); $(tr).after($("tr.productList").show()); var trs=$("#"+viewModel.param.demandTempId+"s"); $(trs).show(); } }); } },//end fun.loadProduct loadDemand : function() { $.ajax({ url : '/xjcg/buyDemand/i/getVDemandListByProId', data : { proId : viewModel.data.project.id }, type : 'POST', dataType : "json", async : false, success : function(data) { var rows = data; for (var i = 0; i < rows.length; i++) { rows[i].index=i+1; rows[i]["dNo"] = i+1; viewModel.data.demandList.push(rows[i]); } } }); },//end fun.loadDemand buyOffer : function(demand){ debugger if(false){ if(false){ //判断是否自己对自己报价 $.get( '/xjcg/buyoffer/findPurchaserByBasUserId', {rfqBuyDemandId:demand.id}, function(data){ if(data.success){ showMessage(data.message); return; }else{ //判断是否已经报价,返回状态标示 var hadOffer = 0; var bType='1'; $.ajax({ url:'/xjcg/buyoffer/findSupplier', type:'POST', data:{rfqBuyDemandId:demand.id,projectId:viewModel.data.projectId}, dataType:'json', async : false, success:function(data){ bType = data.buyType; if(data.success){//已报价 hadOffer = 1; } } }); var title = '对“' + demand.demandTitle + '”包件进行报价'; if(demand.buyType==2&&demand.demandTitle.length>20){ title = '对“' + demand.demandTitle.substring(0,20) + '...”包件进行报价'; } if(demand.buyType==1){ title = '对“' + demand.projectTitle + '”项目进行报价'; if(demand.projectTitle.length>20){ title = '对“' + demand.projectTitle.substring(0,20) + '...”项目进行报价'; } } offerWin=$.dialog({ id:'buyOfferDialog', title : title, max: true, min: false, lock:true, fixed: true, top: 40, width: $(window).width()-150, height: $(window).height()-150, content: 'url:/xjcg/buy/buyOffer?id='+demand.id+'&projectId='+viewModel.data.projectId+'&type=2&hadOffer='+hadOffer, button: [{ id : 'btnSaveOffer', name: '提交报价', callback: function(){ if( !offerWin || offerWin.closed ) showMessage( '提交报价窗口信息异常' ); else{ var filesCount = offerWin.content.viewModel.fun.getAttachFilesCount(); var filesCountTxt = ""; if(filesCount<=0){ filesCountTxt = "本次操作未上传新的附件,"; } var tip=filesCountTxt+"您确定要提交报价吗?"; // var; confirmWin({ content : tip, okFun : function(){ if(offerWin.content.viewModel.fun.submit()){ if(bType=='1'){ offerWin.close(); showMessage('提交报价成功!'); }else{ this.button({ disabled: true }); offerWin.button({ id:'btnSaveOffer', disabled: true }); } } } }); } return false; }, focus: true }, { name: '取消', callback:function(){ if(offerWin.content.viewModel.param.isSuccess()){ window.location.reload(); } } }], close:function(){ if(offerWin.content.viewModel.param.isSuccess()){ window.location.reload(); } } }); } }, 'json' ); }else{ var link = '
去实名认证'; } if(false){ link = link+'70px;">查看我的实名认证情况'; } var content = ""+"报价!"+link; $.dialog({ title: '温馨提示', width: '300px', height: 150, top: '20%', content: content, lock: true, max: false, min: false }); } }else{ window.location.href="/xjcg/buyer/login"; } },//end fun.buyOffer initState:function(){ //判断是否全部包件完成 var demands = viewModel.data.demandList(); for(i=0;i