|
@@ -1,899 +1,3 @@
|
|
|
-<template>
|
|
|
- <div>
|
|
|
- <el-card>
|
|
|
- <div style="padding-left: 5px">
|
|
|
- <!-- 广告活动 -->
|
|
|
- <el-form
|
|
|
- :label-position="labelPosition"
|
|
|
- ref="campaignFormRef"
|
|
|
- :model="campaignRuleForm"
|
|
|
- :rules="campaignRules"
|
|
|
- label-width="120px"
|
|
|
- class="demo-ruleForm"
|
|
|
- :size="formSize"
|
|
|
- status-icon>
|
|
|
- <el-card shadow="never" body-style="padding-bottom: 0 !important;" v-loading="campaignLoading">
|
|
|
- <div style="font-size: 24px; font-weight: bold">广告活动</div>
|
|
|
- <hr />
|
|
|
- <br />
|
|
|
- <el-form-item label="广告活动名称" prop="name" style="width: 350px">
|
|
|
- <el-input v-model="campaignRuleForm.name" placeholder="请输入广告活动名称" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="广告组合" prop="adMix">
|
|
|
- <el-select v-model="campaignRuleForm.adMix" clearable placeholder="请选择">
|
|
|
- <el-option v-for="item in adMixOptions" :key="item.portfolioId" :label="item.name" :value="item.portfolioId" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="startDate" label="开始日期" style="width: 350px">
|
|
|
- <el-date-picker
|
|
|
- v-model="campaignRuleForm.startDate"
|
|
|
- type="date"
|
|
|
- format="YYYY-MM-DD"
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
- label="开始日期"
|
|
|
- placeholder="开始日期"
|
|
|
- style="width: 100%" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="date2" label="结束日期" style="width: 350px">
|
|
|
- <el-date-picker
|
|
|
- v-model="campaignRuleForm.date2"
|
|
|
- type="date"
|
|
|
- format="YYYY-MM-DD"
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
- label="结束日期"
|
|
|
- placeholder="结束日期"
|
|
|
- style="width: 100%" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="budget" label="每日预算" style="width: 300px">
|
|
|
- <el-input
|
|
|
- v-model="campaignRuleForm.budget"
|
|
|
- maxlength="7"
|
|
|
- oninput="value=value.indexOf('.') > -1?value.slice(0, value.indexOf('.') + 3):value">
|
|
|
- <template #prepend>$</template>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="投放类型" prop="type" class="column-item">
|
|
|
- <el-radio-group v-model="campaignRuleForm.type" @click="changeType">
|
|
|
- <div>
|
|
|
- <el-radio label="AUTO">自动</el-radio>
|
|
|
- <div class="radio-description">定向与您推广商品相似的关键词和商品</div>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <el-radio label="MANUAL">手动</el-radio>
|
|
|
- <div class="radio-description">选择关键词或商品以定向购物者搜索并设置自定义出价</div>
|
|
|
- </div>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="竞价策略" prop="bidStrategy" class="column-item column-margin-bottom">
|
|
|
- <el-radio-group v-model="campaignRuleForm.bidStrategy">
|
|
|
- <div>
|
|
|
- <el-radio label="LEGACY_FOR_SALES" border>
|
|
|
- 动态竞价-仅降低
|
|
|
- <div class="radio-description-2">当您的广告不太可能带来销售时,我们将实时降低您的竞价</div>
|
|
|
- </el-radio>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <el-radio label="AUTO_FOR_SALES" border>
|
|
|
- 动态竞价-提高和降低
|
|
|
- <div class="radio-description-2">
|
|
|
- 当您的广告很有可能带来销售时,我们将实时提高您的竞价(最高可达 100%),并在您的广告不太可能带来销售时降低您的竞价
|
|
|
- </div>
|
|
|
- </el-radio>
|
|
|
- </div>
|
|
|
- <el-radio label="MANUAL" border>
|
|
|
- 固定竞价
|
|
|
- <div class="radio-description-2">我们将使用您的确切竞价和您设置的任何手动调整,而不会根据售出可能性对您的竞价进行更改</div>
|
|
|
- </el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="按展示位置调整出价" prop="placeBid">
|
|
|
- <p style="color: #8e9196">除了出价策略外,您还可以将出价提高多达900%</p>
|
|
|
- <div class="gap-items">
|
|
|
- <div class="gap-item">搜索结果顶部(首页)</div>
|
|
|
- <el-input v-model="campaignRuleForm.placeBid" class="gap-item">
|
|
|
- <template #append>%</template>
|
|
|
- </el-input>
|
|
|
- </div>
|
|
|
- <div class="gap-items">
|
|
|
- <div class="gap-item">商品首页</div>
|
|
|
- <el-input v-model="campaignRuleForm.firstPage" class="gap-item">
|
|
|
- <template #append>%</template>
|
|
|
- </el-input>
|
|
|
- </div>
|
|
|
- <div class="gap-items" style="margin-bottom: 0">
|
|
|
- <div class="gap-item">搜索结果的其余位置</div>
|
|
|
- <el-input v-model="campaignRuleForm.other" class="gap-item">
|
|
|
- <template #append>%</template>
|
|
|
- </el-input>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item style="margin-left: 48%">
|
|
|
- <el-button type="primary" plain @click="submitCampaignForm(campaignFormRef)">保存</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-card>
|
|
|
- <br />
|
|
|
- <!-- 广告组 -->
|
|
|
- <el-card shadow="never" body-style="padding-bottom: 0 !important;" v-loading="adGroupLoading">
|
|
|
- <div style="font-size: 20px; font-weight: bold">广告组</div>
|
|
|
- <hr />
|
|
|
- <br />
|
|
|
- <el-form ref="adGroupRuleFormRef" :model="adGroupRuleForm" :rules="adGroupRules">
|
|
|
- <el-form-item required label="广告组名称" prop="adGroupName" style="width: 350px; margin-top: 20px">
|
|
|
- <el-input v-model="adGroupRuleForm.adGroupName" placeholder="请输入广告组名称" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item required label="默认竞价" prop="defaultBidInp">
|
|
|
- <el-input v-model="adGroupRuleForm.defaultBidInp" minlength="3" maxlength="4" style="width: 200px">
|
|
|
- <template #prepend>$</template>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item style="margin-left: 48%">
|
|
|
- <el-button type="primary" plain @click="submitGroupsForm(adGroupRuleFormRef)" :disabled="adGroupSave">保存</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </el-card>
|
|
|
- <!-- 商品表格 -->
|
|
|
- <div style="margin-top: 20px; font-size: 24px; font-weight: bold">商品</div>
|
|
|
- <hr />
|
|
|
- <br />
|
|
|
- <el-form-item prop="commodity" style="width: 100%" v-loading="commodityLoading">
|
|
|
- <div style="width: 100%; height: 620px; display: flex; border: 1px solid #e5e7ec; border-radius: 6px">
|
|
|
- <div style="width: 50%; border-right: 1px solid #e5e7ec">
|
|
|
- <el-tabs v-model="activeName" class="demo-tabs">
|
|
|
- <el-tab-pane label="搜索" name="first">
|
|
|
- <div style="margin-bottom: 10px">
|
|
|
- <el-input v-model="searchInp" placeholder="Please input" class="input-with-select" @change="inpChange" clearable>
|
|
|
- <template #prepend>
|
|
|
- <el-select v-model="select" style="width: 100px" @change="selChange">
|
|
|
- <el-option label="名称" value="name" />
|
|
|
- <el-option label="ASIN" value="asin" />
|
|
|
- <el-option label="SKU" value="sku" />
|
|
|
- </el-select>
|
|
|
- </template>
|
|
|
- <template #append>
|
|
|
- <el-select v-model="select2" style="width: 100px">
|
|
|
- <el-option label="最新优先" value="latest" />
|
|
|
- <el-option label="最早优先" value="earliest" />
|
|
|
- <el-option label="优选广告" value="optimal" />
|
|
|
- </el-select>
|
|
|
- </template>
|
|
|
- </el-input>
|
|
|
- </div>
|
|
|
- <el-table
|
|
|
- height="490"
|
|
|
- style="width: 100%"
|
|
|
- v-loading="loading"
|
|
|
- :data="fullTableData"
|
|
|
- :header-cell-style="headerCellStyle"
|
|
|
- @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="selection" width="50" />
|
|
|
- <el-table-column prop="asin" label="商品">
|
|
|
- <template #default="scope">
|
|
|
- <div style="display: flex; align-items: center">
|
|
|
- <div style="margin-right: 8px; line-height: normal">
|
|
|
- <el-image class="img-box" :src="scope.row.image_link" />
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <el-tooltip class="box-item" effect="dark" :content="scope.row.title" placement="top">
|
|
|
- <div class="single-line">{{ scope.row.title ? scope.row.title : '--' }}</div>
|
|
|
- </el-tooltip>
|
|
|
- <div class="data-color">
|
|
|
- <span style="font-weight: 500; color: rgb(30, 33, 41)">${{ scope.row.price ? scope.row.price : '--' }}</span>
|
|
|
- <span style="margin: 0 5px; color: #cacdd4">|</span>
|
|
|
- <span style="color: #6d7784">{{ scope.row.quantity }}</span>
|
|
|
- </div>
|
|
|
- <span>
|
|
|
- ASIN: <span class="data-color" style="margin-right: 8px">{{ scope.row.asin ? scope.row.asin : '--' }}</span>
|
|
|
- </span>
|
|
|
- <span>
|
|
|
- SKU: <span class="data-color">{{ scope.row.sku ? scope.row.sku : '--' }}</span>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="name" label="Name" width="120" align="right">
|
|
|
- <template #header>
|
|
|
- <el-button type="primary" size="normal" link @click="handleGoodsAdd">添加已选中</el-button>
|
|
|
- </template>
|
|
|
- <template #default="scope">
|
|
|
- <el-button type="primary" size="small" @click="addSingleGoods(scope)" text>添加</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <el-pagination
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- @size-change="handleSizeChange"
|
|
|
- :current-page="currentPage"
|
|
|
- :page-size="pageSize"
|
|
|
- :total="totalItems"
|
|
|
- layout="prev, pager, next" />
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="输入" name="second">
|
|
|
- <el-input
|
|
|
- style="padding: 10px"
|
|
|
- v-model="goodsTextarea"
|
|
|
- :rows="20"
|
|
|
- type="textarea"
|
|
|
- placeholder="请输入ASIN,多个ASIN使用逗号、空格或换行符分隔。(未完成)"
|
|
|
- maxlength="11000" />
|
|
|
- <div style="display: flex; flex-direction: row-reverse; margin-top: 10px">
|
|
|
- <el-button v-for="button in buttons" :key="button.text" :type="button.type" link @click="addGods">{{ button.text }}</el-button>
|
|
|
- </div>
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
- </div>
|
|
|
- <div style="width: 50%">
|
|
|
- <el-card class="box-card" shadow="never" style="border: 0">
|
|
|
- <template #header>
|
|
|
- <div class="card-header">
|
|
|
- <span style="font-weight: 550; font-size: 15px; color: #1f2128">已添加: {{ adsTableData.length }}</span>
|
|
|
- <el-button class="button" type="danger" text bg @click="delAllGoods">全部删除</el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <div class="card-body"></div>
|
|
|
- </el-card>
|
|
|
- <div style="padding: 0 10px 0 10px; margin-top: -12px">
|
|
|
- <el-table
|
|
|
- :data="adsTableData"
|
|
|
- height="475"
|
|
|
- style="width: 100%"
|
|
|
- :header-cell-style="headerCellStyle"
|
|
|
- @selection-change="handleAddedGoodsChange">
|
|
|
- <el-table-column type="selection" width="50" />
|
|
|
- <el-table-column prop="asin" label="ASIN">
|
|
|
- <template #default="scope">
|
|
|
- <div style="display: flex; align-items: center">
|
|
|
- <div style="margin-right: 8px; line-height: normal">
|
|
|
- <el-image class="img-box" :src="scope.row.image_link" />
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <el-tooltip class="box-item" effect="dark" :content="scope.row.title" placement="top">
|
|
|
- <div class="single-line">{{ scope.row.title ? scope.row.title : '--' }}</div>
|
|
|
- </el-tooltip>
|
|
|
- <div class="data-color">
|
|
|
- <span style="font-weight: 500; color: rgb(30, 33, 41)">${{ scope.row.price ? scope.row.price : '--' }}</span>
|
|
|
- <span style="margin: 0 5px; color: #cacdd4">|</span>
|
|
|
- <span style="color: #6d7784">{{ scope.row.quantity }}</span>
|
|
|
- </div>
|
|
|
- <span
|
|
|
- >ASIN:
|
|
|
- <span class="data-color" style="margin-right: 8px">{{ scope.row.asin ? scope.row.asin : '--' }}</span>
|
|
|
- </span>
|
|
|
- <span
|
|
|
- >SKU:
|
|
|
- <span class="data-color">{{ scope.row.sku ? scope.row.sku : '--' }}</span>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="name" label="Name" width="120" align="right">
|
|
|
- <template #header>
|
|
|
- <el-button type="danger" size="normal" link @click="delSelectedGoods">删除已选中</el-button>
|
|
|
- </template>
|
|
|
- <template #default="scope">
|
|
|
- <el-button type="danger" size="small" @click="delSingleGoods(scope)" text>删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- <div style="display: flex; justify-content: space-around; padding-top: 10px">
|
|
|
- <el-button type="primary" plain :disabled="adsSave" @click="submitAdsForm">保存</el-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
- <!-- 按目标组设置出价 -->
|
|
|
- <el-form
|
|
|
- :label-position="labelPosition"
|
|
|
- ref="targetGroupFormRef"
|
|
|
- :model="targetGroupRuleForm"
|
|
|
- :rules="targetGroupRules"
|
|
|
- label-width="120px"
|
|
|
- class="demo-ruleForm"
|
|
|
- :size="formSize"
|
|
|
- status-icon>
|
|
|
- <div class="column-item" v-if="campaignRuleForm.type == 'AUTO'">
|
|
|
- <div style="margin-top: 20px; font-size: 24px; font-weight: bold">按目标组设置出价</div>
|
|
|
- <hr />
|
|
|
- <br />
|
|
|
- <el-card shadow="never" v-if="campaignRuleForm.type == 'AUTO'" class="box-card" v-loading="targetGroupLoading">
|
|
|
- <div>
|
|
|
- <div style="color: #8e9095">
|
|
|
- <span>目标群体</span>
|
|
|
- <span class="suggested-bid-item">建议竞价</span>
|
|
|
- <span>竞价</span>
|
|
|
- </div>
|
|
|
- <div style="display: flex">
|
|
|
- <el-switch v-model="targetGroupRuleForm.closeMatch" size="small" active-text="紧密匹配" @change="closeMatchChange" />
|
|
|
- <span class="suggested-bid-item">--</span>
|
|
|
- <el-form-item prop="closeMatchInp">
|
|
|
- <el-input
|
|
|
- :disabled="!targetGroupRuleForm.closeMatch"
|
|
|
- v-model="targetGroupRuleForm.closeMatchInp"
|
|
|
- minlength="3"
|
|
|
- maxlength="4"
|
|
|
- class="bid-input">
|
|
|
- <template #prepend>$</template>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <div style="display: flex">
|
|
|
- <el-switch v-model="targetGroupRuleForm.broadMatch" size="small" active-text="广泛匹配" @change="broadMatchChange" />
|
|
|
- <span class="suggested-bid-item">--</span>
|
|
|
- <el-form-item prop="broadMatchInp">
|
|
|
- <el-input
|
|
|
- :disabled="!targetGroupRuleForm.broadMatch"
|
|
|
- v-model="targetGroupRuleForm.broadMatchInp"
|
|
|
- minlength="3"
|
|
|
- maxlength="4"
|
|
|
- class="bid-input">
|
|
|
- <template #prepend>$</template>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <div style="display: flex">
|
|
|
- <el-switch v-model="targetGroupRuleForm.similarProducts" size="small" active-text="同类商品" @change="similarProductsChange" />
|
|
|
- <span class="suggested-bid-item">--</span>
|
|
|
- <el-form-item prop="similarProductsInp">
|
|
|
- <el-input
|
|
|
- :disabled="!targetGroupRuleForm.similarProducts"
|
|
|
- v-model="targetGroupRuleForm.similarProductsInp"
|
|
|
- minlength="3"
|
|
|
- maxlength="4"
|
|
|
- class="bid-input">
|
|
|
- <template #prepend>$</template>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <div style="display: flex">
|
|
|
- <el-switch v-model="targetGroupRuleForm.relatedProducts" size="small" active-text="关联商品" @change="relatedProductsChange" />
|
|
|
- <span class="suggested-bid-item">--</span>
|
|
|
- <el-form-item prop="relatedProductsInp">
|
|
|
- <el-input
|
|
|
- :disabled="!targetGroupRuleForm.relatedProducts"
|
|
|
- v-model="targetGroupRuleForm.relatedProductsInp"
|
|
|
- minlength="3"
|
|
|
- maxlength="4"
|
|
|
- class="bid-input">
|
|
|
- <template #prepend>$</template>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div style="display: flex; justify-content: space-around">
|
|
|
- <el-button type="primary" plain :disabled="targetGroupBidSave" @click="submitTargetGroupForm">保存</el-button>
|
|
|
- </div>
|
|
|
- </el-card>
|
|
|
- </div>
|
|
|
- </el-form>
|
|
|
-
|
|
|
- <!-- 投放类型 -->
|
|
|
- <div class="column-item" v-if="campaignRuleForm.type == 'MANUAL'">
|
|
|
- <p style="color: #606266; font-weight: 450"><span style="color: #e47470">*</span> 投放类型</p>
|
|
|
- <el-radio-group v-model="ruleForm.targetType" @change="changeTargetType">
|
|
|
- <div style="display: flex">
|
|
|
- <el-radio label="keyWords" style="align-items: flex-start; margin-top: 5px">
|
|
|
- <div style="margin-top: -4px">关键词投放</div>
|
|
|
- <div>选择关键词以帮助您的商品出现在购物者搜索中</div>
|
|
|
- </el-radio>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <el-radio label="Goods" style="align-items: flex-start; margin-top: 20px">
|
|
|
- <div style="margin-top: -4px">商品投放</div>
|
|
|
- <div>选择特定的商品, 分类, 品牌或者其他商品功能来定向您的广告</div>
|
|
|
- </el-radio>
|
|
|
- </div>
|
|
|
- </el-radio-group>
|
|
|
- </div>
|
|
|
- <!-- 关键词定向 -->
|
|
|
- <div
|
|
|
- style="font-size: 20px; font-weight: bold; margin-top: 30px"
|
|
|
- v-if="ruleForm.targetType == 'keyWords' && campaignRuleForm.type == 'MANUAL'">
|
|
|
- 关键词定向
|
|
|
- </div>
|
|
|
- <hr v-if="ruleForm.targetType == 'keyWords' && campaignRuleForm.type == 'MANUAL'" />
|
|
|
- <el-form-item style="width: 100%; margin-top: 20px" v-if="ruleForm.targetType == 'keyWords' && campaignRuleForm.type == 'MANUAL'">
|
|
|
- <div style="width: 100%; height: 600px; display: flex; border: 1px solid #e5e7eb; border-radius: 6px" v-loading="keywordsLoading">
|
|
|
- <div style="width: 50%; border-right: 1px solid #e5e7eb">
|
|
|
- <el-tabs v-model="keyWordsTabs" class="demo-tabs" @tab-click="handleGoodsTabs">
|
|
|
- <div style="margin: 8px">
|
|
|
- <p style="margin-left: 8px; margin-bottom: -8px; font-weight: 500; color: #616266">竞价:</p>
|
|
|
- <div style="display: flex; align-items: center">
|
|
|
- <el-select v-model="bidType" class="m-2" placeholder="Select" style="width: 450px">
|
|
|
- <el-option v-for="item in bidTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
- </el-select>
|
|
|
- <el-input v-model="bidInput" :disabled="!(bidType == 'customBid')" placeholder="Please input">
|
|
|
- <template #prepend>$</template>
|
|
|
- </el-input>
|
|
|
- </div>
|
|
|
- <div style="display: flex">
|
|
|
- <span style="margin: 0 10px 0 8px; font-weight: 500; color: #616266">匹配类型: </span>
|
|
|
- <el-checkbox v-model="broadType" label="广泛" />
|
|
|
- <el-checkbox v-model="phraseType" label="词组" />
|
|
|
- <el-checkbox v-model="exactType" label="精确" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <el-tab-pane label="建议" name="first">
|
|
|
- <el-table
|
|
|
- height="425"
|
|
|
- style="width: 100%; padding-left: 5px"
|
|
|
- v-loading="loading"
|
|
|
- :data="keyWordsTableData"
|
|
|
- :header-cell-style="headerCellStyle"
|
|
|
- :header-row-style="changeKeyWordsTableHeader">
|
|
|
- <el-table-column prop="asin" label="关键词"> </el-table-column>
|
|
|
- <el-table-column prop="name" label="匹配类型"> </el-table-column>
|
|
|
- <el-table-column prop="name" label="建议出价" width="120"> </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="输入" name="second">
|
|
|
- <el-input v-model="keyWordsTextarea" :rows="10" type="textarea" style="padding-left: 5px" />
|
|
|
- <div style="display: flex; flex-direction: row-reverse; margin-top: 10px">
|
|
|
- <el-button type="primary" text bg @click="addKeyWords">添加</el-button>
|
|
|
- </div>
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
- </div>
|
|
|
- <div style="width: 50%">
|
|
|
- <el-card class="box-card" shadow="never" style="border: none">
|
|
|
- <template #header>
|
|
|
- <div class="card-header">
|
|
|
- <span style="font-weight: 550; font-size: 15px; color: #1f2128">已添加: {{ addedKeyWordsTableData.length }}</span>
|
|
|
- <span style="color: #529b2e">成功: {{ successCount }}</span>
|
|
|
- <span style="color: #c45656">失败: {{ errorCount }}</span>
|
|
|
- <el-button class="button" type="danger" text bg @click="delAllKeyWords">全部删除</el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <div class="card-body" body-style="padding-bottom: -20px;">
|
|
|
- <el-table
|
|
|
- :data="addedKeyWordsTableData"
|
|
|
- style="width: 100%; height: 450px"
|
|
|
- :header-row-style="changeKeyWordsTableHeader"
|
|
|
- :header-cell-style="headerCellStyle">
|
|
|
- <el-table-column prop="keyword" label="关键词" width="auto" />
|
|
|
- <el-table-column prop="matchType" label="匹配类型" />
|
|
|
- <el-table-column prop="bid" label="出价">
|
|
|
- <template #default="scope">
|
|
|
- <el-input v-model="scope.row.bid" placeholder="Please input bid" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="suggestBid" label="建议出价" />
|
|
|
- <el-table-column prop="operate" label="操作" width="60" align="right">
|
|
|
- <template #default="scope">
|
|
|
- <el-button type="danger" size="small" link @click="delSingleKeyWord(scope)">删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- </el-card>
|
|
|
- <div style="display: flex; justify-content: space-around; padding-top: 0px">
|
|
|
- <el-button type="primary" plain @click="keyWordsSave" :disabled="!addedKeyWordsTableData.length">保存</el-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <div
|
|
|
- style="font-size: 20px; font-weight: bold; margin-top: 30px"
|
|
|
- v-if="campaignRuleForm.type === 'AUTO' || (ruleForm.targetType === 'keyWords' && campaignRuleForm.type === 'MANUAL')">
|
|
|
- 否定词
|
|
|
- </div>
|
|
|
- <hr v-if="campaignRuleForm.type === 'AUTO' || (ruleForm.targetType === 'keyWords' && campaignRuleForm.type === 'MANUAL')" />
|
|
|
- <!-- 否定词表格 -->
|
|
|
- <el-form-item
|
|
|
- style="width: 100%; margin-top: 20px"
|
|
|
- v-if="campaignRuleForm.type === 'AUTO' || (ruleForm.targetType === 'keyWords' && campaignRuleForm.type === 'MANUAL')">
|
|
|
- <div style="width: 100%; height: 520px; display: flex; border: 1px solid #e5e7ec; border-radius: 6px" v-loading="negativeWordsLoading">
|
|
|
- <div style="width: 50%; border-right: 1px solid #e5e7ec">
|
|
|
- <div style="margin: 10px 0">
|
|
|
- <span style="margin-left: 25px; color: #e47470">*</span>
|
|
|
- <span style="color: #666666; margin-right: 10px">匹配类型: </span>
|
|
|
- <el-checkbox v-model="NEGATIVE_PHRASE" label="词组否定" />
|
|
|
- <el-checkbox v-model="NEGATIVE_EXACT" label="精确否定" />
|
|
|
- </div>
|
|
|
- <el-input
|
|
|
- v-model="negativeWordsTextarea"
|
|
|
- :rows="17"
|
|
|
- type="textarea"
|
|
|
- placeholder="请输入关键词,多个关键词使用逗号或者换行符分隔。(最多添加1000个关键词)"
|
|
|
- maxlength="11000"
|
|
|
- style="padding: 0 20px" />
|
|
|
- <div style="display: flex; flex-direction: row-reverse; margin-top: 10px">
|
|
|
- <el-button style="margin-right: 18px" type="primary" text bg @click="addNegative">添加</el-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div style="width: 50%">
|
|
|
- <el-card class="box-card" shadow="never" style="border: none">
|
|
|
- <template #header>
|
|
|
- <div class="card-header">
|
|
|
- <span style="font-weight: 550; font-size: 15px; color: #1f2128">已添加: {{ addedData.length }}</span>
|
|
|
- <el-button class="button" text bg :disabled="!tableData.length" @click="delAllNegative">全部删除</el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <div class="card-body">
|
|
|
- <el-table :data="tableData" style="width: 100%; height: 370px; padding-bottom: 0" :header-row-style="changeNegTableHeader">
|
|
|
- <el-table-column prop="negativeWords" label="否定词" width="auto" />
|
|
|
- <el-table-column prop="operate" label="操作" width="60" align="right">
|
|
|
- <template #default="scope">
|
|
|
- <el-button type="primary" size="small" @click="delSingleNegative(scope)" text>删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- </el-card>
|
|
|
- <div style="display: flex; justify-content: space-around">
|
|
|
- <el-button type="primary" plain @click="negativeWordsSave" :disabled="!negativeList.length">保存</el-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <!-- 商品定向 -->
|
|
|
- <div style="font-size: 20px; font-weight: bold; margin-top: 30px" v-if="ruleForm.targetType == 'Goods'">商品定向</div>
|
|
|
- <hr v-if="ruleForm.targetType == 'Goods'" />
|
|
|
- <el-form-item style="width: 100%; margin-top: 20px" v-if="ruleForm.targetType == 'Goods'">
|
|
|
- <div
|
|
|
- style="width: 100%; height: 600px; display: flex; border: 1px solid #e5e7eb; border-radius: 6px"
|
|
|
- v-loading="productOrientationLoading">
|
|
|
- <div style="width: 50%; border-right: 1px solid #e5e7eb">
|
|
|
- <el-tabs
|
|
|
- type="border-card"
|
|
|
- stretch
|
|
|
- class="goods-orientation-tabs"
|
|
|
- style="border: 0; border-right: 0; border-bottom-left-radius: 6px; border-top-left-radius: 5px; overflow: hidden">
|
|
|
- <el-tab-pane label="品类" style="border-top-left-radius: 6px">
|
|
|
- <div style="display: flex; align-items: center">
|
|
|
- <span style="width: 40px">竞价:</span>
|
|
|
- <el-select v-model="categoryBiddingType" @change="singleGoodsBidSelectChanged" class="m-2" placeholder="Select">
|
|
|
- <el-option v-for="item in categoryBiddingTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
- </el-select>
|
|
|
- <el-input v-model="singleGoodsBidInput" :disabled="categoryBiddingType === 'defaultBid'" style="width: 200px">
|
|
|
- <template #prepend>$</template>
|
|
|
- </el-input>
|
|
|
- </div>
|
|
|
-
|
|
|
- <el-tabs v-model="categoryTabs" class="category-tabs">
|
|
|
- <el-tab-pane label="建议" name="first">
|
|
|
- <el-table :data="proposalTableData" style="width: 100%" height="422">
|
|
|
- <el-table-column prop="proposal" label="建议" width="520">
|
|
|
- <template #header> 0建议 </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="address" label="Address">
|
|
|
- <template #header>
|
|
|
- <el-button type="primary" size="normal" link @click="handleGoodsAdd">全部添加</el-button>
|
|
|
- </template>
|
|
|
- <template #default="scope">
|
|
|
- <el-button type="primary" size="small" @click="addSingleGoods(scope)" text>添加</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="搜索" name="second">
|
|
|
- <el-input placeholder="请输入关键词过滤" />
|
|
|
- <el-scrollbar height="390px">
|
|
|
- <el-tree :data="searchClassifyTableData" :props="defaultProps" :expand-on-click-node="false">
|
|
|
- <template #default="{ node, data }">
|
|
|
- <span class="custom-tree-node">
|
|
|
- <span style="width: 75%">{{ node.label }}</span>
|
|
|
- <span style="color: rgb(50, 108, 216)" v-if="data.ta == true">
|
|
|
- <a @click="refine(data)"> 细化 </a>
|
|
|
- <a style="margin-left: 8px" @click="orientate(node, data)"> 定向 </a>
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- </el-tree>
|
|
|
- </el-scrollbar>
|
|
|
- <el-dialog v-model="visible" :title="`细化分类: ${dialogTitle}`" @close="dialogClose" destroy-on-close>
|
|
|
- <div style="display: flex; justify-content: space-between">
|
|
|
- <span>根据特定品牌、价格范围、星级和Prime配送资格,细化分类</span>
|
|
|
- <span>
|
|
|
- <el-checkbox v-model="dialogForm.isCount" label="显示商品数量" @change="isCountChanged" />
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <el-form :model="dialogForm" :rules="dialogRules" ref="dialogFormRef" style="margin-top: 20px">
|
|
|
- <el-form-item style="padding-left: 140px">
|
|
|
- <span style="margin-right: 10px; color: #616266; font-weight: 500">品牌</span>
|
|
|
- <el-select
|
|
|
- v-model="dialogForm.dialogselectValue"
|
|
|
- @change="dialogSelectChange"
|
|
|
- multiple
|
|
|
- placeholder="请选择"
|
|
|
- :loading="dialogSelectLoading">
|
|
|
- <el-option v-for="item in dialogForm.dialogOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="prices" style="padding-left: 112px; margin-top: 10px">
|
|
|
- <span style="margin-right: 10px; color: #616266; font-weight: 500">价格范围</span>
|
|
|
- <el-input-number v-model="dialogForm.prices.lowest" :min="1" :controls="false" placeholder="无最低商品价格" />
|
|
|
- --
|
|
|
- <el-input-number v-model="dialogForm.prices.highest" :min="1" :controls="false" placeholder="无最高商品价格" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="starRating" style="padding-left: 85px; margin-top: 10px">
|
|
|
- <span style="margin-right: 15px; color: #616266; font-weight: 500">查看星级评定</span>
|
|
|
- <el-slider v-model="dialogForm.starRating" range show-stops :max="5" :marks="marks" style="width: 70%" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="delivery" style="padding-left: 140px; margin-top: 30px">
|
|
|
- <span style="margin-right: 10px; color: #616266; font-weight: 500">配送</span>
|
|
|
- <el-radio-group v-model="dialogForm.delivery">
|
|
|
- <el-radio label="all" style="font-weight: 400">所有</el-radio>
|
|
|
- <el-radio label="eligible" style="font-weight: 400">具备Prime资格</el-radio>
|
|
|
- <el-radio label="diseligible" style="font-weight: 400">不具备Prime资格</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <template #footer>
|
|
|
- <div style="display: flex; justify-content: space-between">
|
|
|
- <span v-loading="countLoadig"
|
|
|
- >定位到的商品数量:
|
|
|
- <span v-if="dialogForm.isCount == true">{{ commodityCount[0]?.min }} - {{ commodityCount[0]?.max }}</span></span
|
|
|
- >
|
|
|
- <span class="dialog-footer">
|
|
|
- <el-button @click="visible = false">取消</el-button>
|
|
|
- <el-button type="primary" @click="dialogFormSubmit">确定</el-button>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-dialog>
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="单个商品">
|
|
|
- <div style="display: flex; align-items: center">
|
|
|
- <span style="width: 40px">竞价:</span>
|
|
|
- <el-select class="m-2" v-model="singleGoodsBidSelect" @change="singleGoodsBidSelectChanged">
|
|
|
- <el-option v-for="item in singleGoodsBidTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
- </el-select>
|
|
|
- <el-input v-model="singleGoodsBidInput" :disabled="singleGoodsBidSelect == 'defaultBid'" style="width: 200px">
|
|
|
- <template #prepend>$</template>
|
|
|
- </el-input>
|
|
|
- <div style="margin-left: 20px">
|
|
|
- <span style="margin-right: 10px">类型:</span>
|
|
|
- <el-checkbox v-model="expand" label="扩展" />
|
|
|
- <el-checkbox v-model="accurate" label="精准" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <el-tabs v-model="singleGoodsTabs" class="category-tabs">
|
|
|
- <el-tab-pane label="建议" name="first">
|
|
|
- <el-table :data="proposalTableData" style="width: 100%" height="342">
|
|
|
- <el-table-column prop="proposal" label="商品" width="520" />
|
|
|
- <el-table-column prop="address" label="类型" />
|
|
|
- <el-table-column prop="operational" label="操作" />
|
|
|
- </el-table>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="搜索" name="second">
|
|
|
- <el-input v-model="singleGoodsSearchInp" @change="singleGoodsSearchChaneged" placeholder="按ASIN搜索"></el-input>
|
|
|
- <el-table :data="searchTableData" style="width: 100%" height="309">
|
|
|
- <el-table-column prop="asin" label="商品" width="520">
|
|
|
- <template #default="{ row }">
|
|
|
- <div style="display: flex; align-items: center">
|
|
|
- <img :src="row.image_link" style="width: 40px; height: 40px; margin-right: 10px" />
|
|
|
- <span>{{ row.title }}</span>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="productTypes" label="类型">
|
|
|
- <template #default="scope">
|
|
|
- <div v-if="expand">扩展</div>
|
|
|
- <div v-if="accurate">精准</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="operational" label="操作">
|
|
|
- <template #default="scope">
|
|
|
- <el-button class="button" type="primary" text @click="addSingleSearch(scope)">添加</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-tab-pane>
|
|
|
- <!-- TODO: 商品定向TextArea -->
|
|
|
- <!-- <el-tab-pane label="输入" name="third">暂无此功能</el-tab-pane> -->
|
|
|
- </el-tabs>
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
- </div>
|
|
|
- <div style="width: 50%">
|
|
|
- <el-card class="box-card" shadow="never" style="border: none">
|
|
|
- <template #header>
|
|
|
- <div class="card-header">
|
|
|
- <span style="font-weight: 550; font-size: 15px; color: #1f2128">已添加: {{ productOrientationTableData.length }}</span>
|
|
|
- <el-button class="button" type="danger" text bg @click="delAllCna">全部删除</el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <div class="card-body">
|
|
|
- <el-table
|
|
|
- height="460"
|
|
|
- :data="productOrientationTableData"
|
|
|
- style="width: 100%"
|
|
|
- :header-row-style="changeKeyWordsTableHeader"
|
|
|
- :header-cell-style="headerCellStyle">
|
|
|
- <el-table-column prop="cna" label="分类 & 商品" width="300">
|
|
|
- <template #default="scope">
|
|
|
- <div v-if="scope.row.cna || scope.row.classification">
|
|
|
- 分类: <span style="color: #000000">{{ scope.row.cna ? scope.row.cna : scope.row.classification }}</span>
|
|
|
- </div>
|
|
|
- <div v-if="scope.row.asin">
|
|
|
- {{ scope.row.asin ? scope.row.asin : '--' }}
|
|
|
- </div>
|
|
|
- <div v-if="scope.row.brand">
|
|
|
- 品牌: <span style="color: #000000">{{ scope.row.brand }}</span>
|
|
|
- </div>
|
|
|
- <div v-if="scope.row.low_price || scope.row.high_price">
|
|
|
- 品牌价格:
|
|
|
- <span style="color: #000000">
|
|
|
- {{ scope.row.low_price ? '$' + scope.row.low_price : '--' }} -
|
|
|
- {{ scope.row.high_price ? '$' + scope.row.high_price : '--' }}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <div v-if="scope.row.low_rating || scope.row.high_rating">
|
|
|
- 评分: <span style="color: #000000">{{ scope.row.low_rating }} - {{ scope.row.high_rating }}</span>
|
|
|
- </div>
|
|
|
- <div v-if="scope.row.deliveryText">
|
|
|
- 配送: <span style="color: #000000">{{ scope.row.deliveryText }}</span>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="type" label="类型">
|
|
|
- <template #default="scope">
|
|
|
- {{ scope.row.productTypeText ? scope.row.productTypeText : '--' }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="bid" label="竞价">
|
|
|
- <template #default="scope">
|
|
|
- <el-input-number v-model="scope.row.bid" :min="0.02" :max="1000000" :controls="false" size="small" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="operate" label="操作" width="60" align="right">
|
|
|
- <template #default="scope">
|
|
|
- <el-button type="danger" text size="small" @click="delCna(scope.$index)">删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- </el-card>
|
|
|
- <div style="display: flex; justify-content: space-around; margin-top: -8px">
|
|
|
- <el-button type="primary" plain @click="productTagetSave">保存</el-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <div
|
|
|
- style="font-size: 20px; font-weight: bold; margin-top: 30px"
|
|
|
- v-if="campaignRuleForm.type == 'AUTO' || (ruleForm.targetType == 'Goods' && campaignRuleForm.type === 'MANUAL')">
|
|
|
- 否定商品
|
|
|
- </div>
|
|
|
- <hr v-if="campaignRuleForm.type == 'AUTO' || (ruleForm.targetType == 'Goods' && campaignRuleForm.type === 'MANUAL')" />
|
|
|
- <el-form-item
|
|
|
- prop="matchType"
|
|
|
- style="width: 100%; margin-top: 20px"
|
|
|
- v-if="campaignRuleForm.type == 'AUTO' || (ruleForm.targetType == 'Goods' && campaignRuleForm.type === 'MANUAL')">
|
|
|
- <div style="width: 100%; height: 600px; display: flex; border: 1px solid #e5e7ec; border-radius: 6px" v-loading="negativeGoodsLoading">
|
|
|
- <div style="width: 50%; border-right: 1px solid #e5e7ec">
|
|
|
- <el-tabs v-model="negativeTabs" class="demo-tabs" @tab-click="handleNegGoodsTabs">
|
|
|
- <el-tab-pane label="搜索" name="first">
|
|
|
- <div style="margin-bottom: 10px">
|
|
|
- <el-input placeholder="按ASIN搜索" v-model="negativeInput" @change="searchNegativeGoods" clearable />
|
|
|
- </div>
|
|
|
- <el-table
|
|
|
- height="495"
|
|
|
- style="width: 100%"
|
|
|
- v-loading="loading"
|
|
|
- :data="negativeTableData"
|
|
|
- :header-cell-style="headerCellStyle"
|
|
|
- :show-header="false">
|
|
|
- <el-table-column prop="asin" label="商品">
|
|
|
- <template #default="scope">
|
|
|
- <div style="display: flex; align-items: center">
|
|
|
- <div style="margin-right: 8px; line-height: normal">
|
|
|
- <el-image class="img-box" :src="scope.row.image_link" />
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <el-tooltip class="box-item" effect="dark" :content="scope.row.title" placement="top">
|
|
|
- <div class="single-line">{{ scope.row.title ? scope.row.title : '--' }}</div>
|
|
|
- </el-tooltip>
|
|
|
- <span>
|
|
|
- ASIN: <span class="data-color" style="margin-right: 8px">{{ scope.row.asin ? scope.row.asin : '--' }}</span>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="name" label="Name" width="120" align="right">
|
|
|
- <template #header> </template>
|
|
|
- <template #default="scope">
|
|
|
- <el-button type="primary" size="small" @click="addSingleNegativeGoods(scope)" text>添加</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="输入" name="second">
|
|
|
- <el-input
|
|
|
- v-model="ruleForm.negativeGoodsTextarea"
|
|
|
- :disabled="true"
|
|
|
- :rows="17"
|
|
|
- type="textarea"
|
|
|
- maxlength="11000"
|
|
|
- style="padding: 10px 10px" />
|
|
|
- <div style="display: flex; flex-direction: row-reverse; margin-top: 10px">
|
|
|
- <el-button
|
|
|
- style="margin-right: 10px"
|
|
|
- type="primary"
|
|
|
- text
|
|
|
- bg
|
|
|
- :disabled="!ruleForm.negativeGoodsTextarea"
|
|
|
- @click="addNegativeGoods"
|
|
|
- >添加</el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
- </div>
|
|
|
- <div style="width: 50%">
|
|
|
- <el-card class="box-card" shadow="never" style="border: none">
|
|
|
- <template #header>
|
|
|
- <div class="card-header">
|
|
|
- <span style="font-weight: 550; font-size: 15px; color: #1f2128">已添加: {{ addedNegetiveTableData.length }}</span>
|
|
|
- <el-button class="button" text bg @click="delAllNegativeGoods">全部删除</el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <div class="card-body"></div>
|
|
|
- </el-card>
|
|
|
- <div style="padding: 0 10px 0 10px; margin-top: -30px">
|
|
|
- <el-table
|
|
|
- :data="addedNegetiveTableData"
|
|
|
- height="473"
|
|
|
- style="width: 100%"
|
|
|
- :header-cell-style="headerCellStyle"
|
|
|
- @selection-change="handleAddedNegGoods">
|
|
|
- <el-table-column prop="asin" label="商品">
|
|
|
- <template #default="scope">
|
|
|
- <div style="display: flex; align-items: center">
|
|
|
- <div style="margin-right: 8px; line-height: normal">
|
|
|
- <el-image class="img-box" :src="scope.row.image_link" />
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <el-tooltip class="box-item" effect="dark" :content="scope.row.title" placement="top">
|
|
|
- <div class="single-line">{{ scope.row.title ? scope.row.title : '--' }}</div>
|
|
|
- </el-tooltip>
|
|
|
- <span
|
|
|
- >ASIN:
|
|
|
- <span class="data-color" style="margin-right: 8px">{{ scope.row.asin ? scope.row.asin : '--' }}</span>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作" width="120" align="right">
|
|
|
- <template #default="scope">
|
|
|
- <el-button type="primary" size="small" @click="delSingleNegativeGoods(scope)" text>删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- <div style="display: flex; justify-content: space-around; padding-top: 10px">
|
|
|
- <el-button plain type="primary" @click="negativeGoodsSave" :disabled="!addedNegetiveTableData.length">保存</el-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <!-- <br />
|
|
|
- <el-form-item>
|
|
|
- <el-button size="large" @click="resetForm(ruleFormRef)">取消</el-button>
|
|
|
- <el-button size="large" type="primary" plain @click="submitForm(ruleFormRef)">保存</el-button>
|
|
|
- </el-form-item> -->
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
- </el-card>
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
<script lang="ts" setup>
|
|
|
import { onMounted, reactive, ref, computed, watch } from 'vue'
|
|
|
import type { CSSProperties } from 'vue'
|
|
@@ -2315,124 +1419,1020 @@ async function negativeGoodsSave() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// ------------------------------------------自定义校验模块------------------------------------------
|
|
|
-function checkBid(value, callback, bidField) {
|
|
|
- const bid = parseFloat(value)
|
|
|
- const budget = parseFloat(campaignRuleForm.budget)
|
|
|
- // 检查值是否为最多两位小数的普通数字格式
|
|
|
- const isNormalNumberWithTwoDecimals = /^-?\d+(\.\d{1,2})?$/.test(value)
|
|
|
+// ------------------------------------------自定义校验模块------------------------------------------
|
|
|
+function checkBid(value, callback, bidField) {
|
|
|
+ const bid = parseFloat(value)
|
|
|
+ const budget = parseFloat(campaignRuleForm.budget)
|
|
|
+ // 检查值是否为最多两位小数的普通数字格式
|
|
|
+ const isNormalNumberWithTwoDecimals = /^-?\d+(\.\d{1,2})?$/.test(value)
|
|
|
+
|
|
|
+ if (!isNormalNumberWithTwoDecimals) {
|
|
|
+ callback(new Error('请输入数字值(最多两位小数)'))
|
|
|
+ } else if (isNaN(bid)) {
|
|
|
+ callback(new Error('请输入有效的数字'))
|
|
|
+ } else if (bid < 0.02 || bid > 1000) {
|
|
|
+ callback(new Error('值必须在0.02到1000之间'))
|
|
|
+ } else if (bid >= budget) {
|
|
|
+ callback(new Error('出价必须小于预算'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+}
|
|
|
+// 自定义校验规则---自动定价和按目标设置出价模块
|
|
|
+// function getValidationRules(fieldName) {
|
|
|
+// // 默认校验规则
|
|
|
+// const commonRules = [
|
|
|
+// { required: true, message: '此项为必填项', trigger: 'blur' },
|
|
|
+// { validator: (rule, value, callback) => checkBid(value, callback, fieldName), trigger: 'blur' },
|
|
|
+// ]
|
|
|
+
|
|
|
+// // 根据不同字段和状态返回特定的校验规则
|
|
|
+// switch (fieldName) {
|
|
|
+// case 'defaultBidInp':
|
|
|
+// if (ruleForm.autoRedirect === 'defaultBid') {
|
|
|
+// return commonRules
|
|
|
+// }
|
|
|
+// break
|
|
|
+// case 'similarProductsInp':
|
|
|
+// if (ruleForm.autoRedirect === 'targetBid' && ruleForm.similarProducts) {
|
|
|
+// return commonRules
|
|
|
+// } else if (ruleForm.similarProducts == false) {
|
|
|
+// ruleFormRef.value?.clearValidate(fieldName)
|
|
|
+// }
|
|
|
+// break
|
|
|
+// case 'relatedProductsInp':
|
|
|
+// if (ruleForm.autoRedirect === 'targetBid' && ruleForm.relatedProducts) {
|
|
|
+// return commonRules
|
|
|
+// } else if (ruleForm.relatedProducts == false) {
|
|
|
+// ruleFormRef.value?.clearValidate(fieldName)
|
|
|
+// }
|
|
|
+// break
|
|
|
+// case 'broadMatchInp':
|
|
|
+// if (ruleForm.autoRedirect === 'targetBid' && ruleForm.broadMatch) {
|
|
|
+// return commonRules
|
|
|
+// } else if (ruleForm.broadMatch == false) {
|
|
|
+// ruleFormRef.value?.clearValidate(fieldName)
|
|
|
+// }
|
|
|
+// break
|
|
|
+// case 'closeMatchInp':
|
|
|
+// // 仅当autoRedirect为'targetBid'且closeMatch开启时校验closeMatchInp
|
|
|
+// if (ruleForm.autoRedirect === 'targetBid' && ruleForm.closeMatch) {
|
|
|
+// return commonRules
|
|
|
+// } else if (ruleForm.closeMatch == false) {
|
|
|
+// ruleFormRef.value?.clearValidate(fieldName)
|
|
|
+// }
|
|
|
+// break
|
|
|
+// default:
|
|
|
+// return []
|
|
|
+// }
|
|
|
+// // 如果不满足上述条件,则无需校验
|
|
|
+// return []
|
|
|
+// }
|
|
|
+// 监听表单字段变化,根据不同字段和状态返回特定的校验规则
|
|
|
+// watch(
|
|
|
+// [() => ruleForm.autoRedirect, () => ruleForm.closeMatch, () => ruleForm.broadMatch, () => ruleForm.similarProducts, () => ruleForm.relatedProducts],
|
|
|
+// () => {
|
|
|
+// // 定义需要更新校验规则的字段
|
|
|
+// const fields = ['defaultBidInp', 'closeMatchInp', 'broadMatchInp', 'similarProductsInp', 'relatedProductsInp']
|
|
|
+// fields.forEach((field) => {
|
|
|
+// rules.value[field] = getValidationRules(field)
|
|
|
+// })
|
|
|
+// }
|
|
|
+// )
|
|
|
+
|
|
|
+// 修改表头样式
|
|
|
+const headerCellStyle = (args) => {
|
|
|
+ if (args.rowIndex === 0) {
|
|
|
+ return {
|
|
|
+ backgroundColor: 'rgba(245, 245, 245, 0.9)',
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+function changeNegTableHeader(args) {
|
|
|
+ if (args.rowIndex === 0) {
|
|
|
+ return {
|
|
|
+ color: '#505968',
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
- if (!isNormalNumberWithTwoDecimals) {
|
|
|
- callback(new Error('请输入数字值(最多两位小数)'))
|
|
|
- } else if (isNaN(bid)) {
|
|
|
- callback(new Error('请输入有效的数字'))
|
|
|
- } else if (bid < 0.02 || bid > 1000) {
|
|
|
- callback(new Error('值必须在0.02到1000之间'))
|
|
|
- } else if (bid >= budget) {
|
|
|
- callback(new Error('出价必须小于预算'))
|
|
|
- } else {
|
|
|
- callback()
|
|
|
+function changeKeyWordsTableHeader(args) {
|
|
|
+ if (args.rowIndex === 0) {
|
|
|
+ return {
|
|
|
+ color: '#505968',
|
|
|
+ backgroundColor: 'rgba(245, 245, 245, 0.9)',
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-// 自定义校验规则---自动定价和按目标设置出价模块
|
|
|
-// function getValidationRules(fieldName) {
|
|
|
-// // 默认校验规则
|
|
|
-// const commonRules = [
|
|
|
-// { required: true, message: '此项为必填项', trigger: 'blur' },
|
|
|
-// { validator: (rule, value, callback) => checkBid(value, callback, fieldName), trigger: 'blur' },
|
|
|
-// ]
|
|
|
|
|
|
-// // 根据不同字段和状态返回特定的校验规则
|
|
|
-// switch (fieldName) {
|
|
|
-// case 'defaultBidInp':
|
|
|
-// if (ruleForm.autoRedirect === 'defaultBid') {
|
|
|
-// return commonRules
|
|
|
-// }
|
|
|
-// break
|
|
|
-// case 'similarProductsInp':
|
|
|
-// if (ruleForm.autoRedirect === 'targetBid' && ruleForm.similarProducts) {
|
|
|
-// return commonRules
|
|
|
-// } else if (ruleForm.similarProducts == false) {
|
|
|
-// ruleFormRef.value?.clearValidate(fieldName)
|
|
|
-// }
|
|
|
-// break
|
|
|
-// case 'relatedProductsInp':
|
|
|
-// if (ruleForm.autoRedirect === 'targetBid' && ruleForm.relatedProducts) {
|
|
|
-// return commonRules
|
|
|
-// } else if (ruleForm.relatedProducts == false) {
|
|
|
-// ruleFormRef.value?.clearValidate(fieldName)
|
|
|
-// }
|
|
|
-// break
|
|
|
-// case 'broadMatchInp':
|
|
|
-// if (ruleForm.autoRedirect === 'targetBid' && ruleForm.broadMatch) {
|
|
|
-// return commonRules
|
|
|
-// } else if (ruleForm.broadMatch == false) {
|
|
|
-// ruleFormRef.value?.clearValidate(fieldName)
|
|
|
-// }
|
|
|
-// break
|
|
|
-// case 'closeMatchInp':
|
|
|
-// // 仅当autoRedirect为'targetBid'且closeMatch开启时校验closeMatchInp
|
|
|
-// if (ruleForm.autoRedirect === 'targetBid' && ruleForm.closeMatch) {
|
|
|
-// return commonRules
|
|
|
-// } else if (ruleForm.closeMatch == false) {
|
|
|
-// ruleFormRef.value?.clearValidate(fieldName)
|
|
|
-// }
|
|
|
-// break
|
|
|
-// default:
|
|
|
-// return []
|
|
|
-// }
|
|
|
-// // 如果不满足上述条件,则无需校验
|
|
|
-// return []
|
|
|
-// }
|
|
|
-// 监听表单字段变化,根据不同字段和状态返回特定的校验规则
|
|
|
-// watch(
|
|
|
-// [() => ruleForm.autoRedirect, () => ruleForm.closeMatch, () => ruleForm.broadMatch, () => ruleForm.similarProducts, () => ruleForm.relatedProducts],
|
|
|
-// () => {
|
|
|
-// // 定义需要更新校验规则的字段
|
|
|
-// const fields = ['defaultBidInp', 'closeMatchInp', 'broadMatchInp', 'similarProductsInp', 'relatedProductsInp']
|
|
|
-// fields.forEach((field) => {
|
|
|
-// rules.value[field] = getValidationRules(field)
|
|
|
-// })
|
|
|
-// }
|
|
|
-// )
|
|
|
+onMounted(() => {
|
|
|
+ setTableData()
|
|
|
+ getAdMix()
|
|
|
+ // const myTest = route.query
|
|
|
+ // console.log('myTest', myTest)
|
|
|
+})
|
|
|
+
|
|
|
+defineOptions({
|
|
|
+ name: 'SpCreateCampaigns',
|
|
|
+})
|
|
|
+</script>
|
|
|
+
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-card>
|
|
|
+ <div style="padding-left: 5px">
|
|
|
+ <!-- 广告活动 -->
|
|
|
+ <el-form
|
|
|
+ :label-position="labelPosition"
|
|
|
+ ref="campaignFormRef"
|
|
|
+ :model="campaignRuleForm"
|
|
|
+ :rules="campaignRules"
|
|
|
+ label-width="120px"
|
|
|
+ class="demo-ruleForm"
|
|
|
+ :size="formSize"
|
|
|
+ status-icon>
|
|
|
+ <el-card shadow="never" body-style="padding-bottom: 0 !important;" v-loading="campaignLoading">
|
|
|
+ <div style="font-size: 24px; font-weight: bold">广告活动</div>
|
|
|
+ <hr />
|
|
|
+ <br />
|
|
|
+ <el-form-item label="广告活动名称" prop="name" style="width: 350px">
|
|
|
+ <el-input v-model="campaignRuleForm.name" placeholder="请输入广告活动名称" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="广告组合" prop="adMix">
|
|
|
+ <el-select v-model="campaignRuleForm.adMix" clearable placeholder="请选择">
|
|
|
+ <el-option v-for="item in adMixOptions" :key="item.portfolioId" :label="item.name" :value="item.portfolioId" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="startDate" label="开始日期" style="width: 350px">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="campaignRuleForm.startDate"
|
|
|
+ type="date"
|
|
|
+ format="YYYY-MM-DD"
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
+ label="开始日期"
|
|
|
+ placeholder="开始日期"
|
|
|
+ style="width: 100%" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="date2" label="结束日期" style="width: 350px">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="campaignRuleForm.date2"
|
|
|
+ type="date"
|
|
|
+ format="YYYY-MM-DD"
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
+ label="结束日期"
|
|
|
+ placeholder="结束日期"
|
|
|
+ style="width: 100%" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="budget" label="每日预算" style="width: 300px">
|
|
|
+ <el-input
|
|
|
+ v-model="campaignRuleForm.budget"
|
|
|
+ maxlength="7"
|
|
|
+ oninput="value=value.indexOf('.') > -1?value.slice(0, value.indexOf('.') + 3):value">
|
|
|
+ <template #prepend>$</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="投放类型" prop="type" class="column-item">
|
|
|
+ <el-radio-group v-model="campaignRuleForm.type" @click="changeType">
|
|
|
+ <div>
|
|
|
+ <el-radio label="AUTO">自动</el-radio>
|
|
|
+ <div class="radio-description">定向与您推广商品相似的关键词和商品</div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-radio label="MANUAL">手动</el-radio>
|
|
|
+ <div class="radio-description">选择关键词或商品以定向购物者搜索并设置自定义出价</div>
|
|
|
+ </div>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="竞价策略" prop="bidStrategy" class="column-item column-margin-bottom">
|
|
|
+ <el-radio-group v-model="campaignRuleForm.bidStrategy">
|
|
|
+ <div>
|
|
|
+ <el-radio label="LEGACY_FOR_SALES" border>
|
|
|
+ 动态竞价-仅降低
|
|
|
+ <div class="radio-description-2">当您的广告不太可能带来销售时,我们将实时降低您的竞价</div>
|
|
|
+ </el-radio>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-radio label="AUTO_FOR_SALES" border>
|
|
|
+ 动态竞价-提高和降低
|
|
|
+ <div class="radio-description-2">
|
|
|
+ 当您的广告很有可能带来销售时,我们将实时提高您的竞价(最高可达 100%),并在您的广告不太可能带来销售时降低您的竞价
|
|
|
+ </div>
|
|
|
+ </el-radio>
|
|
|
+ </div>
|
|
|
+ <el-radio label="MANUAL" border>
|
|
|
+ 固定竞价
|
|
|
+ <div class="radio-description-2">我们将使用您的确切竞价和您设置的任何手动调整,而不会根据售出可能性对您的竞价进行更改</div>
|
|
|
+ </el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="按展示位置调整出价" prop="placeBid">
|
|
|
+ <p style="color: #8e9196">除了出价策略外,您还可以将出价提高多达900%</p>
|
|
|
+ <div class="gap-items">
|
|
|
+ <div class="gap-item">搜索结果顶部(首页)</div>
|
|
|
+ <el-input v-model="campaignRuleForm.placeBid" class="gap-item">
|
|
|
+ <template #append>%</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ <div class="gap-items">
|
|
|
+ <div class="gap-item">商品首页</div>
|
|
|
+ <el-input v-model="campaignRuleForm.firstPage" class="gap-item">
|
|
|
+ <template #append>%</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ <div class="gap-items" style="margin-bottom: 0">
|
|
|
+ <div class="gap-item">搜索结果的其余位置</div>
|
|
|
+ <el-input v-model="campaignRuleForm.other" class="gap-item">
|
|
|
+ <template #append>%</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item style="margin-left: 48%">
|
|
|
+ <el-button type="primary" plain @click="submitCampaignForm(campaignFormRef)">保存</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-card>
|
|
|
+ <br />
|
|
|
+ <!-- 广告组 -->
|
|
|
+ <el-card shadow="never" body-style="padding-bottom: 0 !important;" v-loading="adGroupLoading">
|
|
|
+ <div style="font-size: 20px; font-weight: bold">广告组</div>
|
|
|
+ <hr />
|
|
|
+ <br />
|
|
|
+ <el-form ref="adGroupRuleFormRef" :model="adGroupRuleForm" :rules="adGroupRules">
|
|
|
+ <el-form-item required label="广告组名称" prop="adGroupName" style="width: 350px; margin-top: 20px">
|
|
|
+ <el-input v-model="adGroupRuleForm.adGroupName" placeholder="请输入广告组名称" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item required label="默认竞价" prop="defaultBidInp">
|
|
|
+ <el-input v-model="adGroupRuleForm.defaultBidInp" minlength="3" maxlength="4" style="width: 200px">
|
|
|
+ <template #prepend>$</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item style="margin-left: 48%">
|
|
|
+ <el-button type="primary" plain @click="submitGroupsForm(adGroupRuleFormRef)" :disabled="adGroupSave">保存</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-card>
|
|
|
+ <!-- 商品表格 -->
|
|
|
+ <div style="margin-top: 20px; font-size: 24px; font-weight: bold">商品</div>
|
|
|
+ <hr />
|
|
|
+ <br />
|
|
|
+ <el-form-item prop="commodity" style="width: 100%" v-loading="commodityLoading">
|
|
|
+ <div style="width: 100%; height: 620px; display: flex; border: 1px solid #e5e7ec; border-radius: 6px">
|
|
|
+ <div style="width: 50%; border-right: 1px solid #e5e7ec">
|
|
|
+ <el-tabs v-model="activeName" class="demo-tabs">
|
|
|
+ <el-tab-pane label="搜索" name="first">
|
|
|
+ <div style="margin-bottom: 10px">
|
|
|
+ <el-input v-model="searchInp" placeholder="Please input" class="input-with-select" @change="inpChange" clearable>
|
|
|
+ <template #prepend>
|
|
|
+ <el-select v-model="select" style="width: 100px" @change="selChange">
|
|
|
+ <el-option label="名称" value="name" />
|
|
|
+ <el-option label="ASIN" value="asin" />
|
|
|
+ <el-option label="SKU" value="sku" />
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ <template #append>
|
|
|
+ <el-select v-model="select2" style="width: 100px">
|
|
|
+ <el-option label="最新优先" value="latest" />
|
|
|
+ <el-option label="最早优先" value="earliest" />
|
|
|
+ <el-option label="优选广告" value="optimal" />
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ height="490"
|
|
|
+ style="width: 100%"
|
|
|
+ v-loading="loading"
|
|
|
+ :data="fullTableData"
|
|
|
+ :header-cell-style="headerCellStyle"
|
|
|
+ @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column type="selection" width="50" />
|
|
|
+ <el-table-column prop="asin" label="商品">
|
|
|
+ <template #default="scope">
|
|
|
+ <div style="display: flex; align-items: center">
|
|
|
+ <div style="margin-right: 8px; line-height: normal">
|
|
|
+ <el-image class="img-box" :src="scope.row.image_link" />
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-tooltip class="box-item" effect="dark" :content="scope.row.title" placement="top">
|
|
|
+ <div class="single-line">{{ scope.row.title ? scope.row.title : '--' }}</div>
|
|
|
+ </el-tooltip>
|
|
|
+ <div class="data-color">
|
|
|
+ <span style="font-weight: 500; color: rgb(30, 33, 41)">${{ scope.row.price ? scope.row.price : '--' }}</span>
|
|
|
+ <span style="margin: 0 5px; color: #cacdd4">|</span>
|
|
|
+ <span style="color: #6d7784">{{ scope.row.quantity }}</span>
|
|
|
+ </div>
|
|
|
+ <span>
|
|
|
+ ASIN: <span class="data-color" style="margin-right: 8px">{{ scope.row.asin ? scope.row.asin : '--' }}</span>
|
|
|
+ </span>
|
|
|
+ <span>
|
|
|
+ SKU: <span class="data-color">{{ scope.row.sku ? scope.row.sku : '--' }}</span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="Name" width="120" align="right">
|
|
|
+ <template #header>
|
|
|
+ <el-button type="primary" size="normal" link @click="handleGoodsAdd">添加已选中</el-button>
|
|
|
+ </template>
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button type="primary" size="small" @click="addSingleGoods(scope)" text>添加</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ :current-page="currentPage"
|
|
|
+ :page-size="pageSize"
|
|
|
+ :total="totalItems"
|
|
|
+ layout="prev, pager, next" />
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="输入" name="second">
|
|
|
+ <el-input
|
|
|
+ style="padding: 10px"
|
|
|
+ v-model="goodsTextarea"
|
|
|
+ :rows="20"
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入ASIN,多个ASIN使用逗号、空格或换行符分隔。(未完成)"
|
|
|
+ maxlength="11000" />
|
|
|
+ <div style="display: flex; flex-direction: row-reverse; margin-top: 10px">
|
|
|
+ <el-button v-for="button in buttons" :key="button.text" :type="button.type" link @click="addGods">{{ button.text }}</el-button>
|
|
|
+ </div>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </div>
|
|
|
+ <div style="width: 50%">
|
|
|
+ <el-card class="box-card" shadow="never" style="border: 0">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span style="font-weight: 550; font-size: 15px; color: #1f2128">已添加: {{ adsTableData.length }}</span>
|
|
|
+ <el-button class="button" type="danger" text bg @click="delAllGoods">全部删除</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div class="card-body"></div>
|
|
|
+ </el-card>
|
|
|
+ <div style="padding: 0 10px 0 10px; margin-top: -12px">
|
|
|
+ <el-table
|
|
|
+ :data="adsTableData"
|
|
|
+ height="475"
|
|
|
+ style="width: 100%"
|
|
|
+ :header-cell-style="headerCellStyle"
|
|
|
+ @selection-change="handleAddedGoodsChange">
|
|
|
+ <el-table-column type="selection" width="50" />
|
|
|
+ <el-table-column prop="asin" label="ASIN">
|
|
|
+ <template #default="scope">
|
|
|
+ <div style="display: flex; align-items: center">
|
|
|
+ <div style="margin-right: 8px; line-height: normal">
|
|
|
+ <el-image class="img-box" :src="scope.row.image_link" />
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-tooltip class="box-item" effect="dark" :content="scope.row.title" placement="top">
|
|
|
+ <div class="single-line">{{ scope.row.title ? scope.row.title : '--' }}</div>
|
|
|
+ </el-tooltip>
|
|
|
+ <div class="data-color">
|
|
|
+ <span style="font-weight: 500; color: rgb(30, 33, 41)">${{ scope.row.price ? scope.row.price : '--' }}</span>
|
|
|
+ <span style="margin: 0 5px; color: #cacdd4">|</span>
|
|
|
+ <span style="color: #6d7784">{{ scope.row.quantity }}</span>
|
|
|
+ </div>
|
|
|
+ <span
|
|
|
+ >ASIN:
|
|
|
+ <span class="data-color" style="margin-right: 8px">{{ scope.row.asin ? scope.row.asin : '--' }}</span>
|
|
|
+ </span>
|
|
|
+ <span
|
|
|
+ >SKU:
|
|
|
+ <span class="data-color">{{ scope.row.sku ? scope.row.sku : '--' }}</span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="Name" width="120" align="right">
|
|
|
+ <template #header>
|
|
|
+ <el-button type="danger" size="normal" link @click="delSelectedGoods">删除已选中</el-button>
|
|
|
+ </template>
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button type="danger" size="small" @click="delSingleGoods(scope)" text>删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <div style="display: flex; justify-content: space-around; padding-top: 10px">
|
|
|
+ <el-button type="primary" plain :disabled="adsSave" @click="submitAdsForm">保存</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- 按目标组设置出价 -->
|
|
|
+ <el-form
|
|
|
+ :label-position="labelPosition"
|
|
|
+ ref="targetGroupFormRef"
|
|
|
+ :model="targetGroupRuleForm"
|
|
|
+ :rules="targetGroupRules"
|
|
|
+ label-width="120px"
|
|
|
+ class="demo-ruleForm"
|
|
|
+ :size="formSize"
|
|
|
+ status-icon>
|
|
|
+ <div class="column-item" v-if="campaignRuleForm.type == 'AUTO'">
|
|
|
+ <div style="margin-top: 20px; font-size: 24px; font-weight: bold">按目标组设置出价</div>
|
|
|
+ <hr />
|
|
|
+ <br />
|
|
|
+ <el-card shadow="never" v-if="campaignRuleForm.type == 'AUTO'" class="box-card" v-loading="targetGroupLoading">
|
|
|
+ <div>
|
|
|
+ <div style="color: #8e9095">
|
|
|
+ <span>目标群体</span>
|
|
|
+ <span class="suggested-bid-item">建议竞价</span>
|
|
|
+ <span>竞价</span>
|
|
|
+ </div>
|
|
|
+ <div style="display: flex">
|
|
|
+ <el-switch v-model="targetGroupRuleForm.closeMatch" size="small" active-text="紧密匹配" @change="closeMatchChange" />
|
|
|
+ <span class="suggested-bid-item">--</span>
|
|
|
+ <el-form-item prop="closeMatchInp">
|
|
|
+ <el-input
|
|
|
+ :disabled="!targetGroupRuleForm.closeMatch"
|
|
|
+ v-model="targetGroupRuleForm.closeMatchInp"
|
|
|
+ minlength="3"
|
|
|
+ maxlength="4"
|
|
|
+ class="bid-input">
|
|
|
+ <template #prepend>$</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div style="display: flex">
|
|
|
+ <el-switch v-model="targetGroupRuleForm.broadMatch" size="small" active-text="广泛匹配" @change="broadMatchChange" />
|
|
|
+ <span class="suggested-bid-item">--</span>
|
|
|
+ <el-form-item prop="broadMatchInp">
|
|
|
+ <el-input
|
|
|
+ :disabled="!targetGroupRuleForm.broadMatch"
|
|
|
+ v-model="targetGroupRuleForm.broadMatchInp"
|
|
|
+ minlength="3"
|
|
|
+ maxlength="4"
|
|
|
+ class="bid-input">
|
|
|
+ <template #prepend>$</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div style="display: flex">
|
|
|
+ <el-switch v-model="targetGroupRuleForm.similarProducts" size="small" active-text="同类商品" @change="similarProductsChange" />
|
|
|
+ <span class="suggested-bid-item">--</span>
|
|
|
+ <el-form-item prop="similarProductsInp">
|
|
|
+ <el-input
|
|
|
+ :disabled="!targetGroupRuleForm.similarProducts"
|
|
|
+ v-model="targetGroupRuleForm.similarProductsInp"
|
|
|
+ minlength="3"
|
|
|
+ maxlength="4"
|
|
|
+ class="bid-input">
|
|
|
+ <template #prepend>$</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div style="display: flex">
|
|
|
+ <el-switch v-model="targetGroupRuleForm.relatedProducts" size="small" active-text="关联商品" @change="relatedProductsChange" />
|
|
|
+ <span class="suggested-bid-item">--</span>
|
|
|
+ <el-form-item prop="relatedProductsInp">
|
|
|
+ <el-input
|
|
|
+ :disabled="!targetGroupRuleForm.relatedProducts"
|
|
|
+ v-model="targetGroupRuleForm.relatedProductsInp"
|
|
|
+ minlength="3"
|
|
|
+ maxlength="4"
|
|
|
+ class="bid-input">
|
|
|
+ <template #prepend>$</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="display: flex; justify-content: space-around">
|
|
|
+ <el-button type="primary" plain :disabled="targetGroupBidSave" @click="submitTargetGroupForm">保存</el-button>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <!-- 投放类型 -->
|
|
|
+ <div class="column-item" v-if="campaignRuleForm.type == 'MANUAL'">
|
|
|
+ <p style="color: #606266; font-weight: 450"><span style="color: #e47470">*</span> 投放类型</p>
|
|
|
+ <el-radio-group v-model="ruleForm.targetType" @change="changeTargetType">
|
|
|
+ <div style="display: flex">
|
|
|
+ <el-radio label="keyWords" style="align-items: flex-start; margin-top: 5px">
|
|
|
+ <div style="margin-top: -4px">关键词投放</div>
|
|
|
+ <div>选择关键词以帮助您的商品出现在购物者搜索中</div>
|
|
|
+ </el-radio>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-radio label="Goods" style="align-items: flex-start; margin-top: 20px">
|
|
|
+ <div style="margin-top: -4px">商品投放</div>
|
|
|
+ <div>选择特定的商品, 分类, 品牌或者其他商品功能来定向您的广告</div>
|
|
|
+ </el-radio>
|
|
|
+ </div>
|
|
|
+ </el-radio-group>
|
|
|
+ </div>
|
|
|
+ <!-- 关键词定向 -->
|
|
|
+ <div
|
|
|
+ style="font-size: 20px; font-weight: bold; margin-top: 30px"
|
|
|
+ v-if="ruleForm.targetType == 'keyWords' && campaignRuleForm.type == 'MANUAL'">
|
|
|
+ 关键词定向
|
|
|
+ </div>
|
|
|
+ <hr v-if="ruleForm.targetType == 'keyWords' && campaignRuleForm.type == 'MANUAL'" />
|
|
|
+ <el-form-item style="width: 100%; margin-top: 20px" v-if="ruleForm.targetType == 'keyWords' && campaignRuleForm.type == 'MANUAL'">
|
|
|
+ <div style="width: 100%; height: 600px; display: flex; border: 1px solid #e5e7eb; border-radius: 6px" v-loading="keywordsLoading">
|
|
|
+ <div style="width: 50%; border-right: 1px solid #e5e7eb">
|
|
|
+ <el-tabs v-model="keyWordsTabs" class="demo-tabs" @tab-click="handleGoodsTabs">
|
|
|
+ <div style="margin: 8px">
|
|
|
+ <p style="margin-left: 8px; margin-bottom: -8px; font-weight: 500; color: #616266">竞价:</p>
|
|
|
+ <div style="display: flex; align-items: center">
|
|
|
+ <el-select v-model="bidType" class="m-2" placeholder="Select" style="width: 450px">
|
|
|
+ <el-option v-for="item in bidTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ </el-select>
|
|
|
+ <el-input v-model="bidInput" :disabled="!(bidType == 'customBid')" placeholder="Please input">
|
|
|
+ <template #prepend>$</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ <div style="display: flex">
|
|
|
+ <span style="margin: 0 10px 0 8px; font-weight: 500; color: #616266">匹配类型: </span>
|
|
|
+ <el-checkbox v-model="broadType" label="广泛" />
|
|
|
+ <el-checkbox v-model="phraseType" label="词组" />
|
|
|
+ <el-checkbox v-model="exactType" label="精确" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-tab-pane label="建议" name="first">
|
|
|
+ <el-table
|
|
|
+ height="425"
|
|
|
+ style="width: 100%; padding-left: 5px"
|
|
|
+ v-loading="loading"
|
|
|
+ :data="keyWordsTableData"
|
|
|
+ :header-cell-style="headerCellStyle"
|
|
|
+ :header-row-style="changeKeyWordsTableHeader">
|
|
|
+ <el-table-column prop="asin" label="关键词"> </el-table-column>
|
|
|
+ <el-table-column prop="name" label="匹配类型"> </el-table-column>
|
|
|
+ <el-table-column prop="name" label="建议出价" width="120"> </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="输入" name="second">
|
|
|
+ <el-input v-model="keyWordsTextarea" :rows="10" type="textarea" style="padding-left: 5px" />
|
|
|
+ <div style="display: flex; flex-direction: row-reverse; margin-top: 10px">
|
|
|
+ <el-button type="primary" text bg @click="addKeyWords">添加</el-button>
|
|
|
+ </div>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </div>
|
|
|
+ <div style="width: 50%">
|
|
|
+ <el-card class="box-card" shadow="never" style="border: none">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span style="font-weight: 550; font-size: 15px; color: #1f2128">已添加: {{ addedKeyWordsTableData.length }}</span>
|
|
|
+ <span style="color: #529b2e">成功: {{ successCount }}</span>
|
|
|
+ <span style="color: #c45656">失败: {{ errorCount }}</span>
|
|
|
+ <el-button class="button" type="danger" text bg @click="delAllKeyWords">全部删除</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div class="card-body" body-style="padding-bottom: -20px;">
|
|
|
+ <el-table
|
|
|
+ :data="addedKeyWordsTableData"
|
|
|
+ style="width: 100%; height: 450px"
|
|
|
+ :header-row-style="changeKeyWordsTableHeader"
|
|
|
+ :header-cell-style="headerCellStyle">
|
|
|
+ <el-table-column prop="keyword" label="关键词" width="auto" />
|
|
|
+ <el-table-column prop="matchType" label="匹配类型" />
|
|
|
+ <el-table-column prop="bid" label="出价">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-input v-model="scope.row.bid" placeholder="Please input bid" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="suggestBid" label="建议出价" />
|
|
|
+ <el-table-column prop="operate" label="操作" width="60" align="right">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button type="danger" size="small" link @click="delSingleKeyWord(scope)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ <div style="display: flex; justify-content: space-around; padding-top: 0px">
|
|
|
+ <el-button type="primary" plain @click="keyWordsSave" :disabled="!addedKeyWordsTableData.length">保存</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
|
|
|
-// 修改表头样式
|
|
|
-const headerCellStyle = (args) => {
|
|
|
- if (args.rowIndex === 0) {
|
|
|
- return {
|
|
|
- backgroundColor: 'rgba(245, 245, 245, 0.9)',
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+ <div
|
|
|
+ style="font-size: 20px; font-weight: bold; margin-top: 30px"
|
|
|
+ v-if="campaignRuleForm.type === 'AUTO' || (ruleForm.targetType === 'keyWords' && campaignRuleForm.type === 'MANUAL')">
|
|
|
+ 否定词
|
|
|
+ </div>
|
|
|
+ <hr v-if="campaignRuleForm.type === 'AUTO' || (ruleForm.targetType === 'keyWords' && campaignRuleForm.type === 'MANUAL')" />
|
|
|
+ <!-- 否定词表格 -->
|
|
|
+ <el-form-item
|
|
|
+ style="width: 100%; margin-top: 20px"
|
|
|
+ v-if="campaignRuleForm.type === 'AUTO' || (ruleForm.targetType === 'keyWords' && campaignRuleForm.type === 'MANUAL')">
|
|
|
+ <div style="width: 100%; height: 520px; display: flex; border: 1px solid #e5e7ec; border-radius: 6px" v-loading="negativeWordsLoading">
|
|
|
+ <div style="width: 50%; border-right: 1px solid #e5e7ec">
|
|
|
+ <div style="margin: 10px 0">
|
|
|
+ <span style="margin-left: 25px; color: #e47470">*</span>
|
|
|
+ <span style="color: #666666; margin-right: 10px">匹配类型: </span>
|
|
|
+ <el-checkbox v-model="NEGATIVE_PHRASE" label="词组否定" />
|
|
|
+ <el-checkbox v-model="NEGATIVE_EXACT" label="精确否定" />
|
|
|
+ </div>
|
|
|
+ <el-input
|
|
|
+ v-model="negativeWordsTextarea"
|
|
|
+ :rows="17"
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入关键词,多个关键词使用逗号或者换行符分隔。(最多添加1000个关键词)"
|
|
|
+ maxlength="11000"
|
|
|
+ style="padding: 0 20px" />
|
|
|
+ <div style="display: flex; flex-direction: row-reverse; margin-top: 10px">
|
|
|
+ <el-button style="margin-right: 18px" type="primary" text bg @click="addNegative">添加</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="width: 50%">
|
|
|
+ <el-card class="box-card" shadow="never" style="border: none">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span style="font-weight: 550; font-size: 15px; color: #1f2128">已添加: {{ addedData.length }}</span>
|
|
|
+ <el-button class="button" text bg :disabled="!tableData.length" @click="delAllNegative">全部删除</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div class="card-body">
|
|
|
+ <el-table :data="tableData" style="width: 100%; height: 370px; padding-bottom: 0" :header-row-style="changeNegTableHeader">
|
|
|
+ <el-table-column prop="negativeWords" label="否定词" width="auto" />
|
|
|
+ <el-table-column prop="operate" label="操作" width="60" align="right">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button type="primary" size="small" @click="delSingleNegative(scope)" text>删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ <div style="display: flex; justify-content: space-around">
|
|
|
+ <el-button type="primary" plain @click="negativeWordsSave" :disabled="!negativeList.length">保存</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
|
|
|
-function changeNegTableHeader(args) {
|
|
|
- if (args.rowIndex === 0) {
|
|
|
- return {
|
|
|
- color: '#505968',
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+ <!-- 商品定向 -->
|
|
|
+ <div style="font-size: 20px; font-weight: bold; margin-top: 30px" v-if="ruleForm.targetType == 'Goods'">商品定向</div>
|
|
|
+ <hr v-if="ruleForm.targetType == 'Goods'" />
|
|
|
+ <el-form-item style="width: 100%; margin-top: 20px" v-if="ruleForm.targetType == 'Goods'">
|
|
|
+ <div
|
|
|
+ style="width: 100%; height: 600px; display: flex; border: 1px solid #e5e7eb; border-radius: 6px"
|
|
|
+ v-loading="productOrientationLoading">
|
|
|
+ <div style="width: 50%; border-right: 1px solid #e5e7eb">
|
|
|
+ <el-tabs
|
|
|
+ type="border-card"
|
|
|
+ stretch
|
|
|
+ class="goods-orientation-tabs"
|
|
|
+ style="border: 0; border-right: 0; border-bottom-left-radius: 6px; border-top-left-radius: 5px; overflow: hidden">
|
|
|
+ <el-tab-pane label="品类" style="border-top-left-radius: 6px">
|
|
|
+ <div style="display: flex; align-items: center">
|
|
|
+ <span style="width: 40px">竞价:</span>
|
|
|
+ <el-select v-model="categoryBiddingType" @change="singleGoodsBidSelectChanged" class="m-2" placeholder="Select">
|
|
|
+ <el-option v-for="item in categoryBiddingTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ </el-select>
|
|
|
+ <el-input v-model="singleGoodsBidInput" :disabled="categoryBiddingType === 'defaultBid'" style="width: 200px">
|
|
|
+ <template #prepend>$</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
|
|
|
-function changeKeyWordsTableHeader(args) {
|
|
|
- if (args.rowIndex === 0) {
|
|
|
- return {
|
|
|
- color: '#505968',
|
|
|
- backgroundColor: 'rgba(245, 245, 245, 0.9)',
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+ <el-tabs v-model="categoryTabs" class="category-tabs">
|
|
|
+ <el-tab-pane label="建议" name="first">
|
|
|
+ <el-table :data="proposalTableData" style="width: 100%" height="422">
|
|
|
+ <el-table-column prop="proposal" label="建议" width="520">
|
|
|
+ <template #header> 0建议 </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="address" label="Address">
|
|
|
+ <template #header>
|
|
|
+ <el-button type="primary" size="normal" link @click="handleGoodsAdd">全部添加</el-button>
|
|
|
+ </template>
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button type="primary" size="small" @click="addSingleGoods(scope)" text>添加</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="搜索" name="second">
|
|
|
+ <el-input placeholder="请输入关键词过滤" />
|
|
|
+ <el-scrollbar height="390px">
|
|
|
+ <el-tree :data="searchClassifyTableData" :props="defaultProps" :expand-on-click-node="false">
|
|
|
+ <template #default="{ node, data }">
|
|
|
+ <span class="custom-tree-node">
|
|
|
+ <span style="width: 75%">{{ node.label }}</span>
|
|
|
+ <span style="color: rgb(50, 108, 216)" v-if="data.ta == true">
|
|
|
+ <a @click="refine(data)"> 细化 </a>
|
|
|
+ <a style="margin-left: 8px" @click="orientate(node, data)"> 定向 </a>
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-tree>
|
|
|
+ </el-scrollbar>
|
|
|
+ <el-dialog v-model="visible" :title="`细化分类: ${dialogTitle}`" @close="dialogClose" destroy-on-close>
|
|
|
+ <div style="display: flex; justify-content: space-between">
|
|
|
+ <span>根据特定品牌、价格范围、星级和Prime配送资格,细化分类</span>
|
|
|
+ <span>
|
|
|
+ <el-checkbox v-model="dialogForm.isCount" label="显示商品数量" @change="isCountChanged" />
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <el-form :model="dialogForm" :rules="dialogRules" ref="dialogFormRef" style="margin-top: 20px">
|
|
|
+ <el-form-item style="padding-left: 140px">
|
|
|
+ <span style="margin-right: 10px; color: #616266; font-weight: 500">品牌</span>
|
|
|
+ <el-select
|
|
|
+ v-model="dialogForm.dialogselectValue"
|
|
|
+ @change="dialogSelectChange"
|
|
|
+ multiple
|
|
|
+ placeholder="请选择"
|
|
|
+ :loading="dialogSelectLoading">
|
|
|
+ <el-option v-for="item in dialogForm.dialogOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="prices" style="padding-left: 112px; margin-top: 10px">
|
|
|
+ <span style="margin-right: 10px; color: #616266; font-weight: 500">价格范围</span>
|
|
|
+ <el-input-number v-model="dialogForm.prices.lowest" :min="1" :controls="false" placeholder="无最低商品价格" />
|
|
|
+ --
|
|
|
+ <el-input-number v-model="dialogForm.prices.highest" :min="1" :controls="false" placeholder="无最高商品价格" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="starRating" style="padding-left: 85px; margin-top: 10px">
|
|
|
+ <span style="margin-right: 15px; color: #616266; font-weight: 500">查看星级评定</span>
|
|
|
+ <el-slider v-model="dialogForm.starRating" range show-stops :max="5" :marks="marks" style="width: 70%" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="delivery" style="padding-left: 140px; margin-top: 30px">
|
|
|
+ <span style="margin-right: 10px; color: #616266; font-weight: 500">配送</span>
|
|
|
+ <el-radio-group v-model="dialogForm.delivery">
|
|
|
+ <el-radio label="all" style="font-weight: 400">所有</el-radio>
|
|
|
+ <el-radio label="eligible" style="font-weight: 400">具备Prime资格</el-radio>
|
|
|
+ <el-radio label="diseligible" style="font-weight: 400">不具备Prime资格</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <div style="display: flex; justify-content: space-between">
|
|
|
+ <span v-loading="countLoadig"
|
|
|
+ >定位到的商品数量:
|
|
|
+ <span v-if="dialogForm.isCount == true">{{ commodityCount[0]?.min }} - {{ commodityCount[0]?.max }}</span></span
|
|
|
+ >
|
|
|
+ <span class="dialog-footer">
|
|
|
+ <el-button @click="visible = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="dialogFormSubmit">确定</el-button>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="单个商品">
|
|
|
+ <div style="display: flex; align-items: center">
|
|
|
+ <span style="width: 40px">竞价:</span>
|
|
|
+ <el-select class="m-2" v-model="singleGoodsBidSelect" @change="singleGoodsBidSelectChanged">
|
|
|
+ <el-option v-for="item in singleGoodsBidTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ </el-select>
|
|
|
+ <el-input v-model="singleGoodsBidInput" :disabled="singleGoodsBidSelect == 'defaultBid'" style="width: 200px">
|
|
|
+ <template #prepend>$</template>
|
|
|
+ </el-input>
|
|
|
+ <div style="margin-left: 20px">
|
|
|
+ <span style="margin-right: 10px">类型:</span>
|
|
|
+ <el-checkbox v-model="expand" label="扩展" />
|
|
|
+ <el-checkbox v-model="accurate" label="精准" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-tabs v-model="singleGoodsTabs" class="category-tabs">
|
|
|
+ <el-tab-pane label="建议" name="first">
|
|
|
+ <el-table :data="proposalTableData" style="width: 100%" height="342">
|
|
|
+ <el-table-column prop="proposal" label="商品" width="520" />
|
|
|
+ <el-table-column prop="address" label="类型" />
|
|
|
+ <el-table-column prop="operational" label="操作" />
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="搜索" name="second">
|
|
|
+ <el-input v-model="singleGoodsSearchInp" @change="singleGoodsSearchChaneged" placeholder="按ASIN搜索"></el-input>
|
|
|
+ <el-table :data="searchTableData" style="width: 100%" height="309">
|
|
|
+ <el-table-column prop="asin" label="商品" width="520">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div style="display: flex; align-items: center">
|
|
|
+ <img :src="row.image_link" style="width: 40px; height: 40px; margin-right: 10px" />
|
|
|
+ <span>{{ row.title }}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="productTypes" label="类型">
|
|
|
+ <template #default="scope">
|
|
|
+ <div v-if="expand">扩展</div>
|
|
|
+ <div v-if="accurate">精准</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="operational" label="操作">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button class="button" type="primary" text @click="addSingleSearch(scope)">添加</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+ <!-- TODO: 商品定向TextArea -->
|
|
|
+ <!-- <el-tab-pane label="输入" name="third">暂无此功能</el-tab-pane> -->
|
|
|
+ </el-tabs>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </div>
|
|
|
+ <div style="width: 50%">
|
|
|
+ <el-card class="box-card" shadow="never" style="border: none">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span style="font-weight: 550; font-size: 15px; color: #1f2128">已添加: {{ productOrientationTableData.length }}</span>
|
|
|
+ <el-button class="button" type="danger" text bg @click="delAllCna">全部删除</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div class="card-body">
|
|
|
+ <el-table
|
|
|
+ height="460"
|
|
|
+ :data="productOrientationTableData"
|
|
|
+ style="width: 100%"
|
|
|
+ :header-row-style="changeKeyWordsTableHeader"
|
|
|
+ :header-cell-style="headerCellStyle">
|
|
|
+ <el-table-column prop="cna" label="分类 & 商品" width="300">
|
|
|
+ <template #default="scope">
|
|
|
+ <div v-if="scope.row.cna || scope.row.classification">
|
|
|
+ 分类: <span style="color: #000000">{{ scope.row.cna ? scope.row.cna : scope.row.classification }}</span>
|
|
|
+ </div>
|
|
|
+ <div v-if="scope.row.asin">
|
|
|
+ {{ scope.row.asin ? scope.row.asin : '--' }}
|
|
|
+ </div>
|
|
|
+ <div v-if="scope.row.brand">
|
|
|
+ 品牌: <span style="color: #000000">{{ scope.row.brand }}</span>
|
|
|
+ </div>
|
|
|
+ <div v-if="scope.row.low_price || scope.row.high_price">
|
|
|
+ 品牌价格:
|
|
|
+ <span style="color: #000000">
|
|
|
+ {{ scope.row.low_price ? '$' + scope.row.low_price : '--' }} -
|
|
|
+ {{ scope.row.high_price ? '$' + scope.row.high_price : '--' }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div v-if="scope.row.low_rating || scope.row.high_rating">
|
|
|
+ 评分: <span style="color: #000000">{{ scope.row.low_rating }} - {{ scope.row.high_rating }}</span>
|
|
|
+ </div>
|
|
|
+ <div v-if="scope.row.deliveryText">
|
|
|
+ 配送: <span style="color: #000000">{{ scope.row.deliveryText }}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="type" label="类型">
|
|
|
+ <template #default="scope">
|
|
|
+ {{ scope.row.productTypeText ? scope.row.productTypeText : '--' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="bid" label="竞价">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-input-number v-model="scope.row.bid" :min="0.02" :max="1000000" :controls="false" size="small" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="operate" label="操作" width="60" align="right">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button type="danger" text size="small" @click="delCna(scope.$index)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ <div style="display: flex; justify-content: space-around; margin-top: -8px">
|
|
|
+ <el-button type="primary" plain @click="productTagetSave">保存</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
|
|
|
-onMounted(() => {
|
|
|
- setTableData()
|
|
|
- getAdMix()
|
|
|
- // const myTest = route.query
|
|
|
- // console.log('myTest', myTest)
|
|
|
-})
|
|
|
+ <div
|
|
|
+ style="font-size: 20px; font-weight: bold; margin-top: 30px"
|
|
|
+ v-if="campaignRuleForm.type == 'AUTO' || (ruleForm.targetType == 'Goods' && campaignRuleForm.type === 'MANUAL')">
|
|
|
+ 否定商品
|
|
|
+ </div>
|
|
|
+ <hr v-if="campaignRuleForm.type == 'AUTO' || (ruleForm.targetType == 'Goods' && campaignRuleForm.type === 'MANUAL')" />
|
|
|
+ <el-form-item
|
|
|
+ prop="matchType"
|
|
|
+ style="width: 100%; margin-top: 20px"
|
|
|
+ v-if="campaignRuleForm.type == 'AUTO' || (ruleForm.targetType == 'Goods' && campaignRuleForm.type === 'MANUAL')">
|
|
|
+ <div style="width: 100%; height: 600px; display: flex; border: 1px solid #e5e7ec; border-radius: 6px" v-loading="negativeGoodsLoading">
|
|
|
+ <div style="width: 50%; border-right: 1px solid #e5e7ec">
|
|
|
+ <el-tabs v-model="negativeTabs" class="demo-tabs" @tab-click="handleNegGoodsTabs">
|
|
|
+ <el-tab-pane label="搜索" name="first">
|
|
|
+ <div style="margin-bottom: 10px">
|
|
|
+ <el-input placeholder="按ASIN搜索" v-model="negativeInput" @change="searchNegativeGoods" clearable />
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ height="495"
|
|
|
+ style="width: 100%"
|
|
|
+ v-loading="loading"
|
|
|
+ :data="negativeTableData"
|
|
|
+ :header-cell-style="headerCellStyle"
|
|
|
+ :show-header="false">
|
|
|
+ <el-table-column prop="asin" label="商品">
|
|
|
+ <template #default="scope">
|
|
|
+ <div style="display: flex; align-items: center">
|
|
|
+ <div style="margin-right: 8px; line-height: normal">
|
|
|
+ <el-image class="img-box" :src="scope.row.image_link" />
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-tooltip class="box-item" effect="dark" :content="scope.row.title" placement="top">
|
|
|
+ <div class="single-line">{{ scope.row.title ? scope.row.title : '--' }}</div>
|
|
|
+ </el-tooltip>
|
|
|
+ <span>
|
|
|
+ ASIN: <span class="data-color" style="margin-right: 8px">{{ scope.row.asin ? scope.row.asin : '--' }}</span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="Name" width="120" align="right">
|
|
|
+ <template #header> </template>
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button type="primary" size="small" @click="addSingleNegativeGoods(scope)" text>添加</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="输入" name="second">
|
|
|
+ <el-input
|
|
|
+ v-model="ruleForm.negativeGoodsTextarea"
|
|
|
+ :disabled="true"
|
|
|
+ :rows="17"
|
|
|
+ type="textarea"
|
|
|
+ maxlength="11000"
|
|
|
+ style="padding: 10px 10px" />
|
|
|
+ <div style="display: flex; flex-direction: row-reverse; margin-top: 10px">
|
|
|
+ <el-button
|
|
|
+ style="margin-right: 10px"
|
|
|
+ type="primary"
|
|
|
+ text
|
|
|
+ bg
|
|
|
+ :disabled="!ruleForm.negativeGoodsTextarea"
|
|
|
+ @click="addNegativeGoods"
|
|
|
+ >添加</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </div>
|
|
|
+ <div style="width: 50%">
|
|
|
+ <el-card class="box-card" shadow="never" style="border: none">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span style="font-weight: 550; font-size: 15px; color: #1f2128">已添加: {{ addedNegetiveTableData.length }}</span>
|
|
|
+ <el-button class="button" text bg @click="delAllNegativeGoods">全部删除</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div class="card-body"></div>
|
|
|
+ </el-card>
|
|
|
+ <div style="padding: 0 10px 0 10px; margin-top: -30px">
|
|
|
+ <el-table
|
|
|
+ :data="addedNegetiveTableData"
|
|
|
+ height="473"
|
|
|
+ style="width: 100%"
|
|
|
+ :header-cell-style="headerCellStyle"
|
|
|
+ @selection-change="handleAddedNegGoods">
|
|
|
+ <el-table-column prop="asin" label="商品">
|
|
|
+ <template #default="scope">
|
|
|
+ <div style="display: flex; align-items: center">
|
|
|
+ <div style="margin-right: 8px; line-height: normal">
|
|
|
+ <el-image class="img-box" :src="scope.row.image_link" />
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-tooltip class="box-item" effect="dark" :content="scope.row.title" placement="top">
|
|
|
+ <div class="single-line">{{ scope.row.title ? scope.row.title : '--' }}</div>
|
|
|
+ </el-tooltip>
|
|
|
+ <span
|
|
|
+ >ASIN:
|
|
|
+ <span class="data-color" style="margin-right: 8px">{{ scope.row.asin ? scope.row.asin : '--' }}</span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="120" align="right">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button type="primary" size="small" @click="delSingleNegativeGoods(scope)" text>删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <div style="display: flex; justify-content: space-around; padding-top: 10px">
|
|
|
+ <el-button plain type="primary" @click="negativeGoodsSave" :disabled="!addedNegetiveTableData.length">保存</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
|
|
|
-defineOptions({
|
|
|
- name: 'SpCreateCampaigns',
|
|
|
-})
|
|
|
-</script>
|
|
|
+ <!-- <br />
|
|
|
+ <el-form-item>
|
|
|
+ <el-button size="large" @click="resetForm(ruleFormRef)">取消</el-button>
|
|
|
+ <el-button size="large" type="primary" plain @click="submitForm(ruleFormRef)">保存</el-button>
|
|
|
+ </el-form-item> -->
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
:deep(.el-form--default.el-form--label-top .el-form-item .el-form-item__label) {
|