You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2 lines
6.5 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),A=e(71577),_e=e(58024),y=e(91894),le=e(43358),Z=e(34041),m=e(39428),oe=e(34792),c=e(48086),g=e(3182),de=e(62350),K=e(24565),me=e(9715),E=e(55843),P=e(2824),x=e(16894),F=e(78009),b=e(49101),o=e(67294),M=e(73999),Y=e(93352),G=e.n(Y),t=e(85893),$=function(){var p=(0,o.useRef)(),N=(0,o.useState)(!1),S=(0,P.Z)(N,2),z=S[0],f=S[1],k=E.Z.useForm(),V=(0,P.Z)(k,1),B=V[0],H=(0,o.useState)([]),T=(0,P.Z)(H,2),R=T[0],Q=T[1],J=(0,o.useState)(1),W=(0,P.Z)(J,2),X=W[0],Ee=W[1],w=(0,o.useState)(10),I=(0,P.Z)(w,2),q=I[0],Pe=I[1],ee=(0,o.useState)(0),L=(0,P.Z)(ee,2),fe=L[0],he=L[1],te=(0,o.useState)(""),j=(0,P.Z)(te,2),v=j[0],U=j[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(){B.setFieldsValue(r),f(!0)},children:"\u7F16\u8F91"}),(0,t.jsx)(K.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),B.resetFields()},re=function(){var a=(0,g.Z)((0,m.Z)().mark(function i(r){var _,s;return(0,m.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(!r.id){d.next=7;break}return d.next=3,M.Z.MiniPageUpdate(r);case 3:_=d.sent,_.statusCode===200?(c.default.success("\u4FEE\u6539\u6210\u529F"),f(!1),p.current.reload()):c.default.error(_.errors),d.next=11;break;case 7:return d.next=9,M.Z.MiniPageAdd(r);case 9:s=d.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 d.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(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,M.Z.MiniPageDelete(r.id);case 2:_=h.sent,_.statusCode===200?(c.default.success("\u5220\u9664\u6210\u529F"),p.current.reload()):c.default.error(_.errors);case 4:case"end":return h.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,M.Z.GetAllStore();case 2:r=s.sent,r.isSuccess?(Q(r.data),U(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,o.useEffect)(function(){ie()},[]),(0,o.useEffect)(function(){p.current.reload()},[v]),(0,t.jsxs)(F.ZP,{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:"\u5F53\u524D\u95E8\u5E97\uFF1A"}),(0,t.jsx)(Z.Z,{style:{width:300},value:v,onChange:function(i){U(i)},children:R.map(function(a){return(0,t.jsx)(Option,{value:a.id,children:a.store_Name},a.id)})})]})}),(0,t.jsx)(x.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,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,pagination:{pageSize:5,onChange:function(i){return console.log(i)}},dateFormatter:"string",headerTitle:"\u9875\u9762\u7BA1\u7406",toolBarRender:function(){return[(0,t.jsx)(A.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)},bodyStyle:{padding:"32px 40px 1px 48px"},children:(0,t.jsxs)(E.Z,{name:"basic",form:B,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.jsxs)(E.Z.Item,{children:[(0,t.jsx)(A.Z,{htmlType:"button",style:{float:"right",left:10},onClick:function(){return f(!1)},children:"\u53D6\u6D88"}),(0,t.jsx)(A.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})]})]})})]})};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)})}}}}]);