(this.webpackJsonpfronted=this.webpackJsonpfronted||[]).push([[0],{272:function(e,t,n){"use strict";n.r(t);var s=n(4),c=n.n(s),i=n(31),o=n.n(i),a=(n(36),n(37),n(7)),r=n.n(a),d=n(13),l=n(14),u=n(15),j=n(17),h=n(16),b=n(2),p={border:"1px dashed #ccc",margin:"10px",padding:"10px",boxShadow:"0 0 #ccc"},m=function(e){Object(j.a)(n,e);var t=Object(h.a)(n);function n(e){return Object(l.a)(this,n),t.call(this,e)}return Object(u.a)(n,[{key:"render",value:function(){return this.props.items.map((function(e){var t=e.formComponentValues[0].name,n=e.result,s=e.approverUserids[0];return Object(b.jsxs)("tr",{className:"text-center",children:[Object(b.jsx)("td",{children:t}),Object(b.jsx)("td",{children:n}),Object(b.jsx)("td",{children:s})]})}))}}]),n}(c.a.Component),O=function(e){Object(j.a)(n,e);var t=Object(h.a)(n);function n(e){var s;return Object(l.a)(this,n),(s=t.call(this,e)).goodsCollectionAndApprove=function(){var e={detailForms:[{textForms:[{name:"\u7269\u54c1\u540d\u79f0",value:"\u6d4b\u8bd5\u7269\u54c1\u9886\u7528-\u7535\u8111"},{name:"\u6570\u91cf",value:"3"}],name:"\u7269\u54c1\u660e\u7ec6"}],originatorUserId:sessionStorage.getItem("userId"),textForms:[{name:"\u7269\u54c1\u7528\u9014",value:"\u6d4b\u8bd5\u7269\u54c1\u9886\u7528"},{name:"\u9886\u7528\u8be6\u60c5",value:"\u9886\u7528\u8be6\u60c51"}],deptId:sessionStorage.getItem("deptId")};r()({url:f+"/process/instance",method:"post",data:e,headers:{"Content-Type":"application/json"}}).then((function(e){alert("success")})).catch((function(e){console.log(e)}))},s.getTableRowData=function(){r.a.get(f+"/process/instance").then((function(e){s.setState({items:e.data.result,isLoaded:!0})})).catch((function(e){alert(JSON.stringify(e))}))},s.state={items:[],isLoaded:!1},s}return Object(u.a)(n,[{key:"render",value:function(){return this.state.isLoaded?Object(b.jsxs)("div",{children:[Object(b.jsx)("button",{style:p,onClick:this.goodsCollectionAndApprove,children:"\u9886\u7528\u5e76\u63d0\u4ea4\u5ba1\u6279"}),Object(b.jsx)("button",{style:p,onClick:this.getTableRowData,children:"\u83b7\u53d6\u63d0\u4ea4\u7684\u5ba1\u6279\u4fe1\u606f"}),Object(b.jsxs)("table",{className:"table table-bordered",children:[Object(b.jsx)("thead",{children:Object(b.jsxs)("tr",{children:[Object(b.jsx)("th",{children:"\u7269\u54c1\u7528\u9014"}),Object(b.jsx)("th",{children:"\u5ba1\u6279\u72b6\u6001"}),Object(b.jsx)("th",{children:"\u5ba1\u6279\u4eba"})]})}),Object(b.jsx)("tbody",{children:Object(b.jsx)(m,{items:this.state.items})})]})]}):Object(b.jsxs)("div",{children:[Object(b.jsx)("button",{style:p,onClick:this.goodsCollectionAndApprove,children:"\u9886\u7528\u5e76\u63d0\u4ea4\u5ba1\u6279"}),Object(b.jsx)("button",{style:p,onClick:this.getTableRowData,children:"\u83b7\u53d6\u63d0\u4ea4\u7684\u5ba1\u6279\u4fe1\u606f"})]})}}]),n}(c.a.Component),f="http://wanzq.vaiwan.com";d.ready((function(){d.runtime.permission.requestAuthCode({corpId:"ding9f50b15bccd16741",onSuccess:function(e){r.a.get(f+"/login?authCode="+e.code).then((function(e){sessionStorage.setItem("userId",e.data.result.userid),sessionStorage.setItem("deptId",e.data.result.deptIdList[0])})).catch((function(e){alert(JSON.stringify(e))}))},onFail:function(e){alert(JSON.stringify(e))}})}));var x=function(){return Object(b.jsx)("div",{className:"App",children:Object(b.jsx)("div",{className:"container",children:Object(b.jsx)(O,{})})})},g=function(e){e&&e instanceof Function&&n.e(3).then(n.bind(null,273)).then((function(t){var n=t.getCLS,s=t.getFID,c=t.getFCP,i=t.getLCP,o=t.getTTFB;n(e),s(e),c(e),i(e),o(e)}))};o.a.render(Object(b.jsx)(c.a.StrictMode,{children:Object(b.jsx)(x,{})}),document.getElementById("root")),g()},36:function(e,t,n){},37:function(e,t,n){}},[[272,1,2]]]);
//# sourceMappingURL=main.a09ae980.chunk.js.map