朱鑫波 %!s(int64=4) %!d(string=hai) anos
pai
achega
1172487506

+ 27 - 3
src/views/modules/advertiser/ProjectList.vue

@@ -123,11 +123,22 @@
         <span slot="maxBid" slot-scope="text">{{ text / 1000 }}</span>
         <span slot="maxDeepCpaBid" slot-scope="text">{{ text / 1000 }}</span>
         <span slot="ocpxActionType" slot-scope="text">
-          {{ text | ocpxActionType }}
+          <div v-if="text">
+            <span v-for="(item, index) of JSON.parse(text)" :key="index"
+              >{{ item | ocpxActionType }}{{ index == JSON.parse(text).length - 1 ? '' : ',' }}</span
+            >
+          </div>
+          <div v-else>-</div>
+
+          <!-- {{ text | ocpxActionType }} -->
         </span>
         <span slot="bidType" slot-scope="text">
           {{ text | bidType }}
         </span>
+        <span slot="mediaId" slot-scope="text">
+          {{ text == '1' || text == '3' ? '头条' : '快手' }}
+        </span>
+
         <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)">编辑</a>
 
@@ -227,6 +238,14 @@ export default {
           dataIndex: 'designResponsibleId_dictText',
         },
         {
+          title: '媒体',
+          align: 'center',
+          dataIndex: 'mediaId',
+          scopedSlots: {
+            customRender: 'mediaId',
+          },
+        },
+        {
           title: '操作',
           dataIndex: 'action',
           align: 'center',
@@ -267,6 +286,13 @@ export default {
         31: '下载完成',
         53: '提交线索',
         180: '激活',
+        190: '付费',
+        191:'首日ROI',
+        348:'有效线索',
+        383:'授信',
+        384:'完件',
+        394:'订单提交',
+
       }
       return data[sta]
     },
