朱鑫波 4 éve
szülő
commit
c3008ce30a

+ 1 - 0
src/views/modules/kuaishouapp/crossAccount/createCampaign.vue

@@ -383,6 +383,7 @@ export default {
               localStorage.setItem('crossAccountCampaign', JSON.stringify(res.result))
               this.loading = false
               this.$router.replace({ path: '/crossAccount/createUnit' })
+              this.$bus.$emit('remove', '/crossAccount/createCampaign')
             } else {
               this.$message.error(res.message)
               this.loading = false

+ 55 - 4
src/views/modules/kuaishouapp/crossAccount/createCreative.vue

@@ -165,6 +165,11 @@ li.chouzhen.first:before {
           :tab="'组:' + pane.unitName"
           v-for="(pane, index) of form.accountArr"
         >
+          <div style="margin: auto; width: 50%">
+            <a-form-model-item label="账户ID" :label-col="labelCol" :wrapper-col="wrapperCol">
+              <a-input v-model="pane.accountId" disabled style="width: 300px"></a-input>
+            </a-form-model-item>
+          </div>
           <a-layout style="margin: auto; width: 50%">
             <a-layout-content style="padding: 10px">
               <a-row>
@@ -323,7 +328,15 @@ li.chouzhen.first:before {
                       </a-form-item>
                     </div>
 
-                    <a-form-model-item label="广告语">
+                    <a-form-model-item
+                      label="广告语"
+                      :prop="'accountArr.' + index + '.photoArr.' + photoIndex + '.description'"
+                      :rules="{
+                        required: true,
+                        message: '广告语必填,并且小于30个字符',
+                        trigger: 'blur',
+                      }"
+                    >
                       <a @click="showTitle(index, photoIndex)">推荐广告语</a>
                       <div
                         class="step4-else"
@@ -363,9 +376,17 @@ li.chouzhen.first:before {
                         >{{ itemTag.name }}</a-tag
                       > -->
                     </a-form-model-item>
-                    <a-form-item label="创意标题">
+                    <a-form-model-item
+                      label="创意标题"
+                      :prop="'accountArr.' + index + '.photoArr.' + photoIndex + '.creativeName'"
+                      :rules="{
+                        required: true,
+                        message: '创意标题必填',
+                        trigger: 'blur',
+                      }"
+                    >
                       <a-input v-model="item.creativeName"></a-input>
-                    </a-form-item>
+                    </a-form-model-item>
                   </a-card>
                 </a-col>
               </a-row>
@@ -387,7 +408,7 @@ li.chouzhen.first:before {
               />
             </a-form-model-item>
             <!-- v-decorator="['creativeTag', { validator: creativeTagValid }]" -->
-            <a-form-model-item label="创意标签" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-form-model-item label="创意标签">
               <a-select
                 mode="tags"
                 style="width: 100%"
@@ -751,6 +772,23 @@ li.chouzhen.first:before {
       <a-input placeholder="请输入监测链接名称" v-model="trackUrlName" @blur="changeTrackUrlName" style="width: 100%" />
       <span style="color: red" v-if="!showTrackUrlNameElse">名称重复</span>
     </a-modal>
+
+    <a-modal v-model="showCreate" title="创建失败条数">
+      <template slot="footer">
+        <a-button key="back" @click="showCreate = false">取消</a-button>
+        <a-button key="submit" type="primary" @click="tiaozhuan"> 确定 </a-button>
+      </template>
+      <ul v-if="createUnitList.length > 0">
+        <li v-for="(item, index) in createUnitList">
+          <p v-if="item.code == -1">
+            创意名称:{{ item.creativeName }},创建失败 <br /><span style="margin-left: 10px"
+              >失败原因:{{ item.message }}</span
+            >
+          </p>
+        </li>
+      </ul>
+      <div v-else style="width: 100%; height: 200px; text-align: center; line-height: 200px">无创建失败条数</div>
+    </a-modal>
   </a-card>
 </template>
 
@@ -963,11 +1001,17 @@ export default {
       trackUrlName: '',
 
       submitFormLoading: false, //提交loading
+      createUnitList: [],
+      createUnitSuccess: [],
+      showCreate: false,
     }
   },
   methods: {
     //调用vuex状态管理方法
     ...mapGetters(['nickname', 'avatar', 'userInfo']),
+    tiaozhuan() {
+      this.$bus.$emit('remove', '/crossAccount/createCreative')
+    },
     changeAccount(data) {
       // pane.unitId + '@' + pane.accountId + '@' + pane.campaignId
       var dataArr = data.split('@')
@@ -1013,6 +1057,13 @@ export default {
             console.log(res)
             if (res.success) {
               this.submitFormLoading = false
+              this.showCreate = true
+              this.createUnitList = res.result.filter((item) => {
+                return item.code != 0
+              })
+              this.createUnitSuccess = res.result.filter((item) => {
+                return item.code == 0
+              })
             } else {
               this.submitFormLoading = false
             }

+ 1 - 0
src/views/modules/kuaishouapp/crossAccount/createUnit.vue

@@ -1276,6 +1276,7 @@ export default {
       this.showCreate = false
       localStorage.setItem('crossAccountUnit', JSON.stringify(this.createUnitSuccess))
       this.$router.replace({ path: '/crossAccount/createCreative' })
+      this.$bus.$emit('remove', '/crossAccount/createUnit')
     },
     getPlatForm(appId) {
       if (appId) {