Prechádzať zdrojové kódy

广告主信息管理

liubei@c-top.com.cn 3 rokov pred
rodič
commit
6e925b3a70

+ 25 - 10
src/views/modules/advertiser/ProjectList.vue

@@ -90,7 +90,7 @@
           <a-col :md="6" :sm="8">
             <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
-              <a-button type="primary" @click="queryParam={};queryParam.userId=userInfo().id;searchQuery()" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
               <!-- <a @click="handleToggleSearch" style="margin-left: 8px">
                 {{ toggleSearchStatus ? '收起' : '展开' }}
                 <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
@@ -120,12 +120,22 @@
         :loading="loading"
         @change="handleTableChange"
       >
-        <span slot="maxBid" slot-scope="text">{{ text / 1000 }}</span>
+        <span slot="maxBid" slot-scope="text,record">{{ record.maxBid == 0? '-': record.maxBid / 1000 }}</span>
         <span slot="maxDeepCpaBid" slot-scope="text">{{ text / 1000 }}</span>
-        <span slot="ocpxActionType" slot-scope="text">
-          <div v-if="text">
-            <span v-for="(item, index) of JSON.parse(text)" :key="index"
-              >{{ item | ocpxActionType }}{{ index == JSON.parse(text).length - 1 ? '' : ',' }}</span
+        <span slot="ocpxActionType" slot-scope="text,record">
+          <div v-if="!!record.ocpxActionTypeArray&&record.ocpxActionTypeArray.length>0">
+            <span v-for="(item, index)  in record.ocpxActionTypeArray" :key="index"
+              >{{item.ocpxName}}({{(item.maxValue / 1000).toFixed(2)}})<br></span
+            >
+          </div>
+          <div v-else>-</div>
+
+          <!-- {{ text | ocpxActionType }} -->
+        </span>
+        <span slot="deepConversionType" slot-scope="text,record">
+          <div v-if="!!record.deepConversionTypeArray&&record.deepConversionTypeArray.length != 0">
+            <span v-for="(item, index)  in record.deepConversionTypeArray" :key="index"
+              >{{item.deepName}}({{(item.deepValue / 1000).toFixed(2)}})<br></span
             >
           </div>
           <div v-else>-</div>
@@ -219,7 +229,7 @@ export default {
           },
         },
         {
-          title: '转化目标',
+          title: '转化目标(出价/元)',
           align: 'center',
           dataIndex: 'ocpxActionType',
           scopedSlots: {
@@ -227,6 +237,14 @@ export default {
           },
         },
         {
+          title: '深度转化目标(出价)',
+          align: 'center',
+          dataIndex: 'deepConversionType',
+          scopedSlots: {
+            customRender: 'deepConversionType',
+          },
+        },
+        {
           title: '供应商',
           align: 'center',
           dataIndex: 'supplierCode_dictText',
@@ -301,9 +319,6 @@ export default {
       return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
     },
   },
-  created() {
-    this.queryParam.userId = this.userInfo().id
-  },
   methods: {
     onChange(text,record) {
       this.spinning=true;

+ 245 - 16
src/views/modules/advertiser/modules/ProjectModal.vue

@@ -30,7 +30,7 @@
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
           label="供应商"
-          v-if="model.mediaId == '2' || model.mediaId == '4'"
+          v-show="model.mediaId == '2' || model.mediaId == '4'"
         >
           <a-select
             optionFilterProp="children"
@@ -70,15 +70,16 @@
             </a-select-option>
           </a-select>
         </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="最高出价">
+        <a-form-item  v-if="model.mediaId == '1' || model.mediaId == '3' || maxBidShow" :labelCol="labelCol" :wrapperCol="wrapperCol" label="最高出价">
           <a-input placeholder="请输入最高出价" v-decorator="['maxBid', validatorRules.maxBid]" addonAfter="元" />
         </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="最高转化出价">
+        <a-form-item  v-if="model.mediaId == '1' || model.mediaId == '3'" :labelCol="labelCol" :wrapperCol="wrapperCol" label="最高转化出价">
           <a-input placeholder="最高转化出价" v-decorator="['maxDeepCpaBid']" addonAfter="元" />
         </a-form-item>
-        <div v-if="model.mediaId == '2' || model.mediaId == '4'">
+        <div v-show="model.mediaId == '2' || model.mediaId == '4'">
           <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优化目标">
             <a-select
+            @change="bidTypeChange($event)"
               v-decorator="['bidType', { rules: [{ required: true, message: '请选择优化目标' }], initialValue: 2 }]"
               mode="multiple"
             >
@@ -101,9 +102,10 @@
             >
               <!-- v-model="model.ocpxActionType" -->
               <a-select
+              @change="ocpxActionTypeChange($event)"
                 v-decorator="[
                   'ocpxActionType',
-                  { rules: [{ required: true, message: '请选择转化目标' }], initialValue: 2 },
+                  { rules: [{ required: true, message: '请选择转化目标' }] },
                 ]"
                 mode="multiple"
               >
@@ -113,7 +115,49 @@
                 }}</a-select-option>
               </a-select>
             </a-form-item>
