朱鑫波 4 years ago
parent
commit
7ccd4ef62c

+ 33 - 3
src/views/modules/advertiser/modules/projectListModal.vue

@@ -89,7 +89,10 @@
               label="转化目标"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
-              v-show="getFormFieldValue('bidType').findIndex((item) => item == 10)>-1 || getFormFieldValue('bidType').findIndex((item) => item == 6)>-1"
+              v-show="
+                getFormFieldValue('bidType').findIndex((item) => item == 10) > -1 ||
+                getFormFieldValue('bidType').findIndex((item) => item == 6) > -1
+              "
             >
               <a-select v-model="model.ocpxActionType" mode="multiple">
                 <a-select-option :value="2">行为数</a-select-option>
@@ -107,7 +110,34 @@
             </a-form-item>
           </div>
         </div>
-
+        <!-- <div v-else>
+          <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优化目标">
+            <a-select v-decorator="['bidType', { initialValue: 2 }]" mode="multiple">
+              <a-select-option :value="2">点击数</a-select-option>
+              <a-select-option :value="10">OCPM</a-select-option>
+              <a-select-option :value="6">OCPC</a-select-option>
+            </a-select>
+          </a-form-item>
+          <div v-if="Array.isArray(getFormFieldValue('bidType'))">
+            <a-form-item
+              label="转化目标"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              v-show="
+                getFormFieldValue('bidType').findIndex((item) => item == 10) > -1 ||
+                getFormFieldValue('bidType').findIndex((item) => item == 6) > -1
+              "
+            >
+              <a-select v-model="model.ocpxActionType" mode="multiple">
+                <a-select-option value="AD_CONVERT_TYPE_ACTIVE_REGISTER">注册</a-select-option>
+                <a-select-option value="AD_CONVERT_TYPE_NEXT_DAY_OPEN">次留</a-select-option>
+                <a-select-option value="AD_CONVERT_TYPE_LT_ROI">广告变现ROI</a-select-option>
+                <a-select-option value="AD_CONVERT_TYPE_PURCHASE_ROI">付费ROI</a-select-option>
+                <a-select-option value="AD_CONVERT_TYPE_GAME_ADDICTION">关键行为</a-select-option>
+              </a-select>
+            </a-form-item>
+          </div>
+        </div> -->
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售">
           <a-select
             showSearch
@@ -330,7 +360,7 @@ export default {
               'supplierCode',
               // 'advertiserType',
               'saleId',
-              'bidType',
+              'bidType'
             )
           )
         } else {

+ 22 - 6
src/views/modules/kuaishouapp/account/stepForm/Step3.vue

@@ -447,7 +447,10 @@ li.chouzhen.first:before {
               mode="tags"
               style="width: 100%"
               placeholder="按回车生成标签"
-              v-decorator="['creativeTag']"
+              v-decorator="[
+                'creativeTag',
+                { rules: [{ required: true, message: '标签必选' }, { validator: creativeTagValid }] },
+              ]"
               dropdownClassName="display-none-selset"
               :token-separators="[',', ' ', ',']"
             >
@@ -1217,11 +1220,15 @@ export default {
         getAction('/tag/kuaiShouCreativeTagCollection/list', params).then((res) => {
           if (res.success) {
             console.log(res.result)
-            this.form.setFieldsValue({
-              creativeTag: JSON.parse(res.result.records[0].tagArray).map((item) => {
-                return item
-              }),
+            this.$nextTick(() => {
+              this.form.setFieldsValue({
+                creativeTag: JSON.parse(res.result.records[0].tagArray).map((item) => {
+                  return item
+                }),
+              })
+              this.form.validateFields(['creativeTag'])
             })
+
             this.creativeTagVisible = false
           } else {
             this.$message.error('选择出错,请稍后选择或自行手填')
@@ -1378,6 +1385,13 @@ export default {
         callback('链接不能为空且开头为http://或https://,并且长度小于10000')
       }
     },
+    creativeTagValid(rule, value, callback) {
+      if (value.length > 10) {
+        callback('创意标签最多填写10个,请删减')
+      } else {
+        callback()
+      }
+    },
     showData(item, type) {
       var index = this.pans.findIndex((item) => item.key === this.pansKey)
       // this.pans[index].list[item.key].imageList = []
@@ -1646,7 +1660,9 @@ export default {
           // var params = {
           params.dataJson = allJson.concat(dataAd)
           // ...values,
-          params.creativeCategory = params.creativeCategory ? params.creativeCategory.pop() : null
+          params.creativeCategory = params.creativeCategory
+            ? params.creativeCategory[params.creativeCategory.length - 1]
+            : null
           params.unitId = this.pansKey
           params.accountId = localStorage.getItem('accountId')
           params.content = this.content

+ 12 - 2
src/views/modules/kuaishouapp/account/stepForm/Step4.vue

@@ -394,7 +394,7 @@ li.chouzhen.first:before {
               mode="tags"
               style="width: 100%"
               placeholder="按回车生成标签"
-              v-decorator="['creativeTag']"
+              v-decorator="['creativeTag',{ rules: [{ required: true, message: '标签必选' }, { validator: creativeTagValid }] }]"
               dropdownClassName="display-none-selset"
               :token-separators="[',',' ',',']"
             >
@@ -1323,6 +1323,13 @@ export default {
       //   }
       // })
     },
+    creativeTagValid(rule, value, callback) {
+      if (value.length > 10) {
+        callback('创意标签最多填写10个,请删减')
+      } else {
+        callback()
+      }
+    },
     okTag() {
       var data = this.$refs.tree.getCheckedKeys()
       if (data.length > 1) {
@@ -1344,6 +1351,7 @@ export default {
                 return item
               }),
             })
+            this.form.validateFields(['creativeTag'])
             this.creativeTagVisible = false
           } else {
             this.$message.error('选择出错,请稍后选择或自行手填')
@@ -1690,7 +1698,9 @@ export default {
           var params = {
             // dataJson: allJson,
             ...values,
-            creativeCategory: values.creativeCategory ? values.creativeCategory.pop() : null,
+            creativeCategory: values.creativeCategory
+              ? values.creativeCategory[values.creativeCategory.length - 1]
+              : null,
             unitId: this.pansKey,
             accountId: localStorage.getItem('accountId'),
             content: this.content,

+ 1 - 1
vue.config.js

@@ -68,7 +68,7 @@ module.exports = {
     open : true,
     proxy: {
       '/jeecg-boot': {
-         target: 'http://192.168.1.8:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
+        //  target: 'http://192.168.1.8:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.0.59:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.1.188:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云