库存盘点获取物料弹框 点击列表行勾选复选框

pull/4/head
qiuhongwu 8 months ago
parent 1cd843e272
commit d117014c9b

@ -20,7 +20,7 @@
</el-form>
</ContentWrap>
<el-card class="hl-table">
<el-table ref="matSubFormRef" :data="list" v-loading="formLoading" class="hl-table" @selection-change="handleSelectionChange" :row-key="getRowKeys" min-width="1800">
<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-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" />
@ -48,6 +48,7 @@
import { ref } from 'vue'
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import * as StorageLogApi from '@/api/heli/storagelog'
import { ElTable } from 'element-plus'
//:selectable="row=>row.disabled || chkboxEnable"
const chkboxEnable = ref(true)
@ -61,12 +62,22 @@ const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 12
const list = ref([]) //
const total = ref(0) //
const multipleSelection = ref([])
const matSubFormRef = ref()
const handleSelectionChange = async (val) => {
const multipleTable = ref<InstanceType<typeof ElTable>>()
const multipleSelection = ref([])
const handleSelectionChange = (val: []) => {
multipleSelection.value = val
}
const clickRow = (row: any) => {
if(row){
multipleTable.value!.toggleRowSelection(row, undefined)
}else{
multipleTable.value!.clearSelection()
}
}
//key,
const getRowKeys = (row) => {
return row.matId

Loading…
Cancel
Save