|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[5462],{34676:function(mt,he,a){"use strict";a.r(he),a.d(he,{default:function(){return Tt}});var Ie=a(58024),h=a(91894),x=a(11849),Z=a(43185),F=a(93009),Le=a(77576),re=a(12028),pt=a(77883),ne=a(85986),ht=a(49111),oe=a(19650),gt=a(57663),N=a(71577),Me=a(48736),ue=a(27049),We=a(62999),se=a(54680),ge=a(39428),fe=a(34792),P=a(48086),le=a(3182),ke=a(9715),_=a(55843),m=a(2824),ve=a(47673),Q=a(4107),ye=a(43358),be=a(34041),Se=a(35556),Ge=a(75899),ie=a(49101),Re=a(84391),de=a(6700),Ee=a(28790),l=a(67294),Ne=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"})]})]})})},ft=null,Te=a(88983),vt=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),I=E[0],A=E[1],z=useState([]),M=_slicedToArray(z,2),H=M[0],j=M[1],T=_Form.useForm(),g=_slicedToArray(T,1),y=g[0],D=useState(""),S=_slicedToArray(D,2),O=S[0],X=S[1],q=useRef(null),Ye=function(c){X(c.target.value)},Oe=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 p=[];r.defaultmatedata.forEach(function(c,f){var v={id:f,batchingId:c,dosage:0};p.push(v)}),j(p.map(function(c){return c.id})),A(p)}},[r]);var De=[{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(p,c){return{label:p.name,value:p.id}})},width:"25%"},{title:"\u7528\u91CF",dataIndex:"dosage",valueType:"digit",width:"15%"},{title:"\u64CD\u4F5C",valueType:"option",width:"15%",render:function(){return null}}],ze=function(){y.validateFields().then(function(c){var f=!0,v=c;console.log(I),B.length==0?(f=!1,_message.error("\u8BF7\u9009\u62E9\u5546\u54C1\u5C5E\u6027")):v.shuxing=B,I.length==0?(f=!1,_message.error("\u8BF7\u9009\u62E9\u7269\u6599")):v.mate=I.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")})},He=function(c){for(var f=c.target,v=f.name,J=f.value,W="",G=_toConsumableArray(B),ee=0;ee<r.goodsAttriburteData.length;ee++)v==="radiogroup"+ee&&(G[ee]=J);r.goodsAttriburteData.forEach(function(Pe){for(var $e=function(Ze){var ae;k=(ae=Pe.goodsAttributeValueList.find(function(Ue){return Ue.goodsAttributeValuId==G[Ze]}))===null||ae===void 0?void 0:ae.attributeValue,k&&(W=W+k,Ze<G.length-1&&(W=W+"-"))},te=0;te<G.length;te++){var k;$e(te)}}),y.setFieldsValue({bomName:r.goodsname+"("+W+")"}),$(G)};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:ze,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:Ye,onKeyDown:function(v){return v.stopPropagation()}}),_jsx(_Button,{type:"text",icon:_jsx(PlusOutlined,{}),onClick:Oe,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(p,c){return _jsx("div",{style:{marginLeft:80},children:_jsxs("div",{children:[_jsxs("span",{style:{marginRight:10},children:[" ",_jsx(_Tag,{color:"blue",children:p.attributeName}),"\uFF1A"]}),_jsx("span",{children:_jsx(_Radio.Group,{name:"radiogroup"+c,buttonStyle:"solid",size:"small",onChange:He,children:p.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:De,rowKey:"id",value:I,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 p=_asyncToGenerator(_regeneratorRuntime().mark(function f(v,J){return _regeneratorRuntime().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:console.log(v),console.log(J);case 2:case"end":return G.stop()}},f)}));function c(f,v){return p.apply(this,arguments)}return c}(),onChange:j}})]})},yt=null,Ce=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],I=Y[1],A=useRef(null);useEffect(function(){r.BomId&&GetByidBomList(r.BomId).then(function(j){var T=j.data;B.setFieldsValue({bomName:T.name,bomTypeList:T.bomTypeIds,bomType:T.isMain?"1":"0"})})});var z=function(T){I(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(),I("")):_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,we=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),I=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 D=y.data;D.bomEntry.length>0&&D.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 j=[{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,D){var S=D.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:j,rowKey:"id",value:B,onChange:$,recordCreatorProps:{newRecordType:"dataSource",record:function(){return{id:Date.now(),bomId:r.BomId}}},editable:{type:"multiple",editableKeys:I,actionRender:function(y,D,S){return[S.delete,S.Button]},onValuesChange:function(y,D){$(D)},onDelete:function(){var g=_asyncToGenerator(_regeneratorRuntime().mark(function D(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()}},D)}));function y(D,S){return g.apply(this,arguments)}return y}(),onChange:A}})})},St=null,ce=a(82539),U=a(50198),Fe=a(9669),Ae=a(48971),me=a(19755),t=a.n(me),n=Ge.Z.Step,o=be.Z.Option,e=be.Z.OptGroup,Bt=Q.Z.TextArea,_t=function(r){var V=_.Z.useForm(),K=(0,m.Z)(V,1),L=K[0],C=(0,l.useState)([]),B=(0,m.Z)(C,2),$=B[0],Y=B[1],E=(0,l.useState)([]),I=(0,m.Z)(E,2),A=I[0],z=I[1],M=(0,l.useState)([]),H=(0,m.Z)(M,2),j=H[0],T=H[1],g=(0,l.useState)([]),y=(0,m.Z)(g,2),D=y[0],S=y[1],O=(0,l.useState)(),X=(0,m.Z)(O,2),q=X[0],Ye=X[1],Oe=(0,l.useState)(!1),De=(0,m.Z)(Oe,2),ze=De[0],He=De[1],p=(0,l.useState)([]),c=(0,m.Z)(p,2),f=c[0],v=c[1],J=(0,l.useRef)(),W=(0,l.useState)("basis"),G=(0,m.Z)(W,2),ee=G[0],Pe=G[1],$e=(0,l.useState)(r.location.query.values?r.location.query.values.imgUrl:null),te=(0,m.Z)($e,2),k=te[0],Je=te[1],Ze=(0,l.useState)(0),ae=(0,m.Z)(Ze,2),Ue=ae[0],ra=ae[1],xt=(0,l.useState)([]),Qe=(0,m.Z)(xt,2),na=Qe[0],oa=Qe[1],Ct=(0,l.useState)([]),Xe=(0,m.Z)(Ct,2),ua=Xe[0],sa=Xe[1],wt=(0,l.useState)([]),qe=(0,m.Z)(wt,2),la=qe[0],Ft=qe[1],jt=(0,l.useState)(),et=(0,m.Z)(jt,2),Dt=et[0],Zt=et[1],It=(0,l.useState)(""),tt=(0,m.Z)(It,2),Ve=tt[0],at=tt[1],Gt=(0,l.useState)([]),rt=(0,m.Z)(Gt,2),ia=rt[0],Rt=rt[1],Et=(0,l.useRef)(null),At=(0,l.useState)([]),nt=(0,m.Z)(At,2),da=nt[0],ca=nt[1],Ot=(0,l.useState)([]),ot=(0,m.Z)(Ot,2),ma=ot[0],pa=ot[1],Pt=(0,l.useState)(),ut=(0,m.Z)(Pt,2),ha=ut[0],ga=ut[1],$t=(0,l.useState)(!1),st=(0,m.Z)($t,2),fa=st[0],va=st[1],Ut=(0,l.useState)(!1),lt=(0,m.Z)(Ut,2),ya=lt[0],ba=lt[1],Vt=(0,l.useState)(),it=(0,m.Z)(Vt,2),Kt=it[0],Lt=it[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"),Ae.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 w=new FormData;w.append("name",u.name),w.append("key",d.key),w.append("ossAccessKeyId",d.ossAccessKeyId),w.append("policy",d.policy),w.append("signature",d.signature),w.append("file",u),w.append("success_Action_Status",200),w.append("host",d.host),t().ajax({url:d.host,type:"POST",data:w,cache:!1,contentType:!1,processData:!1,success:function(pe){Je(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"}),dt=(0,m.Z)(kt,2),Ke=dt[0],Nt=dt[1];(0,l.useEffect)(function(){Pe(Ke.tabActiveKey),ct(),zt(),Ht(),Jt()},[Ke]);var Yt=function(i){if(Ue===1){P.default.info("\u5957\u9910\u4E0D\u80FD\u8BBE\u7F6E\u914D\u65B9");return}Nt({operationKey:i,tabActiveKey:i})};function ct(){(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){at(i.target.value)},Xt=function(i){if(i.preventDefault(),Ve.length==0)P.default.error("\u8BF7\u8F93\u5165\u540D\u79F0");else{var u={name:Ve};(0,U.Gw)(u).then(function(d){d.succeeded?(P.default.success("\u6DFB\u52A0\u6210\u529F"),ct(),at("")):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)(h.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,w;return((d=i==null?void 0:i.label)!==null&&d!==void 0?d:"").toLowerCase().localeCompare(((w=u==null?void 0:u.label)!==null&&w!==void 0?w:"").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:Ve,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)(Bt,{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)(F.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)(Re.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)(Ee.ZP,{host:!0,header:{title:[(0,s.jsxs)("a",{onClick:function(){Ae.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[Ke.operationKey]})},Tt=_t},82539:function(mt,he,a){"use strict";a.d(he,{lO:function(){return Le},Rq:function(){return Me},e3:function(){return We},yR:function(){return ge},FM:function(){return ke},HC:function(){return Ge},wm:function(){return Re},d9:function(){return Ee},Gw:function(){return Ne},bn:function(){return s},E4:function(){return U}});var Ie=a(11849),h=a(39428),x=a(3182),Z=a(48971),F=a(96690);function Le(t){return re.apply(this,arguments)}function re(){return re=(0,x.Z)((0,h.Z)().mark(function t(n){return(0,h.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,Z.WY)((0,F.w)()+"/api/goods/page",{method:"Post",data:n}));case 1:case"end":return e.stop()}},t)})),re.apply(this,arguments)}function pt(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 ht(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 gt(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 Me(t){return ue.apply(this,arguments)}function ue(){return ue=(0,x.Z)((0,h.Z)().mark(function t(n){return(0,h.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,Z.WY)((0,F.w)()+"/api/goods/add",{method:"POST",data:n}));case 1:case"end":return e.stop()}},t)})),ue.apply(this,arguments)}function We(t){return se.apply(this,arguments)}function se(){return se=(0,x.Z)((0,h.Z)().mark(function t(n){return(0,h.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,Z.WY)((0,F.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,h.Z)().mark(function t(n){return(0,h.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,Z.WY)((0,F.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 ke(t){return _.apply(this,arguments)}function _(){return _=(0,x.Z)((0,h.Z)().mark(function t(n){return(0,h.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,Z.WY)((0,F.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 m(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 Ge(t){return ie.apply(this,arguments)}function ie(){return ie=(0,x.Z)((0,h.Z)().mark(function t(n){return(0,h.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,Z.WY)((0,F.w)()+"/api/systemconfig/GeneratePostPolicy",{method:"POST",data:n}));case 1:case"end":return e.stop()}},t)})),ie.apply(this,arguments)}function Re(t){return de.apply(this,arguments)}function de(){return de=(0,x.Z)((0,h.Z)().mark(function t(n){return(0,h.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,Z.WY)((0,F.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 Ee(){return l.apply(this,arguments)}function l(){return l=(0,x.Z)((0,h.Z)().mark(function t(){return(0,h.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,Z.WY)((0,F.w)()+"/api/goods/getgoodsuintlist",{method:"Get"}));case 1:case"end":return o.stop()}},t)})),l.apply(this,arguments)}function Ne(t){return Be.apply(this,arguments)}function Be(){return Be=(0,x.Z)((0,h.Z)().mark(function t(n){return(0,h.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,Z.WY)((0,F.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,h.Z)().mark(function t(){return(0,h.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,Z.WY)((0,F.w)()+"/api/goodstechnology/getdevicetechnology",{method:"Get"}));case 1:case"end":return o.stop()}},t)})),_e.apply(this,arguments)}function ft(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 vt(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 yt(){return Ce.apply(this,arguments)}function Ce(){return Ce=_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)})),Ce.apply(this,arguments)}function bt(t){return we.apply(this,arguments)}function we(){return we=_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)})),we.apply(this,arguments)}function St(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,h.Z)().mark(function t(n){return(0,h.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,Z.WY)((0,F.w)()+"/api/goods/goodsExport",{method:"post",data:n}));case 1:case"end":return e.stop()}},t)})),Fe.apply(this,arguments)}function Ae(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)}}}]);
|