Переглянути джерело

Merge branch 'work-adver' into feature/work-test

liubei@c-top.com.cn 3 роки тому
батько
коміт
57908f9ece

+ 1 - 1
.env.production

@@ -13,6 +13,6 @@ VUE_APP_BASE_SCRIPT_URL = http://114.117.193.186:31013
 
 
 #素材大盘相关接口
-VUE_APP_BASE_MATERIAL_URL = http://192.168.0.195:9999/material
+VUE_APP_BASE_MATERIAL_URL = http://api.tjyourong.com.cn/material
 # 泽宇 http://192.168.1.134:9999
 # 测试 http://192.168.0.195:9999

+ 2 - 2
src/utils/request.js

@@ -21,9 +21,9 @@ else if (process.env.NODE_ENV === 'debug') {
 else if (process.env.NODE_ENV === 'production') {
 	// axios.defaults.baseURL = 'http://apipre.tjyourong.com.cn/jeecg-boot'; // 预生产
 	// axios.defaults.baseURL = 'http://gateway.tjyourong.com.cn/jeecg-boot';//测试
-	// axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot'; // 生产环境
+	axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot'; // 生产环境
 	// axios.defaults.baseURL = 'http://gateway.tjyourong.com.cn/jeecg-boot'; // 测试环境
-	axios.defaults.baseURL = 'http://192.168.0.195:9999/jeecg-boot'; // 测试环境
+	// axios.defaults.baseURL = 'http://192.168.0.195:9999/jeecg-boot'; // 测试环境
 	// axios.defaults.baseURL = 'http://192.168.1.134:9999/jeecg-boot'; // 泽宇环境
 
 }

+ 2 - 2
src/views/modules/Statistics/materialReport/materialReport.vue

@@ -50,7 +50,7 @@
         <div class="card-containers">
             <a-tabs type="card">
                 <a-tab-pane key="1">
-                    <span slot="tab"><a-icon type="unordered-list" />大盘</span>
+                    <span slot="tab"><a-icon type="unordered-list" />素材大盘</span>
                 </a-tab-pane>
             </a-tabs>
             <div class="option" style="justify-content: space-between">
@@ -508,7 +508,7 @@
                                     </div>
                                     <div
                                         style="display: flex; flex-flow: column; justify-content: space-between; width: 60%"
-                                        @click.stop="toDetail(item.signature)"
+                                        @click.stop="toDetail(item.material_id)"
                                     >
                                         <p style="margin-left: 10px; color: #1890ff">
                                             {{ item.materialName ? item.materialName : '无素材名称' }}

+ 2 - 2
src/views/modules/account-config/account-config-server.js

@@ -3,8 +3,8 @@
  * @author jiayufei
  */
 
-// export const urlAcount = 'http://118.24.244.213:8808'; // 线上
+export const urlAcount = 'http://118.24.244.213:8808'; // 线上
 // export const urlAcount = 'http://apipre.tjyourong.com.cn'; // 预生产
 // export const urlAcount = 'http://192.168.1.43:8808'; // 子安
-export const urlAcount = 'http://139.186.165.84:8808'; // 测试
+// export const urlAcount = 'http://139.186.165.84:8808'; // 测试
 // export const urlAcount = 'http://192.168.1.8:8080'; // 学超

+ 126 - 6
src/views/modules/account-config/components/configuration-modal.vue

@@ -292,6 +292,7 @@
                             <a-radio-button value="a">系统优选广告位</a-radio-button>
                             <a-radio-button value="b">首选媒体</a-radio-button>
                             <!-- <a-radio-button value="c">按场景指定位置</a-radio-button> -->
+                            <a-radio-button value="d">通投智选</a-radio-button>
                         </a-radio-group>
                     </a-form-model-item>
                     <div class="adver-position-radio">
@@ -793,7 +794,34 @@
                                 :step="0.01"
                                 placeholder="请输入"
                                 @blur="handleFloatingInterval"
-                            /> 元
+                            /> 
+                            <span>元</span>
+                        </a-form-model-item>
+                    </div>
+                    <div v-if="deepExternalShow">
+                        <a-form-model-item label="深度优化方式" prop="deepExternal">
+                            <a-radio-group @change="adDeepBidTypeChange" v-model="configForm.adDeepBidType" button-style="solid">
+                                <a-radio-button value="DEEP_BID_MIN" >自定义双出价</a-radio-button>
+                                <a-radio-button value="AUTO_MIN_SECOND_STAGE" >自动优化</a-radio-button>
+                            </a-radio-group>
+                        </a-form-model-item>
+                         <a-form-model-item v-if="adDeepCpabidShow" label="深度转化出价" prop="adDeepCpabid">
+                            <a-input-number
+                            class="common-input"
+                            v-model="configForm.adDeepCpabid"
+                            :min="0.1"
+                            :max="10000"
+                            :step="0.01"
+                            placeholder="请输入"
+                        /> 元
+                            <!-- <a-input-number
+                                class="common-input"
+                                v-model="configForm.adDeepCpabid"
+                                :min="0.1"
+                                :max="10000"
+                                :step="0.01"
+                                placeholder="请输入"
+                            /> 元 -->
                         </a-form-model-item>
                     </div>
                 </div>
@@ -1127,7 +1155,7 @@
                         </a-form-model-item>
                     </div>
                     <div v-else>
-                        <a-form-model-item label="创意内容">
+                        <a-form-model-item label="创意内容" v-if="creativeImageShow">
                             <a-radio-group v-model="configForm.creativeImageMode" button-style="solid"  @change="handleChangeCreativeType">
                                 <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO_VERTICAL">竖版视频</a-radio-button>
                                 <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO" :disabled="pictureStatus">横版视频</a-radio-button>
@@ -1136,6 +1164,9 @@
                                 <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE_VERTICAL" :disabled="pictureStatus">大图竖图</a-radio-button>
                             </a-radio-group>
                         </a-form-model-item>
+                        <a-form-model-item label="创意内容" v-else="creativeImageShow">      
+                                <radio-check v-model="configForm.creativeImageMode" :options="creativeImageModeArr"></radio-check>
+                        </a-form-model-item>
                         <a-form-model-item label="创意组件" prop="componentId" key="componentIdkey" 
                         v-if="configForm.creativeImageMode!='CREATIVE_IMAGE_MODE_LARGE'&&configForm.creativeImageMode!='CREATIVE_IMAGE_MODE_LARGE_VERTICAL'&&configForm.adverPosition != 'a'">
                             <a-input
@@ -1635,6 +1666,25 @@ export default {
                     label: '50岁+'
                 }
             ],
+            creativeImageModeArr:[
+                {
+                    value:"CREATIVE_IMAGE_MODE_VIDEO_VERTICAL",
+                    label:'竖版视频'
+                },{
+                    value:"CREATIVE_IMAGE_MODE_VIDEO",
+                    label:'横版视频'
+                },{
+                    value:"CREATIVE_IMAGE_MODE_LARGE",
+                    label:'大图横图'
+                },{
+                    value:"CREATIVE_IMAGE_MODE_SMALL",
+                    label:'小图',
+                    disabled:true
+                },{
+                    value:"CREATIVE_IMAGE_MODE_LARGE_VERTICAL",
+                    label:"大图竖图"
+                }
+            ],
             fileList: [],
             isCoverImgDiv: false,
             imageUrl: '',
@@ -1723,9 +1773,12 @@ export default {
                 creativeActionText: [{required: true, message: '请选择', trigger: 'change'}],
                 adConvertType: [{required: true, message: '请选择', trigger: 'change'}],
                 adConvertId: [{required: true, message: '请选择', trigger: 'change'}],
-                creativeThirdIndustryIds: [{required: true, message: '请选择', trigger: 'change'}]
+                creativeThirdIndustryIds: [{required: true, message: '请选择', trigger: 'change'}],
+                adDeepCpabid:[ {required: true, message: '请输入', trigger: 'blur'},]
             },
             configForm: {
+                adDeepBidType:'DEEP_BID_MIN',
+                adDeepCpabid:0,
                 copywritingNumber: undefined,
                 marketingPurpose: 'CONVERSION',
                 componentId: '',
@@ -1829,7 +1882,11 @@ export default {
             originalityStatus: true, // 创意状态
             pictureStatus: false,
             isTomatoStatus: false,
-            isTAwemeStatus: true
+            isTAwemeStatus: true,
+            creativeImageShow:true,
+            deepExternalArr:[],
+            deepExternalShow:false,
+            adDeepCpabidShow:true
         };
     },
     computed: {
@@ -2705,20 +2762,36 @@ export default {
                 this.isTAwemeStatus = true;
                 this.originalityStatus = true;
                 this.pictureStatus = false;
+                this.creativeImageShow = true;
+                this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
             }
             else if (e.target.value === 'b') {
                 this.configForm.radioChangeValue = '';
                 this.pictureStatus = true;
                 this.originalityStatus = true;
+                this.creativeImageShow = true;
+                this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
             }
             else if (e.target.value === 'c') {
                 this.configForm.checkboxChangeValue = [];
                 this.isTAwemeStatus = true;
                 this.originalityStatus = true;
                 this.pictureStatus = false;
+                this.creativeImageShow = true;
+                this.configForm.creativeImageMode.push('CREATIVE_IMAGE_MODE_VIDEO_VERTICAL');
+            }
+            else if(e.target.value === 'd'){
+                this.configForm.radioChangeValue = '';
+                this.configForm.checkboxChangeValue = [];
+                this.isTAwemeStatus = true;
+                this.originalityStatus = true;
+                this.pictureStatus = false;
+                this.creativeImageShow = false;
+                this.configForm.creativeImageMode = [];
+                this.configForm.creativeImageMode.push('CREATIVE_IMAGE_MODE_VIDEO_VERTICAL');
             }
             this.configForm.adUnionVideoType = '';
-            this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
+            // this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
             this.handleGetAdAudiencePackage();
         },
         handleAccountMode(e) {
@@ -2787,6 +2860,15 @@ export default {
             }
         },
         handleConvertChange(e) {
+            this.optimizationOption.forEach(element => {
+                if (element.convert_id == e) {
+                   if ("deep_external_actions" in element) {
+                       this.deepExternalShow = true;
+                   }else{
+                    this.deepExternalShow = false;
+                   }
+                }
+            });
             // postAction(urlAcount + `/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/readToolConvertInfo?accountId=${this.configForm.accountId}&convertId=${this.configForm.adConvertId}`)
             // .then(res=>{
             //     if(res.success){
@@ -2794,6 +2876,14 @@ export default {
             //     }
             // })
         },
+        adDeepBidTypeChange(e){
+            if (e.target.value == 'AUTO_MIN_SECOND_STAGE') {
+                this.adDeepCpabidShow = false;
+                this.configForm.adDeepCpabid = 0;
+            }else{
+                this.adDeepCpabidShow = true;
+            }
+        },
         handleGetDetailList() {
             const routeQuery = JSON.parse(localStorage.getItem('queryList'));
             getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/queryById', {id: routeQuery.id})
@@ -2881,7 +2971,24 @@ export default {
                                             }
                                             this.configForm.adConvertType = updateResult[0].convert_type;
                                             this.optimizationOption = updateResult[0].external_actions;
-
+                                            this.optimizationOption.forEach(element => {
+                                                    if (element.convert_id == detailData.adConvertId) {
+                                                    if ("deep_external_actions" in element) {
+                                                        this.deepExternalShow = true;
+                                                        
+                                                    }else{
+                                                        this.deepExternalShow = false;
+                                                    }
+                                                    }
+                                                });
+                                                if (detailData.adDeepBidType == 'AUTO_MIN_SECOND_STAGE') {
+                                                        this.adDeepCpabidShow = false;
+                                                        this.configForm.adDeepCpabid = 0
+                                                    }else{
+                                                        this.adDeepCpabidShow = true;
+                                                    }
+                                                this.configForm.adDeepBidType = detailData.adDeepBidType;
+                                                this.configForm.adDeepCpabid = detailData.adDeepCpabid;
                                         
                                         })
                                     
