選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

2 行
25 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8099,1322],{52953:function(){},98712:function(ye,K,u){"use strict";u.r(K),u.d(K,{default:function(){return Ue}});var fe=u(57663),pe=u(71577),B=u(11849),n=u(39428),Ke=u(34792),x=u(48086),y=u(3182),M=u(2824),Ye=u(18106),Ce=u(95562),Ze=u(49101),w=u(67294),Ie=u(78009),P=u(48971);function we(r){return Y.apply(this,arguments)}function Y(){return Y=(0,y.Z)((0,n.Z)().mark(function r(t){return(0,n.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,P.WY)("/kitchen/api/Store/GetStoreList",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),Y.apply(this,arguments)}function ze(r){return z.apply(this,arguments)}function z(){return z=_asyncToGenerator(_regeneratorRuntime().mark(function r(t){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen/api/select/GetCokingWorkList"));case 1:case"end":return e.stop()}},r)})),z.apply(this,arguments)}function ke(r){return _.apply(this,arguments)}function _(){return _=(0,y.Z)((0,n.Z)().mark(function r(t){return(0,n.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,P.WY)("\u200B\u200B/kitchen/api/Store/GetStoreGoods",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),_.apply(this,arguments)}function Fe(r){return J.apply(this,arguments)}function J(){return J=(0,y.Z)((0,n.Z)().mark(function r(t){return(0,n.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,P.WY)("/kitchen/api/Store/UpdateStoreGood",{method:"put",data:t}));case 1:case"end":return e.stop()}},r)})),J.apply(this,arguments)}function De(r){return V.apply(this,arguments)}function V(){return V=(0,y.Z)((0,n.Z)().mark(function r(t){return(0,n.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,P.WY)("/kitchen/api/goods/stopgoods",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),V.apply(this,arguments)}function je(r){return X.apply(this,arguments)}function X(){return X=(0,y.Z)((0,n.Z)().mark(function r(t){return(0,n.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,P.WY)("/kitchen/api/Store/UpdateStoreGood",{method:"put",data:t}));case 1:case"end":return e.stop()}},r)})),X.apply(this,arguments)}function _e(r){return H.apply(this,arguments)}function H(){return H=_asyncToGenerator(_regeneratorRuntime().mark(function r(t){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen/api/store-info/store-good",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),H.apply(this,arguments)}function Je(r){return Q.apply(this,arguments)}function Q(){return Q=_asyncToGenerator(_regeneratorRuntime().mark(function r(t){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen/api/store-info/del-store-good",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),Q.apply(this,arguments)}function Ve(){return q.apply(this,arguments)}function q(){return q=_asyncToGenerator(_regeneratorRuntime().mark(function r(){var t;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t={current:1,pageSize:1e3,goods_Enable:0},e.abrupt("return",request("/kitchen/api/goods/goodss",{method:"Post",data:t}));case 2:case"end":return e.stop()}},r)})),q.apply(this,arguments)}function Xe(r){return request("/kitchen//api/Store/StoreGoodsAllUpdate",{method:"post",data:r})}function He(r){return request("/kitchen/api/log/request-log-page",{method:"post",data:r})}function he(r){return ee.apply(this,arguments)}function ee(){return ee=(0,y.Z)((0,n.Z)().mark(function r(t){return(0,n.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,P.WY)("/kitchen/api/FoodMenu/GetShopFoodMenuPage",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),ee.apply(this,arguments)}function Qe(r){return te.apply(this,arguments)}function te(){return te=_asyncToGenerator(_regeneratorRuntime().mark(function r(t){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen/api/FoodMenu/GetFoodMenuGoodsPage_V2",{method:"POST",data:_objectSpread({},t)}));case 1:case"end":return e.stop()}},r)})),te.apply(this,arguments)}function Ge(r){return re.apply(this,arguments)}function re(){return re=(0,y.Z)((0,n.Z)().mark(function r(t){return(0,n.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,P.WY)("/kitchen/api/Device/GetDeviceInfoPage",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),re.apply(this,arguments)}function ve(r){return ne.apply(this,arguments)}function ne(){return ne=(0,y.Z)((0,n.Z)().mark(function r(t){return(0,n.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,P.WY)("/kitchen/api/goodes/AddGoodDevice",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),ne.apply(this,arguments)}function xe(r,t){return ae.apply(this,arguments)}function ae(){return ae=(0,y.Z)((0,n.Z)().mark(function r(t,l){return(0,n.Z)().wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return k.abrupt("return",(0,P.WY)("/kitchen/api/goodes/GetGoodDevice?foodId=".concat(t,"&storeId=").concat(l),{method:"GET"}));case 1:case"end":return k.stop()}},r)})),ae.apply(this,arguments)}function Oe(r){return se.apply(this,arguments)}function se(){return se=(0,y.Z)((0,n.Z)().mark(function r(t){return(0,n.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,P.WY)("/kitchen/api/FoodMenu/GetFoodMenuInfoPage",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),se.apply(this,arguments)}function Ee(r){return ue.apply(this,arguments)}function ue(){return ue=(0,y.Z)((0,n.Z)().mark(function r(t){return(0,n.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,P.WY)("/kitchen/api/FoodMenu/StoreAddFoodMenuNew",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),ue.apply(this,arguments)}var oe=u(16894),qe=u(71194),et=u(77883),tt=u(9715),rt=u(47673),nt=u(43358),c=u(85893),at=function(t){var l=_Select.Option,e=_Select.OptGroup,k=useState([]),m=_slicedToArray(k,2),E=m[0],b=m[1],O=useState([]),h=_slicedToArray(O,2),I=h[0],g=h[1];return _jsx(_Modal,{title:t.values.id?"\u7F16\u8F91":"\u65B0\u5EFA",width:640,visible:t.createModalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){t.onCancel()},destroyOnClose:!0,children:_jsxs(_Form,{layout:"vertical",preserve:!1,initialValues:t.values,onFinish:t.onFinish,children:[_jsx(_Form.Item,{name:"id",hidden:!0,children:_jsx(_Input,{})}),_jsx(_Form.Item,{label:"\u4EF7\u683C",name:"price",rules:[{required:!0}],children:_jsx(_InputNumber,{placeholder:"\u4EF7\u683C",min:0})}),_jsx(_Form.Item,{label:"\u4F1A\u5458\u4EF7\u683C",name:"vipPrice",rules:[{required:!0}],children:_jsx(_InputNumber,{placeholder:"\u4EF7\u683C",min:0})}),_jsx(_Form.Item,{label:"\u72B6\u6001",name:"status",rules:[{required:!0}],children:_jsxs(_Select,{placeholder:"\u72B6\u6001",children:[_jsx(l,{value:1,children:"\u4E0B\u67B6"}),_jsx(l,{value:0,children:"\u4E0A\u67B6"})]})}),_jsx(_Form.Item,{children:_jsx(_Button,{type:"primary",htmlType:"submit",children:"\u4FDD\u5B58"})})]})})},st=null,ut=u(57338),ot=u(98858),it=function(t){var l=useRef(),e=useState({}),k=_slicedToArray(e,2),m=k[0],E=k[1],b=useState(!1),O=_slicedToArray(b,2),h=O[0],I=O[1],g=function(){var s=_asyncToGenerator(_regeneratorRuntime().mark(function i(a){return _regeneratorRuntime().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:E({ip:a.ip,refererUrl:a.refererUrl,requestUrl:a.requestURL,parameters:a.requestData,returnResult:a.resultData});case 1:case"end":return j.stop()}},i)}));return function(a){return s.apply(this,arguments)}}(),S=new Map;S.set(!0,{text:"\u5F02\u5E38",status:"Error"}),S.set(!1,{text:"\u6B63\u5E38",status:"Success"});var d=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684key",hideInSearch:!0,hideInTable:!0},{title:"\u64CD\u4F5C\u4EBA",dataIndex:"name",valueType:"textarea"},{title:"\u64CD\u4F5C\u8BF4\u660E",dataIndex:"methodName",valueType:"textarea",hideInSearch:!0},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createAt",valueType:"date",hideInForm:!0},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(i,a){return[_jsx("a",{onClick:_asyncToGenerator(_regeneratorRuntime().mark(function C(){return _regeneratorRuntime().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,g(a);case 2:I(!0);case 3:case"end":return A.stop()}},C)})),children:"\u8BE6\u60C5"},a.id)]}}],o=useIntl();return _jsxs(PageContainer,{children:[_jsx(ProTable,{search:!1,headerTitle:"\u64CD\u4F5C\u65E5\u5FD7",actionRef:l,rowKey:"id",request:function(){var s=_asyncToGenerator(_regeneratorRuntime().mark(function i(a){var C,j;return _regeneratorRuntime().wrap(function($){for(;;)switch($.prev=$.next){case 0:return C=[],j=0,a.value=t.storeId,a.method=["AddStoreGoodAsync","DelStoreGoodAsync","UpdateStoreGoodsAsync"],$.next=6,GetRequestLogPageAsync(JSON.stringify(a)).then(function(L){C=L.data.data,j=L.data.total});case 6:return $.abrupt("return",{data:C,success:!0,total:j});case 7:case"end":return $.stop()}},i)}));return function(i){return s.apply(this,arguments)}}(),columns:d,pagination:{defaultPageSize:10}}),_jsxs(_Drawer,{title:"\u8BE6\u60C5",placement:"right",size:"large",onClose:function(){I(!1)},visible:h,children:[_jsxs(_Descriptions,{column:1,children:[_jsx(_Descriptions.Item,{label:"\u64CD\u4F5CIP",children:_jsx(Field,{text:m.ip})}),_jsx(_Descriptions.Item,{label:"\u53C2\u8003\u5730\u5740",children:_jsx(Field,{text:m.refererUrl})}),_jsx(_Descriptions.Item,{label:"\u8BF7\u6C42\u5730\u5740",children:_jsx(Field,{text:m.requestUrl})})]}),_jsxs(_Descriptions,{children:[_jsxs(_Descriptions.Item,{label:"\u8BF7\u6C42\u6570\u636E",children:[_jsx("a",{onClick:function(){var i=document.createElement("input");i.value=m.parameters,document.body.appendChild(i),i.select(),document.execCommand("Copy"),_message.success("\u590D\u5236\u6210\u529F"),i.remove()},children:_jsx(CopyOutlined,{})}),_jsx("div",{style:{width:"220px",overflow:"scroll",overflowX:"auto"},children:_jsx(Field,{text:m.parameters,valueType:"jsonCode"})})]}),_jsxs(_Descriptions.Item,{label:"\u8FD4\u56DE\u6570\u636E",children:[_jsx("a",{onClick:function(){var i=document.createElement("input");i.value=m.returnResult,document.body.appendChild(i),i.select(),document.execCommand("Copy"),_message.success("\u590D\u5236\u6210\u529F"),i.remove()},children:_jsx(CopyOutlined,{})}),_jsx("div",{style:{width:"400px",overflow:"scroll",overflowX:"auto"},children:_jsx(Field,{text:m.returnResult,valueType:"jsonCode"})})]})]})]},"1")]})},lt=null,N=u(50146),dt=u(59250),Te=u(13013),ct=u(49111),me=u(19650),ft=u(62350),ie=u(24565),ge=u(85986),Me=u(4107),W=u(55843),le=u(34041),de="message",be=function(t){var l=le.Z.Option,e=W.Z.useForm(),k=(0,M.Z)(e,1),m=k[0],E=function(){t.goods&&m.setFieldsValue(t.goods)},b=function(){var O=(0,y.Z)((0,n.Z)().mark(function h(){var I,g;return(0,n.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,m.validateFields();case 2:return I=d.sent,d.prev=3,x.default.loading("\u6B63\u5728\u4FEE\u6539",de),x.default.destroy(de),d.next=8,je((0,B.Z)((0,B.Z)({},t.goods),I));case 8:g=d.sent,x.default.destroy(de),g.statusCode===200?(x.default.success("\u4FEE\u6539\u6210\u529F"),t.onOk()):x.default.success("\u4FEE\u6539\u5931\u8D25"),d.next=16;break;case 13:d.prev=13,d.t0=d.catch(3),x.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01");case 16:case"end":return d.stop()}},h,null,[[3,13]])}));return function(){return O.apply(this,arguments)}}();return(0,w.useEffect)(function(){E()},[]),(0,c.jsx)(N.Z,{title:"\u7F16\u8F91\u3010".concat(t.goods.goods_Name,"\u3011"),width:640,visible:t.open,onOk:b,onCancel:t.onCancel,destroyOnClose:!0,children:(0,c.jsxs)(W.Z,{layout:"vertical",form:m,children:[(0,c.jsx)(W.Z.Item,{name:"id",hidden:!0,children:(0,c.jsx)(Me.Z,{})}),(0,c.jsx)(W.Z.Item,{label:"\u4EF7\u683C",name:"price",rules:[{required:!0}],children:(0,c.jsx)(ge.Z,{placeholder:"\u4EF7\u683C",min:0})}),(0,c.jsx)(W.Z.Item,{label:"\u4F1A\u5458\u4EF7\u683C",name:"vipPrice",rules:[{required:!0}],children:(0,c.jsx)(ge.Z,{placeholder:"\u4EF7\u683C",min:0})}),(0,c.jsx)(W.Z.Item,{label:"\u72B6\u6001",name:"status",rules:[{required:!0}],children:(0,c.jsxs)(le.Z,{placeholder:"\u72B6\u6001",children:[(0,c.jsx)(l,{value:1,children:"\u4E0B\u67B6"}),(0,c.jsx)(l,{value:0,children:"\u4E0A\u67B6"})]})})]})})},Pe=be,pt="message",Re=function(t){var l=(0,w.useState)([]),e=(0,M.Z)(l,2),k=e[0],m=e[1],E=(0,w.useState)([]),b=(0,M.Z)(E,2),O=b[0],h=b[1],I=function(){var d=(0,y.Z)((0,n.Z)().mark(function o(){var s,i;return(0,n.Z)().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return s=[],O.forEach(function(j){s.push({deviceId:j})}),C.next=4,ve({foodMenuId:t.foodMenu.id,foods:t.goods.goodsId,isDevice:t.isDevice,deviceIds:s});case 4:i=C.sent,i.statusCode===200?(x.default.success("\u7ED1\u5B9A\u6210\u529F\uFF01"),t.onOk()):x.default.error(JSON.stringify(i.errors)||"\u5546\u54C1\u7ED1\u5B9A\u8BBE\u5907\u5931\u8D25");case 6:case"end":return C.stop()}},o)}));return function(){return d.apply(this,arguments)}}(),g=function(){var d=(0,y.Z)((0,n.Z)().mark(function o(){var s,i;return(0,n.Z)().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,Ge({current:1,pageSize:999,storeId:t.storeId});case 2:i=C.sent,i.statusCode===200&&(s=i.data)!==null&&s!==void 0&&s.data?(i.data.data.forEach(function(j){j.label=j.deviceName,j.value=j.id}),m(i.data.data)):x.default.error(JSON.stringify(i.errors)||"\u83B7\u53D6\u8BBE\u5907\u5217\u8868\u5931\u8D25");case 4:case"end":return C.stop()}},o)}));return function(){return d.apply(this,arguments)}}(),S=function(){var d=(0,y.Z)((0,n.Z)().mark(function o(){var s;return(0,n.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(!(t.goods&&t.storeId)){a.next=5;break}return a.next=3,xe(t.goods.goodsId,t.storeId);case 3:s=a.sent,s.statusCode===200&&h(s.data);case 5:case"end":return a.stop()}},o)}));return function(){return d.apply(this,arguments)}}();return(0,w.useEffect)(function(){g(),S()},[]),(0,c.jsx)(N.Z,{title:"\u3010".concat(t.goods.goods_Name,"\u3011\u7ED1\u5B9A\u8BBE\u5907"),width:640,bodyStyle:{height:"300px"},visible:t.open,onOk:I,onCancel:t.onCancel,destroyOnClose:!0,children:(0,c.jsx)(le.Z,{mode:"multiple",allowClear:!0,style:{width:"100%"},placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907\uFF01",onChange:h,options:k,value:O})})},Ae=Re,$e=function(t){var l=(0,w.useRef)(),e=(0,w.useState)(!1),k=(0,M.Z)(e,2),m=k[0],E=k[1],b=(0,w.useState)(),O=(0,M.Z)(b,2),h=O[0],I=O[1],g=(0,w.useState)(!1),S=(0,M.Z)(g,2),d=S[0],o=S[1],s=(0,w.useState)([]),i=(0,M.Z)(s,2),a=i[0],C=i[1],j=(0,w.useState)(0),A=(0,M.Z)(j,2),$=A[0],L=A[1],U=function(){var G=(0,y.Z)((0,n.Z)().mark(function F(f,D){var Z;return(0,n.Z)().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(!(f.key=="1"||f.key=="2")){p.next=5;break}L(f.key),o(!0),p.next=13;break;case 5:if(I(D),f.key!="0"){p.next=13;break}return console.log(h),p.next=10,ve({foodMenuId:h.foodMenuId,foods:h.goodsId,deviceIds:[],isDevice:f.key});case 10:Z=p.sent,console.log(Z),Z.statusCode===200?(x.default.success("\u4FEE\u6539\u6210\u529F\uFF01"),l.current.reload()):x.default.error(JSON.stringify(Z.errors)||"\u4FEE\u6539\u5931\u8D25");case 13:case"end":return p.stop()}},F)}));return function(f,D){return G.apply(this,arguments)}}(),ce=[{title:"\u4E3B\u952E",dataIndex:"id",hideInSearch:!0,hideInTable:!0,tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key"},{title:"\u5546\u54C1",dataIndex:"goods_Name",valueType:"textarea"},{title:"\u5546\u54C1\u4EF7\u683C",dataIndex:"price",valueType:"money",hideInSearch:!0},{title:"\u5546\u54C1\u4F1A\u5458\u4EF7\u683C",dataIndex:"vipPrice",valueType:"money",hideInSearch:!0},{title:"\u5236\u4F5C\u65B9\u5F0F",dataIndex:"isDevice",valueEnum:{0:{text:"\u5E97\u94FA",status:"Processing"},1:{text:"\u8BBE\u5907",status:"Success"},2:{text:"\u8BBE\u5907\u626B\u7801",status:"Warning"}}},{title:"\u72B6\u6001",dataIndex:"status",valueEnum:{0:{text:"\u4E0A\u67B6",status:"Processing"},1:{text:"\u4E0B\u67B6",status:"Success"}}},{title:"\u4F30\u6E05",dataIndex:"stopSales",valueEnum:{0:{text:"\u9500\u552E",status:"Processing"},1:{text:"\u4F30\u6E05",status:"Success"}}},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(F,f){return[(0,c.jsx)("a",{onClick:function(){I(f),E(!0)},children:"\u7F16\u8F91"},"update"),(0,c.jsx)(ie.Z,{title:"\u786E\u5B9A\u8981".concat(f.stopSales==0?"\u4F30\u6E05":"\u9500\u552E","\u5417\uFF1F"),onConfirm:(0,y.Z)((0,n.Z)().mark(function D(){var Z,v,p;return(0,n.Z)().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return Z=0,f.stopSales==0?Z=1:Z=0,v=[{goodsId:f.foodId,storeId:f.storeId,StopSales:Z}],T.next=5,De(v);case 5:p=T.sent,p.statusCode===200&&p.data?(x.default.success("\u64CD\u4F5C\u6210\u529F\uFF01"),l.current.reload()):x.default.error(JSON.stringify(p.errors)||"\u64CD\u4F5C\u5931\u8D25");case 7:case"end":return T.stop()}},D)})),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,c.jsx)("a",{onClick:(0,y.Z)((0,n.Z)().mark(function D(){return(0,n.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:case"end":return v.stop()}},D)})),children:f.stopSales==0?"\u4F30\u6E05":"\u9500\u552E"})},"stopSales"),(0,c.jsx)(ie.Z,{title:"\u786E\u5B9A\u8981".concat(f.status==0?"\u4E0B\u67B6":"\u4E0A\u67B6","\u5417\uFF1F"),onConfirm:(0,y.Z)((0,n.Z)().mark(function D(){var Z;return(0,n.Z)().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return f.status=f.status==0?1:0,p.next=3,Fe(f);case 3:Z=p.sent,Z.data?(l.current.reload(),x.default.success("\u64CD\u4F5C\u6210\u529F\uFF01")):x.default.error(JSON.stringify(Z.errors)||"\u64CD\u4F5C\u5931\u8D25");case 5:case"end":return p.stop()}},D)})),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,c.jsx)("a",{children:f.status==0?"\u4E0B\u67B6":"\u4E0A\u67B6"})},"status"),(0,c.jsx)(Te.Z,{menu:{items:a,selectable:!0,onClick:U,defaultSelectedKeys:[]},trigger:["click"],children:(0,c.jsx)("a",{onClick:function(Z){U(Z,f)},children:(0,c.jsx)(me.Z,{children:"\u5236\u4F5C\u65B9\u5F0F"})})}),(0,c.jsx)("a",{onClick:function(){P.m8.push({pathname:"/store/storeAddGoodsInfo",query:{isAdd:!1,values:f,storeId:t.storeId}})},children:"\u52A0\u8D2D\u5546\u54C1"},"config")]}}];return(0,w.useEffect)(function(){C([{key:"1",label:"\u8BBE\u5907\u5236\u4F5C"},{key:"0",label:"\u5E97\u94FA\u5236\u4F5C"},{key:"2",label:"\u8BBE\u5907\u626B\u7801\u5236\u4F5C"}])},[]),(0,c.jsxs)(N.Z,{destroyOnClose:!0,footer:null,width:1200,title:t.foodMenu.name,visible:t.open,onCancel:t.onCancel,children:[(0,c.jsx)(oe.ZP,{columns:ce,actionRef:l,pagination:{pageSize:10},request:(0,y.Z)((0,n.Z)().mark(function G(){var F,f,D,Z,v,p=arguments;return(0,n.Z)().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:if(f=p.length>0&&p[0]!==void 0?p[0]:{},D=p.length>1?p[1]:void 0,Z=p.length>2?p[2]:void 0,!(t.storeId&&(F=t.foodMenu)!==null&&F!==void 0&&F.id)){T.next=12;break}return T.next=6,ke((0,B.Z)((0,B.Z)({},f),{},{goodsName:f.goods_Name,storeId:t.storeId,foodMenuId:t.foodMenu.id}));case 6:if(v=T.sent,v.statusCode!==200){T.next=11;break}return T.abrupt("return",{data:v.data.data,success:!0,total:v.data.total});case 11:return T.abrupt("return",[]);case 12:return T.abrupt("return",[]);case 13:case"end":return T.stop()}},G)})),rowKey:"id",headerTitle:"\u5546\u54C1\u5217\u8868"}),m&&h&&(0,c.jsx)(Pe,{open:m,goods:h,onCancel:function(){return E(!1)},onOk:function(){l.current.reload(),E(!1)}}),d&&(0,c.jsx)(Ae,{open:d,goods:h,foodMenu:t.foodMenu,storeId:t.storeId,isDevice:$,onCancel:function(){return o(!1)},onOk:function(){l.current.reload(),o(!1)}})]})},Be=$e,Se=u(86582),Le=function(t){var l=(0,w.useRef)(),e=(0,w.useState)([]),k=(0,M.Z)(e,2),m=k[0],E=k[1],b=[{title:"\u83DC\u8C31\u540D\u79F0",dataIndex:"name"},{title:"\u83DC\u8C31\u7F16\u7801",dataIndex:"code",hideInSearch:!0},{title:"\u83DC\u8C31\u6392\u5E8F",dataIndex:"sort",hideInSearch:!0}],O=function(){var I=(0,y.Z)((0,n.Z)().mark(function g(){var S;return(0,n.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Ee({foodMenuIds:m,storeId:t.storeId});case 2:S=o.sent,S.statusCode===200?(x.default.success("\u7ED1\u5B9A\u6210\u529F\uFF01"),t.onOk()):x.default.error(S.errors||"\u7ED1\u5B9A\u83DC\u8C31\u5931\u8D25");case 4:case"end":return o.stop()}},g)}));return function(){return I.apply(this,arguments)}}(),h=function(){var I=(0,y.Z)((0,n.Z)().mark(function g(){var S,d,o,s;return(0,n.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(t.storeId){a.next=2;break}return a.abrupt("return",[]);case 2:return a.next=4,he({current:1,pageSize:999,storeId:t.storeId});case 4:S=a.sent,S.statusCode===200&&(s=[],(d=S.data)===null||d===void 0||(o=d.data)===null||o===void 0||o.forEach(function(C){s.push(C.id)}),E(s));case 6:case"end":return a.stop()}},g)}));return function(){return I.apply(this,arguments)}}();return(0,w.useEffect)(function(){h()},[]),(0,c.jsx)(N.Z,{destroyOnClose:!0,width:1200,title:"\u7ED1\u5B9A\u83DC\u8C31",visible:t.open,onOk:O,onCancel:t.onCancel,children:(0,c.jsx)(oe.ZP,{columns:b,actionRef:l,pagination:{pageSize:10},request:(0,y.Z)((0,n.Z)().mark(function I(){var g,S,d,o,s=arguments;return(0,n.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(g=s.length>0&&s[0]!==void 0?s[0]:{},S=s.length>1?s[1]:void 0,d=s.length>2?s[2]:void 0,!t.storeId){a.next=12;break}return a.next=6,Oe((0,B.Z)({},g));case 6:if(o=a.sent,o.statusCode!==200){a.next=11;break}return a.abrupt("return",{data:o.data.data,success:!0,total:o.data.total});case 11:return a.abrupt("return",[]);case 12:return a.abrupt("return",[]);case 13:case"end":return a.stop()}},I)})),rowSelection:{type:"checkbox",selectedRowKeys:m,onSelect:function(g,S){var d=(0,Se.Z)(m),o=d.findIndex(function(s){return s===g.id});S?o<0&&d.push(g.id):o>-1&&d.splice(o,1),E(d)},onSelectAll:function(g,S,d){var o=(0,Se.Z)(m);g?S.forEach(function(s){if(!!s){var i=o.findIndex(function(a){return a===s.id});i<0&&o.push(s.id)}}):d.forEach(function(s){var i=o.findIndex(function(a){return a===s.id});i>-1&&o.splice(i,1)}),E(o)}},tableAlertOptionRender:function(){return(0,c.jsx)(me.Z,{size:16,children:(0,c.jsx)(ie.Z,{title:"\u6B64\u64CD\u4F5C\u4F1A\u53D6\u6D88\u6240\u6709\u9009\u4E2D\u9879\uFF0C\u786E\u5B9A\u8981\u53D6\u6D88\u5417\uFF1F",onConfirm:function(){return E([])},okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,c.jsx)("a",{children:"\u53D6\u6D88\u9009\u62E9"})})})},rowKey:"id",headerTitle:"\u83DC\u8C31\u5217\u8868"})})},We=Le,ht=Ce.Z.TabPane,vt="message",Ne=function(t){var l=(0,w.useRef)(),e=(0,w.useState)([]),k=(0,M.Z)(e,2),m=k[0],E=k[1],b=(0,w.useState)(),O=(0,M.Z)(b,2),h=O[0],I=O[1],g=(0,w.useState)(!1),S=(0,M.Z)(g,2),d=S[0],o=S[1],s=(0,w.useState)(),i=(0,M.Z)(s,2),a=i[0],C=i[1],j=(0,w.useState)(!1),A=(0,M.Z)(j,2),$=A[0],L=A[1],U=function(){var G=(0,y.Z)((0,n.Z)().mark(function F(){var f,D;return(0,n.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,we({current:1,pageSize:999});case 2:f=v.sent,f.statusCode===200?((D=f.data)===null||D===void 0||D.forEach(function(p){p.value=p.id,p.label=p.name}),f.data.length>0&&I(f.data[0].id),E(f.data)):x.default.error(JSON.stringify(f.errors)||"\u83B7\u53D6\u95E8\u5E97\u5217\u8868\u5931\u8D25\uFF01");case 4:case"end":return v.stop()}},F)}));return function(){return G.apply(this,arguments)}}(),ce=[{title:"\u5E97\u94FA",dataIndex:"storeId",valueType:"select",hideInTable:!0,fieldProps:{options:m,value:h,onChange:function(F){I(F)}}},{title:"\u83DC\u8C31\u540D\u79F0",dataIndex:"name",hideInSearch:!0},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(F,f){return[(0,c.jsx)("a",{onClick:function(){C(f),o(!0)},children:"\u83DC\u8C31\u5546\u54C1"},"food-menu-list")]}}];return(0,w.useEffect)(function(){U()},[]),(0,w.useEffect)(function(){h&&l.current&&l.current.reload()},[h]),(0,c.jsxs)(Ie.ZP,{children:[(0,c.jsx)(oe.ZP,{columns:ce,actionRef:l,pagination:{pageSize:10},request:(0,y.Z)((0,n.Z)().mark(function G(){var F,f,D,Z,v=arguments;return(0,n.Z)().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:if(F=v.length>0&&v[0]!==void 0?v[0]:{},f=v.length>1?v[1]:void 0,D=v.length>2?v[2]:void 0,h){R.next=5;break}return R.abrupt("return",[]);case 5:return R.next=7,he((0,B.Z)((0,B.Z)({},F),{},{storeId:h}));case 7:if(Z=R.sent,Z.statusCode!==200){R.next=10;break}return R.abrupt("return",{data:Z.data.data,success:!0,total:Z.data.total});case 10:return R.abrupt("return",[]);case 11:case"end":return R.stop()}},G)})),rowKey:"id",headerTitle:"\u83DC\u8C31\u5217\u8868",toolBarRender:function(){return[(0,c.jsx)(pe.Z,{icon:(0,c.jsx)(Ze.Z,{}),onClick:function(){L(!0)},type:"primary",children:"\u5173\u8054\u52A0\u76DF\u5546\u83DC\u8C31"},"button")]}}),d&&h&&a&&(0,c.jsx)(Be,{foodMenu:a,open:d,storeId:h,onCancel:function(){return o(!1)},onOk:function(){return o(!1)}}),$&&h&&(0,c.jsx)(We,{open:$,storeId:h,onCancel:function(){return L(!1)},onOk:function(){var F;L(!1),(F=l.current)===null||F===void 0||F.reload()}})]})},Ue=Ne},98858:function(ye,K,u){"use strict";var fe=u(38663),pe=u.n(fe),B=u(52953),n=u.n(B)}}]);