Browse Source

增加Mes与Bom列表展示

master_hella_20240701
zhaoxuebing 6 months ago
parent
commit
8efcef5196
  1. 60
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue
  2. 20
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts

60
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue

@ -62,16 +62,37 @@
@tableFormButton="tableFormButton" @tableFormButton="tableFormButton"
/> />
<!-- bom列表 --> <!-- Mes列表 -->
<Dialog <Dialog
:title="DialogTitle" :title="DialogTitle"
v-model="bomModelVisible" v-model="mesModelVisible"
width="80%" width="80%"
:scroll="true" :scroll="true"
max-height="450px" max-height="450px"
> >
<Table <Table
:columns="ProductreceiptDetailb.allSchemas.tableColumns" :columns="ProductreceiptDetailb.allSchemas.tableColumns"
:data="detatableDataMes.tableList"
:loading="detatableDataMes.loading"
:pagination="{
total: detatableDataMes.total
}"
v-model:pageSize="detatableDataMes.pageSize"
v-model:currentPage="detatableDataMes.currentPage"
v-model:sort="detatableDataMes.sort"
/>
</Dialog>
<!-- bom列表 -->
<Dialog
:title="BomDialogTitle"
v-model="bomModelVisible"
width="80%"
:scroll="true"
max-height="450px"
>
<Table
:columns="BackflushRecordDetailb.allSchemas.tableColumns"
:data="detatableDataBom.tableList" :data="detatableDataBom.tableList"
:loading="detatableDataBom.loading" :loading="detatableDataBom.loading"
:pagination="{ :pagination="{
@ -86,11 +107,12 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { ProductreceiptRecordMain,ProductreceiptRecordMainRules,ProductreceiptRecordDetail,ProductreceiptRecordDetailRules, ProductreceiptDetailb } from './productreceiptAssembleRecordMain.data' import { ProductreceiptRecordMain,ProductreceiptRecordMainRules,ProductreceiptRecordDetail,ProductreceiptRecordDetailRules, ProductreceiptDetailb,BackflushRecordDetailb } from './productreceiptAssembleRecordMain.data'
import * as ProductreceiptRecordMainApi from '@/api/wms/productreceiptRecordMain' import * as ProductreceiptRecordMainApi from '@/api/wms/productreceiptRecordMain'
import * as ProductreceiptRecordDetailApi from '@/api/wms/productreceiptRecordDetail' import * as ProductreceiptRecordDetailApi from '@/api/wms/productreceiptRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ProductreceiptDetailbApi from '@/api/wms/productreceiptDetailb' import * as ProductreceiptDetailbApi from '@/api/wms/productreceiptDetailb'
import * as BackflushRecordDetailbApi from '@/api/wms/backflushRecordDetailb'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
// //
@ -105,6 +127,15 @@ routeName.value = route.name
const tableColumns = ref([...ProductreceiptRecordMain.allSchemas.tableColumns,...ProductreceiptRecordDetail.allSchemas.tableMainColumns]) const tableColumns = ref([...ProductreceiptRecordMain.allSchemas.tableColumns,...ProductreceiptRecordDetail.allSchemas.tableMainColumns])
// table // table
const buttondataTable = ref([{ const buttondataTable = ref([{
label: 'Mes',
name: 'mes',
hide: false,
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
},{
label: 'Bom', label: 'Bom',
name: 'bom', name: 'bom',
hide: false, hide: false,
@ -115,11 +146,20 @@ const buttondataTable = ref([{
link: true, // link: true, //
}]) }])
// Mes
const DialogTitle = ref('Mes信息')
const mesModelVisible = ref(false)
const { tableObject: detatableDataMes, tableMethods: detatableMethodsMes } =useTable({
getListApi: ProductreceiptDetailbApi.getProductreceiptDetailbPage
})
const { getList:getDetailListMes } = detatableMethodsMes
// Bom // Bom
const DialogTitle = ref('Bom信息') const BomDialogTitle = ref('Bom信息')
const bomModelVisible = ref(false) const bomModelVisible = ref(false)
const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useTable({ const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useTable({
getListApi: ProductreceiptDetailbApi.getProductreceiptDetailbPage getListApi: BackflushRecordDetailbApi.getBackflushRecordDetailbPage
}) })
const { getList:getDetailListBom } = detatableMethodsBom const { getList:getDetailListBom } = detatableMethodsBom
@ -220,9 +260,17 @@ const searchFormClick = (searchData) => {
// Bom // Bom
const tableFormButton = async (val , row) => { const tableFormButton = async (val , row) => {
if (val == 'mes') { // bom
mesModelVisible.value = true
DialogTitle.value = '物料代码【' + row.itemCode + '】——Mes信息'
detatableDataMes.params = {
masterId: row.masterId
}
await getDetailListMes()
}
if (val == 'bom') { // bom if (val == 'bom') { // bom
bomModelVisible.value = true bomModelVisible.value = true
DialogTitle.value = '物料代码【' + row.itemCode + '】——Bom信息' BomDialogTitle.value = '物料代码【' + row.itemCode + '】——Bom信息'
detatableDataBom.params = { detatableDataBom.params = {
masterId: row.masterId masterId: row.masterId
} }

20
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/productreceiptAssembleRecordMain.data.ts

@ -1015,7 +1015,7 @@ export const ProductreceiptDetailb = useCrudSchemas(reactive<CrudSchema[]>([
label: '主表ID', label: '主表ID',
field: 'masterId', field: 'masterId',
sort: 'custom', sort: 'custom',
isSearch: true, isTable:false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
@ -1095,13 +1095,13 @@ export const ProductreceiptDetailb = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isForm: false, isForm: false,
}, },
{ // {
label: '操作', // label: '操作',
field: 'action', // field: 'action',
isForm: false, // isForm: false,
table: { // table: {
width: 150, // width: 150,
fixed: 'right' // fixed: 'right'
} // }
} // }
])) ]))

Loading…
Cancel
Save