1var Qe=Object.defineProperty;var Be=Object.getOwnPropertySymbols;var Xe=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable;var Ge=(P,_,k)=>_ in P?Qe(P,_,{enumerable:!0,configurable:!0,writable:!0,value:k}):P[_]=k,Re=(P,_)=>{for(var k in _||(_={}))Xe.call(_,k)&&Ge(P,k,_[k]);if(Be)for(var k of Be(_))Ze.call(_,k)&&Ge(P,k,_[k]);return P};var M=(P,_,k)=>new Promise((F,L)=>{var N=b=>{try{V(k.next(b))}catch(y){L(y)}},q=b=>{try{V(k.throw(b))}catch(y){L(y)}},V=b=>b.done?F(b.value):Promise.resolve(b.value).then(N,q);V((k=k.apply(P,_)).next())});import{u as re,d as Ke,c as et,b as tt,bj as K,n as le,bm as ie,ao as qe,_ as Ve,e as ot,g3 as at,g4 as st}from"./entry/index-DhGbs7Im.js";import{P as it,d as nt,C as rt}from"./index-CbUsANzB.js";import{p as lt}from"./pagination-jda3AZD5.js";import{g as ct}from"./PriceUnit-C4s4BFUE.js";import{h as A,n as D,B as U,ai as ze,H as ut,J as dt,t as De,M as pt,R as mt,i as ft,O as ht,aj as vt,au as gt,d as Ue}from"./antd-Beyd_mrh.js";import{u as yt}from"./exhibitProduct-CfiwtyVk.js";import wt from"./NoInstallPluginModal-DuDwRNGa.js";import St from"./CategorySelectModal-EBPB-IeA.js";import{F as It}from"./FunctionButton-nPBeKd_H.js";import{_ as Pt}from"./DetailButton.vue_vue_type_script_setup_true_lang-I516J87P.js";import{M as kt}from"./MonitorButton-DNi72XlN.js";import{A as Ct}from"./AddProduct-Dt6Bnb_U.js";import{S as _t}from"./ShopSelectModal-DSNL1Euy.js";import{G as bt}from"./GoodsInfoExhibit-BDvxYlB6.js";import{_ as xt}from"./DescWordOrName.vue_vue_type_script_setup_true_lang-OFcVOkKK.js";import Ot from"./DescWordOrNameV2-DWINUAwM.js";import Lt from"./TextEditor-C72nqyD0.js";import Tt from"./CategorySelectProvider-BiQhYJ3E.js";import Et from"./CategorySelectDisplay-DSEpt5zy.js";import Mt from"./OfferImageModle-Ci2lezbb.js";import{_ as Rt}from"./ExhibitAgreement.vue_vue_type_script_setup_true_lang-4A7axFn5.js";import{B as Ut}from"./BatchPropertyEdit-DWC2eEGN.js";import{_ as Nt}from"./StockSelect-DSaF_PHf.js";import{C as Dt}from"./currency-DS5KaYyF.js";import{g as $t}from"./index-BIe4wexZ.js";import{T as At}from"./TrafficWordsModel-DWHvM_2p.js";import{d as Ft,f as x,r as ce,c as $e,w as Wt,l as te,y as ee,_ as O,a3 as R,k as u,a0 as d,a1 as g,G as I,a2 as v,u as t,ae as oe,F as ne,a4 as Ae,a5 as Ye,a6 as He,o as Bt,$ as Ne,a9 as Gt}from"./vue-Bb-9zp61.js";import"./BasicForm.vue_vue_type_style_index_0_lang-y7Enp8xJ.js";import"./index-C7KdVkBX.js";import"./uuid-Wz3jGs4_.js";import"./download-6C1_yPM0.js";import"./index-BsT5Rbwb.js";import"./index-BlScBtCP.js";import"./useContentViewHeight-CmLlfent.js";import"./vis2-BkDpMiTu.js";import"./CustomColumnsField.vue_vue_type_style_index_0_scoped_5147e40a_lang-C6U-6pRN.js";import"./zh_CN-DhrHktQ9.js";import"./zh_CN-p9-E6sX4.js";import"./yes-DFFI3Peg.js";import"./PermissionPopover.vue_vue_type_script_setup_true_lang-WfMiLf9Q.js";import"./sortable.esm-CoO8jRpa.js";import"./index-DVdeIfu0.js";import"./useECharts-CkAxj0fy.js";import"./exportTable-BBcS2dAm.js";import"./i-new-DxJhx71N.js";import"./GoodsInfo-CuvFTc4V.js";import"./no-img2-DtZnFFps.js";import"./no-img4-D3itmADn.js";import"./sl-B8oqPvJC.js";import"./outWeb-C7Di54nc.js";import"./CategoryInfo-7NloVdd7.js";import"./no-img1-BAvZd4Hn.js";import"./EditScreeningModel-shEZm-U9.js";import"./ViewExample-DiWHyHdq.js";import"./AddMonitorModal-ShNbuKFs.js";import"./group-DUKyW52x.js";import"./ShopSelect-jUdy0DXK.js";import"./CreateShopAuth-05d49F7K.js";import"./TrafficKeywords-SAt3TTmT.js";import"./EChartsLine-CLiGYFHG.js";import"./ProductTopGoods.vue_vue_type_script_setup_true_lang-CdCHgEji.js";import"./ProductTipsShow-CmAyv7HG.js";import"./useVisibleLoad-BDBccW5p.js";import"./format-BpgIUcNY.js";import"./YandexIconTip-C0zNS7Mv.js";import"./SubjectProductTopGoods.vue_vue_type_script_setup_true_lang-B4llt1by.js";import"./useSortable-f5KprXuM.js";import"./imageTranslate-DiLh4I1d.js";import"./no-img3-DStckEDX.js";import"./AddImgUrl-CVGwq19-.js";import"./SameImagesDrawer.vue_vue_type_script_setup_true_lang-DI_H0QBX.js";const Je=P=>(Ye("data-v-6f8a274d"),P=P(),He(),P),jt={class:"product-setup__modal w-auto mx-auto"},Kt={class:"setup-query__list mb-24px"},qt={class:"mr-12px"},Vt={class:"ml-12px mr-12px"},zt=Je(()=>g("span",{class:"ml-12px mr-12px"},"-",-1)),Yt={key:0},Ht={key:0,class:"text-red-500"},Jt={key:0},Qt={key:0},Xt=["onClick"],Zt={key:1},eo={class:"text-12px text-[#4D4D4D]"},to=Je(()=>g("span",null,"ä»·æ ¼:",-1)),oo={class:"product-setup__footer"},ao=Ft({__name:"ExhibitProductSetupV2",props:{source:{type:String,default:""},oldAuthId:{type:[String,Number],default:""},shopInfo:{type:Object,default:()=>({})},productIds:{type:Array,default:()=>[]},productIdsObj:{type:Array,default:()=>[]},isEdit:{type:Boolean,default:!1},defaultButtonText:{type:String,default:""}},emits:["onPrev","onSetupSuccess"],setup(P,{expose:_,emit:k}){const F=x(!1),L=x(!1),N=x(!1),q=x(null),V=x(null),b=x([]),y=x([]),{t:h}=re(),ge=Ke(),ue=et(),z=x(!1),Y=tt(),T=P,W=k,f=x([]),$=x("");ce({});const a=ce({modifiedPrice:[],modifiedOriginPrice:[],warehouse:[],stock:[],brand:[],originPrice:[],warehouseName:[],weight:[],name:[],images:[],sourceImages:[],dimension:[],description:[]}),E=ce({keyword:"",minPrice:"",maxPrice:""}),ye=[{key:"1",label:"view.onSales.setupProduct.followBrand"},{key:"0",label:"view.onSales.setupProduct.selectBrand"}],m=x([]),{createMessage:C,createConfirm:ae}=le(),de=$e(()=>[{title:h("view.onSales.columns.title.productInfo"),key:"goodsInfo",width:200,slots:{customRender:"goodsInfo"},helpMessage:h("view.onSales.tips.productInfo")},{title:"䏿¶ååå¾ç",key:"imagesInfo",align:"center",width:120,requiredKey:!0,slots:{customRender:"imagesInfoRender"},helpMessage:"䏿¶ååå¾ç,宿¹å»ºè®®ä¸ä¼ æ°é为15å¼ "},{title:"ååæ é¢",key:"name",align:"center",width:200,requiredKey:!0,sameLine:!0,helpMessage:"ååæ é¢,æå¤§å¯è¾å
¥é¿åº¦500å符串",slots:{customRender:"nameRender"}},{title:h("view.onSales.columns.title.modifiedPrice"),key:"modifiedPrice",align:"center",width:120,slots:{customRender:"modifiedPirce"},helpMessage:h("view.onSales.tips.modifiedPrice")},{title:h("view.onSales.columns.title.modifiedOriginPrice"),key:"modifiedOriginPrice",align:"center",width:120,slots:{customRender:"modifiedOriginPrice"},helpMessage:h("view.onSales.tips.modifiedOriginPrice")},{title:h("view.onSales.columns.title.brand"),helpMessage:h("view.onSales.tips.selectBrand"),key:"brand",align:"center",width:120,slots:{customRender:"brand"}},{title:"ååæè¿°",helpMessage:"ååæè¿°ä¿¡æ¯ï¼æå¤§å¯è®¾å®1700个å符",key:"description",align:"center",width:200,sameLine:!0,requiredKey:!0,slots:{customRender:"descriptionRender"}},{title:"å
³é®è¯å䏻颿 ç¾",key:"trafficWords",align:"center",width:200,slots:{customRender:"trafficWords"}},{title:"å«å
è£
éé",key:"weight",align:"center",width:120,sameLine:!0,requiredKey:!0,helpMessage:"ååå
å«å
è£
çéé,åä½å
",slots:{customRender:"weightRender"}},{title:"å
è£
é¿*宽*é«",key:"dimension",align:"center",width:140,sameLine:!0,requiredKey:!0,helpMessage:"ååå
å«å
è£
çé¿å®½é«,å使¯«ç±³",slots:{customRender:"dimensionRender"}},{title:h("view.onSales.columns.title.action"),key:"action",width:100,align:"center",slots:{customRender:"action"}}]),we=$e(()=>$t(de.value));Wt(()=>z.value,()=>{ue.setExhibitAgreement(z.value)});function Se(r){const{key:s,value:o}=r;y.value[s]&&(a.images[s]=o.newOfferImage,a.sourceImages[s]=o.newSourceImages)}function X(){window.open("https://ozon.menglar.com/tools/","_blank")}function B(r,s){a[r]&&(a[r]=a[r].map(()=>s))}function pe(r,s,o){a[r]&&(a[s]=a[r].map(e=>(e*o/100).toFixed(2)))}function Ie(r){const{editField:s,priceType:o,editInfo:e}=r;
1s==="price"?(o==="number"&&(e.batchPrice&&B("modifiedPrice",e.batchPrice),e.batchOrginPrice&&B("modifiedOriginPrice",e.batchOrginPrice)),o==="percent"&&(e.batchPricePercent&&pe("originPrice","modifiedPrice",e.batchPricePercent),e.batchOrginPricePercent&&pe("originPrice","modifiedOriginPrice",e.batchOrginPricePercent))):s==="stock"?(e.batchWarehouse&&B("warehouse",e.batchWarehouse),e.batchStock&&B("stock",e.batchStock)):s==="brand"&&e.brand&&B("brand",e.brand)}function Pe(r,s){const{value:o,name:e}=s;a.warehouse[r]=o}const H=r=>{r==="dimension"?Object.keys(a==null?void 0:a.dimension[0]).forEach(s=>{a==null||a.dimension.forEach((o,e)=>{o[s]=a==null?void 0:a.dimension[0][s]})}):B(r,a[r][0])};function ke(r){if(r&&r.metaData&&r.metaData.attributes){const s=r.metaData.attributes.filter(o=>o.id==23171);if(s&&s.length>0&&s[0].values&&s[0].values[0].value)return s[0].values[0].value.replace(/\s+/g,",")}return null}function Ce(r){if(r&&r.metaData&&r.metaData.attributes){const s=r.metaData.attributes.filter(o=>o.id==4191);if(s&&s.length>0&&s[0].values&&s[0].values[0].value)return s[0].values[0].value}return null}function me(r){return M(this,null,function*(){try{L.value=!0,f.value=r.productIds,$.value=r.currency;const s={skuIdList:f.value,idLinkName:E.keyword||void 0,minPrice:E.minPrice||void 0,maxPrice:E.maxPrice||void 0};r.currency&&(s.currency=r.currency);const o=yield K.getProductList(s);if(o.code===0){y.value=o.data||[];const e=b.value.length>0?b.value[0]:null;y.value.forEach((i,c)=>{const w=i.price,S=ke(i),l=Ce(i);i.descWord=S||"";const p=i.metaData||{};a.originPrice[c]=w,a.modifiedPrice[c]=(w*.9).toFixed(2),a.modifiedOriginPrice[c]=(w*1.2).toFixed(2),a.warehouse[c]=(e==null?void 0:e.warehouse_id)||"0",a.warehouseName[c]=(e==null?void 0:e.name)||"",a.stock[c]=99,a.brand[c]=String(i.isBrand||0),a.weight[c]=p.weight,a.name[c]=p.name,a.description[c]=l,p.images&&p.images.length?(a.images[c]=p.images,a.sourceImages[c]=[]):(a.images[c]=[],a.sourceImages[c]=[]),a.dimension[c]={depth:p.depth,width:p.width,height:p.height}})}else C.warning(o.msg);L.value=!1}catch(s){L.value=!1}})}function _e(){Z()}function J(){F.value=!1,W("onPrev")}function Q(r,s){a[s][r]=be(a[s][r])}function be(r){var s=r,o=s.substr(0,1),e=s.substr(1,1);if(s.length>1&&o==0&&e!="."&&(s=s.substr(1,1)),s.indexOf(".")!=-1){var i=s.substr(s.indexOf(".")+1);i.indexOf(".")!=-1&&(s=s.substr(0,s.indexOf(".")+i.indexOf(".")+1))}return s=s.replace(/[^\d^\.]+/g,""),s=s.replace(/^\D*([0-9]\d*\.?\d{0,2})?.*$/,"$1"),s}const xe=A(Le,300),se=A(Oe,300);function Oe(){return M(this,null,function*(){var s;try{if(!z.value)return C.warning(h("view.exhibitRecord.tips.exhibitReadAndAgree"));if(L.value||y.value.length===0)return;N.value=!0;const o=[];a.warehouse.forEach((i,c)=>{const w=b.value.find(S=>i===S.warehouse_id);a.warehouseName[c]=(w==null?void 0:w.name)||""});var r=!1;if(y.value.forEach((i,c)=>{if(Number(a.modifiedOriginPrice[c])<=Number(a.modifiedPrice[c]))throw r=!0,A(C.error("请确ä¿ä¿®æ¹åçååä»·æ ¼ä½äºæåå线价ï¼å¦åä¸è´§å°è¢«é©³å"),1e3),{};if(a.modifiedPrice[c]==0||a.modifiedOriginPrice[c]==0)throw r=!0,A(C.error("ä¿®æ¹ååä»·æ ¼ææåå线价åï¼ä»·æ ¼å¿
须大äº0"),1e3),{};if(!a.images[c]||a.images[c].length==0)throw r=!0,A(C.error("ååå¾çä¸è½ä¸ºç©º"),1e3),{};if(!i.catId)throw r=!0,A(C.error("å卿ªéæ©ä¸è´§ç±»ç®çåå"),1e3),{};if(!a.weight[c]||a.weight[c]==0)throw r=!0,A(C.error("ååééä¸è½ä¸ºç©º"),1e3),{};if(!a.description[c])throw r=!0,A(C.error("ååæè¿°ä¸è½ä¸ºç©º"),1e3),{};if(!a.dimension[c].height||!a.dimension[c].width||!a.dimension[c].depth)throw r=!0,A(C.error("åå尺寸ä¸è½ä¸ºç©º"),1e3),{};o.push({skuId:i.skuId,price:a.modifiedPrice[c],originalPrice:a.modifiedOriginPrice[c],description:a.description[c],isBrand:a.brand[c],id:i.id,metaData:{name:a.name[c],images:a.images[c],weight:a.weight[c],height:a.dimension[c].height,width:a.dimension[c].width,depth:a.dimension[c].depth}})}),r)return!1;if(T.source==="shop"){let i=y.value.map(c=>{const w=o.find(S=>S.skuId===c.skuId);return w?Re(Re({},c),w):c});return he(i),!1}const e=yield K.editProductList(o);if(e.code===0){const i={waitDisplayIdList:o.map((w,S)=>{var l,p,n,j;return{waitDisplayId:w.id,titleWord:(l=y.value[S])!=null&&l.titleWord?y.value[S].titleWord:void 0,descWord:(p=y.value[S])!=null&&p.descWord?y.value[S].descWord:void 0,catId:(n=y.value[S])!=null&&n.resetCatId?y.value[S].catId:void 0,typeId:(j=y.value[S])!=null&&j.resetCatId?y.value[S].typeId:void 0}}),authId:(s=T.shopInfo)==null?void 0:s.id,userId:Y.getUserInfo.user.id},c=yield K.pushProduct(i);
1if(c.code===0)N.value=!1,ve(),ae({iconType:"warning",title:()=>te("span",h("sys.title.warmReminder")),content:()=>te("span",h("sys.app.visitorsMessage1")),onOk:()=>M(this,null,function*(){ee(()=>{W("onSetupSuccess")})}),onCancel(){ue.setVisibleGoods(!1),ee(()=>{W("onSetupSuccess"),ge("/storeanalysis/store/loadingRecord")})},cancelText:h("sys.title.continueUp"),okText:h("sys.title.continue")});else if(e.code===90100){const{createWarningModal:w}=le(),{t:S}=re();w({title:S("sys.app.logoutTip"),content:S("service.shop.upTips")})}else C.warning(c.msg)}else C.warning(e.msg);N.value=!1}catch(o){N.value=!1}})}function fe(r){const{productsItemsTitle:s,keywordsItems:o,productsCurrented:e}=r;r!=null&&r.productsCurrented&&y.value.forEach((i,c)=>{e.find(S=>S===i.skuId)&&(i.descWord=o&&o.join(";"),i.titleWord=s&&s.join(";"))})}function he(r){return M(this,null,function*(){try{let s=r.map(e=>{var i;return{skuId:e.skuId,price:e.price,originalPrice:e.originalPrice,warehouseId:e.warehouseId,warehouseName:e.warehouseName,inventory:e.stocks,isBrand:e.isBrand,authId:(i=T.shopInfo)==null?void 0:i.id,offerId:e.offerId,titleWord:e.titleWord,descWord:e.descWord,oldAuthId:T.oldAuthId}});const o=yield K.pushItem(s);if(o.code===0)ve(),ae({iconType:"warning",title:()=>te("span",h("sys.title.warmReminder")),content:()=>te("span",h("sys.app.visitorsMessage1")),onOk:()=>M(this,null,function*(){ee(()=>{W("onSetupSuccess")})}),onCancel(){ue.setVisibleGoods(1),ee(()=>{W("onSetupSuccess"),ge("/storeanalysis/store/loadingRecord")})},cancelText:h("sys.title.continueUp"),okText:h("sys.title.continue")}),N.value=!1;else if(o.code===90100){const{createWarningModal:e}=le(),{t:i}=re();e({title:i("sys.app.logoutTip"),content:i("service.shop.upTips")})}else N.value=!1,C.warning(o.msg)}catch(s){N.value=!1}})}function Le(){ee(()=>{E.keyword="",E.minPrice="",E.maxPrice="",q.value.onReset(),Z()})}function Te(r){return M(this,null,function*(){try{m.value[r]=!0,Object.keys(a).forEach(s=>{a[s].splice(r,1)}),y.value.splice(r,1),m.value[r]=!1}catch(s){}})}function Z(){return M(this,null,function*(){var r,s;try{L.value=!0;const o={authId:(r=T.shopInfo)==null?void 0:r.id,secret:(s=T.shopInfo)==null?void 0:s.secret},e=yield K.getStockList(o);if(e.code===0){b.value=e.data||[];const i={productIds:T.productIds,currency:T.shopInfo.currency};if(T.source==="shop"){G(i);return}me(i)}else C.warning(e.msg),L.value=!1}catch(o){L.value=!1}})}function Ee(r,s){const o={skuId:"skuId",priceRmb:"price",currency:"currency"};return r.map(i=>(i.currency=s,Object.entries(o).reduce((c,[w,S])=>(i.hasOwnProperty(w)&&(c[S]=i[w]),c),{})))}function G(r){return M(this,null,function*(){try{L.value=!0,f.value=r.productIds,$.value=r.currency;const s=Ee(T.productIdsObj,r.currency);y.value=T.productIdsObj||[];const o=yield K.rmbConversion(s);if(o.code===0&&o.data){const e=b.value.length>0?b.value[0]:null;y.value.forEach((i,c)=>{i.price=o.data[i.skuId];const w=i.price;a.originPrice[c]=w,a.modifiedPrice[c]=(w*.9).toFixed(2),a.modifiedOriginPrice[c]=(w*1.2).toFixed(2),a.warehouse[c]=(e==null?void 0:e.warehouse_id)||"0",a.warehouseName[c]=(e==null?void 0:e.name)||"",a.stock[c]=99,a.brand[c]=String(i.isBrand||0),i.titleWord="",i.descWord=""})}setTimeout(()=>{L.value=!1},500)}catch(s){L.value=!1}})}function Me(){Z(),F.value=!0}function ve(){F.value=!1}return _({setProductList:me,onModalShow:Me}),(r,s)=>(O(),R(ne,null,[u(t(pt),{open:F.value,"onUpdate:open":s[4]||(s[4]=o=>F.value=o),title:t(h)("view.onSales.setupProduct.title"),style:{top:"20px"},width:"100%","wrap-class-name":"full-modal",footer:null,destroyOnClose:!0},{default:d(()=>[g("div",jt,[g("div",{class:"no-result__tips"},[I(" 注ï¼å½åä»·æ ¼ä»
ä¾åèï¼å®é
ä»·æ ¼å¯è½å æ¶é´å·®åæ±çæ³¢å¨èææå·®å¼ã为确ä¿åçå®ä»·ï¼å»ºè®®æ¨æ ¹æ®ååææ¬è¿è¡è®¾å®ãä½¿ç¨ "),g("a",{onClick:X},"èå¦ozonå¨çº¿å®ä»·ç²¾çµ"),I(" ï¼å¯ä¸é®èªå¨è®¡ç®ææ¬ï¼å¸®å©æ¨æ´ææå°è¿è¡å®ä»·ã ")]),g("div",Kt,[g("span",qt,v(t(h)("view.onSales.title.productSearch")),1),u(t(D),{value:E.keyword,"onUpdate:value":s[0]||(s[0]=o=>E.keyword=o),placeholder:t(h)("view.onSales.tips.productSearch"),style:{width:"300px"}},null,8,["value","placeholder"]),g("span",Vt,v(t(h)("view.onSales.title.price")),1),u(t(D),{value:E.minPrice,"onUpdate:value":s[1]||(s[1]=o=>E.minPrice=o),placeholder:t(h)("view.onSales.title.minPrice"),suffix:t(ie)($.value),style:{width:"170px"},maxLength:10},null,8,["value","placeholder","suffix"]),zt,u(t(D),{value:E.maxPrice,"onUpdate:value":s[2]||(s[2]=o=>E.maxPrice=o),placeholder:t(h)("view.onSales.title.maxPrice"),suffix:t(ie)($.value),style:{width:"170px"},maxLength:10},null,8,["value","placeholder","suffix"]),u(t(U),{type:"primary",class:"ml-12px",onClick:_e},{default:d(()=>[I(v(t(h)("view.onSales.title.search")),1)]),_:1})]),u(Ut,{ref_key:"batchPropertyEditRef",ref:q,"shop-info":P.shopInfo,currency:$.value,onOnEdit:Ie},null,8,["shop-info","currency"]),u(Tt,null,{default:d(()=>[u(t(ze),{class:"mt-24px min-h-450px",sticky:"",loading:L.value,"data-source":y.value,columns:de.value,rowKey:o=>o.skuId,scroll:{x:we.value,y:430},ref:"setupTableRef",pagination:!1},{headerCell:d(({column:o})=>[o.helpMessage?(O(),R("span",Yt,[o.requiredKey?(O(),R("span",Ht,"*")):oe("",!0),u(t(qe),{class:"ml-2",text:o.helpMessage,maxWidth:"300px"},{default:d(()=>[Array.isArray(o.titles)?(O(),R("span",Jt,[(O(!0),R(ne,null,Ae(o.titles,e=>(O(),R("section",null,v(e),1))),256))])):(O(),R(ne,{key:1},[o.sameLine?(O(),R("span",Qt,[I(v(o.title)+" ",1),g("div",{class:"primary-color text-12px",onClick:e=>H(o.key)},"åé¦è¡",8,Xt)])):(O(),R("span",Zt,v(o.title),1))],64))]),_:2},1032,["text"])])):oe("",!0)]),goodsInfo:d(({record:o})=>[u(bt,{info:{itemName:o.skuName,itemId:o.skuId,url:o.url,imgUrl:o.skuImg,brand:o.brand,skuLocation:o.skuLocation}},{infoExt:d(()=>[g("div",eo,[to,I(" "+v(t(Dt)[$.value]?t(ie)($.value):"")+" "+v(o.price),1)]),u(Et,{categoryPath:o.catNameCn,catId:o.catId,typeId:o.typeId,onCategoryChange:({categoryPath:e,catId:i,typeId:c})=>{o.catNameCn=e,o.resetCatId=!0,o.catId=i,o.typeId=c}},null,8,["categoryPath","catId","typeId","onCategoryChange"])]),_:2},1032,["info"])]),modifiedPirce:d(({record:o,index:e})=>[u(t(D),{value:a.modifiedPrice[e],"onUpdate:value":i=>a.modifiedPrice[e]=i,maxLength:10,suffix:t(ie)($.value),style:{width:"100px"},type:"number",onChange:i=>Q(e,"modifiedPrice"),ref:"modifiedPrice"},null,8,["value","onUpdate:value","suffix","onChange"])]),modifiedOriginPrice:d(({record:o,index:e})=>[u(t(D),{value:a.modifiedOriginPrice[e],"onUpdate:value":i=>a.modifiedOriginPrice[e]=i,maxLength:10,suffix:t(ie)($.value),style:{width:"100px"},type:"number",onChange:i=>Q(e,"modifiedOriginPrice"),ref:"modifiedOriginPrice"},null,8,["value","onUpdate:value","suffix","onChange"])]),warehouse:d(({record:o,index:e})=>[u(Nt,{"default-checked":a.warehouse[e],"use-cache":!0,"cache-list":b.value,onOnChange:i=>Pe(e,i)},null,8,["default-checked","cache-list","onOnChange"])]),stock:d(({record:o,index:e})=>[u(t(D),{value:a.stock[e],"onUpdate:value":i=>a.stock[e]=i,maxLength:10,suffix:t(h)("view.onSales.columns.title.piece"),style:{width:"100px"}},null,8,["value","onUpdate:value","suffix"])]),descriptionRender:d(({record:o,index:e})=>[u(Lt,{value:a.description[e],"onUpdate:value":i=>a.description[e]=i,info:{offerName:a.description[e],name:"ååæè¿°",ozonId:o.skuId},maxLength:1700,index:e,ref:"textEditor"},null,8,["value","onUpdate:value","info","index"])]),nameRender:d(({record:o,index:e})=>[u(xt,{value:a.name[e],"onUpdate:value":i=>a.name[e]=i,info:{offerName:a.name[e],name:"ååæ é¢",ozonId:o.skuId},maxLength:200,index:e,ref:"modifieName"},null,8,["value","onUpdate:value","info","index"])]),imagesInfoRender:d(({record:o,index:e})=>[u(Mt,{info:{offerImage:a.images[e],sourceImages:a.sourceImages[e]},index:e,onOnImgChange:Se},null,8,["info","index"])]),brand:d(({record:o,index:e})=>[u(t(ut),{style:{width:"120px"},placeholder:t(h)("view.onSales.setupProduct.selectBrand"),value:a.brand[e],"onUpdate:value":i=>a.brand[e]=i},{default:d(()=>[(O(),R(ne,null,Ae(ye,i=>u(t(dt),{key:i.key,value:i.key},{default:d(()=>
1[I(v(t(h)(i.label)),1)]),_:2},1032,["value"])),64))]),_:2},1032,["placeholder","value","onUpdate:value"])]),weightRender:d(({record:o,index:e})=>[u(t(D),{value:a.weight[e],"onUpdate:value":i=>a.weight[e]=i,maxLength:10,suffix:"g",style:{width:"100px"}},null,8,["value","onUpdate:value"])]),dimensionRender:d(({record:o,index:e})=>[u(t(D),{value:a.dimension[e].depth,"onUpdate:value":i=>a.dimension[e].depth=i,maxLength:10,suffix:"mm",prefix:"é¿",style:{width:"120px"}},null,8,["value","onUpdate:value"]),u(t(D),{value:a.dimension[e].width,"onUpdate:value":i=>a.dimension[e].width=i,maxLength:10,suffix:"mm",prefix:"宽",style:{width:"120px"}},null,8,["value","onUpdate:value"]),u(t(D),{value:a.dimension[e].height,"onUpdate:value":i=>a.dimension[e].height=i,maxLength:10,suffix:"mm",prefix:"é«",style:{width:"120px"}},null,8,["value","onUpdate:value"])]),trafficWords:d(({record:o,index:e})=>[u(Ot,{value:o.descWord,"onUpdate:value":i=>o.descWord=i,info:{offerName:o.descWord,name:"䏻颿 ç¾",ozonId:o.skuId},maxLength:200,index:e,ref:"modifieName2"},null,8,["value","onUpdate:value","info","index"])]),action:d(({record:o,index:e})=>[u(t(De),{title:"请确认æ¯å¦ç§»é¤å½åååï¼","ok-text":t(h)("view.onSales.tips.yes"),"cancel-text":t(h)("view.onSales.tips.no"),onConfirm:i=>Te(e)},{default:d(()=>[u(t(U),{type:"link",loading:m.value[e]},{default:d(()=>[I(v(t(h)("view.onSales.columns.title.delete")),1)]),_:2},1032,["loading"])]),_:2},1032,["ok-text","cancel-text","onConfirm"])]),_:1},8,["loading","data-source","columns","rowKey","scroll"])]),_:1}),g("div",oo,[u(t(U),{class:"mr-24px",onClick:t(xe)},{default:d(()=>[I(v(t(h)("view.onSales.title.reset")),1)]),_:1},8,["onClick"]),u(t(U),{class:"mr-24px",onClick:J},{default:d(()=>[I(v(t(h)("view.onSales.tips.prev")),1)]),_:1}),u(t(U),{loading:N.value,type:"primary",onClick:t(se)},{default:d(()=>[I(v(P.defaultButtonText||t(h)("view.onSales.tips.submitExhibit")),1)]),_:1},8,["loading","onClick"])]),u(Rt,{checked:z.value,"onUpdate:checked":s[3]||(s[3]=o=>z.value=o)},null,8,["checked"])])]),_:1},8,["open","title"]),u(t(At),{source:"edite",ref_key:"trafficWordsModelRef",ref:V,onOnSubmitSuccess:fe},null,512)],64))}}),so=Ve(ao,[["__scopeId","data-v-6f8a274d"]]),Fe=P=>(Ye("data-v-783c061e"),P=P(),He(),P),io={class:"add-goods__header"},no=Fe(()=>g("h3",{class:"mb-12px"},"ééç®±",-1)),ro={class:"flex mt-20px mb-20px search-condition filter-status items-center"},lo={class:"search-condition"},co={class:"mr-8px"},uo={class:"ml-24px mr-12px"},po={class:"ml-24px mr-12px"},mo={class:"flex mt-20px search-condition"},fo={class:"flex items-center"},ho={class:"ml-20px"},vo={class:"flex justify-between"},go={class:"batch-action"},yo={key:0},wo=Fe(()=>g("span",{class:"text-[#666666]"},"ååä¸è´§æ¬¡æ°ï¼",-1)),So={key:0},Io=Fe(()=>g("br",null,null,-1)),Po={class:"action-list"},je="YYYY-MM-DD",ko="1.1.20",Co={__name:"addGoods",setup(P){const{Group:_,Button:k}=vt,{RangePicker:F}=gt,{changeUnit:L,convert:N,DefaultUnit:q,yuanUnit:V}=ct(),{total:b,sortedInfo:y,pagination:h,loading:ge,currentDataInfo:ue,handleTableChange:z}=lt(),Y=x([]),T=x([]),W=x(),{t:f}=re(),$=Ke(),a=ot(),E=$e(()=>{const l=y.value||{};return[{title:f("view.addProduct.columns.productInfo"),key:"goodsInfo",width:300,slots:{customRender:"goodsInfo"},fixed:"left"},{title:f("view.addProduct.columns.category"),helpMessage:f("view.addProduct.tips.category"),key:"categoryInfo",ellipsis:!0,width:200,slots:{customRender:"categoryInfo"},fixed:"left"},{title:f("view.addProduct.columns.price"),helpMessage:f("view.addProduct.tips.price"),dataIndex:"price",key:"price",align:"center",sorter:(p,n)=>p.price-n.price,sortOrder:l.columnKey==="price"&&l.order,slots:{customRender:"priceInfo"}},{title:f("view.addProduct.columns.addSource"),helpMessage:f("view.addProduct.tips.addSource"),dataIndex:"source",key:"source",align:"center"},{title:f("view.addProduct.columns.addTime"),helpMessage:f("view.addProduct.tips.addTime"),dataIndex:"createTime",key:"createTime",align:"center",customRender:({text:p})=>p?p.replace("T"," "):"-"},{title:"ç¶æ",dataIndex:"status",key:"status",align:"center",slots:{customRender:"statusInfo"}},{title:f("view.addProduct.columns.action"),key:"action",slots:{customRender:"action"},align:"center",fixed:"right",width:120}]}),ye=[{label:"å
¨é¨",value:""},{label:"å¾
åç»",value:"PENDING"},{label:"å叿å",value:"SUCCESS"},{label:"åå¸å¤±è´¥",value:"FAIL"},{label:"ééä¸",value:"COLLECTING"},{label:"éé失败",value:"COLLECT_FAILED"}
1],m=ce({addTime:"",keyword:"",source:"",minPrice:"",maxPrice:"",minStar:"",maxStar:"",minMonthSales:"",maxMonthSales:"",status:""}),C=x(!1),{shopSelectModalRef:ae,exhibitProductSetupRef:de,addProductRef:we,selectedShopInfo:Se,selectedProductIds:X,onExhibitProduct:B,onSelectShop:pe,onShopSelectModalShow:Ie,onAddProductModalShow:Pe}=yt(),{createMessage:H}=le();function ke(l){m.status=l.target.value,G()}const Ce=l=>l&&l>Ue().endOf("day");function me(l){const p=T.value.filter(n=>l.includes(n.skuId)&&se(n)).map(n=>n.skuId);Y.value=p||[]}function _e(l){return{disabled:!se(l)}}const J={COLLECTING:"COLLECTING",COLLECT_SUCCESS:"COLLECT_SUCCESS",COLLECT_FAILED:"COLLECT_FAILED"},Q={PENDING:"PENDING",SUCCESS:"SUCCESS",FAIL:"FAIL",IMPORTING:"IMPORTING"},be={ééä¸:{color:"#EFEFEF"},å¾
å®å:{color:"#F59A23"},éé失败:{color:"#B7741B"},å¾
åç»:{color:"#70B603"},ä¸è´§ä¸:{color:"#999999"},ä¸è´§æå:{color:"#FF1E1E"},ä¸è´§å¤±è´¥:{color:"#999999"}},xe=l=>l.collectionStatus===J.COLLECTING;function se(l){return!(!l.collectionStatus||l.collectionStatus===J.COLLECT_FAILED)}function Oe(l){return!l.collectionStatus||l.collectionStatus===J.COLLECT_FAILED}function fe(l){return l.displayStatus===Q.SUCCESS?"ä¸è´§æå":l.displayStatus===Q.FAIL?"ä¸è´§å¤±è´¥":l.displayStatus===Q.IMPORTING?"ä¸è´§ä¸":l.needImprove?"å¾
å®å":l.collectionStatus===J.COLLECTING?"ééä¸":l.collectionStatus===J.COLLECT_FAILED?"éé失败":l.displayStatus===Q.PENDING?"å¾
åç»":"éé失败"}const he=x("");function Le(l){return he.value=l,at(ko),W.value.show()}function Te({close:l}){l(),window.open(`https://www.ozon.ru/product/${he.value}/`,"_blank")}function Z(){G()}function Ee(){m.addTime="",m.keyword="",m.source="",m.minPrice="",m.maxPrice="",m.minStar="",m.maxStar="",m.minMonthSales="",m.maxMonthSales="",G()}function G(){const l={};Array.isArray(m.addTime)&&m.addTime.length===2&&(l.minDate=Ue(m.addTime[0]).format(je),l.maxDate=Ue(m.addTime[1]).format(je)),m.keyword&&(l.idLinkName=m.keyword),l.minStar=m.minStar,l.maxStar=m.maxStar,l.minMonthSales=m.minMonthSales,l.maxMonthSales=m.maxMonthSales,l.source=m.source,l.minPrice=m.minPrice,l.maxPrice=m.maxPrice,m.status&&(l.status=m.status),w(l),c()}const Me=A(s,300),ve=A(r,300);function r(){if(!a)return o(),!1;const l=Y.value;if(l.length===0)return H.warning(f("view.addProduct.tips.selectProduct"));X.value=l,ee(()=>{ae.value.onModalShow()})}function s(){if(!a)return o(),!1;const l=Y.value;if(l.length===0)return H.warning(f("view.addProduct.tips.selectProduct"));e(l)}function o(){const{createConfirm:l}=le(),{t:p}=re();l({iconType:"warning",title:()=>te("span",p("sys.app.logoutTip")),content:()=>te("span",p("sys.app.visitorsMessage")),onOk:()=>M(this,null,function*(){$("/login")})})}function e(l){return M(this,null,function*(){try{let p=Array.isArray(l)?l:[l];(yield K.deleteProduct(p)).code===0?(H.success(f("view.onSales.setupProduct.deleteSuccess")),G()):H.warning(f("view.onSales.setupProduct.deleteFail"))}catch(p){}})}const i=ce({isLoading:!1,isSuccess:!1,canUsedCount:0,usedCount:0});function c(){return M(this,null,function*(){i.isLoading=!0;try{const l=yield st();if(l.code==0&&l.data){const{canNum:p,usedCount:n}=l.data;i.canUsedCount=p,i.usedCount=n,i.isSuccess=!0}}catch(l){}finally{i.isLoading=!1}})}function w(){return M(this,arguments,function*(l={}){try{C.value=!0;const p=yield K.getAddProduct(l);p.code===0?(T.value=p.data||[],Y.value=[]):H.warning(p.msg),C.value=!1}catch(p){C.value=!1}})}function S(){Z()}return Bt(()=>{Z()}),(l,p)=>(O(),Ne(t(ht),{class:"add-goods__wrapper"},{default:d(()=>[g("div",io,[no,g("div",ro,[u(t(_),{value:m.status,"onUpdate:value":p[0]||(p[0]=n=>m.status=n),onChange:ke,class:"status-filter"},{default:d(()=>[(O(),R(ne,null,Ae(ye,n=>u(t(k),{key:n.value,value:n.value},{default:d(()=>[I(v(n.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),g("div",lo,[g("span",co,v(t(f)("view.addProduct.columns.addTime")),1),u(t(F),{value:m.addTime,"onUpdate:value":p[1]||(p[1]=n=>m.addTime=n),disabledDate:Ce},null,8,["value"]),g("span",uo,v(t(f)("view.addProduct.columns.productSearch")),1),u(t(D),{value:m.keyword,"onUpdate:value":p[2]||(p[2]=n=>m.keyword=n),placeholder:t(f)("view.onSales.tips.productSearch"),style:{width:"300px"}},null,8,["value","placeholder"]),g("span",po,v(t(f)("view.addProduct.columns.addSource")),1),u(t(D),{value:m.source,"onUpdate:value":p[3]||(p[3]=n=>m.source=n),placeholder:t(f)("view.addProduct.placeholder.addSource"),style:{width:"300px"}},null,8,["value","placeholder"])]),g("div",mo,[u(t(it),{priceUnit:t(q),name:t(f)("sys.common.price"),min:m.minPrice,"onUpdate:min":p[4]||(p[4]=n=>m.minPrice=n),max:m.maxPrice,"onUpdate:max":p[5]||(p[5]=n=>m.maxPrice=n),class:"ml-28px",ref:"priceIntervalGmvRef"},null,8,["priceUnit","name","min","max"]),g("div",fo,[u(t(U),{class:"ml-24px",type:"primary",onClick:G},{default:d(()=>[I(v(t(f)("view.onSales.title.search")),1)]),_:1}),u(t(U),{class:"ml-24px",onClick:Ee},{default:d(()=>[I(v(t(f)("view.onSales.title.reset")),1)]),_:1}),g("div",ho,[u(t(It),{num:19})])])])]),u(t(mt)),g("div",vo,[g("div",go,[u(t(U),{type:"primary",onClick:t(Pe)},{default:d(()=>[I(v(t(f)("view.onSales.addProduct.title")),1)]),_:1},8,["onClick"]),u(t(U),{class:"ml-16px",type:"primary",onClick:t(ve)},{default:d(()=>[I(v(t(f)("view.addProduct.title.exhibitProduct")),1)]),_:1},8,["onClick"]),u(t(De),{title:t(f)("view.onSales.tips.confirmDelete"),"ok-text":t(f)("view.onSales.tips.yes"),"cancel-text":t(f)("view.onSales.tips.no"),onConfirm:t(Me)},{default:d(()=>[u(t(U),{class:"ml-16px",type:"primary"},{default:d(()=>[I(v(t(f)("view.addProduct.title.batchDelete")),1)]),_:1})]),_:1},8,["title","ok-text","cancel-text","onConfirm"])]),g("div",null,[i.isSuccess?(O(),R("div",yo,[wo,I(v(i.usedCount)+"/"+v(i.canUsedCount),1)])):oe("",!0)])]),u(t(ze),{class:"mt-24px",sticky:"","row-selection":{selectedRowKeys:Y.value,onChange:me,getCheckboxProps:_e}
1,onChange:t(z),loading:C.value,pagination:t(h),"data-source":T.value,columns:E.value,showSorterTooltip:!1,rowKey:n=>n.skuId,ref:"tableRef"},{headerCell:d(({column:n})=>[n.helpMessage?(O(),R("span",So,[u(t(qe),{class:"ml-2",text:n.helpMessage,title:n.title},null,8,["text","title"])])):oe("",!0)]),goodsInfo:d(({record:n})=>[u(t(nt),{info:{itemName:n.skuName,itemId:n.skuId,url:n.url,imgUrl:n.skuImg,brand:n.brand,shopName:n.shopName,shopId:n.shopId}},null,8,["info"])]),categoryInfo:d(({record:n})=>[u(t(rt),{info:{catName:n.catName,catId:n.catId1,typeId:n.typeId,show:!1,catTag:n.catTag,catNameCn:n.catNameCn},type:"noCatTag",url:`/industry/category?catId=${n.catId1}A${n.catId2}A${n.catId3}&id=${n.catId3}_${n.typeId}`},null,8,["info","url"])]),priceInfo:d(({record:n})=>[g("div",null,[I(v(t(q))+" "+v(t(N)(n.price))+" ",1),Io,I(v(t(V))+" "+v(n.rmbPrice),1)])]),ratingStar:d(({record:n})=>[I(v(t(ft)(n.ratingStar)?"-":n.ratingStar),1)]),statusInfo:d(({record:n})=>{var j;return[g("span",{class:"px-10px py-2px rounded-full text-[#fff] text-12px",style:Gt({backgroundColor:((j=be[fe(n)])==null?void 0:j.color)||"#d7d7d7"})},v(fe(n)),5)]}),action:d(({record:n})=>{var j;return[g("div",Po,[u(t(Pt),{type:"product",id:n.skuId},null,8,["id"]),u(t(kt),{type:"product","monitor-status":n.monitorStatus,"monitor-id":(j=n.monitorId)!=null?j:n.id,id:n.skuId,onOnMonitorSuccess:()=>n.monitorStatus=1,onOnCancelMonitorSuccess:()=>n.monitorStatus=0},null,8,["monitor-status","monitor-id","id","onOnMonitorSuccess","onOnCancelMonitorSuccess"]),se(n)?(O(),Ne(t(U),{key:0,type:"link",disabled:xe(n),onClick:We=>t(B)(n.skuId)},{default:d(()=>[I(v(t(f)("view.addProduct.title.exhibitProduct")),1)]),_:2},1032,["disabled","onClick"])):oe("",!0),Oe(n)?(O(),Ne(t(U),{key:1,type:"link",onClick:We=>Le(n.skuId)},{default:d(()=>[I(" ééå¸®å© ")]),_:2},1032,["onClick"])):oe("",!0),u(t(De),{title:t(f)("view.onSales.tips.confirmDelete"),"ok-text":t(f)("view.onSales.tips.yes"),"cancel-text":t(f)("view.onSales.tips.no"),onConfirm:We=>e(n.skuId)},{default:d(()=>[u(t(U),{type:"link"},{default:d(()=>[I(v(t(f)("view.addProduct.title.delete")),1)]),_:1})]),_:2},1032,["title","ok-text","cancel-text","onConfirm"])])]}),_:1},8,["row-selection","onChange","loading","pagination","data-source","columns","rowKey"]),u(t(Ct),{ref_key:"addProductRef",ref:we,productIds:t(X),source:99,onOnExhibit:t(B),onOnAddProductSuccess:G},null,8,["productIds","onOnExhibit"]),u(t(_t),{ref_key:"shopSelectModalRef",ref:ae,productIds:t(X),onOnSelectShop:t(pe)},null,8,["productIds","onOnSelectShop"]),u(t(so),{ref_key:"exhibitProductSetupRef",ref:de,shopInfo:t(Se),productIds:t(X),onOnPrev:t(Ie),onOnSetupSuccess:S},null,8,["shopInfo","productIds","onOnPrev"]),u(wt,{ref_key:"noInstallPluginModal",ref:W,onOk:Te},null,512),u(St,{ref:"categorySelectModal",defaultCategoryId:"43434357_971007521"},null,512)]),_:1}))}},ja=Ve(Co,[["__scopeId","data-v-783c061e"]]);export{ja as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.