Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

2 righe
11 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7025,7975,1322],{77287:function(re,B,e){"use strict";e.r(B),e.d(B,{default:function(){return he}});var j=e(57663),E=e(71577),Z=e(2824),u=e(39428),V=e(34792),i=e(48086),y=e(3182),x=e(49101),b=e(67294),I=e(78009),M=e(85224),P=e(16894),H=e(79361),D=e(71194),J=e(50146),$=e(62999),k=e(54680),W=e(9715),a=e(71257),v=e(47673),S=e(4107),r=e(43358),w=e(34041),t=e(85893),te=function(l){var h=w.Z.Option,n=w.Z.OptGroup;return(0,t.jsx)(J.Z,{title:l.values.id?"\u7F16\u8F91":"\u65B0\u5EFA",width:640,visible:l.createModalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){l.onCancel()},destroyOnClose:!0,children:(0,t.jsxs)(a.Z,{preserve:!1,initialValues:l.values,onFinish:l.onFinish,children:[(0,t.jsx)(a.Z.Item,{name:"id",hidden:!0,children:(0,t.jsx)(S.Z,{})}),(0,t.jsx)(a.Z.Item,{label:"\u540D\u79F0",name:"name",rules:[{required:!0}],children:(0,t.jsx)(S.Z,{})}),(0,t.jsx)(a.Z.Item,{label:"\u7535\u8BDD",name:"phone",rules:[{required:!0}],children:(0,t.jsx)(S.Z,{})}),(0,t.jsx)(a.Z.Item,{label:"\u5DE5\u53F7",name:"number",rules:[{required:!0}],children:(0,t.jsx)(S.Z,{})}),(0,t.jsx)(a.Z.Item,{name:"shopId",label:"\u95E8\u5E97",rules:[{required:!0}],children:(0,t.jsx)(k.Z,{style:{width:"100%"},dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:l.OrgData,placeholder:"\u95E8\u5E97",treeDefaultExpandAll:!0})}),(0,t.jsx)(a.Z.Item,{name:"status",label:"\u72B6\u6001",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u72B6\u6001"}],children:(0,t.jsx)(w.Z,{placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",children:(0,t.jsxs)(n,{children:[(0,t.jsx)(w.Z.Option,{value:0,children:"\u6B63\u5E38"}),(0,t.jsx)(w.Z.Option,{value:1,children:"\u505C\u7528"}),(0,t.jsx)(w.Z.Option,{value:2,children:"\u5220\u9664"})]})})}),(0,t.jsx)(a.Z.Item,{children:(0,t.jsx)(E.Z,{type:"primary",htmlType:"submit",children:"\u4FDD\u5B58"})})]})})},ae=te,F=e(48971);function ne(d){return G.apply(this,arguments)}function G(){return G=(0,y.Z)((0,u.Z)().mark(function d(l){return(0,u.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,F.WY)("/kitchen/api/store-staff/store-staff-page",{method:"POST",data:l}));case 1:case"end":return n.stop()}},d)})),G.apply(this,arguments)}function se(d){return L.apply(this,arguments)}function L(){return L=(0,y.Z)((0,u.Z)().mark(function d(l){return(0,u.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,F.WY)("/kitchen/api/store-staff/store-staff",{method:"POST",data:l}));case 1:case"end":return n.stop()}},d)})),L.apply(this,arguments)}function ue(d){return Y.apply(this,arguments)}function Y(){return Y=(0,y.Z)((0,u.Z)().mark(function d(l){return(0,u.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,F.WY)("/kitchen\u200B/api/store-staff/store-staff",{method:"put",data:l}));case 1:case"end":return n.stop()}},d)})),Y.apply(this,arguments)}function le(d){return K.apply(this,arguments)}function K(){return K=(0,y.Z)((0,u.Z)().mark(function d(l){return(0,u.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,F.WY)("\u200B/kitchen/api/store-staff/del-store-staff",{method:"POST",data:l}));case 1:case"end":return n.stop()}},d)})),K.apply(this,arguments)}var ie=e(3408),R="message",de=function(){var d=(0,y.Z)((0,u.Z)().mark(function l(h){return(0,u.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=0,i.default.loading("\u6B63\u5728\u6DFB\u52A0",R),s.next=4,se(JSON.stringify(h)).then(function(p){return i.default.destroy(R),p.data?(i.default.success("\u6DFB\u52A0\u6210\u529F"),!0):(i.default.error("\u6DFB\u52A0\u5931\u8D25"),!1)});case 4:s.next=10;break;case 6:return s.prev=6,s.t0=s.catch(0),i.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),s.abrupt("return",!1);case 10:case"end":return s.stop()}},l,null,[[0,6]])}));return function(h){return d.apply(this,arguments)}}(),oe=function(){var d=(0,y.Z)((0,u.Z)().mark(function l(h){return(0,u.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=0,i.default.loading("\u6B63\u5728\u4FEE\u6539",R),i.default.destroy(R),s.next=5,ue(JSON.stringify(h)).then(function(p){return i.default.destroy(R),p.data?(i.default.success("\u4FEE\u6539\u6210\u529F"),!0):(i.default.error("\u4FEE\u6539\u5931\u8D25"),!1)});case 5:s.next=11;break;case 7:return s.prev=7,s.t0=s.catch(0),i.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),s.abrupt("return",!1);case 11:case"end":return s.stop()}},l,null,[[0,7]])}));return function(h){return d.apply(this,arguments)}}(),ce=function(){var d=(0,y.Z)((0,u.Z)().mark(function l(h){var n;return(0,u.Z)().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.prev=0,i.default.loading("\u6B63\u5728\u5220\u9664"),n=[],h.forEach(function(T){n.push(T.id)}),p.next=6,le(n).then(function(T){return T.data?(i.default.success("\u5220\u9664\u6210\u529F"),!0):(i.default.error("\u5220\u9664\u5931\u8D25"),!1)});case 6:p.next=12;break;case 8:return p.prev=8,p.t0=p.catch(0),i.default.error("\u5220\u9664\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),p.abrupt("return",!1);case 12:case"end":return p.stop()}},l,null,[[0,8]])}));return function(h){return d.apply(this,arguments)}}(),fe=function(){var l=(0,b.useState)(!1),h=(0,Z.Z)(l,2),n=h[0],s=h[1],p=(0,b.useState)(!1),T=(0,Z.Z)(p,2),Ce=T[0],Ee=T[1],U=(0,b.useRef)(),pe=(0,b.useState)(),z=(0,Z.Z)(pe,2),me=z[0],N=z[1],ve=(0,b.useState)([]),Q=(0,Z.Z)(ve,2),A=Q[0],X=Q[1],ge=(0,b.useState)([]),q=(0,Z.Z)(ge,2),Ze=q[0],ye=q[1],Oe=(0,b.useState)([]),_=(0,Z.Z)(Oe,2),je=_[0],Se=_[1];(0,b.useEffect)(function(){function C(){(0,ie.FM)().then(function(f){m(f.data);function m(o){for(var c in o)o[c].type==2||o[c].type==3?o[c].disabled=!1:o[c].disabled=!0,o[c].children&&m(o[c].children)}ye(f.data);var g={};O(f.data);function O(o){for(var c in o)g[o[c].disabled]=!0,g[o[c].value]={text:o[c].title},o[c].children&&O(o[c].children)}Se(g)})}C()},[]);var we=[{title:"\u4E3B\u952E",dataIndex:"id",hideInSearch:!0,hideInTable:!0,tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key"},{title:"\u540D\u79F0",dataIndex:"name",valueType:"textarea",search:!1},{title:"\u7535\u8BDD",dataIndex:"phone",valueType:"textarea",search:!1},{title:"\u804C\u5DE5\u7F16\u53F7",dataIndex:"number",valueType:"textarea",search:!1},{title:"\u5F52\u5C5E\u95E8\u5E97",dataIndex:"shopId",search:!1,valueEnum:je},{title:"\u72B6\u6001",dataIndex:"status",hideInForm:!0,search:!1,valueEnum:{0:{text:"\u6B63\u5E38",status:"Processing"},1:{text:"\u505C\u7528",status:"Success"},2:{text:"\u5220\u9664",status:"Error"}}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createAt",hideInForm:!0,search:!1},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(f,m){return[(0,t.jsx)("a",{onClick:function(){s(!0),N(m)},children:" \u66F4\u65B0"},"config")]}}];return(0,t.jsxs)(I.ZP,{children:[(0,t.jsx)(P.ZP,{headerTitle:"\u5E97\u94FA\u7C7B\u578B",actionRef:U,rowKey:"id",search:{labelWidth:120},toolBarRender:function(){return[(0,t.jsxs)(E.Z,{type:"primary",onClick:function(){s(!0)},children:[(0,t.jsx)(x.Z,{})," \u65B0\u5EFA"]},"primary")]},request:function(){var C=(0,y.Z)((0,u.Z)().mark(function f(m){var g,O;return(0,u.Z)().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return g=[],O=0,c.next=4,ne(m).then(function(ee){g=ee.data.data,O=ee.data.total});case 4:return c.abrupt("return",{data:g,success:!0,total:O});case 5:case"end":return c.stop()}},f)}));return function(f){return C.apply(this,arguments)}}(),columns:we,rowSelection:{onChange:function(f,m){X(m)}}}),(A==null?void 0:A.length)>0&&(0,t.jsx)(M.Z,{extra:(0,t.jsxs)("div",{children:["\u5DF2\u9009\u62E9"," ",(0,t.jsx)("a",{style:{fontWeight:600},children:A.length})," ","\u9879 \xA0\xA0"]}),children:(0,t.jsx)(E.Z,{onClick:(0,y.Z)((0,u.Z)().mark(function C(){var f,m;return(0,u.Z)().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return O.next=2,ce(A);case 2:X([]),(f=U.current)===null||f===void 0||(m=f.reloadAndRest)===null||m===void 0||m.call(f);case 4:case"end":return O.stop()}},C)})),children:"\u5220\u9664"})}),(0,t.jsx)(ae,{onFinish:function(){var C=(0,y.Z)((0,u.Z)().mark(function f(m){var g;return(0,u.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:g=!1,m.id?g=oe(m):g=de(m),g&&(s(!1),N(void 0),U.current.reload());case 3:case"end":return o.stop()}},f)}));return function(f){return C.apply(this,arguments)}}(),onCancel:function(){s(!1),N(void 0)},createModalVisible:n,OrgData:Ze,values:me||{}})]})},he=fe},3408:function(re,B,e){"use strict";e.d(B,{lM:function(){return V},IH:function(){return y},mm:function(){return M},eP:function(){return H},FM:function(){return k}});var j=e(39428),E=e(11849),Z=e(3182),u=e(48971);function V(a,v){return i.apply(this,arguments)}function i(){return i=(0,Z.Z)((0,j.Z)().mark(function a(v,S){return(0,j.Z)().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.abrupt("return",(0,u.WY)("/kitchen/api/sysOrg\u200B/page",{method:"GET",params:(0,E.Z)({},v)}));case 1:case"end":return w.stop()}},a)})),i.apply(this,arguments)}function y(a){return x.apply(this,arguments)}function x(){return x=(0,Z.Z)((0,j.Z)().mark(function a(v){return(0,j.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,u.WY)("/kitchen/api/sysOrg/add",{method:"POST",data:(0,E.Z)({},v)}));case 1:case"end":return r.stop()}},a)})),x.apply(this,arguments)}function b(a){return I.apply(this,arguments)}function I(){return I=_asyncToGenerator(_regeneratorRuntime().mark(function a(v){return _regeneratorRuntime().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",request("\u200B/kitchen/api\u200B/sysOrg\u200B/list",{method:"POST",data:_objectSpread({},v)}));case 1:case"end":return r.stop()}},a)})),I.apply(this,arguments)}function M(a){return P.apply(this,arguments)}function P(){return P=(0,Z.Z)((0,j.Z)().mark(function a(v){return(0,j.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,u.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/delete",{method:"POST",data:(0,E.Z)({},v)}));case 1:case"end":return r.stop()}},a)})),P.apply(this,arguments)}function H(a){return D.apply(this,arguments)}function D(){return D=(0,Z.Z)((0,j.Z)().mark(function a(v){return(0,j.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,u.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/edit",{method:"POST",data:(0,E.Z)({},v)}));case 1:case"end":return r.stop()}},a)})),D.apply(this,arguments)}function J(a){return $.apply(this,arguments)}function $(){return $=_asyncToGenerator(_regeneratorRuntime().mark(function a(v){return _regeneratorRuntime().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",request("/kitchen\u200B/api\u200B/sysOrg\u200B/detail",{method:"POST",data:_objectSpread({},v)}));case 1:case"end":return r.stop()}},a)})),$.apply(this,arguments)}function k(a){return W.apply(this,arguments)}function W(){return W=(0,Z.Z)((0,j.Z)().mark(function a(v){return(0,j.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,u.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/tree",{data:(0,E.Z)({},v)}));case 1:case"end":return r.stop()}},a)})),W.apply(this,arguments)}}}]);