Browse Source

修复bug

master
chenfang 11 months ago
parent
commit
2ce7ccdd45
  1. 5
      src/api/wms/balance/index.ts
  2. 4
      src/api/wms/location/index.ts
  3. 47
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue
  4. 27
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts

5
src/api/wms/balance/index.ts

@ -82,3 +82,8 @@ export const exportBalance = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/balance/get-import-template' }) return request.download({ url: '/wms/balance/get-import-template' })
} }
// 获得库位代码筛选出的库存余额分页
export const selectLocationTypeToBalance = async (params) => {
return request.get({ url: '/wms/balance/pageLocationCodeToBalance', params})
}

4
src/api/wms/location/index.ts

@ -74,3 +74,7 @@ export const exportLocation = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/location/get-import-template' }) return request.download({ url: '/wms/location/get-import-template' })
} }
export const selectBusinessTypeToLocation = async (params) => {
return request.get({ url: `/wms/location/pageBusinessTypeToLocation`, params })
}

47
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue

@ -93,7 +93,7 @@ const route = useRoute() // 路由信息
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(InventorymoveRequestMain.allSchemas.tableColumns) const tableColumns = ref(InventorymoveRequestMain.allSchemas.tableColumns)
const businessType = ref()
console.log(99 , routeName.value) console.log(99 , routeName.value)
const fromInventoryStatus = ref() const fromInventoryStatus = ref()
@ -114,6 +114,7 @@ const { tableObject, tableMethods } = useTable({
} }
fromInventoryStatus.value = 'OK' fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "HOLD" toInventoryStatus.value = "HOLD"
businessType.value = 'OkToHoldRequest'
} else if ( routeName.value == 'HoldtookRequestMain') { } else if ( routeName.value == 'HoldtookRequestMain') {
tableObject.params = { tableObject.params = {
fromInventoryStatus: 'HOLD', fromInventoryStatus: 'HOLD',
@ -121,6 +122,7 @@ const { tableObject, tableMethods } = useTable({
} }
fromInventoryStatus.value = 'HOLD' fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "OK" toInventoryStatus.value = "OK"
businessType.value = 'HoldToOkRequest'
} else if ( routeName.value == 'HoldtoscrapRequestMain') { } else if ( routeName.value == 'HoldtoscrapRequestMain') {
tableObject.params = { tableObject.params = {
fromInventoryStatus: 'HOLD', fromInventoryStatus: 'HOLD',
@ -128,6 +130,7 @@ const { tableObject, tableMethods } = useTable({
} }
fromInventoryStatus.value = 'HOLD' fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "SCRAP" toInventoryStatus.value = "SCRAP"
businessType.value = 'HoldToScrapRequest'
} else if ( routeName.value == 'OktoscrapRequestMain') { } else if ( routeName.value == 'OktoscrapRequestMain') {
tableObject.params = { tableObject.params = {
fromInventoryStatus: 'OK', fromInventoryStatus: 'OK',
@ -135,6 +138,7 @@ const { tableObject, tableMethods } = useTable({
} }
fromInventoryStatus.value = 'OK' fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "SCRAP" toInventoryStatus.value = "SCRAP"
businessType.value = 'OkToScrapRequest'
} else if ( routeName.value == 'ScraptoholdRequestMain') { } else if ( routeName.value == 'ScraptoholdRequestMain') {
tableObject.params = { tableObject.params = {
fromInventoryStatus: 'SCRAP', fromInventoryStatus: 'SCRAP',
@ -142,20 +146,23 @@ const { tableObject, tableMethods } = useTable({
} }
fromInventoryStatus.value = 'SCRAP' fromInventoryStatus.value = 'SCRAP'
toInventoryStatus.value = "HOLD" toInventoryStatus.value = "HOLD"
businessType.value = 'ScrapToHoldRequest'
} else { } else {
console.log(146 , fromInventoryStatus.value) console.log(146 , fromInventoryStatus.value)
fromInventoryStatus.value = null fromInventoryStatus.value = null
businessType.value = 'InventoryMoveRequest'
} }
// tableform // tableform
InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'fromPackingNumber') { if(item.field == 'fromPackingNumber') {
if (fromInventoryStatus.value) { if (fromInventoryStatus.value) {
item.tableForm.searchCondition = [{ item.tableForm.searchCondition = [
key: 'inventoryStatus', {
value: fromInventoryStatus.value, key: 'businessType',
value: businessType.value ,
isMainValue: false isMainValue: false
}] },]
} else { } else {
delete item.tableForm.searchCondition delete item.tableForm.searchCondition
} }
@ -168,35 +175,13 @@ InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => {
} }
} }
if(item.field == "toLocationCode"){ if(item.field == "toLocationCode"){
if (toInventoryStatus.value == 'HOLD') { if (toInventoryStatus.value) {
item.tableForm.searchCondition = [{ item.tableForm.searchCondition = [
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'type',
value: 'HOLD',
isMainValue: false
}]
}
if (toInventoryStatus.value == 'SCRAP') {
item.tableForm.searchCondition = [{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{ {
key: 'type', key: 'businessType',
value: 'SCRAP', value: businessType.value,
isMainValue: false isMainValue: false
}] }]
}else {
item.tableForm.searchCondition = {
key: 'available',
value: 'TRUE',
isMainValue: false
}
} }
} }
}) })

27
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts

@ -546,7 +546,12 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
searchField: 'packingNumber', searchField: 'packingNumber',
searchTitle: '库存余额信息', searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas, searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePage searchPage: BalanceApi.selectLocationTypeToBalance,
searchCondition: [{
key: 'locationCode',
value: 'businessType',
isMainValue: true
}]
}, },
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
@ -556,7 +561,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
searchField: 'packingNumber', searchField: 'packingNumber',
searchTitle: '库存余额信息', searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas, searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePage searchPage: BalanceApi.selectLocationTypeToBalance
} }
} }
}, },
@ -649,11 +654,12 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
searchField: 'code', searchField: 'code',
searchTitle: '库位信息', searchTitle: '库位信息',
searchAllSchemas: Location.allSchemas, searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.getLocationPage, searchPage: LocationApi.selectBusinessTypeToLocation,
searchCondition: [{ searchCondition: [
key: 'available', {
value: 'TRUE', key: 'type',
isMainValue: false value: 'businessType',
isMainValue: true
}] }]
}, },
form: { form: {
@ -664,12 +670,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
searchField: 'code', searchField: 'code',
searchTitle: '库位信息', searchTitle: '库位信息',
searchAllSchemas: Location.allSchemas, searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.getLocationPage, searchPage: LocationApi.selectBusinessTypeToLocation,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
} }
} }
}, },

Loading…
Cancel
Save