|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[4093],{84239:function(_){_.exports={main:"main___2K5qG",headerList:"headerList___MwLVF",stepDescription:"stepDescription___KxeLE",pageHeader:"pageHeader___1L3IU",moreInfo:"moreInfo___3-nlm",formlable:"formlable___1ZX6u",formlabletxt:"formlabletxt___1jTba"}},631:function(_,G,d){"use strict";d.r(G),d.d(G,{default:function(){return Te}});var dt=d(47673),ut=d(4107),Oa=d(43358),R=d(34041),$a=d(35556),ce=d(75899),fe=d(6700),he=d(28790),c=d(67294),Ga=d(71194),ge=d(50146),Ua=d(57663),tt=d(71577),Pa=d(88983),xt=d(47933),za=d(71153),ve=d(60331),Ra=d(58024),et=d(91894),Wa=d(98858),Vt=d(4914),Ja=d(62350),rt=d(24565),B=d(39428),H=d(3182),Ft=d(11849),Tt=d(86582),Ma=d(34792),T=d(48086),f=d(2824),at=d(35611),kt=d(16894),st=d(48971),V=d(50198),me=d(96690);function ye(M){return ct.apply(this,arguments)}function ct(){return ct=(0,H.Z)((0,B.Z)().mark(function M(i){return(0,B.Z)().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return F.abrupt("return",(0,st.WY)((0,me.w)()+"/api/warehousetemplate/list?deviceId="+i,{method:"Get"}));case 1:case"end":return F.stop()}},M)})),ct.apply(this,arguments)}var pe=d(84239),K=d.n(pe),Se=d(73171),Ha=d(77576),Ce=d(12028),Ka=d(77883),be=d(85986),t=d(85893),Ie=ut.Z.TextArea,je=function(i){var k=function(b,p,m){console.log("id",p),console.log("props.optiondata",i.optiondata),console.log("props.fromdata",i.fromdata),i.fromdata.forEach(function(v){m?v.id==m&&v.optiondata.forEach(function(S){S.technologyactionId==p&&(console.log("e.target.value",b.target.value),S.actionValue=b.target.value)}):(console.log("\u8FDB\u6765\u4E86"),console.log(i.index),v.optiondata.forEach(function(S){S.technologyactionId==p&&v.index==i.index&&(console.log("e.target.value",b.target.value),S.actionValue=b.target.value)}))}),console.log(i.fromdata),i.onSaveClick(i.fromdata)},F=function(b,p,m){i.fromdata.forEach(function(v){m?v.id==m&&v.optiondata.forEach(function(S){S.technologyactionId==p&&(console.log("e.target.value",b),S.actionValue=b)}):v.optiondata.forEach(function(S,W){S.technologyactionId==p&&v.index==i.index&&(console.log("e.target.value",b),S.actionValue=b)})}),console.log(i.fromdata),i.onSaveClick(i.fromdata)},I=function(b,p,m){console.log(b),console.log(p),i.optiondata.forEach(function(v){v.technologyactionId==p&&(v.actionValue=b.label)}),i.onSaveClick(i.fromdata)};return(0,t.jsx)("div",{children:i.propsdata.length>0?i.propsdata.map(function(u,b){var p,m=(p=i.optiondata.find(function(j){return j.id==u.technologyactionId&&j.actionName==u.actionName}))===null||p===void 0?void 0:p.actionValue;if(u.actionType=="text")return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{style:{width:"100%",height:"40px"},children:[(0,t.jsx)("span",{className:K().formlable,style:{display:"block",float:"left",backgroundColor:"#dcf4ff",marginBottom:5},children:u.actionName}),(0,t.jsx)("span",{style:{display:"block",float:"left",marginBottom:5,width:"60%"},children:(0,t.jsx)(ut.Z,{defaultValue:m,style:{width:"100%"},onChange:function(A){k(A,u.id,u.goddteid)}},u.id)})]})});if(u.actionType=="digit")return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{style:{width:"100%",height:"40px"},children:[(0,t.jsx)("span",{className:K().formlable,style:{display:"block",float:"left",backgroundColor:"#dcf4ff",marginBottom:5},children:u.actionName}),(0,t.jsx)("span",{style:{display:"block",float:"left",marginBottom:5,width:"60%"},children:(0,t.jsx)(be.Z,{defaultValue:m,style:{width:"100%"},onChange:function(A){F(A,u.id,u.goddteid)}},u.id)})]})});if(u.actionType=="textarea")return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{style:{width:"100%",height:"40px"},children:[(0,t.jsx)("span",{className:K().formlable,style:{display:"block",float:"left",backgroundColor:"#dcf4ff",marginBottom:5},children:u.actionName}),(0,t.jsx)("span",{style:{display:"block",float:"left",marginBottom:5,width:"60%"},children:(0,t.jsx)(Ie,{defaultValue:m,style:{width:"100%"},onChange:function(A){k(A,u.id,u.goddteid)}},u.id)})]})});if(u.actionType=="switch")return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{style:{width:"100%",height:"40px"},children:[(0,t.jsx)("span",{className:K().formlable,style:{display:"block",float:"left",backgroundColor:"#dcf4ff",marginBottom:5},children:u.actionName}),(0,t.jsx)("span",{style:{display:"block",float:"left",marginBottom:5,width:"60%"},children:(0,t.jsx)(Ce.Z,{defaultValue:m,onChange:function(A){k(A,u.id,u.goddteid)}},u.id)})]})});if(u.actionType=="select"){var v=[];u.actionValue&&u.actionValue.length>0&&(v=JSON.parse(u.actionValue));var S=v.map(function(j,A){return{value:A,label:j.actionValueName}});if(u.technologyType==1){var W=i.batchingdata.map(function(j){return{value:j.id,label:j.name}});S=W}return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{style:{width:"100%",height:"40px"},children:[(0,t.jsx)("span",{className:K().formlable,style:{display:"block",float:"left",backgroundColor:"#dcf4ff",marginBottom:5},children:u.actionName}),(0,t.jsx)("span",{style:{display:"block",float:"left",marginBottom:5,width:"60%"},children:(0,t.jsx)(R.Z,{defaultValue:m,labelInValue:!0,options:S,style:{width:"100%"},onChange:function(A){I(A,u.id,u.goddteid)}},u.id)})]})})}}):""})},Ze=je,Ae=function(i){var k=(0,c.useState)([]),F=(0,f.Z)(k,2),I=F[0],u=F[1],b=(0,c.useState)(1),p=(0,f.Z)(b,2),m=p[0],v=p[1];(0,c.useEffect)(function(){i.fromdata.length==0?u([]):i.UpdataStatus=="update"&&(i.fromdata.forEach(function(y){y.index=y.sort}),u(i.fromdata))},[i.fromdata]);var S=function(L,Z){if(i.devideId=="0")T.default.error("\u8BF7\u9009\u62E9\u8BBE\u5907\u540E\u5728\u65B0\u589E");else{var E=m;console.log("fromdata",I),v(m+1);var x=(0,Tt.Z)(I),U=I.length;if(I.length==0)E=1;else{var C=I.reduce(function(N,P){return N.sort>P.sort?N:P});console.log("\u6700\u5927\u5E8F\u53F7\uFF1A",C.sort),E=C.sort+1}x.push({index:U+1,id:"",stepName:"",chnologyId:"",actionJson:"",sort:E,goodsId:"",goodsAttributeId:"",optiondata:[],propsdata:[],isBatch:!0,typeName:"",disabled:!1}),u(x),i.ontechnologyChange(x),i.onUpdataStatus("add")}},W=function(L){console.log(L),console.log(I);var Z=I.filter(function(E){return E.sort!=L});Z.forEach(function(E,x){E.sort=x+1}),u(Z),console.log(Z),Z.length==0?v(1):v(m-1),i.onUpdataStatus("view"),i.onSaveClick(Z)},j=function(L,Z,E){console.log(I),console.log(E);var x=i.technologyattralldata.filter(function(C){return C.technologyId==L}),U=I.map(function(C){if(C.index==E){x.length>0?C.isBatch=!0:C.isBatch=!1,C.typeName=Z.label,C.stepName=Z.label,C.chnologyId=Z.value;var N=[];x.forEach(function(P,ht){N.push({actionName:P.actionName,actionValue:"",technologyactionId:P.id,index:ht})}),C.propsdata=x,C.optiondata=N}return C});u(U),i.ontechnologyChange(U),console.log("from",U)},A=function(L){i.onSaveClick(L)},ft=function(){i.onUpdataStatus("view"),u([]),v(1),i.onSaveClick([])};return(0,t.jsxs)("div",{children:[I.length>0?I.map(function(y,L){return(0,t.jsxs)(at.Z,{boxShadow:!0,title:"\u5DE5\u5E8F\u53F7"+y.sort,bordered:!0,bodyStyle:{padding:15,display:"flex"},headStyle:{padding:"0px 24px"},style:{marginBlockEnd:8},extra:(0,t.jsx)(Se.Z,{onClick:function(){W(y.sort)}}),children:[(0,t.jsx)("div",{style:{float:"left",width:"20%"},children:(0,t.jsx)(R.Z,{name:"chnologyId",style:{width:"100%"},value:y.chnologyId,disabled:y.disabled,options:i.goodstechnologydata,onChange:function(){var Z=(0,H.Z)((0,B.Z)().mark(function E(x,U){return(0,B.Z)().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:j(x,U,y.index);case 1:case"end":return N.stop()}},E)}));return function(E,x){return Z.apply(this,arguments)}}()},y.sort)}),(0,t.jsx)("div",{style:{float:"left",width:"78%"},children:(0,t.jsx)(Ze,{propsdata:y.propsdata,fromdata:I,batchingdata:i.batchingdata,onSaveClick:A,optiondata:y.optiondata,index:y.index})})]},y.id)}):"",(0,t.jsx)(tt.Z,{type:"dashed",block:!0,onClick:S,ghost:!0,style:{background:"#FA541C"},children:"\u6DFB\u52A0\u5DE5\u827A"}),(0,t.jsx)(tt.Z,{block:!0,onClick:ft,children:"\u91CD\u7F6E"})]})},Ee=Ae,Xa=d(55423),xe=function(i){var k=(0,c.useState)(""),F=(0,f.Z)(k,2),I=F[0],u=F[1],b=(0,c.useState)([]),p=(0,f.Z)(b,2),m=p[0],v=p[1],S=(0,c.useState)([]),W=(0,f.Z)(S,2),j=W[0],A=W[1],ft=(0,c.useState)([]),y=(0,f.Z)(ft,2),L=y[0],Z=y[1],E=(0,c.useState)([]),x=(0,f.Z)(E,2),U=x[0],C=x[1],N=(0,c.useState)([]),P=(0,f.Z)(N,2),ht=P[0],Dt=P[1],ke=(0,c.useState)({}),wt=(0,f.Z)(ke,2),D=wt[0],ot=wt[1],De=(0,c.useState)([]),Nt=(0,f.Z)(De,2),eo=Nt[0],ao=Nt[1],we=(0,c.useState)([]),Bt=(0,f.Z)(we,2),oo=Bt[0],gt=Bt[1],Ne=(0,c.useState)(1),Lt=(0,f.Z)(Ne,2),Be=Lt[0],Ot=Lt[1],Le=(0,c.useState)([]),$t=(0,f.Z)(Le,2),Oe=$t[0],$e=$t[1],Ge=(0,c.useState)([]),Gt=(0,f.Z)(Ge,2),no=Gt[0],Ue=Gt[1],Pe=(0,c.useState)([]),Ut=(0,f.Z)(Pe,2),ze=Ut[0],Re=Ut[1],We=(0,c.useState)("block"),Pt=(0,f.Z)(We,2),lo=Pt[0],Je=Pt[1],Me=(0,c.useState)([]),zt=(0,f.Z)(Me,2),vt=zt[0],O=zt[1],He=(0,c.useState)("view"),Rt=(0,f.Z)(He,2),mt=Rt[0],X=Rt[1],Ke=(0,c.useState)(!1),Wt=(0,f.Z)(Ke,2),Xe=Wt[0],Ye=Wt[1],Qe=(0,c.useState)("0"),Jt=(0,f.Z)(Qe,2),J=Jt[0],yt=Jt[1],qe=(0,c.useState)(""),Mt=(0,f.Z)(qe,2),_e=Mt[0],pt=Mt[1],ta=(0,c.useState)(""),Ht=(0,f.Z)(ta,2),io=Ht[0],uo=Ht[1],ea=(0,c.useState)("add"),Kt=(0,f.Z)(ea,2),ro=Kt[0],Xt=Kt[1],aa=(0,c.useState)([]),Yt=(0,f.Z)(aa,2),St=Yt[0],oa=Yt[1],na=(0,c.useState)("none"),Qt=(0,f.Z)(na,2),la=Qt[0],qt=Qt[1],ia=(0,c.useState)(""),_t=(0,f.Z)(ia,2),Ct=_t[0],bt=_t[1],da=(0,c.useState)(""),te=(0,f.Z)(da,2),ua=te[0],It=te[1],ra=(0,c.useState)(!1),ee=(0,f.Z)(ra,2),sa=ee[0],jt=ee[1],ca=(0,c.useState)(!1),ae=(0,f.Z)(ca,2),fa=ae[0],Zt=ae[1],ha=(0,c.useState)(!1),oe=(0,f.Z)(ha,2),ga=oe[0],ne=oe[1],va=(0,c.useState)(!1),le=(0,f.Z)(va,2),ma=le[0],nt=le[1],ya=(0,c.useState)([]),ie=(0,f.Z)(ya,2),de=ie[0],pa=ie[1],Y=(0,c.useRef)(null),ue=(0,c.useRef)(),Sa=function(){Zt(!0),ne(!0)},Ca=function(){Zt(!1),ne(!1),Y.current.reload()};(0,c.useEffect)(function(){return ba(),document.addEventListener("click",se,!0),function(){document.removeEventListener("click",se,!0)}},[]);var ba=function(){i.goodsid!=null&&(0,V.wR)(i.goodsid).then(function(e){if(e.succeeded){var a=[],n=[];e.data.goodsAttributeList.length==0?Je("none"):e.data.goodsAttributeList.forEach(function(l){var r,h;l.defalutvalue=[],l.goodsAttributeValueList.forEach(function(g){l.attributeName=="\u9ED8\u8BA4\u5C5E\u6027"?(g.check=!0,u(g.attributeValue),l.defalutvalue.push(g.goodsAttributeValuId)):g.check=!1}),l.defalutvalue=(r=l.goodsAttributeValueList[0])===null||r===void 0?void 0:r.goodsAttributeValuId,l.goodsAttributeValueList[0].check=!0,a.push(l.defalutvalue),n.push((h=l.goodsAttributeValueList[0])===null||h===void 0?void 0:h.attributeValue)}),v(a),ot(e.data),u(n.map(function(l,r){return r===n.length-1?l:"".concat(l,"-")}).join(""));var o=[{key:"1",label:"\u5546\u54C1\u540D\u79F0",children:e.data.name},{key:"2",label:"\u5546\u54C1\u4EF7\u683C",children:e.data.price},{key:"3",label:"\u5DE5\u827A\u5206\u7C7B",children:e.data.goodsTypeName},{key:"4",label:"\u5546\u54C1\u5355\u4F4D",children:e.data.goodsUintName}];A(o)}else T.default.error("\u67E5\u8BE2\u5546\u54C1\u4FE1\u606F\u5931\u8D25")}),(0,V.uz)(i.goodsid).then(function(e){if(e.data.length>0){gt(e.data);var a=e.data.reduce(function(n,o){return n.sort>o.sort?n:o});console.log("\u6700\u5927\u5E8F\u53F7\uFF1A",a.sort),Ot(a.sort)}}),(0,V.Ds)().then(function(e){$e(e.data)}),(0,V.bn)().then(function(e){if(Ue(e.data),e.data.length>0){var a=e.data.map(function(n){return{value:n.id,label:n.deviceName}});Re(a)}})},Ia=function(e){O([]);for(var a=e.target,n=a.name,o=a.value,l="",r=(0,Tt.Z)(m),h=0;h<D.goodsAttributeList.length;h++)n==="radiogroup"+h&&(r[h]=o);var g=null;D.goodsAttributeList.forEach(function(w){for(var $=function(it){var Et;Q=(Et=w.goodsAttributeValueList.find(function(La){return La.goodsAttributeValuId==r[it]}))===null||Et===void 0?void 0:Et.attributeValue,Q&&(l=l+Q,it<r.length-1&&(l=l+"-"))},z=0;z<r.length;z++){var Q;$(z)}w.goodsAttributeValueList.forEach(function(q){o==q.goodsAttributeValuId&&(g=q.goodsAttributeId)})}),D.goodsAttributeList.forEach(function(w){w.goodsAttributeId==g&&w.goodsAttributeValueList.forEach(function($){o==$.goodsAttributeValuId?($.check=!0,w.defalutvalue=o):$.check=!1})}),ot(D),u(l),v(r)},ja=function(e,a,n){O([]),jt(!0),pt(a.deviceId),yt(a.deviceId),At(a.deviceId,"edit",a);var o=[],l=D.goodsAttributeList.map(function($){return $.goodsAttributeValueList.forEach(function(z){var Q=a.goodsAttributeId.split(","),q=Q.find(function(it){return it==z.goodsAttributeValuId});q&&(z.check=!0,$.defalutvalue=z.goodsAttributeValuId,o.push(z.goodsAttributeValuId))}),$}),r=(0,Ft.Z)((0,Ft.Z)({},D),{},{goodsAttributeList:l}),h=r;ot(h),v(o);var g=/\【(.*?)\】/,w=a.deviceName.match(g);u(w[1]),X("update")},Za=function(e,a){var n=[];e.data.forEach(function(o){var l={},r=[],h=a==null?void 0:a.filter(function(g){return g.technologyId==o.chnologyId});l.stepName=o.stepName,l.id=o.id,l.chnologyId=o.chnologyId,l.sort=o.sort,l.actionJson=o.actionJson,l.optiondata=JSON.parse(o.actionJson),h==null||h.forEach(function(g){var w={id:g.id,actionName:g.actionName,actionType:g.actionType,actionValue:g.actionValue,goodstechnologyId:g.technologyId,technologyType:g.technologyType,sort:g.sort,goddteid:o.id};r.push(w)}),l.propsdata=r,l.technologyType=o.technologyType,l.typeName=o.stepName,n.push(l)}),O(n)},At=function(e,a,n){var o=[];n&&(re(n.deviceId),bt(n.warehousrTemplateId),It(n.warehousrTemplateId)),(0,V.t5)(e).then(function(l){if(l.data.length>0){var r,h=[];o=(r=l.data)===null||r===void 0?void 0:r.map(function(g){return g.technologyActionInfo.length>0&&g.technologyActionInfo.forEach(function(w){h.push(w)}),{value:g.id,label:g.name}}),Dt(h),Z(o)}else Dt([]),Z([]);a=="edit"&&Za(n,h)})},Aa=function(e,a,n,o,l){vt.length>0&&O([]),(0,V.MP)({devideId:a,goodsId:i.goodsid,goodsAttributeId:n,warehousrTemplateId:o}).then(function(r){r.data?(T.default.success("\u5220\u9664\u6210\u529F"),lt(),Y.current.reload()):T.default.error("\u5220\u9664\u5931\u8D25")})},lt=function(){(0,V.uz)(i.goodsid).then(function(e){if(e.data.length>0){gt(e.data);var a=e.data.reduce(function(o,l){return o.sort>l.sort?o:l});Ot(a.sort);var n={attributes:[]};C(n)}else C([]),gt([])})},re=function(e){qt("block"),ye(e).then(function(a){oa(a.data)})},Ea=function(e){O([]);var a=!1;D.goodsAttributeList.forEach(function(n){var o=n.goodsAttributeValueList.find(function(l){return l.check==!0});o!=null?a=!0:a=!1}),a?(It(""),e?(pt(e),yt(e),At(e,"",null),re(e),jt(!0)):(bt(""),jt(!1),qt("none"),pt(""),yt(""))):T.default.error("\u8BF7\u9009\u62E9\u5C5E\u6027")},xa=function(e){X(e)},Va=function(e){O(e)},Fa=function(e){O(e)},Ta=function(){var e=!0,a=[],n="\u6CA1\u6709\u8981\u4FDD\u5B58\u7684\u6570\u636E\u6216\u6570\u636E\u683C\u5F0F\u4E0D\u6B63\u786E";vt.forEach(function(o){var l={};l.deviceId=J,l.id=o.id,l.stepName=o.stepName,l.chnologyId=o.chnologyId,l.technologyType=o.technologyType,mt!="add"&&(l.sort=o.sort),o.optiondata.length==0?e=!1:l.actionJson=JSON.stringify(o.optiondata),o.optiondata.forEach(function(r){var h=o.propsdata.find(function(g){return g.id==r.technologyactionId});h?(h.actionType=="select"&&r.actionValue==""&&(e=!1),h.actionType=="digit"&&(r.actionValue===""||r.actionValue===null)&&(e=!1),h.actionType=="text"&&(r.actionValue===""||r.actionValue===null)&&(e=!1),h.actionType=="textarea"&&(r.actionValue===""||r.actionValue===null)&&(e=!1)):r.actionValue===""&&(e=!1)}),l.goodsId=i.goodsid,l.warehousrTemplateId=Ct,l.goodsAttributeId=m.join(","),o.chnologyId==""&&(e=!1),(J==null||J=="")&&(e=!1,n="\u8BF7\u9009\u62E9\u8BBE\u5907"),(Ct==null||Ct=="")&&(e=!1,n="\u8BF7\u9009\u62E9\u4ED3\u4F4D\u6A21\u677F"),(l.goodsAttributeId==null||l.goodsAttributeId=="")&&(e=!1,n="\u8BF7\u9009\u62E9\u5546\u54C1\u5C5E\u6027"),a.push(l)}),a.length>0&&e?(mt=="add"?(0,V.XB)(a).then(function(o){o.data?(T.default.success("\u4FDD\u5B58\u6210\u529F"),O([]),lt(),Y.current.reload()):T.default.error("\u4FDD\u5B58\u5931\u8D25")}):(0,V.uR)(a).then(function(o){o.data?(T.default.success("\u4FDD\u5B58\u6210\u529F"),O([]),lt(),Y.current.reload()):T.default.error("\u4FDD\u5B58\u5931\u8D25")}),ot(D),X("view"),Ye(!1),Xt("add")):T.default.error(n)},ka=function(e){At(de.deviceId,"edit",de),X("update"),nt(!1)},Da=function(){nt(!1)},wa=function(e){X("add"),bt(e),It(e),(0,V.uz)(i.goodsid).then(function(a){a.data.forEach(function(n){n.goodsAttributeId===m.map(function(o,l){return l===m.length-1?o:"".concat(o,",")}).join("")&&n.deviceId===J&&n.warehousrTemplateId===e&&(pa(n),nt(!0))})})},se=function(e){e.target.closest(".ant-popover-inner")||nt(!1)},Na=[{title:"\u4E3B\u952E",dataIndex:"id",hideInSearch:!0,hideInTable:!0,tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key"},{title:"\u8BBE\u5907\u540D\u79F0",dataIndex:"deviceName",hideInSearch:!0},{title:"\u5C5E\u6027\u540D\u79F0",dataIndex:"technologyName",valueType:"textarea",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",fixed:"right",render:function(e,a){return[(0,t.jsx)(rt.Z,{type:"primary",title:"\u662F\u5426\u9700\u8981\u5C06\u5F53\u524D\u5C5E\u6027\u590D\u5236",okText:"\u662F",cancelText:"\u5426",onConfirm:(0,H.Z)((0,B.Z)().mark(function n(){var o;return(0,B.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return o={OldgoodsId:a.goodsId,goodsAttributeId:a.goodsAttributeId,NewgoodsId:i.goodsid,DevideId:J,NewgoodsAttributeId:m.join(",")},r.next=3,(0,V.IE)(o).then(function(h){h.succeeded?(T.default.success("\u590D\u5236\u6210\u529F"),O([]),lt(),Zt(!1),Xt("add"),ue.current.reload()):T.default.error(h.errors)});case 3:case"end":return r.stop()}},n)})),onCancel:!0,children:(0,t.jsx)("a",{href:"#",children:"\u590D\u5236"})},"primary")]}}],Ba=[{title:"\u4E3B\u952E",dataIndex:"id",hideInSearch:!0,hideInTable:!0,tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key"},{title:"\u540D\u79F0",dataIndex:"deviceName"},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",fixed:"right",render:function(e,a){return[(0,t.jsx)("a",{type:"primary",onClick:function(o){ja(o,a)},children:"\u7F16\u8F91"},"primary"),(0,t.jsx)(rt.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(o){Aa(o,a.deviceId,a.goodsAttributeId,a.warehousrTemplateId)},onCancel:!0,children:(0,t.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(et.Z,{bodyStyle:{padding:15},children:[(0,t.jsx)("div",{style:{fontSize:16,marginBottom:5,color:"#1890ff",fontWeight:600},children:"\u5546\u54C1\u4FE1\u606F"}),(0,t.jsx)("div",{style:{float:"left"},children:(0,t.jsx)("img",{style:{width:100,height:100},src:D.imgUrl})}),(0,t.jsx)(Vt.Z,{style:{float:"left",width:"71%",marginLeft:"10px"},labelStyle:{fontSize:16,fontWeight:600},children:j.map(function(s,e){return(0,t.jsx)(Vt.Z.Item,{label:s.label,children:s.children},e)})})]}),(0,t.jsxs)(et.Z,{bodyStyle:{padding:15},children:[(0,t.jsx)("div",{style:{fontSize:16,marginBottom:5,color:"#1890ff",fontWeight:600},children:"\u5546\u54C1\u5C5E\u6027"}),D.goodsAttributeList==null||D.goodsAttributeList==""?(0,t.jsxs)("div",{style:{fontSize:"12px",marginLeft:10},children:["\u5F53\u524D\u5546\u54C1\u7684\u5DE5\u827A\u5206\u7C7B\u8FD8\u672A\u914D\u7F6E\u5C5E\u6027\u70B9\u51FB\u8DF3\u8F6C ",(0,t.jsx)("a",{type:"primary",onClick:function(){st.m8.push({pathname:"/database/goods/goodstypemanage"})},children:"\u6DFB\u52A0\u5C5E\u6027"},"primary")]}):D.goodsAttributeList.map(function(s,e){return(0,t.jsx)("div",{style:{marginLeft:10},children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{style:{marginRight:10},children:[" ",(0,t.jsx)(ve.Z,{color:"blue",style:{fontSize:14,fontWeight:600},children:s.attributeName}),"\uFF1A"]}),(0,t.jsx)("span",{children:(0,t.jsx)(xt.ZP.Group,{name:"radiogroup"+e,buttonStyle:"solid",onChange:Ia,value:s.defalutvalue,children:s.goodsAttributeValueList.map(function(a,n){return(0,t.jsx)(xt.ZP.Button,{name:n,value:a.goodsAttributeValuId,style:{marginRight:22,marginTop:10},children:a.attributeValue},n)})})})]})})})]}),(0,t.jsx)(et.Z,{bodyStyle:{padding:15},children:(0,t.jsxs)("div",{style:{fontSize:16,marginBottom:5,color:"#1890ff",fontWeight:600},children:[(0,t.jsxs)("span",{style:{float:"left"},children:["\u9009\u62E9\u8BBE\u5907\uFF1A",(0,t.jsx)(R.Z,{showSearch:!0,allowClear:!0,style:{width:200,marginRight:10},value:_e,placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907",optionFilterProp:"children",filterOption:function(e,a){var n;return((n=a==null?void 0:a.label)!==null&&n!==void 0?n:"").includes(e)},filterSort:function(e,a){var n,o;return((n=e==null?void 0:e.label)!==null&&n!==void 0?n:"").toLowerCase().localeCompare(((o=a==null?void 0:a.label)!==null&&o!==void 0?o:"").toLowerCase())},onChange:Ea,options:ze})]}),(0,t.jsxs)("span",{style:{float:"left",width:"30%",display:la},children:["\u9009\u62E9\u4ED3\u4F4D\u6A21\u677F\uFF1A",(0,t.jsx)(rt.Z,{title:"\u8BE5\u5546\u54C1\u5C5E\u6027\u7684\u5DE5\u827A\u5DF2\u5B58\u5728\uFF0C\u662F\u5426\u9700\u8981\u7F16\u8F91\uFF1F",visible:ma,onConfirm:ka,onCancel:Da,okText:"\u7F16\u8F91",cancelText:"\u53D6\u6D88",children:(0,t.jsx)(R.Z,{style:{width:"50%"},value:ua,allowClear:!0,showSearch:!0,filterOption:function(e,a){var n;return((n=a==null?void 0:a.label)!==null&&n!==void 0?n:"").includes(e)},filterSort:function(e,a){var n,o;return((n=e==null?void 0:e.label)!==null&&n!==void 0?n:"").toLowerCase().localeCompare(((o=a==null?void 0:a.label)!==null&&o!==void 0?o:"").toLowerCase())},onChange:wa,children:St==null?void 0:St.map(function(s,e){return(0,t.jsx)(R.Z.Option,{index:e,value:s.id,children:s.templateName},s.id)})})})]}),(0,t.jsx)("span",{children:sa&&(0,t.jsx)(tt.Z,{type:"primary",ghost:!0,onClick:Sa,children:"\u590D\u5236"})})]})}),(0,t.jsxs)(et.Z,{bodyStyle:{padding:15},children:[(0,t.jsx)("div",{style:{fontSize:16,marginBottom:5,color:"#1890ff",fontWeight:600},children:"\u5DE5\u827A\u8BBE\u8BA1"}),(0,t.jsxs)(at.Z,{split:"vertical",children:[(0,t.jsxs)(at.Z,{title:"\u7F16\u8F91\u5DE5\u827A",type:"inner",colSpan:"33%",bodyStyle:{padding:5},headerBordered:!0,headStyle:{paddingLeft:"5%"},extra:[(0,t.jsx)(tt.Z,{type:"primary",ghost:!0,onClick:function(){Ta()},children:"\u4FDD\u5B58\u5DE5\u827A"})],children:[(0,t.jsx)("div",{style:{textAlign:"center",marginBottom:10,color:"brown"},children:I}),(0,t.jsx)(Ee,{devideId:J,goodsId:i.goodsid,goodsAttributeId:m.join(","),disabled:Xe,fromdata:vt,maxsort:Be,UpdataStatus:mt,onUpdataStatus:xa,ontechnologyChange:Fa,onSaveClick:Va,goodstechnologydata:L,technologyattralldata:ht,batchingdata:Oe})]}),(0,t.jsx)(at.Z,{title:"\u67E5\u770B\u5DE5\u827A",type:"inner",headStyle:{paddingLeft:"45%",paddingBottom:"2.1%"},bodyStyle:{padding:5},pagination:{defaultPageSize:10},search:{labelWidth:200},children:(0,t.jsx)(kt.ZP,{headerTitle:"",actionRef:Y,rowKey:"id",pagination:{defaultPageSize:10},search:{labelWidth:120},request:function(){var s=(0,H.Z)((0,B.Z)().mark(function e(a){var n,o;return(0,B.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return n=[],o=0,a.goodsId=i.goodsid,r.next=5,(0,V.o5)(a).then(function(h){n=h.data.data,o=h.data.total});case 5:return r.abrupt("return",{data:n,success:!0,total:o});case 6:case"end":return r.stop()}},e)}));return function(e){return s.apply(this,arguments)}}(),columns:Ba,rowSelection:!1})})]})]}),(0,t.jsx)(ge.Z,{title:"\u5DE5\u827A\u5C5E\u6027",open:ga,onCancel:Ca,width:1040,destroyOnClose:!0,bodyStyle:{padding:"32px 40px 1px 48px"},visible:fa,footer:null,children:(0,t.jsx)(kt.ZP,{pagination:!1,actionRef:ue,request:function(){var s=(0,H.Z)((0,B.Z)().mark(function e(a){var n;return(0,B.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return n=[],a.deviceId=J,l.next=4,(0,V.Ny)(a).then(function(r){n=r.data});case 4:return l.abrupt("return",{data:n,success:!0});case 5:case"end":return l.stop()}},e)}));return function(e){return s.apply(this,arguments)}}(),columns:Na})})]})},Ve=xe,Ya=d(9669),Qa=ce.Z.Step,qa=R.Z.Option,_a=R.Z.OptGroup,to=ut.Z.TextArea,Fe=function(i){var k;return(0,c.useEffect)(function(){},[]),(0,t.jsx)(he.ZP,{host:!0,header:{title:[(0,t.jsxs)("a",{onClick:function(){st.m8.push({pathname:"/database/goods/newgoods"})},children:[(0,t.jsx)(fe.Z,{}),"\u8FD4\u56DE"]},"back")],breadcrumb:{}},title:"\u5546\u54C1\u5DE5\u827A",children:(0,t.jsx)(Ve,{goodsid:(k=i.location.query.values)===null||k===void 0?void 0:k.id})})},Te=Fe},13411:function(_){function G(d){var dt=new Error("Cannot find module '"+d+"'");throw dt.code="MODULE_NOT_FOUND",dt}G.keys=function(){return[]},G.resolve=G,G.id=13411,_.exports=G},62183:function(){},13024:function(){},62715:function(){},13611:function(){},28353:function(){},1210:function(){},43454:function(){}}]);
|