|
|
@ -1,32 +1,21 @@ |
|
|
|
<template> |
|
|
|
<ContentWrap> |
|
|
|
<!-- 搜索工作栏 --> |
|
|
|
<Search :schema="SupplierdeliverRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|
|
|
<Search :schema="SupplierdeliverRequestMain.allSchemas.searchSchema" @search="setSearchParams" |
|
|
|
@reset="setSearchParams" /> |
|
|
|
</ContentWrap> |
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
|
<TableHead |
|
|
|
:HeadButttondata="HeadButttondata" |
|
|
|
@button-base-click="buttonBaseClick" |
|
|
|
:routeName="routeName" |
|
|
|
@updataTableColumns="updataTableColumns" |
|
|
|
@searchFormClick="searchFormClick" |
|
|
|
:allSchemas="SupplierdeliverRequestMain.allSchemas" |
|
|
|
/> |
|
|
|
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName" |
|
|
|
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" |
|
|
|
:allSchemas="SupplierdeliverRequestMain.allSchemas" /> |
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
|
<ContentWrap> |
|
|
|
<Table |
|
|
|
:columns="tableColumns" |
|
|
|
:data="tableObject.tableList" |
|
|
|
:loading="tableObject.loading" |
|
|
|
:pagination="{ |
|
|
|
<Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{ |
|
|
|
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}"> |
|
|
|
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|
|
|
<span>{{ row.number }}</span> |
|
|
@ -39,55 +28,36 @@ |
|
|
|
</ContentWrap> |
|
|
|
|
|
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
|
<BasicForm |
|
|
|
ref="formRef" |
|
|
|
@success="getList" |
|
|
|
:rules="SupplierdeliverRequestMainRules" |
|
|
|
:formAllSchemas="SupplierdeliverRequestMain.allSchemas" |
|
|
|
:tableAllSchemas="SupplierdeliverRequestDetail.allSchemas" |
|
|
|
:tableFormRules="SupplierdeliverRequestDetailRules" |
|
|
|
:tableData="tableData" |
|
|
|
<BasicForm ref="formRef" @success="getList" :rules="SupplierdeliverRequestMainRules" |
|
|
|
:formAllSchemas="SupplierdeliverRequestMain.allSchemas" :tableAllSchemas="SupplierdeliverRequestDetail.allSchemas" |
|
|
|
:tableFormRules="SupplierdeliverRequestDetailRules" :tableData="tableData" |
|
|
|
:apiUpdate="SupplierdeliverRequestMainApi.updateSupplierdeliverRequestMain" |
|
|
|
:apiCreate="SupplierdeliverRequestMainApi.createSupplierdeliverRequestMain" |
|
|
|
:isBusiness="true" |
|
|
|
@handleAddTable="handleAddTable" |
|
|
|
@handleDeleteTable="handleDeleteTable" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
@submitForm="submitForm" |
|
|
|
/> |
|
|
|
:apiCreate="SupplierdeliverRequestMainApi.createSupplierdeliverRequestMain" :isBusiness="true" |
|
|
|
@handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess" |
|
|
|
@submitForm="submitForm" /> |
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
|
<Detail |
|
|
|
ref="detailRef" |
|
|
|
:isBasic="false" |
|
|
|
:allSchemas="SupplierdeliverRequestMain.allSchemas" |
|
|
|
<Detail ref="detailRef" :isBasic="false" :allSchemas="SupplierdeliverRequestMain.allSchemas" |
|
|
|
:detailAllSchemas="SupplierdeliverRequestDetail.allSchemas" |
|
|
|
:detailAllSchemasRules="SupplierdeliverRequestDetailRules" |
|
|
|
:apiCreate="SupplierdeliverRequestDetailApi.createSupplierdeliverRequestDetail" |
|
|
|
:apiUpdate="SupplierdeliverRequestDetailApi.updateSupplierdeliverRequestDetail" |
|
|
|
:apiPage="SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage" |
|
|
|
:apiDelete="SupplierdeliverRequestDetailApi.deleteSupplierdeliverRequestDetail" |
|
|
|
:Echo="Echo" |
|
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
|
/> |
|
|
|
:apiDelete="SupplierdeliverRequestDetailApi.deleteSupplierdeliverRequestDetail" :Echo="Echo" |
|
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" /> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
|
<ImportForm ref="importFormRef" url="/wms/supplierdeliver-request-main/import" :importTemplateData="importTemplateData" |
|
|
|
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" /> |
|
|
|
<ImportForm ref="importFormRef" url="/wms/supplierdeliver-request-main/import" |
|
|
|
:importTemplateData="importTemplateData" @success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" |
|
|
|
:mode="2" /> |
|
|
|
|
|
|
|
<!-- 打印 --> |
|
|
|
<el-dialog v-model="dialogVisible " :title="dialogTitle" width="60%"> |
|
|
|
<Table |
|
|
|
:columns="detailListTableColumns" |
|
|
|
:data="detatableData.tableList" |
|
|
|
:loading="detatableData.loading" |
|
|
|
<Table :columns="detailListTableColumns" :data="detatableData.tableList" :loading="detatableData.loading" |
|
|
|
:pagination="{ |
|
|
|
total: detatableData.total |
|
|
|
}" |
|
|
|
v-model:pageSize="detatableData.pageSize" |
|
|
|
v-model:currentPage="detatableData.currentPage" |
|
|
|
v-model:sort="detatableData.sort" |
|
|
|
> |
|
|
|
}" v-model:pageSize="detatableData.pageSize" v-model:currentPage="detatableData.currentPage" |
|
|
|
v-model:sort="detatableData.sort"> |
|
|
|
<template #batch="{row}"> |
|
|
|
<el-input v-model="row.batch">{{ row.batch }}</el-input> |
|
|
|
</template> |
|
|
@ -202,15 +172,16 @@ const isShowMainButton = (row,val) => { |
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = (row) => { |
|
|
|
return [ |
|
|
|
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), // 关闭 |
|
|
|
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // 重新添加 |
|
|
|
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // 提交审批 |
|
|
|
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // 驳回 |
|
|
|
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // 审批通过 |
|
|
|
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), // 打开 |
|
|
|
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1']) }), // 关闭 |
|
|
|
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), // 提交审批 |
|
|
|
defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['6']) }), // 审批通过 |
|
|
|
defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['6']) }), // 驳回按钮 |
|
|
|
|
|
|
|
defaultButtons.mainListEditBtn({ hasPermi: 'wms:supplierdeliver-request-main:update' }), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:supplierdeliver-request-main:delete' }), // 删除 |
|
|
|
defaultButtons.mainListPointBtn(null), // 标签打印 |
|
|
|
defaultButtons.mainListDocumentPrintBtn(null), // 单据打印 |
|
|
|
// defaultButtons.mainListPointBtn(null), // 标签打印 |
|
|
|
// defaultButtons.mainListDocumentPrintBtn(null), // 单据打印 |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
@ -218,16 +189,16 @@ const butttondata = (row) => { |
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
if (val == 'mainClose') { // 关闭 |
|
|
|
console.log('列表-操作按钮事件-关闭') |
|
|
|
} else if (val == 'mainReAdd') { // 重新添加 |
|
|
|
console.log('列表-操作按钮事件-重新添加') |
|
|
|
} else if (val == 'mainSubmit') { // 提交审批 |
|
|
|
console.log('列表-操作按钮事件-提交审批') |
|
|
|
} else if (val == 'mainTurnDown') { // 驳回 |
|
|
|
console.log('列表-操作按钮事件-驳回') |
|
|
|
} else if (val == 'mainApprove') { // 审批通过 |
|
|
|
console.log('列表-操作按钮事件-审批通过') |
|
|
|
if (val == 'mainPurPlanOpe') { // 打开 |
|
|
|
handleOpe(row.id) |
|
|
|
} else if (val == 'mainPurPlanClo') {// 关闭 |
|
|
|
handleClo(row.id) |
|
|
|
} else if (val == 'mainPlanSub') { // 提交审批 |
|
|
|
handleSub(row.id) |
|
|
|
} else if (val == 'mainPlanApp') { // 审批通过 |
|
|
|
handleApp(row.id) |
|
|
|
} else if (val == 'mainPlanTur') { // 驳回按钮 |
|
|
|
handleTur(row.id) |
|
|
|
} else if (val == 'edit') { // 编辑 |
|
|
|
openForm('update', row) |
|
|
|
} else if (val == 'delete') { // 删除 |
|
|
@ -265,6 +236,73 @@ const handleDelete = async (id: number) => { |
|
|
|
} catch { } |
|
|
|
} |
|
|
|
|
|
|
|
/** 关闭按钮操作 */ |
|
|
|
const handleClo = async (id : number) => { |
|
|
|
try { |
|
|
|
// 关闭的二次确认 |
|
|
|
await message.confirm('是否关闭所选中数据?') |
|
|
|
// 发起关闭 |
|
|
|
await SupplierdeliverRequestMainApi.cloSupplierdeliverRequestMain(id) |
|
|
|
message.success(t('关闭成功!')) |
|
|
|
// 刷新列表 |
|
|
|
await getList() |
|
|
|
} catch { } |
|
|
|
} |
|
|
|
|
|
|
|
/** 打开按钮操作 */ |
|
|
|
const handleOpe = async (id : number) => { |
|
|
|
try { |
|
|
|
// 打开的二次确认 |
|
|
|
await message.confirm('是否打开所选中数据?') |
|
|
|
// 发起打开 |
|
|
|
await SupplierdeliverRequestMainApi.opeSupplierdeliverRequestMain(id) |
|
|
|
message.success(t('打开成功!')) |
|
|
|
// 刷新列表 |
|
|
|
await getList() |
|
|
|
} catch { } |
|
|
|
} |
|
|
|
|
|
|
|
/** 提交审批按钮操作 */ |
|
|
|
const handleSub = async (id : number) => { |
|
|
|
try { |
|
|
|
// 提交审批的二次确认 |
|
|
|
await message.confirm('是否提交审批所选中数据?') |
|
|
|
// 发起提交审批 |
|
|
|
await SupplierdeliverRequestMainApi.subSupplierdeliverRequestMain(id) |
|
|
|
message.success(t('提交审批成功!')) |
|
|
|
// 刷新列表 |
|
|
|
await getList() |
|
|
|
} catch { } |
|
|
|
} |
|
|
|
|
|
|
|
/** 审批通过按钮操作 */ |
|
|
|
const handleApp = async (id : number) => { |
|
|
|
try { |
|
|
|
// 审批通过的二次确认 |
|
|
|
await message.confirm('是否审批通过所选中数据?') |
|
|
|
// 发起审批通过 |
|
|
|
await SupplierdeliverRequestMainApi.appSupplierdeliverRequestMain(id) |
|
|
|
message.success(t('审批通过成功!')) |
|
|
|
// 刷新列表 |
|
|
|
await getList() |
|
|
|
} catch { } |
|
|
|
} |
|
|
|
|
|
|
|
/** 驳回按钮操作 */ |
|
|
|
const handleTur = async (id : number) => { |
|
|
|
try { |
|
|
|
// 驳回的二次确认 |
|
|
|
await message.confirm('是否驳回所选中数据?') |
|
|
|
// 发起驳回 |
|
|
|
await SupplierdeliverRequestMainApi.rejSupplierdeliverRequestMain(id) |
|
|
|
message.success(t('驳回成功!')) |
|
|
|
// 刷新列表 |
|
|
|
await getList() |
|
|
|
} catch { } |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 导出按钮操作 */ |
|
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
|
const handleExport = async () => { |
|
|
|