changhaoning il y a 1 an
Parent
commit
0b1bd3743f
2 fichiers modifiés avec 27 ajouts et 23 suppressions
  1. 10 0
      src/api/pages/common/common.js
  2. 17 23
      src/view/mst/activity/index.vue

+ 10 - 0
src/api/pages/common/common.js

@@ -109,6 +109,16 @@ export default {
     getGoodsForPurchaseReturnByPage:'get_goods_for_purchase_return_by_page',
     //获取员工的范围权限类型
     getPurviewType:'get_purview_type',
+    //获取活动版本
+    getGrade:'get_grade',
+    //获取版本功能
+    getFunction: 'get_function',
+    //获取版本功能(分页)
+    getFunctionByPage: 'get_function_by_page',
+    //获取公司
+    getCompany: 'get_company',
+    //获取公司(分页)
+    getCompanyByPage: 'get_company_by_page',
   },
 }
 

+ 17 - 23
src/view/mst/activity/index.vue

@@ -112,8 +112,8 @@
                            @ok="funIdOk"/>
         </DkFormItem>
         <!--图片路径-->
-        <DkFormItem prop="activityPath" :label="$t('activityBanner')" :required="true" v-if="bannerFlag">
-          <DkPicWall v-model="formData.activityPath"
+        <DkFormItem prop="annexPaths" :label="$t('activityBanner')" v-if="bannerFlag">
+          <DkPicWall v-model="formData.annexPaths"
                      :table="$config.tables.activity" :accept="$config.uploadFileConfig.acceptPicType"></DkPicWall>
         </DkFormItem>
         <!--跳转链接-->
@@ -219,7 +219,6 @@ export default {
       funFlag:false,//活动功能显示标识
       bannerFlag:false,//活动广告显示标识
       itemModal:false,
-      itembutton:null,
       tableData: [],
       tableDataDetail_activityItem: [],
       formData:{
@@ -227,11 +226,14 @@ export default {
         activityName: null,
         activityDescribe:null,
         activityType:null,
+        activityTypeName:null,
         activityStatus:null,
+        activityStatusName:null,
+        activityGradeCode:null,
         beginDate:null,
         endDate:null,
         flgBanner:false,
-        activityPath:'{}' ,
+        annexPaths:null ,
         activityUrl:null,
         gradeCode:null,
         funId:null,
@@ -249,7 +251,7 @@ export default {
         beginDate:null,
         endDate:null,
         flgBanner:false,
-        activityPath:'{}',
+        annexPaths:null,
         activityUrl:null,
         gradeCode:null,
         funId:null,
@@ -346,7 +348,6 @@ export default {
           return
         }
         this.itemModal = true
-        this.itembutton === 'add'
         this.totalForm.activityId = this.$refs['table-select'].batchRows[0].activityId
         this.getActivity(this.totalForm.activityId)
       } else {
@@ -366,7 +367,6 @@ export default {
           return
         }
         this.itemModal = true
-        this.itembutton === 'edit'
         this.totalForm.activityId = this.$refs['table-select'].batchRows[0].activityId
         this.getActivity(this.totalForm.activityId)
         this.getActivityItem(this.totalForm.activityId)
@@ -528,7 +528,6 @@ export default {
               this.excuteNoParam(this.$service.activityService, this.$service.activityService.shelves, [rows[0].activityId], false).then(res => {
                 if (res.code === this.$config.SUCCESS_CODE) {
                   this.$Message.success(this.$t('I_001', {'param': this.$t('下架')}))
-                  this.getData()
                 } else {
                   this.$Message.warning(res.message)
                 }
@@ -540,18 +539,6 @@ export default {
     },
 
     /**
-    * @desc   : 校验按钮
-    * @author : 常皓宁
-    * @date   : 2024/4/15 13:34
-    */
-    openValidData(btnName, rows) {
-      if (btnName === 'edit') {
-
-      }
-      return true;
-    },
-
-    /**
     * @desc   : 提交事件
     * @author : 常皓宁
     * @date   : 2024/4/15 13:19
@@ -578,16 +565,20 @@ export default {
     * @date   : 2024/4/15 13:34
     */
     clear() {
+      console.log('ssssss')
       this.formData = {
         activityId: null,
         activityName: null,
         activityDescribe:null,
         activityType:null,
+        activityTypeName:null,
         activityStatus:null,
+        activityStatusName:null,
+        activityGradeCode:null,
         beginDate:null,
         endDate:null,
         flgBanner:false,
-        activityPath:'{}',
+        annexPaths:null ,
         activityUrl:null,
         gradeCode:null,
         funId:null,
@@ -595,6 +586,9 @@ export default {
         appCode:null,
         cpIds:null,
       }
+      this.gradeFlag = false//活动版本显示标识
+      this.funFlag = false//活动功能显示标识
+      this.bannerFlag= false//活动广告显示标识
     },
     /**
      * @desc   : 通过id查询
@@ -604,8 +598,7 @@ export default {
     detail(id) {
       return this.excuteNoParam(this.$service.activityService, this.$service.activityService.selectById, [id], false).then(res=>{
           if (res.code === this.$config.SUCCESS_CODE) {
-            this.formData = res.data
-            let activityType = this.formData.activityType
+            let activityType = res.data.activityType
             if(activityType === '活动分类-版本'){
               this.gradeFlag = true
               this.funFlag = false
@@ -627,6 +620,7 @@ export default {
               this.funFlag = false
               this.bannerFlag = false
             }
+            this.formData = res.data
           }
       })
     },