(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[980],{31199:function(z,R,t){"use strict";var g=t(28991),x=t(81253),M=t(85893),j=t(67294),T=t(31649),W=["fieldProps","min","proFieldProps","max"],l=function(S,m){var v=S.fieldProps,D=S.min,o=S.proFieldProps,B=S.max,i=(0,x.Z)(S,W);return(0,M.jsx)(T.Z,(0,g.Z)({valueType:"digit",fieldProps:(0,g.Z)({min:D,max:B},v),ref:m,filedConfig:{defaultProps:{width:"100%"}},proFieldProps:o},i))};R.Z=j.forwardRef(l)},64317:function(z,R,t){"use strict";var g=t(28991),x=t(81253),M=t(85893),j=t(22270),T=t(67294),W=t(66758),l=t(31649),u=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],S=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],m=T.forwardRef(function(i,Q){var X=i.fieldProps,te=i.children,q=i.params,re=i.proFieldProps,G=i.mode,ae=i.valueEnum,y=i.request,_=i.showSearch,V=i.options,K=(0,x.Z)(i,u),N=(0,T.useContext)(W.Z);return(0,M.jsx)(l.Z,(0,g.Z)((0,g.Z)({valueEnum:(0,j.h)(ae),request:y,params:q,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,g.Z)({options:V,mode:G,showSearch:_,getPopupContainer:N.getPopupContainer},X),ref:Q,proFieldProps:re},K),{},{children:te}))}),v=T.forwardRef(function(i,Q){var X=i.fieldProps,te=i.children,q=i.params,re=i.proFieldProps,G=i.mode,ae=i.valueEnum,y=i.request,_=i.options,V=(0,x.Z)(i,S),K=(0,g.Z)({options:_,mode:G||"multiple",labelInValue:!0,showSearch:!0,showArrow:!1,autoClearSearchValue:!0,optionLabelProp:"label"},X),N=(0,T.useContext)(W.Z);return(0,M.jsx)(l.Z,(0,g.Z)((0,g.Z)({valueEnum:(0,j.h)(ae),request:y,params:q,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,g.Z)({getPopupContainer:N.getPopupContainer},K),ref:Q,proFieldProps:re},V),{},{children:te}))}),D=m,o=v,B=D;B.SearchSelect=o,B.displayName="ProFormComponent",R.Z=B},5966:function(z,R,t){"use strict";var g=t(28991),x=t(81253),M=t(85893),j=t(31649),T=["fieldProps","proFieldProps"],W=["fieldProps","proFieldProps"],l="text",u=function(D){var o=D.fieldProps,B=D.proFieldProps,i=(0,x.Z)(D,T);return(0,M.jsx)(j.Z,(0,g.Z)({valueType:l,fieldProps:o,filedConfig:{valueType:l},proFieldProps:B},i))},S=function(D){var o=D.fieldProps,B=D.proFieldProps,i=(0,x.Z)(D,W);return(0,M.jsx)(j.Z,(0,g.Z)({valueType:"password",fieldProps:o,proFieldProps:B,filedConfig:{valueType:l}},i))},m=u;m.Password=S,m.displayName="ProFormComponent",R.Z=m},63472:function(z){z.exports={card:"card___3dWIJ",anttabs:"anttabs___2_Orv",errorIcon:"errorIcon___1pp9M",anticon:"anticon___1oiIS",errorPopover:"errorPopover___CUFc7",errorListItem:"errorListItem___1hPkI",errorField:"errorField___3rSLf",editable:"editable___3cDnK"}},83341:function(z,R,t){"use strict";t.d(R,{O:function(){return g}});function g(x){x=x||32;for(var M="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz",j=M.length,T="012345678",W=T.length,l="",u=0;u0&&E.data.forEach(function(Y){Z.push({stockuint:Y.id,text:Y.name,value:Y.id,label:Y.name})}),Re(Z);case 6:case"end":return U.stop()}},p)}));return function(P){return c.apply(this,arguments)}}(),h=function(){var c=(0,v.Z)((0,u.Z)().mark(function p(P){var E,Z;return(0,u.Z)().wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return U.next=2,k.getTypeList();case 2:E=U.sent,Z=[],E.data.length>0&&E.data.forEach(function(Y){Z.push({typeid:Y.id,text:Y.name,value:Y.id,label:Y.name})}),we(Z);case 6:case"end":return U.stop()}},p)}));return function(P){return c.apply(this,arguments)}}();C(),h();function s(){k.GetDicList("BatchingType").then(function(c){var p=c.data,P={};if(c.succeeded){var E=[];p.forEach(function(Z){P[Z.code]={text:Z.remark},E.push({batchingType:Z.code,text:Z.remark,value:Z.code,label:Z.remark})}),Be(P),be(E)}})}s()},[]);var ye=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"key",hideInSearch:!0,hideInTable:!0,render:function(h,s){return(0,r.jsx)("a",{onClick:function(){pe(s),se(!0)},children:h})}},{title:"\u7269\u6599\u540D\u79F0",dataIndex:"name",ellipsis:!0,formItemProps:{rules:[{required:!0,message:"\u540D\u79F0\u4E3A\u5FC5\u586B\u9879"}]}},{title:"\u7269\u6599\u7F16\u7801",dataIndex:"code",ellipsis:!0},{title:"\u7269\u6599\u89C4\u683C",dataIndex:"specs"},{title:"\u6210\u672C\u4EF7",dataIndex:"price"},{title:"\u51C0\u6599\u7387(%)",dataIndex:"netrecovery"},{title:"\u7269\u6599\u5C5E\u6027",dataIndex:"aittribute",valueEnum:{0:{text:"\u6210\u54C1"},1:{text:"\u534A\u6210\u54C1"},2:{text:"\u6613\u8017\u54C1"}}},{title:"\u7269\u6599\u7C7B\u522B",dataIndex:"typeID",valueType:"select",fieldProps:{options:Ee}},{title:"\u5E93\u5B58\u5355\u4F4D",dataIndex:"stockUint",valueType:"select",fieldProps:{options:ge}},{title:"\u72B6\u6001",dataIndex:"status",hideInForm:!0,valueEnum:{0:{text:"\u6B63\u5E38",status:"Processing"},1:{text:"\u505C\u7528",status:"Success"}}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createAt",valueType:"date",hideInForm:!0},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(h,s){return[(0,r.jsxs)("a",{onClick:function(){n(!0),H(s)},children:[" ","\u66F4\u65B0"]}),(0,r.jsxs)("a",{onClick:function(){s.status=s.status==0?1:0,k.updateStatus(s).then(function(p){p.data&&A.current.reload()})},children:[" ",s.status==0?"\u505C\u7528":"\u542F\u7528"]},"primary"),(0,r.jsx)(W.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){k.removeProduct([s.id]).then(function(p){p.data?(m.default.success("\u5220\u9664\u6210\u529F"),A.current.reload()):m.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")})},onCancel:function(){},children:(0,r.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}];return(0,r.jsxs)(B.ZP,{children:[(0,r.jsx)(Q.ZP,{headerTitle:"\u7269\u6599\u5217\u8868",actionRef:A,rowKey:"id",search:{labelWidth:120},toolBarRender:function(){return[(0,r.jsxs)(j.Z,{type:"primary",onClick:function(){var s={code:(0,Se.O)(4)};H(s),n(!0)},children:[(0,r.jsx)(D.Z,{})," \u65B0\u5EFA"]},"primary")]},request:function(){var C=(0,v.Z)((0,u.Z)().mark(function h(s){var c,p;return(0,u.Z)().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return c=[],p=0,E.next=4,k.getpage(s).then(function(Z){c=Z.data.data,p=Z.data.total});case 4:return E.abrupt("return",{data:c,success:!0,total:p});case 5:case"end":return E.stop()}},h)}));return function(h){return C.apply(this,arguments)}}(),columns:ye,rowSelection:{onChange:function(h,s){Pe(s)}}}),(ee==null?void 0:ee.length)>0&&(0,r.jsx)(i.Z,{extra:(0,r.jsxs)("div",{children:["\u5DF2\u9009\u62E9"," ",(0,r.jsx)("a",{style:{fontWeight:600},children:ee.length})," ","\u9879 \xA0\xA0"]}),children:(0,r.jsx)(j.Z,{type:"primary",onClick:(0,v.Z)((0,u.Z)().mark(function C(){var h,s;return(0,u.Z)().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,Te(ee);case 2:Pe([]),(h=A.current)===null||h===void 0||(s=h.reloadAndRest)===null||s===void 0||s.call(h);case 4:case"end":return p.stop()}},C)})),children:"\u6279\u91CF\u5220\u9664"})}),(0,r.jsx)(xe,{dicData:F,uintListData:ge,typeListData:Ee,onFinish:function(){var C=(0,v.Z)((0,u.Z)().mark(function h(s){var c;return(0,u.Z)().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(c=!1,H({}),!s.id){P.next=8;break}return P.next=5,je(s);case 5:c=P.sent,P.next=11;break;case 8:return P.next=10,De(s);case 10:c=P.sent;case 11:c&&(n(!1),A.current&&A.current.reload()),A.current.reload();case 13:case"end":return P.stop()}},h)}));return function(h){return C.apply(this,arguments)}}(),onCancel:function(){n(!1),H({})},modalVisible:J,values:oe||{}}),(0,r.jsx)(x.Z,{width:600,visible:ce,onClose:function(){pe(void 0),se(!1)},closable:!1,children:(L==null?void 0:L.name)&&(0,r.jsx)(X.ZP,{column:2,title:L==null?void 0:L.name,request:(0,v.Z)((0,u.Z)().mark(function C(){return(0,u.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",{data:L||{}});case 1:case"end":return s.stop()}},C)})),params:{id:L==null?void 0:L.name},columns:ye})})]})},Le=Ie}}]);