Explorar el Código

Merge branch 'master' into work-changeProject

朱鑫波 hace 4 años
padre
commit
f96ca72fa1

+ 23 - 0
src/views/modules/account-config/components/configuration-modal.less

@@ -81,6 +81,29 @@
                 margin-left: 40px !important;
             }
             .select-orientation-class {
+                // /deep/ .ant-select-selection--single .ant-select-selection__rendered {
+                //     display: flex;
+                //     justify-content: space-between;
+                // }
+                // /deep/ .ant-select-selection-selected-value {
+                //     clear: both;
+                //     width: 320px;
+                // }
+                .orient-list {
+                    display: flex;
+                    justify-content: space-between;
+                    width: 240px;
+                    .orient-option-left {
+                        float: left;
+                        // width: 150px;
+                        // white-space: nowrap;
+                        // overflow: hidden;
+                        // text-overflow: ellipsis;
+                    }
+                    .orient-option-right {
+                        float: right;
+                    }
+                }
                 .ant-form-item-label {
                     width: 200px;
                 }

+ 68 - 24
src/views/modules/account-config/components/configuration-modal.vue

@@ -74,7 +74,16 @@
                         @blur="handleAccountBudget"
                     /> 元
                 </a-form-model-item>
-                <div v-if="adBudgetShowTitle" style="width: 500px;color: #f00;margin-left: 140px;">单次修改预算幅度, 不能低于100.0元</div>
+                <!-- <a-form-model-item v-if="configForm.accountBudgetMode === '2'" label="账户日预算" prop="accountBudget">
+                    <a-input-number
+                        v-model="configForm.accountBudget"
+                        :min="1000"
+                        :max="9999999.99"
+                        :step="0.01"
+                        @blur="handleAccountBudget"
+                    /> 元
+                </a-form-model-item> -->
+                <!-- <div v-if="adBudgetShowTitle" style="width: 500px;color: #f00;margin-left: 140px;">单次修改预算幅度, 不能低于100.0元</div> -->
             </div>
             <div class="separate-module-con">
                 <p class="rock-title">广告组信息</p>
@@ -502,6 +511,7 @@
                         <a-form-model-item class="select-orientation-class" label="选择已有定向包" :prop="configForm.adDirectionalFlag === 'choice' ? 'adAudiencePackageId' : ''">
                             <a-select
                                 class="common-input-long"
+                                style="width: 320px;"
                                 v-model="configForm.adAudiencePackageId"
                                 allow-clear
                                 placeholder="请选择已有定向包名称"
@@ -513,7 +523,10 @@
                                     :key="index"
                                     :value="item.audience_package_id"
                                 >
-                                    {{ item.name }}
+                                    <div class="orient-list">
+                                        <span class="orient-option-left" style="display: inline-block;width: 150px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ item.name }}</span>
+                                        <span class="orient-option-right" style="display: inline-block;width: 150px;text-align:right;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ item.changeName }}</span>
+                                    </div>
                                 </a-select-option>
                             </a-select>
                             <span style="margin-left: 20px;">
@@ -1025,6 +1038,9 @@ export default {
                     callback();
                 }
             }
+            else if (this.modalTitle === 'add') {
+                callback();
+            }
         };
         return {
             sureLoading: false,
@@ -1146,7 +1162,7 @@ export default {
             listArr: [],
             regionCityListUrl: 'ctop/bytedanceAreaInfo/list',
             defaultAdBudget: '',
-            adBudgetShowTitle: false,
+            // adBudgetShowTitle: false,/
             adBudgetNum: 300,
             campaignStatus: false,
             detailData: {},
@@ -1162,6 +1178,44 @@ export default {
                 value: 'industryId',
                 children: 'children'
             },
+            promotionTypeList: [
+                {
+                    value: 'EXTERNAL',
+                    label: '落地页'
+                },
+                {
+                    value: 'ARTICLE',
+                    label: '文章推广'
+                },
+                {
+                    value: 'GOODS',
+                    label: '商品推广'
+                },
+                {
+                    value: 'DPA',
+                    label: '商品目录'
+                },
+                {
+                    value: 'STORE',
+                    label: '门店推广'
+                },
+                {
+                    value: 'AWEME',
+                    label: '抖音号推广'
+                },
+                {
+                    value: 'SHOP',
+                    label: '店铺直投'
+                },
+                {
+                    value: 'APP_ANDROID',
+                    label: '应用下载-安卓'
+                },
+                {
+                    value: 'APP_IOS',
+                    label: '应用下载-IOS'
+                }
+            ],
             ageArr: [
                 {
                     value: 'NONE',
@@ -1368,12 +1422,6 @@ export default {
             if (!this.configForm.accountId) {
                 return '请选择账户';
             }
-            else if (this.configForm.adDownloadType === 'DOWNLOAD_URL' && !this.platformLoadingType) {
-                return '请填写投放内容';
-            }
-            else if (this.configForm.adDownloadType === 'EXTERNAL_URL' && !this.configForm.adExternalUrl) {
-                return '请填写投放内容';
-            }
             else {
                 return 'able';
             }
@@ -1408,7 +1456,6 @@ export default {
                     promotionContent: this.configForm.adDownloadType
                 };
                 this.handleGetOptimizationObjective(paramsData);
-                this.handleGetAdAudiencePackage();
             }
         },
         NewAdPackage(newVal, oldVal) {
@@ -1426,11 +1473,6 @@ export default {
                 this.handleGetOptimizationObjective(paramsData);
             }
         },
-        platformLoadingType(newVal, oldVal) {
-            if (newVal && this.configForm.accountId) {
-                this.handleGetAdAudiencePackage();
-            }
-        },
         NewAountId(newVal, oldVal) {
             if (newVal && this.configForm.adPackage) {
                 const paramsData = {
@@ -1445,13 +1487,11 @@ export default {
                 };
                 this.handleGetOptimizationObjective(paramsData);
             }
-            if (newVal && this.platformLoadingType) {
-                this.handleGetAdAudiencePackage();
-            }
             if (newVal) {
                 this.handleGetCreativeClassification();
                 this.handleGetAdvertiserStrategy();
                 this.handleDirectionalList();
+                this.handleGetAdAudiencePackage()
             }
             else {
                 this.createOptions = [];
@@ -1671,13 +1711,20 @@ export default {
         },
         handleGetAdAudiencePackage() {
             const params = {
-                accountId: this.configForm.accountId,
-                landingType: this.configForm.adDownloadType === 'DOWNLOAD_URL' ? this.platformLoadingType : 'EXTERNAL'
+                accountId: this.configForm.accountId
             };
             getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdAudiencePackage', params)
                 .then(result => {
                     if (result.code === 0) {
-                        this.selectiveList = result.result || [];
+                        const defaultList = result.result;
+                        this.promotionTypeList.forEach(item => {
+                            defaultList.forEach(val => {
+                                if (item.landing_type === val.value) {
+                                    val.changeName = item.label;
+                                }
+                            });
+                        });
+                        this.selectiveList = defaultList;
                     }
                     else {
                         this.$message.error(result.message);
@@ -2391,9 +2438,6 @@ export default {
         },
         handleRelaxSure() {
             let paramsFormData = this.configForm;
-            if (this.adBudgetShowTitle) {
-                return;
-            }
             if (this.configForm.adDistrict === 'CITY') {
                 if (!this.configForm.adSelectCity.length) {
                     this.$message.error('请选择省市');