@@ -282,11 +308,9 @@ export default {
       // params.userId = this.userInfo().id
       params.pageSize = 1000
       params.pageNo = 1
-      console.log(params)
       getAction('/ctop/advertiser/list', params)
         .then((res) => {
           if (res.success) {
-            console.log(res)
             this.list = res.result.records
           } else {
             this.$message.warning(res.message)

+ 47 - 42
src/views/modules/advertiser/modules/projectListModal.vue

@@ -79,33 +79,34 @@
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="最高转化出价">
           <a-input placeholder="最高转化出价" v-decorator="['maxDeepCpaBid']" addonAfter="元" />
         </a-form-item>
+        <div v-if="showDian">
+          <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优化目标">
+            <a-radio-group buttonStyle="solid" v-decorator="['bidType', { initialValue: 2 }]">
+              <a-radio-button :value="2">点击数</a-radio-button>
+              <a-radio-button :value="10">转化数</a-radio-button>
+            </a-radio-group>
+          </a-form-item>
+          <a-form-item
+            label="转化目标"
+            :labelCol="labelCol"
+            :wrapperCol="wrapperCol"
+            v-show="getFormFieldValue('bidType') == 10"
+          >
+            <a-select v-decorator="['ocpxActionType', { initialValue: 2 }]" mode="multiple">
+              <a-select-option :value="2">行为数</a-select-option>
+              <a-select-option :value="180">激活</a-select-option>
+              <a-select-option :value="53">表单提交</a-select-option>
 
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优化目标">
-          <a-radio-group buttonStyle="solid" v-decorator="['bidType', { initialValue: 2 }]">
-            <a-radio-button :value="2">点击数</a-radio-button>
-            <a-radio-button :value="10">转化数</a-radio-button>
-          </a-radio-group>
-        </a-form-item>
-        <a-form-item
-          label="转化目标"
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          v-show="getFormFieldValue('bidType') == 10"
-        >
-          <a-select v-decorator="['ocpxActionType', { initialValue: 2 }]">
-            <a-select-option :value="2">行为数</a-select-option>
-            <a-select-option :value="180">激活</a-select-option>
-            <a-select-option :value="53">表单提交</a-select-option>
-
-            <a-select-option :value="394">订单提交</a-select-option>
-            <a-select-option :value="348">使用有效线索</a-select-option>
-            <a-select-option :value="383">授信出价</a-select-option>
-            <a-select-option :value="384">完件出价</a-select-option>
-            <a-select-option :value="190">付费出价</a-select-option>
-            <a-select-option :value="191">首日ROI</a-select-option>
-            <a-select-option :value="396">注册优化目标</a-select-option>
-          </a-select>
-        </a-form-item>
+              <a-select-option :value="394">订单提交</a-select-option>
+              <a-select-option :value="348">使用有效线索</a-select-option>
+              <a-select-option :value="383">授信出价</a-select-option>
+              <a-select-option :value="384">完件出价</a-select-option>
+              <a-select-option :value="190">付费出价</a-select-option>
+              <a-select-option :value="191">首日ROI</a-select-option>
+              <a-select-option :value="396">注册优化目标</a-select-option>
+            </a-select>
+          </a-form-item>
+        </div>
 
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售">
           <a-select
@@ -217,6 +218,7 @@ export default {
       optionsElse: [],
       supplierList: [],
       editAll: false,
+      showDian: true,
     }
   },
   created() {
@@ -235,7 +237,6 @@ export default {
       console.log(`checked = ${e.target.value}`)
     },
     handleChange(value) {
-      console.log(value)
       getAction('/ctop/product/list', { advertiserId: value, pageSize: 1000 }).then((res) => {
         if (res.success) {
           this.listProduct = res.result.records
@@ -243,10 +244,8 @@ export default {
       })
     },
     handleBlur() {
-      console.log('blur')
     },
     handleFocus() {
-      console.log('focus')
     },
     filterOption(input, option) {
       return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
@@ -256,11 +255,9 @@ export default {
       // params.userId = this.userInfo().id
       params.pageSize = 1000
       params.pageNo = 1
-      console.log(params)
       getAction(this.url.getList, params)
         .then((res) => {
           if (res.success) {
-            console.log(res)
             this.list = res.result.records
           } else {
             this.$message.warning(res.message)
@@ -297,18 +294,27 @@ export default {
           }
         })
       }
-      var params = { ...record }
+      // else if (this.request == '2,4') {
+      //         params.type = 'kuaishou'
+      //       }
+      if (record.mediaId == '2' || record.mediaId == '4') {
+        var params = { ...record }
+        this.showDian = true
+      } else {
+        var { ocpxActionType, bidType, ...params } = record
+        this.showDian = false
+      }
 
-      console.log(record)
       this.form.resetFields()
       this.model = Object.assign({}, params)
       this.model.maxBid = this.model.maxBid ? this.model.maxBid / 1000 : 0
       this.model.maxDeepCpaBid = this.model.maxDeepCpaBid ? this.model.maxDeepCpaBid / 1000 : 0
-      this.model.bidType = this.model.bidType == null ? 2 : this.model.bidType
-      this.model.ocpxActionType = this.model.ocpxActionType == null ? 2 : this.model.ocpxActionType
+      if (record.mediaId == '2' || record.mediaId == '4') {
+        this.model.bidType = this.model.bidType == null ? 2 : this.model.bidType
+        this.model.ocpxActionType = this.model.ocpxActionType == null ? [2] : JSON.parse(this.model.ocpxActionType)
+      }
       this.visible = true
       this.$nextTick(() => {
-        console.log(this.model)
         if (record.advertiserId) {
           this.form.setFieldsValue(
             pick(
@@ -357,13 +363,12 @@ export default {
         // this.resId = record.responsibleId
         // this.shejiId = record.designResponsibleId
         getAction('/sys/user/getAllUserListV1', '').then((res) => {
-          console.log(res)
+
           if (res.success) {
             this.options = res.result
           }
         })
         getAction('/sys/user/getAllSaleList', '').then((res) => {
-          console.log(res)
           if (res.success) {
             this.optionsElse = res.result
           }
@@ -380,7 +385,7 @@ export default {
       // 触发表单验证
       this.form.validateFields((err, values) => {
         if (!err) {
-          that.confirmLoading = true
+          // that.confirmLoading = true
           let httpurl = ''
           let method = ''
           if (!this.model.id) {
@@ -401,8 +406,9 @@ export default {
           formData.responsibleId = values.responsibleId
           formData.designResponsibleId = values.designResponsibleId
           formData.userId = formData.userId ? formData.userId : that.userInfo().id
-          formData.ocpxActionType = formData.bidType == 2 ? 0 : formData.ocpxActionType
-          console.log(formData)
+          if (this.showDian) {
+            formData.ocpxActionType = formData.bidType == 2 ? JSON.stringify([0]) : JSON.stringify(formData.ocpxActionType)
+          }
           httpAction(httpurl, formData, method)
             .then((res) => {
               if (res.success) {
@@ -427,7 +433,6 @@ export default {
       return this.form.getFieldValue(field)
     },
     get(valueName, key) {
-      console.log(valueName, key)
       this.resId = key
     },
   },