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

p__goods__goodsPracticeInfo.0b38925a.async.js 9.5 KiB

1 рік тому
1
  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6525,7975,1322],{87823:function(pe,N,n){"use strict";n.r(N),n.d(N,{default:function(){return ne}});var he=n(57663),W=n(71577),l=n(39428),m=n(3182),me=n(34792),f=n(48086),T=n(2824),fe=n(18106),K=n(95562),U=n(54549),H=n(49101),y=n(67294),J=n(78009),Q=n(16894),ye=n(30381),Z=n(48971);function ge(t){return x.apply(this,arguments)}function x(){return x=_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)})),x.apply(this,arguments)}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/get",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),C.apply(this,arguments)}function Te(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 w.apply(this,arguments)}function w(){return w=(0,m.Z)((0,l.Z)().mark(function t(r){return(0,l.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,Z.WY)("/kitchen/api/goodspractice/edit",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),w.apply(this,arguments)}function X(t){return S.apply(this,arguments)}function S(){return S=(0,m.Z)((0,l.Z)().mark(function t(r){return(0,l.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,Z.WY)("/kitchen/api/goodspractice/add",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),S.apply(this,arguments)}function q(t){return A.apply(this,arguments)}function A(){return A=(0,m.Z)((0,l.Z)().mark(function t(r){return(0,l.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,Z.WY)("/kitchen/api/goodspractice/get",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),A.apply(this,arguments)}function Ze(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 Re(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 Pe(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 xe(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 _(t){return k.apply(this,arguments)}function k(){return k=(0,m.Z)((0,l.Z)().mark(function t(r){return(0,l.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,Z.WY)("/kitchen/api/goodspracticetype/get",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),k.apply(this,arguments)}function Ce(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 je(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),ee=n(50146),Se=n(43358),p=n(34041),Ae=n(9715),h=n(55843),Fe=n(47673),b=n(4107),a=n(85893),te=function(r){var u=(0,y.useState)(!1),e=(0,T.Z)(u,2),V=e[0],B=e[1];return(0,a.jsx)(ee.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"})})]})})},re=te,Ie=K.Z.TabPane,ae=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),ue=M[0],g=M[1],ie=(0,y.useState)([]),Y=(0,T.Z)(ie,2),se=Y[0],ce=Y[1];function le(c){try{return X(c).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 oe(c){try{return L(c).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 c={current:1,pagesize:99999};function s(){_(c).then(function(i){ce(i.data.data)})}s()},[]);var de=[{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)(U.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)(J.ZP,{children:[(0,a.jsx)(re,{onFinish:function(){var c=(0,m.Z)((0,l.Z)().mark(function s(i){var o;return(0,l.Z)().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:o=!1,i.id?o=oe(i):o=le(i),o&&(d(!1),g(void 0),u.current&&u.current.reload());case 3:case"end":return P.stop()}},s)}));return function(s){return c.apply(this,arguments)}}(),onCancel:function(){g(void 0),d(!1),u.current.reload()},TypeList:se||[],createModalVisible:B,values:ue||{}}),(0,a.jsx)(Q.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)(H.Z,{})," \u6DFB\u52A0"]},"primary")]},request:function(){var c=(0,m.Z)((0,l.Z)().mark(function s(i){var o,R;return(0,l.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return o=[],R=0,v.next=4,q(i).then(function(z){o=z.data.data,R=z.data.total});case 4:return v.abrupt("return",{data:o,success:!0,total:R});case 5:case"end":return v.stop()}},s)}));return function(s){return c.apply(this,arguments)}}(),modalVisible:B,columns:de,rowSelection:{onChange:function(s,i){g(i)}}})]})},ne=ae}}]);