Browse Source

YT-2822差异库存余额,点击单据号进入明细,第一次库存事务显示不正确,切换其他页面在切回来显示正确

intex_online20250629
张立 1 week ago
parent
commit
84517be263
  1. 22
      src/components/Detail/src/Detail.vue
  2. 4
      src/views/wms/inventoryManage/balanceDifference/index.vue

22
src/components/Detail/src/Detail.vue

@ -392,6 +392,12 @@ const props = defineProps({
default: null default: null
}, },
// tableObject // tableObject
tableObjectExtendObj: {
type: Array,
required: false,
default: null
},
// tableObject
extendRowKeyValue: { extendRowKeyValue: {
type: Array, type: Array,
required: false, required: false,
@ -892,14 +898,24 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
// buttondata.value = [...detailButtonEdit,...detailButtonDelete,...buttondataTable.value] // buttondata.value = [...detailButtonEdit,...detailButtonDelete,...buttondataTable.value]
// tab // tab
if (props.tabsExtend) { if (props.tabsExtend) {
if (props.tableObjectExtend) { const { tableObject, tableMethods } = useTable({
props.tableObjectExtend.forEach(item => { getListApi: props.apiPage //
})
tableObject.params.masterId = masterParmas.value.masterId
detailAllSchemasRef.value = props.detailAllSchemas
if (props.extendRowKeyValue) {
// params
props.extendRowKeyValue.forEach(item => {
tableObject.params[item.key] = row[item.value] tableObject.params[item.key] = row[item.value]
masterParmas.value[item.key] =row[item.value]
}) })
} }
tableObjectRef.value = tableObject
tableMethodsRef.value = tableMethods
const { getList } = tableMethods
await getList() await getList()
} }
} finally { } finally {
detailLoading.value = false detailLoading.value = false
} }

4
src/views/wms/inventoryManage/balanceDifference/index.vue

@ -66,6 +66,7 @@
}]" }]"
@changeTabs="changeTabs" @changeTabs="changeTabs"
:tableObjectExtend="tableObjectExtend" :tableObjectExtend="tableObjectExtend"
:extendRowKeyValue="extendRowKeyValue"
/> />
<SearchTable ref="searchTableRef" :selection="false" :hiddenSubmitButton="true"/> <SearchTable ref="searchTableRef" :selection="false" :hiddenSubmitButton="true"/>
<!-- 导入 --> <!-- 导入 -->
@ -103,7 +104,8 @@ routeName.value = route.name
const tableColumns = ref(Balance.allSchemas.tableColumns) const tableColumns = ref(Balance.allSchemas.tableColumns)
const tabsExtend = ref(true) const tabsExtend = ref(true)
const apiPage = ref( BalanceApi.getTransactionBalancePage) const apiPage = ref( BalanceApi.getTransactionBalancePage)
const tableObjectExtend = ref([{ const tableObjectExtend = ref([])
const extendRowKeyValue= ref([{
key: 'masterId', key: 'masterId',
value: 'id' value: 'id'
}]) }])

Loading…
Cancel
Save