(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["open"],{"42ca":function(t,i,e){"use strict";e("c635")},c635:function(t,i,e){},f5eb:function(t,i,e){"use strict";e.r(i);var n=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"open"},[e("div",{staticClass:"container",style:t.style},[e("a-spin",{attrs:{spinning:t.confirmLoading}},[e("div",{staticClass:"boxWrap"},[e("h3",{staticClass:"h3"},[t._v("开标倒计时")]),e("div",{staticClass:"count"},[e("div",{staticClass:"countdown"},[e("a-statistic-countdown",{attrs:{value:t.deadline,format:"DD:HH:mm:ss","value-style":t.valueStyle},on:{finish:t.handleFinish}})],1)]),e("div",{staticClass:"time"},[e("span",[t._v("天")]),e("span",[t._v("时")]),e("span",[t._v("分")]),e("span",[t._v("秒")])]),e("div",{staticClass:"info"},[e("div",{staticClass:"row"},[e("span",{staticClass:"tit"},[t._v("开标状态")]),e("strong",[t._v(t._s(t.currentEditRow.biddingStatus_dictText))])]),e("div",{staticClass:"row"},[e("span",{staticClass:"tit"},[t._v("监督人员")])]),e("div",{staticClass:"row"},[e("span",{staticClass:"tit"},[t._v("开标时间")]),t._v("\n            "+t._s(t.planOpenBidTime)+"\n          ")]),e("div",{staticClass:"row"},[e("span",{staticClass:"tit"},[t._v("开标人员")])])]),e("div",{staticClass:"btns"},[e("a-button",{attrs:{type:"primary",disabled:t.disabled},on:{click:t.handleOpen}},[t._v("\n            进入开标\n          ")])],1)])])],1)])},s=[],a=e("0fea"),c={data:function(){return{confirmLoading:!1,valueStyle:{width:"100%",height:"78px",fontSize:"46px",fontWeight:700,color:"#727272",display:"flex",justifyContent:"center",alignItems:"center",letterSpacing:"14px"},showHeader:!1,height:0,planOpenBidTime:"",biddingStatus:"",timeStamp:"",deadline:null}},inject:["currentEditRow"],computed:{style:function(){var t=this.showHeader?120:66;return{minHeight:"".concat(this.height-t,"px")}},disabled:function(){return"1"!==this.biddingStatus}},methods:{handleOpen:function(){var t=this;this.getDetailPromise().then((function(i){if(i.success){var e=new Date(i.timestamp).getTime(),n=new Date(t.planOpenBidTime).getTime();if(e<=n)t.$message.error("未到达开标时间 ".concat(t.planOpenBidTime));else{var s=function(){var i=t.currentEditRow||{},e=i.id,n=void 0===e?"":e,s={id:n},c="/bidding/purchaseBiddingHead/openBiddingById";Object(a["c"])(c,s).then((function(i){var e=i.success?"success":"error";t.$message[e](i.message),t.init()}))};t.$confirm({title:"开标",content:"是否确认进入开标?",onOk:function(){s&&s()},onCancel:function(){}})}}else t.$message.error(i.message)}))},handleFinish:function(){},getDetailPromise:function(){var t=this.currentEditRow||{},i=t.id,e=void 0===i?"":i,n={id:e,pageNo:1,pageSize:20},s="/bidding/purchaseBiddingHead/list";return Object(a["c"])(s,n)},init:function(){var t=this;this.confirmLoading=!0,this.getDetailPromise().then((function(i){if(i.success){t.timestamp=i.timestamp;var e=i.result||{},n=e.records,s=void 0===n?[]:n;s&&s.length&&(t.biddingStatus=s[0].biddingStatus,t.planOpenBidTime=s[0].planOpenBidTime,t.deadline=new Date(t.planOpenBidTime).getTime())}else t.$message.error(i.message)})).finally((function(){t.confirmLoading=!1}))}},created:function(){this.height=document.documentElement.clientHeight,this.deadline=+new Date,this.init()}},d=c,o=(e("42ca"),e("0b56")),r=Object(o["a"])(d,n,s,!1,null,"656d1ad4",null);i["default"]=r.exports}}]);