|
|
@ -6,8 +6,7 @@ |
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
|
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName" |
|
|
|
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" |
|
|
|
:allSchemas="CountJobMain.allSchemas" /> |
|
|
|
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" :allSchemas="CountJobMain.allSchemas" /> |
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
|
<ContentWrap> |
|
|
@ -29,9 +28,9 @@ |
|
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
|
<BasicForm ref="formRef" @success="getList" :rules="CountJobMainRules" :formAllSchemas="CountJobMain.allSchemas" |
|
|
|
:tableAllSchemas="CountJobDetail.allSchemas" :tableFormRules="CountJobDetailRules" :tableData="tableData" |
|
|
|
:apiUpdate="CountJobMainApi.updateCountJobMain" :apiCreate="CountJobMainApi.createCountJobMain" |
|
|
|
:isBusiness="true" @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" |
|
|
|
@searchTableSuccess="searchTableSuccess" @submitForm="submitForm" /> |
|
|
|
:apiUpdate="CountJobMainApi.updateCountJobMain" :apiCreate="CountJobMainApi.createCountJobMain" :isBusiness="true" |
|
|
|
@handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess" |
|
|
|
@submitForm="submitForm" /> |
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
|
<Detail ref="detailRef" :isBasic="false" :allSchemas="CountJobMain.allSchemas" |
|
|
@ -41,12 +40,8 @@ |
|
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" /> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
|
<ImportForm |
|
|
|
ref="importFormRef" |
|
|
|
url="/eam/countJobDetail/import" |
|
|
|
:importTemplateData="importTemplateData" |
|
|
|
@success="importSuccess" |
|
|
|
/> |
|
|
|
<ImportForm ref="importFormRef" url="/eam/countJobDetail/import" :importTemplateData="importTemplateData" |
|
|
|
@success="importSuccess" /> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
@ -147,7 +142,7 @@ |
|
|
|
console.log('其他按钮', item) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 根据状态返回该按钮是否显示 |
|
|
|
const isShowMainButton = (row, val) => { |
|
|
|
if (val.indexOf(row.available) > -1) { |
|
|
@ -162,26 +157,21 @@ |
|
|
|
return [ |
|
|
|
defaultButtons.mainExport(null),// 导出 |
|
|
|
defaultButtons.mainAdjustImport(null),// 导入 |
|
|
|
// defaultButtons.mainListEditBtn(null), // 编辑 |
|
|
|
// defaultButtons.mainListDeleteBtn(null), // 删除 |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
|
|
|
|
|
|
|
|
if (val == 'edit') { // 编辑 |
|
|
|
openForm('update', row) |
|
|
|
} |
|
|
|
} |
|
|
|
else if (val == 'mainExport') { // 导出 |
|
|
|
handleMainExport(row.id) |
|
|
|
} |
|
|
|
else if (val == 'mainAdjustImport') { // 导入 |
|
|
|
handleImport() |
|
|
|
} |
|
|
|
else if (val == 'mainOrderClo') { // 关闭 |
|
|
|
handleClose(row.id) |
|
|
|
} |
|
|
|
else if (val == 'delete') { // 删除 |
|
|
|
handleDelete(row.id) |
|
|
|
} |
|
|
@ -212,7 +202,7 @@ |
|
|
|
await getList() |
|
|
|
} catch { } |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 列表导出按钮操作 */ |
|
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
|
const handleMainExport = async (id : number) => { |
|
|
@ -228,20 +218,6 @@ |
|
|
|
exportLoading.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 关闭按钮操作 */ |
|
|
|
const handleClose = async (id : number) => { |
|
|
|
try { |
|
|
|
// 关闭的二次确认 |
|
|
|
await message.confirm('是否关闭所选中数据?') |
|
|
|
// 发起关闭 |
|
|
|
await CountJobMainApi.closeCountJobMain(id) |
|
|
|
message.success(t('关闭成功!')) |
|
|
|
// 刷新列表 |
|
|
|
await getList() |
|
|
|
} catch { } |
|
|
|
} |
|
|
|
|
|
|
|
/** 导出按钮操作 */ |
|
|
|
const handleExport = async () => { |
|
|
|