@@ -3160,6 +3267,18 @@ export default {
                     this.optimizationOption = [...item.external_actions];
                 }
             });
+            // this.optimizationOption.forEach(element => {
+            //                 console.log(element);
+            //                 console.log(detailData.adConvertId);
+            //                     if (element.convert_id == detailData.adConvertId) {
+            //                         console.log(1111111);
+            //                     if ("deep_external_actions" in element) {
+            //                         this.deepExternalShow = true;
+            //                     }else{
+            //                         this.deepExternalShow = false;
+            //                     }
+            //                     }
+            //                 });
         },
         // 优化目标数据获取
         handleGetOptimizationObjective(paramsData) {
@@ -3431,6 +3550,7 @@ export default {
         },
         handleRelaxSure() {
             let paramsFormData = this.configForm;
+            console.log(paramsFormData);
             if (paramsFormData.adDirectionalFlag === 'add') {
                 paramsFormData.adAudiencePackageId = null;
                 this.packageMessageDetail = [];

+ 28 - 8
src/views/modules/advertiser/ProjectList.vue

@@ -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>
@@ -135,7 +145,7 @@
         <span slot="bidType" slot-scope="text">
           <div v-if="text && JSON.parse(text).length > 0">
             <span v-for="(item, index) of JSON.parse(text)" :key="index"
-              >{{ item | bidType }}{{ index == JSON.parse(text).length - 1 ? '' : ',' }}</span
+              >{{ item | bidType }}{{ index == JSON.parse(text).length - 1 ? '' : '' }}</span
             >
           </div>
           <div v-else>-</div>
@@ -171,7 +181,7 @@ import ProjectModal from './modules/projectListModal'
 import JTreeSelect from '@/components/jeecg/JTreeSelect'
 import { httpAction, getAction } from '@/api/manage'
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-
+import { mapActions, mapGetters } from 'vuex'
 export default {
   name: 'ProjectList',
   mixins: [JeecgListMixin],
@@ -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',
@@ -322,11 +340,13 @@ export default {
         }
       })
     },
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
     getList() {
       var params = {}
       // params.userId = this.userInfo().id
       params.pageSize = 1000
       params.pageNo = 1
+      params.userId = this.userInfo().id
       getAction('/ctop/advertiser/list', params)
         .then((res) => {
           if (res.success) {

+ 518 - 359
src/views/modules/advertiser/modules/ProjectModal.vue

@@ -1,13 +1,6 @@
 <template>
-  <a-modal
-    :title="title"
-    :width="800"
-    :visible="visible"
-    :confirmLoading="confirmLoading"
-    @ok="handleOk"
-    @cancel="handleCancel"
-    cancelText="关闭"
-  >
+  <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading" @ok="handleOk"
+    @cancel="handleCancel" cancelText="关闭">
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="媒体类型">
@@ -26,18 +19,10 @@
             dict="sys_category,name,id" pidField="pid" pidValue="f5cb2d2d28417b3b65a6dd744bcb9a76">
           </j-tree-select>
         </a-form-item>-->
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="供应商"
-          v-if="model.mediaId == '2' || model.mediaId == '4'"
-        >
-          <a-select
-            optionFilterProp="children"
-            showSearch
-            :filterOption="filterOption"
-            v-decorator="['supplierCode', validatorRules.supplierCode]"
-          >
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="供应商"
+          v-show="model.mediaId == '2' || model.mediaId == '4'">
+          <a-select optionFilterProp="children" showSearch :filterOption="filterOption"
+            v-decorator="['supplierCode', validatorRules.supplierCode]">
             <a-select-option :value="item.supplierCode" v-for="(item, index) of supplierList" :key="index">
               {{ item.supplierName }}
             </a-select-option>
@@ -45,43 +30,35 @@
         </a-form-item>
 
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="广告主名称">
-          <a-select
-            @change="handleChange"
-            optionFilterProp="children"
-            showSearch
-            :filterOption="filterOption"
-            v-decorator="['advertiserId', validatorRules.advertiserId]"
-          >
+          <a-select @change="handleChange" optionFilterProp="children" showSearch :filterOption="filterOption"
+            v-decorator="['advertiserId', validatorRules.advertiserId]">
             <a-select-option :value="item.id" v-for="(item, index) of list" :key="index">
               {{ item.name }}
             </a-select-option>
           </a-select>
         </a-form-item>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="产品名称">
-          <a-select
-            optionFilterProp="children"
-            showSearch
-            :filterOption="filterOption"
+          <a-select optionFilterProp="children" showSearch :filterOption="filterOption"
             v-decorator="['productId', validatorRules.productId]"
-            :disabled="getFormFieldValue('advertiserId') == '' || getFormFieldValue('advertiserId') == null"
-          >
+            :disabled="getFormFieldValue('advertiserId') == '' || getFormFieldValue('advertiserId') == null">
             <a-select-option :value="item.id" v-for="(item, index) of listProduct" :key="index">
               {{ item.productName }}
             </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
+            <a-select @change="bidTypeChange($event)"
               v-decorator="['bidType', { rules: [{ required: true, message: '请选择优化目标' }], initialValue: 2 }]"
-              mode="multiple"
-            >
+              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>
@@ -89,83 +66,78 @@
             </a-select>
           </a-form-item>
           <div v-if="Array.isArray(getFormFieldValue('bidType'))">
-            <a-form-item
-              label="转化目标"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-              v-if="
+            <a-form-item label="转化目标" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="
                 getFormFieldValue('bidType').findIndex((item) => item == 10) > -1 ||
                 getFormFieldValue('bidType').findIndex((item) => item == 6) > -1||
                 getFormFieldValue('bidType').findIndex((item) => item == 12) > -1
-              "
-            >
+              ">
               <!-- v-model="model.ocpxActionType" -->
-              <a-select
-                v-decorator="[
+              <a-select @change="ocpxActionTypeChange($event)" v-decorator="[
                   'ocpxActionType',
-                  { rules: [{ required: true, message: '请选择转化目标' }], initialValue: 2 },
-                ]"
-                mode="multiple"
-              >
+                  { rules: [{ required: true, message: '请选择转化目标' }] },
+                ]" mode="multiple">
                 <!-- <a-select-option :value="2">行为数</a-select-option> -->
                 <a-select-option :value="item.ocpxActionType" v-for="(item, index) in ocpxList" :key="index">{{
                   item.ocpxActionName
-                }}</a-select-option>
+                  }}</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-show="getFormFieldValue('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>
 
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售">
-          <a-select
-            showSearch
-            optionFilterProp="children"
-            style="width: 100%"
-            :filterOption="filterOption"
-            v-decorator="['saleId', { rules: [{ required: true, message: '请选择销售' }] }]"
-          >
-            <a-select-option
-              v-for="appModel in optionsElse"
-              :key="appModel.userId + new Date().getTime()"
-              :value="appModel.userId"
-              >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option
-            >
+          <a-select showSearch optionFilterProp="children" style="width: 100%" :filterOption="filterOption"
+            v-decorator="['saleId', { rules: [{ required: true, message: '请选择销售' }] }]">
+            <a-select-option v-for="appModel in optionsElse" :key="appModel.userId + new Date().getTime()"
+              :value="appModel.userId">{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option>
           </a-select>
         </a-form-item>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="运营负责人">
-          <a-select
-            showSearch
-            optionFilterProp="children"
-            style="width: 100%"
-            @focus="handleFocus"
-            @blur="handleBlur"
+          <a-select showSearch optionFilterProp="children" style="width: 100%" @focus="handleFocus" @blur="handleBlur"
             :filterOption="filterOption"
-            v-decorator="['responsibleId', { rules: [{ required: true, message: '请选择运营负责人' }] }]"
-          >
-            <a-select-option
-              v-for="appModel in options"
-              :key="appModel.userId + new Date().getTime()"
-              :value="appModel.userId"
-              >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option
-            >
+            v-decorator="['responsibleId', { rules: [{ required: true, message: '请选择运营负责人' }] }]">
+            <a-select-option v-for="appModel in options" :key="appModel.userId + new Date().getTime()"
+              :value="appModel.userId">{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option>
           </a-select>
         </a-form-item>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="设计负责人">
-          <a-select
-            showSearch
-            optionFilterProp="children"
-            style="width: 100%"
-            @focus="handleFocus"
-            @blur="handleBlur"
+          <a-select showSearch optionFilterProp="children" style="width: 100%" @focus="handleFocus" @blur="handleBlur"
             :filterOption="filterOption"
-            v-decorator="['designResponsibleId', { rules: [{ required: true, message: '请选择设计负责人' }] }]"
-          >
-            <a-select-option
-              v-for="appModel in options"
-              :key="appModel.userId + new Date().getTime()"
-              :value="appModel.userId"
-              >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option
-            >
+            v-decorator="['designResponsibleId', { rules: [{ required: true, message: '请选择设计负责人' }] }]">
+            <a-select-option v-for="appModel in options" :key="appModel.userId + new Date().getTime()"
+              :value="appModel.userId">{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option>
           </a-select>
         </a-form-item>
       </a-form>
@@ -174,293 +146,480 @@
 </template>
 
 <script>
-import { httpAction, getAction } from '@/api/manage'
-import pick from 'lodash.pick'
-import moment from 'moment'
-import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
-import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
-import JTreeSelect from '@/components/jeecg/JTreeSelect'
-import { mapGetters } from 'vuex'
-export default {
-  name: 'ProjectModal',
-  components: {
-    JSelectUserByDep,
-    JSelectDepart,
-    JTreeSelect,
-  },
-  data() {
-    return {
-      title: '操作',
-      visible: false,
-      model: {},
-      labelCol: {
-        xs: { span: 24 },
-        sm: { span: 5 },
-      },
-      wrapperCol: {
-        xs: { span: 24 },
-        sm: { span: 16 },
-      },
-      industryId: '',
-      confirmLoading: false,
-      form: this.$form.createForm(this),
-      validatorRules: {
-        projectName: { rules: [{ required: true, message: '请输入项目名称!' }] },
-        industryId: { rules: [{ required: true, message: '请选择行业!' }] },
-        advertiserId: { rules: [{ required: true, message: '请选择广告主!' }] },
-        productId: { rules: [{ required: true, message: '请选择产品!' }] },
-        supplierCode: { rules: [{ required: true, message: '请选择供应商!' }], initialValue: 'kuaishou_001' },
-        responsibleName: { rules: [{ required: true, message: '请选择负责人!' }] },
-        maxBid: { rules: [{ required: true, message: '请输入最高出价!' }, { validator: this.validateInputCode }] },
-      },
-      url: {
-        add: '/ctop/project/add',
-        edit: '/ctop/project/edit',
-        getList: '/ctop/advertiser/list',
-      },
-      list: [],
-      listProduct: [],
-      resId: '',
-      shejiId: '',
-      options: [],
-      optionsElse: [],
-      supplierList: [],
-      editAll: false,
-      ocpxList: [],
-    }
-  },
-  created() {
-    this.getSupplierList()
-  },
-  methods: {
-    validateInputCode(rule, value, callback) {
-      if (value > 0) {
-        callback()
-      } else {
-        callback('请输入大于0的最高报价!')
-      }
-    },
-    ...mapGetters(['nickname', 'avatar', 'userInfo']),
-    onChange(e) {
-      console.log(`checked = ${e.target.value}`)
+  import { httpAction, getAction } from '@/api/manage'
+  import pick from 'lodash.pick'
+  import moment from 'moment'
+  import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
+  import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
+  import JTreeSelect from '@/components/jeecg/JTreeSelect'
+  import { mapGetters } from 'vuex'
+  export default {
+    name: 'ProjectModal',
+    components: {
+      JSelectUserByDep,
+      JSelectDepart,
+      JTreeSelect,
     },
-    handleChange(value) {
-      console.log(value)
-      getAction('/ctop/product/list', { advertiserId: value, pageSize: 1000 }).then((res) => {
-        if (res.success) {
-          this.listProduct = res.result.records
-        }
-      })
-    },
-    handleBlur() {
-      console.log('blur')
-    },
-    handleFocus() {
-      console.log('focus')
-    },
-    filterOption(input, option) {
-      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    data() {
+      return {
+        title: '操作',
+        visible: false,
+        model: {},
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        industryId: '',
+        confirmLoading: false,
+        form: this.$form.createForm(this),
+        validatorRules: {
+          projectName: { rules: [{ required: true, message: '请输入项目名称!' }] },
+          industryId: { rules: [{ required: true, message: '请选择行业!' }] },
+          advertiserId: { rules: [{ required: true, message: '请选择广告主!' }] },
+          productId: { rules: [{ required: true, message: '请选择产品!' }] },
+          supplierCode: { rules: [{ required: true, message: '请选择供应商!' }], initialValue: 'kuaishou_001' },
+          responsibleName: { rules: [{ required: true, message: '请选择负责人!' }] },
+          maxBid: { rules: [{ required: true, message: '请输入最高出价!' }, { validator: this.validateInputCode }] },
+        },
+        url: {
+          add: '/ctop/project/add',
+          edit: '/ctop/project/edit',
+          getList: '/ctop/advertiser/list',
+        },
+        list: [],
+        listProduct: [],
+        depthList: [
+          {
+            deepCode: 3,
+            deepName: '付费(深度)'
+          }, {
+            deepCode: 7,
+            deepName: '次日留存'
+          }, {
+            deepCode: 92,
+            deepName: '付费roi'
+          },
+        ],
+        resId: '',
+        shejiId: '',
+        options: [],
+        optionsElse: [],
+        supplierList: [],
+        editAll: false,
+        ocpxList: [],
+        ocpxActionTypeArray: [],
+        depthArray: [],
+        maxBidShow: false,
+      }
     },
-    getList() {
-      var params = {}
-      // 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)
-          }
-        })
-        .finally(() => {})
+    created() {
+      this.getSupplierList()
     },
-    getSupplierList() {
-      var params = {}
-      getAction('/ctop/supplierList/list',{pageNo:1,pageSize:100}).then((res) => {
-        if (res.success) {
-          this.supplierList = res.result.records
+    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.$message.warning(res.message)
+          this.maxBidShow = true;
         }
-      })
-    },
-    add(item) {
-      this.editAll = false
-      this.edit({
-        mediaId: '2',
-        ...item,
-      })
-    },
-    edit(record) {
-      this.getSupplierList()
-      this.getList()
-      this.getOcpxList()
-      if (record.advertiserId) {
-        this.editAll = true
-        getAction('/ctop/product/list', { advertiserId: record.advertiserId, pageSize: 1000 }).then((res) => {
-          if (res.success) {
-            this.listProduct = res.result.records
-          }
-        })
-      }
+        // item.indexOf(item=>{
+        //   console.log(item);
+        //   if (item == 2) {
+        //     console.log(this.maxBidShow);
+        //     this.maxBidShow = true;
+        //   }else{
+        //     this.maxBidShow = false;
 
-      // var params = { ...record }
-      if (record.mediaId == '2' || record.mediaId == '4') {
-        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)
-      } else {
-        var { ocpxActionType, bidType, ...params } = record
-        this.showDian = 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 });
+            }
 
-      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.visible = true
-      this.$nextTick(() => {
-        console.log(this.model)
-        if (record.advertiserId) {
-          this.form.setFieldsValue(
-            pick(
-              this.model,
-              'projectName',
-              'industryId',
-              'advertiserId',
-              'productId',
-              'responsibleName',
-              'maxBid',
-              'maxDeepCpaBid',
-              'userId',
-              'designResponsibleId',
-              'responsibleId',
-              'industryCode',
-              'supplierCode',
-              // 'advertiserType',
-              'saleId',
-              'bidType'
-            )
-          )
+          })
+        });
+        if (item.length == 0) {
+          this.model.deepConversionType = [];
+        }
+      },
+      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()
         } else {
-          this.form.setFieldsValue(
-            pick(
-              this.model,
-              'projectName',
-              'industryId',
-              'advertiserId',
-              'responsibleName',
-              'maxBid',
-              'maxDeepCpaBid',
-              'userId',
-              'designResponsibleId',
-              'responsibleId',
-              'industryCode',
-              'supplierCode',
-              // 'advertiserType',
-              'saleId',
-              'bidType',
-              'ocpxActionType'
-            )
-          )
+          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());
+      },
 
-        // this.resId = record.responsibleId
-        // this.shejiId = record.designResponsibleId
-        getAction('/sys/user/getAllUserListV1', '').then((res) => {
-          console.log(res)
+      ...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)
+        getAction('/ctop/product/list', { advertiserId: value, pageSize: 1000 }).then((res) => {
           if (res.success) {
-            this.options = res.result
+            this.listProduct = res.result.records
           }
         })
-        getAction('/sys/user/getAllSaleList', '').then((res) => {
-          console.log(res)
+      },
+      handleBlur() {
+        console.log('blur')
+      },
+      handleFocus() {
+        console.log('focus')
+      },
+      filterOption(input, option) {
+        return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      },
+      getList() {
+        var params = {}
+        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)
+            }
+          })
+          .finally(() => { })
+      },
+      getSupplierList() {
+        var params = {}
+        getAction('/ctop/supplierList/list', { pageNo: 1, pageSize: 100 }).then((res) => {
           if (res.success) {
-            this.optionsElse = res.result
+            this.supplierList = res.result.records
+          } else {
+            this.$message.warning(res.message)
           }
         })
-        //时间格式化
-        setTimeout(() => {
-          this.form.setFieldsValue(pick(this.model, 'ocpxActionType'))
+      },
+      add(item) {
+        this.editAll = false
+        this.edit({
+          mediaId: '2',
+          ...item,
         })
-      })
-    },
-    close() {
-      this.$emit('close')
-      this.visible = false
-    },
-    handleOk() {
-      const that = this
-      // 触发表单验证
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          that.confirmLoading = true
-          let httpurl = ''
-          let method = ''
-          if (!this.model.id) {
-            httpurl += this.url.add
-            method = 'post'
+      },
+      edit(record) {
+        console.log(record);
+        this.getSupplierList()
+        this.getList()
+        this.getOcpxList()
+        if (record.advertiserId) {
+          this.editAll = true
+          getAction('/ctop/product/list', { advertiserId: record.advertiserId, pageSize: 1000 }).then((res) => {
+            if (res.success) {
+              this.listProduct = res.result.records
+            }
+          })
+        }
+
+        // var params = { ...record }
+        if (record.mediaId == '2' || record.mediaId == '4') {
+          console.log(record)
+          var params = { ...record }
+          params.bidType = record.bidType == null || record.bidType == '' ? [] : JSON.parse(record.bidType)
+          // 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, deepConversionType, bidType, ...params } = record
+          this.showDian = false
+        }
+        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
+        this.$nextTick(() => {
+          console.log(this.model)
+          if (record.advertiserId) {
+            this.form.setFieldsValue(
+              pick(
+                this.model,
+                'projectName',
+                'industryId',
+                'advertiserId',
+                'productId',
+                'responsibleName',
+                'maxBid',
+                'maxDeepCpaBid',
+                'userId',
+                'designResponsibleId',
+                'responsibleId',
+                'industryCode',
+                'supplierCode',
+                // 'advertiserType',
+                'saleId',
+                'bidType',
+              )
+            )
           } else {
-            httpurl += this.url.edit
-            method = 'put'
+            this.form.setFieldsValue(
+              pick(
+                this.model,
+                'projectName',
+                'industryId',
+                'advertiserId',
+                'responsibleName',
+                'maxBid',
+                'maxDeepCpaBid',
+                'userId',
+                'designResponsibleId',
+                'responsibleId',
+                'industryCode',
+                'supplierCode',
+                // 'advertiserType',
+                'saleId',
+                'bidType',
+                'ocpxActionType',
+                'deepConversionType',
+              )
+            )
           }
-          var data = values.advertiserId
-          let formData = Object.assign(this.model, values)
-          //   if(this.model.mediaId)
-          formData.maxBid = formData.maxBid * 1000
-          formData.maxDeepCpaBid = formData.maxDeepCpaBid * 1000
+
+          // 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
+            }
+          })
           //时间格式化
-          // formData.advertiserId = data.key
-          // formData.advertiserName = data.label
-          formData.responsibleId = values.responsibleId
-          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.bidType = JSON.stringify(formData.bidType)
-          httpAction(httpurl, formData, method)
-            .then((res) => {
-              if (res.success) {
-                that.$message.success(res.message)
-                that.$emit('ok')
+          setTimeout(() => {
+            this.form.setFieldsValue(pick(this.model, 'ocpxActionType'))
+          })
+        })
+      },
+      close() {
+        this.$emit('close')
+        this.visible = false
+      },
+      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
+              let httpurl = ''
+              let method = ''
+              if (!this.model.id) {
+                httpurl += this.url.add
+                method = 'post'
               } else {
-                that.$message.warning(res.message)
+                httpurl += this.url.edit
+                method = 'put'
               }
-            })
-            .finally(() => {
-              that.confirmLoading = false
-              that.close()
-            })
-        }
-      })
-    },
-    handleCancel() {
-      this.close()
-    },
-    getFormFieldValue(field) {
-      return this.form.getFieldValue(field)
-    },
-    get(valueName, key) {
-      console.log(valueName, key)
-      this.resId = key
-    },
-    getOcpxList() {
-      this.getAction('/ocpx/kuaiShouOcpxActionTypeConfig/list').then((res) => {
-        if (res.success) {
-          this.ocpxList = res.result
+              var data = values.advertiserId
+              let formData = Object.assign(this.model, values)
+              //   if(this.model.mediaId)
+              formData.maxBid = formData.maxBid * 1000
+              formData.maxDeepCpaBid = formData.maxDeepCpaBid * 1000
+              //时间格式化
+              // formData.advertiserId = data.key
+              // formData.advertiserName = data.label
+              formData.responsibleId = values.responsibleId
+              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.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) {
+                    that.$message.success(res.message)
+                    that.$emit('ok')
+                  } else {
+                    that.$message.warning(res.message)
+                  }
+                })
+                .finally(() => {
+                  that.confirmLoading = false
+                  that.close()
+                })
+            }
+          })
+
+
+
         }
