Pārlūkot izejas kodu

提交查看审批页面

caojunjie 4 gadi atpakaļ
vecāks
revīzija
7e6e2a2abc
2 mainītis faili ar 20 papildinājumiem un 10 dzēšanām
  1. 3 1
      src/views/index.vue
  2. 17 9
      src/views/viewApproval.vue

+ 3 - 1
src/views/index.vue

@@ -173,8 +173,10 @@ export default {
   methods: {
     addOrUpdateHandle(){
       this.addOrUpdateVisible = true
+      let id = '448'
+      let actId = '110'
       this.$nextTick(() => {
-        this.$refs.addOrUpdate.init()
+        this.$refs.addOrUpdate.init(id,actId)
       })
     },
     getDataList(){

+ 17 - 9
src/views/viewApproval.vue

@@ -75,16 +75,24 @@ export default {
     }
   },
   methods: {
-    init(val) {
-      this.optionsUsers = []
-      this.visible = true
-      this.addCharge()
-    },
-    addCharge() {
-      let data = {
-        id: 448,
-        actId: 110
+    init(id,actId) {
+      if (id && actId){
+        let data = {
+          id:id,
+          actId:actId
+        }
+        this.optionsUsers = []
+        this.visible = true
+        this.addCharge(data)
+      }else {
+        if(!id){
+          this.$message.error('主表ID为空');
+        }else {
+          this.$message.error('活动ID为空');
+        }
       }
+    },
+    addCharge(data) {
       listCharge(data).then(data => {
         console.log(data)
         this.auditList = data.data