Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

2 linhas
6.3 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[9076],{93352:function(C){C.exports={table_search_item:"table_search_item___1QRWt",edit_image_item:"edit_image_item___3Iyih",edit_image_prev:"edit_image_prev___2n7ta"}},18319:function(C,D,e){"use strict";e.r(D);var O=e(71194),u=e(50146),l=e(47673),n=e(4107),ue=e(57663),B=e(71577),_e=e(58024),K=e(91894),le=e(43358),Z=e(34041),m=e(39428),de=e(34792),c=e(48086),g=e(3182),oe=e(62350),y=e(24565),me=e(9715),E=e(55843),P=e(2824),F=e(16894),x=e(78009),b=e(49101),d=e(67294),h=e(73999),Y=e(93352),G=e.n(Y),t=e(85893),$=function(){var p=(0,d.useRef)(),N=(0,d.useState)(!1),S=(0,P.Z)(N,2),z=S[0],f=S[1],V=E.Z.useForm(),k=(0,P.Z)(V,1),A=k[0],H=(0,d.useState)([]),T=(0,P.Z)(H,2),R=T[0],Q=T[1],J=(0,d.useState)(1),W=(0,P.Z)(J,2),X=W[0],Ee=W[1],w=(0,d.useState)(10),I=(0,P.Z)(w,2),q=I[0],Pe=I[1],ee=(0,d.useState)(0),L=(0,P.Z)(ee,2),fe=L[0],Me=L[1],te=(0,d.useState)(""),U=(0,P.Z)(te,2),v=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:"\u6240\u5C5E\u95E8\u5E97",dataIndex:"storeId",ellipsis:!0},{title:"\u64CD\u4F5C",valueType:"option",key:"option",render:function(i,r){return[(0,t.jsx)("a",{onClick:function(){A.setFieldsValue(r),f(!0)},children:"\u7F16\u8F91"}),(0,t.jsx)(y.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"})})]}}],ne=function(){f(!0),A.resetFields()},re=function(){var a=(0,g.Z)((0,m.Z)().mark(function i(r){var _,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,h.Z.MiniPageUpdate(r);case 3:_=o.sent,_.statusCode===200?(c.default.success("\u4FEE\u6539\u6210\u529F"),f(!1),p.current.reload()):c.default.error(_.errors),o.next=11;break;case 7:return o.next=9,h.Z.MiniPageAdd(r);case 9:s=o.sent,s.statusCode===200?(c.default.success("\u6DFB\u52A0\u6210\u529F"),f(!1),p.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,g.Z)((0,m.Z)().mark(function i(r){var _;return(0,m.Z)().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,h.Z.MiniPageDelete(r.id);case 2:_=M.sent,_.statusCode===200?(c.default.success("\u5220\u9664\u6210\u529F"),p.current.reload()):c.default.error(_.errors);case 4:case"end":return M.stop()}},i)}));return function(r){return a.apply(this,arguments)}}(),ie=function(){var a=(0,g.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,h.Z.GetAllStore();case 2:r=s.sent,r.isSuccess?(Q(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(){p.current.reload()},[v]),(0,t.jsxs)(x.ZP,{children:[(0,t.jsx)(K.Z,{style:{marginBottom:"10px"},children:(0,t.jsxs)("div",{className:G().table_search_item,children:[(0,t.jsx)("div",{children:"\u5F53\u524D\u95E8\u5E97\uFF1A"}),(0,t.jsx)(Z.Z,{style:{width:300},value:v,onChange:function(i){j(i)},children:R.map(function(a){return(0,t.jsx)(Option,{value:a.id,children:a.store_Name},a.id)})})]})}),(0,t.jsx)(F.ZP,{columns:ae,actionRef:p,cardBordered:!0,editable:{type:"multiple"},request:(0,g.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(v){s.next=2;break}return s.abrupt("return");case 2:return i={current:X,pageSize:q,storeId:v},s.next=5,h.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,pagination:{pageSize:5,onChange:function(i){return console.log(i)}},dateFormatter:"string",headerTitle:"\u9875\u9762\u7BA1\u7406",toolBarRender:function(){return[(0,t.jsx)(B.Z,{icon:(0,t.jsx)(b.Z,{}),type:"primary",onClick:ne,children:"\u65B0\u5EFA"},"button")]}}),(0,t.jsx)(u.Z,{title:"\u7F16\u8F91\u9875\u9762",footer:!1,visible:z,onOk:function(){return f(!1)},onCancel:function(){return f(!1)},children:(0,t.jsxs)(E.Z,{name:"basic",form:A,onFinish:re,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:"\u6240\u5C5E\u95E8\u5E97",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:R.map(function(a){return(0,t.jsx)(Option,{value:a.id,children:a.store_Name},a.id)})})}),(0,t.jsx)(E.Z.Item,{children:(0,t.jsx)(B.Z,{type:"primary",htmlType:"submit",children:"\u786E\u5B9A"})})]})})]})};D.default=$},73999:function(C,D,e){"use strict";var O=e(11849),u=e(48971);D.Z={GetAllStore:function(){return(0,u.WY)("/kitchen/api/StoreHelper/GetAllStore",{method:"GET"})},GetCosRequestURL:function(n){return(0,u.WY)("/kitchen/api/systemconfig/GetCosRequestSignURL",{method:"POST",data:n})},AddMinimaterial:function(n){return(0,u.WY)("/kitchen/api/minimaterial/add",{method:"POST",data:n})},UpdateMiniMaterial:function(n){return(0,u.WY)("/kitchen/api/minimaterial/update",{method:"POST",data:n})},MinimaterialListByStore:function(n){return(0,u.WY)("/kitchen/api/minimaterial/store",{method:"POST",data:n})},DeleteMiniMaterial:function(n){return(0,u.WY)("/kitchen/api/minimaterial/del",{method:"POST",data:{id:n}})},MiniPageAdd:function(n){return(0,u.WY)("/kitchen/api/minipage/add",{method:"POST",data:(0,O.Z)({},n)})},MiniPageDelete:function(n){return(0,u.WY)("/kitchen/api/minipage/del",{method:"POST",data:{id:n}})},MiniPageUpdate:function(n){return(0,u.WY)("/kitchen/api/minipage/update",{method:"POST",data:(0,O.Z)({},n)})},MiniPageList:function(n){return(0,u.WY)("/kitchen/api/minipage/page",{method:"POST",data:(0,O.Z)({},n)})}}}}]);