"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[2341],{83301:function(R,P,e){e.r(P);var y=e(90228),t=e.n(y),M=e(87999),o=e.n(M),l=e(40785),T=e(7485),m=e(50959),O=e(52221),h=e(47698),I=e(45321),p=e(50159),C=e(16030),g=e(35384),r=e(75343),n=e(11527),f=function(){var j=(0,m.useRef)(),U=[{title:"ID",dataIndex:"id",valueType:"text",search:!1},{title:"\u5957\u9910\u540D\u79F0",dataIndex:"packagesName",valueType:"text",search:!0},{title:"\u529F\u7387",dataIndex:"itemType",valueType:"text",search:!1},{title:"\u9500\u552E\u4EF7\u683C",dataIndex:"salePrice",valueType:"text",search:!1},{title:"\u5229\u6DA6",dataIndex:"profit",valueType:"text",search:!1},{title:"\u5E93\u5B58",dataIndex:"stock",valueType:"text",search:!1},{title:"\u9500\u91CF",dataIndex:"sales",valueType:"text",search:!1},{title:"\u5546\u54C1\u4E3B\u56FE",dataIndex:"picture",valueType:"text",search:!1,render:function(i,d){var s=d.picture?JSON.parse(d.picture)[0]:"";return s?(0,n.jsx)(O.Z,{src:s,width:50}):""}},{title:"\u662F\u5426\u4E0A\u67B6",dataIndex:"isUp",valueType:"text",search:!1,render:function(i,d){var s=function(){var x=o()(t()().mark(function v(_){var c,u;return t()().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return c=JSON.parse(JSON.stringify(d)),c.isUp=_?1:0,c.goodsDataList=c.goodsPackagesItemsVo.map(function(A){var B=A.goodsId,L=A.goodsNum;return{goodsId:B,goodsNum:L}}),D.next=5,(0,l.jQ)(c);case 5:u=D.sent,h.ZP.success(_?"\u4E0A\u67B6\u6210\u529F":"\u4E0B\u67B6\u6210\u529F"),j.current&&j.current.reload();case 8:case"end":return D.stop()}},v)}));return function(_){return x.apply(this,arguments)}}();return(0,n.jsx)(I.Z,{checkedChildren:"\u4E0A\u67B6",unCheckedChildren:"\u4E0B\u67B6",defaultChecked:!0,onChange:s})}},{title:"\u64CD\u4F5C",dataIndex:"option",width:"220px",valueType:"option",render:function(i,d){return[(0,n.jsx)(p.ZP,{type:"link",size:"small",onClick:function(){T.history.push("goodsSetMeal/".concat(d.id,"/update"))},children:"\u7F16\u8F91"},"api/sys/menu/update")]}}];return(0,n.jsx)(C._z,{children:(0,n.jsx)("div",{style:{width:"100%",float:"right"},children:(0,n.jsx)(g.Z,{actionRef:j,rowKey:"id",search:{labelWidth:120,defaultCollapsed:!1},toolBarRender:function(){return[(0,n.jsxs)(p.ZP,{type:"primary",onClick:o()(t()().mark(function i(){return t()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:T.history.push("goodsSetMeal/0/create");case 1:case"end":return s.stop()}},i)})),children:[(0,n.jsx)(r.Z,{})," \u65B0\u5EFA"]},"add")]},request:function(){var E=o()(t()().mark(function i(d,s,x){var v,_;return t()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,(0,l.LD)(d);case 2:return v=u.sent,_=v.data,u.abrupt("return",{data:(_==null?void 0:_.records)||[],total:_==null?void 0:_.total});case 5:case"end":return u.stop()}},i)}));return function(i,d,s){return E.apply(this,arguments)}}(),columns:U},"goodsSetMealList")})})};P.default=f},40785:function(R,P,e){e.d(P,{LD:function(){return T},MI:function(){return O},Zg:function(){return C},jQ:function(){return I}});var y=e(90228),t=e.n(y),M=e(87999),o=e.n(M),l=e(7485);function T(r){return m.apply(this,arguments)}function m(){return m=o()(t()().mark(function r(n){return t()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,l.request)("/api/goodspackages/page",{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},data:n||{}}));case 1:case"end":return a.stop()}},r)})),m.apply(this,arguments)}function O(r){return h.apply(this,arguments)}function h(){return h=o()(t()().mark(function r(n){return t()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,l.request)("/api/goodspackages/add",{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},data:n||{}}));case 1:case"end":return a.stop()}},r)})),h.apply(this,arguments)}function I(r){return p.apply(this,arguments)}function p(){return p=o()(t()().mark(function r(n){return t()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,l.request)("/api/goodspackages/update",{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},data:n||{}}));case 1:case"end":return a.stop()}},r)})),p.apply(this,arguments)}function C(r){return g.apply(this,arguments)}function g(){return g=o()(t()().mark(function r(n){return t()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,l.request)("/api/goodspackages/detail",{method:"GET",headers:{"Content-Type":"application/json;charset=UTF-8"},params:n}));case 1:case"end":return a.stop()}},r)})),g.apply(this,arguments)}}}]);
