|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7396],{73361:function(A){A.exports={table_search_item:"table_search_item___lDy92",edit_image_item:"edit_image_item___175fz",edit_image_prev:"edit_image_prev___1cbHX"}},32970:function(A,h,e){"use strict";e.r(h);var v=e(71194),l=e(50146),_=e(47673),n=e(4107),ue=e(57663),S=e(71577),le=e(58024),y=e(91894),_e=e(43358),B=e(34041),m=e(39428),de=e(34792),c=e(48086),O=e(3182),oe=e(62350),x=e(24565),me=e(9715),p=e(55843),E=e(2824),F=e(16894),K=e(28790),b=e(49101),d=e(67294),M=e(17566),Y=e(73361),G=e.n(Y),t=e(85893),$=function(){var D=(0,d.useRef)(),z=(0,d.useState)(!1),T=(0,E.Z)(z,2),N=T[0],f=T[1],V=p.Z.useForm(),H=(0,E.Z)(V,1),C=H[0],X=(0,d.useState)([]),W=(0,E.Z)(X,2),Z=W[0],J=W[1],Q=(0,d.useState)(1),I=(0,E.Z)(Q,2),k=I[0],pe=I[1],w=(0,d.useState)(10),R=(0,E.Z)(w,2),q=R[0],Ee=R[1],ee=(0,d.useState)(0),L=(0,E.Z)(ee,2),fe=L[0],Pe=L[1],te=(0,d.useState)(""),U=(0,E.Z)(te,2),g=U[0],j=U[1],ae=[{title:"\u9875\u9762\u540D\u79F0",dataIndex:"pageName",ellipsis:!0},{title:"\u9875\u9762\u8DEF\u5F84",dataIndex:"pageRoute",ellipsis:!0},{title:"\u5F52\u5C5E\u573A\u666F",dataIndex:"storeId",ellipsis:!0,render:function(i,r){var u=Z.find(function(s){return s.id===r.storeId});if(u)return(0,t.jsx)("div",{children:u.name})}},{title:"\u64CD\u4F5C",valueType:"option",key:"option",fixed:"right",width:150,render:function(i,r){return[(0,t.jsx)("a",{onClick:function(){C.setFieldsValue(r),f(!0)},children:"\u7F16\u8F91"}),(0,t.jsx)(x.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u9875\u9762\u5417\uFF1F",onConfirm:function(){return se(r)},okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,t.jsx)("a",{href:"#",children:"\u5220\u9664"})})]}}],re=function(){f(!0),C.resetFields()},ne=function(){var a=(0,O.Z)((0,m.Z)().mark(function i(r){var u,s;return(0,m.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!r.id){o.next=7;break}return o.next=3,M.Z.MiniPageUpdate(r);case 3:u=o.sent,u.statusCode===200?(c.default.success("\u4FEE\u6539\u6210\u529F"),f(!1),D.current.reload()):c.default.error(u.errors),o.next=11;break;case 7:return o.next=9,M.Z.MiniPageAdd(r);case 9:s=o.sent,s.statusCode===200?(c.default.success("\u6DFB\u52A0\u6210\u529F"),f(!1),D.current.reload()):c.default.error(s.errors);case 11:case"end":return o.stop()}},i)}));return function(r){return a.apply(this,arguments)}}(),se=function(){var a=(0,O.Z)((0,m.Z)().mark(function i(r){var u;return(0,m.Z)().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.next=2,M.Z.MiniPageDelete(r.id);case 2:u=P.sent,u.statusCode===200?(c.default.success("\u5220\u9664\u6210\u529F"),D.current.reload()):c.default.error(u.errors);case 4:case"end":return P.stop()}},i)}));return function(r){return a.apply(this,arguments)}}(),ie=function(){var a=(0,O.Z)((0,m.Z)().mark(function i(){var r;return(0,m.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,M.Z.GetAllStore();case 2:r=s.sent,r.statusCode==200?(J(r.data),j(r.data[0].id)):c.default.error(r.msg||"\u83B7\u53D6\u5E97\u94FA\u5217\u8868\u5931\u8D25");case 4:case"end":return s.stop()}},i)}));return function(){return a.apply(this,arguments)}}();return(0,d.useEffect)(function(){ie()},[]),(0,d.useEffect)(function(){D.current.reload()},[g]),(0,t.jsxs)(K.ZP,{header:{title:"",breadcrumb:{}},children:[(0,t.jsx)(y.Z,{style:{marginBottom:"10px"},children:(0,t.jsxs)("div",{className:G().table_search_item,children:[(0,t.jsx)("div",{children:"\u5F52\u5C5E\u573A\u666F\uFF1A"}),(0,t.jsx)(B.Z,{style:{width:300},value:g,onChange:function(i){j(i)},children:Z.map(function(a){return(0,t.jsx)(Option,{value:a.id,children:a.name},a.id)})})]})}),(0,t.jsx)(F.ZP,{columns:ae,actionRef:D,pagination:{pageSize:10},scroll:{x:1300},cardBordered:!0,editable:{type:"multiple"},request:(0,O.Z)((0,m.Z)().mark(function a(){var i,r;return(0,m.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(g){s.next=2;break}return s.abrupt("return");case 2:return i={current:k,pageSize:q,storeId:g},s.next=5,M.Z.MiniPageList(i);case 5:return r=s.sent,s.abrupt("return",{data:r.data.items,success:!0,total:r.data.totalCount});case 7:case"end":return s.stop()}},a)})),rowKey:"id",search:!1,dateFormatter:"string",headerTitle:"\u9875\u9762\u7BA1\u7406",toolBarRender:function(){return[(0,t.jsx)(S.Z,{icon:(0,t.jsx)(b.Z,{}),type:"primary",onClick:re,children:"\u65B0\u5EFA"},"button")]}}),(0,t.jsx)(l.Z,{title:"\u7F16\u8F91\u9875\u9762",footer:!1,visible:N,onOk:function(){return f(!1)},onCancel:function(){return f(!1)},bodyStyle:{padding:"32px 40px 1px 48px"},children:(0,t.jsxs)(p.Z,{name:"basic",form:C,onFinish:ne,children:[(0,t.jsx)(p.Z.Item,{name:"id",hidden:!0,children:(0,t.jsx)(n.Z,{})}),(0,t.jsx)(p.Z.Item,{label:"\u9875\u9762\u540D\u79F0",name:"pageName",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9875\u9762\u540D\u79F0\uFF01"}],children:(0,t.jsx)(n.Z,{})}),(0,t.jsx)(p.Z.Item,{label:"\u9875\u9762\u8DEF\u5F84",name:"pageRoute",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9875\u9762\u8DEF\u5F84\uFF01"}],children:(0,t.jsx)(n.Z,{})}),(0,t.jsx)(p.Z.Item,{label:"\u5F52\u5C5E\u573A\u666F",name:"storeId",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u95E8\u5E97\uFF01"}],children:(0,t.jsx)(B.Z,{allowClear:!0,placeholder:"\u8BF7\u9009\u62E9\u95E8\u5E97",style:{width:"100%"},children:Z.map(function(a){return(0,t.jsx)(Option,{value:a.id,children:a.name},a.id)})})}),(0,t.jsxs)(p.Z.Item,{children:[(0,t.jsx)(S.Z,{htmlType:"button",style:{float:"right",left:10},onClick:function(){return f(!1)},children:"\u53D6\u6D88"}),(0,t.jsx)(S.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})]})]})})]})};h.default=$},17566:function(A,h,e){"use strict";var v=e(11849),l=e(48971);h.Z={GetAllStore:function(){return(0,l.WY)("/groupmeal/api/shop/alllist",{method:"GET"})},GetCosRequestURL:function(n){return(0,l.WY)("/groupmeal/api/SysService/GetPresignUploadUrl",{method:"POST",data:n})},MiniPageList:function(n){return(0,l.WY)("/groupmeal/api/AppletService/page",{method:"POST",data:(0,v.Z)({},n)})},MiniPageAdd:function(n){return(0,l.WY)("/groupmeal/api/AppletService/add",{method:"POST",data:(0,v.Z)({},n)})},MiniPageUpdate:function(n){return(0,l.WY)("/groupmeal/api/AppletService/update",{method:"POST",data:(0,v.Z)({},n)})},MiniPageDelete:function(n){return(0,l.WY)("/groupmeal/api/AppletService/del",{method:"POST",data:{id:n}})},MinimaterialListByStore:function(n){return(0,l.WY)("/groupmeal/api/AppletService/MiniStoreMaterial",{method:"POST",data:n})},AddMinimaterial:function(n){return(0,l.WY)("/groupmeal/api/AppletService/MaterialAdd",{method:"POST",data:n})},UpdateMiniMaterial:function(n){return(0,l.WY)("/groupmeal/api/AppletService/MaterialUpdate",{method:"POST",data:n})},DeleteMiniMaterial:function(n){return(0,l.WY)("/saasbase/api/minimaterial/del",{method:"POST",data:{id:n}})}}}}]);
|