|
@ -1,67 +1,117 @@ |
|
|
<template> |
|
|
<template> |
|
|
<ContentWrap> |
|
|
<ContentWrap> |
|
|
<!-- 搜索工作栏 --> |
|
|
<!-- 搜索工作栏 --> |
|
|
<Search :schema="ApplicationRecordMain.allSchemas.searchSchema" @search="setSearchParams" |
|
|
<Search |
|
|
@reset="setSearchParams" /> |
|
|
:schema="ApplicationRecordMain.allSchemas.searchSchema" |
|
|
|
|
|
@search="setSearchParams" |
|
|
|
|
|
@reset="setSearchParams" |
|
|
|
|
|
/> |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
<!-- 列表头部 --> |
|
|
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName" |
|
|
<TableHead |
|
|
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" |
|
|
:HeadButttondata="HeadButttondata" |
|
|
:allSchemas="ApplicationRecordMain.allSchemas" /> |
|
|
@button-base-click="buttonBaseClick" |
|
|
|
|
|
:routeName="routeName" |
|
|
|
|
|
@updataTableColumns="updataTableColumns" |
|
|
|
|
|
@searchFormClick="searchFormClick" |
|
|
|
|
|
:allSchemas="ApplicationRecordMain.allSchemas" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
<!-- 列表 --> |
|
|
<ContentWrap> |
|
|
<ContentWrap> |
|
|
<Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{ |
|
|
<Table |
|
|
|
|
|
:columns="tableColumns" |
|
|
|
|
|
:data="tableObject.tableList" |
|
|
|
|
|
:loading="tableObject.loading" |
|
|
|
|
|
:pagination="{ |
|
|
total: tableObject.total |
|
|
total: tableObject.total |
|
|
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" |
|
|
}" |
|
|
v-model:sort="tableObject.sort"> |
|
|
v-model:pageSize="tableObject.pageSize" |
|
|
|
|
|
v-model:currentPage="tableObject.currentPage" |
|
|
|
|
|
v-model:sort="tableObject.sort" |
|
|
|
|
|
> |
|
|
<template #number="{ row }"> |
|
|
<template #number="{ row }"> |
|
|
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|
|
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|
|
<span>{{ row.number }}</span> |
|
|
<span>{{ row.number }}</span> |
|
|
</el-button> |
|
|
</el-button> |
|
|
</template> |
|
|
</template> |
|
|
<template #action="{ row }"> |
|
|
<template #action="{ row }"> |
|
|
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" /> |
|
|
<ButtonBase |
|
|
|
|
|
:Butttondata="butttondata(row)" |
|
|
|
|
|
@button-base-click="buttonTableClick($event, row)" |
|
|
|
|
|
/> |
|
|
</template> |
|
|
</template> |
|
|
</Table> |
|
|
</Table> |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
|
|
|
|
|
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
<BasicForm ref="formRef" @success="getList" :rules="ApplicationRecordMainRules" |
|
|
<BasicForm |
|
|
:formAllSchemas="ApplicationRecordMain.allSchemas" :tableAllSchemas="ApplicationRecordDetail.allSchemas" |
|
|
ref="formRef" |
|
|
:tableFormRules="ApplicationRecordDetailRules" :tableData="tableData" |
|
|
@success="getList" |
|
|
|
|
|
:rules="ApplicationRecordMainRules" |
|
|
|
|
|
:formAllSchemas="ApplicationRecordMain.allSchemas" |
|
|
|
|
|
:tableAllSchemas="ApplicationRecordDetail.allSchemas" |
|
|
|
|
|
:tableFormRules="ApplicationRecordDetailRules" |
|
|
|
|
|
:tableData="tableData" |
|
|
:apiUpdate="ApplicationRecordMainApi.updateApplicationRecordMain" |
|
|
:apiUpdate="ApplicationRecordMainApi.updateApplicationRecordMain" |
|
|
:apiCreate="ApplicationRecordMainApi.createApplicationRecordMain" :isBusiness="true" |
|
|
:apiCreate="ApplicationRecordMainApi.createApplicationRecordMain" |
|
|
@handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess" |
|
|
:isBusiness="true" |
|
|
@submitForm="submitForm" /> |
|
|
@handleAddTable="handleAddTable" |
|
|
|
|
|
@handleDeleteTable="handleDeleteTable" |
|
|
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
|
|
@submitForm="submitForm" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
<!-- 详情 --> |
|
|
<Detail ref="detailRef" :isBasic="false" :allSchemas="ApplicationRecordMain.allSchemas" |
|
|
<Detail |
|
|
:detailAllSchemas="ApplicationRecordDetail.allSchemas" :detailAllSchemasRules="ApplicationRecordDetailRules" |
|
|
ref="detailRef" |
|
|
|
|
|
:isBasic="false" |
|
|
|
|
|
:allSchemas="ApplicationRecordMain.allSchemas" |
|
|
|
|
|
:detailAllSchemas="ApplicationRecordDetail.allSchemas" |
|
|
|
|
|
:detailAllSchemasRules="ApplicationRecordDetailRules" |
|
|
:apiCreate="ApplicationRecordDetailApi.createApplicationRecordDetail" |
|
|
:apiCreate="ApplicationRecordDetailApi.createApplicationRecordDetail" |
|
|
:apiUpdate="ApplicationRecordDetailApi.updateApplicationRecordDetail" |
|
|
:apiUpdate="ApplicationRecordDetailApi.updateApplicationRecordDetail" |
|
|
:apiPage="ApplicationRecordDetailApi.getApplicationRecordDetailPage" |
|
|
:apiPage="ApplicationRecordDetailApi.getApplicationRecordDetailPage" |
|
|
:apiDelete="ApplicationRecordDetailApi.deleteApplicationRecordDetail" |
|
|
:apiDelete="ApplicationRecordDetailApi.deleteApplicationRecordDetail" |
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
:isShowAddBtn="false" |
|
|
:isShowAddBtn="false" |
|
|
:detailButtonIsShow="true" /> |
|
|
:detailButtonIsShow="true" |
|
|
|
|
|
/> |
|
|
<!-- 审批详情 --> |
|
|
<!-- 审批详情 --> |
|
|
<approveDetail ref="detailRef1" :isBasic="false" :allSchemas="ApplicationRecordMain.allSchemas" |
|
|
<!-- <approveDetail |
|
|
:detailAllSchemas="ApplicationRecordDetail.allSchemas" :detailAllSchemasRules="ApplicationRecordDetailRules" |
|
|
ref="detailRef1" |
|
|
|
|
|
:isBasic="false" |
|
|
|
|
|
:allSchemas="ApplicationRecordMain.allSchemas" |
|
|
|
|
|
:detailAllSchemas="ApplicationRecordDetail.allSchemas" |
|
|
|
|
|
:detailAllSchemasRules="ApplicationRecordDetailRules" |
|
|
:apiAgree="ApplicationRecordMainApi.agreeApplicationRecordMain" |
|
|
:apiAgree="ApplicationRecordMainApi.agreeApplicationRecordMain" |
|
|
:apiDisAgree="ApplicationRecordMainApi.disAgreeApplicationRecordMain" |
|
|
:apiDisAgree="ApplicationRecordMainApi.disAgreeApplicationRecordMain" |
|
|
:apiPage="ApplicationRecordDetailApi.getApplicationRecordDetailPage" |
|
|
:apiPage="ApplicationRecordDetailApi.getApplicationRecordDetailPage" |
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
@agree="getList"/> |
|
|
@agree="getList" |
|
|
|
|
|
/> --> |
|
|
<!-- 导入 --> |
|
|
<!-- 导入 --> |
|
|
<ImportForm ref="importFormRef" url="/wms/purchase-main/import" :importTemplateData="importTemplateData" |
|
|
<ImportForm |
|
|
@success="importSuccess" :isShowOut="true" :updateIsDisable="true" :coverIsDisable="true" :mode="2" /> |
|
|
ref="importFormRef" |
|
|
|
|
|
url="/wms/purchase-main/import" |
|
|
|
|
|
:importTemplateData="importTemplateData" |
|
|
|
|
|
@success="importSuccess" |
|
|
|
|
|
:isShowOut="true" |
|
|
|
|
|
:updateIsDisable="true" |
|
|
|
|
|
:coverIsDisable="true" |
|
|
|
|
|
:mode="2" |
|
|
|
|
|
/> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
import download from '@/utils/download' |
|
|
import download from '@/utils/download' |
|
|
import { ApplicationRecordMain, ApplicationRecordMainRules, ApplicationRecordDetail, ApplicationRecordDetailRules } from './applicationRecordMain.data' |
|
|
import { |
|
|
|
|
|
ApplicationRecordMain, |
|
|
|
|
|
ApplicationRecordMainRules, |
|
|
|
|
|
ApplicationRecordDetail, |
|
|
|
|
|
ApplicationRecordDetailRules |
|
|
|
|
|
} from './applicationRecordMain.data' |
|
|
import * as ApplicationRecordMainApi from '@/api/eam/applicationRecordMain' |
|
|
import * as ApplicationRecordMainApi from '@/api/eam/applicationRecordMain' |
|
|
import * as ApplicationRecordDetailApi from '@/api/eam/applicationRecordDetail' |
|
|
import * as ApplicationRecordDetailApi from '@/api/eam/applicationRecordDetail' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
@ -134,7 +184,7 @@ |
|
|
// defaultButtons.defaultExportBtn(null), // 导出 |
|
|
// defaultButtons.defaultExportBtn(null), // 导出 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
defaultButtons.defaultSetBtn(null) // 设置 |
|
|
// { |
|
|
// { |
|
|
// label: '自定义扩展按钮', |
|
|
// label: '自定义扩展按钮', |
|
|
// name: 'zdy', |
|
|
// name: 'zdy', |
|
@ -147,16 +197,22 @@ |
|
|
|
|
|
|
|
|
// 头部按钮事件 |
|
|
// 头部按钮事件 |
|
|
const buttonBaseClick = (val, item) => { |
|
|
const buttonBaseClick = (val, item) => { |
|
|
if (val == 'add') { // 新增 |
|
|
if (val == 'add') { |
|
|
|
|
|
// 新增 |
|
|
openForm('create') |
|
|
openForm('create') |
|
|
} else if (val == 'import') { // 导入 |
|
|
} else if (val == 'import') { |
|
|
|
|
|
// 导入 |
|
|
handleImport() |
|
|
handleImport() |
|
|
} else if (val == 'export') { // 导出 |
|
|
} else if (val == 'export') { |
|
|
|
|
|
// 导出 |
|
|
handleExport() |
|
|
handleExport() |
|
|
} else if (val == 'refresh') { // 刷新 |
|
|
} else if (val == 'refresh') { |
|
|
|
|
|
// 刷新 |
|
|
getList() |
|
|
getList() |
|
|
} else if (val == 'filtrate') { // 筛选 |
|
|
} else if (val == 'filtrate') { |
|
|
} else { // 其他按钮 |
|
|
// 筛选 |
|
|
|
|
|
} else { |
|
|
|
|
|
// 其他按钮 |
|
|
console.log('其他按钮', item) |
|
|
console.log('其他按钮', item) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -173,7 +229,10 @@ |
|
|
// 列表-操作按钮 |
|
|
// 列表-操作按钮 |
|
|
const butttondata = (row) => { |
|
|
const butttondata = (row) => { |
|
|
return [ |
|
|
return [ |
|
|
defaultButtons.approveBtn({ hide: isShowMainButton(row, ['0']) ,hasPermi:'item:itemApplyMain:approve'}), // 审批 |
|
|
defaultButtons.approveBtn({ |
|
|
|
|
|
hide: isShowMainButton(row, ['0']), |
|
|
|
|
|
hasPermi: 'item:itemApplyMain:approve' |
|
|
|
|
|
}) // 审批 |
|
|
// defaultButtons.mainListEditBtn(null), // 编辑 |
|
|
// defaultButtons.mainListEditBtn(null), // 编辑 |
|
|
// defaultButtons.mainListDeleteBtn(null), // 删除 |
|
|
// defaultButtons.mainListDeleteBtn(null), // 删除 |
|
|
] |
|
|
] |
|
@ -181,11 +240,14 @@ |
|
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
|
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 == 'approve') { // 审批 |
|
|
} else if (val == 'approve') { |
|
|
|
|
|
// 审批 |
|
|
handleApprove(row, '单据号', row.number) |
|
|
handleApprove(row, '单据号', row.number) |
|
|
} else if (val == 'delete') { // 删除 |
|
|
} else if (val == 'delete') { |
|
|
|
|
|
// 删除 |
|
|
handleDelete(row.id) |
|
|
handleDelete(row.id) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -242,7 +304,7 @@ |
|
|
* tableForm方法 |
|
|
* tableForm方法 |
|
|
*/ |
|
|
*/ |
|
|
const tableFormKeys = {} |
|
|
const tableFormKeys = {} |
|
|
ApplicationRecordDetail.allSchemas.tableFormColumns.forEach(item => { |
|
|
ApplicationRecordDetail.allSchemas.tableFormColumns.forEach((item) => { |
|
|
tableFormKeys[item.field] = item.default ? item.default : '' |
|
|
tableFormKeys[item.field] = item.default ? item.default : '' |
|
|
}) |
|
|
}) |
|
|
const tableData = ref([]) |
|
|
const tableData = ref([]) |
|
|