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