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