"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[43],{55492:function(A,c,r){var m=r(97857),u=r.n(m),_=r(56002);c.Z={Add:function(e){return(0,_.request)("/api/finalsinfo/add",{method:"POST",data:u()({},e)})},Del:function(e){return(0,_.request)("/api/finalsinfo/del",{method:"POST",data:u()({},e)})},Update:function(e){return(0,_.request)("/api/finalsinfo/update",{method:"POST",data:u()({},e)})},Detail:function(e){return(0,_.request)("/api/finalsinfo/detail/".concat(e),{method:"GET"})},List:function(){return(0,_.request)("/api/finalsinfo/list",{method:"POST"})},SelectList:function(){return(0,_.request)("/api/finalsinfo/selectlist",{method:"GET"})},LineList:function(e){return(0,_.request)("/api/finalsinfo/linelist/".concat(e),{method:"GET"})},UnBindList:function(){return(0,_.request)("/api/finalsinfo/UnBindList",{method:"GET"})},PagedList:function(e){return(0,_.request)("/api/finalsinfo/pagedlist",{method:"POST",data:u()({},e)})},BatchUpdate:function(e){return(0,_.request)("/api/finalsinfo/batchupdate",{method:"POST",data:e})},BindLine:function(t){function e(E){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){return(0,_.request)("/api/finalsinfo/bindline",{method:"POST",data:t})}),RecipeList:function(e){return(0,_.request)(" api/finalsinfo/list",{method:"POST",data:{deviceId:e}})},Saveconfigstatus:function(t){function e(E){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){return(0,_.request)(" /api/finalsinfo/saveconfigstatus",{method:"POST",data:t})})}},47703:function(A,c,r){var m=r(97857),u=r.n(m),_=r(56002);c.Z={Add:function(e){return(0,_.request)("/api/workplan/add",{method:"POST",data:u()({},e)})},Del:function(e){return(0,_.request)("/api/workplan/del",{method:"POST",data:u()({},e)})},Update:function(e){return(0,_.request)("/api/workplan/update",{method:"POST",data:u()({},e)})},Detail:function(e){return(0,_.request)("/api/workplan/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,_.request)("/api/workplan/list",{method:"POST",data:u()({},e)})},PagedList:function(e){return(0,_.request)("/api/workplan/pagedlist",{method:"POST",data:u()({},e)})}}},51283:function(A,c,r){r.r(c);var m=r(15009),u=r.n(m),_=r(99289),t=r.n(_),e=r(5574),E=r.n(e),R=r(51042),b=r(83145),C=r(42075),T=r(14726),U=r(86738),f=r(45360),p=r(67294),K=r(27484),v=r.n(K),D=r(47703),x=r(55492),d=r(85893);c.default=function(){var F=(0,p.useState)("table"),S=E()(F,2),h=S[0],P=S[1],M=(0,p.useRef)(),g=(0,p.useRef)(),W=(0,p.useState)(),j=E()(W,2),y=j[0],I=j[1],L=function(){var n,a;(n=M.current)===null||n===void 0||n.resetFields(),(a=g.current)===null||a===void 0||a.reload()},Z=[{title:"\u4E3B\u952E",dataIndex:"id",hideInForm:!0,hideInSearch:!0},{title:"\u8BA1\u5212\u540D\u79F0",dataIndex:"name",ellipsis:!0,formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}]}},{title:"\u6210\u54C1",hideInDescriptions:!0,dataIndex:"finalId",valueType:"select",request:function(){var l=t()(u()().mark(function a(){var s,i;return u()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,x.Z.SelectList();case 2:return s=o.sent,i=s.data,i.map(function(O){return O.label=O.value,O.value=O.key}),o.abrupt("return",i);case 6:case"end":return o.stop()}},a)}));function n(){return l.apply(this,arguments)}return n}(),formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}]}},{title:"\u6570\u91CF",dataIndex:"quantity",search:!1,formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}]}},{title:"\u9884\u8BA1\u65F6\u95F4",dataIndex:"dateRange",search:!1,valueType:"dateRange",render:function(n,a,s,i,B){return(0,d.jsxs)(d.Fragment,{children:[v()(a.expectedStartTime).format("YYYY\u5E74MM\u6708DD\u65E5")," ~ ",v()(a.expectedEndTime).format("YYYY\u5E74MM\u6708DD\u65E5")]})},formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}]}},{title:"\u64CD\u4F5C",valueType:"option",fixed:"right",render:function(n,a){return[(0,d.jsxs)(C.Z,{children:[(0,d.jsx)(T.ZP,{size:"small",type:"primary",onClick:function(){var i;P("form"),I(a),(i=M.current)===null||i===void 0||i.setFieldsValue(a)},target:"_blank",rel:"noopener noreferrer",children:"\u7F16\u8F91"},+new Date+Math.random()),(0,d.jsx)(U.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u6761\u6570\u636E\u5417\uFF1F",onConfirm:function(){D.Z.Del(a).then(function(i){i.statusCode===200?(f.ZP.info("\u5220\u9664\u6210\u529F!"),L()):f.ZP.error(i.errors)})},onCancel:function(){f.ZP.info("\u5DF2\u53D6\u6D88\u5220\u9664")},okText:"\u786E\u8BA4",cancelText:"\u5173\u95ED",children:(0,d.jsx)(T.ZP,{size:"small",type:"primary",danger:!0,children:"\u5220\u9664"})},"del")]},+new Date+Math.random())]}}];return(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(b.Z,{columns:Z,type:h,formRef:M,actionRef:g,cardBordered:!0,bordered:!0,scroll:{x:!0},rowClassName:function(n,a,s){return a%2===0?"":"even-row-background"},onSubmit:function(n){h==="form"&&(n.id=y.id,n.expectedStartTime=n.dateRange[0],n.expectedEndTime=n.dateRange[1],console.log(n),n.id?(n.e,D.Z.Update(n).then(function(a){a.statusCode===200?(f.ZP.info("\u66F4\u65B0\u6210\u529F!"),P("table"),L()):f.ZP.error(a.errors)})):D.Z.Add(n).then(function(a){a.statusCode===200?(f.ZP.info("\u65B0\u589E\u6210\u529F!"),P("table"),L()):f.ZP.error(a.errors)}))},form:{ignoreRules:!0,submitter:{onReset:function(){var n;(n=M.current)===null||n===void 0||n.resetFields(),P("table")},searchConfig:{resetText:h==="form"?"\u8FD4\u56DE":"\u91CD\u7F6E",submitText:h==="form"?"\u63D0\u4EA4":"\u67E5\u8BE2"}}},request:t()(u()().mark(function l(){var n,a,s,i=arguments;return u()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return n=i.length>0&&i[0]!==void 0?i[0]:{},a={pageIndex:n.current||1,pageSize:n.pageSize||10,name:n.name||""},o.next=4,D.Z.PagedList(a);case 4:if(s=o.sent,s.statusCode!==200){o.next=9;break}return o.abrupt("return",{data:s.data.items,success:!0,total:s.data.total});case 9:return o.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return o.stop()}},l)})),pagination:{pageSize:5,showSizeChanger:!1},rowKey:"id",dateFormatter:"string",headerTitle:"\u5217\u8868",toolBarRender:function(){return[(0,d.jsxs)(T.ZP,{type:"primary",onClick:function(){P("form"),I({id:""})},children:[(0,d.jsx)(R.Z,{}),"\u65B0\u5EFA"]},"3")]}})})}}}]);