包含后厨 团餐 门店分支
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2 lines
4.8 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[2735],{1686:function(H,y,e){"use strict";e.r(y),e.d(y,{default:function(){return W}});var J=e(71194),D=e(50146),N=e(43358),E=e(34041),Q=e(47673),B=e(4107),X=e(57663),P=e(71577),k=e(62350),j=e(24565),i=e(39428),b=e(34792),d=e(48086),h=e(3182),q=e(9715),g=e(55843),x=e(2824),z=e(90631),m=e(67294),R=e(28790),$=e(16894),v=e(48971),c={page:function(l){return l.isreport=!0,(0,v.WY)("/kitchorder/api/ThirdAuthorize/Page",{method:"Post",data:l})},GetAllStore:function(){return(0,v.WY)("/kitchbase/api/store/getstorelist",{method:"GET"})},Create:function(l){return(0,v.WY)("/kitchorder/api/ThirdAuthorize/Create",{method:"Post",data:l})},Update:function(l){return(0,v.WY)("/kitchorder/api/ThirdAuthorize/Update",{method:"Post",data:l})},Del:function(l){return(0,v.WY)("/kitchorder/api/ThirdAuthorize/Del?id="+l,{method:"Post"})}},t=e(85893),O=function(){var l=(0,m.useState)(),S=(0,x.Z)(l,2),_=S[0],ee=S[1],G=(0,m.useState)([]),A=(0,x.Z)(G,2),I=A[0],M=A[1],Z=(0,m.useRef)(),U=(0,m.useState)(!1),F=(0,x.Z)(U,2),Y=F[0],C=F[1],L=g.Z.useForm(),w=(0,x.Z)(L,1),T=w[0];(0,m.useEffect)(function(){K()},[]);var K=function(){var s=(0,h.Z)((0,i.Z)().mark(function o(){var r;return(0,i.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,c.GetAllStore();case 2:r=n.sent,r.statusCode==200?M(r.data):d.default.error(r.msg||"\u83B7\u53D6\u5E97\u94FA\u5217\u8868\u5931\u8D25");case 4:case"end":return n.stop()}},o)}));return function(){return s.apply(this,arguments)}}(),V=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0},{title:"\u5F52\u5C5E\u573A\u666F",dataIndex:"storeId",ellipsis:!0,hideInSearch:!0,render:function(o,r){var u=I.find(function(n){return n.id===r.storeId});if(u)return(0,t.jsx)("div",{children:u.name})}},{title:"\u6388\u6743\u7801",dataIndex:"authorizeCode",hideInSearch:!0},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",width:200,render:function(o,r){return[(0,t.jsx)(j.Z,{title:"\u786E\u5B9A\u8981\u91CD\u65B0\u6388\u6743\u5417?",onConfirm:function(){c.Update({id:r.id}).then(function(n){n.data?(d.default.success("\u4FEE\u6539\u6210\u529F"),C(!1),Z.current.reload()):d.default.error("\u4FEE\u6539\u5931\u8D25")})},okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,t.jsx)("a",{onClick:(0,h.Z)((0,i.Z)().mark(function u(){return(0,i.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:case"end":return a.stop()}},u)})),children:"\u91CD\u65B0\u6388\u6743"},r.id)}),(0,t.jsx)(j.Z,{title:"\u786E\u8BA4\u5220\u9664\u5417?",onConfirm:function(){c.Del(r.id).then(function(n){n.data?(d.default.success("\u5220\u9664\u6210\u529F"),C(!1),Z.current.reload()):d.default.error("\u5220\u9664\u6210\u529F")})},okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,t.jsx)("a",{onClick:(0,h.Z)((0,i.Z)().mark(function u(){return(0,i.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:case"end":return a.stop()}},u)})),children:"\u5220\u9664"},r.id)})]}}];return(0,t.jsxs)(R.ZP,{header:{title:"",breadcrumb:{}},children:[(0,t.jsx)($.ZP,{headerTitle:"",actionRef:Z,rowKey:"orderFlowId",search:{labelWidth:120},toolBarRender:function(){return[(0,t.jsxs)(P.Z,{type:"primary",onClick:function(){C(!0)},children:[(0,t.jsx)(z.Z,{})," \u65B0\u5EFA"]},"create")]},columns:V,request:function(){var s=(0,h.Z)((0,i.Z)().mark(function o(r,u,n){var a;return(0,i.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,c.page(r);case 2:return a=f.sent,f.abrupt("return",{data:a.data.data,success:!0,total:a.data.total});case 4:case"end":return f.stop()}},o)}));return function(o,r,u){return s.apply(this,arguments)}}()}),(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(D.Z,{title:"\u6388\u6743",open:Y,onOk:function(){T.submit()},onCancel:function(){C(!1)},children:(0,t.jsxs)(g.Z,{form:T,preserve:!1,layout:"horizontal",labelCol:{span:4},onFinish:function(){var s=(0,h.Z)((0,i.Z)().mark(function o(r){return(0,i.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:r.id?c.Update(r).then(function(a){a.data?(d.default.success("\u4FEE\u6539\u6210\u529F"),handleModalVisible(!1),Z.current.reload()):d.default.error("\u4FEE\u6539\u5931\u8D25")}):c.Create(r).then(function(a){a.data?(C(!1),d.default.success("\u6DFB\u52A0\u6210\u529F"),Z.current.reload()):d.default.error(a.errors||"\u6DFB\u52A0\u5931\u8D25")});case 1:case"end":return n.stop()}},o)}));return function(o){return s.apply(this,arguments)}}(),children:[(0,t.jsx)(g.Z.Item,{name:"id",hidden:!0,children:(0,t.jsx)(B.Z,{})}),(0,t.jsx)(g.Z.Item,{label:"\u5F52\u5C5E\u573A\u666F",name:"storeId",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5F52\u5C5E\u573A\u666F\uFF01"}],children:(0,t.jsx)(E.Z,{allowClear:!0,placeholder:"\u8BF7\u9009\u62E9\u5F52\u5C5E\u573A\u666F",style:{width:"100%"},children:I.map(function(s){return(0,t.jsx)(Option,{value:s.id,children:s.name},s.id)})})})]})})})]})},W=O}}]);