|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[5462],{34676:function(ht,he,a){"use strict";a.r(he),a.d(he,{default:function(){return Tt}});var Ie=a(58024),m=a(91894),x=a(11849),j=a(43185),w=a(93009),We=a(77576),re=a(12028),gt=a(77883),ne=a(85986),ft=a(49111),oe=a(19650),vt=a(57663),N=a(71577),ke=a(48736),ue=a(27049),Ne=a(62999),se=a(54680),ge=a(39428),fe=a(34792),P=a(48086),le=a(3182),Ye=a(9715),_=a(55843),p=a(2824),ve=a(47673),Q=a(4107),ye=a(43358),be=a(34041),Se=a(35556),Re=a(75899),ie=a(49101),Ee=a(84391),de=a(6700),Ae=a(28790),l=a(67294),ze=a(94184),Be=a(71194),s=a(85893),_e=function(r){var V,K=_Select.Option,L=_Select.OptGroup;return _jsx(_Modal,{title:"\u5173\u8054\u5546\u54C1\u914D\u65B9",width:640,visible:r.createModalVisible,bodyStyle:{padding:"32px 40px 1px 48px"},footer:null,onCancel:function(){r.onCancel()},maskClosable:!1,destroyOnClose:!0,children:_jsxs(_Form,{labelCol:{span:4},layout:"horizontal",preserve:!1,onFinish:r.onFinish,children:[_jsx(_Form.Item,{name:"bomId",label:"\u914D\u65B9\u4FE1\u606F",rules:[{required:!0,message:"\u914D\u65B9\u4FE1\u606F"}],children:_jsx(_Select,{showSearch:!0,mode:"multiple",optionFilterProp:"children",placeholder:"\u8BF7\u9009\u914D\u65B9\u4FE1\u606F",children:(V=r.Bomdata)===null||V===void 0?void 0:V.map(function(C,B){return _jsx(K,{index:B,value:C.id,children:C.name},C.id)})})}),_jsxs(_Form.Item,{children:[_jsx(_Button,{htmlType:"button",style:{float:"right",left:10},onClick:r.onCancel,children:"\u53D6\u6D88"}),_jsx(_Button,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})]})]})})},yt=null,Te=a(88983),bt=a(71153),xe=function(r){var V=_Select.Option,K=_Select.OptGroup,L=useState([]),C=_slicedToArray(L,2),B=C[0],$=C[1],Y=useState([]),E=_slicedToArray(Y,2),G=E[0],A=E[1],z=useState([]),M=_slicedToArray(z,2),H=M[0],D=M[1],T=_Form.useForm(),g=_slicedToArray(T,1),y=g[0],Z=useState(""),S=_slicedToArray(Z,2),O=S[0],X=S[1],q=useRef(null),He=function(c){X(c.target.value)},$e=function(c){if(c.preventDefault(),O.length==0)_message.error("\u8BF7\u8F93\u5165\u540D\u79F0");else{var f={name:O};AddBomType(f).then(function(v){v.succeeded?(_message.success("\u6DFB\u52A0\u6210\u529F"),r.initTypeList(),X("")):_message.error(v.errors)})}};useEffect(function(){if(console.log("111111111"),console.log(r.defaultmatedata),y.setFieldsValue({bomName:r.goodsname}),r.defaultmatedata){var h=[];r.defaultmatedata.forEach(function(c,f){var v={id:f,batchingId:c,dosage:0};h.push(v)}),D(h.map(function(c){return c.id})),A(h)}},[r]);var Ze=[{title:"\u7269\u6599\u540D\u79F0",dataIndex:"batchingId",formItemProps:function(c,f){var v=f.rowIndex;return{rules:v>1?[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]:[]}},valueType:"select",fieldProps:{showSearch:!0,options:r.matedata.map(function(h,c){return{label:h.name,value:h.id}})},width:"25%"},{title:"\u7528\u91CF",dataIndex:"dosage",valueType:"digit",width:"15%"},{title:"\u64CD\u4F5C",valueType:"option",width:"15%",render:function(){return null}}],Je=function(){y.validateFields().then(function(c){var f=!0,v=c;console.log(G),B.length==0?(f=!1,_message.error("\u8BF7\u9009\u62E9\u5546\u54C1\u5C5E\u6027")):v.shuxing=B,G.length==0?(f=!1,_message.error("\u8BF7\u9009\u62E9\u7269\u6599")):v.mate=G.map(function(J){return{batchingId:J.batchingId,dosage:J.dosage}}),f&&(y.resetFields(),r.onFinish(v),A([]))}).catch(function(c){_message.error("\u8BF7\u586B\u5199\u5FC5\u586B\u4FE1\u606F")})},Qe=function(c){for(var f=c.target,v=f.name,J=f.value,W="",I=_toConsumableArray(B),ee=0;ee<r.goodsAttriburteData.length;ee++)v==="radiogroup"+ee&&(I[ee]=J);r.goodsAttriburteData.forEach(function(Ue){for(var Ve=function(Ge){var ae;k=(ae=Ue.goodsAttributeValueList.find(function(Ke){return Ke.goodsAttributeValuId==I[Ge]}))===null||ae===void 0?void 0:ae.attributeValue,k&&(W=W+k,Ge<I.length-1&&(W=W+"-"))},te=0;te<I.length;te++){var k;Ve(te)}}),y.setFieldsValue({bomName:r.goodsname+"("+W+")"}),$(I)};return _jsxs(_Modal,{title:"\u65B0\u5EFA\u914D\u65B9",width:1040,visible:r.handleCreateoodsBomModalVisible,bodyStyle:{padding:"32px 40px 1px 48px"},okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:Je,onCancel:function(){r.onCancel()},maskClosable:!1,destroyOnClose:!0,children:[_jsxs(_Form,{layout:"horizontal",preserve:!1,form:y,children:[_jsx(_Form.Item,{name:"bomName",label:"\u914D\u65B9\u540D\u79F0",rules:[{required:!0,message:"\u914D\u65B9\u540D\u79F0"}],children:_jsx(_Input,{placeholder:"\u8BF7\u8F93\u5165\u914D\u65B9\u540D\u79F0"})}),_jsx(_Form.Item,{name:"bomTypeList",rules:[{required:!0,message:"\u914D\u65B9\u5206\u7C7B"}],label:"\u914D\u65B9\u5206\u7C7B",children:_jsx(_Select,{style:{width:"100%"},mode:"tags",placeholder:"\u8BF7\u9009\u914D\u65B9\u5206\u7C7B",options:r.bomTypeData,dropdownRender:function(c){return _jsxs(_Fragment,{children:[c,_jsx(_Divider,{style:{margin:"8px 0"}}),_jsxs(_Space,{style:{padding:"0 8px 4px"},children:[_jsx(_Input,{placeholder:"\u8BF7\u8F93\u5165\u914D\u65B9\u5206\u7C7B",ref:q,value:O,onChange:He,onKeyDown:function(v){return v.stopPropagation()}}),_jsx(_Button,{type:"text",icon:_jsx(PlusOutlined,{}),onClick:$e,children:"\u65B0\u589E"})]})]})}})}),_jsx(_Form.Item,{name:"bomType",label:"\u914D\u65B9\u7C7B\u578B",initialValue:"1",rules:[{required:!0,message:"\u914D\u65B9\u7C7B\u578B"}],children:_jsx(_Select,{placeholder:"\u8BF7\u9009\u914D\u65B9\u7C7B\u578B",onChange:function(c){y.setFieldsValue({bomType:c})},children:_jsxs(K,{children:[_jsx(_Select.Option,{value:"1",children:"\u4E3B\u6599\u914D\u65B9"}),_jsx(_Select.Option,{value:"0",children:"\u8F85\u6599\u914D\u65B9"})]})})})]}),_jsxs("span",{children:[_jsx("span",{style:{color:"red",marginRight:3},children:"*"}),"\u5546\u54C1\u5C5E\u6027"]}),r.goodsAttriburteData==null?"":r.goodsAttriburteData.map(function(h,c){return _jsx("div",{style:{marginLeft:80},children:_jsxs("div",{children:[_jsxs("span",{style:{marginRight:10},children:[" ",_jsx(_Tag,{color:"blue",children:h.attributeName}),"\uFF1A"]}),_jsx("span",{children:_jsx(_Radio.Group,{name:"radiogroup"+c,buttonStyle:"solid",size:"small",onChange:Qe,children:h.goodsAttributeValueList.map(function(f,v){return _jsx(_Radio.Button,{name:v,value:f.goodsAttributeValuId,style:{marginRight:22,marginTop:16},children:f.attributeValue})})})})]})})}),_jsx(EditableProTable,{headerTitle:_jsxs("span",{children:[_jsx("span",{style:{color:"red",marginRight:3},children:"*"}),"\u914D\u65B9\u8BE6\u60C5"]}),columns:Ze,rowKey:"id",value:G,onChange:A,recordCreatorProps:{newRecordType:"dataSource",record:function(){return{id:Date.now()}}},editable:{type:"multiple",editableKeys:H,actionRender:function(c,f,v){return[v.delete,v.Button]},onValuesChange:function(c,f){A(f)},onDelete:function(){var h=_asyncToGenerator(_regeneratorRuntime().mark(function f(v,J){return _regeneratorRuntime().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:console.log(v),console.log(J);case 2:case"end":return I.stop()}},f)}));function c(f,v){return h.apply(this,arguments)}return c}(),onChange:D}})]})},St=null,we=function(r){var V=_Select.Option,K=_Select.OptGroup,L=_Form.useForm(),C=_slicedToArray(L,1),B=C[0],$=useState(""),Y=_slicedToArray($,2),E=Y[0],G=Y[1],A=useRef(null);useEffect(function(){r.BomId&&GetByidBomList(r.BomId).then(function(D){var T=D.data;B.setFieldsValue({bomName:T.name,bomTypeList:T.bomTypeIds,bomType:T.isMain?"1":"0"})})});var z=function(T){G(T.target.value)},M=function(T){if(T.preventDefault(),E==0)_message.error("\u8BF7\u8F93\u5165\u540D\u79F0");else{var g={name:E};AddBomType(g).then(function(y){y.succeeded?(_message.success("\u6DFB\u52A0\u6210\u529F"),r.initTypeList(),G("")):_message.error(y.errors)})}},H=function(){r.onUpdateBomSave(B)};return _jsx(_Modal,{title:"\u7F16\u8F91\u914D\u65B9",width:640,visible:r.UpdateBomVisible,bodyStyle:{padding:"32px 40px 1px 48px"},okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:H,onCancel:function(){r.onUpdateBomCancel()},maskClosable:!1,destroyOnClose:!0,children:_jsxs(_Form,{labelCol:{span:4},layout:"horizontal",form:B,preserve:!1,children:[_jsx(_Form.Item,{name:"bomName",label:"\u914D\u65B9\u540D\u79F0",rules:[{required:!0,message:"\u914D\u65B9\u540D\u79F0"}],children:_jsx(_Input,{placeholder:"\u8BF7\u8F93\u5165\u914D\u65B9\u540D\u79F0"})}),_jsx(_Form.Item,{name:"bomTypeList",rules:[{required:!0,message:"\u914D\u65B9\u5206\u7C7B"}],label:"\u914D\u65B9\u5206\u7C7B",children:_jsx(_Select,{style:{width:"100%"},mode:"tags",placeholder:"\u8BF7\u9009\u914D\u65B9\u5206\u7C7B",options:r.bomTypeData,dropdownRender:function(T){return _jsxs(_Fragment,{children:[T,_jsx(_Divider,{style:{margin:"8px 0"}}),_jsxs(_Space,{style:{padding:"0 8px 4px"},children:[_jsx(_Input,{placeholder:"\u8BF7\u8F93\u5165\u914D\u65B9\u5206\u7C7B",ref:A,value:E,onChange:z,onKeyDown:function(y){return y.stopPropagation()}}),_jsx(_Button,{type:"text",icon:_jsx(PlusOutlined,{}),onClick:M,children:"\u65B0\u589E"})]})]})}})}),_jsx(_Form.Item,{name:"bomType",label:"\u914D\u65B9\u7C7B\u578B",initialValue:"1",rules:[{required:!0,message:"\u914D\u65B9\u7C7B\u578B"}],children:_jsx(_Select,{placeholder:"\u8BF7\u9009\u914D\u65B9\u7C7B\u578B",onChange:function(T){B.setFieldsValue({bomType:T})},children:_jsxs(K,{children:[_jsx(_Select.Option,{value:"1",children:"\u4E3B\u6599\u914D\u65B9"}),_jsx(_Select.Option,{value:"0",children:"\u8F85\u6599\u914D\u65B9"})]})})})]})})},Bt=null,Ce=function(r){var V=_Select.Option,K=_Select.OptGroup,L=useState([]),C=_slicedToArray(L,2),B=C[0],$=C[1],Y=useState([]),E=_slicedToArray(Y,2),G=E[0],A=E[1],z=_Form.useForm(),M=_slicedToArray(z,1),H=M[0];useEffect(function(){var g=[];r.BomId&&GetByidBomList(r.BomId).then(function(y){var Z=y.data;Z.bomEntry.length>0&&Z.bomEntry.map(function(S){var O={id:S.id,bomId:S.bomId,batchingId:S.batchingId,dosage:S.bomQty};console.log("item",O),g.push(O)}),console.log("soredata",g),g.length>0&&(A(g.map(function(S){return S.id})),$(g))})},[r]);var D=[{title:"\u4E3B\u952E",dataIndex:"id",key:"id",hideInTable:!0,hideInSearch:!0,tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key"},{title:"\u914D\u65B9",dataIndex:"bomId",hideInTable:!0,hideInSearch:!0},{title:"\u7269\u6599\u540D\u79F0",dataIndex:"batchingId",formItemProps:function(y,Z){var S=Z.rowIndex;return{rules:S>1?[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]:[]}},valueType:"select",fieldProps:{showSearch:!0,options:r.matedata.map(function(g,y){return{label:g.name,value:g.id}})},width:"25%"},{title:"\u7528\u91CF",dataIndex:"dosage",valueType:"digit",width:"15%"},{title:"\u64CD\u4F5C",valueType:"option",width:"15%",render:function(){return null}}],T=function(){B.length==0?(check=!1,_message.error("\u8BF7\u9009\u62E9\u7269\u6599")):(r.onBomBatchingFinish(B),$([]))};return _jsx(_Modal,{title:"\u914D\u65B9\u8BE6\u60C5",width:1040,visible:r.BomBatchingVisible,bodyStyle:{padding:"32px 40px 1px 48px"},okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:T,onCancel:function(){r.onBomBatchingCancel()},destroyOnClose:!0,children:_jsx(EditableProTable,{columns:D,rowKey:"id",value:B,onChange:$,recordCreatorProps:{newRecordType:"dataSource",record:function(){return{id:Date.now(),bomId:r.BomId}}},editable:{type:"multiple",editableKeys:G,actionRender:function(y,Z,S){return[S.delete,S.Button]},onValuesChange:function(y,Z){$(Z)},onDelete:function(){var g=_asyncToGenerator(_regeneratorRuntime().mark(function Z(S,O){return _regeneratorRuntime().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:console.log(S),console.log(O);case 2:case"end":return q.stop()}},Z)}));function y(Z,S){return g.apply(this,arguments)}return y}(),onChange:A}})})},_t=null,ce=a(82539),U=a(50198),Fe=a(9669),Oe=a(48971),me=a(19755),Pe=a.n(me),je=Re.Z.Step,t=be.Z.Option,n=be.Z.OptGroup,o=Q.Z.TextArea,e=function(r){var V=_.Z.useForm(),K=(0,p.Z)(V,1),L=K[0],C=(0,l.useState)([]),B=(0,p.Z)(C,2),$=B[0],Y=B[1],E=(0,l.useState)([]),G=(0,p.Z)(E,2),A=G[0],z=G[1],M=(0,l.useState)([]),H=(0,p.Z)(M,2),D=H[0],T=H[1],g=(0,l.useState)([]),y=(0,p.Z)(g,2),Z=y[0],S=y[1],O=(0,l.useState)(),X=(0,p.Z)(O,2),q=X[0],He=X[1],$e=(0,l.useState)(!1),Ze=(0,p.Z)($e,2),Je=Ze[0],Qe=Ze[1],h=(0,l.useState)([]),c=(0,p.Z)(h,2),f=c[0],v=c[1],J=(0,l.useRef)(),W=(0,l.useState)("basis"),I=(0,p.Z)(W,2),ee=I[0],Ue=I[1],Ve=(0,l.useState)(r.location.query.values?r.location.query.values.imgUrl:null),te=(0,p.Z)(Ve,2),k=te[0],Xe=te[1],Ge=(0,l.useState)(0),ae=(0,p.Z)(Ge,2),Ke=ae[0],ra=ae[1],xt=(0,l.useState)([]),qe=(0,p.Z)(xt,2),na=qe[0],oa=qe[1],wt=(0,l.useState)([]),et=(0,p.Z)(wt,2),ua=et[0],sa=et[1],Ct=(0,l.useState)([]),tt=(0,p.Z)(Ct,2),la=tt[0],Ft=tt[1],jt=(0,l.useState)(),at=(0,p.Z)(jt,2),Dt=at[0],Zt=at[1],Gt=(0,l.useState)(""),rt=(0,p.Z)(Gt,2),Le=rt[0],nt=rt[1],It=(0,l.useState)([]),ot=(0,p.Z)(It,2),ia=ot[0],Rt=ot[1],Et=(0,l.useRef)(null),At=(0,l.useState)([]),ut=(0,p.Z)(At,2),da=ut[0],ca=ut[1],Ot=(0,l.useState)([]),st=(0,p.Z)(Ot,2),ma=st[0],pa=st[1],Pt=(0,l.useState)(),lt=(0,p.Z)(Pt,2),ha=lt[0],ga=lt[1],$t=(0,l.useState)(!1),it=(0,p.Z)($t,2),fa=it[0],va=it[1],Ut=(0,l.useState)(!1),dt=(0,p.Z)(Ut,2),ya=dt[0],ba=dt[1],Vt=(0,l.useState)(),ct=(0,p.Z)(Vt,2),Kt=ct[0],Lt=ct[1],Mt=function(){var b=(0,le.Z)((0,ge.Z)().mark(function i(u){var d;return(0,ge.Z)().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return d=P.default.loading("\u6B63\u5728\u6267\u884C"),console.log(u),R.prev=2,r.location.query.isAdd&&(u.id=null),u.imgUrl=k||u.imgUrl,u.defaultMate?u.defaultMate=u.defaultMate.join():u.defaultMate="",u.isAttrubute=!0,R.next=9,(0,ce.Rq)(JSON.stringify(u)).then(function(pe){pe.succeeded?(P.default.success("\u64CD\u4F5C\u6210\u529F"),Oe.m8.push({pathname:"/database/goods/newgoods"})):P.default.error(pe.errors)});case 9:return d(),R.abrupt("return",!0);case 13:return R.prev=13,R.t0=R.catch(2),d(),P.default.error("\u64CD\u4F5C\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),R.abrupt("return",!1);case 18:case"end":return R.stop()}},i,null,[[2,13]])}));return function(u){return b.apply(this,arguments)}}(),Wt={customRequest:function(i){var u=i.file;(0,U.HC)({directory:"hkerp/test/goods",buildUniqueDirectory:!1}).then(function(d){if(d.success_Action_Status==200){var F=new FormData;F.append("name",u.name),F.append("key",d.key),F.append("ossAccessKeyId",d.ossAccessKeyId),F.append("policy",d.policy),F.append("signature",d.signature),F.append("file",u),F.append("success_Action_Status",200),F.append("host",d.host),Pe().ajax({url:d.host,type:"POST",data:F,cache:!1,contentType:!1,processData:!1,success:function(pe){Xe(d.host+"/"+d.key.replace("${filename}",u.name))},error:function(pe){console.log(pe)}})}})}},kt=(0,l.useState)({operationKey:r.location.query.tabStatus?r.location.query.tabStatus:"basis",tabActiveKey:r.location.query.tabStatus?r.location.query.tabStatus:"basis"}),mt=(0,p.Z)(kt,2),Me=mt[0],Nt=mt[1];(0,l.useEffect)(function(){Ue(Me.tabActiveKey),pt(),zt(),Ht(),Jt()},[Me]);var Yt=function(i){if(Ke===1){P.default.info("\u5957\u9910\u4E0D\u80FD\u8BBE\u7F6E\u914D\u65B9");return}Nt({operationKey:i,tabActiveKey:i})};function pt(){(0,U.d9)().then(function(b){var i=[];b.data.length>0&&b.data.forEach(function(u){i.push({text:u.name,value:u.id,label:u.name})}),console.log("list",i),z(i)})}function zt(){(0,U.FM)().then(function(b){Zt(b.data)})}function Ht(){(0,U.$K)().then(function(b){var i=[];b.data.length>0&&b.data.forEach(function(u){i.push({text:u.name,value:u.id,label:u.name})}),Rt(i)})}function Jt(){(0,U.yV)().then(function(b){Ft(b.data)})}var Qt=function(i){nt(i.target.value)},Xt=function(i){if(i.preventDefault(),Le.length==0)P.default.error("\u8BF7\u8F93\u5165\u540D\u79F0");else{var u={name:Le};(0,U.Gw)(u).then(function(d){d.succeeded?(P.default.success("\u6DFB\u52A0\u6210\u529F"),pt(),nt("")):P.default.error(d.errors)})}},qt=[{key:"basis",tab:"\u5546\u54C1\u57FA\u7840\u4FE1\u606F"}],ea=function(i){Lt(i)},ta=function(i,u){var d;return((d=u==null?void 0:u.title)!==null&&d!==void 0?d:"").toLowerCase().includes(i.toLowerCase())},aa={basis:(0,s.jsx)(m.Z,{title:"\u5546\u54C1\u57FA\u7840\u4FE1\u606F",style:{marginBottom:24},bordered:!1,children:(0,s.jsxs)(_.Z,{form:L,labelCol:{span:4},wrapperCol:{span:6},layout:"horizontal",preserve:!1,initialValues:r.location.query.values,onFinish:Mt,children:[(0,s.jsx)(_.Z.Item,{name:"id",hidden:!0,children:(0,s.jsx)(Q.Z,{})}),(0,s.jsx)(_.Z.Item,{name:"goodsTypeId",label:"\u5DE5\u827A\u5206\u7C7B",rules:[{required:!0}],children:(0,s.jsx)(se.Z,{allowClear:!0,showSearch:!0,style:{width:"100%"},dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:Dt,onChange:ea,filterTreeNode:ta,value:Kt,placeholder:"\u8BF7\u9009\u62E9\u5DE5\u827A\u5206\u7C7B",treeDefaultExpandAll:!0})}),(0,s.jsx)(_.Z.Item,{name:"name",label:"\u5546\u54C1\u540D\u79F0",rules:[{required:!0}],children:(0,s.jsx)(Q.Z,{})}),(0,s.jsx)(_.Z.Item,{name:"goodsUintId",label:"\u5546\u54C1\u5355\u4F4D",rules:[{required:!0}],children:(0,s.jsx)(be.Z,{style:{width:"100%"},placeholder:"\u8BF7\u9009\u62E9\u5355\u4F4D",showSearch:!0,allowClear:!0,options:A,optionFilterProp:"children",filterOption:function(i,u){var d;return((d=u==null?void 0:u.label)!==null&&d!==void 0?d:"").includes(i)},filterSort:function(i,u){var d,F;return((d=i==null?void 0:i.label)!==null&&d!==void 0?d:"").toLowerCase().localeCompare(((F=u==null?void 0:u.label)!==null&&F!==void 0?F:"").toLowerCase())},dropdownRender:function(i){return(0,s.jsxs)(s.Fragment,{children:[i,(0,s.jsx)(ue.Z,{style:{margin:"8px 0"}}),(0,s.jsxs)(oe.Z,{style:{padding:"0 8px 4px"},children:[(0,s.jsx)(Q.Z,{placeholder:"\u8BF7\u8F93\u5165\u5355\u4F4D",ref:Et,value:Le,onChange:Qt,onKeyDown:function(d){return d.stopPropagation()}}),(0,s.jsx)(N.Z,{type:"text",icon:(0,s.jsx)(ie.Z,{}),onClick:Xt,children:"\u65B0\u589E"})]})]})}})}),(0,s.jsx)(_.Z.Item,{name:"price",label:"\u5546\u54C1\u4EF7\u683C",rules:[{required:!0}],children:(0,s.jsx)(ne.Z,{style:{width:"100%"},placeholder:"\u4EF7\u683C",min:0})}),(0,s.jsx)(_.Z.Item,{label:"\u662F\u5426\u79F0\u91CD",name:"isWeigh",valuePropName:"checked",children:(0,s.jsx)(re.Z,{checkedChildren:"\u662F",unCheckedChildren:"\u5426",defaultChecked:!1})}),(0,s.jsx)(_.Z.Item,{name:"descritption",label:"\u5907\u6CE8",children:(0,s.jsx)(o,{rows:4})}),(0,s.jsx)(_.Z.Item,{name:"imgUrl",hidden:!0,children:(0,s.jsx)(Q.Z,{})}),(0,s.jsx)(_.Z.Item,{name:"imgUrl1",label:"\u5546\u54C1\u56FE\u7247\u5730\u5740",children:(0,s.jsx)(w.Z,(0,x.Z)((0,x.Z)({},Wt),{},{showUploadList:!1,children:k?(0,s.jsx)("img",{src:k,alt:"",style:{width:"100%"}}):(0,s.jsx)(N.Z,{icon:(0,s.jsx)(Ee.Z,{}),children:"\u4E0A\u4F20"})}))}),(0,s.jsx)(_.Z.Item,{children:(0,s.jsx)(N.Z,{type:"primary",htmlType:"submit",children:"\u4FDD\u5B58"})})]})})};return(0,s.jsx)(Ae.ZP,{host:!0,header:{title:[(0,s.jsxs)("a",{onClick:function(){Oe.m8.push({pathname:"/database/goods/newgoods"})},children:[(0,s.jsx)(de.Z,{}),"\u8FD4\u56DE"]},"back")],breadcrumb:{}},title:r.location.query.isAdd?"\u5546\u54C1\u65B0\u589E":"\u8BE6\u60C5",tabActiveKey:ee,onTabChange:Yt,tabList:qt,children:aa[Me.operationKey]})},Tt=e},82539:function(ht,he,a){"use strict";a.d(he,{lO:function(){return We},Rq:function(){return ke},e3:function(){return Ne},yR:function(){return ge},FM:function(){return Ye},HC:function(){return Re},wm:function(){return Ee},d9:function(){return Ae},Gw:function(){return ze},bn:function(){return s},E4:function(){return U},Hx:function(){return Pe}});var Ie=a(11849),m=a(39428),x=a(3182),j=a(48971),w=a(96690);function We(t){return re.apply(this,arguments)}function re(){return re=(0,x.Z)((0,m.Z)().mark(function t(n){return(0,m.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,j.WY)((0,w.w)()+"/api/goods/page",{method:"Post",data:n}));case 1:case"end":return e.stop()}},t)})),re.apply(this,arguments)}function gt(t){return ne.apply(this,arguments)}function ne(){return ne=_asyncToGenerator(_regeneratorRuntime().mark(function t(n){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/bom/getpage",{method:"Post",data:n}));case 1:case"end":return e.stop()}},t)})),ne.apply(this,arguments)}function ft(t){return oe.apply(this,arguments)}function oe(){return oe=_asyncToGenerator(_regeneratorRuntime().mark(function t(n){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/GoodsBom/AddBom",{method:"Post",data:n}));case 1:case"end":return e.stop()}},t)})),oe.apply(this,arguments)}function vt(t){return N.apply(this,arguments)}function N(){return N=_asyncToGenerator(_regeneratorRuntime().mark(function t(n){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/GoodsBom/getBomInfo",{method:"Post",data:n}));case 1:case"end":return e.stop()}},t)})),N.apply(this,arguments)}function ke(t){return ue.apply(this,arguments)}function ue(){return ue=(0,x.Z)((0,m.Z)().mark(function t(n){return(0,m.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,j.WY)((0,w.w)()+"/api/goods/add",{method:"POST",data:n}));case 1:case"end":return e.stop()}},t)})),ue.apply(this,arguments)}function Ne(t){return se.apply(this,arguments)}function se(){return se=(0,x.Z)((0,m.Z)().mark(function t(n){return(0,m.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("\u5546\u54C1\u6570\u636E\u4FEE\u6539",n),e.abrupt("return",(0,j.WY)((0,w.w)()+"/api/goods/update",{method:"Post",data:n}));case 2:case"end":return e.stop()}},t)})),se.apply(this,arguments)}function ge(t){return fe.apply(this,arguments)}function fe(){return fe=(0,x.Z)((0,m.Z)().mark(function t(n){return(0,m.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,j.WY)((0,w.w)()+"/api/goods/delete?id="+n,{method:"Get"}));case 1:case"end":return e.stop()}},t)})),fe.apply(this,arguments)}function P(t){return le.apply(this,arguments)}function le(){return le=_asyncToGenerator(_regeneratorRuntime().mark(function t(n){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/goods-type/goods-types",{method:"POST",data:n}));case 1:case"end":return e.stop()}},t)})),le.apply(this,arguments)}function Ye(t){return _.apply(this,arguments)}function _(){return _=(0,x.Z)((0,m.Z)().mark(function t(n){return(0,m.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,j.WY)((0,w.w)()+"\u200B/api\u200B/goodstype/tree",{method:"GET",data:(0,Ie.Z)({},n)}));case 1:case"end":return e.stop()}},t)})),_.apply(this,arguments)}function p(t){return ve.apply(this,arguments)}function ve(){return ve=_asyncToGenerator(_regeneratorRuntime().mark(function t(n){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/goodstaste/getlist"));case 1:case"end":return e.stop()}},t)})),ve.apply(this,arguments)}function Q(t){return ye.apply(this,arguments)}function ye(){return ye=_asyncToGenerator(_regeneratorRuntime().mark(function t(n){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/goods/exportgood",{method:"POST",data:n}));case 1:case"end":return e.stop()}},t)})),ye.apply(this,arguments)}function be(){return Se.apply(this,arguments)}function Se(){return Se=_asyncToGenerator(_regeneratorRuntime().mark(function t(){return _regeneratorRuntime().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",request(getDataBaseUrl()+"/api/goods/goodstemplateexport",{method:"post",responseType:"blob"}));case 1:case"end":return o.stop()}},t)})),Se.apply(this,arguments)}function Re(t){return ie.apply(this,arguments)}function ie(){return ie=(0,x.Z)((0,m.Z)().mark(function t(n){return(0,m.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,j.WY)((0,w.w)()+"/api/systemconfig/GeneratePostPolicy",{method:"POST",data:n}));case 1:case"end":return e.stop()}},t)})),ie.apply(this,arguments)}function Ee(t){return de.apply(this,arguments)}function de(){return de=(0,x.Z)((0,m.Z)().mark(function t(n){return(0,m.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,j.WY)((0,w.w)()+"\u200B/api\u200B/goodstype/tree",{method:"GET",data:(0,Ie.Z)({},n)}));case 1:case"end":return e.stop()}},t)})),de.apply(this,arguments)}function Ae(){return l.apply(this,arguments)}function l(){return l=(0,x.Z)((0,m.Z)().mark(function t(){return(0,m.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,j.WY)((0,w.w)()+"/api/goods/getgoodsuintlist",{method:"Get"}));case 1:case"end":return o.stop()}},t)})),l.apply(this,arguments)}function ze(t){return Be.apply(this,arguments)}function Be(){return Be=(0,x.Z)((0,m.Z)().mark(function t(n){return(0,m.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,j.WY)((0,w.w)()+"/api/goods/addgoodsuint",{method:"Post",data:n}));case 1:case"end":return e.stop()}},t)})),Be.apply(this,arguments)}function s(){return _e.apply(this,arguments)}function _e(){return _e=(0,x.Z)((0,m.Z)().mark(function t(){return(0,m.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,j.WY)((0,w.w)()+"/api/goodstechnology/getdevicetechnology",{method:"Get"}));case 1:case"end":return o.stop()}},t)})),_e.apply(this,arguments)}function yt(t){return Te.apply(this,arguments)}function Te(){return Te=_asyncToGenerator(_regeneratorRuntime().mark(function t(n){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/goods/TechnologyTemplateExport?deviceId=".concat(n),{method:"post"}));case 1:case"end":return e.stop()}},t)})),Te.apply(this,arguments)}function bt(t){return xe.apply(this,arguments)}function xe(){return xe=_asyncToGenerator(_regeneratorRuntime().mark(function t(n){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/goods/goodsTechnologyExport",{method:"post",data:n}));case 1:case"end":return e.stop()}},t)})),xe.apply(this,arguments)}function St(){return we.apply(this,arguments)}function we(){return we=_asyncToGenerator(_regeneratorRuntime().mark(function t(){return _regeneratorRuntime().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",request(getDataBaseUrl()+"/api/goods/getgoodslist",{method:"Get"}));case 1:case"end":return o.stop()}},t)})),we.apply(this,arguments)}function Bt(t){return Ce.apply(this,arguments)}function Ce(){return Ce=_asyncToGenerator(_regeneratorRuntime().mark(function t(n){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/goods/getgoodsWithids",{method:"post",data:n}));case 1:case"end":return e.stop()}},t)})),Ce.apply(this,arguments)}function _t(t){return ce.apply(this,arguments)}function ce(){return ce=_asyncToGenerator(_regeneratorRuntime().mark(function t(n){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/goods/goodsSimpleExport",{method:"post",data:n}));case 1:case"end":return e.stop()}},t)})),ce.apply(this,arguments)}function U(t){return Fe.apply(this,arguments)}function Fe(){return Fe=(0,x.Z)((0,m.Z)().mark(function t(n){return(0,m.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,j.WY)((0,w.w)()+"/api/goods/goodsExport",{method:"post",data:n}));case 1:case"end":return e.stop()}},t)})),Fe.apply(this,arguments)}function Oe(t){return me.apply(this,arguments)}function me(){return me=_asyncToGenerator(_regeneratorRuntime().mark(function t(n){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/goods/goodsImport",{method:"post",data:n}));case 1:case"end":return e.stop()}},t)})),me.apply(this,arguments)}function Pe(t){return je.apply(this,arguments)}function je(){return je=(0,x.Z)((0,m.Z)().mark(function t(n){return(0,m.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,j.WY)((0,w.w)()+"/api/goods/GetGoodsRecipeList?goodsId=".concat(n),{method:"Get"}));case 1:case"end":return e.stop()}},t)})),je.apply(this,arguments)}}}]);
|