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

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