Browse Source

表格行内编辑

ymy 2 năm trước cách đây
mục cha
commit
75f4c1ea3e

+ 5 - 1
src/benyun/components/byBill/byBill.vue

@@ -41,7 +41,7 @@
               <by-tool :ref="'tableTool_'+index" :propConfig="item.tool" @clickHandle="clickHandle($event,'billTable_'+index)" />
             </div>
             <div class="table" v-if="item.table">
-              <by-table :propConfig="item.table" :ref="'billTable_'+index" />
+              <by-table :propConfig="item.table" :ref="'billTable_'+index" @onChangeRow="onChangeRow" />
             </div>
           </div>
         </template>
@@ -283,6 +283,10 @@ export default class ByBill extends VueViews {
     return v;
   }
 
+  onChangeRow(row:any){
+    this.$emit('onChangeRow',row);
+  }
+
   //获取单据表格已选数据
   /**
    * 

+ 5 - 1
src/benyun/components/moduleView/moduleView.vue

@@ -19,7 +19,7 @@
     <div class="module-main" v-if="tableConfig">
       <slot name="left"></slot>
       <div class="table">
-        <by-table :propConfig="tableConfig" :ref="tableID" @pagination="paginationChange" @detail="detail" />
+        <by-table :propConfig="tableConfig" :ref="tableID" @pagination="paginationChange" @detail="detail" @onChangeRow="onChangeRow" />
       </div>
     </div>
   </div>
@@ -105,6 +105,10 @@ export default class ModuleView extends ModuleViewHandle {
     this.$emit('pagination',page)
     // this.getList();
   }
+
+  onChangeRow(row:any){
+    this.$emit('onChangeRow',row);
+  }
 }
 </script>