-      })
+
+
+
+
+
+
+
+      },
+      handleCancel() {
+        this.close()
+      },
+      getFormFieldValue(field) {
+        return this.form.getFieldValue(field)
+      },
+      get(valueName, key) {
+        console.log(valueName, key)
+        this.resId = key
+      },
+      getOcpxList() {
+        this.getAction('/ocpx/kuaiShouOcpxActionTypeConfig/list').then((res) => {
+          if (res.success) {
+            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})
+            //   }
+
+            // })
+            // });
+            // } 
+
+
+          }
+        })
+      },
     },
-  },
-}
+  }
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped></style>

+ 1 - 1
src/views/modules/advertiser/modules/productModal.vue

@@ -165,7 +165,7 @@
       },
       getList() {
         var params = {}
-        // params.userId = this.userInfo().id
+        params.userId = this.userInfo().id
         params.pageSize = 1000
         params.pageNo = 1
         console.log(params)

+ 462 - 345
src/views/modules/advertiser/modules/projectListModal.vue

@@ -1,13 +1,6 @@
 <template>
-  <a-modal
-    :title="title"
-    :width="800"
-    :visible="visible"
-    :confirmLoading="confirmLoading"
-    @ok="handleOk"
-    @cancel="handleCancel"
-    cancelText="关闭"
-  >
+  <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading" @ok="handleOk"
+    @cancel="handleCancel" cancelText="关闭">
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">
         <!-- <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="媒体类型">
@@ -23,18 +16,10 @@
           <a-input placeholder="请输入项目名称" v-decorator="['projectName', validatorRules.projectName]" disabled />
         </a-form-item>
 
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="供应商"
-          v-if="model.mediaId == '2' || model.mediaId == '4'"
-        >
-          <a-select
-            optionFilterProp="children"
-            showSearch
-            :filterOption="filterOption"
-            v-decorator="['supplierCode', validatorRules.supplierCode]"
-          >
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="供应商"
+          v-if="model.mediaId == '2' || model.mediaId == '4'">
+          <a-select optionFilterProp="children" showSearch :filterOption="filterOption"
+            v-decorator="['supplierCode', validatorRules.supplierCode]">
             <a-select-option :value="item.supplierCode" v-for="(item, index) of supplierList" :key="index">
               {{ item.supplierName }}
             </a-select-option>
@@ -42,35 +27,23 @@
         </a-form-item>
 
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="广告主名称">
-          <a-select
-            @change="handleChange"
-            optionFilterProp="children"
-            showSearch
-            :filterOption="filterOption"
-            v-decorator="['advertiserId', validatorRules.advertiserId]"
-            placeholder="请选择广告主"
-            disabled
-          >
+          <a-select @change="handleChange" optionFilterProp="children" showSearch :filterOption="filterOption"
+            v-decorator="['advertiserId', validatorRules.advertiserId]" placeholder="请选择广告主" disabled>
             <a-select-option :value="item.id" v-for="(item, index) of list" :key="index">
               {{ item.name }}
             </a-select-option>
           </a-select>
         </a-form-item>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="产品名称">
-          <a-select
-            optionFilterProp="children"
-            showSearch
-            :filterOption="filterOption"
-            v-decorator="['productId']"
-            placeholder="请选择产品"
-            disabled
-          >
+          <a-select optionFilterProp="children" showSearch :filterOption="filterOption" v-decorator="['productId']"
+            placeholder="请选择产品" disabled>
             <a-select-option :value="item.id" v-for="(item, index) of listProduct" :key="index">
               {{ item.productName }}
             </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 +51,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>
@@ -86,24 +59,54 @@
             </a-select>
           </a-form-item>
           <div v-if="Array.isArray(getFormFieldValue('bidType'))">
-            <a-form-item
-              label="转化目标"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-              v-show="
+            <a-form-item 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-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="Array.isArray(model.ocpxActionType)">
+            <a-form-item label="深度转化目标" :labelCol="labelCol" :wrapperCol="wrapperCol"
+               v-show="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>
           <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优化目标">
@@ -134,55 +137,26 @@
           </div>
         </div> -->
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售">
-          <a-select
-            showSearch
-            optionFilterProp="children"
-            style="width: 100%"
-            :filterOption="filterOption"
-            v-decorator="['saleId', { rules: [{ required: true, message: '请选择销售' }] }]"
-          >
-            <a-select-option
-              v-for="appModel in optionsElse"
-              :key="appModel.userId + new Date().getTime()"
-              :value="appModel.userId"
-              >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option
-            >
+          <a-select showSearch optionFilterProp="children" style="width: 100%" :filterOption="filterOption"
+            v-decorator="['saleId', { rules: [{ required: true, message: '请选择销售' }] }]">
+            <a-select-option v-for="appModel in optionsElse" :key="appModel.userId + new Date().getTime()"
+              :value="appModel.userId">{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option>
           </a-select>
         </a-form-item>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="运营负责人">
-          <a-select
-            showSearch
-            optionFilterProp="children"
-            style="width: 100%"
-            @focus="handleFocus"
-            @blur="handleBlur"
+          <a-select showSearch optionFilterProp="children" style="width: 100%" @focus="handleFocus" @blur="handleBlur"
             :filterOption="filterOption"
-            v-decorator="['responsibleId', { rules: [{ required: true, message: '请选择运营负责人' }] }]"
-          >
-            <a-select-option
-              v-for="appModel in options"
-              :key="appModel.userId + new Date().getTime()"
-              :value="appModel.userId"
-              >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option
-            >
+            v-decorator="['responsibleId', { rules: [{ required: true, message: '请选择运营负责人' }] }]">
+            <a-select-option v-for="appModel in options" :key="appModel.userId + new Date().getTime()"
+              :value="appModel.userId">{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option>
           </a-select>
         </a-form-item>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="设计负责人">
-          <a-select
-            showSearch
-            optionFilterProp="children"
-            style="width: 100%"
-            @focus="handleFocus"
-            @blur="handleBlur"
+          <a-select showSearch optionFilterProp="children" style="width: 100%" @focus="handleFocus" @blur="handleBlur"
             :filterOption="filterOption"
-            v-decorator="['designResponsibleId', { rules: [{ required: true, message: '请选择设计负责人' }] }]"
-          >
-            <a-select-option
-              v-for="appModel in options"
-              :key="appModel.userId + new Date().getTime()"
-              :value="appModel.userId"
-              >{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option
-            >
+            v-decorator="['designResponsibleId', { rules: [{ required: true, message: '请选择设计负责人' }] }]">
+            <a-select-option v-for="appModel in options" :key="appModel.userId + new Date().getTime()"
+              :value="appModel.userId">{{ appModel.realName }}&#12288;&#12288;{{ appModel.roleName }}</a-select-option>
           </a-select>
         </a-form-item>
       </a-form>
@@ -191,280 +165,423 @@
 </template>
 
 <script>
-import { httpAction, getAction } from '@/api/manage'
-import pick from 'lodash.pick'
-import moment from 'moment'
-import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
-import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
-import JTreeSelect from '@/components/jeecg/JTreeSelect'
-import { mapGetters } from 'vuex'
-export default {
-  name: 'ProjectModal',
-  components: {
-    JSelectUserByDep,
-    JSelectDepart,
-    JTreeSelect,
-  },
-  data() {
-    return {
-      ocpxList: [],
-      title: '操作',
-      visible: false,
-      model: {},
-      labelCol: {
-        xs: { span: 24 },
-        sm: { span: 5 },
+  import { httpAction, getAction } from '@/api/manage'
+  import pick from 'lodash.pick'
+  import moment from 'moment'
+  import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
+  import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
+  import JTreeSelect from '@/components/jeecg/JTreeSelect'
+  import { mapGetters } from 'vuex'
+  export default {
+    name: 'ProjectModal',
+    components: {
+      JSelectUserByDep,
+      JSelectDepart,
+      JTreeSelect,
+    },
+    data() {
+      return {
+        ocpxList: [],
+        title: '操作',
+        visible: false,
+        model: {},
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        industryId: '',
+        confirmLoading: false,
+        form: this.$form.createForm(this),
+        validatorRules: {
+          projectName: { rules: [{ required: true, message: '请输入项目名称!' }] },
+          industryId: { rules: [{ required: true, message: '请选择行业!' }] },
+          advertiserId: { rules: [{ required: true, message: '请选择广告主!' }] },
+          productId: { rules: [{ required: true, message: '请选择产品!' }] },
+          supplierCode: { rules: [{ required: true, message: '请选择供应商!' }], initialValue: 'kuaishou_001' },
+          responsibleName: { rules: [{ required: true, message: '请选择负责人!' }] },
+          maxBid: { rules: [{ required: true, message: '请输入最高出价!' }, { validator: this.validateInputCode }] },
+        },
+        url: {
+          add: '/ctop/project/add',
+          edit: '/ctop/project/edit',
+          getList: '/ctop/advertiser/list',
+        },
+        list: [],
+        listProduct: [],
+        resId: '',
+        shejiId: '',
+        options: [],
+        optionsElse: [],
+        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()
       },
-      wrapperCol: {
-        xs: { span: 24 },
-        sm: { span: 16 },
+      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.model.ocpxActionType = [];
+          this.depthArray = [];
+          this.ocpxActionTypeArray = [];
+          this.maxBidShow = false;
+        }
       },
-      industryId: '',
-      confirmLoading: false,
-      form: this.$form.createForm(this),
-      validatorRules: {
-        projectName: { rules: [{ required: true, message: '请输入项目名称!' }] },
-        industryId: { rules: [{ required: true, message: '请选择行业!' }] },
-        advertiserId: { rules: [{ required: true, message: '请选择广告主!' }] },
-        productId: { rules: [{ required: true, message: '请选择产品!' }] },
-        supplierCode: { rules: [{ required: true, message: '请选择供应商!' }], initialValue: 'kuaishou_001' },
-        responsibleName: { rules: [{ required: true, message: '请选择负责人!' }] },
-        maxBid: { rules: [{ required: true, message: '请输入最高出价!' }, { validator: this.validateInputCode }] },
+      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 });
+            }
+
+          })
+        });
+
+        if (item.length == 0) {
+          this.model.deepConversionType = [];
+        }
+
       },
-      url: {
-        add: '/ctop/project/add',
-        edit: '/ctop/project/edit',
-        getList: '/ctop/advertiser/list',
+      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);
       },
-      list: [],
-      listProduct: [],
-      resId: '',
-      shejiId: '',
-      options: [],
-      optionsElse: [],
-      supplierList: [],
-      editAll: false,
-      showDian: false,
-    }
-  },
-  created() {
-    this.getSupplierList()
-  },
-  methods: {
-    validateInputCode(rule, value, callback) {
-      if (!value || value > 0) {
-        callback()
-      } else {
-        callback('请输入大于0的最高报价!')
-      }
-    },
-    ...mapGetters(['nickname', 'avatar', 'userInfo']),
-    onChange(e) {
-      console.log(`checked = ${e.target.value}`)
-    },
-    handleChange(value) {
-      getAction('/ctop/product/list', { advertiserId: value, pageSize: 1000 }).then((res) => {
-        if (res.success) {
-          this.listProduct = res.result.records
+      validateInputCode(rule, value, callback) {
+        if (!value || value > 0) {
+          callback()
+        } else {
+          callback('请输入大于0的最高报价!')
         }
-      })
-    },
-    handleBlur() {},
-    handleFocus() {},
-    filterOption(input, option) {
-      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-    },
-    getList() {
-      var params = {}
-      // params.userId = this.userInfo().id
-      params.pageSize = 1000
-      params.pageNo = 1
-      getAction(this.url.getList, params)
-        .then((res) => {
+      },
+      ...mapGetters(['nickname', 'avatar', 'userInfo']),
+      onChange(e) {
+        console.log(`checked = ${e.target.value}`)
+      },
+      handleChange(value) {
+        getAction('/ctop/product/list', { advertiserId: value, pageSize: 1000 }).then((res) => {
           if (res.success) {
-            this.list = res.result.records
-          } else {
-            this.$message.warning(res.message)
+            this.listProduct = res.result.records
           }
         })
-        .finally(() => {})
-    },
-    getSupplierList() {
-      var params = {}
-      getAction('/ctop/supplierList/list',{pageNo:1,pageSize:100}).then((res) => {
-        if (res.success) {
-          this.supplierList = res.result.records
-        } else {
-          this.$message.warning(res.message)
-        }
-      })
-    },
-    add(item) {
-      this.editAll = false
-      this.edit({
-        responsibleId: this.userInfo().id, //用户Id
-        mediaId: '2',
-        ...item,
-      })
-    },
-    edit(record) {
-      this.getSupplierList()
-      this.getList()
-      this.getOcpxList()
-      if (record.advertiserId) {
-        this.editAll = true
-        getAction('/ctop/product/list', { advertiserId: record.advertiserId, pageSize: 1000 }).then((res) => {
+      },
+      handleBlur() { },
+      handleFocus() { },
+      filterOption(input, option) {
+        return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      },
+      getList() {
+        var params = {}
+        params.userId = this.userInfo().id
+        params.pageSize = 1000
+        params.pageNo = 1
+        getAction(this.url.getList, params)
+          .then((res) => {
+            if (res.success) {
+              this.list = res.result.records
+            } else {
+              this.$message.warning(res.message)
+            }
+          })
+          .finally(() => { })
+      },
+      getSupplierList() {
+        var params = {}
+        getAction('/ctop/supplierList/list', { pageNo: 1, pageSize: 100 }).then((res) => {
           if (res.success) {
-            this.listProduct = res.result.records
+            this.supplierList = res.result.records
+          } else {
+            this.$message.warning(res.message)
           }
         })
-      }
-      // else if (this.request == '2,4') {
-      //         params.type = 'kuaishou'
-      //       }
-      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)
-        this.showDian = true
-      } else {
-        var { ocpxActionType, bidType, ...params } = record
-        this.showDian = false
-      }
-      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
-      // if (record.mediaId == '2' || record.mediaId == '4') {
-      //   this.model.bidType = this.model.bidType == null ? [2] : JSON.parse(this.model.bidType)
-      //   this.model.ocpxActionType = this.model.ocpxActionType == null ? [2] : JSON.parse(this.model.ocpxActionType)
-      // }
-      this.visible = true
-      console.log(this.model)
-      this.$nextTick(() => {
+      },
+      add(item) {
+        this.editAll = false
+        this.edit({
+          responsibleId: this.userInfo().id, //用户Id
+          mediaId: '2',
+          ...item,
+        })
+      },
+      edit(record) {
+        this.getSupplierList()
+        this.getList()
+        this.getOcpxList()
         if (record.advertiserId) {
-          this.form.setFieldsValue(
-            pick(
-              this.model,
-              'projectName',
-              'advertiserId',
-              'productId',
-              'maxBid',
-              'maxDeepCpaBid',
-              'designResponsibleId',
-              'responsibleId',
-
-              'supplierCode',
-              // 'advertiserType',
-              'saleId',
-              'bidType'
-            )
-          )
+          this.editAll = true
+          getAction('/ctop/product/list', { advertiserId: record.advertiserId, pageSize: 1000 }).then((res) => {
+            if (res.success) {
+              this.listProduct = res.result.records
+            }
+          })
+        }
+        // else if (this.request == '2,4') {
+        //         params.type = 'kuaishou'
+        //       }
+        if (record.mediaId == '2' || record.mediaId == '4') {
+          var params = { ...record }
+          params.bidType = record.bidType == null || record.bidType == '' ? [] : JSON.parse(record.bidType)
+          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 {
-          this.form.setFieldsValue(
-            pick(
-              this.model,
-              'projectName',
-              'advertiserId',
-              'maxBid',
-              'maxDeepCpaBid',
-              'designResponsibleId',
-              'responsibleId',
-              'supplierCode',
-              // 'advertiserType',
-              'saleId',
-              'bidType',
-              'ocpxActionType'
-            )
-          )
+          var { ocpxActionType, bidType, ...params } = record
+          this.showDian = false
         }
+        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
+        // if (record.mediaId == '2' || record.mediaId == '4') {
+        //   this.model.bidType = this.model.bidType == null ? [2] : JSON.parse(this.model.bidType)
+        //   this.model.ocpxActionType = this.model.ocpxActionType == null ? [2] : JSON.parse(this.model.ocpxActionType)
+        // }
+        this.visible = true
+        console.log(this.model)
+        this.$nextTick(() => {
+          if (record.advertiserId) {
+            this.form.setFieldsValue(
+              pick(
+                this.model,
+                'projectName',
+                'advertiserId',
+                'productId',
+                'maxBid',
+                'maxDeepCpaBid',
+                'designResponsibleId',
+                'responsibleId',
 
-        // this.resId = record.responsibleId
-        // this.shejiId = record.designResponsibleId
-        getAction('/sys/user/getAllUserListV1', '').then((res) => {
-          if (res.success) {
-            this.options = res.result
-          }
-        })
-        getAction('/sys/user/getAllSaleList', '').then((res) => {
-          if (res.success) {
-            this.optionsElse = res.result
-          }
-        })
-        //时间格式化
-      })
-    },
-    close() {
-      this.$emit('close')
-      this.visible = false
-    },
-    handleOk() {
-      const that = this
-      // 触发表单验证
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          that.confirmLoading = true
-          let httpurl = ''
-          let method = ''
-          if (!this.model.id) {
-            httpurl += this.url.add
-            method = 'post'
+                'supplierCode',
+                // 'advertiserType',
+                'saleId',
+                'bidType'
+              )
+            )
           } else {
-            httpurl += this.url.edit
-            method = 'put'
+            this.form.setFieldsValue(
+              pick(
+                this.model,
+                'projectName',
+                'advertiserId',
+                'maxBid',
+                'maxDeepCpaBid',
+                'designResponsibleId',
+                'responsibleId',
+                'supplierCode',
+                // 'advertiserType',
+                'saleId',
+                'bidType',
+                'ocpxActionType'
+              )
+            )
           }
-          var data = values.advertiserId
-          let formData = Object.assign(this.model, values)
-          //   if(this.model.mediaId)
-          formData.maxBid = formData.maxBid * 1000
-          formData.maxDeepCpaBid = formData.maxDeepCpaBid * 1000
+
+          // this.resId = record.responsibleId
+          // this.shejiId = record.designResponsibleId
+          getAction('/sys/user/getAllUserListV1', '').then((res) => {
+            if (res.success) {
+              this.options = res.result
+            }
+          })
+          getAction('/sys/user/getAllSaleList', '').then((res) => {
+            if (res.success) {
+              this.optionsElse = res.result
+            }
+          })
           //时间格式化
-          // formData.advertiserId = data.key
-          // formData.advertiserName = data.label
-          formData.responsibleId = values.responsibleId
-          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.bidType = JSON.stringify(formData.bidType)
-          }
-          httpAction(httpurl, formData, method)
-            .then((res) => {
-              if (res.success) {
-                that.$message.success(res.message)
-                that.$emit('ok')
-                that.confirmLoading = false
+        })
+      },
+      close() {
+        this.$emit('close')
+        this.visible = false
+      },
+      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
+              let httpurl = ''
+              let method = ''
+              if (!this.model.id) {
+                httpurl += this.url.add
+                method = 'post'
               } else {
-                that.$message.warning(res.message)
+                httpurl += this.url.edit
+                method = 'put'
               }
-            })
-            .finally(() => {
-              that.confirmLoading = false
-              that.close()
-            })
-        }
-      })
-    },
-    handleCancel() {
-      this.close()
-    },
-    getFormFieldValue(field) {
-      return this.form.getFieldValue(field)
-    },
-    get(valueName, key) {
-      this.resId = key
-    },
-    getOcpxList() {
-      this.getAction('/ocpx/kuaiShouOcpxActionTypeConfig/list').then((res) => {
-        if (res.success) {
-          this.ocpxList = res.result
+              var data = values.advertiserId
+              let formData = Object.assign(this.model, values)
+              console.log(formData);
+              //   if(this.model.mediaId)
+              if (formData.maxBid) {
+                formData.maxBid = formData.maxBid * 1000
+              }
+              if (formData.maxDeepCpaBid) {
+                formData.maxDeepCpaBid = formData.maxDeepCpaBid * 1000
+              }
+
+              //时间格式化
+              // formData.advertiserId = data.key
+              // formData.advertiserName = data.label
+              formData.responsibleId = values.responsibleId
+              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.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) {
+                    that.$message.success(res.message)
+                    that.$emit('ok')
+                    that.confirmLoading = false
+                  } else {
+                    that.$message.warning(res.message)
+                  }
+                })
+                .finally(() => {
+                  that.confirmLoading = false
+                  that.close()
+                })
+            }
+          })
+
         }
