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