選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

2 行
8.0 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[4728],{63088:function(H,P,e){"use strict";e.r(P),e.d(P,{default:function(){return ne}});var h=e(57338),x=e(273),g=e(62350),M=e(24565),c=e(39428),C=e(3182),F=e(57663),E=e(71577),I=e(34792),s=e(48086),p=e(2824),i=e(49101),u=e(67294),S=e(78009),l=e(85224),G=e(16894),J=e(12826),oe=e(71194),z=e(50146),de=e(77883),Q=e(85986),ce=e(9715),Z=e(55843),me=e(47673),W=e(4107),fe=e(14965),X=e(91774),k=e(30381),$=e.n(k),t=e(85893),q=function(o){var A=X.Z.RangePicker,O=W.Z.TextArea,v=[];return o.values&&(v.push(o.values.planStartTime),v.push(o.values.planEndTime)),o.values.planDate=v,(0,t.jsx)(z.Z,{title:o.values.id?"\u7F16\u8F91":"\u65B0\u5EFA",width:700,visible:o.createModalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){o.onCancel()},destroyOnClose:!0,maskClosable:!1,children:(0,t.jsxs)(Z.Z,{layout:"Horizontal",preserve:!1,initialValues:o.values,onFinish:o.onFinish,children:[(0,t.jsx)(Z.Z.Item,{name:"id",hidden:!0,children:(0,t.jsx)(W.Z,{})}),(0,t.jsx)(Z.Z.Item,{name:"planName",label:"\u65B9\u6848\u540D\u79F0",rules:[{required:!0,max:20,whitespace:!0}],children:(0,t.jsx)(W.Z,{placeholder:"\u65B9\u6848\u540D\u79F0"})}),(0,t.jsx)(Z.Z.Item,{name:"planDate",label:"\u9009\u62E9\u65F6\u95F4",rules:[{required:!0}],children:(0,t.jsx)(A,{showTime:!0,format:"YYYY-MM-DD HH:mm:ss"})}),(0,t.jsx)(Z.Z.Item,{name:"serviceFee",label:"\u670D\u52A1\u8D39\u6BD4\u4F8B",rules:[{required:!0}],children:(0,t.jsx)(Q.Z,{step:.01,min:0,max:1,defaultValue:0,precision:2})}),(0,t.jsx)(Z.Z.Item,{name:"remark",label:"\u5907\u6CE8",rules:[{required:!1,max:255}],children:(0,t.jsx)(O,{rows:4,placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8"})}),(0,t.jsx)(Z.Z.Item,{children:(0,t.jsx)(E.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})})]})})},_=q,R=e(69918),ee=function(){var o=(0,u.useState)(!1),A=(0,p.Z)(o,2),O=A[0],v=A[1],V=(0,u.useState)(!1),Y=(0,p.Z)(V,2),ae=Y[0],b=Y[1],y=(0,u.useRef)(),re=(0,u.useState)(),K=(0,p.Z)(re,2),d=K[0],j=K[1],le=(0,u.useState)([]),L=(0,p.Z)(le,2),T=L[0],w=L[1];function ue(a){try{return(0,R.n4)(JSON.stringify(a)),s.default.success("\u6DFB\u52A0\u6210\u529F"),y.current.reload(),!0}catch(r){return s.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),!1}}function se(a){try{return(0,R.Vs)(JSON.stringify(a)).then(function(r){r.data?(s.default.success("\u4FEE\u6539\u6210\u529F"),y.current.reload()):s.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01")}),!0}catch(r){return s.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),!1}}function ie(){try{return(0,R.Wt)(T.map(function(a,r){return a.id})).then(function(a){a.data?s.default.success("\u5220\u9664\u6210\u529F\uFF0C\u5373\u5C06\u5237\u65B0"):s.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")}),y.current.reload(),!0}catch(a){s.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")}}function he(a){try{return removeSingleAccount(a).then(function(r){r.data?(s.default.success("\u5220\u9664\u6210\u529F\uFF0C\u5373\u5C06\u5237\u65B0"),y.current.reload()):s.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")}),!0}catch(r){s.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")}}var U=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0,render:function(r,n){return(0,t.jsx)("a",{onClick:function(){j(n),b(!0)},children:r})}},{title:"\u5206\u8D26\u65B9\u6848\u540D\u79F0",dataIndex:"planName",valueType:"textarea"},{title:"\u5F00\u59CB\u65F6\u95F4",hideInSearch:!0,dataIndex:"planStartTime",valueType:"dateTime"},{title:"\u7ED3\u675F\u65F6\u95F4",hideInSearch:!0,dataIndex:"planEndTime",valueType:"dateTime"},{title:"\u670D\u52A1\u8D39\u6BD4\u4F8B",dataIndex:"serviceFee",valueType:"textarea",hideInSearch:!0},{title:"\u5907\u6CE8",dataIndex:"remark",valueType:"textarea",hideInSearch:!0},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createAt",valueType:"textarea",hideInSearch:!0},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(r,n){return[(0,t.jsx)("a",{onClick:function(){v(!0),j(function(){return n.planStartTime!=null&&(n.planStartTime=$()(n.planStartTime),n.planEndTime=$()(n.planEndTime)),n})},children:"\u66F4\u65B0"},"config")]}}];return(0,t.jsxs)(S.ZP,{children:[(0,t.jsx)(G.ZP,{headerTitle:"\u5206\u8D26\u65B9\u6848",actionRef:y,rowKey:"id",search:{labelWidth:120},columns:U,toolBarRender:function(){return[(0,t.jsxs)(E.Z,{type:"primary",onClick:function(){v(!0),j({})},children:[(0,t.jsx)(i.Z,{})," \u65B0\u5EFA"]},"primary")]},request:function(){var a=(0,C.Z)((0,c.Z)().mark(function r(n){var m,B;return(0,c.Z)().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return m=[],B=0,D.next=4,(0,R.t1)(n).then(function(N){m=N.data.data,B=N.data.total});case 4:return D.abrupt("return",{data:m,success:!0,total:B});case 5:case"end":return D.stop()}},r)}));return function(r){return a.apply(this,arguments)}}(),rowSelection:{onChange:function(r,n){w(n)}}}),(T==null?void 0:T.length)>0&&(0,t.jsx)(l.Z,{extra:(0,t.jsxs)("div",{children:["\u5DF2\u9009\u62E9"," ",(0,t.jsx)("a",{style:{fontWeight:600},children:T.length})," ","\u9879 \xA0\xA0"]}),children:(0,t.jsx)(M.Z,{type:"primary",title:"\u786E\u8BA4\u662F\u5426\u5220\u9664\u9009\u4E2D\u9879\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){var r,n;ie(T),w([]),(r=y.current)===null||r===void 0||(n=r.reloadAndRest)===null||n===void 0||n.call(r)},onCancel:function(){},children:(0,t.jsx)("a",{href:"#",children:"\u6279\u91CF\u5220\u9664"})},"primary")}),(0,t.jsx)(_,{onFinish:function(){var a=(0,C.Z)((0,c.Z)().mark(function r(n){var m;return(0,c.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(m=!1,n.planStartTime=new Date(n.planDate[0]),n.planEndTime=new Date(n.planDate[1]),!n.id){f.next=9;break}return f.next=6,se(n);case 6:m=f.sent,f.next=12;break;case 9:return f.next=11,ue(n);case 11:m=f.sent;case 12:m&&(v(!1),y.current&&y.current.reload());case 13:case"end":return f.stop()}},r)}));return function(r){return a.apply(this,arguments)}}(),onCancel:function(){j(void 0),v(!1)},createModalVisible:O,values:d||{}}),(0,t.jsx)(x.Z,{width:600,visible:ae,onClose:function(){j(void 0),b(!1)},closable:!1,children:(d==null?void 0:d.name)&&(0,t.jsx)(J.ZP,{column:2,title:d==null?void 0:d.name,request:(0,C.Z)((0,c.Z)().mark(function a(){return(0,c.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",{data:d||{}});case 1:case"end":return n.stop()}},a)})),params:{id:d==null?void 0:d.name},columns:U})})]})},ne=ee},69918:function(H,P,e){"use strict";e.d(P,{t1:function(){return M},n4:function(){return C},Vs:function(){return E},Wt:function(){return s}});var h=e(39428),x=e(3182),g=e(48971);function M(i){return c.apply(this,arguments)}function c(){return c=(0,x.Z)((0,h.Z)().mark(function i(u){return(0,h.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,g.WY)("/kitchen/api/split-plan/split-plan-page",{method:"Post",data:u}));case 1:case"end":return l.stop()}},i)})),c.apply(this,arguments)}function C(i){return F.apply(this,arguments)}function F(){return F=(0,x.Z)((0,h.Z)().mark(function i(u){return(0,h.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,g.WY)("/kitchen/api/split-plan/split-plan",{method:"POST",data:u}));case 1:case"end":return l.stop()}},i)})),F.apply(this,arguments)}function E(i){return I.apply(this,arguments)}function I(){return I=(0,x.Z)((0,h.Z)().mark(function i(u){return(0,h.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,g.WY)("/kitchen/api/split-plan/split-plan",{method:"PUT",data:u}));case 1:case"end":return l.stop()}},i)})),I.apply(this,arguments)}function s(i){return p.apply(this,arguments)}function p(){return p=(0,x.Z)((0,h.Z)().mark(function i(u){return(0,h.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return console.log(u),l.abrupt("return",(0,g.WY)("/kitchen/api/split-plan/split-plan",{method:"DELETE",data:u}));case 2:case"end":return l.stop()}},i)})),p.apply(this,arguments)}}}]);