Files
FBSAdminTool/build/static/js/6.0dae2086.chunk.js
2021-07-12 15:44:50 +05:30

2 lines
3.7 KiB
JavaScript

(this["webpackJsonp@coreui/coreui-free-react-admin-template"]=this["webpackJsonp@coreui/coreui-free-react-admin-template"]||[]).push([[6],{687:function(e,t,c){"use strict";c.r(t);var n=c(657),s=c.n(n),o=c(658),a=c(678),r=c(1),i=c(659),l=c.n(i),j=c(631),u=c(629),d=c(20),h=c(677);t.default=function(){var e=new Date,t=e.getMonth()+1+"/"+e.getDate()+"/"+e.getFullYear(),c=Object(r.useState)([]),n=Object(a.a)(c,2),i=n[0],b=n[1],O=Object(r.useState)(t),x=Object(a.a)(O,2),p=x[0],m=x[1],f=Object(r.useState)(""),g=Object(a.a)(f,2),v=g[0],k=g[1],C=Object(r.useState)(""),w=Object(a.a)(C,2),_=w[0],y=w[1];return Object(r.useEffect)((function(){function e(){return(e=Object(o.a)(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l()("https://natnats.mobilous.com/getConstructionList");case 2:t=e.sent,b(t.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[]),Object(d.jsxs)(j.J,{children:[Object(d.jsx)(j.k,{xs:"12",sm:"12",md:"12",children:Object(d.jsxs)(j.f,{children:[Object(d.jsx)(j.j,{children:"\u30ec\u30dd\u30fc\u30c8"}),Object(d.jsxs)(j.g,{children:[Object(d.jsxs)(j.K,{custom:!0,name:"cons_select",id:"cons_select",onChange:function(e){y(e.target.value)},children:['" ',Object(d.jsx)("option",{value:"",children:"-- \u9078\u629e --"}),'"+',i.map((function(e,t){return Object(d.jsx)("option",{value:e.construction_id,children:e.construction_name},e.construction_id)}))]}),Object(d.jsxs)(j.f,{children:[Object(d.jsx)(j.g,{children:Object(d.jsxs)(j.t,{action:"",method:"post",encType:"multipart/form-data",className:"form-horizontal",children:[Object(d.jsxs)(j.u,{row:!0,children:[Object(d.jsx)(j.k,{md:"3",children:Object(d.jsxs)(j.G,{htmlFor:"date-input",children:["\u65e5\u4ed8 (",p,")"]})}),Object(d.jsx)(j.k,{xs:"12",md:"9",children:Object(d.jsx)(j.B,{type:"date",id:"date-input",name:"date-input",placeholder:"\u65e5\u4ed8",value:p,onChange:function(e){m(e.target.value)}})})]}),Object(d.jsxs)(j.u,{row:!0,children:[Object(d.jsx)(j.k,{md:"3",children:Object(d.jsx)(j.G,{htmlFor:"select",children:"\u9078\u629e"})}),Object(d.jsx)(j.k,{xs:"12",md:"9",children:Object(d.jsxs)(j.K,{custom:!0,name:"select",id:"select",onChange:function(e){k(e.target.value)},value:v,children:[Object(d.jsx)("option",{value:"",children:"-- \u9078\u629e --"}),Object(d.jsx)("option",{value:"generateBoxDisplacement",children:"\u51fd\u4f53\u5909\u4f4d\u8868"}),Object(d.jsx)("option",{value:"generateMachineControl",children:"\u30aa\u30fc\u30d7\u30f3\u30b7\u30fc\u30eb\u30c9\u30de\u30b7\u30f3\u7ba1\u7406\u65e5\u5831"}),Object(d.jsx)("option",{value:"generateMachineSheet",children:"\u30aa\u30fc\u30d7\u30f3\u30b7\u30fc\u30eb\u30c9\u6a5f\u5909\u4f4d\u8868"}),Object(d.jsx)("option",{value:"generateMeasurement",children:"\u51fd\u5e95\u9ad8\u30fb\u504f\u4f4d\u91cf\u6e2c\u5b9a\u4e00\u89a7\u8868"}),Object(d.jsx)("option",{value:"generateCheckSheet",children:"\u5de5\u7a0b\u5185\u691c\u67fb\u8868"}),Object(d.jsx)("option",{value:"generateInjection",children:"\u88cf\u8fbc\u6ce8\u5165\u6750\u6599\u53d7\u6255\u3044\u7c3f"})]})})]})]})}),Object(d.jsx)(j.h,{children:Object(d.jsxs)(j.e,{type:"submit",size:"sm",color:"primary",onClick:function(){if(""!=v&&""!=_){var e="https://natnats.mobilous.com//"+v+"?construction_id="+_+"&construction_date="+p;console.log(_),console.log(p),console.log(v),function(e){var t=l()(e).then((function(e){h(e.data,"report.xls")}));console.log(t)}(e)}else alert("Please select both Construction and Report")},children:[Object(d.jsx)(u.a,{name:"cil-scrubber"})," \u30c0\u30a6\u30f3\u30ed\u30fc\u30c9"]})})]})]})]})}),Object(d.jsx)(j.k,{xs:"1",sm:"1",md:"1"})]})}}}]);
//# sourceMappingURL=6.0dae2086.chunk.js.map