qymljy 2 роки тому
батько
коміт
c2d9db7e1e

+ 17 - 17
src/HDrpManagement/prodectFileData/components/add.vue

@@ -7,11 +7,6 @@
         @close="onClose"
     >
       <div>
-<!--        <table_list :layout="tablecols" :opwidth="200" :data="productsList" :custom="true" :height="tableHieght" :checkbox="true">-->
-<!--          <template  v-slot:customcol="scope">-->
-<!--            <p >{{scope.column.data[scope.column.columnname]}}</p>-->
-<!--          </template>-->
-<!--        </table_list>-->
         <tablelayout :layout="tablecols" :data="productsList" :custom="true" :checkbox="true" height="calc(100vh - 452px)" @checkboxCallBack="checkboxCallBack">
           <template v-slot:customcol="scope">
             <div v-if="scope.column.columnname === 'province'">
@@ -19,7 +14,16 @@
             </div>
             <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
           </template>
+
         </tablelayout>
+
+      </div>
+      <div>
+        <p style="margin-top: 2%">已选{{selected}}个商品,共{{total}}个商品</p>
+      </div>
+      <div class="dialog-footer">
+        <el-button size="small" @click="drawer = false" class="normal-btn-width">取消</el-button>
+        <el-button size="small" type="primary" @click="onSubmit"  class="normal-btn-width btn-primary">确定</el-button>
       </div>
     </el-dialog>
   </div>
@@ -45,7 +49,9 @@ export default {
       productsList:[],
       multipleSelection: [],
       tablecols:[],
-      tableHieght:420
+      tableHieght:420,
+      selected:0,
+      total:0
     }
   },
   components:{
@@ -77,19 +83,13 @@ export default {
       })
       console.log(res)
       this.productsList = res.data
+      this.total = res.total
     },
-    // toggleSelection(rows) {
-    //   if (rows) {
-    //     rows.forEach(row => {
-    //       this.$refs.multipleTable.toggleRowSelection(row);
-    //     });
-    //   } else {
-    //     this.$refs.multipleTable.clearSelection();
-    //   }
-    // },
-
-    handleSelectionChange(val) {
+    checkboxCallBack(val){
+      console.log(val)
       this.multipleSelection = val;
+      this.selected = val.length
+
     },
     async onSubmit(){
       console.log(this.multipleSelection)

+ 1 - 1
src/HDrpManagement/prodectFileData/components/fileTable.vue

@@ -19,7 +19,7 @@ export default {
   props:["id"],
   data(){
     return {
-      tableHieght:420,
+      tableHieght:220,
       tablecols:[],
       list:[]
     }

+ 1 - 1
src/HDrpManagement/prodectFileData/components/relationDel.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="inline-16">
     <el-popconfirm
-        title="确定删除此产品技术资料档案吗?"
+        title="确定删除此商品吗?"
         @confirm="deleteRow()">
       <el-button slot="reference" size="small" type="text">删 除</el-button>
     </el-popconfirm>