Browse Source

账户配置修复

jiayufei 4 years ago
parent
commit
24737769a2

+ 11 - 3
src/views/modules/account-config/account-config.vue

@@ -212,16 +212,24 @@ export default {
         };
         let adMaxBidValidator = (rule, value, callback) => {
             const finallyResult = Number(this.configForm.adMinBid);
-            if (finallyResult !== undefined && value && Number(value) > finallyResult) {
+            if (finallyResult && value && Number(value) < finallyResult) {
+                callback('最高出价不能低于最低出价');
+            }
+            else if (Number(this.updateModTxt.accountBudget) < Number(value)) {
+                callback('出价不能大于预算');
+            }
+            else if (Number(this.configForm.adMaxBid) > Number(this.configForm.adMinBid) + Number(this.configForm.adStepBid)) {
+                this.$refs['ruleForm'].clearValidate(['adStepBid']);
                 callback();
             }
             else {
-                callback('最高出价不能低于最低出价');
+                this.$refs['ruleForm'].clearValidate(['adMinBid']);
+                callback();
             }
         };
         let floatingIntervalValidator = (rule, value, callback) => {
             const finallyResult = Number(this.configForm.adMinBid) + Number(value);
-            if (finallyResult !== undefined < Number(this.configForm.adMaxBid)) {
+            if (finallyResult < Number(this.configForm.adMaxBid)) {
                 callback();
             }
             else {

+ 27 - 22
src/views/modules/account-config/components/configuration-modal.vue

@@ -1269,28 +1269,33 @@ export default {
         ...mapGetters(['nickname', 'avatar', 'userInfo']),
         moment,
         handleSelectPackageTabs(e) {
-            if (e === '1') {
-                this.configForm.adAudiencePackageId = undefined;
-                this.packageMessageDetail = [];
-            }
-            else if (e === '2') {
-                this.configForm.adDistrict = 'NONE';
-                this.listArr = [];
-                this.configForm.adLocationType = 'HOME';
-                this.configForm.adGender = 'NONE';
-                this.configForm.adSelectAge = ['NONE'];
-                this.configForm.customPerson = 'NONE';
-                this.configForm.updateGetingInclude = [];
-                this.configForm.adRetargetingTagsInclude = '';
-                this.configForm.adRetargetingTagsExclude = '';
-                this.configForm.updateGetingExclude = [];
-                this.configForm.adRetargetingTagsType = '';
-                // this.configForm.adPlatform = 'NONE';
-                this.configForm.adDeviceSelectType = ['NONE'];
-                this.configForm.adAndroidVersion = 'NONE';
-                this.configForm.adSelectAc = ['NONE'];
-                this.configForm.adHideIfExists = '0';
-                this.configForm.adAutoExtendEnabled = '0';
+            if (this.modalTitle === 'add') {
+                if (e === '1') {
+                    this.configForm.adAudiencePackageId = undefined;
+                    this.packageMessageDetail = [];
+                }
+                else if (e === '2') {
+                    this.configForm.adDistrict = 'NONE';
+                    this.listArr = [];
+                    this.configForm.adLocationType = 'HOME';
+                    this.configForm.adGender = 'NONE';
+                    this.configForm.adSelectAge = ['NONE'];
+                    this.configForm.customPerson = 'NONE';
+                    this.configForm.updateGetingInclude = [];
+                    this.configForm.adRetargetingTagsInclude = '';
+                    this.configForm.adRetargetingTagsExclude = '';
+                    this.configForm.updateGetingExclude = [];
+                    this.configForm.adRetargetingTagsType = '';
+                    if (!this.platformLoadingType) {
+                        this.configForm.adPlatform = 'NONE';
+                        this.platformLoadingType = '';
+                    }
+                    this.configForm.adDeviceSelectType = ['NONE'];
+                    this.configForm.adAndroidVersion = 'NONE';
+                    this.configForm.adSelectAc = ['NONE'];
+                    this.configForm.adHideIfExists = '0';
+                    this.configForm.adAutoExtendEnabled = '0';
+                }
             }
         },
         handleCustomPerson(e) {

+ 21 - 1
src/views/modules/creative-copywrit/creative-copywrit.vue

@@ -1523,11 +1523,12 @@
             <div>
                 <div class="acount-title">
                     <div class="acount-title-left">素材名称</div>
-                    <div class="acount-title-right">
+                    <div class="acount-title-right" :style="accountMaster">
                         <div class="only-title-mater" v-for="item in modalShowBatchList" :key="item.id">
                             {{ item.materialName }}
                         </div>
                     </div>
+                    <a-icon :type="materTitltStatus ? 'up' : 'down'" style="margin-top: 5px;margin-left: 15px;" @click="handleMaterTitleClick"/>
                 </div>
                 <div class="acount-title push-plate">
                     <div class="acount-title-left">创意标题</div>
@@ -1603,6 +1604,11 @@ export default {
     },
     data() {
         return {
+            materTitltStatus: false,
+            accountMaster: {
+                height: '35px',
+                overflow: 'hidden'
+            },
             batchVisible: false,
             showTabsTitle: '',
             taobaoSpecialOfferTitle: 'taobao',
@@ -1927,6 +1933,20 @@ export default {
     },
     methods: {
         ...mapGetters(['nickname', 'avatar', 'userInfo']),
+        handleMaterTitleClick() {
+            this.materTitltStatus = !this.materTitltStatus;
+            if (this.materTitltStatus) {
+                this.accountMaster = {
+                    height: 'auto'
+                };
+            }
+            else {
+                this.accountMaster = {
+                    height: '35px',
+                    overflow: 'hidden'
+                };
+            }
+        },
         handleApprovedClick() {
             const batchList = [];
             this.defaultFormList = [];