|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6525,1322],{87823:function(he,N,n){"use strict";n.r(N),n.d(N,{default:function(){return ue}});var me=n(57663),W=n(71577),m=n(3182),fe=n(34792),f=n(48086),T=n(2824),ye=n(18106),K=n(51752),U=n(94043),c=n.n(U),H=n(54549),J=n(49101),y=n(67294),Q=n(78009),X=n(16894),ge=n(30381),R=n(48971);function ve(t){return C.apply(this,arguments)}function C(){return C=_asyncToGenerator(_regeneratorRuntime.mark(function t(r){return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen/api/goodspracticetype/add",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),C.apply(this,arguments)}function Te(t){return Z.apply(this,arguments)}function Z(){return Z=_asyncToGenerator(_regeneratorRuntime.mark(function t(r){return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen/api/goodspracticetype/get",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),Z.apply(this,arguments)}function Re(t){return j.apply(this,arguments)}function j(){return j=_asyncToGenerator(_regeneratorRuntime.mark(function t(r){return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen/api/goodspracticetype/edit",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),j.apply(this,arguments)}function L(t){return S.apply(this,arguments)}function S(){return S=(0,m.Z)(c().mark(function t(r){return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,R.WY)("/kitchen/api/goodspractice/edit",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),S.apply(this,arguments)}function q(t){return w.apply(this,arguments)}function w(){return w=(0,m.Z)(c().mark(function t(r){return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,R.WY)("/kitchen/api/goodspractice/add",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),w.apply(this,arguments)}function _(t){return A.apply(this,arguments)}function A(){return A=(0,m.Z)(c().mark(function t(r){return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,R.WY)("/kitchen/api/goodspractice/get",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),A.apply(this,arguments)}function Pe(t){return F.apply(this,arguments)}function F(){return F=_asyncToGenerator(_regeneratorRuntime.mark(function t(r){return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen/api/goodspracticerelevance/get",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),F.apply(this,arguments)}function xe(t){return I.apply(this,arguments)}function I(){return I=_asyncToGenerator(_regeneratorRuntime.mark(function t(r){return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen/api/goodspracticerelevance/add",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),I.apply(this,arguments)}function Ce(t){return G.apply(this,arguments)}function G(){return G=_asyncToGenerator(_regeneratorRuntime.mark(function t(r){return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen/api/goodspracticerelevance/edit",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),G.apply(this,arguments)}function Ze(t){return O.apply(this,arguments)}function O(){return O=_asyncToGenerator(_regeneratorRuntime.mark(function t(r){return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen/api/goods-type/goods-types",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),O.apply(this,arguments)}function ee(t){return k.apply(this,arguments)}function k(){return k=(0,m.Z)(c().mark(function t(r){return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,R.WY)("/kitchen/api/goodspracticetype/get",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),k.apply(this,arguments)}function je(t){return E.apply(this,arguments)}function E(){return E=_asyncToGenerator(_regeneratorRuntime.mark(function t(r){return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen/api/goods/goodss",{method:"Post",data:r}));case 1:case"end":return e.stop()}},t)})),E.apply(this,arguments)}function Se(t){return $.apply(this,arguments)}function $(){return $=_asyncToGenerator(_regeneratorRuntime.mark(function t(r){return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen/api/goodspractice/get",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),$.apply(this,arguments)}var we=n(71194),te=n(50146),Ae=n(43358),p=n(34041),Fe=n(9715),h=n(86835),Ie=n(47673),b=n(4107),a=n(85893),re=function(r){var u=(0,y.useState)(!1),e=(0,T.Z)(u,2),V=e[0],B=e[1];return(0,a.jsx)(te.Z,{width:800,visible:r.createModalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){r.onCancel()},destroyOnClose:!0,children:(0,a.jsxs)(h.Z,{layout:"Vertical",labelCol:{span:6},initialValues:r.values,onFinish:r.onFinish,onCancel:r.onCancel,children:[(0,a.jsx)(h.Z.Item,{name:"id",hidden:!0,children:(0,a.jsx)(b.Z,{})}),(0,a.jsx)(h.Z.Item,{label:"\u505A\u6CD5\u540D\u79F0",name:"makeName",children:(0,a.jsx)(b.Z,{})}),(0,a.jsx)(h.Z.Item,{label:"\u505A\u6CD5\u7C7B\u522B",name:"makeTypeId",initialValue:r.values.practiceTypeId,children:(0,a.jsx)(p.Z,{style:{width:"300px"},children:(r.TypeList||[]).map(function(d,D){return(0,a.jsx)(p.Z.Option,{index:D,value:d.id,children:d.typeName},d.typeName)})})}),(0,a.jsx)(h.Z.Item,{label:"\u505A\u6CD5\u7F16\u7801",name:"code",children:(0,a.jsx)(b.Z,{disabled:r.values.code})}),(0,a.jsx)(h.Z.Item,{label:"\u52A0\u4EF7",name:"raise",initialValue:r.values.raise||0,children:(0,a.jsxs)(p.Z,{style:{width:"300px"},children:[(0,a.jsx)(p.Z.Option,{value:0,index:0,children:"0"},0),(0,a.jsx)(p.Z.Option,{value:1,index:1,children:"1"},1)]})}),(0,a.jsx)(h.Z.Item,{label:"\u52A0\u4EF7\u65B9\u5F0F",name:"raiseType",initialValue:r.values.raiseType,children:(0,a.jsxs)(p.Z,{style:{width:"300px"},children:[(0,a.jsx)(p.Z.Option,{value:1,index:1,children:"\u6309\u51FA\u54C1\u6570\u91CF\u52A0\u4EF7"},1),(0,a.jsx)(p.Z.Option,{value:2,index:2,children:"\u52A0\u4EF7\u4E0E\u51FA\u54C1\u6570\u91CF\u65E0\u5173"},2)]})}),(0,a.jsx)(h.Z.Item,{children:(0,a.jsx)(W.Z,{type:"primary",htmlType:"submit",children:"\u4FDD\u5B58"})})]})})},ae=re,Ge=K.Z.TabPane,ne=function(r){var u=(0,y.useRef)(),e=(0,y.useState)(),V=(0,T.Z)(e,2),B=V[0],d=V[1],D=(0,y.useState)(),M=(0,T.Z)(D,2),ie=M[0],g=M[1],se=(0,y.useState)([]),Y=(0,T.Z)(se,2),le=Y[0],ce=Y[1];function oe(l){try{return q(l).then(function(s){s.data?f.default.success("\u6DFB\u52A0\u6210\u529F"):f.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01")}),!0}catch(s){return f.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),!1}}function de(l){try{return L(l).then(function(s){s.data?f.default.success("\u914D\u7F6E\u6210\u529F"):f.default.error("\u914D\u7F6E\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),g(void 0)}),!0}catch(s){return f.default.error("\u914D\u7F6E\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),!1}}(0,y.useEffect)(function(){var l={current:1,pagesize:99999};function s(){ee(l).then(function(i){ce(i.data.data)})}s()},[]);var pe=[{title:"\u89C4\u5219id",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0},{title:"\u505A\u6CD5\u540D\u79F0",dataIndex:"makeName"},{title:"\u505A\u6CD5\u7F16\u7801",dataIndex:"code"},{title:"\u505A\u6CD5\u7C7B\u522B",dataIndex:"makeTypeName"},{title:"\u52A0\u4EF7",dataIndex:"raise"},{title:"\u52A0\u4EF7\u65B9\u5F0F",dataIndex:"raiseType",render:function(s,i){return i.raiseType==1?(0,a.jsx)("label",{children:"\u6309\u51FA\u54C1\u6570\u91CF\u52A0\u4EF7"}):i.raiseType==1?(0,a.jsx)("label",{children:"\u52A0\u4EF7\u4E0E\u51FA\u54C1\u6570\u91CF\u65E0\u5173 "}):(0,a.jsx)(H.Z,{})}},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(s,i){return[(0,a.jsxs)("a",{onClick:function(){d(!0),g(i)},children:[" ","\u4FEE\u6539"]},"primary"),(0,a.jsxs)("a",{onClick:function(){i.status=i.status==0?1:0,L(i)},children:[" ",i.status==0?"\u505C\u7528":"\u542F\u7528"]},"primary")]}}];return(0,a.jsxs)(Q.ZP,{children:[(0,a.jsx)(ae,{onFinish:function(){var l=(0,m.Z)(c().mark(function s(i){var o;return c().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:o=!1,i.id?o=de(i):o=oe(i),o&&(d(!1),g(void 0),u.current&&u.current.reload());case 3:case"end":return x.stop()}},s)}));return function(s){return l.apply(this,arguments)}}(),onCancel:function(){g(void 0),d(!1),u.current.reload()},TypeList:le||[],createModalVisible:B,values:ie||{}}),(0,a.jsx)(X.ZP,{actionRef:u,rowKey:"id",search:{labelWidth:120},toolBarRender:function(){return[(0,a.jsxs)(W.Z,{type:"primary",onClick:function(){d(!0)},children:[(0,a.jsx)(J.Z,{})," \u6DFB\u52A0"]},"primary")]},request:function(){var l=(0,m.Z)(c().mark(function s(i){var o,P;return c().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return o=[],P=0,v.next=4,_(i).then(function(z){o=z.data.data,P=z.data.total});case 4:return v.abrupt("return",{data:o,success:!0,total:P});case 5:case"end":return v.stop()}},s)}));return function(s){return l.apply(this,arguments)}}(),modalVisible:B,columns:pe,rowSelection:{onChange:function(s,i){g(i)}}})]})},ue=ne}}]);
|