Kaynağa Gözat

master 账户配置 修复BUG

jiayufei 4 yıl önce
ebeveyn
işleme
fe8889aad1

+ 8 - 0
src/views/modules/account-config/account-config.vue

@@ -201,6 +201,14 @@ export default {
                 paramsData.append('id', defaultList.id);
             }
             else if (type === 'budget') {
+                if (Number(defaultList.budget) >= record.adBudget && Number(defaultList.budget) < (record.adBudget + 100)) {
+                    this.$message.error('单次修改预算幅度, 不能低于100.0元');
+                    return;
+                }
+                if (Number(defaultList.budget) <= record.adBudget && Number(defaultList.budget) > (record.adBudget - 100)) {
+                    this.$message.error('单次修改预算幅度, 不能低于100.0元');
+                    return;
+                }
                 record.show = false;
                 this.budgetContent = '';
                 paramsData.append('accountId', defaultList.accountId);

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

@@ -141,6 +141,14 @@
                 margin-left: 10px;
                 margin-right: 15px;
             }
+            .especial-label {
+                position: absolute;
+                left: -80px;
+                color: #f00;
+            }
+            .budget-mode-label {
+                left: -50px;
+            }
             .adver-position-radio {
                 margin-left: 140px;
                 .creative-label-content {

+ 28 - 3
src/views/modules/account-config/components/configuration-modal.vue

@@ -56,6 +56,7 @@
                         :min="1000"
                         :max="9999999.99"
                         :step="0.01"
+                        @blur="handleAccountBudget"
                     /> 元
                 </a-form-model-item>
             </div>
@@ -369,8 +370,11 @@
                             v-model="configForm.adBudget"
                             :min="adBudgetNum"
                             :step="0.01"
+                            @blur="handleAdBudgetBlur"
                         />
                     </a-input-group>
+                    <div v-if="adBudgetShowTitle" style="width: 500px;color: #f00;">单次修改预算幅度, 不能低于100.0元</div>
+                    <span class="especial-label budget-mode-label">*</span>
                 </a-form-model-item>
                 <a-form-model-item label="投放时间">
                     <a-radio-group v-model="configForm.adScheduleType" button-style="solid" @change="handleAdScheduleType">
@@ -464,6 +468,7 @@
                             <div class="ant-upload-text">Upload</div>
                         </div>
                     </a-upload>
+                    <span class="especial-label">*</span>
                 </a-form-model-item>
                 <a-form-model-item label="卡片标题" prop="creativeProductDescription">
                     <a-input
@@ -477,6 +482,7 @@
                     <a-button type="primary" @click="handleAddOrigin">
                         <a-icon type="plus" />推广卖点
                     </a-button>
+                    <span class="especial-label">*</span>
                 </a-form-model-item>
                 <div class="adver-position-radio">
                     <a-form-model-item
@@ -540,6 +546,7 @@
                         @change="handleEnterChang"
                     >
                     </a-select>
+                    <span class="especial-label">*</span>
                 </a-form-model-item>
                 <div class="adver-position-radio">
                     <div class="creative-label-content">
@@ -615,6 +622,8 @@ export default {
             this.handleExportRules(value, 4, 20, callback);
         };
         return {
+            defaultAdBudget: '',
+            adBudgetShowTitle: false,
             adBudgetNum: 0,
             campaignStatus: false,
             detailData: {},
@@ -830,6 +839,21 @@ export default {
     methods: {
         ...mapGetters(['nickname', 'avatar', 'userInfo']),
         moment,
+        handleAdBudgetBlur(e) {
+            const adBudgetInput = e.target.value;
+            if (Number(adBudgetInput) >= Number(this.defaultAdBudget) && Number(adBudgetInput) < (Number(this.defaultAdBudget) + 100)) {
+                this.adBudgetShowTitle = true;
+            }
+            else if (Number(adBudgetInput) <= Number(this.defaultAdBudget) && Number(adBudgetInput) > (Number(this.defaultAdBudget) - 100)) {
+                this.adBudgetShowTitle = true;
+            }
+            else {
+                this.adBudgetShowTitle = false;
+            }
+        },
+        handleAccountBudget(e) {
+            this.configForm.accountBudget = Number(e.target.value).toFixed(2);
+        },
         handleExportRules(value, min, max, callback) {
             let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
             let length = 0;
@@ -970,6 +994,7 @@ export default {
                         this.configForm.adSmartBidType = detailData.adSmartBidType;
                         this.configForm.adBudgetMode = detailData.adBudgetMode;
                         this.configForm.adBudget = detailData.adBudget;
+                        this.defaultAdBudget = detailData.adBudget;
                         this.configForm.adScheduleType = detailData.adScheduleType;
                         this.configForm.launchDateRange[0] = detailData.adStartTime;
                         this.configForm.launchDateRange[1] = detailData.adEndTime;
@@ -1192,10 +1217,10 @@ export default {
             reader.readAsDataURL(img);
         },
         beforeUpload(info) {
-            const isZip = info.type.includes('gif');
+            const isZip = info.type.includes('png') || info.type.includes('jpg');
             const fileOvesize = info.size > (1024 * 1024);
-            if (isZip) {
-                this.$message.error('不支持上传gif');
+            if (!isZip) {
+                this.$message.error('请上传正确类型的图片');
                 return;
             }
             if (fileOvesize) {

+ 2 - 7
src/views/modules/creative-copywrit/creative-copywrit.vue

@@ -313,7 +313,7 @@
             <a-form layout="inline" :selfUpdate="true">
                 <a-row :gutter="24">
                     <a-col :md="8" :sm="8">
-                        <selectTable :projectId.sync="queryParam.projectId" :type="taobaoSpecialOfferTitle"></selectTable>
+                        <selectTable :projectId.sync="queryParam.projectId"></selectTable>
                     </a-col>
                     <a-col :md="8" :sm="8">
                         <a-form-item label="素材名称">
@@ -3039,12 +3039,7 @@ export default {
             }).then(res => {
                 if (res.code == 0) {
                     let defaultData = res.result.records;
-                    if (this.taobaoSpecialOfferTitle === 'taobao') {
-                        this.dataElse = defaultData.filter(item => item.productId === 1410280);
-                    }
-                    else {
-                        this.dataElse = defaultData;
-                    }
+                    this.dataElse = defaultData;
                 }
             });
         },

+ 2 - 2
vue.config.js

@@ -69,7 +69,7 @@ module.exports = {
     proxy: {
       '/jeecg-boot': {
           // target: 'http://192.168.1.8:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
-          target: 'http://192.168.1.3:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
+          // target: 'http://192.168.1.3:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.0.59:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.1.62:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
@@ -80,7 +80,7 @@ module.exports = {
         // target: 'http://192.168.1.219:8080', //请求本地 需要jeecg-boot后台项目  赵西安
         // target: 'http://192.168.1.193:8080', //请求本地 需要jeecg-boot后台项目  李煜一
         // target: 'http://192.168.1.193:31012', //请求本地 需要jeecg-boot后台项目  李煜一
-        //  target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
+         target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目
         //  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目