"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[2341],{83301:function(U,T,e){e.r(T);var M=e(90228),t=e.n(M),y=e(87999),o=e.n(y),i=e(40785),m=e(7485),h=e(50959),O=e(52221),g=e(47698),I=e(45321),p=e(50159),C=e(16030),f=e(35384),r=e(75343),n=e(11527),E=function(){var j=(0,h.useRef)(),A=(0,m.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},{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(l,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(l,d){var s=function(){var x=o()(t()().mark(function P(_){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(R){var L=R.goodsId,b=R.goodsNum;return{goodsId:L,goodsNum:b}}),D.next=5,(0,i.jQ)(c);case 5:u=D.sent,g.ZP.success(_?"\u4E0A\u67B6\u6210\u529F":"\u4E0B\u67B6\u6210\u529F"),j.current&&j.current.reload();case 8:case"end":return D.stop()}},P)}));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(l,d){return[(0,n.jsx)(p.ZP,{type:"link",size:"small",hidden:!A.hasPerms("/api/goodspackages/update"),onClick:function(){m.history.push("goodsSetMeal/".concat(d.id,"/update"))},children:"\u7F16\u8F91"})]}}];return(0,n.jsx)(C._z,{children:(0,n.jsx)("div",{style:{width:"100%",float:"right"},children:(0,n.jsx)(f.Z,{actionRef:j,rowKey:"id",search:{labelWidth:120,defaultCollapsed:!1},toolBarRender:function(){return[(0,n.jsxs)(p.ZP,{type:"primary",hidden:!A.hasPerms("/api/goodspackages/add"),onClick:o()(t()().mark(function l(){return t()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:m.history.push("goodsSetMeal/0/create");case 1:case"end":return s.stop()}},l)})),children:[(0,n.jsx)(r.Z,{})," \u65B0\u5EFA"]},"add")]},request:function(){var v=o()(t()().mark(function l(d,s,x){var P,_;return t()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,(0,i.LD)(d);case 2:return P=u.sent,_=P.data,u.abrupt("return",{data:(_==null?void 0:_.records)||[],total:_==null?void 0:_.total});case 5:case"end":return u.stop()}},l)}));return function(l,d,s){return v.apply(this,arguments)}}(),columns:B},"goodsSetMealList")})})};T.default=E},40785:function(U,T,e){e.d(T,{LD:function(){return m},MI:function(){return O},Zg:function(){return C},jQ:function(){return I}});var M=e(90228),t=e.n(M),y=e(87999),o=e.n(y),i=e(7485);function m(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,i.request)("/api/goodspackages/page",{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 O(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,i.request)("/api/goodspackages/add",{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},data:n||{}}));case 1:case"end":return a.stop()}},r)})),g.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,i.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 f.apply(this,arguments)}function f(){return f=o()(t()().mark(function r(n){return t()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,i.request)("/api/goodspackages/detail",{method:"GET",headers:{"Content-Type":"application/json;charset=UTF-8"},params:n}));case 1:case"end":return a.stop()}},r)})),f.apply(this,arguments)}}}]);