+
+            <div v-if="Array.isArray(getFormFieldValue('ocpxActionType'))">
+              <a-form-item v-show="getFormFieldValue('ocpxActionType').length > 0"  :labelCol="labelCol" :wrapperCol="wrapperCol" v-for="(item, index) in ocpxActionTypeArray" :key="index" :label="item.ocpxName+'最高价'">
+             <a-input  @input="maxValueInput"  @keyup.native="item.maxValue = item.maxValue.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');"  placeholder="请输入最高出价" v-model="item.maxValue" addonAfter="元" />
+           </a-form-item>
+         </div>
+
+            <div v-if="Array.isArray(getFormFieldValue('ocpxActionType'))">
+              <a-form-item
+            label="深度转化目标"
+            :labelCol="labelCol"
+            :wrapperCol="wrapperCol"
+           
+          >
+            <!-- v-model="model.ocpxActionType" -->
+            <a-select
+            @change="depthChange($event)"
+            v-model="model.deepConversionType"
+              
+              mode="multiple"
+            >
+              <a-select-option :value="item.deepCode" v-for="(item, index) in depthList" :key="index">{{
+                item.deepName
+              }}</a-select-option>
+            </a-select>
+          </a-form-item>
+            </div>
+
+            <div v-if="model.deepConversionType">
+              <a-form-item v-show="model.deepConversionType.length >0"  :labelCol="labelCol" :wrapperCol="wrapperCol" v-for="(item, index) in depthArray" :key="index" :label="item.deepName+'最高价'">
+             <a-input placeholder="请输入最高出价"  @input="deepInput"  @keyup.native="item.deepValue = item.deepValue.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');" v-model="item.deepValue" addonAfter="元" />
+           </a-form-item>
+         </div>
+           
+
           </div>
+          
+          
+          
+          
+            
+         
+         
         </div>
 
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售">
@@ -220,6 +264,18 @@ export default {
       },
       list: [],
       listProduct: [],
+      depthList:[
+        {
+          deepCode:3,
+          deepName:'付费(深度)'
+        },{
+          deepCode:7,
+          deepName:'次日留存'
+        },{
+          deepCode:92,
+          deepName:'付费roi'
+        },
+      ],
       resId: '',
       shejiId: '',
       options: [],
