"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[2341],{83301:function(U,T,e){e.r(T);var y=e(90228),r=e.n(y),M=e(87999),o=e.n(M),l=e(40785),h=e(7485),g=e(50959),O=e(52221),f=e(47698),I=e(45321),p=e(50159),C=e(16030),E=e(35384),s=e(75343),t=e(11527),v=function(){var j=(0,g.useRef)(),A=(0,h.useAccess)(),B=[{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,render:function(u,n){return n!=null&&n.itemType?(n==null?void 0:n.itemType)+"KW":"-"}},{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(u,n){var _=n.picture?JSON.parse(n.picture)[0]:"";return _?(0,t.jsx)(O.Z,{src:_,width:50}):""}},{title:"\u662F\u5426\u4E0A\u67B6",dataIndex:"isUp",valueType:"text",search:!1,render:function(u,n){var _=function(){var x=o()(r()().mark(function P(d){var m,i;return r()().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return m=JSON.parse(JSON.stringify(n)),m.isUp=d?1:0,m.goodsDataList=m.goodsPackagesItemsVo.map(function(R){var L=R.goodsId,b=R.goodsNum;return{goodsId:L,goodsNum:b}}),D.next=5,(0,l.jQ)(m);case 5:i=D.sent,f.ZP.success(d?"\u4E0A\u67B6\u6210\u529F":"\u4E0B\u67B6\u6210\u529F"),j.current&&j.current.reload();case 8:case"end":return D.stop()}},P)}));return function(d){return x.apply(this,arguments)}}();return(0,t.jsx)(I.Z,{checkedChildren:"\u4E0A\u67B6",unCheckedChildren:"\u4E0B\u67B6",defaultChecked:!0,onChange:_})}},{title:"\u64CD\u4F5C",dataIndex:"option",width:"220px",valueType:"option",render:function(u,n){return[(0,t.jsx)(p.ZP,{type:"link",size:"small",hidden:!A.hasPerms("/api/goodspackages/update"),onClick:function(){h.history.push("goodsSetMeal/".concat(n.id,"/update"))},children:"\u7F16\u8F91"})]}}];return(0,t.jsx)(C._z,{children:(0,t.jsx)("div",{style:{width:"100%",float:"right"},children:(0,t.jsx)(E.Z,{actionRef:j,rowKey:"id",search:{labelWidth:120,defaultCollapsed:!1},toolBarRender:function(){return[(0,t.jsxs)(p.ZP,{type:"primary",hidden:!A.hasPerms("/api/goodspackages/add"),onClick:o()(r()().mark(function u(){return r()().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:h.history.push("goodsSetMeal/0/create");case 1:case"end":return _.stop()}},u)})),children:[(0,t.jsx)(s.Z,{})," \u65B0\u5EFA"]},"add")]},request:function(){var c=o()(r()().mark(function u(n,_,x){var P,d;return r()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,l.LD)(n);case 2:return P=i.sent,d=P.data,i.abrupt("return",{data:(d==null?void 0:d.records)||[],total:d==null?void 0:d.total});case 5:case"end":return i.stop()}},u)}));return function(u,n,_){return c.apply(this,arguments)}}(),columns:B},"goodsSetMealList")})})};T.default=v},40785:function(U,T,e){e.d(T,{LD:function(){return h},MI:function(){return O},Zg:function(){return C},jQ:function(){return I}});var y=e(90228),r=e.n(y),M=e(87999),o=e.n(M),l=e(7485);function h(s){return g.apply(this,arguments)}function g(){return g=o()(r()().mark(function s(t){return r()().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:t||{}}));case 1:case"end":return a.stop()}},s)})),g.apply(this,arguments)}function O(s){return f.apply(this,arguments)}function f(){return f=o()(r()().mark(function s(t){return r()().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:t||{}}));case 1:case"end":return a.stop()}},s)})),f.apply(this,arguments)}function I(s){return p.apply(this,arguments)}function p(){return p=o()(r()().mark(function s(t){return r()().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:t||{}}));case 1:case"end":return a.stop()}},s)})),p.apply(this,arguments)}function C(s){return E.apply(this,arguments)}function E(){return E=o()(r()().mark(function s(t){return r()().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:t}));case 1:case"end":return a.stop()}},s)})),E.apply(this,arguments)}}}]);
