Browse Source

BUG修改

master
叶佳兴 1 year ago
parent
commit
45015dd60a
  1. 178
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

178
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

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

Loading…
Cancel
Save