@@ -227,12 +283,71 @@ export default {
       supplierList: [],
       editAll: false,
       ocpxList: [],
+      ocpxActionTypeArray:[],
+      depthArray:[],
+      maxBidShow:false,
     }
   },
   created() {
     this.getSupplierList()
   },
   methods: {
+    deepInput(){
+      this.$forceUpdate()
+    },
+    maxValueInput(){
+      this.$forceUpdate()
+    },
+    bidTypeChange(item){
+      console.log(item);
+    // this.maxBidShow =   item.findIndex((item) => item == 2)
+   let odx =  item.indexOf(2)
+   if (odx == -1) {
+    this.maxBidShow = false;
+   }else{
+    this.maxBidShow = true;
+   }
+    // item.indexOf(item=>{
+    //   console.log(item);
+    //   if (item == 2) {
+    //     console.log(this.maxBidShow);
+    //     this.maxBidShow = true;
+    //   }else{
+    //     this.maxBidShow = false;
+        
+    //   }
+    // })
+   if (item.length == 0) {
+     this.model.deepConversionType = [];
+     this.depthArray = [];
+     this.ocpxActionTypeArray = [];
+     this.maxBidShow = false;
+   }
+    },
+    ocpxActionTypeChange(item){
+      this.ocpxActionTypeArray = [];
+      item.forEach(element => {
+         this.ocpxList.find((par)=>{
+        if (par.ocpxActionType == element) {
+          this.ocpxActionTypeArray.push({ocpxCode:par.ocpxActionType,ocpxName:par.ocpxActionName});
+        }
+         
+      })
+      });
+      
+    },
+    depthChange(event){
+      this.depthArray = [];
+      event.forEach(element => {
+         this.depthList.find((par)=>{
+        if (par.deepCode == element) {
+         this.depthArray.push({deepCode:par.deepCode,deepName:par.deepName,deepValue:par.deepValue})
+        }
+         
+      })
+      });
+      console.log(this.depthArray);
+    },
     validateInputCode(rule, value, callback) {
       if (value > 0) {
         callback()
@@ -240,9 +355,28 @@ export default {
         callback('请输入大于0的最高报价!')
       }
     },
+    validateInputMaxNum(rule, value, callback){
+      if (value > 0 && value <= 999999) {
+        callback()
+      } else {
+        callback('请输入0~999999之间的出价')
+      }
+    },
+    maxNumInput(obj){
+      console.log(obj);
+      obj.target.value = obj.target.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');
+      // console.log(this.form.setFieldsValue());
+    },
+    
     ...mapGetters(['nickname', 'avatar', 'userInfo']),
     onChange(e) {
+      console.log(e);
+      if (e.target.value == 1 || e.target.value == 3) {
+        this.ocpxActionTypeArray = [];
+        this.depthArray = [];
+      }
       console.log(`checked = ${e.target.value}`)
+      // this.form.resetFields([])
     },
     handleChange(value) {
       console.log(value)
@@ -296,6 +430,7 @@ export default {
       })
     },
     edit(record) {
+      console.log(record);
       this.getSupplierList()
       this.getList()
       this.getOcpxList()
@@ -313,16 +448,52 @@ export default {
         console.log(record)
         var params = { ...record }
         params.bidType = record.bidType == null || record.bidType == '' ? [] : JSON.parse(record.bidType)
-        params.ocpxActionType =
-          record.ocpxActionType == null || record.ocpxActionType == '' ? [] : JSON.parse(record.ocpxActionType)
+        // this.maxBidShow = params.bidType.findIndex((item) => item == 2)
+        params.bidType.findIndex(item=>{
+      if (item == 2) {
+        this.maxBidShow = true;
+      }else{
+        this.maxBidShow = false;
+        
+      }
+    })
+   
+        let newArray = [];
+        newArray = record.ocpxActionType == null || record.ocpxActionType == '' ? [] : JSON.parse(record.ocpxActionType)
+        params.ocpxActionType = [];
+        newArray.forEach(element => {
+          if (element.ocpxCode) {
+             params.ocpxActionType.push(element.ocpxCode)
+          }
+         
+        });
+        this.ocpxActionTypeArray = newArray
+        this.ocpxActionTypeArray.forEach(item => {
+          if (item.maxValue) {
+            item.maxValue = item.maxValue  ? item.maxValue / 1000 : 0
+          }
+          
+        });
+
+        let newArrayTwo = [];
+        newArrayTwo = record.deepConversionType == null || record.deepConversionType == '' ? [] : JSON.parse(record.deepConversionType)
+        params.deepConversionType = [];
+        newArrayTwo.forEach(event => {
+          params.deepConversionType.push(event.deepCode)
+        });
+        console.log( params.deepConversionType);
+        this.depthArray = newArrayTwo
+        this.depthArray.forEach(item => {
+          item.deepValue = item.deepValue  ? item.deepValue / 1000 : 0
+        });
+        console.log( this.depthArray);
       } else {
-        var { ocpxActionType, bidType, ...params } = record
+        var { ocpxActionType,deepConversionType, bidType, ...params } = record
         this.showDian = false
       }
-
-      console.log(record)
       this.form.resetFields()
       this.model = Object.assign({}, params)
+      console.log( this.model);
       this.model.maxBid = this.model.maxBid ? this.model.maxBid / 1000 : 0
       this.model.maxDeepCpaBid = this.model.maxDeepCpaBid ? this.model.maxDeepCpaBid / 1000 : 0
       this.visible = true
@@ -346,7 +517,7 @@ export default {
               'supplierCode',
               // 'advertiserType',
               'saleId',
-              'bidType'
+              'bidType',
             )
           )
         } else {
@@ -367,7 +538,8 @@ export default {
               // 'advertiserType',
               'saleId',
               'bidType',
-              'ocpxActionType'
+              'ocpxActionType',
+              'deepConversionType',
             )
           )
         }
