出入库复选框问题修改
This commit is contained in:
parent
97ef19ccde
commit
3b9d0130bf
@ -21,7 +21,7 @@
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
<el-card class="hl-table">
|
||||
<el-table ref="multipleTable" :data="list" v-loading="formLoading" class="hl-table" @selection-change="handleSelectionChange" :row-key="getRowKeys" min-width="1800" @row-click="clickRow">
|
||||
<el-table ref="multipleTable" :data="list" v-loading="formLoading" class="hl-table" @selection-change="handleSelectionChange" :row-key="getRowKeys" @row-click="clickRow" :selection="true" :reserve-selection="true" min-width="1800" >
|
||||
<el-table-column type="selection" width="55" :reserve-selection="true" :selectable="row=>chkboxEnable" />
|
||||
<!-- <el-table-column prop="no" label="序号" min-width="120" align="center" /> -->
|
||||
<el-table-column label="序号" type="index" min-width="120" align="center" />
|
||||
@ -56,11 +56,9 @@
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import * as StorageLogApi from '@/api/heli/storagelog'
|
||||
import * as ProcessBomApi from '@/api/heli/processbom'
|
||||
import { ElTable } from 'element-plus'
|
||||
import {formatDate} from "@/utils/formatTime";
|
||||
|
||||
//:selectable="row=>row.disabled || chkboxEnable"
|
||||
const chkboxEnable = ref(true)
|
||||
@ -92,7 +90,12 @@ const clickRow = (row: any) => {
|
||||
}
|
||||
//指定key值,数据更新之后保留之前选中的数据
|
||||
const getRowKeys = (row) => {
|
||||
return row.matId
|
||||
if (formType.value == 'out'){
|
||||
return `${row.whId}_${row.matCode}_${row.pnId}`
|
||||
}else {
|
||||
return row.id
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
const queryReqVo: any = reactive({
|
||||
|
@ -21,7 +21,7 @@
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
<el-card class="hl-table">
|
||||
<el-table ref="multipleTable" :data="list" v-loading="formLoading" class="hl-table" @selection-change="handleSelectionChange" :row-key="getRowKeys" selection min-width="1800" @row-click="clickRow">
|
||||
<el-table ref="multipleTable" :data="list" v-loading="formLoading" class="hl-table" @selection-change="handleSelectionChange" :row-key="getRowKeys" :reserve-selection="true" selection min-width="1800">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" min-width="120" align="center" />
|
||||
<el-table-column prop="projectCode" label="项目编号" min-width="120" align="center" />
|
||||
|
Loading…
Reference in New Issue
Block a user