包含后厨 团餐 门店分支
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 

2 рядки
3.4 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[451],{81445:function(L,g,e){"use strict";e.r(g),e.d(g,{default:function(){return Y}});var M=e(71194),P=e(50146),Q=e(47673),j=e(4107),U=e(57663),S=e(71577),X=e(62350),T=e(24565),w=e(34792),i=e(48086),d=e(39428),v=e(3182),b=e(9715),m=e(55843),Z=e(2824),y=e(67294),R=e(49101),A=e(28790),B=e(16894),p=e(48971);function D(s){return(0,p.WY)("/storemanagement/api/appid/getappidpage",{method:"post",data:s})}function $(s){return(0,p.WY)("/storemanagement/api/appid/add",{method:"post",data:s})}function E(s){return(0,p.WY)("/storemanagement/api/appid/delete",{method:"post",data:s})}function O(s){return(0,p.WY)("/storemanagement/api/appid/update",{method:"post",data:s})}var t=e(85893),W=function(){var h=(0,y.useRef)(),V=m.Z.useForm(),z=(0,Z.Z)(V,1),x=z[0],G=(0,y.useState)(!1),F=(0,Z.Z)(G,2),J=F[0],f=F[1],K=(0,y.useState)({}),C=(0,Z.Z)(K,2),k=C[0],N=C[1],H=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684key",hideInSearch:!0,hideInTable:!0},{title:"APPID",dataIndex:"appId",valueType:"textarea",hideInSearch:!0},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",width:300,render:function(o,n){return[(0,t.jsx)("a",{onClick:(0,v.Z)((0,d.Z)().mark(function l(){return(0,d.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:x.setFieldsValue(n),N(n),f(!0);case 3:case"end":return a.stop()}},l)})),children:"\u7F16\u8F91"},n.id),(0,t.jsx)(T.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F",onConfirm:function(){var r=[n.id];E(r).then(function(a){a.data?(i.default.success("\u5220\u9664\u6210\u529F"),h.current.reload()):i.default.error(a.errors||"\u5220\u9664\u5931\u8D25")})},okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,t.jsx)("a",{children:"\u5220\u9664"},n.id)})]}}];return(0,t.jsxs)(A.ZP,{header:{title:"",breadcrumb:{}},children:[(0,t.jsx)(B.ZP,{toolBarRender:function(){return(0,t.jsxs)(S.Z,{type:"primary",onClick:function(){f(!0)},children:[(0,t.jsx)(R.Z,{})," \u65B0\u5EFA"]},"primary")},headerTitle:"",actionRef:h,rowKey:"id",search:!1,request:function(){var u=(0,v.Z)((0,d.Z)().mark(function o(n){var l,r;return(0,d.Z)().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return l=[],r=0,c.next=4,D(JSON.stringify(n)).then(function(I){l=I.data.data,r=I.data.total});case 4:return c.abrupt("return",{data:l,success:!0,total:r});case 5:case"end":return c.stop()}},o)}));return function(o){return u.apply(this,arguments)}}(),columns:H,pagination:{defaultPageSize:10}}),(0,t.jsx)(P.Z,{open:J,onOk:function(){x.submit()},onCancel:function(){f(!1)},children:(0,t.jsxs)(m.Z,{form:x,preserve:!1,layout:"horizontal",labelCol:{span:4},onFinish:function(){var u=(0,v.Z)((0,d.Z)().mark(function o(n){return(0,d.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:n.id?O(n).then(function(a){a.data?(i.default.success("\u4FEE\u6539\u6210\u529F"),f(!1),h.current.reload()):i.default.error(a.errors||"\u4FEE\u6539\u5931\u8D25")}):$(n).then(function(a){a.data?(i.default.success("\u6DFB\u52A0\u6210\u529F"),f(!1),h.current.reload()):i.default.error(a.errors||"\u6DFB\u52A0\u5931\u8D25")});case 1:case"end":return r.stop()}},o)}));return function(o){return u.apply(this,arguments)}}(),children:[(0,t.jsx)(m.Z.Item,{name:"id",hidden:!0,children:(0,t.jsx)(j.Z,{})}),(0,t.jsx)("br",{}),(0,t.jsx)(m.Z.Item,{name:"appId",label:"APPID",rules:[{required:!0,max:500}],children:(0,t.jsx)(j.Z,{placeholder:"\u8BF7\u8F93\u5165appid"})})]})})]})},Y=W}}]);