包含后厨 团餐 门店分支
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2 lines
23 KiB

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