|
- "use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[43],{55492:function(A,c,r){var m=r(97857),_=r.n(m),a=r(56002);c.Z={Add:function(e){return(0,a.request)("/api/finalsinfo/add",{method:"POST",data:_()({},e)})},Del:function(e){return(0,a.request)("/api/finalsinfo/del",{method:"POST",data:_()({},e)})},Update:function(e){return(0,a.request)("/api/finalsinfo/update",{method:"POST",data:_()({},e)})},Detail:function(e){return(0,a.request)("/api/finalsinfo/detail/".concat(e),{method:"GET"})},List:function(){return(0,a.request)("/api/finalsinfo/list",{method:"POST"})},SelectList:function(){return(0,a.request)("/api/finalsinfo/selectlist",{method:"GET"})},LineList:function(e){return(0,a.request)("/api/finalsinfo/linelist/".concat(e),{method:"GET"})},FinishLineList:function(e){return(0,a.request)("/api/finalsinfo/finishlinelist/".concat(e),{method:"GET"})},UnBindList:function(){return(0,a.request)("/api/finalsinfo/UnBindList",{method:"GET"})},PagedList:function(e){return(0,a.request)("/api/finalsinfo/pagedlist",{method:"POST",data:_()({},e)})},BatchUpdate:function(e){return(0,a.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,a.request)("/api/finalsinfo/bindline",{method:"POST",data:t})}),RecipeList:function(e){return(0,a.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,a.request)(" /api/finalsinfo/saveconfigstatus",{method:"POST",data:t})})}},47703:function(A,c,r){var m=r(97857),_=r.n(m),a=r(56002);c.Z={Add:function(e){return(0,a.request)("/api/workplan/add",{method:"POST",data:_()({},e)})},Del:function(e){return(0,a.request)("/api/workplan/del",{method:"POST",data:_()({},e)})},Update:function(e){return(0,a.request)("/api/workplan/update",{method:"POST",data:_()({},e)})},Detail:function(e){return(0,a.request)("/api/workplan/detail/".concat(e),{method:"GET"})},List:function(e){return(0,a.request)("/api/workplan/list",{method:"POST",data:_()({},e)})},PagedList:function(e){return(0,a.request)("/api/workplan/pagedlist",{method:"POST",data:_()({},e)})}}},51283:function(A,c,r){r.r(c);var m=r(15009),_=r.n(m),a=r(99289),t=r.n(a),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),F=r(27484),v=r.n(F),D=r(47703),K=r(55492),d=r(85893);c.default=function(){var x=(0,p.useState)("table"),S=E()(x,2),h=S[0],P=S[1],M=(0,p.useRef)(),I=(0,p.useRef)(),W=(0,p.useState)(),g=E()(W,2),y=g[0],j=g[1],L=function(){var n,i;(n=M.current)===null||n===void 0||n.resetFields(),(i=I.current)===null||i===void 0||i.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()(_()().mark(function i(){var o,s;return _()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,K.Z.SelectList();case 2:return o=u.sent,s=o.data,s.map(function(O){return O.label=O.value,O.value=O.key}),u.abrupt("return",s);case 6:case"end":return u.stop()}},i)}));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,i,o,s,B){return(0,d.jsxs)(d.Fragment,{children:[v()(i.expectedStartTime).format("YYYY\u5E74MM\u6708DD\u65E5")," ~ ",v()(i.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,i){return[(0,d.jsxs)(C.Z,{children:[(0,d.jsx)(T.ZP,{size:"small",type:"primary",onClick:function(){var s;P("form"),j(i),(s=M.current)===null||s===void 0||s.setFieldsValue(i)},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(i).then(function(s){s.statusCode===200?(f.ZP.info("\u5220\u9664\u6210\u529F!"),L()):f.ZP.error(s.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:I,cardBordered:!0,bordered:!0,scroll:{x:!0},rowClassName:function(n,i,o){return i%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(i){i.statusCode===200?(f.ZP.info("\u66F4\u65B0\u6210\u529F!"),P("table"),L()):f.ZP.error(i.errors)})):D.Z.Add(n).then(function(i){i.statusCode===200?(f.ZP.info("\u65B0\u589E\u6210\u529F!"),P("table"),L()):f.ZP.error(i.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()(_()().mark(function l(){var n,i,o,s=arguments;return _()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return n=s.length>0&&s[0]!==void 0?s[0]:{},i={pageIndex:n.current||1,pageSize:n.pageSize||10,name:n.name||"",finalId:n.finalId||""},u.next=4,D.Z.PagedList(i);case 4:if(o=u.sent,o.statusCode!==200){u.next=9;break}return u.abrupt("return",{data:o.data.items,success:!0,total:o.data.total});case 9:return u.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return u.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"),j({id:""})},children:[(0,d.jsx)(R.Z,{}),"\u65B0\u5EFA"]},"3")]}})})}}}]);
|