Browse Source

记录修改

hella_online_20240829
zhaoxuebing 3 months ago
parent
commit
bf6459f754
  1. 38
      src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue
  2. 23
      src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts

38
src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue

@ -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

23
src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts

@ -4,7 +4,7 @@ import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
/**
* @returns {Array} 退
*/
export const ProductionreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
@ -16,22 +16,21 @@ export const ProductionreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>(
isSearch: true
},
{
label: '车间代码',
field: 'workshopCode',
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
table: {
width: 150
width: 180
},
isSearch: true
},
{
label: '申请单号',
field: 'requestNumber',
label: '车间代码',
field: 'workshopCode',
sort: 'custom',
table: {
width: 180
width: 150
},
isTable: false,
isSearch: true
},
{
label: '出库事务类型',
@ -319,7 +318,7 @@ export const ProductionreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>(
]))
//表单校验
export const ProductionreturnRecordMainRules = reactive({
export const ProductionscrapRecordMainRules = reactive({
requestNumber: [
{ required: true, message: '请选择申请单号', trigger: 'change' }
],
@ -373,7 +372,7 @@ export const ProductionreturnRecordMainRules = reactive({
/**
* @returns {Array} 退
*/
export const ProductionreturnRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
export const ProductionscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '生产线代码',
field: 'productionLineCode',
@ -636,7 +635,7 @@ export const ProductionreturnRecordDetail = useCrudSchemas(reactive<CrudSchema[]
]))
//表单校验
export const ProductionreturnRecordDetailRules = reactive({
export const ProductionscrapRecordDetailRules = reactive({
inventoryStatus: [
{ required: true, message: '请选择库存状态', trigger: 'change' }
],

Loading…
Cancel
Save