Explorar el Código

列表 数量

yijing hace 1 año
padre
commit
a5c4d57d60
Se han modificado 1 ficheros con 23 adiciones y 15 borrados
  1. 23 15
      src/views/inspectionWork/edit.vue

+ 23 - 15
src/views/inspectionWork/edit.vue

@@ -18,12 +18,11 @@
       </el-row>
       <el-row style="margin-top: 24px">
         <el-table v-show="activeName === '1'" v-if="packingList.length > 0" ref="showPackingListTable"
-          :data="paginatedPackingList" tooltip-effect="dark" :max-height="300" border
-          @selection-change="handleSelectionChange" row-key="id">
-          <el-table-column type="selection" width="55" align="center" :reserve-selection="true"
-            :selectable="checkSelectable"></el-table-column>
+          :data="paginatedPackingList" tooltip-effect="dark" :max-height="300" border row-key="id">
+          <!-- @selection-change="handleSelectionChange" -->
+          <!-- <el-table-column type="selection" width="55" align="center" :reserve-selection="true"
+            :selectable="checkSelectable"></el-table-column> -->
           <el-table-column label="序号" type="index" width="50" align="center"></el-table-column>
-          <!--  label-class-name="DisabledSelection" -->
           <template v-for="column in tableColumns">
             <el-table-column :label="column.label" :prop="column.prop" :show-overflow-tooltip="true"
               :width="column.width" :align="column.align"></el-table-column>
@@ -39,17 +38,20 @@
             </el-table-column> -->
             <el-table-column :key="column.prop" :label="column.label" :prop="column.prop" :show-overflow-tooltip="true"
               :width="column.width" :align="column.align">
-              <template v-if="column.prop === 'categoryCode'" slot-scope="scope">
-                <el-link type="primary" :underline="false" @click="handleDetail(scope.$index, scope.row, 'detail')">
-                  {{ scope.row.categoryCode }}
-                </el-link>
-              </template>
-              <template v-if="column.prop === 'weight'" slot-scope="scope">
-                <el-input v-model="scope.row.weight"></el-input>
-              </template>
-              <template v-else slot-scope="scope">
-                {{ scope.row[column.prop] }}
+              <template slot-scope="scope">
+                <template v-if="column.prop === 'categoryCode'">
+                  <el-link type="primary" :underline="false" @click="handleDetail(scope.$index, scope.row, 'detail')">
+                    {{ scope.row.categoryCode }}
+                  </el-link>
+                </template>
+                <template v-else-if="column.prop === 'weight'">
+                  <el-input v-model="scope.row.weight"></el-input>
+                </template>
+                <template v-else>
+                  {{ scope.row[column.prop] }}
+                </template>
               </template>
+
             </el-table-column>
           </template>
 
@@ -268,6 +270,12 @@ export default {
     }
   },
   methods: {
+    checkSelectable(row, index) {
+
+    },
+    handleSelectionChange() {
+
+    },
     async open(type) {
       this.type = this.$route.query.type;
       this.title = this.type == 'add' ? '新增' : type == 'edit' ? '报工' : '详情';