-      })
+
+      },
+      handleCancel() {
+        this.close()
+      },
+      getFormFieldValue(field) {
+        return this.form.getFieldValue(field)
+      },
+      get(valueName, key) {
+        this.resId = key
+      },
+      getOcpxList() {
+        this.getAction('/ocpx/kuaiShouOcpxActionTypeConfig/list').then((res) => {
+          if (res.success) {
+            this.ocpxList = res.result
+          }
+        })
+      },
     },
-  },
-}
+  }
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped></style>

+ 7 - 1
src/views/modules/autoLaunch/trusteeship/index.vue

@@ -205,7 +205,7 @@
             <div class="table-page-search-wrapper">
                 <a-form layout="inline" :form="form" hide-required-mark :selfUpdate="true" @submit="handleQueryList">
                     <a-row :gutter="24" v-if="tabKey === 1">
-                        <a-col :md="12" :sm="12" :xxl="12">
+                        <a-col :md="8" :sm="8" :xxl="8">
                             <a-form-item label="账户名称">
                                 <selectTreeAccount
                                     v-decorator="['accountId', { initialValue: undefined }]"
@@ -215,6 +215,12 @@
                             </a-form-item>
                         </a-col>
                         <a-col :md="8" :sm="8" :xxl="8">
+                            <a-form-item label="策略名称">
+                                <a-input placeholder="请输入策略名称" v-decorator="['name', { initialValue: undefined }]"/>
+                            </a-form-item>
+                        </a-col>
+                        
+                        <a-col :md="8" :sm="8" :xxl="8">
                             <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
                                 <a-button type="primary" icon="search" @click="handleQueryList">查询</a-button>
                                 <a-button type="primary" @click="handleResetForm" icon="reload" class="middle-button"

