|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[9610],{28931:function(A){A.exports={table_search_item:"table_search_item___1X2J-",edit_image_item:"edit_image_item___3d_ei",edit_image_prev:"edit_image_prev___2Ve3Y"}},76089:function(A,h,e){"use strict";e.r(h);var v=e(71194),l=e(50146),d=e(47673),n=e(4107),ue=e(57663),S=e(71577),le=e(58024),y=e(91894),_e=e(43358),Z=e(34041),c=e(39428),de=e(34792),p=e(48086),g=e(3182),oe=e(62350),x=e(24565),me=e(9715),E=e(55843),f=e(2824),F=e(16894),K=e(28790),b=e(49101),o=e(67294),M=e(73999),Y=e(28931),G=e.n(Y),t=e(85893),$=function(){var D=(0,o.useRef)(),z=(0,o.useState)(!1),T=(0,f.Z)(z,2),V=T[0],P=T[1],N=E.Z.useForm(),J=(0,f.Z)(N,1),C=J[0],X=(0,o.useState)([]),W=(0,f.Z)(X,2),B=W[0],H=W[1],Q=(0,o.useState)(1),I=(0,f.Z)(Q,2),k=I[0],pe=I[1],w=(0,o.useState)(10),R=(0,f.Z)(w,2),q=R[0],Ee=R[1],ee=(0,o.useState)(0),L=(0,f.Z)(ee,2),fe=L[0],Pe=L[1],te=(0,o.useState)(""),U=(0,f.Z)(te,2),O=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(u,r){var s=B.find(function(i){return i.id===r.storeId});if(s)return(0,t.jsx)("div",{children:s.name})}},{title:"\u64CD\u4F5C",valueType:"option",key:"option",fixed:"right",width:150,render:function(u,r){return[(0,t.jsx)("a",{onClick:function(){C.setFieldsValue(r),P(!0)},children:"\u66F4\u65B0"}),(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(){P(!0),C.resetFields()},ne=function(){var a=(0,g.Z)((0,c.Z)().mark(function u(r){var s,i;return(0,c.Z)().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(!r.id){m.next=7;break}return m.next=3,M.Z.MiniPageUpdate(r);case 3:s=m.sent,s.statusCode===200?(p.default.success("\u4FEE\u6539\u6210\u529F"),P(!1),D.current.reload()):p.default.error(s.errors),m.next=11;break;case 7:return m.next=9,M.Z.MiniPageAdd(r);case 9:i=m.sent,i.statusCode===200?(p.default.success("\u6DFB\u52A0\u6210\u529F"),P(!1),D.current.reload()):p.default.error(i.errors);case 11:case"end":return m.stop()}},u)}));return function(r){return a.apply(this,arguments)}}(),se=function(){var a=(0,g.Z)((0,c.Z)().mark(function u(r){var s;return(0,c.Z)().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return _.next=2,M.Z.MiniPageDelete(r.id);case 2:s=_.sent,s.statusCode===200?(p.default.success("\u5220\u9664\u6210\u529F"),D.current.reload()):p.default.error(s.errors);case 4:case"end":return _.stop()}},u)}));return function(r){return a.apply(this,arguments)}}(),ie=function(){var a=(0,g.Z)((0,c.Z)().mark(function u(){var r,s;return(0,c.Z)().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return _.next=2,M.Z.GetAllStore();case 2:r=_.sent,r.statusCode==200?(H(r.data),j((s=r.data[0])===null||s===void 0?void 0:s.id)):p.default.error(r.msg||"\u83B7\u53D6\u5E97\u94FA\u5217\u8868\u5931\u8D25");case 4:case"end":return _.stop()}},u)}));return function(){return a.apply(this,arguments)}}();return(0,o.useEffect)(function(){ie()},[]),(0,o.useEffect)(function(){D.current.reload()},[O]),(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)(Z.Z,{style:{width:300},value:O,onChange:function(u){j(u)},children:B.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,g.Z)((0,c.Z)().mark(function a(){var u,r;return(0,c.Z)().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(O){i.next=2;break}return i.abrupt("return");case 2:return u={current:k,pageSize:q,storeId:O},i.next=5,M.Z.MiniPageList(u);case 5:return r=i.sent,i.abrupt("return",{data:r.data.items,success:!0,total:r.data.totalCount});case 7:case"end":return i.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:V,onOk:function(){return P(!1)},onCancel:function(){return P(!1)},bodyStyle:{padding:"32px 40px 1px 48px"},children:(0,t.jsxs)(E.Z,{name:"basic",form:C,onFinish:ne,children:[(0,t.jsx)(E.Z.Item,{name:"id",hidden:!0,children:(0,t.jsx)(n.Z,{})}),(0,t.jsx)(E.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)(E.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)(E.Z.Item,{label:"\u5F52\u5C5E\u573A\u666F",name:"storeId",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u95E8\u5E97\uFF01"}],children:(0,t.jsx)(Z.Z,{allowClear:!0,placeholder:"\u8BF7\u9009\u62E9\u95E8\u5E97",style:{width:"100%"},children:B.map(function(a){return(0,t.jsx)(Option,{value:a.id,children:a.name},a.id)})})}),(0,t.jsxs)(E.Z.Item,{children:[(0,t.jsx)(S.Z,{htmlType:"button",style:{float:"right",left:10},onClick:function(){return P(!1)},children:"\u53D6\u6D88"}),(0,t.jsx)(S.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})]})]})})]})};h.default=$},73999: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)("/groupmeal/api/AppletService/MaterialDel",{method:"POST",data:{id:n}})}}}}]);
|