Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

2 řádky
15 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[5547],{85379:function(ve,A,l){"use strict";l.r(A),l.d(A,{default:function(){return be}});var k=l(57663),w=l(71577),M=l(62350),F=l(24565),c=l(39428),h=l(3182),m=l(34792),p=l(48086),y=l(2824),v=l(18106),Z=l(95562),E=l(49101),T=l(67294),B=l(16894),x=l(30381),C=l(48971);function O(r){return P.apply(this,arguments)}function P(){return P=_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/goodspracticetype/add",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),P.apply(this,arguments)}function D(r){return W.apply(this,arguments)}function W(){return W=(0,h.Z)((0,c.Z)().mark(function r(t){return(0,c.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen/api/goodspracticetype/get",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),W.apply(this,arguments)}function Ke(r){return K.apply(this,arguments)}function K(){return K=_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/goodspracticetype/edit",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),K.apply(this,arguments)}function Ne(r){return N.apply(this,arguments)}function N(){return N=_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/goodspractice/edit",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),N.apply(this,arguments)}function Ye(r){return Y.apply(this,arguments)}function Y(){return Y=_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/goodspractice/add",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),Y.apply(this,arguments)}function Ue(r){return U.apply(this,arguments)}function U(){return U=_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/goodspractice/get",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),U.apply(this,arguments)}function re(r){return L.apply(this,arguments)}function L(){return L=(0,h.Z)((0,c.Z)().mark(function r(t){return(0,c.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen/api/goodspracticerelevance/get",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),L.apply(this,arguments)}function ne(r){return z.apply(this,arguments)}function z(){return z=(0,h.Z)((0,c.Z)().mark(function r(t){return(0,c.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen/api/goodspracticerelevance/add",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),z.apply(this,arguments)}function ae(r){return H.apply(this,arguments)}function H(){return H=(0,h.Z)((0,c.Z)().mark(function r(t){return(0,c.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen/api/goodspracticerelevance/edit",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),H.apply(this,arguments)}function ge(r){return J.apply(this,arguments)}function J(){return J=(0,h.Z)((0,c.Z)().mark(function r(t){return(0,c.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen/api/goods-type/goods-types",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),J.apply(this,arguments)}function Ze(r){return Q.apply(this,arguments)}function Q(){return Q=(0,h.Z)((0,c.Z)().mark(function r(t){return(0,c.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen/api/goodspracticetype/get",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),Q.apply(this,arguments)}function Te(r){return X.apply(this,arguments)}function X(){return X=(0,h.Z)((0,c.Z)().mark(function r(t){return(0,c.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen/api/goods/goodss",{method:"Post",data:t}));case 1:case"end":return e.stop()}},r)})),X.apply(this,arguments)}function Ce(r){return q.apply(this,arguments)}function q(){return q=(0,h.Z)((0,c.Z)().mark(function r(t){return(0,c.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen/api/goodspractice/get",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),q.apply(this,arguments)}function Re(r){return _.apply(this,arguments)}function _(){return _=(0,h.Z)((0,c.Z)().mark(function r(t){return(0,c.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen//api/goodspracticerelevance/del",{method:"POST",data:t}));case 1:case"end":return e.stop()}},r)})),_.apply(this,arguments)}var Le=l(71194),ue=l(50146),ze=l(43358),S=l(34041),He=l(9715),R=l(55843),Je=l(47673),le=l(4107),u=l(85893),Se=function(t){return(0,u.jsx)(ue.Z,{width:800,open:t.createModalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){t.onCancel()},destroyOnClose:!0,children:(0,u.jsxs)(R.Z,{layout:"Vertical",labelCol:{span:6},initialValues:t.values,onFinish:t.onFinish,onCancel:t.onCancel,children:[(0,u.jsx)(R.Z.Item,{name:"id",hidden:!0,children:(0,u.jsx)(le.Z,{})}),(0,u.jsx)(R.Z.Item,{label:"\u5546\u54C1",name:"goodsId",rules:[{required:!0}],initialValue:t.values.goodsId,children:(0,u.jsx)(S.Z,{showSearch:!0,style:{width:"300px"},children:(t.Support.allGoods||[]).map(function(n,e){return(0,u.jsx)(S.Z.Option,{index:e,value:n.id,children:n.name},n.id)})})}),(0,u.jsx)(R.Z.Item,{label:"\u505A\u6CD5",name:"practiceIds",rules:[{required:!0}],initialValue:t.values.practiceIds||[],children:(0,u.jsx)(S.Z,{style:{width:"300px"},mode:"multiple",children:(t.Support.allPractice||[]).map(function(n,e){return(0,u.jsx)(S.Z.Option,{index:e,value:n.id,children:n.makeName},n.id)})})}),(0,u.jsx)(R.Z.Item,{children:(0,u.jsx)(w.Z,{type:"primary",htmlType:"submit",children:"\u4FDD\u5B58"})})]})})},we=Se,Pe=function(t){return console.log("createtypeRelevanceForm >>>>>> props",t),(0,u.jsx)(ue.Z,{width:800,visible:t.createModalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){t.onCancel()},destroyOnClose:!0,children:(0,u.jsxs)(R.Z,{layout:"Vertical",labelCol:{span:6},initialValues:t.values,onFinish:t.onFinish,onCancel:t.onCancel,children:[(0,u.jsx)(R.Z.Item,{name:"id",hidden:!0,children:(0,u.jsx)(le.Z,{})}),(0,u.jsx)(R.Z.Item,{label:"\u5546\u54C1\u7C7B\u522B",name:"goodsSmallType",rules:[{required:!0}],initialValue:t.values.goodsSmallType,children:(0,u.jsx)(S.Z,{style:{width:"300px"},children:(t.Support.allSmallType||[]).map(function(n,e){return(0,u.jsx)(S.Z.Option,{index:e,value:n.id,children:n.goodsType_Name},n.id)})})}),(0,u.jsx)(R.Z.Item,{label:"\u505A\u6CD5\u7C7B\u522B",name:"makeTypeId",rules:[{required:!0}],initialValues:t.values.practiceTypeId,children:(0,u.jsx)(S.Z,{style:{width:"300px"},children:(t.Support.allType||[]).map(function(n,e){return(0,u.jsx)(S.Z.Option,{index:e,value:n.id,children:n.typeName},n.id)})})}),function(){t.domrelevanceType==1,t.domrelevanceType==2},(0,u.jsx)(R.Z.Item,{children:(0,u.jsx)(w.Z,{type:"primary",htmlType:"submit",children:"\u4FDD\u5B58"})})]})})},xe=Pe,ie=Z.Z.TabPane,je=function(t){var n=(0,T.useRef)(),e=(0,T.useState)(!1),ce=(0,y.Z)(e,2),ee=ce[0],G=ce[1],ke=(0,T.useState)(),se=(0,y.Z)(ke,2),te=se[0],$=se[1],Oe=(0,T.useState)(),oe=(0,y.Z)(Oe,2),Qe=oe[0],V=oe[1],Ie=(0,T.useState)(),de=(0,y.Z)(Ie,2),Xe=de[0],qe=de[1],Ae=(0,T.useState)(),pe=(0,y.Z)(Ae,2),fe=pe[0],j=pe[1],Fe=(0,T.useState)([]),he=(0,y.Z)(Fe,2),_e=he[0],Ee=he[1],Be=(0,T.useState)({allType:[],allSmallType:[],allGoods:[],allPractice:[]}),me=(0,y.Z)(Be,2),b=me[0],et=me[1];function De(i){try{return ne(i).then(function(a){a.data?p.default.success("\u6DFB\u52A0\u6210\u529F"):p.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01")}),!0}catch(a){return p.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),!1}}function Ge(i){try{return ne(i).then(function(a){a.data?p.default.success("\u6DFB\u52A0\u6210\u529F"):p.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01")}),!0}catch(a){return p.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),!1}}var ye=function(){var i=(0,h.Z)((0,c.Z)().mark(function a(s){var o;return(0,c.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(o=p.default.loading("\u6B63\u5728\u5220\u9664"),s){d.next=3;break}return d.abrupt("return",!0);case 3:return d.prev=3,d.next=6,Re({id:s}).then(function(g){o(),g.data?p.default.success("\u5220\u9664\u6210\u529F\uFF0C\u5373\u5C06\u5237\u65B0"):p.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")});case 6:return d.abrupt("return",!0);case 9:return d.prev=9,d.t0=d.catch(3),o(),p.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),d.abrupt("return",!1);case 14:case"end":return d.stop()}},a,null,[[3,9]])}));return function(s){return i.apply(this,arguments)}}();function $e(i){try{return ae(i).then(function(a){a.data?p.default.success("\u914D\u7F6E\u6210\u529F"):p.default.error("\u914D\u7F6E\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),V(void 0),n.current.reload()}),!0}catch(a){return p.default.error("\u914D\u7F6E\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),!1}}function Ve(i){try{return ae(i).then(function(a){a.data?p.default.success("\u914D\u7F6E\u6210\u529F"):p.default.error("\u914D\u7F6E\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),V(void 0)}),!0}catch(a){return p.default.error("\u914D\u7F6E\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),!1}}(0,T.useEffect)(function(){var i={current:1,pagesize:99999};Ze(i).then(function(a){b.allType=a.data.data}),ge(i).then(function(a){b.allSmallType=a.data.data}),Te(i).then(function(a){b.allGoods=a.data.data}),Ce(i).then(function(a){b.allPractice=a.data.data}),D(i).then(function(a){Ee(a.data.data)})},[]);var Me=[{title:"\u89C4\u5219id",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0},{title:"\u5546\u54C1\u7C7B\u522B",dataIndex:"goodsTypeName"},{title:"\u505A\u6CD5\u7C7B\u522B",dataIndex:"makeTypeName"},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(a,s){return[(0,u.jsxs)("a",{onClick:function(){G(!0),j(s)},children:[" ","\u4FEE\u6539"]},"primary"),(0,u.jsx)(F.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){var f;ye(s.id),(f=n.current)===null||f===void 0||f.reloadAndRest()},onCancel:function(){},children:(0,u.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}],We=[{title:"\u89C4\u5219id",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0},{title:"\u5546\u54C1",dataIndex:"goodsName"},{title:"\u505A\u6CD5",dataIndex:"makeName"},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(a,s){return[(0,u.jsxs)("a",{onClick:function(){$(!0),j(s)},children:[" ","\u4FEE\u6539"]},"primary"),(0,u.jsx)(F.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){var f;ye(s.id),(f=n.current)===null||f===void 0||f.reloadAndRest()},onCancel:function(){},children:(0,u.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}];return(0,u.jsxs)(Z.Z,{defaultActiveKey:"1",children:[(0,u.jsxs)(ie,{tab:"\u51FA\u54C1\u7C7B\u522B\u4E0E\u505A\u6CD5\u7C7B\u522B\u5173\u8054",children:[(0,u.jsx)(B.ZP,{actionRef:n,rowKey:"id",search:{labelWidth:120},toolBarRender:function(){return[(0,u.jsxs)(w.Z,{type:"primary",onClick:function(){console.log("\u51FA\u54C1\u7C7B\u522B\u4E0E\u505A\u6CD5\u7C7B\u522B\u5173\u8054",ee),G(!0)},children:[(0,u.jsx)(E.Z,{})," \u6DFB\u52A0"]},"primary")]},params:{relevanceType:1},request:function(){var i=(0,h.Z)((0,c.Z)().mark(function a(s){var o,f;return(0,c.Z)().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return o=[],f=0,g.next=4,re(s).then(function(I){o=I.data.data,f=I.data.total});case 4:return g.abrupt("return",{data:o,success:!0,total:f});case 5:case"end":return g.stop()}},a)}));return function(a){return i.apply(this,arguments)}}(),modalVisible:te,columns:Me,rowSelection:{onChange:function(a,s){V(s)}}}),ee&&(0,u.jsx)(xe,{onFinish:function(){var i=(0,h.Z)((0,c.Z)().mark(function a(s){var o;return(0,c.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:s.relevanceType=1,o=!1,s.id?o=Ve(s):o=Ge(s),o&&(G(!1),j(void 0),n.current&&n.current.reload());case 4:case"end":return d.stop()}},a)}));return function(a){return i.apply(this,arguments)}}(),onCancel:function(){j(void 0),G(!1),n.current.reload()},Support:b,createModalVisible:ee,values:fe||{}})]},"1"),(0,u.jsxs)(ie,{tab:"\u51FA\u54C1\u4E0E\u505A\u6CD5\u5173\u8054",children:[(0,u.jsx)(B.ZP,{actionRef:n,rowKey:"id",search:{labelWidth:120},toolBarRender:function(){return[(0,u.jsxs)(w.Z,{type:"primary",onClick:function(){console.log("fdsew"),$(!0)},children:[(0,u.jsx)(E.Z,{})," \u6DFB\u52A0"]},"primary")]},params:{relevanceType:2},request:function(){var i=(0,h.Z)((0,c.Z)().mark(function a(s){var o,f;return(0,c.Z)().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return o=[],f=0,g.next=4,re(s).then(function(I){o=I.data.data,f=I.data.total});case 4:return g.abrupt("return",{data:o,success:!0,total:f});case 5:case"end":return g.stop()}},a)}));return function(a){return i.apply(this,arguments)}}(),modalVisible:te,columns:We,rowSelection:{onChange:function(a,s){V(s)}}}),(0,u.jsx)(we,{onFinish:function(){var i=(0,h.Z)((0,c.Z)().mark(function a(s){var o;return(0,c.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:s.relevanceType=2,o=!1,s.id?o=$e(s):o=De(s),o&&($(!1),j(void 0),n.current&&n.current.reload());case 4:case"end":return d.stop()}},a)}));return function(a){return i.apply(this,arguments)}}(),onCancel:function(){j(void 0),$(!1),n.current.reload()},Support:b,createModalVisible:te,values:fe||{}})]},"2")]})},be=je},34952:function(ve,A,l){"use strict";var k=l(22122),w=l(15105),M=l(67294),F=function(m,p){var y={};for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&p.indexOf(v)<0&&(y[v]=m[v]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Z=0,v=Object.getOwnPropertySymbols(m);Z<v.length;Z++)p.indexOf(v[Z])<0&&Object.prototype.propertyIsEnumerable.call(m,v[Z])&&(y[v[Z]]=m[v[Z]]);return y},c={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},h=M.forwardRef(function(m,p){var y=function(O){var P=O.keyCode;P===w.Z.ENTER&&O.preventDefault()},v=function(O){var P=O.keyCode,D=m.onClick;P===w.Z.ENTER&&D&&D()},Z=m.style,E=m.noStyle,T=m.disabled,B=F(m,["style","noStyle","disabled"]),x={};return E||(x=(0,k.Z)({},c)),T&&(x.pointerEvents="none"),x=(0,k.Z)((0,k.Z)({},x),Z),M.createElement("div",(0,k.Z)({role:"button",tabIndex:0,ref:p},B,{onKeyDown:y,onKeyUp:v,style:x}))});A.Z=h}}]);