|
|
@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<ContentWrap> |
|
|
|
<!-- 搜索工作栏 --> |
|
|
|
<Search :schema="[...ProductionreturnRecordMain.allSchemas.searchSchema,...ProductionreturnRecordDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> |
|
|
|
<Search :schema="[...ProductionscrapRecordMain.allSchemas.searchSchema,...ProductionscrapRecordDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> |
|
|
|
</ContentWrap> |
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
@ -11,8 +11,8 @@ |
|
|
|
:routeName="routeName" |
|
|
|
@updataTableColumns="updataTableColumns" |
|
|
|
@searchFormClick="searchFormClick" |
|
|
|
:allSchemas="ProductionreturnRecordMain.allSchemas" |
|
|
|
:detailAllSchemas="ProductionreturnRecordDetail.allSchemas" |
|
|
|
:allSchemas="ProductionscrapRecordMain.allSchemas" |
|
|
|
:detailAllSchemas="ProductionscrapRecordDetail.allSchemas" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
@ -43,10 +43,10 @@ |
|
|
|
<BasicForm |
|
|
|
ref="formRef" |
|
|
|
@success="getList" |
|
|
|
:rules="ProductionreturnRecordMainRules" |
|
|
|
:formAllSchemas="ProductionreturnRecordMain.allSchemas" |
|
|
|
:tableAllSchemas="ProductionreturnRecordDetail.allSchemas" |
|
|
|
:tableFormRules="ProductionreturnRecordDetailRules" |
|
|
|
:rules="ProductionscrapRecordMainRules" |
|
|
|
:formAllSchemas="ProductionscrapRecordMain.allSchemas" |
|
|
|
:tableAllSchemas="ProductionscrapRecordDetail.allSchemas" |
|
|
|
:tableFormRules="ProductionscrapRecordDetailRules" |
|
|
|
:isBusiness="true" |
|
|
|
/> |
|
|
|
|
|
|
@ -54,18 +54,18 @@ |
|
|
|
<Detail |
|
|
|
ref="detailRef" |
|
|
|
:isBasic="false" |
|
|
|
:allSchemas="ProductionreturnRecordMain.allSchemas" |
|
|
|
:detailAllSchemas="ProductionreturnRecordDetail.allSchemas" |
|
|
|
:detailAllSchemasRules="ProductionreturnRecordDetailRules" |
|
|
|
:apiPage="ProductionreturnRecordDetailApi.getProductionreturnRecordDetailPage" |
|
|
|
:allSchemas="ProductionscrapRecordMain.allSchemas" |
|
|
|
:detailAllSchemas="ProductionscrapRecordDetail.allSchemas" |
|
|
|
:detailAllSchemasRules="ProductionscrapRecordDetailRules" |
|
|
|
:apiPage="ProductionscrapRecordDetailApi.getProductionscrapRecordDetailPage" |
|
|
|
/> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
import download from '@/utils/download' |
|
|
|
import { ProductionreturnRecordMain,ProductionreturnRecordMainRules,ProductionreturnRecordDetail,ProductionreturnRecordDetailRules } from './productionscrapRecordMain.data' |
|
|
|
import * as ProductionreturnRecordMainApi from '@/api/wms/productionreturnRecordMain' |
|
|
|
import * as ProductionreturnRecordDetailApi from '@/api/wms/productionreturnRecordDetail' |
|
|
|
import { ProductionscrapRecordMain,ProductionscrapRecordMainRules,ProductionscrapRecordDetail,ProductionscrapRecordDetailRules } from './productionscrapRecordMain.data' |
|
|
|
import * as ProductionscrapRecordMainApi from '@/api/wms/productionscrapRecordMain' |
|
|
|
import * as ProductionscrapRecordDetailApi from '@/api/wms/productionscrapRecordDetail' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
|
// 生产退料记录主 |
|
|
@ -77,7 +77,7 @@ const { t } = useI18n() // 国际化 |
|
|
|
const route = useRoute() // 路由信息 |
|
|
|
const routeName = ref() |
|
|
|
routeName.value = route.name |
|
|
|
const tableColumns = ref([...ProductionreturnRecordMain.allSchemas.tableColumns,...ProductionreturnRecordDetail.allSchemas.tableMainColumns]) |
|
|
|
const tableColumns = ref([...ProductionscrapRecordMain.allSchemas.tableColumns,...ProductionscrapRecordDetail.allSchemas.tableMainColumns]) |
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
|
const updataTableColumns = (val) => { |
|
|
@ -85,7 +85,7 @@ const updataTableColumns = (val) => { |
|
|
|
} |
|
|
|
|
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
|
getListApi: ProductionreturnRecordDetailApi.getProductionreturnRecordDetailPage // 分页接口 |
|
|
|
getListApi: ProductionscrapRecordDetailApi.getProductionscrapRecordDetailPage // 分页接口 |
|
|
|
}) |
|
|
|
|
|
|
|
// 获得表格的各种操作 |
|
|
@ -93,7 +93,7 @@ const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
|
const HeadButttondata = [ |
|
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:productionreturn-record-main:export'}), // 导出 |
|
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:productionscrap-record-main:export'}), // 导出 |
|
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
@ -155,8 +155,8 @@ const handleExport = async () => { |
|
|
|
await message.exportConfirm() |
|
|
|
// 发起导出 |
|
|
|
exportLoading.value = true |
|
|
|
const data = await ProductionreturnRecordMainApi.exportProductionreturnRecordMain(tableObject.params) |
|
|
|
download.excel(data, '生产退料记录主.xlsx') |
|
|
|
const data = await ProductionscrapRecordMainApi.exportProductionscrapRecordMain(tableObject.params) |
|
|
|
download.excel(data, '线标报废记录主.xlsx') |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
exportLoading.value = false |
|
|
|