|
|
|
@ -12,11 +12,14 @@
|
|
|
|
|
:row="row"
|
|
|
|
|
></ActionBar>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<input class="ds-tb-check" type="checkbox" v-model="allCheck" :indeterminate="someCheck">
|
|
|
|
|
<hot-table ref="hotTb" :data="list" :settings="settings"></hot-table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { defineProps, ref, watch, computed, unref, defineComponent, onMounted, reactive, nextTick } from 'vue'
|
|
|
|
|
import { defineProps, ref, watch, watchEffect, computed, unref, defineComponent, onMounted, reactive, nextTick } from 'vue'
|
|
|
|
|
// 下拉框数据接口
|
|
|
|
|
import { GetFeeCurrencySelectList, GetFeeCodeSelectList } from '/@/api/common'
|
|
|
|
|
import { HotTable } from '@handsontable/vue3';
|
|
|
|
@ -53,6 +56,10 @@
|
|
|
|
|
feeEnName: ''
|
|
|
|
|
}
|
|
|
|
|
const list = ref([])
|
|
|
|
|
// 全部勾选
|
|
|
|
|
const allCheck = ref(false)
|
|
|
|
|
// 部分勾选
|
|
|
|
|
const someCheck = ref(false)
|
|
|
|
|
// 定义表格所有列
|
|
|
|
|
const columns = [
|
|
|
|
|
{
|
|
|
|
@ -62,6 +69,10 @@
|
|
|
|
|
width: 32,
|
|
|
|
|
className: "htCenter",
|
|
|
|
|
readOnly: false
|
|
|
|
|
}, {
|
|
|
|
|
title: '序号',
|
|
|
|
|
width: 130,
|
|
|
|
|
readOnly: true
|
|
|
|
|
}, {
|
|
|
|
|
title: '业务编号',
|
|
|
|
|
width: 130,
|
|
|
|
@ -324,6 +335,45 @@
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
watchEffect(() => {
|
|
|
|
|
// 全选
|
|
|
|
|
if (allCheck.value) {
|
|
|
|
|
list.value.forEach(item => {
|
|
|
|
|
item.selected = true
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
// 取消全选
|
|
|
|
|
list.value.forEach(item => {
|
|
|
|
|
item.selected = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
watch(
|
|
|
|
|
list.value, (val) => {
|
|
|
|
|
let a = 0
|
|
|
|
|
let b = 0
|
|
|
|
|
val.forEach(item => {
|
|
|
|
|
if (item.selected) {
|
|
|
|
|
a += 1
|
|
|
|
|
} else {
|
|
|
|
|
b += 1
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if (a == 0) {
|
|
|
|
|
allCheck.value = false
|
|
|
|
|
}
|
|
|
|
|
if (b == 0) {
|
|
|
|
|
allCheck.value = true
|
|
|
|
|
}
|
|
|
|
|
if (a != 0 && b != 0) {
|
|
|
|
|
someCheck.value = true
|
|
|
|
|
} else {
|
|
|
|
|
someCheck.value = false
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
deep: true
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang='scss'>
|
|
|
|
@ -334,25 +384,6 @@
|
|
|
|
|
background-color: #ffffff;
|
|
|
|
|
padding: 0;
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
.htCore {
|
|
|
|
|
thead {
|
|
|
|
|
tr {
|
|
|
|
|
height: 36px;
|
|
|
|
|
background: #fafafa;
|
|
|
|
|
th {
|
|
|
|
|
line-height: 34px;
|
|
|
|
|
background: #fafafa;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
tbody {
|
|
|
|
|
tr {
|
|
|
|
|
td {
|
|
|
|
|
line-height: 30px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.handsontableInput {
|
|
|
|
|
line-height: 30px;
|
|
|
|
|