@@ -399,7 +571,16 @@ export default {
     handleOk() {
       const that = this
       // 触发表单验证
-      this.form.validateFields((err, values) => {
+       let isEvery = this.ocpxActionTypeArray.every((item,i)=>{
+         return "maxValue" in item && item.maxValue != "" && item.maxValue*1000>=0&&item.maxValue*1000<=999999*1000
+       })
+       let deepIsEvery =  this.depthArray.every((event,i)=>{
+         return "deepValue" in event && event.deepValue != "" && event.deepValue*1000>=0&&event.deepValue*1000<=999999*1000
+       })
+     if (!isEvery || !deepIsEvery) {
+      this.$message.warning('请输入0~999999之间的最高价')
+     }else{
+          this.form.validateFields((err, values) => {
         if (!err) {
           that.confirmLoading = true
           let httpurl = ''
@@ -423,9 +604,25 @@ export default {
           formData.designResponsibleId = values.designResponsibleId
           formData.userId = formData.userId ? formData.userId : that.userInfo().id
 
-          formData.ocpxActionType =
-            formData.bidType == 2 ? JSON.stringify([0]) : JSON.stringify(formData.ocpxActionType)
+          // formData.ocpxActionType = formData.bidType == 2 ? JSON.stringify([0]) : JSON.stringify(formData.ocpxActionType)
           formData.bidType = JSON.stringify(formData.bidType)
+          this.ocpxActionTypeArray.forEach(element => {
+            if (element.maxValue) {
+              element.maxValue = element.maxValue * 1000;
+            }
+            
+          });
+          formData.ocpxActionType = this.ocpxActionTypeArray;
+          formData.ocpxActionTypeArray =  this.ocpxActionTypeArray;
+          this.depthArray.forEach(element => {
+            if (element.deepValue) {
+               element.deepValue = element.deepValue * 1000;
+            }
+           
+          });
+
+          formData.deepConversionType = this.depthArray;
+          formData.deepConversionTypeArray = this.depthArray;
           httpAction(httpurl, formData, method)
             .then((res) => {
               if (res.success) {
@@ -441,6 +638,17 @@ export default {
             })
         }
       })
+            
+          
+      
+    }
+  
+            
+   
+     
+            
+          
+      
     },
     handleCancel() {
       this.close()
@@ -455,7 +663,28 @@ export default {
     getOcpxList() {
       this.getAction('/ocpx/kuaiShouOcpxActionTypeConfig/list').then((res) => {
         if (res.success) {
-          this.ocpxList = res.result
+          this.ocpxList = res.result;
+      //     this.ocpxActionTypeArray = [];
+      //     this.model.ocpxActionType.forEach(element => {
+      //    this.ocpxList.find((par)=>{
+      //   if (par.ocpxActionType == element) {
+      //    this.ocpxActionTypeArray.push({ocpxCode:par.ocpxActionType,ocpxName:par.ocpxActionName});
+      //   } 
+      // })
+      // });
+      // if (this.model.deepConversionType) {
+      //    this.depthArray = [];
+      // this.model.deepConversionType.forEach(element => {
+      //    this.depthList.find((par)=>{
+      //   if (par.value == element) {
+      //    this.depthArray.push({deepCode:par.value,deepName:par.name})
+      //   }
+         
+      // })
+      // });
+      // } 
+     
+      
         }
       })
     },

+ 184 - 11
src/views/modules/advertiser/modules/projectListModal.vue

@@ -70,7 +70,7 @@
             </a-select-option>
           </a-select>
         </a-form-item>
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="最高出价">
+        <a-form-item  v-if="model.mediaId == '1' || model.mediaId == '3' || maxBidShow" :labelCol="labelCol" :wrapperCol="wrapperCol" label="最高出价">
           <a-input placeholder="请输入最高出价" v-decorator="['maxBid', validatorRules.maxBid]" addonAfter="元" />
         </a-form-item>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="最高转化出价">
@@ -78,7 +78,7 @@
         </a-form-item>
         <div v-if="showDian">
           <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优化目标">
-            <a-select v-decorator="['bidType', { initialValue: 2 }]" mode="multiple">
+            <a-select v-decorator="['bidType', { initialValue: 2 }]" mode="multiple"  @change="bidTypeChange($event)">
               <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>
@@ -90,19 +90,57 @@
               label="转化目标"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
+              
               v-show="
                 getFormFieldValue('bidType').findIndex((item) => item == 10) > -1 ||
                 getFormFieldValue('bidType').findIndex((item) => item == 6) > -1||
                 getFormFieldValue('bidType').findIndex((item) => item == 12) > -1
               "
             >
-              <a-select v-model="model.ocpxActionType" mode="multiple">
-                <a-select-option :value="2">行为数</a-select-option>
-                <a-select-option :value="item.ocpxActionType" v-for="(item, index) in ocpxList" :key="index">{{
+              <a-select v-model="model.ocpxActionType" @change="ocpxActionTypeChange($event)" mode="multiple">
+                <!-- <a-select-option :value="2">行为数</a-select-option> -->
+                <a-select-option :value="item.ocpxActionType" v-for="(item, index) in ocpxList" :key="item.id">{{
                   item.ocpxActionName
                 }}</a-select-option>
               </a-select>
             </a-form-item>
+
+            <div v-if="model.ocpxActionType">
+              <a-form-item v-show="model.ocpxActionType.length > 0"  :labelCol="labelCol" :wrapperCol="wrapperCol" v-for="(item, index) in ocpxActionTypeArray" :key="index" :label="item.ocpxName+'最高价'">
+             <a-input @input="maxValueInput"  @keyup.native="item.maxValue = item.maxValue.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');"  placeholder="请输入最高出价" v-model="item.maxValue" addonAfter="元" />
+           </a-form-item>
+         </div>
+
+           </div>
+
+            <div v-if="model.ocpxActionType">
+              <a-form-item
+            label="深度转化目标"
+            :labelCol="labelCol"
+            :wrapperCol="wrapperCol"
+              v-if="model.ocpxActionType.length > 0"
+          >
+            <!-- v-model="model.ocpxActionType" -->
+            <a-select
+            @change="depthChange($event)"
+            v-model="model.deepConversionType"
+              mode="multiple"
+            >
+              <a-select-option :value="item.deepCode" v-for="(item, index) in depthList" :key="index">{{
+                item.deepName
+              }}</a-select-option>
+            </a-select>
+          </a-form-item>
+            </div>
+
+            <div v-if="model.deepConversionType">
+              <a-form-item v-show="model.deepConversionType.length >0"  :labelCol="labelCol" :wrapperCol="wrapperCol" v-for="(item, index) in depthArray" :key="index" :label="item.deepName+'最高价'">
+             <a-input placeholder="请输入最高出价" @input="deepInput"  @keyup.native="item.deepValue = item.deepValue.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');" v-model="item.deepValue" addonAfter="元" />
+           </a-form-item>
+         </div>
+         
+
+
           </div>
         </div>
         <!-- <div v-else>
@@ -245,12 +283,74 @@ export default {
       supplierList: [],
       editAll: false,
       showDian: false,
+      depthList:[
+        {
+          deepCode:3,
+          deepName:'付费(深度)'
+        },{
+          deepCode:7,
+          deepName:'次日留存'
+        },{
+          deepCode:92,
+          deepName:'付费roi'
+        },
+      ],
+      ocpxActionTypeArray:[],
+      deepCode:[],
+      maxBidShow:false,
     }
   },
   created() {
     this.getSupplierList()
   },
   methods: {
+    deepInput(){
+      this.$forceUpdate()
+    },
+    maxValueInput(){
+      this.$forceUpdate()
+    },
+    bidTypeChange(item){
+      console.log(item);
+    // this.maxBidShow =   item.findIndex((item) => item == 2)
+    let odx =  item.indexOf(2)
+   if (odx == -1) {
+    this.maxBidShow = false;
+   }else{
+    this.maxBidShow = true;
+   }
+   if (item.length == 0) {
+     this.model.deepConversionType = [];
+     this.depthArray = [];
+     this.ocpxActionTypeArray = [];
+     this.maxBidShow = false;
+   }
+    },
+    ocpxActionTypeChange(item){
+      this.ocpxActionTypeArray = [];
+      item.forEach(element => {
+         this.ocpxList.find((par)=>{
+        if (par.ocpxActionType == element) {
+          
+          this.ocpxActionTypeArray.push({ocpxCode:par.ocpxActionType,ocpxName:par.ocpxActionName,maxValue:par.maxValue});
+        }
+         
+      })
+      });
+     
+    },
+    depthChange(event){
+      this.depthArray = [];
+      event.forEach(element => {
+         this.depthList.find((par)=>{
+        if (par.deepCode == element) {
+         this.depthArray.push({deepCode:par.deepCode,deepName:par.deepName,deepValue:par.deepValue})
+        }
+         
+      })
+      });
+      console.log(this.depthArray);
+    },
     validateInputCode(rule, value, callback) {
       if (!value || value > 0) {
         callback()
@@ -325,8 +425,46 @@ export default {
       if (record.mediaId == '2' || record.mediaId == '4') {
         var params = { ...record }
         params.bidType = record.bidType == null || record.bidType == '' ? [] : JSON.parse(record.bidType)
-        params.ocpxActionType =
-          record.ocpxActionType == null || record.ocpxActionType == '' ? [] : JSON.parse(record.ocpxActionType)
+        params.bidType.findIndex(item=>{
+      if (item == 2) {
+        this.maxBidShow = true;
+      }else{
+        this.maxBidShow = false;
+        
+      }
+    })
+        // params.ocpxActionType =
+        //   record.ocpxActionType == null || record.ocpxActionType == '' ? [] : JSON.parse(record.ocpxActionType)
+        let newArray = [];
+        newArray = record.ocpxActionType == null || record.ocpxActionType == '' || record.ocpxActionType == "[0]" ? [] : JSON.parse(record.ocpxActionType)
+        params.ocpxActionType = [];
+        newArray.forEach(element => {
+          params.ocpxActionType.push(element.ocpxCode)
+        });
+        this.ocpxActionTypeArray = newArray
+        this.ocpxActionTypeArray.forEach(item => {
+          if (item.maxValue) {
+            item.maxValue = item.maxValue  ? item.maxValue / 1000 : 0
+          }
+
+        });
+
+        let newArrayTwo = [];
+        newArrayTwo = record.deepConversionType == null || record.deepConversionType == '' ? [] : JSON.parse(record.deepConversionType)
+        params.deepConversionType = [];
+        newArrayTwo.forEach(event => {
+          params.deepConversionType.push(event.deepCode)
+        });
+        console.log( params.deepConversionType);
+        this.depthArray = newArrayTwo
+        this.depthArray.forEach(item => {
+          if (item.deepValue) {
+            item.deepValue = item.deepValue  ? item.deepValue / 1000 : 0
+          }
+            
+          
+        });
+
         this.showDian = true
       } else {
         var { ocpxActionType, bidType, ...params } = record
@@ -402,6 +540,15 @@ export default {
     handleOk() {
       const that = this
       // 触发表单验证
+      let isEvery = this.ocpxActionTypeArray.every((item,i)=>{
+         return "maxValue" in item && item.maxValue != "" && item.maxValue*1000>=0&&item.maxValue*1000<=999999*1000
+       })
+       let deepIsEvery =  this.depthArray.every((event,i)=>{
+         return "deepValue" in event && event.deepValue != "" && event.deepValue*1000>=0&&event.deepValue*1000<=999999*1000
+       })
+       if (!isEvery || !deepIsEvery) {
+      this.$message.warning('请输入0~999999之间的最高价')
+     }else{
       this.form.validateFields((err, values) => {
         if (!err) {
           that.confirmLoading = true
@@ -416,9 +563,15 @@ export default {
           }
           var data = values.advertiserId
           let formData = Object.assign(this.model, values)
+          console.log(formData);
           //   if(this.model.mediaId)
-          formData.maxBid = formData.maxBid * 1000
-          formData.maxDeepCpaBid = formData.maxDeepCpaBid * 1000
+          if (formData.maxBid) {
+             formData.maxBid = formData.maxBid * 1000
+          }
+          if ( formData.maxDeepCpaBid) {
+            formData.maxDeepCpaBid = formData.maxDeepCpaBid * 1000
+          }
+          
           //时间格式化
           // formData.advertiserId = data.key
           // formData.advertiserName = data.label
@@ -426,10 +579,27 @@ export default {
           formData.designResponsibleId = values.designResponsibleId
           formData.userId = formData.userId ? formData.userId : that.userInfo().id
           if (this.showDian) {
-            formData.ocpxActionType =
-              formData.bidType == 2 ? JSON.stringify([0]) : JSON.stringify(formData.ocpxActionType)
+            // formData.ocpxActionType =
+            //   formData.bidType == 2 ? JSON.stringify([0]) : JSON.stringify(formData.ocpxActionType)
             formData.bidType = JSON.stringify(formData.bidType)
           }
+          this.ocpxActionTypeArray.forEach(element => {
+            if (element.maxValue) {
+              element.maxValue = element.maxValue * 1000;
+            }
+          });
+          this.depthArray.forEach(element => {
+            if (element.deepValue) {
+               element.deepValue = element.deepValue * 1000;
+            }
+           
+          });
+
+          formData.ocpxActionType = this.ocpxActionTypeArray;
+          formData.ocpxActionTypeArray =  this.ocpxActionTypeArray;
+
+          formData.deepConversionType = this.depthArray;
+          formData.deepConversionTypeArray = this.depthArray;
           httpAction(httpurl, formData, method)
             .then((res) => {
               if (res.success) {
@@ -446,6 +616,9 @@ export default {
             })
         }
       })
+
+     }
+      
     },
     handleCancel() {
       this.close()