PageSourceSearch

https://www.mabangerp.com/amazon/static/js/chunk-7210.2a7b2a45.js?site=amazon

js mabangerp.com collected 2026-09-24 09:01:11 UTC 133,901 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7210],{62326:function(e,t,r){var a=r(41827),i=(0,a.__importDefault)(r(35665)),s=(0,a.__importDefault)(r(72971)),n=r(44899),o=r(41957),c=r(5661);function l(e,t){try{var r=o.i18n.getLocaleMessage(o.i18n.locale)[e];if("string"==typeof r)return t?r.replace(/\{(\w+)\}/g,function(e,r){var a;return String(null!==(a=t[r])&&void 0!==a?a:"")}):r}catch(e){}return e}var u=(0,a.__importDefault)(r(14139)),d=(0,a.__importDefault)(r(10956)),p=(0,a.__importDefault)(r(58996)),h=(0,a.__importDefault)(r(52853)),m=(0,a.__importDefault)(r(52201)),f=(0,a.__importDefault)(r(54750)),_=(0,a.__importDefault)(r(38463)),y=(0,a.__importDefault)(r(6211)),v=(0,a.__importDefault)(r(58745)),g=(0,a.__importDefault)(r(31242)),b=(0,a.__importDefault)(r(174)),A=(0,a.__importDefault)(r(13532)),S=(0,a.__importDefault)(r(31634)),T=(0,a.__importDefault)(r(7037)),F=(0,a.__importDefault)(r(73338)),w=r(53214),k=r(41225),$=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.searchCacheKey="newAdvertisingSp_searchFormCache",t.excludeCacheKeys=["name","keyword_text","asinorcate","search_text","keywords","page","pageNum","pageSize","date_start","date_end","start_date","end_date","searchDate","categories","is_asin_categories","is_asin"],t.currencyList=w.currencyList,t.filterForm={daily_budget_min:"",daily_budget_max:"",spends_min:"",spends_max:"",default_bid_min:"",default_bid_max:"",budget_min:"",budget_max:"",impressions_min:"",impressions_max:"",clicks_min:"",clicks_max:"",ctr_min:"",ctr_max:"",spend_min:"",spend_max:"",cpc_min:"",cpc_max:"",orders_min:"",orders_max:"",cpa_min:"",cpa_max:"",cvr_min:"",cvr_max:"",sales_min:"",sales_max:"",unit_price_min:"",unit_price_max:"",ad_units_min:"",ad_units_max:"",acos_min:"",acos_max:"",roas_min:"",roas_max:"",direct_orders_min:"",direct_orders_max:"",indirect_orders_min:"",indirect_orders_max:"",direct_sales_min:"",direct_sales_max:"",indirect_sales_min:"",indirect_sales_max:"",direct_units_min:"",direct_units_max:"",indirect_units_min:"",indirect_units_max:"",bid_min:"",bid_max:""},t.showTemplatePopover=!1,t.onlyShowOwn=!1,t.activeTab="campaign",t.showFilterPanel=!1,t.saveTemplateDialogVisible=!1,t.saveTemplateForm={name:""},t.keywords="",t.searchDate=[t.searchForm.date_start||"",t.searchForm.date_end||""],t.dateOptions=(0,c.getDateOptions)(!0),t.groupOptions=[],t.filteredFieldsStore={},t.categoryOptions=(0,k.getDefaultAdCategories)(),t.isAsinOptions=(0,k.getDefaultIsAsinCategories)(),t}return(0,a.__extends)(t,e),Object.defineProperty(t.prototype,"filterTemplateActiveName",{get:function(){return this.isKeywordGroupMode?"414":"10"===this.activeName&&["409","410","411","412","413"].includes(this.subActiveName)?this.subActiveName:this.activeName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isKeywordGroupMode",{get:function(){return"keywordGroup"===this.keywordTab&&["405","targetType_405"].includes(this.activeName)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isKeywordGroupListSearchMode",{get:function(){return this.isKeywordGroupMode&&!this.isDetail},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showPortfolioSelect",{get:function(){return!!this.isKeywordGroupListSearchMode||!["targetType_404","targetType_405","targetType_406","searchKeyType_412","searchKeyType_413"].includes(this.activeName)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showMatchTypeSelect",{get:function(){return!this.isKeywordGroupListSearchMode&&(["404","405","searchKeyType_411","targetType_405"].includes(this.activeName)||["10"].includes(this.activeName)&&["411"].includes(this.subActiveName))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showCampaignSelect",{get:function(){return!!this.isKeywordGroupListSearchMode||["401","403","404","405","406","407","408","10"].includes(this.activeName)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showAdGroupSelect",{get:function(){return!!this.isKeywordGroupListSearchMode||["403","404","405","406","407","408","10"].includes(this.activeName)}
1,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showMskuSelect",{get:function(){return!!this.isKeywordGroupListSearchMode||["400","401","402","404","405","406","10","searchKeyType_411","searchKeyType_412","searchKeyType_413","targetType_404","targetType_405","targetType_406"].includes(this.activeName)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showStateSelect",{get:function(){return!this.isKeywordGroupListSearchMode&&!["AdvertisementDetails3"].includes(this.activeName)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showServiceStatusSelect",{get:function(){return!!this.isKeywordGroupListSearchMode||["400","401","403","404","405","406"].includes(this.activeName)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showAdGroupServiceStatusSelect",{get:function(){return"403"===this.activeName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showTagSelect",{get:function(){return!!this.isKeywordGroupListSearchMode||["400","403","404","405","406","AdvertisementDetails4","targetType_404","targetType_405","targetType_406"].includes(this.activeName)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showToolsSelect",{get:function(){return this.isKeywordGroupListSearchMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showCurrencySelectField",{get:function(){return this.showCurrencySelect&&!this.isKeywordGroupListSearchMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keywordGroupValueOptions",{get:function(){return[{value:"brand",name:l("与您的品牌相关的关键词")},{value:"peerbrand",name:l("顾客还会考虑的品牌相关关键词")},{value:"gift",name:l("与礼物相关的关键词")},{value:"category",name:l("与您的商品品类相关的关键词")}]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keywordGroupToolsOptions",{get:function(){return[{value:"fs",name:l("分时策略")},{value:"auto",name:l("自动规则")},{value:"set",name:l("自定义设置")},{value:"unused",name:l("未使用工具")}]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"supportFilterTemplate",{get:function(){return!this.isKeywordGroupMode&&(["400","401","403","404","405","406","AdvertisementDetails2","AdvertisementDetails4","targetType_404","targetType_405","targetType_406"].includes(this.activeName)||"10"===this.activeName&&["409","410","411","412","413"].includes(this.subActiveName))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"saveTemplateRules",{get:function(){return{name:[{required:!0,message:l("模板名称不能为空"),trigger:"blur"},{max:20,message:l("最多只能写20个字符"),trigger:"blur"}]}},enumerable:!1,configurable:!0}),t.prototype.onActiveNameChange=function(){this.keywords="",this.initData()},t.prototype.onSubActiveNameChange=function(){this.initData()},t.prototype.onSearchFormDateChange=function(){this.syncSearchDateFromForm()},t.prototype.mounted=function(){this.syncSearchDateFromForm(),this.initData()},t.prototype.getPageConfHost=function(){for(var e=this.$parent;e;){if("function"==typeof e.getPageConf&&"function"==typeof e.savePageConf)return e;e=e.$parent}return null},t.prototype.getPageConf=function(){var e=this.getPageConfHost();return e&&e.getPageConf()||{}},t.prototype.savePageConf=function(e,t){var r=this.getPageConfHost();r&&r.savePageConf(e,t)},t.prototype.getCurrentCacheModuleKey=function(){return"10"===this.activeName?"10_"+this.subActiveName:""+this.activeName},t.prototype.getSearchCacheMap=function(){var e=this.getPageConf()[this.searchCacheKey];return e&&"object"==typeof e?e:{}},t.prototype.saveSearchPageConf=function(e){var t=this,r=this.getSearchCacheMap(),i=this.getCurrentCacheModuleKey(),s=(0,a.__assign)((0,a.__assign)({},e||{}),this.searchForm||{}),n={};Object.keys(s).forEach(function(e){t.excludeCacheKeys.includes(e)||(n[e]=s[e])}),r[i]=n,this.savePageConf(this.searchCacheKey,r)},t.prototype.initData=function(){var e=this,t=this.getSearchCacheMap()[this.getCurrentCacheModuleKey()];if(!t||"object"!=typeof t)return this.syncSearchDateFromForm(),this.syncReportTypeDefault(),void this.ensureSpDefaultFilters();Object.keys(t).forEach(function(r){var a;if(!e.excludeCacheKeys.includes(r)){if(e.isDetail&&("campaign_id"===r||"ad_group_id"===r))return;if("super_structure"===(null===(a=e.$route.query)||void 0===a?void 0:a.source)&&("campaign_id"===r||"ad_group_id"===r||"name"===r))return;e.$set(e.searchForm,r,t[r])}}),this.syncSearchDateFromForm(),this.syncReportTypeDefault(),this.ensureSpDefaultFilters()},t.prototype.ensureSpDefaultFilters=function(){this.searchForm&&(null==this.searchForm.cate&&this.$set(this.searchForm,"cate",""),Array.isArray(this.searchForm.ad_group_service_status)||this.$set(this.searchForm,"ad_group_service_status",[]),this.normalizeSiteRestrictionsFilter(),(0,k.shouldShowIsAsinFilter)({isDetail:this.isDetail,activeName:this.activeName})?null==this.searchForm.is_asin&&this.$set(this.searchForm,"is_asin",""):(this.$set(this.searchForm,"is_asin",""),this.isAsinOptions=(0,k.getDefaultIsAsinCategories)()))},t.prototype.applySpResetDefaults=function(){var e=(0,k.getAdDefaultDateRange)();this.searchForm.date_start=e[0],this.searchForm.date_end=e[1],this.$set(this,"searchDate",e),this.$set(this.searchForm,"state",[]),this.$set(this.searchForm,"cate",""),this.$set(this.searchForm,"is_asin",""),this.$set(this.searchForm,"site_restrictions",{}),this.categoryOptions=(0,k.getDefaultAdCategories)(),this.isAsinOptions=(0,k.getDefaultIsAsinCategories)()},t.prototype.normalizeSiteRestrictionsFilter=function(){if(this.searchForm){var e=this.searchForm.site_restrictions;if(!e||"object"!=typeof e||Array.isArray(e)||!e.value){var t="string"==typeof e?e:e&&e.value,r=this.siteRestrictionOptions.find(function(e){return e.value===t});this.$set(this.searchForm,"site_restrictions",r?{value:r.value,name:r.name}:{})}}},t.prototype.syncSearchDateFromForm=function(){if(this.searchForm){var e=[this.searchForm.date_start||"",this.searchForm.date_end||""];this.searchDate[0]===e[0]&&this.searchDate[1]===e[1]||this.$set(this,"searchDate",e)}},Object.defineProperty(t.prototype,"stateOption",{get:function(){return["searchKeyType_412","searchKeyType_413"].includes(this.activeName)?[{value:"ENABLED_PAUSED",name:l("已归档的除外")},{value:"ENABLED",name:l("已启用")},{value:"PAUSED",name:l("已暂停")},{value:"ARCHIVED",name:l("已归档")}]:[{value:"enabled_paused",name:l("已归档的除外")},{value:"enabled",name:l("已启用")},{value:"paused",name:l("已暂停")},{value:"archived",name:l("已归档")}]}
1,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"biddingStrategiesOptions",{get:function(){return[{value:"legacyForSales",name:l("动态竞价-只降低")},{value:"autoForSales",name:l("动态竞价-提高和降低")},{value:"manual",name:l("竞价策略 : 固定竞价")},{value:"ruleBased",name:l("基于规则的竞价")}]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"siteRestrictionOptions",{get:function(){return[{value:"AMAZON_ALL",name:l("亚马逊站内外")},{value:"AMAZON_BUSINESS",name:l("亚马逊企业购")},{value:"AMAZON_HAUL",name:l("亚马逊低价商城")}]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropTypeTreeOptions",{get:function(){return[{key:"manual",label:l("手动"),children:[{key:"broad",label:l("广泛匹配")},{key:"phrase",label:l("词组匹配")},{key:"exact",label:l("精准匹配")}]},{key:"auto",label:l("自动"),children:[{key:"close-match",label:l("紧密匹配")},{key:"loose-match",label:l("宽泛匹配")},{key:"substitutes",label:l("同类商品")},{key:"complements",label:l("关联商品")}]}]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"operationTypeOptions",{get:function(){return[{value:"targeted",name:l("已投放")},{value:"negatived",name:l("已否定")},{value:"not_targeted",name:l("未投放")},{value:"not_negatived",name:l("未否定")},{value:"not_negatived_and_not_targeted",name:l("未进行投放和否定")}]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"autoTargetingOptions",{get:function(){return[{value:"substitutes",name:l("同类商品")},{value:"loose-match",name:l("宽泛匹配")},{value:"close-match",name:l("紧密匹配")},{value:"complements",name:l("关联商品")}]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showReportTypeSelect",{get:function(){return["407","408"].includes(this.activeName)||"AdvertisementDetails9"===this.subActiveName||"AdvertisementDetails9"===this.activeName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultReportType",{get:function(){return["407"].includes(this.activeName)?"search_term":["408"].includes(this.activeName)||"AdvertisementDetails9"!==this.subActiveName&&"AdvertisementDetails9"!==this.activeName||"negativeKeywords"!==this.negativeTab?"target":"search_term"},enumerable:!1,configurable:!0}),t.prototype.syncReportTypeDefault=function(){this.showReportTypeSelect&&(this.$set(this.searchForm,"report_type",this.defaultReportType),(["407","408"].includes(this.activeName)||"AdvertisementDetails9"===this.subActiveName||"AdvertisementDetails9"===this.activeName)&&this.$set(this.searchForm,"negativeDateType","custom_date")),this.showSelectTypeInput&&this.$set(this.searchForm,"select_type","1")},Object.defineProperty(t.prototype,"showSelectTypeInput",{get:function(){return!this.isKeywordGroupMode&&(["405","407","targetType_405","targetType_406","AdvertisementDetails9","searchKeyType_411"].includes(this.activeName)||["10"].includes(this.activeName)&&["409","410","411"].includes(this.subActiveName))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasReportTypePermission",{get:function(){try{var e=localStorage.getItem("userInfos");if(!e)return!1;var t=JSON.parse(e);return 102804==t.companyId||100003==t.companyId}catch(e){return console.error("获取用户权限失败:",e),!1}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showCurrencySelect",{get:function(){return this.hasReportTypePermission},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagsPlaceholder",{get:function(){return["400"].includes(this.activeName)?l("请选择活动标签"):["403","AdvertisementDetails4"].includes(this.activeName)?l("请选择商品标签"):l("请输入投放标签")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"campaignId",{get:function(){return this.searchForm&&this.searchForm.campaign_id&&Array.isArray(this.searchForm.campaign_id)?0===this.searchForm.campaign_id.length?[]:this.searchForm.campaign_id.map(function(e){return(null==e?void 0:e.value)||e}
1).filter(Boolean):[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropTypeOptions",{get:function(){var e=[{value:"0",name:l("关键词投放")},{value:"1",name:l("商品投放")},{value:"2",name:l("关键词和商品投放共存")},{value:"3",name:l("自动")}];return"401"===this.activeName?e.filter(function(e){return!["2"].includes(e.value)}):e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolsOpitons",{get:function(){var e=[{value:"fs",name:"分时策略"},{value:"dz",name:"递增运算"},{value:"auto",name:"自动规则"},{value:"set",name:"自定义设置"},{value:"unused",name:"未使用工具"}];return["401","403","404","405","406"].includes(this.activeName)&&(e=e.filter(function(e){return!["dz"].includes(e.value)})),["402","403"].includes(this.activeName)&&(e=e.filter(function(e){return!["set"].includes(e.value)})),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"adGroupServiceStateOptions",{get:function(){return[{value:"AD_GROUP_STATUS_ENABLED",name:l("投放中")},{value:"AD_GROUP_PAUSED",name:l("已暂停")},{value:"AD_GROUP_ARCHIVED",name:l("已归档")},{value:"AD_GROUP_INCOMPLETE",name:l("不完整")},{value:"AD_GROUP_LOW_BID",name:l("竞价过低")},{value:"OUT_OF_BUDGET",name:l("超预算")},{value:"PORTFOLIO_PENDING_START_DATE",name:l("广告组合未开始")},{value:"PORTFOLIO_PAUSED",name:l("广告组合已暂停")},{value:"PORTFOLIO_ENDED",name:l("广告组合已结束")},{value:"PORTFOLIO_ARCHIVED",name:l("广告组合已归档")},{value:"SCHEDULED",name:l("待安排")},{value:"PENDING_REVIEW",name:l("待审核")},{value:"ENDED",name:l("已结束")},{value:"REJECTED",name:l("已拒绝")},{value:"ADVERTISER_PAYMENT_FAILURE",name:l("付款失败")},{value:"NOT_DELIVERING",name:l("未投放")},{value:"DELIVERING_LIMITED",name:l("受限投放")},{value:"ADVERTISER_OUT_OF_BUDGET",name:l("广告账号超预算")},{value:"ADVERTISER_OUT_OF_PREPAY_BALANCE",name:l("广告账号预付余额不足")},{value:"ADVERTISER_OUT_OF_POSTPAY_CREDIT_LIMIT",name:l("广告账号后付费额度不足")},{value:"ADVERTISER_OUT_OF_POSTPAY_MONTHLY_BUDGET",name:l("广告账号月预算不足")},{value:"SPEND_LIMIT_EXCEEDED",name:l("支出额度超限")},{value:"BUDGET_CONTROLS_INEFFECTIVE",name:l("预算控制未生效")},{value:"OUT_OF_REWARD_BUDGET",name:l("奖励预算不足")},{value:"POLICY_REVIEW_PENDING",name:l("待审核")},{value:"POLICING_PENDING_REVIEW",name:l("待审核")},{value:"POLICING_SUSPENDED",name:l("不合规")},{value:"OTHER",name:l("未知")}]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"serviceStateOptions",{get:function(){var e=[{value:"CAMPAIGN_STATUS_ENABLED",name:l("投放中")},{value:"CAMPAIGN_PAUSED",name:l("已暂停")},{value:"CAMPAIGN_ARCHIVED",name:l("已归档")},{value:"CAMPAIGN_OUT_OF_BUDGET",name:l("超预算")},{value:"CAMPAIGN_INCOMPLETE",name:l("不完整")},{value:"TERMINATED",name:l("已终止")},{value:"LANDING_PAGE_NOT_AVAILABLE",name:l("着陆页失败")}],t=[{value:"AD_STATUS_LIVE",name:l("投放中")},{value:"AD_PAUSED",name:l("已暂停")},{value:"AD_ARCHIVED",name:l("已归档")},{value:"MISSING_IMAGE",name:l("主图缺失")},{value:"MISSING_DECORATION",name:l("商品信息不全")},{value:"NOT_BUYABLE",name:l("不可购买")},{value:"NOT_IN_BUYBOX",name:l("无Buybox")},{value:"OUT_OF_STOCK",name:l("商品缺货")},{value:"INELIGIBLE",name:l("不合规")},{value:"AD_GROUP_INCOMPLETE",name:l("不完整")},{value:"AD_GROUP_LOW_BID",name:l("竞价过低")}],r=[{value:"TARGETING_CLAUSE_STATUS_LIVE",name:l("投放中")},{value:"TARGETING_CLAUSE_PAUSED",name:l("已暂停")},{value:"TARGETING_CLAUSE_ARCHIVED",name:l("已归档")},{value:"OUT_OF_STOCK",name:l("商品缺货")},{value:"INELIGIBLE",name:l("不合规")},{value:"AD_GROUP_INCOMPLETE",name:l("不完整")},{value:"AD_GROUP_LOW_BID",name:l("竞价过低")}],i=this.adGroupServiceStateOptions.filter(function(e){return!["AD_GROUP_STATUS_ENABLED","AD_GROUP_PAUSED","AD_GROUP_ARCHIVED","AD_GROUP_INCOMPLETE","AD_GROUP_LOW_BID"].includes(e.value)});return"400"===this.activeName?(0,a.__spreadArray)((0,a.__spreadArray)([],e,!0),i,!0):"401"===this.activeName?this.adGroupServiceStateOptions:"403"===this.activeName?(0,a.__spreadArray)((0,a.__spreadArray)([],t,!0),i,!0):["404","405","406"].includes(this.activeName)?(0,a.__spreadArray)((0,a.__spreadArray)([],r,!0),i,!0):[]}
1,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"matchTpeOptions",{get:function(){return"404"===this.activeName?[{value:"asinSubstituteRelated",name:l("同类商品")},{value:"queryBroadRelMatches",name:l("宽泛匹配")},{value:"queryHighRelMatches",name:l("紧密匹配")},{value:"asinAccessoryRelated",name:l("关联商品")}]:[{value:"PHRASE",name:l("词组匹配")},{value:"BROAD",name:l("广泛匹配")},{value:"EXACT",name:l("精准匹配")}]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectTypeOptions",{get:function(){var e=[{value:"1",name:l("模糊查询")}];return"10"===this.activeName&&"409"===this.subActiveName&&e.push({value:"2",name:l("精确查询")}),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"searchTypeOptions",{get:function(){return"searchKeyType_412"===this.activeName?[{value:"kw",name:l("投放")},{value:"st",name:l("搜索词")}]:"searchKeyType_413"===this.activeName?[{value:"st",name:l("搜索词")}]:[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"accurateOptions",{get:function(){return[{value:"0",name:l("模糊搜索")},{value:"1",name:l("精确搜索")},{value:"2",name:l("单词搜索")}]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"campaignPlacemenOptions",{get:function(){return[{value:"Top of Search on-Amazon",name:l("搜索结果顶部(首页)")},{value:"Detail Page on-Amazon",name:l("商品页面")},{value:"Other on-Amazon",name:l("搜索结果的其余位置")},{value:"Off Amazon",name:l("Off Amazon")}]},enumerable:!1,configurable:!0}),t.prototype.handleToggleFilterPanel=function(){this.showFilterPanel=!this.showFilterPanel},t.prototype.handleFilterPanelCacheRestored=function(){var e=this;if(!this.suppressFilterAutoSearch){var t=this.$refs.filterConditionsPanel;t&&!t.panelReady||this.$nextTick(function(){e.doSearch(e.searchForm)})}},t.prototype.handleOpenSaveTemplateDialog=function(){this.saveTemplateDialogVisible=!0,this.saveTemplateForm={name:""}},t.prototype.handleSaveAsTemplate=function(e,t){t||this.handleOpenSaveTemplateDialog()},t.prototype.processFormDataForSave=function(){var e=this.$refs.filterConditionsPanel,t={};e&&e.getFilterFormValues&&(t=e.getFilterFormValues());var r=(0,a.__assign)({},t);["budget","daily_budget","impressions","clicks","ctr","spend","spends","cpc","orders","cpa","cvr","sales","unit_price","ad_units","acos","roas","direct_orders","indirect_orders","direct_sales","indirect_sales","direct_units","indirect_units","bid","default_bid"].forEach(function(e){var t=e+"_min",a=e+"_max";if(void 0!==r[t]||void 0!==r[a]){var i=r[t]||"",s=r[a]||"";(i||s)&&(r[e]=[i,s]),delete r[t],delete r[a]}});var i=(0,a.__assign)((0,a.__assign)({},this.searchForm),r);return delete i.profile_id,delete i.searchDate,delete i.date_start,delete i.date_end,delete i.start_date,delete i.end_date,i},t.prototype.handleSaveTemplate=function(){var e=this,t=this.$refs.saveTemplateForm;t&&t.validate(function(t){if(t){var r=e.saveTemplateForm.name,a=e.processFormDataForSave(),i={config_name:r,config_type:e.filterTemplateActiveName,config_json:a};e.$store.dispatch("adFilter/addFilter",i).then(function(t){t.success?(e.$message.success(l("模板保存成功")),e.saveTemplateDialogVisible=!1,e.$store.dispatch("adFilter/getUserFilters",e.filterTemplateActiveName).then(function(){var t=e.$refs.templatePopover;t&&t.loadTemplates&&t.loadTemplates()}).catch(function(e){console.error("更新模板列表失败:",e)})):e.$message.error(t.message||l("模板保存失败"))}).catch(function(){e.$message.error(l("保存模板时发生错误"))})}})},t.prototype.cancelSaveTemplate=function(){this.saveTemplateDialogVisible=!1},t.prototype.handleApplyTemplate=function(e){return(0,a.__awaiter)(this,void 0,void 0,function(){var t,r,i,s,n,o=this;return(0,a.__generator)(this,function(c){switch(c.label){case 0:return t=(0,a.__assign)({},e),this.filterFieldsByActiveName(t),r=["budget","daily_budget","impressions","clicks","ctr","spend","spends","cpc","orders","cpa","cvr","sales","unit_price","ad_units","acos","roas","direct_orders","indirect_orders","direct_sales","indirect_sales","direct_units","indirect_units","bid","default_bid"],i={},s=["date_start","date_end","start_date","end_date","searchDate"],Object.keys(t).forEach(function(e){s.includes(e)||r.includes(e)||(o.$set(o.searchForm,e,t[e]),i[e]=t[e])}),r.forEach(function(e){t[e]&&Array.isArray(t[e])&&(o.$set(o.searchForm,e,t[e]),i[e]=t[e])}),(n=this.$refs.filterConditionsPanel)&&n.localFilterForm&&(Object.keys(t).forEach(function(e){s.includes(e)||r.includes(e)||(n.localFilterForm[e]=t[e])}),r.forEach(function(e){if(t[e]&&Array.isArray(t[e])){var r=t[e],a=r[0],i=r[1];n.localFilterForm[e+"_min"]=void 0!==a&&""!==a?a:"",n.localFilterForm[e+"_max"]=void 0!==i&&""!==i?i:""}}),n.$forceUpdate()),this.searchForm.page=1,[4,this.$emit("get-table-data",this.searchForm)];case 1:return c.sent(),this.doSearch(this.searchForm),this.$forceUpdate(),[2]}})})},t.prototype.filterFieldsByActiveName=function(e){var t=this;
1if(!this.isKeywordGroupListSearchMode){var r={AdvertisementDetails2:["mskus","service_status","campaign_id","service_status","tf_type"],AdvertisementDetails4:["tf_type","service_status","ad_group_id","campaign_id"],targetType_405:["portfolio_id","campaign_id","ad_group_id","service_status"],targetType_404:["target_text","portfolio_id","campaign_id","ad_group_id","service_status"],targetType_406:["target_text","portfolio_id","campaign_id","ad_group_id","service_status"]};r[this.activeName]&&(this.filteredFieldsStore[this.activeName]||(this.filteredFieldsStore[this.activeName]={}),r[this.activeName].forEach(function(r){void 0!==e[r]&&(t.filteredFieldsStore[t.activeName][r]=e[r]),delete e[r]}))}},t.prototype.renderFilterForm=function(e){return(0,a.__awaiter)(this,void 0,void 0,function(){var t,r,i=this;return(0,a.__generator)(this,function(s){return t=(0,a.__assign)({},e),Array.isArray(t.jjcl_list)&&(t.jjcl_list={}),Array.isArray(t.placement)&&(t.placement={}),Array.isArray(t.operation_type)&&(t.operation_type={}),(r=["budget","daily_budget","impressions","clicks","ctr","spend","spends","cpc","orders","cpa","cvr","sales","unit_price","ad_units","acos","roas","direct_orders","indirect_orders","direct_sales","indirect_sales","direct_units","indirect_units","bid","default_bid"]).forEac
1h(function(e){var t=e+"_min",r=e+"_max";i.filterForm.hasOwnProperty(t)&&i.$set(i.filterForm,t,""),i.filterForm.hasOwnProperty(r)&&i.$set(i.filterForm,r,"")}),Object.keys(t).forEach(function(e){if("date_start"!==e&&"date_end"!==e&&"start_date"!==e&&"end_date"!==e&&"searchDate"!==e){var a=t[e];if(r.includes(e)&&Array.isArray(a)&&2===a.length){var s=e+"_min",n=e+"_max";i.filterForm.hasOwnProperty(s)&&i.$set(i.filterForm,s,a[0]||""),i.filterForm.hasOwnProperty(n)&&i.$set(i.filterForm,n,a[1]||"")}else i.searchForm.hasOwnProperty(e)&&i.$set(i.searchForm,e,a)}}),[2]})})},t.prototype.handleUpdateTemplate=function(e){return(0,a.__awaiter)(this,void 0,void 0,function(){var t,r,i,s,n=this;return(0,a.__generator)(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t=this.processFormDataForSave(),t=this.restoreFilteredFieldsToTemplate(t),r={id:e.id,config_name:e.config_name,config_type:e.config_type,config_json:t},[4,this.$store.dispatch("adFilter/editFilter",r)];case 1:return(i=a.sent()).success?(this.$message.success(l("模板更新成功")),this.$store.dispatch("adFilter/getUserFilters",this.filterTemplateActiveName).then(function(){var t=n.$refs.templatePopover;t&&t.loadTemplates&&t.loadTemplates(e.id);var r=n.$refs.filterConditionsPanel;r&&r.loadTemplates&&r.loadTemplates(e.id)}).catch(function(e){console.error("更新模板列表失败:",e)})):this.$message.error(i.message||l("模板更新失败")),[3,3];case 2:return s=a.sent(),console.error("更新模板时发生错误:",s),this.$message.error(l("更新模板时发生错误")),[3,3];case 3:return[2]}})})},t.prototype.restoreFilteredFieldsToTemplate=function(e){var t=this,r=(0,a.__assign)({},e);return this.filteredFieldsStore[this.activeName]&&Object.keys(this.filteredFieldsStore[this.activeName]).forEach(function(e){r[e]=t.filteredFieldsStore[t.activeName][e]}),r},t.prototype.doSearch=function(e){var t=this,r=e&&"object"==typeof e&&!Array.isArray(e)?(0,a.__assign)({},e):{};if("current"!=e){r&&"object"==typeof r&&delete r.isTrusted;var i=this.$refs.textareaPop,s=i?i.keywords:"";if(this.textareaSearch.key){var n=[];if(this.keywords&&n.push({name:this.keywords,value:this.keywords}),s){var o=s.split("\n").map(function(e){return e.trim()}).filter(function(e){return e}).map(function(e){return{name:e,value:e}});n=(0,a.__spreadArray)((0,a.__spreadArray)([],n,!0),o,!0)}n.length>0?r[this.textareaSearch.key]=n:r[this.textareaSearch.key]=[]}var c=this.$refs.filterConditionsPanel;if(c&&c.getFilterFormValues){var l=c.getFilterFormValues();Object.keys(l).forEach(function(e){t.filterForm.hasOwnProperty(e)&&(t.filterForm[e]=l[e])});var u={};Object.keys(this.filterForm).forEach(function(e){var r=t.filterForm[e];if(e.endsWith("_min")){var a=(s=e.replace("_min",""))+"_max",i=t.filterForm[a];u[s]||(u[s]=[r,i||""])}else if(e.endsWith("_max")){var s,n=(s=e.replace("_max",""))+"_min",o=t.filterForm[n];u[s]||(u[s]=[o||"",r])}else u[e]=r}),Object.keys(u).forEach(function(e){r[e]=u[e]})}}if(["searchKeyType_412","searchKeyType_413"].includes(this.activeName)){var d=r.state||this.searchForm.state;if(d&&Array.isArray(d)&&d.length>0){var p=[];d.forEach(function(e){var t="object"==typeof e&&null!==e?e.value:e;"ENABLED_PAUSED"===t?p.push("ENABLED","PAUSED","PENDING"):"ENABLED"===t?p.push("ENABLED"):"PAUSED"===t?p.push("PAUSED"):"ARCHIVED"===t?p.push("ARCHIVED"):"string"==typeof t&&p.push(t)}),r.state=Array.from(new Set(p))}}var h=(0,k.normalizeIsAsinRequestParam)((0,k.omitAdCategoryUiFields)((0,a.__assign)((0,a.__assign)((0,a.__assign)({},this.searchForm),{searchDate:this.searchDate}),r)));this.showListCategories||delete h.cate,this.showIsAsinTabs||delete h.is_asin,this.$emit("doSearch",h),this.saveSearchPageConf(h)},t.prototype.changeCampaign=function(e){if(0==e.length)return this.searchForm.campaign_id=[],this.searchForm.ad_group_id=[],void this.doSearch();this.doSearch(this.searchForm)},t.prototype.keywordsListChange=function(e){e&&e.length>0&&this.doSearch()},t.prototype.handleClear=function(e){if(this.keywords="",this.searchForm[e]&&(Array.isArray(this.searchForm[e])?this.searchForm[e]=[]:this.searchForm[e]=""),e===this.textareaSearch.key){this.searchForm.keywords="",this.searchForm[this.textareaSearch.key]&&(this.searchForm[this.textareaSearch.key]=[]);var t=this.$refs.textareaPop;t&&t.clearPop()}this.doSearch()},t.prototype.handleReset=function(){var e=this,t=this.searchForm.profile_id,r
1=["searchKeyType_412","searchKeyType_413"].includes(this.activeName),a={};if(r&&(a.orderField=this.searchForm.orderField,a.orderSort=this.searchForm.orderSort,a.search_type=this.searchForm.search_type,a.accurate=this.searchForm.accurate),Object.keys(this.searchForm).forEach(function(t){if("start_date"!==t&&"end_date"!==t&&"profile_id"!==t){if(r&&["orderField","orderSort","search_type","accurate"].includes(t))return;"campaign_id"!==t&&"ad_group_id"!==t||!Array.isArray(e.searchForm[t])?"campaign_id"!==t&&"ad_group_id"!==t&&(Array.isArray(e.searchForm[t])?e.searchForm[t]=[]:"object"==typeof e.searchForm[t]&&null!==e.searchForm[t]?e.searchForm[t]={}:e.searchForm[t]=""):e.searchForm[t]=[]}}),t&&(this.searchForm.profile_id=t),this.applySpResetDefaults(),this.isDetail){var i=this.$route.query;i.campaign_id&&this.$set(this.searchForm,"campaign_id",i.campaign_id),i.ad_group_id&&this.$set(this.searchForm,"ad_group_id",i.ad_group_id)}r&&(this.searchForm.orderField=a.orderField||"",this.searchForm.orderSort=a.orderSort||"",this.searchForm.search_type=a.search_type||"",this.searchForm.accurate=a.accurate||""),this.keywords="";var s=this.$refs.filterConditionsPanel;s&&(s.createEmptyFilterForm?s.createEmptyFilterForm():s.localFilterForm&&Object.keys(s.localFilterForm).forEach(function(e){s.localFilterForm[e]=""})),this.supportFilterTemplate&&this.$store.dispatch("adFilter/getUserFilters",this.filterTemplateActiveName).then(function(){e.$store.commit("adFilter/SET_SELECTED_TEMPLATE",null),e.$store.commit("adFilter/SET_TEMPLATE_ACTIVE",null);var t=e.$refs.templatePopover;t&&t.loadTemplates&&(t.clearSelectedTemplate&&t.clearSelectedTemplate(),t.loadTemplates())}).catch(function(e){console.error("清除模板选择失败:",e)}),this.syncReportTypeDefault(),this.doSearch()},t.prototype.changeDate=function(e){this.$set(this,"searchDate",e),this.searchDate&&this.searchDate.length>0&&(this.searchForm.date_start=this.searchDate[0],this.searchForm.date_end=this.searchDate[1]),this.doSearch()},Object.defineProperty(t.prototype,"tagCode",{get:function(){return["400"].includes(this.activeName)?"Campaign ":["403","AdvertisementDetails4"].includes(this.activeName)?"Sku":["404","targetType_404","405","targetType_405","406","targetType_406"].includes(this.activeName)?"Put":""},enumerable:!1,configurable:!0}),t.prototype.changeTags=function(e){this.searchForm.tag_uuid=e,this.doSearch()},Object.defineProperty(t.prototype,"showListCategories",{get:function(){return(0,k.shouldShowAdListCategory)({product:"sp",activeName:this.activeName,subActiveName:this.subActiveName,keywordTab:this.keywordTab,isDetail:this.isDetail})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showIsAsinTabs",{get:function(){return(0,k.shouldShowIsAsinFilter)({isDetail:this.isDetail,activeName:this.activeName})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"categoryCountLabel",{get:function(){return(0,k.getAdCategoryCountLabel)({product:"sp",activeName:this.activeName,subActiveName:this.subActiveName,keywordTab:this.keywordTab,isDetail:this.isDetail})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentListCate",{get:function(){return this.searchForm&&null!=this.searchForm.cate?String(this.searchForm.cate):""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentIsAsin",{get:function(){return this.searchForm&&null!=this.searchForm.is_asin&&""!==this.searchForm.is_asin?String(this.searchForm.is_asin):""},enumerable:!1,configurable:!0}),t.prototype.setListCategories=function(e){this.categoryOptions=Array.isArray(e)&&e.length?e:(0,k.getDefaultAdCategories)()},t.prototype.setIsAsinCategories=function(e){this.isAsinOptions=Array.isArray(e)&&e.length?e:(0,k.getDefaultIsAsinCategories)()},t.prototype.handleListCategoryChange=function(e){var t=null==e?"":String(e);this.currentListCate!==t&&(this.$set(this.searchForm,"cate",t),this.doSearch())},t.prototype.handleIsAsinChange=function(e){var t=null==e?"":String(e);this.currentIsAsin!==t&&(this.$set(this.searchForm,"is_asin",""===t?"":Number(t)),this.doSearch())},Object.defineProperty(t.prototype,"hasActiveFilters",{get:function(){return this.activeFilters.length>0}
1,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeFilters",{get:function(){for(var e,t=[],r=[{key:"tf_type",label:l("投放类型")},{key:"portfolio_id",label:l("广告组合")},{key:"bidding_strategy",label:l("竞价策略")},{key:"campaign_id",label:l("广告活动")},{key:"ad_group_id",label:l("广告组")},{key:"state",label:l("状态")},{key:"service_status",label:l("服务状态")},{key:"ad_group_service_status",label:l("广告组服务状态")},{key:"sku",label:"SKU"},{key:"match_type",label:l("匹配方式")},{key:"target_text",label:l("匹配方式")},{key:"placement",label:l("广告位置")},{key:"search_term_source",label:l("搜索词来源")},{key:"tag_uuid",label:l("标签")},{key:"mskus",label:l("MSKU")},{key:"jjcl_list",label:l("竞价策略")},{key:"site_restrictions",label:l("网站")},{key:"keyword_group_value",label:l("关键词组")},{key:"tools",label:l("广告工具")}],i=function(r){var i=s.searchForm[r.key];if(!i)return"continue";if(("campaign_id"===r.key||"ad_group_id"===r.key)&&!Array.isArray(i))return"continue";if(Array.isArray(i)&&i.length>0){var n,o,c=i.map(function(e){return"object"==typeof e&&null!==e?"tag_uuid"===r.key?e.tag_name||e.name||e.value||"":e.name||e.value||"":e}).filter(Boolean);if(n=s.formatLimitItems(c),o=(0,a.__spreadArray)([],c,!0),n&&"string"==typeof n&&"[object Object]"!==n){var l=i.length>3;t.push({key:r.key,label:r.label,value:n,showMore:l,allItems:l?o:[]})}}else if("object"==typeof i&&null!==i&&Object.keys(i).length>0){var u="";(u="placement"===r.key?s.formatPlacementValue(i):"site_restrictions"===r.key?i.name||(null===(e=s.siteRestrictionOptions.find(function(e){return e.value===i.value}))||void 0===e?void 0:e.name)||i.value||"":Object.keys(i).map(function(e){return i[e]}).join(", "))&&t.push({key:r.key,label:r.label,value:u,showMore:!1,allItems:[]})}else if("string"==typeof i&&""!==i.trim()){if(u=i,"site_restrictions"===r.key){var d=s.siteRestrictionOptions.find(function(e){return e.value===i});u=d?d.name:i}t.push({key:r.key,label:r.label,value:u,showMore:!1,allItems:[]})}},s=this,n=0,o=r;n<o.length;n++)i(o[n]);if(this.textareaSearch&&this.textareaSearch.key){var c=this.$refs.textareaPop,u=c?c.keywords:"";if(u){var d=u.split("\n").map(function(e){return e.trim()}).filter(function(e){return e});if(d.length>0){var p=(0,a.__spreadArray)([],d,!0),h=this.formatLimitItems(d),m="关键词";this.textareaSearch.placeholder&&(m=this.textareaSearch.placeholder.replace(/^请输入/,""));var f=p.length>3;t.push({key:"keywords",label:m,value:h,showMore:f,allItems:f?p:[]})}}}var _=this.$refs.filterConditionsPanel;if(_&&_.localFilterForm)for(var y=_.localFilterForm,v=0,g=[{key:"budget",label:l("预算")},{key:"daily_budget",label:l("每日预算")},{key:"impressions",label:l("曝光量")},{key:"clicks",label:l("点击")},{key:"ctr",label:l("CTR"),isPercent:!0},{key:"spend",label:l("花费")},{key:"spends",label:l("花费")},{key:"cpc",label:l("CPC")},{key:"orders",label:l("广告订单")},{key:"cpa",label:l("CPA")},{key:"cvr",label:l("CVR"),isPercent:!0},{key:"sales",label:l("销售额")},{key:"unit_price",label:l("广告笔单价")},{key:"ad_units",label:l("广告销量")},{key:"acos",label:l("ACoS"),isPercent:!0},{key:"roas",label:l("ROAS")},{key:"direct_orders",label:l("直接成交订单")},{key:"indirect_orders",label:l("间接成交订单")},{key:"direct_sales",label:l("直接成交销售额")},{key:"indirect_sales",label:l("间接成交销售额")},{key:"direct_units",label:l("直接成交销量")},{key:"indirect_units",label:l("间接成交销量")},{key:"bid",label:l("竞价")},{key:"default_bid",label:l("默认竞价")}];v<g.length;v++){var b=g[v],A=b.key+"_min",S=b.key+"_max",T=y[A],F=y[S];if(void 0!==T&&""!==T||void 0!==F&&""!==F){var w="";T&&F?w=T+" ~ "+F+(b.isPercent?"%":""):T?w="≥ "+T+(b.isPercent?"%":""):F&&(w="≤ "+F+(b.isPercent?"%":"")),t.push({key:b.key,label:b.label,value:w,showMore:!1,allItems:[]})}}return t},enumerable:!1,configurable:!0}),t.prototype.formatArrayValue=function(e,t){if(!t||!t.length)return"";try{var r=t.map(function(e){return"object"==typeof e&&null!==e?e.name||e.value||"":e}
1).filter(Boolean);return this.formatLimitItems(r)}catch(e){return""}},t.prototype.getAllItems=function(e,t){if(!t||!t.length)return[];try{return t.map(function(e){return"object"==typeof e&&null!==e?e.name||e.value||"":e}).filter(Boolean)}catch(e){return[]}},t.prototype.formatLimitItems=function(e,t){if(void 0===t&&(t=3),!e||0===e.length)return"";var r=e.filter(Boolean);return r.length<=t?r.join(", "):r.slice(0,t).join(", ")+" "+l("等n项",{n:r.length})},t.prototype.clearFilter=function(e){if("keywords"===e){this.keywords="";var t=this.$refs.textareaPop;t&&(t.keywords="")}else if(e.includes("budget")||e.includes("daily_budget")||e.includes("impressions")||e.includes("clicks")||e.includes("ctr")||e.includes("spend")||e.includes("spends")||e.includes("cpc")||e.includes("orders")||e.includes("cpa")||e.includes("cvr")||e.includes("sales")||e.includes("unit_price")||e.includes("ad_units")||e.includes("acos")||e.includes("roas")||e.includes("direct_orders")||e.includes("indirect_orders")||e.includes("direct_sales")||e.includes("indirect_sales")||e.includes("direct_units")||e.includes("indirect_units")||"bid"===e||"default_bid"===e){var r=this.$refs.filterConditionsPanel;r&&r.localFilterForm&&(r.localFilterForm[e+"_min"]="",r.localFilterForm[e+"_max"]="")}else Array.isArray(this.searchForm[e])?this.searchForm[e]=[]:this.searchForm[e]="";this.doSearch()},t.prototype.formatPlacementValue=function(e){if(!e||"object"!=typeof e)return"";var t={"Top of Search on-Amazon":l("搜索结果顶部(首页)"),"Detail Page on-Amazon":l("商品页面"),"Other on-Amazon":l("搜索结果的其余位置"),"Off Amazon":l("Off Amazon")},r=Object.keys(e);return 0===r.length?"":r.map(function(e){return t[e]||e}).join(", ")},(0,a.__decorate)([(0,n.Prop)()],t.prototype,"searchForm",void 0),(0,a.__decorate)([(0,n.Prop)({default:function(){return{}}})],t.prototype,"textareaSearch",void 0),(0,a.__decorate)([(0,n.Prop)({default:function(){return{}}})],t.prototype,"activeName",void 0),(0,a.__decorate)([(0,n.Prop)({default:""})],t.prototype,"subActiveName",void 0),(0,a.__decorate)([(0,n.Prop)({default:""})],t.prototype,"negativeTab",void 0),(0,a.__decorate)([(0,n.Prop)({default:""})],t.prototype,"keywordTab",void 0),(0,a.__decorate)([(0,n.Prop)({default:!1})],t.prototype,"isDetail",void 0),(0,a.__decorate)([(0,n.Prop)({default:function(){return{}}})],t.prototype,"seller",void 0),(0,a.__decorate)([(0,n.Prop)({default:function(){return"全部广告状态"}})],t.prototype,"statePlaceholder",void 0),(0,a.__decorate)([(0,n.Prop)({default:!1})],t.prototype,"suppressFilterAutoSearch",void 0),(0,a.__decorate)([(0,n.Watch)("activeName")],t.prototype,"onActiveNameChange",null),(0,a.__decorate)([(0,n.Watch)("subActiveName")],t.prototype,"onSubActiveNameChange",null),(0,a.__decorate)([(0,n.Watch)("searchForm.date_start"),(0,n.Watch)("searchForm.date_end")],t.prototype,"onSearchFormDateChange",null),(0,a.__decorate)([(0,s.default)({name:"search-model",components:{MultiSelectImg:u.default,MultiSelect:d.default,TextareaPop:h.default,MultiSelectTree:m.default,SingleSelect:p.default,MultiSelectCampaign:f.default,MultiSelectAdvertisingGroup:_.default,MultiSelectAdvertisingMix:y.default,MultiAsinSelect:v.default,MultiSelectTag:g.default,FilterTemplatePopover:b.default,FilterConditionsPanel:A.default,TagView:S.default,AdListCategoryTabs:T.default,AdListIsAsinTabs:F.default}})],t)}(i.default);t.A=$},73338:function(e,t,r){r.r(t),r.d(t,{default:function(){return n}});var a=function(){var e=this,t=e._self._c;return e.visible?t("div",{staticClass:"is-asin-tabs"},[t("span",{staticClass:"is-asin-label"},[e._v(e._s(e.$t("是否ASIN"))+":")]),t("el-radio-group",{staticClass:"is-asin-radio-group",attrs:{value:e.normalizedValue},on:{input:e.handleChange}},e._l(e.displayOptions,function(r){return t("el-radio",{key:String(r.is_asin),staticClass:"is-asin-radio",attrs:{label:r.is_asin,border:""}},[e._v(" "+e._s(e.$t(r.title))+"("+e._s(r.count)+") ")])}),1)],1):e._e()};a._withStripped=!0;var i=r(41225),s={name:"AdListIsAsinTabs",props:{visible:{type:Boolean,default:!1},options:{type:Array,default:function(){return[]}},value:{type:[String,Number],default:""}},computed:{displayOptions:function(){return this.options&&this.options.length?this.options:(0,i.getDefaultIsAsinCategories)()},normalizedValue:function(){return null==this.value?"":String(this.value)}},methods:{handleChange:function(e){this.$emit("change",null==e?"":String(e))}}},n=(0,r(67658).A)(s,a,[],!1,null,"2dc43682",null).exports},58745:function(e,t,r){r.r(t),r.d(t,{default:function(){return f}});var a=function(){var e=this,t=e._self._c;return t("div",{staticClass:"custom-multi-select"},[t("el-popover",{attrs:{trigger:"click",placement:"bottom-start",transition:"el-zoom-in-bottom","popper-class":"multi-select-dropdown"},on:{show:e.poperShow,"after-leave":e.afterLeave},model:{value:e.isPoperShow,callback:function(t){e.isPoperShow=t},expression:"isPoperShow"}},[t("div",{class:["select-section",{isSelected:e.isPoperShow}],style:{width:e.width+"px"},attrs:{slot:"reference"},slot:"reference"},[t("span",{directives:[{name:"show",rawName:"v-show",value:!e.hasSelectedOptions,expression:"!hasSelectedOptions"}],staticClass:"placeholder"},[e._v(e._s(e.placeholder))]),t("div",{directives:[{name:"show",rawName:"v-show",value:e.hasSelectedOptions,expression:"hasSelectedOptions"}],staticClass:"selected-option"},[t("div",[e._v(e._s(e.hasSelectedOptions?e.selectedOptions[0][e.name]:"")+e._s(e.hasSelectedOptions&&e.subTitle?" "+e.selectedOptions[0][e.subTitle]:""))]),t("div",{directives:[{name:"show",rawName:"v-show",value:e.selectedOptionsNoEmpty.length>1,expression:"selectedOptionsNoEmpty.length > 1"}],staticClass:"num-box"},[e._v(" "+e._s("+"+e.moreLength)+" ")])]),t("div",{class:{"del-show":e.hasSelectedOptions,clearable:e.hasSelectedOptions&&e.clearable}},[t("i",{staticClass:"el-icon-arrow-down"}),t("i",{staticClass:"iconfont ak-file-del",on:{click:function(t){return t.stopPropagation(),e.handelDeleteSelect.apply(null,arguments)}}})])]),t("div",{staticClass:"multi-select-contain",style:{minWidth:e.width+"px"}},[t("div",{staticClass:"custom-search-section"},[t("el-input",{ref:"searchInput",attrs:{size:"small",placeholder:e.$t("搜索内容")},on:{input:e.handleInput},model:{value:e.keywords,callback:function(t){e.keywords=t},expression:"keywords"}}
1)],1),t("div",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:e.loadMore,expression:"loadMore"}],staticClass:"checkbox-list",style:{height:e.listHeight},attrs:{"infinite-scroll-disabled":e.disabled,"infinite-scroll-distance":20}},[e.showAllSelect?t("el-checkbox",{directives:[{name:"show",rawName:"v-show",value:e.filterOptions.length>0,expression:"filterOptions.length > 0"}],on:{change:e.handleCheckAllChange},model:{value:e.checkAll,callback:function(t){e.checkAll=t},expression:"checkAll"}},[e._v(e._s(e.$t("全选")))]):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:0===e.filterOptions.length&&!e.loading,expression:"filterOptions.length === 0 && !loading"}],staticClass:"notFind"},[e._v(e._s(e.$t("无搜索结果")))]),t("el-checkbox-group",{on:{change:e.handleCheckedChange},model:{value:e.checkedList,callback:function(t){e.checkedList=t},expression:"checkedList"}},e._l(e.filterOptions,function(r,a){return t("el-checkbox",{key:a,attrs:{label:r[e.value],disabled:r.disabled}},[t("div",{staticClass:"checked-container"},[t("div",{staticClass:"img"},[t("el-image",{staticStyle:{width:"30px",height:"30px"},attrs:{src:r.img,fit:"fill"}},[t("div",{staticClass:"image-slot",attrs:{slot:"error"},slot:"error"},[t("i",{staticClass:"el-icon-picture-outline",staticStyle:{"font-size":"35px"}})])])],1),t("div",{staticClass:"describe",style:{width:e.width+"px"}},[t("div",{staticClass:"title"},[e._v(e._s(r[e.title]))]),t("div",{staticClass:"details"},[t("div",{staticClass:"left"},[e._v(e._s(r.asin))]),t("div",{staticClass:"right"},[e._v(e._s(r.sku))])])])])])}),1),e.loading?t("div",{staticClass:"loading-status"},[t("i",{staticClass:"el-icon-loading"}),t("span",[e._v(e._s(e.$t("加载中")))])]):e._e(),!e.loading&&!e.hasMore&&e.filterOptions.length>0?t("div",{staticClass:"bottom-tip"},[e._v(e._s(e.$t("已经到底啦")))]):e._e()],1),e.selectDirect?e._e():t("div",{staticClass:"select-footer"},[e.isRemote?t("div",{staticClass:"show-count"},[e._v("("+e._s(e.$t("已选"))+" "+e._s(e.checkedList.length)+"/"+e._s(e.filterOptions.length)+")")]):e._e(),t("el-button",{attrs:{type:"default",size:"mini"},on:{click:function(t){return t.stopPropagation(),e.handleCancel.apply(null,arguments)}}},[e._v(e._s(e.$t("取消")))]),t("el-button",{attrs:{type:"primary",plain:"",size:"mini"},on:{click:function(t){return t.stopPropagation(),e.handleConfirm.apply(null,arguments)}}},[e._v(e._s(e.$t("确定")))])],1)])])],1)};a._withStripped=!0;var i=r(94300),s=r(31838),n=r(45841),o=r(61790),c=r.n(o),l=r(76915),u=r(17243);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach(function(t){(0,s.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var m={name:"MultiAsinSelect",props:{width:{type:[Number,String],default:220},listHeight:{type:String,default:"auto"},placeholder:{type:String,default:"请选择"},value:{type:String,default:"value"},name:{type:String,default:"name"},title:{type:String,default:""},subTitle:{type:String,default:""},selectedOptions:{type:Array,default:function(){return[]}},showAllSelect:{type:Boolean,default:!0},selectDirect:{type:Boolean,default:!1},hide:{type:Boolean|Number,default:!1},clearable:{type:Boolean,default:!0},isRemote:{type:Boolean,default:!1},profile_id:{type:Array|String|Number,default:""},advertType:{type:String,default:"sd"}},computed:{selectedOptionsNoEmpty:function(){return this.selectedOptions?this.selectedOptions:[]},hasSelectedOptions:function(){return this.selectedOptionsNoEmpty.length>0},moreLength:function(){return this.selectedOptions.length-1},disabled:function(){return this.loading||!this.hasMore},filterOptions:function(){return this.localOptions}},data:function(){return{keywords:"",isPoperShow:!1,checkAll:!1,checkedList:[],localOptions:[],page:1,loading:!1,hasMore:!0,timer:null}},watch:{hide:function(e){e&&(this.isPoperShow=!1)}},created:function(){this.debouncedSearch=(0,u.debounce)(this.handleSearch,300)},methods:{resetPagination:function(){this.page=1,this.hasMore=!0,this.localOptions=[]},handleInput:function(){this.resetPagination(),this.debouncedSearch()},handleSearch:function(){var e=this;return(0,n.A)(c().mark(function t(){return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,e.loadData();case 1:case"end":return t.stop()}},t)}))()}
1,loadMore:function(){this.disabled||this.loadData()},loadData:function(){var e=this;return(0,n.A)(c().mark(function t(){var r,a,s,n,o;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e.profile_id){t.next=1;break}return e.loading=!1,t.abrupt("return");case 1:if(!e.loading){t.next=2;break}return t.abrupt("return");case 2:if(e.hasMore){t.next=3;break}return t.abrupt("return");case 3:if(e.loading=!0,t.prev=4,r={profile_id:e.profile_id,page:e.page,pageSize:250,search_text:e.keywords},"sd"!==e.advertType){t.next=6;break}return t.next=5,(0,l.getSdAsinList)(r);case 5:n=t.sent,t.next=8;break;case 6:return t.next=7,(0,l.getSpAsinList)(r);case 7:n=t.sent;case 8:null!=(a=n)&&a.data&&Array.isArray(a.data)?(s=a.data.map(function(e){return h(h({},e),{},{value:e.sku,name:e.sku})}),1===e.page?e.localOptions=s:e.localOptions=[].concat((0,i.A)(e.localOptions),(0,i.A)(s)),s.length<r.pageSize?e.hasMore=!1:e.page++):e.hasMore=!1,t.next=10;break;case 9:t.prev=9,o=t.catch(4),console.error("加载数据失败:",o),e.hasMore=!1;case 10:return t.prev=10,e.loading=!1,t.finish(10);case 11:case"end":return t.stop()}},t,null,[[4,9,10,11]])}))()},poperShow:function(){var e=this;this.$emit("hidePoper"),this.resetPagination(),this.loadData();var t=[];this.selectedOptions.forEach(function(r){t.push(r[e.value])}),this.checkedList=t,this.$nextTick(function(){e.$refs.searchInput.focus()})},handleCheckAllChange:function(e){var t=this;if(!e)return this.checkedList=[],void(this.selectDirect&&this.changeSelectData());var r=[];this.filterOptions.forEach(function(e){r.push(e[t.value])}),this.checkedList=r,this.selectDirect&&this.changeSelectData()},checkIsCheckedAll:function(){var e,t=this,r=!0,a=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return d(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var a=0,i=function(){};return{s:i,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,n=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return n=e.done,e},e:function(e){o=!0,s=e},f:function(){try{n||null==r.return||r.return()}finally{if(o)throw s}}}}(this.filterOptions);try{var i=function(){var a=e.value;if(-1===t.checkedList.findIndex(function(e){return a[t.value]===e}))return r=!1,1};for(a.s();!(e=a.n()).done&&!i(););}catch(e){a.e(e)}finally{a.f()}return r},handleCheckedChange:function(){this.checkAll=this.checkIsCheckedAll(),this.selectDirect&&this.changeSelectData()},handleCancel:function(){this.isPoperShow=!1},changeSelectData:function(){var e=this,t=this.localOptions.filter(function(t){return e.checkedList.findIndex(function(r){return t[e.value]===r})>-1}),r=JSON.parse(JSON.stringify(t));this.$emit("update:selectedOptions",r),this.$emit("change",r)},handleConfirm:function(){this.changeSelectData(),this.isPoperShow=!1},handelDeleteSelect:function(){this.$emit("update:selectedOptions",[]),this.$emit("change",[]),this.isPoperShow=!1},afterLeave:function(){this.isPoperShow=!1}}},f=(0,r(67658).A)(m,a,[],!1,null,"79f65632",null).exports},77210:function(e,t,r){r.r(t),r.d(t,{default:function(){return M}});var a=function(){var e=this,t=e._self._c;return t("div",{staticClass:"advertisingAll"},[e.campaignRouteId?[t("div",{staticClass:"div_main_content"},[t("adCampaign",{ref:"adCampaignRef",attrs:{sellers:e.sellers}})],1)]:[t("div",{staticClass:"leftTree-contianer",style:{flexBasis:e.isWidth?"0px":"238px"}},[t("leftTree",{ref:"leftTree",attrs:{seller:e.seller,date_start:e.commonForm.date_start,date_end:e.commonForm.date_end},on:{changWidth:e.changWidth}})],1),t("div",{staticClass:"div_main_content",style:{width:e.isWidth?"100%":"",height:e.height+"px"}},[t("div",{staticClass:"bid-card",staticStyle:{padding:"0"}},[t("div",{staticClass:"div_main_content_top"},[t("div",{staticClass:"store"},[t("single-select",{attrs:{options:e.sellers,selectedOption:e.seller,ShowShopOwner:!0,value:"id",name:"name",subTitle:"countryName",placeholder:e.$t("店铺"),clearable:!1},on:{"update:selectedOption":function(t){e.seller=t},"update:selected-option":function(t){e.seller=t},change:e.changeSeller}}),t("span",[e._v(e._s(e.$t("当前币种"))+":"+e._s(e.seller.currency))])],1
1),t("span",[e._v(e._s(e.seller.timeZoneName)+":"+e._s(e.seller.date))])]),t("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},e._l(e.tabList,function(r){return t("el-tab-pane",{key:r.value,attrs:{label:e.$t(r.label),name:r.value}})}),1),"10"===e.activeName?t("el-tabs",{staticStyle:{"margin-top":"4px"},attrs:{type:"card"},on:{"tab-click":e.handleSubTabClick},model:{value:e.subActiveName,callback:function(t){e.subActiveName=t},expression:"subActiveName"}},e._l(e.subTabList,function(r){return t("el-tab-pane",{key:r.value,attrs:{label:e.$t(r.label),name:r.value}})}),1):e._e(),"405"===e.activeName?t("div",{staticClass:"tab-switch"},e._l(e.keywordSwitchOptions,function(r,a){return t("div",{key:a,class:["tab-item",{active:e.currentKeywordTab===r.value}],on:{click:function(t){return e.handleKeywordTabSwitch(r.value)}}},[e._v(" "+e._s(e.$t(r.label))+" ")])}),0):e._e()],1),t("keep-alive",[t(e.tabComponent,{key:"".concat(e.activeName,"_").concat(e.subActiveName,"_").concat(e.currentKeywordTab),ref:"spList",tag:"component",attrs:{moudleType:e.getMoudleType,seller:e.seller,commonForm:e.commonForm,isDetail:e.isDetailPage},on:{"update:commonForm":function(t){e.commonForm=t},"update:common-form":function(t){e.commonForm=t},"selection-change":e.handleSelectionChange,changePrice:e.changePrice},scopedSlots:e._u([{key:"search",fn:function(){return[t("SearchModel",{ref:"searchModelRef",attrs:{activeName:e.activeName,subActiveName:e.subActiveName,keywordTab:"405"===e.activeName?e.currentKeywordTab:"",searchForm:e.commonForm,suppressFilterAutoSearch:e.tabSwitchSearching,textareaSearch:e.textareaSearch,seller:e.seller},on:{doSearch:e.doSearch}})]},proxy:!0},{key:"button",fn:function(){return["400"==e.activeName?t("el-button",{attrs:{disabled:!e.seller.profile_id,size:"small",type:"primary"},on:{click:function(t){return e.addAdvertisingButton(1)}}},[t("i",{staticClass:"el-icon-circle-plus-outline",staticStyle:{"font-size":"12px"}}),e._v(e._s(e.$t("创建广告活动"))+" ")]):e._e(),"400"==e.activeName?t("el-tooltip",{attrs:{effect:"dark",placement:"top",content:e.$t("使用超级结构,可批量创建广告活动和添加关键词,效率提升80%!")}},[t("el-button",{staticStyle:{"margin-left":"4px"},attrs:{disabled:!e.seller.profile_id,size:"small",type:"primary"},on:{click:e.batchCreateAdvertising}},[t("i",{staticClass:"el-icon-circle-plus-outline",staticStyle:{"margin-left":"4px","font-size":"12px"}}),e._v(e._s(e.$t("批量建广告"))+" ")])],1):e._e(),"401"==e.activeName?t("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.addAdvertisingButton(2)}}},[t("i",{staticClass:"el-icon-circle-plus-outline",staticStyle:{"margin-left":"4px","font-size":"12px"}}),e._v(e._s(e.$t("创建广告组"))+" ")]):e._e(),"403"==e.activeName?t("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.addAdvertisingButton(3)}}},[t("i",{staticClass:"el-icon-circle-plus-outline",staticStyle:{"margin-left":"4px","font-size":"12px"}}),e._v(e._s(e.$t("添加广告"))+" ")]):e._e(),["405"].includes(e.activeName)&&"keywords"===e.currentKeywordTab?t("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.addAdvertisingButton(4)}}},[t("i",{staticClass:"el-icon-circle-plus-outline",staticStyle:{"margin-left":"4px","font-size":"12px"}}),e._v(e._s(e.$t("添加关键词"))+" ")]):e._e(),["406"].includes(e.activeName)?t("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.addAdvertisingButton(5)}}},[t("i",{staticClass:"el-icon-circle-plus-outline",staticStyle:{"margin-left":"4px","font-size":"12px"}}),e._v(e._s(e.$t("添加商品定位"))+" ")]):e._e(),["407"].includes(e.activeName)?t("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.addAdvertisingButton(6)}}},[t("i",{staticClass:"el-icon-circle-plus-outline",staticStyle:{"margin-left":"4px","font-size":"12px"}}),e._v(e._s(e.$t("添加否定关键词"))+" ")]):e._e(),["408"].includes(e.activeName)?t("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.addAdvertisingButton(7)}}},[t("i",{staticClass:"el-icon-circle-plus-outline",staticStyle:{"margin-left":"4px","font-size":"12px"}}
1),e._v(e._s(e.$t("添加否定投放"))+" ")]):e._e(),"405"!==e.activeName||"keywordGroup"!==e.currentKeywordTab?t("batchOperation",{attrs:{targetData:e.selectedTableData,advertType:"SP",moduleType:e.moduleType},on:{doSearch:function(t){e.fetchTableData(),e.selectedTableData=[]}}}):e._e(),t(e.matchedComponent,{tag:"component",staticStyle:{"margin-left":"4px"},attrs:{seller:e.seller,advertType:"SP"}})]},proxy:!0}])})],1)],1)],t("addAdvertising",{ref:"addAdvertising",attrs:{advertType:"sp"},on:{doSearch:e.doSearch}})],2)};a._withStripped=!0;var i=r(45841),s=r(31838),n=r(61790),o=r.n(n),c=r(76915),l=r(91445),u=function(){var e=this,t=e._self._c;return t("div",{staticClass:"advertisingAll"},[t("div",{staticClass:"bid-card-route"},[t("div",{},[e._v(e._s(e.$t("SP广告"))+" >")]),t("navigation-select",{attrs:{item:e.getCampaignTarget,profile_id:e.currentSeller.profile_id,advertType:"sp",isGroup:!1},on:{select:e.handleCampaignSelect,close:function(t){return e.closeRoute("campaign")}}}),e.getAdGroupTarget.ad_group_id?t("navigation-select",{attrs:{profile_id:e.currentSeller.profile_id,item:e.getAdGroupTarget,prefix:">",advertType:"sp",campaign_id:e.getCampaignTarget.campaign_id,isGroup:!0},on:{select:e.handleGroupSelect,close:function(t){return e.closeRoute("group")}}}):e._e()],1),t("div",{staticClass:"bid-card"},[t("div",{staticClass:"div_main_content_top"},[t("div",{staticClass:"store"},[t("single-select",{attrs:{options:e.sellers,selectedOption:e.currentSeller,ShowShopOwner:!0,value:"id",name:"name",subTitle:"countryName",placeholder:e.$t("店铺"),clearable:!1,disabled:!0}}),t("span",[e._v(e._s(e.$t("当前币种"))+":"+e._s(e.currentSeller.currency))])],1),t("span",[e._v(e._s(e.currentSeller.timeZoneName)+":"+e._s(e.currentSeller.date))])]),t("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},e._l(e.tabList,function(e){return t("el-tab-pane",{key:e.value,attrs:{label:e.label,name:e.value}})}),1),"AdvertisementDetails9"==e.activeName?t("div",{staticClass:"tab-switch"},e._l(e.switchOptions,function(r,a){return t("div",{key:a,class:["tab-item",{active:e.currentTab===r.value}],on:{click:function(t){return e.handleTabSwitch(r.value)}}},[e._v(" "+e._s(r.label)+" ")])}),0):e._e(),"targetType_405"===e.activeName?t("div",{staticClass:"tab-switch"},e._l(e.keywordSwitchOptions,function(r,a){return t("div",{key:a,class:["tab-item",{active:e.currentKeywordTab===r.value}],on:{click:function(t){return e.handleKeywordTabSwitch(r.value)}}},[e._v(" "+e._s(r.label)+" ")])}),0):e._e(),!e.isKeywordTargetTab||"searchKeyType_411"!==e.activeName&&"searchKeyType_412"!==e.activeName?e._e():t("div",{staticClass:"tab-switch"},e._l(e.searchKeySwitchOptions,function(r,a){return t("div",{key:a,class:["tab-item",{active:e.currentSearchKeyTab===r.value}],on:{click:function(t){return e.handleSearchKeyTabSwitch(r.value)}}},[e._v(" "+e._s(r.label)+" ")])}),0)],1),t("keep-alive",[t(e.tabComponent,{key:"".concat(e.activeName,"_").concat(e.currentTab,"_").concat(e.currentKeywordTab),ref:"spAdvertisement",tag:"component",attrs:{moudleType:e.moudleType,seller:e.currentSeller,commonForm:e.searchForm,isJump:!e.getAdGroupTarget.ad_group_id,isDetail:!0},on:{"selection-change":e.handleSelectionChange,changePrice:e.changePrice},scopedSlots:e._u([{key:"search",fn:function(){return[t("SearchModel",{ref:"searchModelRef",attrs:{seller:e.currentSeller,activeName:e.activeName,subActiveName:"AdvertisementDetails9"===e.activeName?"AdvertisementDetails9":"",negativeTab:"AdvertisementDetails9"===e.activeName?e.currentTab:"",keywordTab:"targetType_405"===e.activeName?e.currentKeywordTab:"",isDetail:!0,searchForm:e.searchForm,textareaSearch:e.textareaSearch,statePlaceholder:e.$t("全部状态")},on:{doSearch:e.doSearch}})]},proxy:!0},{key:"syncBtn",fn:function(){return[e.showSyncBtn?t("el-button",{staticClass:"ml-8",attrs:{size:"small",loading:e.syncLoading},on:{click:e.syncAdvert}},[e._v(e._s(e.$t("同步")))]):e._e()]},proxy:!0},{key:"button",fn:function(){return["AdvertisementDetails2"==e.activeName?t("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.addAdvertisingButton(2)}}},[t("i",{staticClass:"el-icon-circle-plus-outline",staticStyle:{"margin-left":"4px","font-size":"12px"}}
1),e._v(e._s(e.$t("创建广告组"))+" ")]):e._e(),"AdvertisementDetails4"==e.activeName?t("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.addAdvertisingButton(3)}}},[t("i",{staticClass:"el-icon-circle-plus-outline",staticStyle:{"margin-left":"4px","font-size":"12px"}}),e._v(e._s(e.$t("添加广告"))+" ")]):e._e(),"targetType_405"==e.activeName&&"keywords"===e.currentKeywordTab?t("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.addAdvertisingButton(4)}}},[t("i",{staticClass:"el-icon-circle-plus-outline",staticStyle:{"margin-left":"4px","font-size":"12px"}}),e._v(e._s(e.$t("添加关键词"))+" ")]):e._e(),"targetType_406"==e.activeName?t("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.addAdvertisingButton(5)}}},[t("i",{staticClass:"el-icon-circle-plus-outline",staticStyle:{"margin-left":"4px","font-size":"12px"}}),e._v(e._s(e.$t("添加商品定位"))+" ")]):e._e(),"targetType_405"!==e.activeName||"keywordGroup"!==e.currentKeywordTab?t("batchOperation",{attrs:{targetData:e.selectedTableData,advertType:"SP",moduleType:e.moduleType},on:{doSearch:function(t){e.doSearch(),e.selectedTableData=[]}}}):e._e(),t(e.matchedComponent,{tag:"component",staticStyle:{"margin-left":"4px"},attrs:{seller:e.currentSeller,advertType:"SP"}})]},proxy:!0}])})],1),t("addAdvertising",{ref:"addAdvertising",attrs:{advertType:"sp"},on:{doSearch:e.doSearch}})],1)};u._withStripped=!0;var d=r(40694),p=r(94545),h=r(83632),m=r(52853),f=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{staticClass:"search-container"},[t("div",{staticClass:"search-box"},[t("el-date-picker",{staticStyle:{width:"260px"},attrs:{"unlink-panels":"",type:"daterange","value-format":"yyyy-MM-dd","range-separator":"-","start-placeholder":e.$t("开始日期"),"end-placeholder":e.$t("结束日期"),align:"left",size:"small",clearable:!1,"picker-options":e.$getUnifiedDateRangeOptions(e.dateOptions)},on:{change:e.changeDate},model:{value:e.searchDate,callback:function(t){e.searchDate=t},expression:"searchDate"}}),e.showReportTypeSelect?t("el-select",{staticClass:"ak-width-140",staticStyle:{width:"140px"},attrs:{size:"small",clearable:!1},on:{change:e.doSearch},model:{value:e.searchForm.report_type,callback:function(t){e.$set(e.searchForm,"report_type",t)},expression:"searchForm.report_type"}},[t("el-option",{attrs:{label:e.$t("取投放数据"),value:"target"}}),t("el-option",{attrs:{label:e.$t("取搜索词数据"),value:"search_term"}})],1):e._e(),["10"].includes(e.activeName)&&["409","410"].includes(e.subActiveName)?t("multi-select-tree",{attrs:{placeholder:e.$t("全部投放类型"),width:"140",treeData:e.dropTypeTreeOptions,value:"value",name:"name",selectedData:e.searchForm.target_text},on:{change:e.doSearch,"update:selectedData":function(t){return e.$set(e.searchForm,"target_text",t)},"update:selected-data":function(t){return e.$set(e.searchForm,"target_text",t)}}}):e._e(),["400","401","402","403"].includes(e.activeName)?t("multi-select",{attrs:{placeholder:e.$t("全部投放类型"),width:"140",options:e.dropTypeOptions,selectedOptions:e.searchForm.tf_type,value:"value",name:"name"},on:{"update:selectedOptions":function(t){return e.$set(e.searchForm,"tf_type",t)},"update:selected-options":function(t){return e.$set(e.searchForm,"tf_type",t)},change:e.doSearch}}):e._e(),e.showMatchTypeSelect?t("multi-select",{attrs:{placeholder:e.$t("全部匹配方式"),width:"140",options:e.matchTpeOptions,selectedOptions:e.searchForm.target_text,value:"value",name:"name"},on:{"update:selectedOptions":function(t){return e.$set(e.searchForm,"target_text",t)},"update:selected-options":function(t){return e.$set(e.searchForm,"target_text",t)},change:e.doSearch}}):e._e(),e.isKeywordGroupListSearchMode?t("multi-select",{attrs:{placeholder:e.$t("全部关键词组"),width:"180",options:e.keywordGroupValueOptions,selectedOptions:e.searchForm.keyword_group_value,value:"value",name:"name"},on:{"update:selectedOptions":function(t){return e.$set(e.searchForm,"keyword_group_value",t)},"update:selected-options":function(t){return e.$set(e.searchForm,"keyword_group_value",t)},change:e.doSearch}}
1):e._e(),e.showPortfolioSelect?t("MultiSelectAdvertisingMix",{attrs:{placeholder:e.$t("全部广告组合"),width:"140",selectedOptions:e.searchForm.portfolio_id,value:"value",name:"name",profile_id:e.seller.profile_id},on:{"update:selectedOptions":function(t){return e.$set(e.searchForm,"portfolio_id",t)},"update:selected-options":function(t){return e.$set(e.searchForm,"portfolio_id",t)},change:e.doSearch}}):e._e(),e.showCampaignSelect?t("MultiSelectCampaign",{attrs:{placeholder:e.$t("全部广告活动"),width:"140",selectedOptions:e.searchForm.campaign_id,profile_id:e.seller.profile_id,advertType:"sp",value:"value",name:"name"},on:{"update:selectedOptions":function(t){return e.$set(e.searchForm,"campaign_id",t)},"update:selected-options":function(t){return e.$set(e.searchForm,"campaign_id",t)},change:e.changeCampaign}}):e._e(),e.showAdGroupSelect?t("MultiSelectAdvertisingGroup",{attrs:{placeholder:e.$t("全部广告组"),width:"140",selectedOptions:e.searchForm.ad_group_id,value:"value",name:"name",campaign_id:e.campaignId,profile_id:e.seller.profile_id,advertType:"sp"},on:{"update:selectedOptions":function(t){return e.$set(e.searchForm,"ad_group_id",t)},"update:selected-options":function(t){return e.$set(e.searchForm,"ad_group_id",t)},change:e.doSearch}}):e._e(),e.showMskuSelect?t("MultiAsinSelect",{attrs:{placeholder:e.$t("全部MSKU"),width:"320",selectedOptions:e.searchForm.mskus,value:"value",name:"name",title:"title",profile_id:e.seller.profile_id,advertType:"sp"},on:{"update:selectedOptions":function(t){return e.$set(e.searchForm,"mskus",t)},"update:selected-options":function(t){return e.$set(e.searchForm,"mskus",t)},change:e.doSearch}}):e._e(),["400","402"].includes(e.activeName)?t("single-select",{attrs:{placeholder:e.$t("竞价策略"),width:"140",options:e.biddingStrategiesOptions,selectedOption:e.searchForm.jjcl_list,value:"value",name:"name",ShowShopOwner:!0},on:{"update:selectedOption":function(t){return e.$set(e.searchForm,"jjcl_list",t)},"update:selected-option":function(t){return e.$set(e.searchForm,"jjcl_list",t)},change:e.doSearch}}):e._e(),["400"].includes(e.activeName)?t("single-select",{attrs:{placeholder:e.$t("网站"),width:"140",options:e.siteRestrictionOptions,selectedOption:e.searchForm.site_restrictions,value:"value",name:"name"},on:{"update:selectedOption":function(t){return e.$set(e.searchForm,"site_restrictions",t)},"update:selected-option":function(t){return e.$set(e.searchForm,"site_restrictions",t)},change:e.doSearch}}):e._e(),["searchKeyType_413"].includes(e.activeName)?t("single-select",{attrs:{placeholder:e.$t("全部自动定位"),width:"140",options:e.autoTargetingOptions,selectedOption:e.searchForm.targeting_text,value:"value",name:"name",ShowShopOwner:!0},on:{"update:selectedOption":function(t){return e.$set(e.searchForm,"targeting_text",t)},"update:selected-option":function(t){return e.$set(e.searchForm,"targeting_text",t)},change:e.doSearch}}):e._e(),e.showStateSelect?t("multi-select",{attrs:{placeholder:["10","searchKeyType_411"].includes(e.activeName)?e.$t("投放状态"):e.statePlaceholder,width:"140",options:e.stateOption,selectedOptions:e.searchForm.state,value:"value",name:"name"},on:{"update:selectedOptions":function(t){return e.$set(e.searchForm,"state",t)},"update:selected-options":function(t){return e.$set(e.searchForm,"state",t)},change:e.doSearch}}):e._e(),e.showServiceStatusSelect?t("multi-select",{attrs:{placeholder:e.$t("全部服务状态"),width:"140",options:e.serviceStateOptions,selectedOptions:e.searchForm.service_status,value:"value",name:"name"},on:{"update:selectedOptions":function(t){return e.$set(e.searchForm,"service_status",t)},"update:selected-options":function(t){return e.$set(e.searchForm,"service_status",t)},change:e.doSearch}}):e._e(),e.showAdGroupServiceStatusSelect?t("multi-select",{attrs:{placeholder:e.$t("全部广告组服务状态"),width:"180",options:e.adGroupServiceStateOptions,selectedOptions:e.searchForm.ad_group_service_status,value:"value",name:"name"},on:{"update:selectedOptions":function(t){return e.$set(e.searchForm,"ad_group_service_status",t)},"update:selected-options":function(t){return e.$set(e.searchForm,"ad_group_service_status",t)},change:e.doSearch}}
1):e._e(),["402"].includes(e.activeName)?t("single-select",{attrs:{placeholder:e.$t("广告位"),width:"140",options:e.campaignPlacemenOptions,selectedOption:e.searchForm.placement,value:"value",name:"name"},on:{"update:selectedOption":function(t){return e.$set(e.searchForm,"placement",t)},"update:selected-option":function(t){return e.$set(e.searchForm,"placement",t)},change:e.doSearch}}):e._e(),["10","searchKeyType_411","searchKeyType_412","searchKeyType_413"].includes(e.activeName)?t("single-select",{attrs:{placeholder:e.$t("操作类型"),width:"140",options:e.operationTypeOptions,selectedOption:e.searchForm.operation_type,value:"value",name:"name"},on:{"update:selectedOption":function(t){return e.$set(e.searchForm,"operation_type",t)},"update:selected-option":function(t){return e.$set(e.searchForm,"operation_type",t)},change:e.doSearch}}):e._e(),e.showToolsSelect?t("multi-select",{attrs:{placeholder:e.$t("广告工具"),width:"140",options:e.keywordGroupToolsOptions,selectedOptions:e.searchForm.tools,value:"value",name:"name"},on:{"update:selectedOptions":function(t){return e.$set(e.searchForm,"tools",t)},"update:selected-options":function(t){return e.$set(e.searchForm,"tools",t)},change:e.doSearch}}):e._e(),e.showTagSelect?t("MultiSelectTag",{attrs:{placeholder:e.tagsPlaceholder,width:140,selectedOptions:e.searchForm.tag_uuid,profile_id:e.seller.profile_id,tag_code:e.tagCode},on:{change:e.changeTags}}):e._e(),e.showCurrencySelectField?t("el-select",{staticClass:"ak-width-140",staticStyle:{width:"140px"},attrs:{size:"small",placeholder:e.$t("币种"),clearable:""},on:{change:e.doSearch},model:{value:e.searchForm.change_currency_code,callback:function(t){e.$set(e.searchForm,"change_currency_code",t)},expression:"searchForm.change_currency_code"}},e._l(e.currencyList,function(e){return t("el-option",{key:e.id,attrs:{label:e.value,value:e.value}})}),1):e._e(),e.textareaSearch.key?t("div",{staticClass:"search-last"},[t("div",{staticClass:"textarea-search"},[t("div",{staticClass:"search-block",staticStyle:{"margin-right":"0"}},[["searchKeyType_412","searchKeyType_413"].includes(e.activeName)?[t("div",{staticStyle:{display:"flex","align-items":"center"}},[t("el-select",{staticStyle:{width:"100px","margin-right":"0"},attrs:{size:"small",placeholder:e.$t("请选择")},on:{change:e.doSearch},model:{value:e.searchForm.search_type,callback:function(t){e.$set(e.searchForm,"search_type",t)},expression:"searchForm.search_type"}},e._l(e.searchTypeOptions,function(e){return t("el-option",{key:e.value,attrs:{value:e.value,label:e.name}})}),1),t("el-select",{staticStyle:{width:"100px","margin-right":"0"},attrs:{size:"small",placeholder:e.$t("请选择")},on:{change:e.doSearch},model:{value:e.searchForm.accurate,callback:function(t){e.$set(e.searchForm,"accurate",t)},expression:"searchForm.accurate"}},e._l(e.accurateOptions,function(e){return t("el-option",{key:e.value,attrs:{value:e.value,label:e.name}})}),1),t("el-input",{staticStyle:{width:"220px"},attrs:{placeholder:e.textareaSearch.placeholder,size:"small",clearable:""},on:{clear:function(t){return e.handleClear(e.textareaSearch.key)}},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.doSearch()}},model:{value:e.keywords,callback:function(t){e.keywords=t},expression:"keywords"}})],1)]:[t("el-input",{staticClass:"input-with-select",style:{width:["405","407","targetType_405","targetType_406","AdvertisementDetails9","searchKeyType_411"].includes(e.activeName)||["10"].includes(e.activeName)&&["409","410","411"].includes(e.subActiveName)?"320px":"220px"},attrs:{placeholder:e.textareaSearch.placeholder,size:"small",clearable:""},on:{clear:function(t){return e.handleClear(e.textareaSearch.key)}},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.doSearch()}},model:{value:e.keywords,callback:function(t){e.keywords=t},expression:"keywords"}},[["405","407","targetType_405","targetType_406","AdvertisementDetails9","searchKeyType_411"].includes(e.activeName)||["10"].includes(e.activeName)&&["409","410","411"].includes(e.subActiveName)?t("el-select",{staticClass:"ak-width-100",attrs:{slot:"prepend",placeholder:e.$t("请选择")},on:{change:e.doSearch},slot:"prepend",model:{value:e.searchForm.select_type,callback:function(t){e.$set(e.searchForm,"select_type",t)},expression:"searchForm.select_type"}},e._l(e.selectTypeOptions,function(e){return t("el-option",{key:e.value,attrs:{value:e.value,label:e.name}})}
1),1):e._e()],1)],t("i",{staticClass:"iconfont ak-search",on:{click:e.doSearch}})],2),t("textarea-pop",{ref:"textareaPop",on:{change:e.keywordsListChange}})],1)]):e._e(),t("div",{staticClass:"btn-group"},[e.supportFilterTemplate?t("filter-template-popover",{ref:"templatePopover",attrs:{"template-key":"adFilterTemplatesSP","filter-form":e.filterForm,activeName:e.filterTemplateActiveName},on:{"toggle-filter-panel":e.handleToggleFilterPanel,"apply-template":e.handleApplyTemplate,"open-save-template-dialog":e.handleOpenSaveTemplateDialog}}):e._e(),t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.doSearch}},[e._v(e._s(e.$t("查询")))]),t("el-button",{attrs:{size:"small"},on:{click:e.handleReset}},[e._v(e._s(e.$t("重置")))])],1),e.supportFilterTemplate?t("filter-conditions-panel",{key:e.filterTemplateActiveName,ref:"filterConditionsPanel",attrs:{"show-filter-panel":e.showFilterPanel,"filter-form":e.filterForm,activeName:e.filterTemplateActiveName},on:{"cache-restored":e.handleFilterPanelCacheRestored,"save-as-template":e.handleSaveAsTemplate,"apply-filter":e.handleApplyTemplate,"update-template":e.handleUpdateTemplate}}):e._e()],1),e.hasActiveFilters&&e.supportFilterTemplate?t("section",{staticClass:"filter-box"},[e._l(e.activeFilters,function(r){return t("div",{key:r.key,staticClass:"tag-container"},[r.showMore?t("el-popover",{attrs:{placement:"bottom-start",width:"auto",trigger:"hover","popper-class":"all-items-popover"}},[t("div",{staticClass:"all-items-container"},e._l(r.allItems,function(r,a){return t("div",{key:a,staticClass:"item"},[e._v(" "+e._s(r)+" ")])}),0),t("tag-view",{attrs:{slot:"reference",title:r.label,tagString:r.value},on:{change:function(t){return e.clearFilter(r.key)}},slot:"reference"})],1):t("tag-view",{attrs:{title:r.label,tagString:r.value},on:{change:function(t){return e.clearFilter(r.key)}}})],1)}),t("span",{staticClass:"close-all",on:{click:e.handleReset}},[e._v(e._s(e.$t("清除")))])],2):e._e(),t("AdListCategoryTabs",{attrs:{visible:e.showListCategories,options:e.categoryOptions,value:e.currentListCate,"count-label":e.categoryCountLabel,"shop-name":e.seller&&e.seller.name},on:{change:e.handleListCategoryChange}}),t("AdListIsAsinTabs",{attrs:{visible:e.showIsAsinTabs,options:e.isAsinOptions,value:e.currentIsAsin},on:{change:e.handleIsAsinChange}}),t("el-dialog",{attrs:{title:e.$t("保存筛选模板"),visible:e.saveTemplateDialogVisible,width:"400px","close-on-click-modal":!1,"append-to-body":!0},on:{"update:visible":function(t){e.saveTemplateDialogVisible=t},closed:e.cancelSaveTemplate}},[t("el-form",{ref:"saveTemplateForm",staticClass:"save-template-form",attrs:{model:e.saveTemplateForm,rules:e.saveTemplateRules,"label-width":"100px"}},[t("el-form-item",{attrs:{label:e.$t("模板名称:"),prop:"name"}},[t("el-input",{attrs:{placeholder:e.$t("最多只能写20个字符"),maxlength:"20","show-word-limit":""},model:{value:e.saveTemplateForm.name,callback:function(t){e.$set(e.saveTemplateForm,"name",t)},expression:"saveTemplateForm.name"}})],1)],1),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.cancelSaveTemplate}},[e._v(e._s(e.$t("取 消")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.handleSaveTemplate}},[e._v(e._s(e.$t("保 存")))])],1)],1)],1)};f._withStripped=!0;var _=r(62326).A,y=r(67658),v=(0,y.A)(_,f,[],!1,null,"2a76f7fb",null).exports,g=r(17243),b=r(11657),A=r(6273),S=r(32496);function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function F(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?T(Object(r),!0).forEach(function(t){(0,s.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var w={name:"newAdvertisingSp",components:{NavigationSelect:h.A,TextareaPop:m.default,SearchModel:v,batchOperation:b.A,addAdvertising:A.A,SpKeywords:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(3824),r.e(5967),r.e(813)]).then(r.bind(r,53947))},SpKeywordGroups:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(3824),r.e(5967),r.e(1469)]).then(r.bind(r,82875))}},props:{sellers:{type:Array,default:function(){return[]}}},inject:["shareApiMethod"],data:function(){return{activeName:"AdvertisementDetails2",searchForm:{ad_group_id:"",profile_id:"",date_start:"",date_end:"",state:[],name:"",orderField:"",orderSort:"",tag_uuid:[],keyword_group_value:[],tools:[],targeting_text:{},search_type:"",accurate:"",is_asin:""},syncLoading:!1,searchDate:[],searchKeyword:"",groupOptions:[],updateLoading:!1,selectedTableData:[],currentTab:"negativeKeywords",currentKeywordTab:"keywords",switchOptions:[{label:this.$t("否定关键词"),value:"negativeKeywords"},{label:this.$t("否定商品"),value:"negativeProducts"}],keywordSwitchOptions:[{label:this.$t("关键词"),value:"keywords"},{label:this.$t("关键词组"),value:"keywordGroup"}],currentSearchKeyTab:null}},watch:{getAdGroupTarget:{handler:function(e){var t=this;e.ad_group_id?(this.searchForm=this.clearSearchForm(this.searchForm),this.activeName="AdvertisementDetails4",this.syncRouteIdsToSearchForm(),this.$nextTick(function(){t.doSearch()})):this.searchForm.ad_group_id=""},deep:!0},"$route.query.campaign_id":function(){this.syncRouteIdsToSearchForm()},"$route.query.ad_group_id":function(){this.syncRouteIdsToSearchForm()}},provide:function(){var e=this;return{getCheckboxRecords:function(){return e.selectedTableData},shareApiMethod:function(){return e.getUpdateApiMethod}}},computed:{keywordTabComponent:function(){return"keywordGroup"===this.currentKeywordTab?"SpKeywordGroups":"SpKeywords"},tabComponent:function(){var e="targetType_".concat(this.targetType),t="searchKeyType_".concat(this.searchKeyType);return this.$route.query.ad_group_id?(0,s.A)((0,s.A)((0,s.A)({AdvertisementDetails4:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(3824),r.e(5967),r.e(634)]).then(r.bind(r,18492))}},e,{404:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(3824),r.e(5967),r.e(573)]).then(r.bind(r,11051))},405:this.keywordTabComponent,406:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(3824),r.e(5967),r.e(3102)]).then(r.bind(r,48144))}}[this.targetType]),"AdvertisementDetails9","negativeKeywords"===this.currentTab?function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(5967),r.e(9918)]).then(r.bind(r,80668))}:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(5967),r.e(75)]).then(r.bind(r,79309))}),t,{411:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(5967),r.e(7323)]).then(r.bind(r,2225))},412:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(3824),r.e(5967),r.e(1037)]).then(r.bind(r,4203))},413:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(3824),r.e(5967),r.e(1037)]).then(r.bind(r,4203))}}[this.searchKeyType])[this.activeName]:(0,s.A)((0,s.A)((0,s.A)({AdvertisementDetails2:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(3824),r.e(5967),r.e(5265)]).then(r.bind(r,46319))},AdvertisementDetails4:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(3824),r.e(5967),r.e(634)]).then(r.bind(r,18492))},AdvertisementDetails3:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(5967),r.e(4577)]).then(r.bind(r,21267))}},e,{404:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(3824),r.e(5967),r.e(573)]).then(r.bind(r,11051))},405:this.keywordTabComponent,406:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(3824),r.e(5967),r.e(3102)]).then(r.bind(r,48144))}}[this.targetType]),"AdvertisementDetails9","negativeKeywords"===this.currentTab?function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(5967),r.e(9918)]).then(r.bind(r,80668))}:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(5967),r.e(75)]).then(r.bind(r,79309))}),t,{411:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(5967),r.e(7323)]).then(r.bind(r,2225))},412:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(3824),r.e(5967),r.e(1037)]).then(r.bind(r,4203))},413:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(3824),r.e(5967),r.e(1037)]).then(r.bind(r,4203))}}[this.searchKeyType])[this.activeName]}
1,moduleType:function(){return{AdvertisementDetails2:"401",AdvertisementDetails3:"402",AdvertisementDetails4:"403",targetType_404:"404",targetType_405:"keywordGroup"===this.currentKeywordTab?"414":"405",targetType_406:"406",AdvertisementDetails9:"negativeKeywords"===this.currentTab?"407":"408",searchKeyType_412:"412",searchKeyType_413:"413"}[this.activeName]},getUpdateApiMethod:function(){return this.shareApiMethod()[this.moudleType]},getCampaignTarget:function(){return this.$route.query.campaign_id||this.$route.query.campaign_state||this.$route.query.campaign_name?{campaign_id:this.$route.query.campaign_id,state:this.$route.query.campaign_state,name:this.$route.query.campaign_name}:{}},getAdGroupTarget:function(){return this.$route.query.ad_group_id?{ad_group_id:this.$route.query.ad_group_id,state:this.$route.query.ad_group_state,name:this.$route.query.ad_group_name}:{}},moudleType:function(){var e=this;if("targetType_405"===this.activeName)return"keywordGroup"===this.currentKeywordTab?"414":"405";var t=this.tabList.find(function(t){return t.value==e.activeName});return t?t.moudleType:void 0},targetType:function(){if(this.$route.query.target_type)return{auto:404,keyword:405,target:406}[this.$route.query.target_type]},searchKeyType:function(){return null!==this.currentSearchKeyTab?this.currentSearchKeyTab:this.$route.query.target_type?{keyword:411,target:412,auto:413}[this.$route.query.target_type]:void 0},isKeywordTargetTab:function(){return"true"===this.$route.query.isKeywordTarget||!0===this.$route.query.isKeywordTarget},searchKeySwitchOptions:function(){return[{label:this.$t("关键词投放产生"),value:411},{label:this.$t("商品投放产生"),value:412}]},tabList:function(){return this.$route.query.ad_group_id?[{label:this.$t("广告"),value:"AdvertisementDetails4",disabled:!1,moudleType:"403"},{label:this.$t("投放"),value:"targetType_".concat(this.targetType),disabled:!1,moudleType:this.targetType},{label:this.$t("否定投放"),value:"AdvertisementDetails9",disabled:!1,moudleType:"negativeKeywords"==this.currentTab?"407":"408"},{label:this.$t("用户搜索词"),value:"searchKeyType_".concat(this.searchKeyType),disabled:!1,moudleType:this.searchKeyType}]:[{label:this.$t("广告组"),value:"AdvertisementDetails2",disabled:!1,moudleType:"401"},{label:this.$t("广告"),value:"AdvertisementDetails4",disabled:!1,moudleType:"403"},{label:this.$t("广告位"),value:"AdvertisementDetails3",disabled:!1,moudleType:"402"},{label:this.$t("投放"),value:"targetType_".concat(this.targetType),disabled:!1,moudleType:this.targetType},{label:this.$t("否定投放"),value:"AdvertisementDetails9",disabled:!1,moudleType:"negativeKeywords"==this.currentTab?"407":"408"},{label:this.$t("用户搜索词"),value:"searchKeyType_".concat(this.searchKeyType),disabled:!1,moudleType:this.searchKeyType}]},textareaSearch:function(){var e="targetType_".concat(this.targetType),t="searchKeyType_".concat(this.searchKeyType);return this.$route.query.ad_group_id?(0,s.A)((0,s.A)((0,s.A)({AdvertisementDetails4:{key:"search_text",placeholder:this.$t("请输入ASIN或MSKU")}},e,{404:{},405:"keywordGroup"===this.currentKeywordTab?{}:{key:"keyword_text",placeholder:this.$t("请输入Keyword")},406:{key:"asinorcate",placeholder:this.$t("请输入ASIN或类目")}}[this.targetType]),"AdvertisementDetails9",{key:"keyword_text",placeholder:this.$t("请输入否定关键词")}),t,{411:{key:"search_text",placeholder:this.$t("请输入Keyword")},412:{key:"search_text",placeholder:this.$t("请输入ASIN或类目")},413:{key:"search_text",placeholder:this.$t("请输入ASIN或类目")}}[this.searchKeyType])[this.activeName]:(0,s.A)((0,s.A)((0,s.A)({AdvertisementDetails2:{key:"name",placeholder:this.$t("请输入广告组")},AdvertisementDetails4:{key:"search_text",placeholder:this.$t("请输入ASIN或MSKU")},AdvertisementDetails3:{}},e,{404:{},405:"keywordGroup"===this.currentKeywordTab?{}:{key:"keyword_text",placeholder:this.$t("请输入Keyword")},406:{key:"asinorcate",placeholder:this.$t("请输入ASIN或类目")}}[this.targetType]),"AdvertisementDetails9",{key:"keyword_text",placeholder:this.$t("请输入否定关键词")}),t,{411:{key:"search_text",placeholder:this.$t("请输入Keyword")},412:{key:"search_text",placeholder:this.$t("请输入ASIN或类目")},413:{key:"search_text",placeholder:this.$t("请输入ASIN或类目")}}[this.searchKeyType])[this.activeName]},matchedComponent:function(){return["searchKeyType_411","searchKeyType_412","searchKeyType_413"].includes(this.activeName)?function(){return r.e(9631).then(r.bind(r,79631))}:null},showSyncBtn:function(){return!!["AdvertisementDetails9"].includes(this.activeName)||(this.$route.query.ad_group_id?["Advert
1isementDetails4","targetType_404","targetType_405","targetType_406"].includes(this.activeName):["AdvertisementDetails2"].includes(this.activeName))},currentSeller:{get:function(){var e=this;if(this.$route.query.profile_id)return this.sellers&&this.sellers.length>0?this.sellers.find(function(t){return t.profile_id===e.$route.query.profile_id}):{profile_id:this.$route.query.profile_id}}}},created:function(){var e=this;this.setDefaultSearchForm().then(function(){e.pollForSearch()})},methods:{setDefaultSearchForm:function(){var e,t=this;return e=this.$route.query.date_start&&this.$route.query.date_end?[this.$route.query.date_start,this.$route.query.date_end]:(0,p.dateRangeFromDateBefore)(7),this.searchDate=e,new Promise(function(r){var a=function(){t.currentSeller&&t.currentSeller.profile_id?(t.searchForm={campaign_id:t.getCampaignTarget.campaign_id,ad_group_id:t.getAdGroupTarget.ad_group_id,date_start:e[0],date_end:e[1],state:[],orderField:"",orderSort:"",name:"",profile_id:t.currentSeller.profile_id,tag_uuid:[],keyword_group_value:[],tools:[],targeting_text:{},search_type:"",accurate:"",is_asin:""},t.syncRouteIdsToSearchForm(),r()):setTimeout(a,300)};a()})},syncRouteIdsToSearchForm:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.searchForm,t=this.$route.query.campaign_id||this.getCampaignTarget.campaign_id,r=this.$route.query.ad_group_id||this.getAdGroupTarget.ad_group_id;return t&&this.$set(e,"campaign_id",t),r&&this.$set(e,"ad_group_id",r),r&&"AdvertisementDetails4"===this.activeName&&delete e.campaign_id,e},handleCampaignSelect:function(e){if(e.campaign_id){var t=F({},this.$route.query);delete t.ad_group_id,delete t.ad_group_name,this.$router.push({query:F(F({},t),{},{campaign_id:e.campaign_id,campaign_name:e.name,state:e.state})})}this.searchForm.campaign_id=e.campaign_id,delete this.searchForm.ad_group_id,this.doSearch()},handleGroupSelect:function(e){e.ad_group_id&&this.$router.push({query:F(F({},this.$route.query),{},{ad_group_id:e.ad_group_id,ad_group_name:e.name})}),this.searchForm.ad_group_id=e.ad_group_id,this.doSearch()},doSearch:function(e){var t=this;return(0,i.A)(o().mark(function r(){var a,i;return o().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return e&&Object.keys(e).length>0&&Object.keys(e).forEach(function(t){isNaN(t)||""===t.trim()||delete e[t]}),void 0!==(a=t.syncRouteIdsToSearchForm(F(F({},t.searchForm),e&&"object"===(0,d.A)(e)?e:{}))).campaign_id&&t.$set(t.searchForm,"campaign_id",a.campaign_id),void 0!==a.ad_group_id&&t.$set(t.searchForm,"ad_group_id",a.ad_group_id),r.next=1,t.getSpAdvertisementRef();case 1:i=r.sent,t.currentSeller.profile_id&&(a.profile_id=t.currentSeller.profile_id,t.searchForm.profile_id=t.currentSeller.profile_id,i.doSearch(a));case 2:case"end":return r.stop()}},r)}))()},handleClick:function(){var e=this;setTimeout((0,i.A)(o().mark(function t(){var r,a,i,s,n,c;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e.searchForm=e.clearSearchForm(e.searchForm),e.syncRouteIdsToSearchForm(),e.selectedTableData=[],!e.isKeywordTargetTab||"searchKeyType_411"!==e.activeName&&"searchKeyType_412"!==e.activeName||(null===e.currentSearchKeyTab?(e.activeName="searchKeyType_411",e.currentSearchKeyTab=411):411===e.currentSearchKeyTab?e.activeName="searchKeyType_411":412===e.currentSearchKeyTab&&(e.activeName="searchKeyType_412")),"searchKeyType_412"===e.activeName?(e.searchForm.search_type="kw",e.searchForm.accurate="0",e.searchForm.is_asin=""):"searchKeyType_413"===e.activeName?(e.searchForm.search_type="st",e.searchForm.accurate="0",null==e.searchForm.is_asin&&(e.searchForm.is_asin="")):(e.searchForm.search_type="",e.searchForm.accurate="",e.searchForm.is_asin=""),"AdvertisementDetails9"===e.activeName&&e.applyNegativeReportDefaults(),t.prev=1,!["AdvertisementDetails2","AdvertisementDetails4","targetType_404","targetType_405"].includes(e.activeName)){t.next=3;break}return t.next=2,e.$store.dispatch("adFilter/getUserFilters",e.moudleType);case 2:r=t.sent,(a=r&&Array.isArray(r)?r.find(function(e){return!0===e.active}):null)&&a.config_json?(i=F({},a.config_json),Array.isArray(i.jjcl_list)&&(i.jjcl_list={}),Array.isArray(i.placement)&&(i.placement={}),Array.isArray(i.operation_type)&&(i.operation_type={}),e.searchForm=F(F(F({},e.searchForm),i),{},{profile_id:e.currentSeller.profile_id}),e.$nextTick(function(){e.$refs.searchModelRef&&(e.searchForm.date_start&&e.searchForm.date_end?e.$refs.searchModelRef.searchDate=[e.searchForm.date_start,e.searchForm.date_end]:e.searchForm.start_date&&e.searchForm.end_date&&(e.searchForm.date_start=e.searchForm.start_date,e.searchForm.date_end=e.searchForm.end_date,e.$refs.searchModelRef.searchDate=[e.searchForm.start_date,e.searchForm.end_date]),e.$refs.searchModelRef.$forceUpdate())}),(s={AdvertisementDetails2:["mskus","service_status","campaign_id","service_status","tf_type"],AdvertisementDetails4:["tf_type","service_status","ad_group_id","campaign_id"],targetType_405:["portfolio_id","campaign_id","ad_group_id","service_status"],targetType_404:["target_text","portfolio_id","campaign_id","ad_group_id","service_status"]})[e.activeName]&&s[e.activeName].forEach(function(t){e.searchForm.hasOwnProperty(t)&&delete e.searchForm[t]})):(n=e.clearSearchForm(e.searchForm),e.searchForm=n,e.$nextTick(function(){e.$refs.searchModelRef&&e.$refs.searchModelRef.searchDate&&(e.searchForm.date_start&&e.searchForm.date_end?e.$refs.searchModelRef.searchDate=[e.searchForm.date_start,e.searchForm.date_end]:e.searchForm.start_date&&e.searchForm.end_date&&(e.$refs.searchModelRef.searchDate=[e.searchForm.start_date,e.searchForm.end_date]),e.$refs.searchModelRef.$forceUpdate())})),t.next=4;break;case 3:e.$nextTick(function(){e.$refs.searchModelRef&&(["searchKeyType_412","searchKeyType_413"].includes(e.activeName)&&(e.searchForm.orderField="spends",e.searchForm.orderSort="desc"),e.searchForm.date_start&&e.searchForm.date_end?e.$refs.searchModelRef.searchDate=[e.searchForm.date_start,e.searchForm.date_end]:e.searchForm.start_date&&e.searchForm.end_date&&(e.$refs.searchModelRef.searchDate=[e.searchForm.start_date,e.searchForm.end_date]),e.$refs.searchModelRef.$forceUpdate())});case 4:t.next=6;break;case 5:t.prev=5,c=t.catch(1),console.error("获取模板信息失败:",c);case 6:e.getChild(),e.doSearch();case 7:case"end":return t.stop()}},t,null,[[1,5]])})))},getChild:function(){var e=this;return(0,i.A)(o().mark(function t(){return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:["targetType_".concat(e.targetType),"AdvertisementDetails9"].includes(e.activeName)&&(e.searchForm.select_type="1"),["searchKeyType_411","searchKeyType_412","searchKeyType_413"].includes(e.activeName)&&(e.searchForm.select_type="1");case 1:case"end":return t.stop()}},t)}))()},closeRoute:function(e){var t=this;this.searchForm=this.clearSearchForm(this.searchForm);var r=F({},this.$route.query);"group"===e?(delete r.ad_group_id,delete r.ad_group_name,this.activeName="AdvertisementDetails2",setTimeout(function(){t.pollForSearch()})):(delete r.campaign_id,delete r.campaign_name,delete r.ad_group_id,delete r.ad_group_name,delete r.state,delete r.date_start,delete r.date_end),this.$router.push({query:r}),"campaign"==e&&"400"!=this.$parent.activeName&&this.$parent.doSearch()},getExpectedSpAdvertisementComponentName:function(){return"targetType_405"===this.activeName?"keywordGroup"===this.currentKeywordTab?"SP-keywordGroups":"SP-keywords":null},getSpAdvertisementRef:function(){var e=this;return(0,i.A)(o().mark(function t(){var r,a;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.getExpectedSpAdvertisementComponentName(),a=Date.now(),t.abrupt("return",new Promise(function(t){var i=function(){var s=e.$refs.spAdvertisement;!s||r&&s.$options.name!==r?Date.now()-a>=5e3?t(s||null):setTimeout(i,50):t(s)};i()}));case 1:case"end":return t.stop()}},t)}))()},clearSearchForm:function(e){var t=["date_start","date_end","profile_id","campaign_id","ad_group_id"];return Object.keys(e).forEach(function(r){t.includes(r)||(Array.isArray(e[r])?e[r]=[]:(0,g.isObject)(e[r])?e[r]={}:e[r]="")}),(0,g.cloneDeep)(e)},pollForSearch:function(){var e=this;return new Promise(function(t){var r=function(){e.currentSeller.profile_id&&(e.getCampaignTarget.campaign_id||e.$route.query.ad_group_id)?(e.syncRouteIdsToSearchForm(),e.getAdGroupTarget.ad_group_id&&(e.activeName="AdvertisementDetails4"),e.$refs.searchModelRef&&e.$refs.searchModelRef.searchDate&&(e.$refs.searchModelRef.searchDate=[e.searchForm.date_start,e.searchForm.date_end]),e.doSearch(),t()):setTimeout(r,300)};r()})},checkSelectedRecords:function(){var e=this.$refs.spAdvertisement.$refs.mainTable.getCheckboxRecords();return e.map(function(e){return e.status}).includes("ARCHIVED")?(this.$message.error(this.$t("已归档的数据不能修改")),!1):e.length?e:(this.$message.warning(this.$t("请选择要批量处理的内容")),!1)},changeState:function(e,t){var r=this;return(0,i.A)(o().mark(function a(){var i,n,l,u,d;return o().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return i=[t],r.updateLoading=!0,n={profile_id:r.currentSeller.profile_id,sponsored_type:"sp",api_method:"",api_version:"v3",params:null},"ARCHIVED"==e?(l=i.map(function(e){return e[r.getUpdateApiMethod.valueKey]}),n.params=(0,s.A)({},r.getUpdateApiMethod.filterName,{include:l}),n.api_method=r.getUpdateApiMethod.deleteApiMethod):(u=i.map(function(t){return(0,s.A)({state:e},r.getUpdateApiMethod.valueName,t[r.getUpdateApiMethod.valueKey])}),n.params=(0,s.A)({},r.getUpdateApiMethod.updateName,u),n.api_method=r.getUpdateApiMethod.updateApiMethod),a.prev=1,a.next=2,(0,c.amzHandle)(n);case 2:if(200==(d=a.sent).code){a.next=3;break}return r.$message.error(d.msg),a.abrupt("return",!1);
1case 3:if(!d.reasons||!d.reasons.length){a.next=4;break}return r.$message.error(d.reasons.join(",")),a.abrupt("return",!1);case 4:return r.$message.success(r.$t("操作成功")),a.abrupt("return",!0);case 5:a.prev=5,a.catch(1),r.$message.error(r.$t("操作失败"));case 6:return a.prev=6,r.updateLoading=!1,a.finish(6);case 7:case"end":return a.stop()}},a,null,[[1,5,6,7]])}))()},handleSelectionChange:function(e){this.selectedTableData=e},addAdvertisingButton:function(e){var t={name:"",seller:this.currentSeller,val:e};switch(e){case 2:t.name=this.$t("创建广告组");break;case 3:t.name=this.$t("添加广告商品");break;case 4:t.name=this.$t("添加关键词");break;case 5:t.name=this.$t("添加商品定位")}this.$refs.addAdvertising.dialogStart(t),this.$refs.addAdvertising.formAdGroup.adname=[F(F({},this.getCampaignTarget),{},{value:this.getCampaignTarget.campaign_id})],this.$refs.addAdvertising.formAdGroup.GroupNames=this.getAdGroupTarget.ad_group_id?[F(F({},this.getAdGroupTarget),{},{value:this.getAdGroupTarget.ad_group_id})]:[],[4,5].includes(e)&&this.$refs.addAdvertising.formAdGroup.GroupNames.length&&this.$refs.addAdvertising.selectGroupName()},changePrice:function(e,t){var r=this;return(0,i.A)(o().mark(function a(){var i,n,l,u,d;return o().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if("ARCHIVED"!=e.state){a.next=1;break}return r.$message.error(r.$t("归档状态不能修改预算")),"function"==typeof t&&t(!1),a.abrupt("return");case 1:return!(i="function"==typeof t)&&r.$refs.spAdvertisement&&r.$refs.spAdvertisement.loading&&(r.$refs.spAdvertisement.loading.tableLoading=!0),n=r.getUpdateApiMethod,l={profile_id:r.currentSeller.profile_id,sponsored_type:"sp",api_method:n.updateApiMethod,api_version:"v3",params:(0,s.A)({},n.updateName,[(0,s.A)((0,s.A)({},n.valueName,e[n.valueKey]),n.paramsBidValue,e[n.bidKey])])},u=!1,a.prev=2,a.next=3,(0,c.amzHandle)(l);case 3:if(200==(d=a.sent).code){a.next=4;break}return a.abrupt("return",r.$message.error(d.msg));case 4:if(!d.reasons||!d.reasons.length){a.next=5;break}return r.$message.error(d.reasons.join("\n")),a.abrupt("return");case 5:return u=!0,r.$message.success(r.$t("操作成功")),a.next=6,r.refreshCurrentListAfterPriceChange(i,e);case 6:a.next=8;break;case 7:a.prev=7,a.catch(2),r.$message.error(r.$t("操作失败"));case 8:return a.prev=8,!i&&r.$refs.spAdvertisement&&r.$refs.spAdvertisement.loading&&(r.$refs.spAdvertisement.loading.tableLoading=!1),"function"==typeof t&&t(u),a.finish(8);case 9:case"end":return a.stop()}},a,null,[[2,7,8,9]])}))()},refreshCurrentListAfterPriceChange:function(e,t){var r=this;return(0,i.A)(o().mark(function a(){var i;return o().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(i=r.$refs.spAdvertisement,!e){a.next=2;break}return a.next=1,(0,S.PG)({list:i,row:t,mode:"sp",tabKey:r.moudleType||r.activeName});case 1:return a.abrupt("return");case 2:if(!i||"function"!=typeof i.fetchTableData){a.next=3;break}return i.fetchTableData(),a.abrupt("return");case 3:if(!i||"function"!=typeof i.doSearch){a.next=4;break}return i.doSearch("current"),a.abrupt("return");case 4:r.doSearch();case 5:case"end":return a.stop()}},a)}))()},syncAdvert:function(){var e=this;return(0,i.A)(o().mark(function t(){var r,a,i;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r={},"AdvertisementDetails2"==e.activeName&&(r={profile_id:e.currentSeller.profile_id,type:"SpAdGroup",paramId:e.getCampaignTarget.campaign_id}),"AdvertisementDetails4"==e.activeName&&(r={profile_id:e.currentSeller.profile_id,type:"SpProductAds",paramId:e.getAdGroupTarget.ad_group_id}),["targetType_405"].includes(e.activeName)&&(r={profile_id:e.currentSeller.profile_id,type:"SpKeyword",paramId:e.getAdGroupTarget.ad_group_id}),["targetType_404","targetType_406"].includes(e.activeName)&&(r={profile_id:e.currentSeller.profile_id,type:"SpTarget",paramId:e.getAdGroupTarget.ad_group_id}),"AdvertisementDetails9"==e.activeName&&(r=e.getAdGroupTarget.ad_group_id?{profile_id:e.currentSeller.profile_id,type:"negativeKeywords"===e.currentTab?"SpNegativeKeyword":"SpNegativeTarget",paramId:e.getAdGroupTarget.ad_group_id}:{profile_id:e.currentSeller.profile_id,type:"negativeKeywords"===e.currentTab?"SpCampaignNegativeKeyword":"SpCampaignNegativeTarget",paramId:e.getCampaignTarget.campaign_id}),e.syncLoading=!0,t.prev=1,t.next=2,(0,c.syncAdMaster)(r);case 2:200===(a=t.sent).code?(e.$message.success(e.$t("同步中")),e.doSearch()):e.$message.error(a.msg||e.$t("同步失败")),t.next=4;break;case 3:t.prev=3,i=t.catch(1),console.error("Sync error:",i);case 4:return t.prev=4,e.syncLoading=!1,t.finish(4);case 5:case"end":return t.stop()}},t,null,[[1,3,4,5]])}))()},applyNegativeReportDefaults:function(){"negativeKeywords"===this.currentTab?(this.searchForm.negativeType="keyword",this.searchForm.report_type="search_term"):(this.searchForm.negativeType="product",this.searchForm.report_type="target"),this.searchForm.negativeDateType="custom_date"},handleTabSwitch:function(e){var t=this;this.currentTab=e,this.activeName="AdvertisementDetails9",this.searchForm=this.clearSearchForm(this.searchForm),this.applyNegativeReportDefaults(),this.$nextTick(function(){var e;null!==(e=t.$refs.searchModelRef)&&void 0!==e&&e.syncReportTypeDefault&&t.$refs.searchModelRef.syncReportTypeDefault(),t.doSearch()})},handleKeywordTabSwitch:function(e){var t=this;this.currentKeywordTab!==e&&(this.currentKeywordTab=e,this.$refs.spAdvertisement&&void 0!==this.$refs.spAdvertisement.showRowBubble&&(this.$refs.spAdvertisement.showRowBubble=!1),this.selectedTableData=[],this.searchForm=this.clearSearchForm(this.searchForm),this.syncRouteIdsToSearchForm(),this.$nextTick(function(){t.doSearch()}))},handleSearchKeyTabSwitch:function(e){var t=this;this.currentSearchKeyTab=e,411===e?this.activeName="searchKeyType_411":412===e&&(this.activeName="searchKeyType_412"),this.searchForm=this.clearSearchForm(this.searchForm),411===e?
1(this.searchForm.search_type="",this.searchForm.accurate=""):412===e&&(this.searchForm.search_type="kw",this.searchForm.accurate="0",this.searchForm.orderField="spends",this.searchForm.orderSort="desc"),this.$nextTick(function(){t.doSearch()})}}},k=w,$=(0,y.A)(k,u,[],!1,null,"253ccc0c",null).exports,N=r(60899),D=r(6211),O=r(41225);function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach(function(t){(0,s.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var C={name:"newAdvertisingSp",components:{leftTree:l.A,adCampaign:$,SearchModel:v,addAdvertising:A.A,MultiSelectAdvertisingMix:D.default,batchOperation:b.A,SpKeywords:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(3824),r.e(5967),r.e(813)]).then(r.bind(r,53947))},SpKeywordGroups:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(3824),r.e(5967),r.e(1469)]).then(r.bind(r,82875))}},data:function(){var e;return{isWidth:!1,activeName:"400",subActiveName:"409",currentKeywordTab:"keywords",keywordSwitchOptions:[{label:"关键词",value:"keywords"},{label:"关键词组",value:"keywordGroup"}],updateLoading:!1,updateParams:{profile_id:"",sponsored_type:"sp",api_method:"",api_version:"v3",params:null},commonForm:(e={with_ring:0,profile_id:"",date_start:"",date_end:"",tf_type:[],portfolio_id:[],mskus:[],state:[],jjcl_list:{},service_status:[],ad_group_service_status:[],tools:[],labels:[],name:"",placement:{},target_text:[],campaign_id:[],ad_group_id:[]},(0,s.A)((0,s.A)((0,s.A)((0,s.A)((0,s.A)((0,s.A)((0,s.A)((0,s.A)((0,s.A)((0,s.A)(e,"name",[]),"operation_type",{}),"orderField",""),"orderSort",""),"keyword_length",[]),"select_type",""),"negative_level",[]),"report_type",""),"tag_uuid",[]),"keyword_group_value",[]),(0,s.A)((0,s.A)((0,s.A)((0,s.A)(e,"is_prime",!1),"change_currency_code",""),"cate",""),"site_restrictions",{})),groupingForm:{type:1,value:"",options:[],title:"",date_start:"",date_end:"",portfolioId:[]},groupingDialogVisible:!1,height:document.documentElement.offsetHeight-50||500,sellers:[],seller:{},searchRequestId:0,switchTabTimer:null,tabSwitchSearching:!1,tabList:[{label:"SP广告",value:"400",disabled:!1,moudleType:"400"},{label:"广告组",value:"401",disabled:!1,moudleType:"401"},{label:"广告位",value:"402",disabled:!1,moudleType:"402"},{label:"广告",value:"403",disabled:!1,moudleType:"403"},{label:"自动投放",value:"404",disabled:!1,moudleType:"404"},{label:"关键词",value:"405",disabled:!1,moudleType:"405"},{label:"商品投放",value:"406",disabled:!1,moudleType:"406"},{label:"否定词",value:"407",disabled:!1,moudleType:"407"},{label:"否定投放",value:"408",disabled:!1,moudleType:"408"},{label:"用户搜索词",value:"10",disabled:!1,moudleType:"409"}],subTabList:[{label:"查看ST中的词",value:"409",disabled:!1,moudleType:"409"},{label:"查看ST中的ASIN",value:"410",disabled:!1,moudleType:"410"},{label:"关键词投放产生",value:"411",disabled:!1,moudleType:"411"},{label:"商品投放产生",value:"412",disabled:!1,moudleType:"412"},{label:"自动投放产生",value:"413",disabled:!1,moudleType:"413"}],selectedTableData:[]}},provide:function(){var e=this;return{getSeller:function(){return e.seller},getCheckboxRecords:function(){return e.selectedTableData},shareApiMethod:function(){return e.getUpdateApiMethod},getCountryOptions:function(){return e.countryOptions}}},computed:{isDetailPage:function(){return!1},getUpdateApiMethod:function(){return{400:{updateName:"campaigns",updateApiMethod:"put_campaigns",valueKey:"campaign_id",valueName:"campaignId",deleteApiMethod:"delete_campaigns",filterName:"campaignIdFilter",budgetKey:"daily_budget",paramsBudgetValue:"budget"},401:{updateName:"adGroups",updateApiMethod:"put_adGroups",valueKey:"ad_group_id",valueName:"adGroupId",deleteApiMethod:"delete_adGroups",filterName:"adGroupIdFilter",bidKey:"default_bid",paramsBidValue:"defaultBid"},403:{updateName:"productAds",updateApiMethod:"put_productAds",valueKey:"ad_id",valueName:"adId",deleteApiMethod:"delete_productAds",filterName:"adIdFilter"},404:{updateName:"targetingClauses",updateApiMethod:"put_targets",valueKey:"target_id",valueName:"targetId",deleteApiMethod:"delete_targets",filterName:"targetIdFilter",bidKey:"bid",paramsBidValue:"bid"},405:{updateName:"keywords",updateApiMethod:"put_keywords",valueKey:"keyword_id",valueName:"keywordId",deleteApiMethod:"delete_keywords",filterName:"keywordIdFilter",bidKey:"bid",paramsBidValue:"bid"},406:{updateName:"targetingClauses",updateApiMethod:"put_targets",valueKey:"target_id",valueName:"targetId",deleteApiMethod:"delete_targets",filterName:"targetIdFilter",bidKey:"bid",paramsBidValue:"bid"},412:{updateName:"targetingClauses",updateApiMethod:"put_targets",valueKey:"target_id",valueName:"targetId",deleteApiMethod:"delete_targets",filterName:"targetIdFilter",bidKey:"bid",paramsBidValue:"bid"},413:{updateName:"targetingClauses",updateApiMethod:"put_targets",valueKey:"target_id",valueName:"targetId",deleteApiMethod:"delete_targets",filterName:"targetIdFilter",bidKey:"bid",paramsBidValue:"bid"},414:{updateName:"targetingClauses",updateApiMethod:"put_targets",valueKey:"target_id",valueName:"targetId",deleteApiMethod:"delete_targets",filterName:"targetIdFilter",bidKey:"bid",paramsBidValue:"bid"}}},moduleType:function(){return this.getMoudleType},tabComponent:function(){return"10"==this.activeName?{409:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(5967),r.e(2926)]).then(r.bind(r,29722))},410:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(5967),r.e(5399)]).then(r.bind(r,863))},411:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(5967),r.e(7323)]).then(r.bind(r,2225))},412:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(3824),r.e(5967),r.e(1037)]).then(r.bind(r,4203))},413:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(5967),r.e(9197)]).then(r.bind(r,8949))}}[this.subActiveName]:{400:function(){return Promise.all([r.e(2556),r.e(3282),r.e(1053),r.e(3037),r.e(8376),r.e(2419),r.e(3824),r.e(5967),r.e(8509),r.e(1552)]).then(r.bind(r,70106))},401:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(3824),r.e(5967),r.e(5265)]).then(r.bind(r,46319))},402:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(5967),r.e(4577)]).then(r.bind(r,21267))},403:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(3824),r.e(5967),r.e(634)]).then(r.bind(r,18492))},404:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(3824),r.e(5967),r.e(573)]).then(r.bind(r,11051))},405:"keywordGroup"===this.currentKeywordTab?"SpKeywordGroups":"SpKeywords",406:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(3824),r.e(5967),r.e(3102)]).then(r.bind(r,48144))},407:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(2419),r.e(5967),r.e(9918)]).then(r.bind(r,80668))},408:function(){return Promise.all([r.e(2556),r.e(3282),r.e(3037),r.e(8376),r.e(5967),r.e(75)]).then(r.bind(r,79309))}}[this.activeName]},getMoudleType:function(){var e=this;if("405"===this.activeName)return"keywordGroup"===this.currentKeywordTab?"414":"405";var t=this.tabList.find(function(t){return t.value==e.activeName});if("10"==this.activeName){var r=this.subTabList.find(function(t){return t.value==e.subActiveName});if(r)return r.moudleType}return t?t.moudleType:void 0},campaignRouteId:function(){return"super_structure"===this.$route.query.source?"":this.$route.query.campaign_id?this.$route.query.campaign_id:void 0},textareaSearch:function(){return"10"==this.activeName?{409:{key:"search_text",placeholder:this.$t("请输入用户搜索词")},410:{key:"search_text",placeholder:this.$t("请输入ASIN码")},411:{key:"search_text",placeholder:this.$t("请输入Keyword")},412:{key:"search_text",placeholder:this.$t("请输入ASIN或类目")},413:{key:"search_text",placeholder:this.$t("请输入ASIN或类目")}}[this.subActiveName]:{400:{key:"name",placeholder:this.$t("请输入广告活动")},401:{key:"name",placeholder:this.$t("请输入广告组")},402:{key:"name",placeholder:this.$t("请输入广告活动")},403:{key:"search_text",placeholder:this.$t("请输入ASIN或MSKU")},404:{},405:"keywordGroup"===this.currentKeywordTab?{}
1:{key:"keyword_text",placeholder:this.$t("请输入Keyword")},406:{key:"asinorcate",placeholder:this.$t("请输入ASIN或类目")},407:{key:"keyword_text",placeholder:this.$t("请输入否定关键词")},408:{key:"asinorcate",placeholder:this.$t("请输入ASIN或类目")}}[this.activeName]},matchedComponent:function(){return"10"==this.activeName&&["409","411","412","413"].includes(this.subActiveName)?function(){return r.e(9631).then(r.bind(r,79631))}:null},countryOptions:function(){return this.sellers.map(function(e){return{value:e.amazonsite.toUpperCase(),name:e.countryName,currency:e.currency,date:e.date}}).filter(function(e,t,r){return t===r.findIndex(function(t){return t.value===e.value&&t.name===e.name})})}},created:function(){var e=this;return(0,i.A)(o().mark(function t(){var r,a,i;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r=JSON.parse(localStorage.getItem("userInfos")||"").companyId,a=JSON.parse(localStorage.getItem("userInfos")||"").employeeId,i={module:"广告",companyId:r,employeeId:a,pageTitle:"SP广告new",url:window.location.href.split("?")[0],framework:"NEW"},e.$store.dispatch("auth/addLogsComm",i),e.initTabCache(),e.setDefaultSearchForm(),e.getCountrySellers();case 1:case"end":return t.stop()}},t)}))()},methods:{getPageConf:function(){var e=this.$parent;return e&&e.getPageConf&&e.getPageConf()||{}},savePageConf:function(e,t){var r=this.$parent;r&&r.savePageConf&&r.savePageConf(e,t)},initTabCache:function(){var e=this.getPageConf(),t=this.$route.query.type;this.activeName=t||e.newAdvertisingSp_activeName||"400",this.subActiveName=e.newAdvertisingSp_subActiveName||"409";var r=this.$route.query.keyword_tab;this.currentKeywordTab="keywords"===r||"keywordGroup"===r?r:e.newAdvertisingSp_currentKeywordTab||"keywords"},saveTabCache:function(){this.savePageConf("newAdvertisingSp_activeName",this.activeName),this.savePageConf("newAdvertisingSp_subActiveName",this.subActiveName),this.savePageConf("newAdvertisingSp_currentKeywordTab",this.currentKeywordTab)},handleKeywordTabSwitch:function(e){var t=this;this.currentKeywordTab!==e&&(this.currentKeywordTab=e,this.saveTabCache(),this.$refs.spList&&void 0!==this.$refs.spList.showRowBubble&&(this.$refs.spList.showRowBubble=!1),this.selectedTableData=[],this.tabSwitchSearching=!0,this.commonForm=this.clearSearchForm(this.commonForm),this.$nextTick((0,i.A)(o().mark(function e(){return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,t.getChild();case 1:return e.next=2,t.triggerTabSearch();case 2:case"end":return e.stop()}},e)}))))},getUserFilters:function(e){var t=this;return(0,i.A)(o().mark(function r(){var a,i,s,n;return o().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=1,t.$store.dispatch("adFilter/getUserFilters",e);case 1:if(!((a=r.sent)&&a.length>0)){r.next=2;break}return(i=a[0])&&i.config_json&&(s=x({},i.config_json),Array.isArray(s.jjcl_list)&&(s.jjcl_list={}),Array.isArray(s.placement)&&(s.placement={}),Array.isArray(s.operation_type)&&(s.operation_type={}),t.commonForm=x(x(x({},t.commonForm),s),{},{profile_id:t.commonForm.profile_id}),t.$nextTick(function(){t.$refs.searchModelRef&&t.$refs.searchModelRef.renderFilterForm&&(t.$refs.searchModelRef.renderFilterForm(s),t.commonForm.date_start&&t.commonForm.date_end&&t.$refs.searchModelRef.searchDate&&(t.$refs.searchModelRef.searchDate=[t.commonForm.date_start,t.commonForm.date_end]))})),r.abrupt("return",!0);case 2:return t.$refs.searchModelRef&&t.$refs.searchModelRef.searchDate&&(n=(0,O.getAdDefaultDateRange)(),t.$refs.searchModelRef.searchDate=[n[0],n[1]]),r.abrupt("return",!1);case 3:r.next=5;break;case 4:return r.prev=4,r.catch(0),t.$message.error(t.$t("获取用户过滤器列表失败")),r.abrupt("return",!1);case 5:case"end":return r.stop()}},r,null,[[0,4]])}))()},handleClick:function(){this.switchTabContent()},handleSubTabClick:function(){this.switchTabContent()},switchTabContent:function(){var e=this;this.saveTabCache(),this.switchTabTimer&&(clearTimeout(this.switchTabTimer),this.switchTabTimer=null),this.tabSwitchSearching=!0,this.$refs.spList&&void 0!==this.$refs.spList.showRowBubble&&(this.$refs.spList.showRowBubble=!1),this.switchTabTimer=setTimeout((0,i.A)(o().mark(function t(){var r,a,i,s,n;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e.switchTabTimer=null,e.commonForm=e.clearSearchForm(e.commonForm),e.selectedTableData=[],t.prev=1,!["400","401","403","404","405"].includes(e.activeName)){t.next=3;break}return t.next=2,e.$store.dispatch("adFilter/getUserFilters",e.activeName);case 2:r=t.sent,(a=r&&Array.isArray(r)?r.find(function(e){return!0===e.active}):null)&&a.config_json?(i=x({},a.config_json),Array.isArray(i.jjcl_list)&&(i.jjcl_list={}),Array.isArray(i.placement)&&(i.placement={}),Array.isArray(i.operation_type)&&(i.operation_type={}),e.commonForm=x(x(x({},e.commonForm),i),{},{profile_id:e.seller.profile_id}),e.$nextTick(function(){e.$refs.searchModelRef&&(e.commonForm.date_start&&e.commonForm.date_end?e.$refs.searchModelRef.searchDate=[e.commonForm.date_start,e.commonForm.date_end]:e.commonForm.start_date&&e.commonForm.end_date&&(e.commonForm.date_start=e.commonForm.start_date,e.commonForm.date_end=e.commonForm.end_date,e.$refs.searchModelRef.searchDate=[e.commonForm.start_date,e.commonForm.end_date]),e.$refs.searchModelRef.$forceUpdate())})):(s=e.clearSearchForm(e.commonForm),e.commonForm=s,e.$nextTick(function(){e.$refs.searchModelRef&&e.$refs.searchModelRef.searchDate&&(e.commonForm.date_start&&e.commonForm.date_end?e.$refs.searchModelRef.searchDate=[e.commonForm.date_start,e.commonForm.date_end]:e.commonForm.start_date&&e.commonForm.end_date&&(e.$refs.searchModelRef.searchDate=[e.commonForm.start_date,e.commonForm.end_date]),e.$refs.searchModelRef.$forceUpdate())})),t.next=4;break;case 3:e.$nextTick(function(){e.$refs.searchModelRef&&(e.commonForm.date_start&&e.commonForm.date_end?e.$refs.searchModelRef.searchDate=[e.commonForm.date_start,e.commonForm.date_end]:e.commonForm.start_date&&e.commonForm.end_date&&(e.$refs.searchModelRef.searchDate=[e.commonForm.start_date,e.commonForm.end_date]),e.$refs.searchModelRef.$forceUpdate())});case 4:t.next=6;break;case 5:t.prev=5,n=t.catch(1),console.error("获取模板信息失败:",n);case 6:return t.next=7,e.getChild();case 7:return t.next=8,e.triggerTabSearch();case 8:case"end":return t.stop()}},t,null,[[1,5]])})))},getExpectedSpListComponentName:function(){return"405"===this.activeName?"keywordGroup"===this.currentKeywordTab?"SP-keywordGroups":"SP-keywords":"10"===this.activeName&&{409:"termSt",410:"termAsin",411:"termKeyword",412:"target",413:"termAuto"}[this.subActiveName]||null},getSpListRef:function(){var e=this;return(0,i.A)(o().mark(function t(){var r,a;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.getExpectedSpListComponentName(),a=Date.now(),t.abrupt("return",new Promise(function(t){var i=function(){var s=e.$refs.spList;!s||r&&s.$options.name!==r?Date.now()-a>=5e3?t(s||null):setTimeout(i,50):t(s)};i()}));case 1:case"end":return t.stop()}},t)}))()},getChild:function(){var e=this;return(0,i.A)(o().mark(function t(){return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:["405","407"].includes(e.activeName)&&("405"===e.activeName&&"keywordGroup"===e.currentKeywordTab||(e.commonForm.select_type="1")),["10"].includes(e.activeName)&&["409","410","411","412","413"].includes(e.subActiveName)&&(e.commonForm.select_type="1"),e.tabSwitchSearching||e.doSearch(e.commonForm);case 1:case"end":return t.stop()}},t)}))()},waitForFilterPanelReady:function(e){return(0,i.A)(o().mark(function t(){var r;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&e.supportFilterTemplate){t.next=1;break}return t.abrupt("return");case 1:return r=Date.now(),t.abrupt("return",new Promise(function(t){var a=function(){var i=e.$refs.filterConditionsPanel;i&&i.panelReady||Date.now()-r>=5e3?t():setTimeout(a,50)};a()}));case 2:case"end":return t.stop()}},t)}))()},triggerTabSearch:function(){var e=this;return(0,i.A)(o().mark(function t(){var r;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,e.$nextTick();case 1:return t.next=2,e.waitForSearchModelRef();case 2:return r=t.sent,t.next=3,e.waitForFilterPanelReady(r);case 3:if(!r||"function"!=typeof r.doSearch){t.next=4;break}r.doSearch(e.commonForm),t.next=5;break;case 4:return t.next=5,e.doSearch(e.commonForm);case 5:e.tabSwitchSearching=!1;case 6:case"end":return t.stop()}},t)}))()},changWidth:function(e){var t=this;this.isWidth=e,setTimeout(function(){t.$refs.spList&&t.$refs.spList.$refs.pointerModelRef&&t.$refs.spList.$refs.pointerModelRef.handleResize()},500)},waitForSearchModelRef:function(){var e=this;return(0,i.A)(o().mark(function t(){var r;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=Date.now(),t.abrupt("return",new Promise(function(t){var a=function(){var i=e.$refs.searchModelRef;i?t(i):Date.now()-r>=5e3?t(null):setTimeout(a,50)};a()}));case 1:case"end":return t.stop()}},t)}))()},ensureCommonFormDate:function(){if(!this.commonForm.date_start||!this.commonForm.date_end){var e=(0,O.getAdDefaultDateRange)();this.commonForm.date_start=e[0],this.commonForm.date_end=e[1]}},syncSearchDateToModel:function(){this.$refs.searchModelRef&&this.commonForm.date_start&&this.commonForm.date_end&&(this.$refs.searchModelRef.searchDate=[this.commonForm.date_start,this.commonForm.date_end])},getCountrySellers:function(){var e=this;return(0,i.A)(o().mark(function t(){var r,a;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=function(t){e.sellers=t;var r=e.$route.query.profile_id,a=r&&t.find(function(e){return String(e.profile_id)===String(r)})||t.find(function(e){return e.isSelected});a&&a.profile_id?e.seller=a:e.seller=t[0],e.seller.profile_id&&(e.commonForm.profile_id="".concat(e.seller.profile_id),e.updateParams.profile_id=e.seller.profile_id)},t.next=1,(0,p.getStoreProfiles)();case 1:return a=t.sent,r(a),t.next=2,e.$nextTick();case 2:return t.next=3,e.waitForSearchModelRef();case 3:e.ensureCommonFormDate(),e.syncSearchDateToModel(),e.applySuperStructureRouteFilters(),e.$refs.searchModelRef&&e.$refs.searchModelRef.syncReportTypeDefault&&e.$refs.searchModelRef.syncReportTypeDefault(),e.doSearch(e.commonForm);case 4:case"end":return t.stop()}},t)}))()},applySuperStructureRouteFilters:function(){var e=this.$route.query||{};if("super_structure"===e.source){var t=function(e){if(null==e)return"";var t=Array.isArray(e)?e[0]:e;return String(t||"").trim()},r=t(e.filter_campaign_id||e.campaign_id),a=t(e.filter_ad_group_id||e.ad_group_id),i=t(e.campaign_name),s=t(e.ad_group_name),n=t(e.type)||Str
1ing(this.activeName||"");if("400"===n){var o=i||"";this.$set(this.commonForm,"campaign_id",[]),this.$set(this.commonForm,"ad_group_id",[]),this.$set(this.commonForm,"name",o?[o]:[]),this.$refs.searchModelRef&&(this.$refs.searchModelRef.keywords=o)}else if("401"===n){var c=s||"";this.$set(this.commonForm,"ad_group_id",[]),this.$set(this.commonForm,"name",c?[c]:[]),r?this.$set(this.commonForm,"campaign_id",[{value:r,name:i||r}]):this.$set(this.commonForm,"campaign_id",[]),this.$refs.searchModelRef&&(this.$refs.searchModelRef.keywords=c)}else if(r&&this.$set(this.commonForm,"campaign_id",[{value:r,name:i||r}]),a&&this.$set(this.commonForm,"ad_group_id",[{value:a,name:s||a}]),this.$set(this.commonForm,"name",[]),this.$refs.searchModelRef){this.$refs.searchModelRef.keywords="";var l=this.$refs.searchModelRef.$refs&&this.$refs.searchModelRef.$refs.textareaPop;l&&(l.keywords="")}"keywords"===e.keyword_tab&&(this.currentKeywordTab="keywords"),e.date_start&&(this.commonForm.date_start=String(e.date_start)),e.date_end&&(this.commonForm.date_end=String(e.date_end))}},applySpListDefaults:function(e){if(!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).keepDate){var t=(0,O.getAdDefaultDateRange)();e.date_start=t[0],e.date_end=t[1]}return e.state=[],e.cate="",e},setDefaultSearchForm:function(){var e=(0,O.getAdDefaultDateRange)();this.commonForm={with_ring:0,date_start:e[0],date_end:e[1],tf_type:[],portfolio_id:[],mskus:[],state:[],jjcl_list:{},service_status:[],ad_group_service_status:[],tools:[],labels:[],orderField:"",orderSort:"",name:"",profile_id:"",placement:{},target_text:[],operation_type:{},campaign_id:[],ad_group_id:[],keyword_length:[],select_type:"",negative_level:[],report_type:"",cate:"",site_restrictions:{}}},changeSeller:function(e){var t=this;return(0,i.A)(o().mark(function r(){return o().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=1,(0,p.updateSelectedProfile)(e.profile_id);case 1:return t.seller=e,t.commonForm.profile_id="".concat(t.seller.profile_id),t.updateParams.profile_id=t.seller.profile_id,r.next=2,new Promise(function(e){var r=function(){t.$refs.searchModelRef&&t.$refs.searchModelRef.handleReset?(t.$refs.searchModelRef.handleReset(),e()):setTimeout(r,100)};r()});case 2:case"end":return r.stop()}},r)}))()},clearSearchForm:function(e){var t=["date_start","date_end","profile_id"];return["404","405","406"].includes(this.activeName)&&t.push("is_prime"),Object.keys(e).forEach(function(r){t.includes(r)||(Array.isArray(e[r])?e[r]=[]:(0,g.isObject)(e[r])?e[r]={}:e[r]="")}),Array.isArray(e.jjcl_list)&&(e.jjcl_list={}),Array.isArray(e.placement)&&(e.placement={}),Array.isArray(e.operation_type)&&(e.operation_type={}),Array.isArray(e.site_restrictions)&&(e.site_restrictions={}),"407"===this.activeName?(e.report_type="search_term",e.negativeDateType="custom_date"):"408"===this.activeName&&(e.report_type="target",e.negativeDateType="custom_date"),this.applySpListDefaults(e,{keepDate:!0}),(0,g.cloneDeep)(e)},doSearch:function(e){var t=this;return(0,i.A)(o().mark(function r(){var a,i,s;return o().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return a=++t.searchRequestId,r.next=1,new Promise(function(e){var r=function(){t.seller.profile_id?e():setTimeout(r,500)};r()});case 1:if(a===t.searchRequestId){r.next=2;break}return r.abrupt("return");case 2:return e&&Object.keys(e).length&&Object.keys(e).forEach(function(t){isNaN(t)||""===t.trim()||delete e[t]}),r.next=3,t.getSpListRef();case 3:if(i=r.sent,a===t.searchRequestId){r.next=4;break}return r.abrupt("return");case 4:if(i&&"function"==typeof i.doSearch){r.next=5;break}return r.abrupt("return");case 5:if(s=x({},e),e&&Array.isArray(e.jjcl_list)&&(s.jjcl_list={}),e&&Array.isArray(e.placement)&&(s.placement={}),e&&Array.isArray(e.operation_type)&&(s.operation_type={}),e&&Array.isArray(e.site_restrictions)&&(s.site_restrictions={}),t.commonForm=x(x(x({},t.commonForm),s),{},{profile_id:t.seller.profile_id}),a===t.searchRequestId){r.next=6;break}return r.abrupt("return");case 6:i.doSearch(t.commonForm),t.selectedTableData=[];case 7:case"end":return r.stop()}},r)}))()},batchCreateAdvertising:function(){var e=N.authUtils.isNewUIFrame(),t="profile_id=".concat(this.seller.profile_id,"&currency=").concat(this.seller.currency);e?N.authUtils.openThirdPage("advert/batchCreateSpAd?".concat(t)):N.authUtils.openThirdPage("batchCreateSpAd?".concat(t))},addAdvertisingButton:function(e){var t={name:"",seller:this.seller,val:e,type:this.activeName};switch(e){case 1:return N.authUtils.isNewUIFrame()?N.authUtils.openThirdPage("advert/createSpCampaign?profile_id=".concat(this.seller.profile_id,"&currency=").concat(this.seller.currency)):N.authUtils.openThirdPage("createSpCampaign?profile_id=".concat(this.seller.profile_id,"&currency=").concat(this.seller.currency)),!1;case 2:t.name=this.$t("添加广告组");break;case 3:t.name=this.$t("添加广告商品");break;case 4:t.name=this.$t("添加关键词");break;case 5:t.name=this.$t("添加商品定位");break;case 6:t.name=this.$t("添加否定关键词"),this.$refs.addAdvertising.biddingForm.putin=1;break;case 7:t.name="添加否定投放",this.$refs.addAdvertising.biddingForm.putin=2}this.$refs.addAdvertising.dialogStart(t)},checkSelectedRecords:function(){var e=this.$refs.spList.$refs.mainTable.getCheckboxRecords();return e.map(function(e){return e.status}).includes("ARCHIVED")?(this.$message.error(this.$t("已归档的数据不能修改")),!1):e.length?e:(this.$message.warning(this.$t("请选择要批量处理的内容")),!1)},changeState:function(e,t){var r=this;return(0,i.A)(o().mark(function a(){var i,n,l,u,d,p;return o().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(i=[t],r.updateLoading=!0,r.updateParams.profile_id=t.profile_id,n=r.getUpdateApiMethod[r.getMoudleType]){a.next=1;break}return r.$message.error(r.$t("操作失败")),r.updateLoading=!1,a.abrupt("return",!1);case 1:return"ARCHIVED"==e?(l=i.map(function(e){return e[n.valueKey]}),r.updateParams.params=(0,s.A)({},n.filterName,{include:l}),r.updateParams.api_method=n.deleteApiMethod):(u=i.map(function(t){return(0,s.A)({state:e},n.valueName,t[n.valueKey])}),r.updateParams.params=(0,s.A)({},n.updateName,u),r.updateParams.api_method=n.updateApiMethod),a.prev=2,a.next=3,(0,c.amzHandle)(r.updateParams);case 3:if(200==(d=a.sent).code){a.next=4;break}return r.$message.error(d.msg),a.abrupt("return",!1);
1case 4:if(!d.reasons||!d.reasons.length){a.next=5;break}return r.$message.error(d.reasons.join(",")),a.abrupt("return",!1);case 5:return r.$message.success(r.$t("操作成功")),a.abrupt("return",!0);case 6:throw a.prev=6,p=a.catch(2),r.$message.error(r.$t("操作失败")),p;case 7:return a.prev=7,r.updateLoading=!1,a.finish(7);case 8:case"end":return a.stop()}},a,null,[[2,6,7,8]])}))()},handleSelectionChange:function(e){this.selectedTableData=e},changePrice:function(e,t){var r=this;return(0,i.A)(o().mark(function a(){var i,n,l,u,d,p;return o().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if("ARCHIVED"!=e.state){a.next=1;break}return r.$message.error(r.$t("归档状态不能修改预算")),"function"==typeof t&&t(!1),a.abrupt("return");case 1:if(i=r.getUpdateApiMethod[r.getMoudleType]){a.next=2;break}return r.$message.error(r.$t("操作失败")),"function"==typeof t&&t(!1),a.abrupt("return");case 2:return!(n="function"==typeof t)&&r.$refs.spList&&r.$refs.spList.loading&&(r.$refs.spList.loading.tableLoading=!0),(l={profile_id:e.profile_id,sponsored_type:"sp",api_method:i.updateApiMethod,api_version:"v3",params:(0,s.A)({},i.updateName,[(0,s.A)((0,s.A)((0,s.A)({},i.valueName,e[i.valueKey]),i.paramsBudgetValue,(0,s.A)({budgetType:"DAILY"},i.paramsBudgetValue,e[i.budgetKey])),i.paramsBidValue,e[i.bidKey])])}).params[i.updateName].forEach(function(e){"400"==r.activeName?delete e[i.paramsBidValue]:delete e[i.paramsBudgetValue]}),u=!1,a.prev=3,a.next=4,(0,c.amzHandle)(l);case 4:if(200==(d=a.sent).code){a.next=5;break}return a.abrupt("return",r.$message.error(d.msg));case 5:if(!d.reasons||!d.reasons.length){a.next=6;break}return r.$message.error(d.reasons.join("\n")),a.abrupt("return");case 6:if(u=!0,r.$message.success(r.$t("操作成功")),!n){a.next=9;break}return a.next=7,r.getSpListRef();case 7:return p=a.sent,a.next=8,(0,S.PG)({list:p,row:e,mode:"sp",tabKey:r.getMoudleType||r.activeName});case 8:a.next=10;break;case 9:return a.next=10,r.fetchTableData();case 10:a.next=12;break;case 11:a.prev=11,a.catch(3),r.$message.error(r.$t("操作失败"));case 12:return a.prev=12,!n&&r.$refs.spList&&r.$refs.spList.loading&&(r.$refs.spList.loading.tableLoading=!1),"function"==typeof t&&t(u),a.finish(12);case 13:case"end":return a.stop()}},a,null,[[3,11,12,13]])}))()},fetchTableData:function(){var e=this;return(0,i.A)(o().mark(function t(){var r;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,e.getSpListRef();case 1:(r=t.sent)&&r.fetchTableData?r.fetchTableData():r&&r.doSearch&&r.doSearch("current");case 2:case"end":return t.stop()}},t)}))()}}},R=C,M=(0,y.A)(R,a,[],!1,null,"99ca6446",null).exports}}]);
2//# sourceMappingURL=chunk-7210.2a7b2a45.js.map?site=amazon

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.