Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 

2 рядки
15 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[5547],{85379:function(me,A,l){"use strict";l.r(A),l.d(A,{default:function(){return je}});var k=l(57663),P=l(71577),M=l(62350),E=l(24565),c=l(39428),h=l(3182),y=l(34792),p=l(48086),m=l(2824),v=l(18106),Z=l(36166),F=l(49101),T=l(67294),B=l(53779),x=l(30381),C=l(48971);function O(r){return w.apply(this,arguments)}function w(){return w=_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)})),w.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 te(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 re(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 ne(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 ve(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 ge(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 Ze(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 Te(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 Ce(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),ae=l(50146),ze=l(43358),S=l(34041),He=l(9715),R=l(55843),Je=l(47673),ue=l(4107),u=l(85893),Re=function(t){return(0,u.jsx)(ae.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)(ue.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)(P.Z,{type:"primary",htmlType:"submit",children:"\u4FDD\u5B58"})})]})})},Se=Re,Pe=function(t){return(0,u.jsx)(ae.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)(ue.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)(P.Z,{type:"primary",htmlType:"submit",children:"\u4FDD\u5B58"})})]})})},we=Pe,le=Z.Z.TabPane,xe=function(t){var n=(0,T.useRef)(),e=(0,T.useState)(),ie=(0,m.Z)(e,2),be=ie[0],G=ie[1],ke=(0,T.useState)(),ce=(0,m.Z)(ke,2),ee=ce[0],$=ce[1],Oe=(0,T.useState)(),se=(0,m.Z)(Oe,2),Qe=se[0],V=se[1],Ie=(0,T.useState)(),oe=(0,m.Z)(Ie,2),Xe=oe[0],qe=oe[1],Ae=(0,T.useState)(),de=(0,m.Z)(Ae,2),pe=de[0],j=de[1],Ee=(0,T.useState)([]),fe=(0,m.Z)(Ee,2),_e=fe[0],Fe=fe[1],Be=(0,T.useState)({allType:[],allSmallType:[],allGoods:[],allPractice:[]}),he=(0,m.Z)(Be,2),b=he[0],et=he[1];function De(i){try{return re(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 re(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,Ce({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 ne(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 ne(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};ge(i).then(function(a){b.allType=a.data.data}),ve(i).then(function(a){b.allSmallType=a.data.data}),Ze(i).then(function(a){b.allGoods=a.data.data}),Te(i).then(function(a){b.allPractice=a.data.data}),D(i).then(function(a){Fe(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)(E.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)(E.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.jsx)(Se,{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:ee,values:pe||{}}),(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=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:be,values:pe||{}}),(0,u.jsx)(le,{tab:"\u51FA\u54C1\u7C7B\u522B\u4E0E\u505A\u6CD5\u7C7B\u522B\u5173\u8054",style:{float:"left"},children:(0,u.jsx)(B.ZP,{actionRef:n,rowKey:"id",search:{labelWidth:120},toolBarRender:function(){return[(0,u.jsxs)(P.Z,{type:"primary",onClick:function(){G(!0)},children:[(0,u.jsx)(F.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,te(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:ee,columns:Me,rowSelection:{onChange:function(a,s){V(s)}}})},"1"),(0,u.jsx)(le,{tab:"\u51FA\u54C1\u4E0E\u505A\u6CD5\u5173\u8054",style:{float:"left"},children:(0,u.jsx)(B.ZP,{actionRef:n,rowKey:"id",search:{labelWidth:120},toolBarRender:function(){return[(0,u.jsxs)(P.Z,{type:"primary",onClick:function(){$(!0)},children:[(0,u.jsx)(F.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,te(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:ee,columns:We,rowSelection:{onChange:function(a,s){V(s)}}})},"2")]})},je=xe},34952:function(me,A,l){"use strict";var k=l(22122),P=l(15105),M=l(67294),E=function(y,p){var m={};for(var v in y)Object.prototype.hasOwnProperty.call(y,v)&&p.indexOf(v)<0&&(m[v]=y[v]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Z=0,v=Object.getOwnPropertySymbols(y);Z<v.length;Z++)p.indexOf(v[Z])<0&&Object.prototype.propertyIsEnumerable.call(y,v[Z])&&(m[v[Z]]=y[v[Z]]);return m},c={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},h=M.forwardRef(function(y,p){var m=function(O){var w=O.keyCode;w===P.Z.ENTER&&O.preventDefault()},v=function(O){var w=O.keyCode,D=y.onClick;w===P.Z.ENTER&&D&&D()},Z=y.style,F=y.noStyle,T=y.disabled,B=E(y,["style","noStyle","disabled"]),x={};return F||(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:m,onKeyUp:v,style:x}))});A.Z=h}}]);