zhuxinbo il y a 5 ans
Parent
commit
d823311b4b
1 fichiers modifiés avec 23 ajouts et 3 suppressions
  1. 23 3
      src/views/modules/kuaishouapp/account/advertisingGroup.vue

+ 23 - 3
src/views/modules/kuaishouapp/account/advertisingGroup.vue

@@ -149,12 +149,16 @@
     </a-modal>
     <a-modal title="拷贝" v-model="visibleCopy" :width="900">
 
-      <a-form>
+      <a-form :form="form">
         <a-form-item label="广告计划名称" :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
           :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }">
           <a-select style="width:100%" optionFilterProp="children" showSearch :filterOption="filterOption" v-decorator="[
-          'campaignId'
+          'campaignId',
+           {
+            initialValue:campaignId
+          }
         ]">
+            <!-- initialValue -->
             <a-select-option v-for="item in campaignList" :key="item.value" :value="item.value+''">{{
             item.label
           }}</a-select-option>
@@ -167,9 +171,19 @@
           {
             initialValue: 1
           }
-        ]" :max="10" style="width:100%">
+        ]" :max="10" :min="1" style="width:100%">
           </a-input-number>
         </a-form-item>
+        <a-form-item label="广告组名称生成类型" :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
+          :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }" v-if="getData('createCount')>1">
+          <a-radio-group buttonStyle="solid" v-decorator="[
+          'createType',
+           {
+            initialValue:'1' } ]">
+            <a-radio-button value="1">系统生成</a-radio-button>
+            <a-radio-button value="2">自定义</a-radio-button>
+          </a-radio-group>
+        </a-form-item>
       </a-form>
       <template slot="footer">
         <a-button key="submit" type="primary" @click="handleSubmitCopy" :loading='loading'>
@@ -412,6 +426,7 @@
         campaignType: '2',
         campaignId: localStorage.getItem('advertisingGroupKey'),
         createCount: 1,
+        form: this.$form.createForm(this),
         campaignList: [],
         showEdit: false,
         visibleCopy: false,
@@ -564,6 +579,9 @@
       //     }
       //   }
       // },
+      getData(className) {
+        return this.form.getFieldValue(className)
+      },
       filterOption(input, option) {
         return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       },
@@ -665,6 +683,7 @@
       copyDetail(item) {
         this.visibleCopy = true
         this.campaignId = localStorage.getItem('advertisingGroupKey')
+        this.form.resetFields()
         this.getCampaignList()
         var params = {}
         params.accountId = item.accountId
@@ -1018,6 +1037,7 @@
           if (res.success) {
             this.loading = false
             this.visibleCopy = false
+            this.form.resetFields()
             this.getDataList(localStorage.getItem('advertisingGroupKey'))
 
             this.allForm.group = []