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"
/>
<!-- bom列表 -->
<!-- Mes列表 -->
<Dialog
:title="DialogTitle"
v-model="bomModelVisible"
v-model="mesModelVisible"
width="80%"
:scroll="true"
max-height="450px"
>
<Table
: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"
:loading="detatableDataBom.loading"
:pagination="{
@ -86,11 +107,12 @@
<script setup lang="ts">
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 ProductreceiptRecordDetailApi from '@/api/wms/productreceiptRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ProductreceiptDetailbApi from '@/api/wms/productreceiptDetailb'
import * as BackflushRecordDetailbApi from '@/api/wms/backflushRecordDetailb'
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])
// table
const buttondataTable = ref([{
label: 'Mes',
name: 'mes',
hide: false,
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
},{
label: 'Bom',
name: 'bom',
hide: false,
@ -115,11 +146,20 @@ const buttondataTable = ref([{
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
const DialogTitle = ref('Bom信息')
const BomDialogTitle = ref('Bom信息')
const bomModelVisible = ref(false)
const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useTable({
getListApi: ProductreceiptDetailbApi.getProductreceiptDetailbPage
getListApi: BackflushRecordDetailbApi.getBackflushRecordDetailbPage
})
const { getList:getDetailListBom } = detatableMethodsBom
@ -220,9 +260,17 @@ const searchFormClick = (searchData) => {
// Bom
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
bomModelVisible.value = true
DialogTitle.value = '物料代码【' + row.itemCode + '】——Bom信息'
BomDialogTitle.value = '物料代码【' + row.itemCode + '】——Bom信息'
detatableDataBom.params = {
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',
field: 'masterId',
sort: 'custom',
isSearch: true,
isTable:false,
form: {
component: 'InputNumber',
value: 0
@ -1095,13 +1095,13 @@ export const ProductreceiptDetailb = useCrudSchemas(reactive<CrudSchema[]>([
},
isForm: false,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
// {
// label: '操作',
// field: 'action',
// isForm: false,
// table: {
// width: 150,
// fixed: 'right'
// }
// }
]))

Loading…
Cancel
Save