소스 검색

修改bug

chenrui 1 년 전
부모
커밋
dbc325c1f4

+ 1 - 1
src/views/purchasingManagement/purchaseReturn/purchaseReturnDeatil.vue

@@ -88,7 +88,7 @@
           class="sTable"
           ref="table"
           size="small"
-          :rowKey="(record,index) => index"
+          :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
           :defaultLoadData="false"

+ 2 - 2
src/views/purchasingManagement/purchaseReturn/queryPart.vue

@@ -49,7 +49,7 @@
       class="sTable"
       ref="chooseTable"
       size="small"
-      :rowKey="(record,i) => i"
+      :rowKey="(record) => record.id"
       :row-selection="{ columnWidth: 40,getCheckboxProps: record => ({ props: { disabled: record.currentStockQty == 0 || record.isCheckedFlag} }) }"
       @rowSelection="rowSelectionFun"
       :columns="columns"
@@ -211,7 +211,7 @@ export default {
     handleAdd (row) {
       const selectArr = this.rowSelectionInfo ? this.rowSelectionInfo.selectedRowKeys : null
       if (selectArr && selectArr.length > 0) {
-        const pot = selectArr.findIndex(item => { return item == row.sparePartsDetailSn })
+        const pot = selectArr.findIndex(item => { return item == row.id })
         selectArr.splice(pot, 1)
         const index = this.rowSelectionInfo.selectedRows.findIndex(item => { return item.sparePartsDetailSn == row.sparePartsDetailSn })
         this.rowSelectionInfo.selectedRows.splice(index, 1)