+ 3 - 1
src/views/modules/earlyWarningRules/historyWarning.vue

@@ -67,6 +67,7 @@
 import JTreeSelect from '@/components/jeecg/JTreeSelect'
 import { httpAction, getAction } from '@/api/manage'
 import Treeselect from './pushTreeSelect.vue'
+import { mapActions, mapGetters } from 'vuex'
 export default {
   name: 'ProjectList',
   components: {
@@ -196,9 +197,10 @@ export default {
         }
       })
     },
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
     getList() {
       var params = {}
-      // params.userId = this.userInfo().id
+      params.userId = this.userInfo().id
       params.pageSize = 1000
       params.pageNo = 1
       getAction('/ctop/advertiser/list', params)

+ 218 - 185
src/views/modules/kuaishouapp/batchCreation/creat/creatUnit.vue

@@ -859,76 +859,113 @@
       @cancel="cancelAll"
       :width="1000"
     >
-      <a-tabs type="card" @change="callback" v-model="active" class="check-video">
-        <div slot="tabBarExtraContent"> 
-          当前选择数量
-          {{ sumContent + '/' + (getData('createType')=='0'?getData('createCount'):getData('createCount')*15) }}
-          <a-button  type="primary" @click="tongbu()" :loading="tongbuLoading" style="margin-left:10px">
-          刷新素材</a-button
-        >
-        </div>
-         
-        <a-tab-pane :tab="item.label" v-for="item of tab" :key="item.value">
-          <a-row :gutter="24">
-            <a-col :span="9">
-              <a-form-item label="日期选择" :labelCol="labelCol" :wrapperCol="wrapperCol">
-                <a-range-picker name="buildTime" v-model="time" />
-              </a-form-item>
-            </a-col>
-             <a-col :span="9">
-              <a-form-item label="唯一标识" :labelCol="labelCol" :wrapperCol="wrapperCol">
-                  <a-input placeholder="请输入唯一标识,多个以,隔开" v-model="md5Str"/>
-              </a-form-item>
-            </a-col>
-            <a-col :span="4">
-              <a-button style="position: relative;top: 4px;" @click="selectAllVideo">
-                全选
-              </a-button>
-              <a-button type="primary" style="position: relative;top: 4px;margin-left:5px" @click="searchVideo">
-                搜索
-              </a-button>
-            </a-col>
-
-            <!-- <a-col :span="12">
-              <a-form-item label="筛选条件" :labelCol="labelCol" :wrapperCol="wrapperCol">
-                <a-select v-model="orderBy" style="width: 100%">
-                  <a-select-option value="time"> 按时间排序 </a-select-option>
-                  <a-select-option value="cost"> 按消耗排序</a-select-option>
-                </a-select>
-              </a-form-item>
-            </a-col> -->
-          </a-row>
+        <a-row :gutter="24">
+          <a-col :span="8">
+            <a-form-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
+              <a-radio-group v-model="mediaDimension" style="width: 300px"> 
+                <a-radio-button value="a">按时间查询</a-radio-button>
+                <a-radio-button value="b">按消耗查询</a-radio-button>
+              </a-radio-group>
+            </a-form-item>
+          </a-col>
+          <a-col :span="8" v-if="mediaDimension == 'a'">
+            <a-form-item label="日期选择" :labelCol="labelCol" :wrapperCol="wrapperCol">
+              <a-range-picker name="buildTime" v-model="time" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="8" v-else>
+            <a-form-item label="消耗时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
+              <a-select v-model="costType" placeholder="请选择消耗时间" style="width: 100%">
+                <a-select-option :value="1">昨天</a-select-option>
+                <a-select-option :value="2">近七天</a-select-option>
+                <a-select-option :value="3">近14天</a-select-option>
+                <a-select-option :value="4">近一个月</a-select-option>
+                <a-select-option :value="5">近三个月</a-select-option>
+                <a-select-option :value="6">近半年</a-select-option>
+                <a-select-option :value="7">近一年</a-select-option>
+                <a-select-option :value="8">全部</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol">
+              当前选择数量
+              {{ sumContent + '/' + (getData('createType')=='0'?getData('createCount'):getData('createCount')*15) }}
+              <a-button  type="primary" @click="tongbu()" :loading="tongbuLoading" style="margin-left:10px"  v-if="mediaDimension == 'a'">
+              刷新素材</a-button>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="8">
+            <a-form-item label="视频ID" :labelCol="labelCol" :wrapperCol="wrapperCol">
+               <a-input placeholder="请输入视频ID" v-model="photoId"/>
+            </a-form-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-item label="视频名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
+               <a-input placeholder="请输入视频名称" v-model="photoName"/>
+            </a-form-item>
+          </a-col>
+          <!-- <a-col :span="8" v-if="mediaDimension == 'a'">
+            <a-form-item label="唯一标识" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                <a-input placeholder="请输入唯一标识,多个以,隔开" v-model="md5Str"/>
+            </a-form-item>
+          </a-col> -->
+          <a-col :span="4">
+            <a-button style="position: relative;top: 4px;" @click="selectAllVideo">
+              全选
+            </a-button>
+            <a-button type="primary" style="position: relative;top: 4px;margin-left:5px" @click="searchVideo">
+              搜索
+            </a-button>
+          </a-col>
+
+          <!-- <a-col :span="12">
+            <a-form-item label="筛选条件" :labelCol="labelCol" :wrapperCol="wrapperCol">
+              <a-select v-model="orderBy" style="width: 100%">
+                <a-select-option value="time"> 按时间排序 </a-select-option>
+                <a-select-option value="cost"> 按消耗排序</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col> -->
+        </a-row>
           
-          <ul v-if="dataSource.length > 0" style="overflow: auto; padding-left: 0">
-            <a-checkbox-group v-model="checkVideo" style="width: 100%" @change="setData">
-              <li v-for="(item, index) of dataSource" :key="index" class="chouzhen" style="height: 400px">
-                <!-- <video class="video" :src="item.url" controls="controls" style="width:100%">
-                  您的浏览器不支持 video 标签。
-                </video> -->
-                <a-checkbox
-                  :value="item.photoId"
-                  style="width: 100%; position: absolute; z-index: 100; right: 0; top: 0"
-                >
-                  <img :src="item.coverUrl" alt="" style="width: 90%; margin-bottom: 30px" />
+        <ul v-if="dataSource.length > 0" style="overflow: auto; padding-left: 0">
+          <a-checkbox-group v-model="checkVideo" style="width: 100%" @change="setData">
+            <li v-for="(item, index) of dataSource" :key="index" class="chouzhen" style="height: 400px">
+              <!-- <video class="video" :src="item.url" controls="controls" style="width:100%">
+                您的浏览器不支持 video 标签。
+              </video> -->
+              <a-checkbox
+                :value="item.photoId"
+                style="width: 100%; position: absolute; z-index: 100; right: 0; top: 0"
+              >
+                <img :src="item.coverUrl" alt="" style="width: 90%; margin-bottom: 30px" />
+                <div>
                   <div style="width: 100%; text-align: center">
-                    {{ item.statDate ? '时间:' + item.statDate.split(' ')[0] : '消耗:' + item.charge }}
+                    {{ item.statDate&&item.channelType == 0 ? 
+                    '内部  ' + item.statDate.split(' ')[0]:item.statDate&&item.channelType == 1 ?
+                    '素造  ' + item.statDate.split(' ')[0]: item.charge&&item.channelType == 0?
+                    '内部  ' + item.charge :'素造  ' + item.charge}}
                   </div>
-                </a-checkbox>
-                <a @click="matemalVideo(item, index)" style="position: absolute; z-index: 100; right: 56px; bottom: 5px"
-                  >查看视频</a
-                >
-              </li>
-            </a-checkbox-group>
-          </ul>
-          <div v-else style="width: 100%; height: 400px; display: flex; justify-content: center; align-items: center">
-            <img
-              src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1575627350102&di=02972956f2243933bffc0d85099adbfe&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D1095310825%2C1528244349%26fm%3D214%26gp%3D0.jpg"
-              alt=""
-              v-if="!loadingVideoList"
-            />
-            <img v-else src="@/views/modules/material/loading.gif" />
-          </div>
-        </a-tab-pane>
+                </div>
+              
+              </a-checkbox>
+              <a @click="matemalVideo(item, index)" style="position: absolute; z-index: 100; right: 56px; bottom: 5px"
+                >查看视频</a
+              >
+            </li>
+          </a-checkbox-group>
+        </ul>
+        <div v-else style="width: 100%; height: 400px; display: flex; justify-content: center; align-items: center">
+          <img
+            src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1575627350102&di=02972956f2243933bffc0d85099adbfe&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D1095310825%2C1528244349%26fm%3D214%26gp%3D0.jpg"
+            alt=""
+            v-if="!loadingVideoList"
+          />
+          <img v-else src="@/views/modules/material/loading.gif" />
+        </div>
         <!-- <a-button slot="tabBarExtraContent" type="primary" @click="tongbu()" :loading="tongbuLoading">
           刷新素材</a-button
         > -->
@@ -1201,6 +1238,9 @@ export default {
     return {
       showNumber:false,
       md5Str:'',
+      photoId:'',
+      photoName:'',
+      costType: 1,
       uriCheck: false,
       templateLoading: false,
       dataOne: [],
@@ -1256,7 +1296,7 @@ export default {
       },
       ipagination: {
         current: 1,
-        pageSize: 5,
+        pageSize: 10,
         //   pageSizeOptions: ['10', '20', '30'],
         showTotal: (total, range) => {
           return range[0] + '-' + range[1] + ' 共' + total + '条'
@@ -1273,6 +1313,7 @@ export default {
       showVideo: true,
       videoList: [],
       orderBy: 'time',
+      mediaDimension: 'a',
       visibleMatemal: false,
       loadingVideoList: false,
       checkVideo: [],
@@ -1401,22 +1442,35 @@ export default {
   },
   methods: {
     searchVideo() {
-      var params = {}
+      let url = '/kuaishou/kuaiShouVideoGet/getBatchV2VideoList'
+      let params = {}
+      // localStorage.getItem('campaignAccountId')
       params.accountId = localStorage.getItem('campaignAccountId')
-      params.materialType = this.creativeMaterialType
       params.pageSize = this.ipagination.pageSize
-      params.pageNo = 1
+      params.pageNo = this.ipagination.current
       params.status = 0
-      params.channelType = this.channelType
-      params.orderBy = this.orderBy
-      params.signatures = this.md5Str
-      if (this.time.length > 0) {
-        // params.startDate = moment(this.time[0]).format('YYYY-MM-DD')
-        // params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
-        params.startDate = moment(this.time[0]).format('YYYY-MM-DD') + ' 00:00:00'
-        params.endDate = moment(this.time[1]).format('YYYY-MM-DD') + ' 23:59:59'
+      params.photoId = this.photoId
+      params.photoName = this.photoName
+      if(this.mediaDimension == 'a'){
+        url = '/kuaishou/kuaiShouVideoGet/getBatchV2VideoList'
+        // params.signatures = this.md5Str
+        if (this.time.length > 0) {
+          // params.startDate = moment(this.time[0]).format('YYYY-MM-DD')
+          // params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+          params.startDate = moment(this.time[0]).format('YYYY-MM-DD') + ' 00:00:00'
+          params.endDate = moment(this.time[1]).format('YYYY-MM-DD') + ' 23:59:59'
+        }
+      }else if(this.mediaDimension == 'b'){
+        url = '/kuaishou/kuaiShouVideoGet/getVideoListByCostType'
+        params.costType = this.costType
       }
-      this.showVideoList('/kuaishou/kuaiShouVideoGet/getVideoList', params)
+      // params.materialType = this.creativeMaterialType
+
+      // params.channelType = this.channelType
+      // params.orderBy = this.orderBy
+      
+     
+      this.showVideoList(url, params)
     },
     tongbu() {
       this.tongbuLoading = true
@@ -1426,22 +1480,7 @@ export default {
         if (res.success) {
           this.$message.success(res.message)
           this.tongbuLoading = false
-          var params = {}
-          params.accountId = localStorage.getItem('campaignAccountId')
-          params.materialType = this.creativeMaterialType
-          params.pageSize = this.ipagination.pageSize
-          params.pageNo = 1
-          params.status = 0
-          params.channelType = this.channelType
-          params.orderBy = this.orderBy
-          params.signatures = this.md5Str
-          if (this.time.length > 0) {
-            // params.startDate = moment(this.time[0]).format('YYYY-MM-DD')
-            // params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
-            params.startDate = moment(this.time[0]).format('YYYY-MM-DD') + ' 00:00:00'
-            params.endDate = moment(this.time[1]).format('YYYY-MM-DD') + ' 23:59:59'
-          }
-          this.showVideoList('/kuaishou/kuaiShouVideoGet/getVideoList', params)
+          this.searchVideo()
         } else {
           this.$message.error(res.message)
           this.tongbuLoading = false
@@ -1753,13 +1792,13 @@ export default {
           }
         }
       }
-      for (let i = 0; i < this.checkVideoWai.length; i++) {
-        for (let j = 0; j < this.checkVideoWai[i].length; j++) {
-          if (this.checkVideoWai[i][j] == item.photoId) {
-            this.checkVideoWai[i] = this.checkVideo
-          }
-        }
-      }
+      // for (let i = 0; i < this.checkVideoWai.length; i++) {
+      //   for (let j = 0; j < this.checkVideoWai[i].length; j++) {
+      //     if (this.checkVideoWai[i][j] == item.photoId) {
+      //       this.checkVideoWai[i] = this.checkVideo
+      //     }
+      //   }
+      // }
       this.sumContent = this.checkVideo.length
       // var deleteIndexAll = this.checkVideoAll.findIndex((c) => c == item.photoId)
       // this.checkVideoAll.splice(deleteIndexAll, 1)
@@ -1789,17 +1828,17 @@ export default {
       this.checkVideo = this.dataSource.map((item) => {
         return item.photoId
       })
-      if (this.active == 0) {
+      // if (this.active == 0) {
         for (let i = 0; i < this.ipagination.current; i++) {
           this.checkVideoAll.push([])
         }
         this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
-      } else if (this.active == 1) {
-        for (let i = 0; i < this.ipagination.current; i++) {
-          this.checkVideoWai.push([])
-        }
-        this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
-      }
+      // } else if (this.active == 1) {
+      //   for (let i = 0; i < this.ipagination.current; i++) {
+      //     this.checkVideoWai.push([])
+      //   }
+      //   this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
+      // }
       var sum = 0
       for (let i = 0; i < this.checkVideoAll.length; i++) {
         sum += this.checkVideoAll[i].length
@@ -1812,13 +1851,11 @@ export default {
         if (sum > this.getData('createCount')) {
           this.$message.error('最多选择' + this.getData('createCount') + '个素材')
           this.checkVideo = []
-          this.sumContent = this.sumContent - 5
+          this.sumContent = this.sumContent - 10
 
-          if (this.active == 0) {
+          // if (this.active == 0) {
             this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
-          } else if (this.active == 1) {
-            this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
-          }
+         
         }
       } else {
         if (sum > this.getData('createCount') * 15) {
@@ -1826,26 +1863,26 @@ export default {
           this.checkVideo = []
           this.sumContent = this.sumContent - 15
 
-          if (this.active == 0) {
+          // if (this.active == 0) {
             this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
-          } else if (this.active == 1) {
-            this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
-          }
+          // } else if (this.active == 1) {
+          //   this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
+          // }
         }
       }
     },
     setData(data) {
-      if (this.active == 0) {
+      // if (this.active == 0) {
         for (let i = 0; i < this.ipagination.current; i++) {
           this.checkVideoAll.push([])
         }
         this.checkVideoAll[this.ipagination.current - 1] = data
-      } else if (this.active == 1) {
-        for (let i = 0; i < this.ipagination.current; i++) {
-          this.checkVideoWai.push([])
-        }
-        this.checkVideoWai[this.ipagination.current - 1] = data
-      }
+      // } else if (this.active == 1) {
+      //   for (let i = 0; i < this.ipagination.current; i++) {
+      //     this.checkVideoWai.push([])
+      //   }
+      //   this.checkVideoWai[this.ipagination.current - 1] = data
+      // }
 
       var sum = 0
       for (let i = 0; i < this.checkVideoAll.length; i++) {
@@ -1861,22 +1898,22 @@ export default {
           this.$message.error('最多选择' + this.getData('createCount') + '个素材')
           this.checkVideo.pop()
           this.sumContent--
-          if (this.active == 0) {
+          // if (this.active == 0) {
             this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
-          } else if (this.active == 1) {
-            this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
-          }
+          // } else if (this.active == 1) {
+          //   this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
+          // }
         }
       } else {
         if (sum > this.getData('createCount') * 15) {
           this.$message.error('最多选择' + this.getData('createCount') * 15 + '个素材')
           this.checkVideo.pop()
           this.sumContent--
-          if (this.active == 0) {
+          // if (this.active == 0) {
             this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
-          } else if (this.active == 1) {
-            this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
-          }
+          // } else if (this.active == 1) {
+            // this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
+          // }
         }
       }
     },
@@ -1888,38 +1925,33 @@ export default {
         this.showVideo = false
         this.checkVideo = []
       }
-      this.active = 0
-      this.time = []
-      this.channelType = 0
+      // this.active = 0
+      // this.time = []
+      // this.channelType = 0
       this.creativeMaterialType = this.getData('creativeMaterialType')
+      this.searchVideo()
+
+      // this.getAction('/kuaishou/kuaiShouVideoGet/getBatchV2VideoList', {accountId:10168379}).then(res=>{
+      //   console.log(res)
+      // })
+      // this.getAction('/kuaishou/kuaiShouVideoGet/getVideoListByCostType', {accountId:10168379,costType:1}).then(res=>{
+      //   console.log(res)
+      // })
     },
     getDataSource(page, pageSize) {
-      if (this.active == 0) {
-        this.checkVideo = this.checkVideoAll[page - 1]
-      } else if (this.active == 1) {
-        this.checkVideo = this.checkVideoWai[page - 1]
-      }
+
       this.ipagination.current = page
-      var params = {}
-      params.accountId = localStorage.getItem('campaignAccountId')
-      params.materialType = this.creativeMaterialType
-      params.pageSize = this.ipagination.pageSize
-      params.pageNo = page
-      params.channelType = this.channelType
-      params.status = 0
-      params.orderBy = this.orderBy
-      params.signatures = this.md5Str
-      if (this.time.length > 0) {
-        // params.startDate = moment(this.time[0]).format('YYYY-MM-DD')
-        // params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
-        params.startDate = moment(this.time[0]).format('YYYY-MM-DD') + ' 00:00:00'
-        params.endDate = moment(this.time[1]).format('YYYY-MM-DD') + ' 23:59:59'
-      }
-      this.showVideoList('/kuaishou/kuaiShouVideoGet/getVideoList', params)
+      this.searchVideo()
     },
     cancelAll() {
       // this.checkVideoAll = []
       // this.checkVideoWei = []
+      this.ipagination.current = 1
+      this.mediaDimension = 'a'
+      this.time = []
+      this.costType = 1
+      this.photoId = ''
+      this.photoName = ''
       this.visibleMatemal = false
       this.md5Str = ""
     },
@@ -1933,6 +1965,7 @@ export default {
         if (i == this.checkVideo.length - 1) {
           this.showVideo = true
           this.visibleMatemal = false
+          this.cancelAll()
         }
       }
     },
@@ -2541,32 +2574,33 @@ export default {
       // this.checkVideo = [...new Set(n)]
     },
     time(n, o) {
-      if (n.length > 0) {
-        var params = {}
-        params.accountId = localStorage.getItem('campaignAccountId')
-        params.materialType = this.creativeMaterialType
-        params.pageSize = this.ipagination.pageSize
-        params.pageNo = 1
-        params.status = 0
-        params.channelType = this.channelType
-        params.startDate = moment(n[0]).format('YYYY-MM-DD') + ' 00:00:00'
-        params.endDate = moment(n[1]).format('YYYY-MM-DD') + ' 23:59:59'
-        params.orderBy = this.orderBy
-        params.signatures = this.md5Str
-        this.showVideoList('/kuaishou/kuaiShouVideoGet/getVideoList', params)
-      } else {
-        var params = {}
-        params.accountId = localStorage.getItem('campaignAccountId')
-        params.materialType = this.creativeMaterialType
-        params.pageSize = this.ipagination.pageSize
-        params.pageNo = 1
-        params.status = 0
-        params.channelType = this.channelType
-        params.orderBy = this.orderBy
-        params.signatures = this.md5Str
-        this.ipagination.current = 1
-        this.showVideoList('/kuaishou/kuaiShouVideoGet/getVideoList', params)
-      }
+      this.searchVideo()
+      // if (n.length > 0) {
+      //   var params = {}
+      //   params.accountId = localStorage.getItem('campaignAccountId')
+      //   params.materialType = this.creativeMaterialType
+      //   params.pageSize = this.ipagination.pageSize
+      //   params.pageNo = 1
+      //   params.status = 0
+      //   params.channelType = this.channelType
+      //   params.startDate = moment(n[0]).format('YYYY-MM-DD') + ' 00:00:00'
+      //   params.endDate = moment(n[1]).format('YYYY-MM-DD') + ' 23:59:59'
+      //   params.orderBy = this.orderBy
+      //   params.signatures = this.md5Str
+      //   this.showVideoList('/kuaishou/kuaiShouVideoGet/getVideoList', params)
+      // } else {
+      //   var params = {}
+      //   params.accountId = localStorage.getItem('campaignAccountId')
+      //   params.materialType = this.creativeMaterialType
+      //   params.pageSize = this.ipagination.pageSize
+      //   params.pageNo = 1
+      //   params.status = 0
+      //   params.channelType = this.channelType
+      //   params.orderBy = this.orderBy
+      //   params.signatures = this.md5Str
+      //   this.ipagination.current = 1
+      //   this.showVideoList('/kuaishou/kuaiShouVideoGet/getVideoList', params)
+      // }
     },
   },
   mounted: function () {
@@ -2584,7 +2618,6 @@ export default {
         this.addGroup()
       }
     })
-
     getAction('/kuaishou/batch/getWhiteList', {
       accountId: localStorage.getItem('campaignAccountId'),
     }).then((res) => {

+ 2 - 2
src/views/modules/kuaishouapp/newBatch/result.vue

@@ -378,7 +378,7 @@ export default {
     },
   },
   created() {
-    // this.queryParam.userId = this.userInfo().id
+    this.queryParam.userId = this.userInfo().id
     this.getList(null)
   },
   methods: {
@@ -387,7 +387,7 @@ export default {
     },
     getList(value) {
       var params = {}
-      // params.userId = this.userInfo().id
+      params.userId = this.userInfo().id
       params.pageSize = 50
       params.pageNo = 1
       params.name = value

+ 5 - 0
src/views/modules/policy-management/policy-management.vue

@@ -500,6 +500,7 @@
                                 <a-select-option :value="5">阿里内广</a-select-option>
                                 <a-select-option :value="6">快手服务商</a-select-option>
                                 <a-select-option :value="7">磁力金牛</a-select-option>
+                                <a-select-option :value="8">头条内广</a-select-option>
                             </a-select>
                         </a-form-model-item>
                         <a-form-model-item label="销售" prop="createUserId">
@@ -809,6 +810,10 @@ export default {
                 {
                     id: 7,
                     name: '磁力金牛'
+                },
+                {
+                    id: 8,
+                    name: '头条内广'
                 }
 
             ],

+ 1 - 1
vue.config.js

@@ -105,7 +105,7 @@ module.exports = {
         // target: 'http://192.168.1.43:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.43:8806', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        // target: 'http://192.168.1.59:7701', //请求本地 需要jeecg-boot后台项目  赵西安
+        target: 'http://192.168.1.59:7701', //请求本地 需要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后台项目