包含后厨 团餐 门店分支
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
26 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7985],{64523:function(pt,he,a){"use strict";a.r(he),a.d(he,{default:function(){return Ct}});var be=a(20228),f=a(11382),b=a(57338),E=a(273),x=a(11849),He=a(22385),Q=a(45777),ht=a(43185),$=a(93009),mt=a(62350),L=a(24565),ft=a(57663),j=a(71577),S=a(39428),me=a(34792),m=a(48086),R=a(3182),Ve=a(9715),w=a(55843),g=a(2824),N=a(49101),Re=a(90631),X=a(1870),Ge=a(84391),p=a(67294),Je=a(28790),q=a(16894),Qe=a(12826),Y=a(48971),Xe=a(71194),K=a(50146),qe=a(77576),z=a(12028),_e=a(77883),_=a(85986),et=a(43358),ee=a(34041),tt=a(49111),te=a(19650),gt=a(48736),re=a(27049),vt=a(62999),ne=a(54680),yt=a(47673),A=a(4107),rt=a(73171),D=a(82539),t=a(85893),ae=A.Z.TextArea,Be=function(Z){var oe=(0,p.useState)(),k=(0,g.Z)(oe,2),fe=k[0],Ae=k[1],ge=(0,p.useState)([]),ve=(0,g.Z)(ge,2),H=ve[0],Ue=ve[1],Pe=(0,p.useState)(),le=(0,g.Z)(Pe,2),$e=le[0],ye=le[1],ke=(0,p.useRef)(),Ze=(0,p.useState)(""),M=(0,g.Z)(Ze,2),F=M[0],Ce=M[1],we=(0,p.useState)(null),I=(0,g.Z)(we,2),O=I[0],ie=I[1],Se=(0,p.useState)(!1),W=(0,g.Z)(Se,2),V=W[0],xe=W[1],De=(0,p.useState)(!1),Te=(0,g.Z)(De,2),Oe=Te[0],je=Te[1];(0,p.useEffect)(function(){de(),Me(),Z.form.setFieldsValue(Z.values),ie(Z.values.imgUrl)},[Z.values]);function de(){(0,D.d9)().then(function(C){var v=[];C.data.length>0&&C.data.forEach(function(y){v.push({text:y.name,value:y.id,label:y.name})}),Ue(v)})}function Me(){(0,D.wm)().then(function(C){Ae(C.data)})}var Fe=function(v){Ce(v.target.value)},We=function(v){if(v.preventDefault(),F.length==0)m.default.error("\u8BF7\u8F93\u5165\u540D\u79F0");else{var y={name:F};(0,D.Gw)(y).then(function(h){h.succeeded?(m.default.success("\u6DFB\u52A0\u6210\u529F"),de(),Ce("")):m.default.error(h.errors)})}},Ie=function(v){ye(v)},Le=function(v,y){var h;return((h=y==null?void 0:y.title)!==null&&h!==void 0?h:"").toLowerCase().includes(v.toLowerCase())},Ne={customRequest:function(v){var y=v.file;(0,D.HC)({directory:"hkerp/test/goods",buildUniqueDirectory:!1}).then(function(h){if(h.success_Action_Status==200){var T=new FormData;T.append("name",y.name),T.append("key",h.key),T.append("ossAccessKeyId",h.ossAccessKeyId),T.append("policy",h.policy),T.append("signature",h.signature),T.append("file",y),T.append("success_Action_Status",200),T.append("host",h.host),fetch(h.host,{method:"POST",body:T}).then(function(ce){ce.ok&&(ie("".concat(h.host,"/").concat(h.key.replace("${filename}",y.name))),je(!1))}).catch(function(ce){m.default.error("\u4E0A\u4F20\u5931\u8D25\uFF1A",ce)})}})}},Ye=function(){Z.values.imgUrl=null,ie(null),Z.form.setFieldsValue({imgUrl:Z.values.imgUrl})},Ee=function(){je(!0)};return(0,t.jsx)(K.Z,{title:Z.values.id?"\u7F16\u8F91":"\u65B0\u5EFA",width:640,visible:Z.createModalVisible,bodyStyle:{padding:"32px 40px 1px 48px"},footer:null,onCancel:function(){Z.onCancel()},maskClosable:!1,destroyOnClose:!0,children:(0,t.jsxs)(w.Z,{labelCol:{span:4},layout:"horizontal",preserve:!1,form:Z.form,onFinish:Z.onFinish,children:[(0,t.jsx)(w.Z.Item,{name:"id",hidden:!0,children:(0,t.jsx)(A.Z,{})}),(0,t.jsx)(w.Z.Item,{name:"goodsTypeId",label:"\u5DE5\u827A\u5206\u7C7B",rules:[{required:!0}],children:(0,t.jsx)(ne.Z,{allowClear:!0,showSearch:!0,style:{width:"100%"},dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:fe,onChange:Ie,filterTreeNode:Le,value:$e,placeholder:"\u8BF7\u9009\u62E9\u5DE5\u827A\u5206\u7C7B",treeDefaultExpandAll:!0})}),(0,t.jsx)(w.Z.Item,{name:"name",label:"\u5546\u54C1\u540D\u79F0",rules:[{required:!0}],children:(0,t.jsx)(A.Z,{})}),(0,t.jsx)(w.Z.Item,{name:"goodsUintId",label:"\u5546\u54C1\u5355\u4F4D",rules:[{required:!0}],children:(0,t.jsx)(ee.Z,{style:{width:"100%"},placeholder:"\u8BF7\u9009\u62E9\u5355\u4F4D",showSearch:!0,allowClear:!0,options:H,optionFilterProp:"children",filterOption:function(v,y){var h;return((h=y==null?void 0:y.label)!==null&&h!==void 0?h:"").includes(v)},filterSort:function(v,y){var h,T;return((h=v==null?void 0:v.label)!==null&&h!==void 0?h:"").toLowerCase().localeCompare(((T=y==null?void 0:y.label)!==null&&T!==void 0?T:"").toLowerCase())},dropdownRender:function(v){return(0,t.jsxs)(t.Fragment,{children:[v,(0,t.jsx)(re.Z,{style:{margin:"8px 0"}}),(0,t.jsxs)(te.Z,{style:{padding:"0 8px 4px"},children:[(0,t.jsx)(A.Z,{placeholder:"\u8BF7\u8F93\u5165\u5355\u4F4D",ref:ke,value:F,onChange:Fe,onKeyDown:function(h){return h.stopPropagation()}}),(0,t.jsx)(j.Z,{type:"text",icon:(0,t.jsx)(N.Z,{}),onClick:We,children:"\u65B0\u589E"})]})]})}})}),(0,t.jsx)(w.Z.Item,{name:"price",label:"\u5546\u54C1\u4EF7\u683C",children:(0,t.jsx)(_.Z,{style:{width:"100%"},placeholder:"\u4EF7\u683C",min:0})}),(0,t.jsx)(w.Z.Item,{name:"isWeigh",label:"\u662F\u5426\u79F0\u91CD",valuePropName:"checked",children:(0,t.jsx)(z.Z,{checkedChildren:"\u662F",unCheckedChildren:"\u5426",defaultChecked:!1})}),(0,t.jsx)(w.Z.Item,{name:"descritption",label:"\u5907\u6CE8",children:(0,t.jsx)(ae,{rows:4})}),(0,t.jsx)(w.Z.Item,{name:"imgUrl",hidden:!0,children:(0,t.jsx)(A.Z,{})}),(0,t.jsx)(w.Z.Item,{name:"imgUrl1",label:"\u5546\u54C1\u56FE\u7247",children:(0,t.jsx)($.Z,(0,x.Z)((0,x.Z)({},Ne),{},{showUploadList:!1,children:(0,t.jsx)("div",{style:{position:"relative",display:"inline-block",cursor:"pointer"},onMouseEnter:function(){return xe(!0)},onMouseLeave:function(){return xe(!1)},children:!Oe&&O?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("img",{src:O,alt:"",style:{maxWidth:"100%",maxHeight:"150px",height:"auto",borderRadius:"4px",transition:"opacity 0.3s ease",opacity:V?.5:1,backgroundColor:V?"rgba(0, 0, 0, 0.5)":"transparent"},onError:Ee}),V&&(0,t.jsx)(j.Z,{type:"link",danger:!0,onClick:function(v){v.stopPropagation(),Ye()},icon:(0,t.jsx)(rt.Z,{}),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}})]}):(0,t.jsx)(j.Z,{icon:(0,t.jsx)(Ge.Z,{}),children:"\u4E0A\u4F20"})})}))}),(0,t.jsxs)(w.Z.Item,{children:[(0,t.jsx)(j.Z,{htmlType:"button",style:{float:"right",left:10},onClick:Z.onCancel,children:"\u53D6\u6D88"}),(0,t.jsx)(j.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})]})]})})},ue=Be,nt=function(Z){var oe=(0,p.useRef)();return(0,t.jsx)(K.Z,{title:"\u4EE5\u4E0B\u5546\u54C1\u91CD\u590D\uFF0C\u8BF7\u9009\u62E9\u8986\u76D6\u6216\u8DF3\u8FC7",width:500,visible:Z.showChooseForm,onCancel:Z.onCancel,footer:null,maskClosable:!1,destroyOnClose:!0,children:(0,t.jsxs)(w.Z,{layout:"inline",preserve:!1,form:Z.form,onFinish:Z.onFinish,children:[Array.isArray(Z.values)&&Z.values.map(function(k,fe){return(0,t.jsxs)("div",{style:{marginBottom:"10px",clear:"both"},children:[(0,t.jsx)("div",{style:{float:"left",marginRight:"10px"},children:(0,t.jsx)(w.Z.Item,{name:k.goodsName,label:"\u5546\u54C1\u540D\u79F0",children:(0,t.jsx)("span",{children:k.goodsName})})}),(0,t.jsx)("div",{style:{float:"left"},children:(0,t.jsx)(w.Z.Item,{name:k.goodsName,label:"\u8986\u76D6\u6216\u8DF3\u8FC7",valuePropName:"checked",children:(0,t.jsx)(z.Z,{checkedChildren:"\u8986\u76D6",unCheckedChildren:"\u8DF3\u8FC7",defaultChecked:!1})})})]},fe)}),(0,t.jsxs)(w.Z.Item,{style:{textAlign:"right",marginTop:"10px",float:"right",width:"100%"},children:[(0,t.jsx)(j.Z,{htmlType:"button",style:{marginRight:"10px"},onClick:Z.onCancel,children:"\u53D6\u6D88"}),(0,t.jsx)(j.Z,{type:"primary",htmlType:"submit",children:"\u4FDD\u5B58"})]})]})})},se=nt,r=a(96690),s=a(9669),l=a.n(s),e="https://bpa.oss-cn-chengdu.aliyuncs.com/hkerp/test/goods/",Zt=function(){var Z=(0,p.useState)([]),oe=(0,g.Z)(Z,2),k=oe[0],fe=oe[1],Ae=(0,p.useState)(!1),ge=(0,g.Z)(Ae,2),ve=ge[0],H=ge[1],Ue=w.Z.useForm(),Pe=(0,g.Z)(Ue,1),le=Pe[0],$e=(0,p.useState)(!1),ye=(0,g.Z)($e,2),ke=ye[0],Ze=ye[1],M=(0,p.useRef)(),F=(0,p.useRef)(),Ce=(0,p.useState)(),we=(0,g.Z)(Ce,2),I=we[0],O=we[1],ie=(0,p.useState)([]),Se=(0,g.Z)(ie,2),W=Se[0],V=Se[1],xe=(0,p.useState)([]),De=(0,g.Z)(xe,2),Te=De[0],Oe=De[1],je=(0,p.useState)(!1),de=(0,g.Z)(je,2),Me=de[0],Fe=de[1],We=(0,p.useState)([]),Ie=(0,g.Z)(We,2),Le=Ie[0],Ne=Ie[1],Ye=(0,p.useState)(""),Ee=(0,g.Z)(Ye,2),C=Ee[0],v=Ee[1],y=(0,p.useState)(""),h=(0,g.Z)(y,2),T=h[0],ce=h[1],wt=(0,p.useState)([]),ut=(0,g.Z)(wt,2),St=ut[0],xt=ut[1],Dt=(0,p.useState)(),st=(0,g.Z)(Dt,2),Tt=st[0],jt=st[1],Ft=(0,p.useState)(!1),ot=(0,g.Z)(Ft,2),It=ot[0],Ke=ot[1],Et=(0,p.useState)([]),lt=(0,g.Z)(Et,2),bt=lt[0],ze=lt[1];(0,p.useEffect)(function(){(0,D.FM)().then(function(d){Oe(d.data)}),Rt()},[]);var Rt=function(){(0,D.bn)().then(function(u){var n=u.data;if(u.succeeded){var i=[];n.forEach(function(c){i.push({value:c.id,label:c.deviceName})}),Ne(i)}})},Gt=function(){var d=(0,R.Z)((0,S.Z)().mark(function u(n){return(0,S.Z)().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return n.price=n.price?n.price:0,n.isAttrubute=!0,n.ImgUrl=n.imgUrl1?e+n.imgUrl1.file.name:null,c.next=5,(0,D.Rq)(JSON.stringify(n)).then(function(o){o.succeeded?(m.default.success("\u6DFB\u52A0\u6210\u529F"),F.current.reload()):m.default.error(o.errors)});case 5:return c.abrupt("return",!0);case 6:case"end":return c.stop()}},u)}));return function(n){return d.apply(this,arguments)}}(),Bt=function(){var d=(0,R.Z)((0,S.Z)().mark(function u(n){var i;return(0,S.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return i=m.default.loading("\u6B63\u5728\u4FEE\u6539"),o.prev=1,o.next=4,(0,D.e3)({id:n.id,goodsTypeId:n.goodsTypeId,name:n.name,goodsUintId:n.goodsUintId,price:n.price?n.price:0,isWeigh:n.isWeigh,descritption:n.descritption,imgUrl:n.imgUrl1?e+n.imgUrl1.file.name:n.imgUrl}).then(function(B){B.succeeded?(m.default.success("\u4FEE\u6539\u6210\u529F"),F.current.reload()):m.default.error(B.errors)});case 4:return i(),o.abrupt("return",!0);case 8:return o.prev=8,o.t0=o.catch(1),i(),m.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),o.abrupt("return",!1);case 13:case"end":return o.stop()}},u,null,[[1,8]])}));return function(n){return d.apply(this,arguments)}}(),At=function(){return(W==null?void 0:W.length)>0&&(0,t.jsx)(L.Z,{title:"\u786E\u8BA4\u5220\u9664\u5417?",onConfirm:Ut,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,t.jsx)(j.Z,{type:"primary",children:"\u6279\u91CF\u5220\u9664"})})},Ut=function(){var u,n;Pt(W),V([]),(u=F.current)===null||u===void 0||(n=u.reloadAndRest)===null||n===void 0||n.call(u)},it=[{title:"\u4E3B\u952E",dataIndex:"id",hideInTable:!0,hideInSearch:!0,tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",render:function(u,n){return(0,t.jsx)("a",{onClick:function(){O(n),Ze(!0)},children:u})}},{title:"\u56FE\u7247\u5730\u5740",dataIndex:"imgUrl",hideInTable:!0,hideInSearch:!0},{title:"\u540D\u79F0",dataIndex:"name",valueType:"textarea"},{title:"\u5546\u54C1\u4EF7\u683C",dataIndex:"price",hideInForm:!0,renderText:function(u){return"".concat(u,"\xA5")},hideInSearch:!0},{title:"\u8BBE\u5907",dataIndex:"deviceId",valueType:"treeSelect",hideInTable:!0,fieldProps:{showSearch:!0,allowClear:!0,options:Le,treeNodeFilterProp:"label",onChange:function(u,n){v(u),ce(n[0]),M.current.submit()}}},{title:"\u5DE5\u827A\u5206\u7C7B",dataIndex:"goodsTypeName",valueType:"treeSelect",fieldProps:{showSearch:!0,allowClear:!0,fieldNames:{children:"children",label:"title"},options:Te,treeNodeFilterProp:"title"}},{title:"\u5907\u6CE8",dataIndex:"descritption",ellipsis:!0,tip:"\u6807\u9898\u8FC7\u957F\u4F1A\u81EA\u52A8\u6536\u7F29"},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",fixed:"right",width:350,render:function(u,n){return[(0,t.jsx)("a",{type:"primary",onClick:function(){H(!0),O(n)},children:"\u66F4\u65B0"},"primary"),(0,t.jsx)("a",{type:"primary",onClick:function(){Y.m8.push({pathname:"/database/goods/goodsbom",query:{isAdd:!1,values:n,tabStatus:"goodsbom"}})},children:"\u914D\u65B9\u914D\u7F6E"},"primary"),(0,t.jsx)("a",{type:"primary",onClick:function(){Y.m8.push({pathname:"/database/goods/goodstechnology",query:{isAdd:!1,values:n,tabStatus:"goodstechnologymaken"}})},children:"\u5DE5\u827A\u914D\u7F6E"},"primary"),(0,t.jsx)("a",{type:"primary",onClick:function(){ct(n.id)},children:"\u4E0B\u8F7D\u5546\u54C1"},"primary"),(0,t.jsx)(L.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){(0,D.yR)(n.id).then(function(c){c.succeeded?(m.default.success("\u5220\u9664\u6210\u529F"),F.current.reload()):m.default.error(c.errors)})},onCancel:function(){},children:(0,t.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}],dt=function(u){var n=m.default.loading("\u6B63\u5728\u5BFC\u5165"),i=new FormData;i.append("file",Tt),i.append("json",u),i.append("deviceId",C);var c={"Content-Type":"application/json",Authorization:"Bearer "+localStorage.getItem("token")};l().post((0,r.w)()+"/api/goods/goodsImport",i,{headers:c}).then(function(o){o.data.succeeded==!0?(m.default.success("\u5BFC\u5165\u6210\u529F"),F.current.reload()):m.default.error(o.data.errors)}).catch(function(o){m.default.error(o)}),n()},Pt=function(){var d=(0,R.Z)((0,S.Z)().mark(function u(n){return(0,S.Z)().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(n){c.next=2;break}return c.abrupt("return",!0);case 2:return c.next=4,(0,D.yR)(n.map(function(o){return o.id})).then(function(o){o.data?(m.default.success("\u5220\u9664\u6210\u529F"),F.current.reload()):m.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")});case 4:return c.abrupt("return",!0);case 5:case"end":return c.stop()}},u)}));return function(n){return d.apply(this,arguments)}}(),$t={beforeUpload:function(u){return jt(u),T==""||C==null?(m.default.error("\u8BF7\u9009\u62E9\u4E00\u4E2A\u8BBE\u5907\uFF01"),$.Z.LIST_IGNORE):(u.type!=="application/vnd.ms-excel"&&u.type!=="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"&&u.type!=="application/x-zip-compressed"&&m.default.error("".concat(u.name," \u4E0D\u662Fexcel\u6216zip\u6587\u4EF6")),u.type=="application/vnd.ms-excel"||u.type=="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"||u.type=="application/x-zip-compressed"?!0:$.Z.LIST_IGNORE)},name:"file",action:(0,r.w)()+"/api/goods/getFileToChoose",headers:{Authorization:"Bearer "+localStorage.getItem("token")},onChange:function(u){Fe(!0),u.file.status==="done"&&(Fe(!1),u.file.response.data.length>0?(ze(u.file.response.data),Ke(!0)):(dt([]),M.current.submit()))}},ct=function(){var d=(0,R.Z)((0,S.Z)().mark(function u(n){var i;return(0,S.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!(T==""||C==null)){o.next=3;break}return m.default.error("\u8BF7\u9009\u62E9\u4E00\u4E2A\u8BBE\u5907\uFF01"),o.abrupt("return");case 3:return i=m.default.loading("\u6B63\u5728\u4E0B\u8F7D"),o.next=6,(0,D.E4)({goodId:n,deviceId:C,goodsId:St}).then(function(B){if(B.succeeded){for(var G=B.data,U=atob(G),P=new Uint8Array(U.length),J=0;J<U.length;J++)P[J]=U.charCodeAt(J);var kt=new Blob([P],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),Ot=window.URL.createObjectURL(kt),pe=document.createElement("a"),Mt="\u5546\u54C1.zip";pe.href=Ot,pe.setAttribute("download",Mt),document.body.appendChild(pe),pe.click(),document.body.removeChild(pe),m.default.success("\u4E0B\u8F7D\u6210\u529F")}else m.default.error(B.errors)});case 6:i();case 7:case"end":return o.stop()}},u)}));return function(n){return d.apply(this,arguments)}}();return(0,t.jsx)(Je.ZP,{host:!0,header:{title:"",breadcrumb:{}},children:(0,t.jsxs)(f.Z,{spinning:Me,tip:"\u4E0A\u4F20\u4E2D...",children:[(0,t.jsx)(q.ZP,{headerTitle:"",formRef:M,actionRef:F,rowKey:"id",pagination:{defaultPageSize:10},search:{labelWidth:120},toolBarRender:function(){return[(0,t.jsxs)(j.Z,{type:"primary",onClick:function(){H(!0)},children:[(0,t.jsx)(N.Z,{})," \u65B0\u5EFA"]},"primary"),(0,t.jsxs)(j.Z,{onClick:function(){return ct(null)},children:[(0,t.jsx)(Re.Z,{}),"\u4E0B\u8F7D\u5546\u54C1",(0,t.jsx)(Q.Z,{placement:"top",title:"\u4E0B\u8F7D\u540E\u8BF7\u4F7F\u7528wps\u8FDB\u884C\u7F16\u8F91",children:(0,t.jsx)(X.Z,{})})]},"primary"),(0,t.jsx)($.Z,(0,x.Z)((0,x.Z)({},$t),{},{showUploadList:!1,children:(0,t.jsx)(j.Z,{icon:(0,t.jsx)(Ge.Z,{}),children:"\u5BFC\u5165\u5546\u54C1"})})),(0,t.jsx)(At,{})]},request:function(){var d=(0,R.Z)((0,S.Z)().mark(function u(n){var i,c,o;return(0,S.Z)().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return i=[],c=[],n.goodsTypeId!=null&&(n.goodsTypeId=k[n.goodsTypeId].goodsTypeId),o=0,G.next=6,(0,D.lO)(n).then(function(U){i=U.data.data,i.forEach(function(P){c.push(P.id),P.defaultMate!=null&&(P.defaultMate=P.defaultMate.split(","))}),o=U.data.total});case 6:return xt(c),G.abrupt("return",{data:i,success:!0,total:o});case 8:case"end":return G.stop()}},u)}));return function(u){return d.apply(this,arguments)}}(),columns:it,rowSelection:{onChange:function(u,n){V(n)}}}),(0,t.jsx)(ue,{onFinish:function(){var d=(0,R.Z)((0,S.Z)().mark(function u(n){var i;return(0,S.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(i=!1,!n.id){o.next=7;break}return o.next=4,Bt(n);case 4:i=o.sent,o.next=10;break;case 7:return o.next=9,Gt(n);case 9:i=o.sent;case 10:i&&(H(!1),O(void 0),F.current&&F.current.reload()),F.current.reload();case 12:case"end":return o.stop()}},u)}));return function(u){return d.apply(this,arguments)}}(),onCancel:function(){H(!1),O(void 0)},createModalVisible:ve,values:I||{},form:le}),(0,t.jsx)(se,{onFinish:function(){var d=(0,R.Z)((0,S.Z)().mark(function u(n){var i,c;return(0,S.Z)().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:i=Object.entries(n).map(function(G){var U=(0,g.Z)(G,2),P=U[0],J=U[1];return{key:P,value:J}}),c=[],i.forEach(function(G){c.push({key:G.key,value:G.value==!0})}),dt(JSON.stringify(c)),Ke(!1),ze(void 0),M.current.submit();case 7:case"end":return B.stop()}},u)}));return function(u){return d.apply(this,arguments)}}(),onCancel:function(){Ke(!1),ze(void 0)},showChooseForm:It,values:bt||{},form:le}),(0,t.jsx)(E.Z,{width:600,visible:ke,onClose:function(){O(void 0),Ze(!1)},closable:!1,children:(I==null?void 0:I.name)&&(0,t.jsx)(Qe.ZP,{column:2,title:I==null?void 0:I.name,request:(0,R.Z)((0,S.Z)().mark(function d(){return(0,S.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",{data:I||{}});case 1:case"end":return n.stop()}},d)})),params:{id:I==null?void 0:I.name},columns:it})})]})})},Ct=Zt},82539:function(pt,he,a){"use strict";a.d(he,{lO:function(){return He},Rq:function(){return S},e3:function(){return m},yR:function(){return Ve},FM:function(){return Re},HC:function(){return Xe},wm:function(){return qe},d9:function(){return _e},Gw:function(){return et},bn:function(){return tt},E4:function(){return Be}});var be=a(11849),f=a(39428),b=a(3182),E=a(48971),x=a(96690);function He(r){return Q.apply(this,arguments)}function Q(){return Q=(0,b.Z)((0,f.Z)().mark(function r(s){return(0,f.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,E.WY)((0,x.w)()+"/api/goods/page",{method:"Post",data:s}));case 1:case"end":return e.stop()}},r)})),Q.apply(this,arguments)}function ht(r){return $.apply(this,arguments)}function $(){return $=_asyncToGenerator(_regeneratorRuntime().mark(function r(s){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:s}));case 1:case"end":return e.stop()}},r)})),$.apply(this,arguments)}function mt(r){return L.apply(this,arguments)}function L(){return L=_asyncToGenerator(_regeneratorRuntime().mark(function r(s){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:s}));case 1:case"end":return e.stop()}},r)})),L.apply(this,arguments)}function ft(r){return j.apply(this,arguments)}function j(){return j=_asyncToGenerator(_regeneratorRuntime().mark(function r(s){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:s}));case 1:case"end":return e.stop()}},r)})),j.apply(this,arguments)}function S(r){return me.apply(this,arguments)}function me(){return me=(0,b.Z)((0,f.Z)().mark(function r(s){return(0,f.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,E.WY)((0,x.w)()+"/api/goods/add",{method:"POST",data:s}));case 1:case"end":return e.stop()}},r)})),me.apply(this,arguments)}function m(r){return R.apply(this,arguments)}function R(){return R=(0,b.Z)((0,f.Z)().mark(function r(s){return(0,f.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("\u5546\u54C1\u6570\u636E\u4FEE\u6539",s),e.abrupt("return",(0,E.WY)((0,x.w)()+"/api/goods/update",{method:"Post",data:s}));case 2:case"end":return e.stop()}},r)})),R.apply(this,arguments)}function Ve(r){return w.apply(this,arguments)}function w(){return w=(0,b.Z)((0,f.Z)().mark(function r(s){return(0,f.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,E.WY)((0,x.w)()+"/api/goods/delete?id="+s,{method:"Get"}));case 1:case"end":return e.stop()}},r)})),w.apply(this,arguments)}function g(r){return N.apply(this,arguments)}function N(){return N=_asyncToGenerator(_regeneratorRuntime().mark(function r(s){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:s}));case 1:case"end":return e.stop()}},r)})),N.apply(this,arguments)}function Re(r){return X.apply(this,arguments)}function X(){return X=(0,b.Z)((0,f.Z)().mark(function r(s){return(0,f.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,E.WY)((0,x.w)()+"\u200B/api\u200B/goodstype/tree",{method:"GET",data:(0,be.Z)({},s)}));case 1:case"end":return e.stop()}},r)})),X.apply(this,arguments)}function Ge(r){return p.apply(this,arguments)}function p(){return p=_asyncToGenerator(_regeneratorRuntime().mark(function r(s){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)})),p.apply(this,arguments)}function Je(r){return q.apply(this,arguments)}function q(){return q=_asyncToGenerator(_regeneratorRuntime().mark(function r(s){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:s}));case 1:case"end":return e.stop()}},r)})),q.apply(this,arguments)}function Qe(){return Y.apply(this,arguments)}function Y(){return Y=_asyncToGenerator(_regeneratorRuntime().mark(function r(){return _regeneratorRuntime().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",request(getDataBaseUrl()+"/api/goods/goodstemplateexport",{method:"post",responseType:"blob"}));case 1:case"end":return l.stop()}},r)})),Y.apply(this,arguments)}function Xe(r){return K.apply(this,arguments)}function K(){return K=(0,b.Z)((0,f.Z)().mark(function r(s){return(0,f.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,E.WY)((0,x.w)()+"/api/systemconfig/GeneratePostPolicy",{method:"POST",data:s}));case 1:case"end":return e.stop()}},r)})),K.apply(this,arguments)}function qe(r){return z.apply(this,arguments)}function z(){return z=(0,b.Z)((0,f.Z)().mark(function r(s){return(0,f.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,E.WY)((0,x.w)()+"\u200B/api\u200B/goodstype/tree",{method:"GET",data:(0,be.Z)({},s)}));case 1:case"end":return e.stop()}},r)})),z.apply(this,arguments)}function _e(){return _.apply(this,arguments)}function _(){return _=(0,b.Z)((0,f.Z)().mark(function r(){return(0,f.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,E.WY)((0,x.w)()+"/api/goods/getgoodsuintlist",{method:"Get"}));case 1:case"end":return l.stop()}},r)})),_.apply(this,arguments)}function et(r){return ee.apply(this,arguments)}function ee(){return ee=(0,b.Z)((0,f.Z)().mark(function r(s){return(0,f.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,E.WY)((0,x.w)()+"/api/goods/addgoodsuint",{method:"Post",data:s}));case 1:case"end":return e.stop()}},r)})),ee.apply(this,arguments)}function tt(){return te.apply(this,arguments)}function te(){return te=(0,b.Z)((0,f.Z)().mark(function r(){return(0,f.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,E.WY)((0,x.w)()+"/api/goodstechnology/getdevicetechnology",{method:"Get"}));case 1:case"end":return l.stop()}},r)})),te.apply(this,arguments)}function gt(r){return re.apply(this,arguments)}function re(){return re=_asyncToGenerator(_regeneratorRuntime().mark(function r(s){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/goods/TechnologyTemplateExport?deviceId=".concat(s),{method:"post"}));case 1:case"end":return e.stop()}},r)})),re.apply(this,arguments)}function vt(r){return ne.apply(this,arguments)}function ne(){return ne=_asyncToGenerator(_regeneratorRuntime().mark(function r(s){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:s}));case 1:case"end":return e.stop()}},r)})),ne.apply(this,arguments)}function yt(){return A.apply(this,arguments)}function A(){return A=_asyncToGenerator(_regeneratorRuntime().mark(function r(){return _regeneratorRuntime().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",request(getDataBaseUrl()+"/api/goods/getgoodslist",{method:"Get"}));case 1:case"end":return l.stop()}},r)})),A.apply(this,arguments)}function rt(r){return D.apply(this,arguments)}function D(){return D=_asyncToGenerator(_regeneratorRuntime().mark(function r(s){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:s}));case 1:case"end":return e.stop()}},r)})),D.apply(this,arguments)}function t(r){return ae.apply(this,arguments)}function ae(){return ae=_asyncToGenerator(_regeneratorRuntime().mark(function r(s){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:s}));case 1:case"end":return e.stop()}},r)})),ae.apply(this,arguments)}function Be(r){return ue.apply(this,arguments)}function ue(){return ue=(0,b.Z)((0,f.Z)().mark(function r(s){return(0,f.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,E.WY)((0,x.w)()+"/api/goods/goodsExport",{method:"post",data:s}));case 1:case"end":return e.stop()}},r)})),ue.apply(this,arguments)}function nt(r){return se.apply(this,arguments)}function se(){return se=_asyncToGenerator(_regeneratorRuntime().mark(function r(s){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:s}));case 1:case"end":return e.stop()}},r)})),se.apply(this,arguments)}}}]);