|
@@ -1,19 +1,23 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<!--引用表格-->
|
|
|
- <BasicTable @register="registerTable">
|
|
|
+ <BasicTable @register="registerTable" :rowSelection="rowSelection" class="base-bill-talbe">
|
|
|
<!--插槽:table标题-->
|
|
|
<template #tableTitle>
|
|
|
<a-button type="primary" @click="handleSupplement" preIcon="ant-design:plus-outlined"> 补录钢坯</a-button>
|
|
|
<!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
|
|
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
|
|
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> -->
|
|
|
- <!-- <a-dropdown v-if="selectedRowKeys.length > 0">
|
|
|
+ <a-dropdown v-if="selectedRowKeys.length > 0">
|
|
|
<template #overlay>
|
|
|
<a-menu>
|
|
|
- <a-menu-item key="1" @click="batchHandleDelete">
|
|
|
+ <!-- <a-menu-item key="1" @click="batchHandleDelete">
|
|
|
<Icon icon="ant-design:delete-outlined"></Icon>
|
|
|
删除
|
|
|
+ </a-menu-item> -->
|
|
|
+ <a-menu-item key="2" @click="batchHandleWastes">
|
|
|
+ <Icon icon="ant-design:node-collapse-outlined"></Icon>
|
|
|
+ 批量判废
|
|
|
</a-menu-item>
|
|
|
</a-menu>
|
|
|
</template>
|
|
@@ -21,7 +25,7 @@
|
|
|
>批量操作
|
|
|
<Icon icon="mdi:chevron-down"></Icon>
|
|
|
</a-button>
|
|
|
- </a-dropdown> -->
|
|
|
+ </a-dropdown>
|
|
|
</template>
|
|
|
<!-- <template #billetImg>
|
|
|
<div class="billet-info-img">
|
|
@@ -50,7 +54,7 @@
|
|
|
import { useListPage } from '/@/hooks/system/useListPage';
|
|
|
import BilletBasicInfoModal from './components/BilletBasicInfoModal.vue';
|
|
|
import { columns, searchFormSchema } from './BilletBasicInfo.data';
|
|
|
- import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './BilletBasicInfo.api';
|
|
|
+ import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, batchWastes } from './BilletBasicInfo.api';
|
|
|
// import { downloadFile } from '/@/utils/common/renderUtils';
|
|
|
import { useTimeoutFn } from '/@/hooks/core/useTimeout';
|
|
|
import detailsModal from './components/detailsModal.vue';
|
|
@@ -73,6 +77,9 @@
|
|
|
},
|
|
|
columns,
|
|
|
canResize: false,
|
|
|
+ rowClassName: (record: any) => {
|
|
|
+ return record.bhtcId === '1025' ? 'base-error-500' : '';
|
|
|
+ },
|
|
|
formConfig: {
|
|
|
//labelWidth: 120,
|
|
|
schemas: searchFormSchema,
|
|
@@ -95,6 +102,14 @@
|
|
|
title: '操作',
|
|
|
fixed: 'right',
|
|
|
},
|
|
|
+ rowSelection: {
|
|
|
+ type: 'checkbox',
|
|
|
+ getCheckboxProps(record) {
|
|
|
+ return {
|
|
|
+ disabled: record.bhtcId === '1025',
|
|
|
+ };
|
|
|
+ },
|
|
|
+ },
|
|
|
},
|
|
|
exportConfig: {
|
|
|
name: '铸坯实绩',
|
|
@@ -172,6 +187,11 @@
|
|
|
async function batchHandleDelete() {
|
|
|
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
|
|
}
|
|
|
+
|
|
|
+ // 批量判废
|
|
|
+ async function batchHandleWastes(values) {
|
|
|
+ await batchWastes({ ids: selectedRowKeys.value }, handleSuccess);
|
|
|
+ }
|
|
|
/**
|
|
|
* 成功回调
|
|
|
*/
|
|
@@ -213,10 +233,39 @@
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
+<style lang="less" scoped>
|
|
|
.billet-info-img {
|
|
|
display: inline-block;
|
|
|
width: 60px;
|
|
|
height: 60px;
|
|
|
}
|
|
|
+ .base-bill-talbe {
|
|
|
+ :deep(.base-error-500) {
|
|
|
+ td {
|
|
|
+ background-color: #f56c6c61;
|
|
|
+ }
|
|
|
+
|
|
|
+ td:first-child {
|
|
|
+ position: relative;
|
|
|
+ z-index: 8;
|
|
|
+ // border-bottom: 1px solid var(--vxe-danger-color, #f56c6c) !important;
|
|
|
+
|
|
|
+ &::after {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ inset-inline-start: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ box-shadow: inset 5px 0 0 var(--vxe-danger-color, #f56c6c);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ td:last-child {
|
|
|
+ z-index: 8;
|
|
|
+ background-color: #fff;
|
|
|
+ // border-bottom: 1px solid var(--vxe-danger-color, #f56c6c) !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|