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 = () => {
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

@ -73,4 +73,8 @@ export const exportLocation = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
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()
routeName.value = route.name
const tableColumns = ref(InventorymoveRequestMain.allSchemas.tableColumns)
const businessType = ref()
console.log(99 , routeName.value)
const fromInventoryStatus = ref()
@ -114,6 +114,7 @@ const { tableObject, tableMethods } = useTable({
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "HOLD"
businessType.value = 'OkToHoldRequest'
} else if ( routeName.value == 'HoldtookRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
@ -121,6 +122,7 @@ const { tableObject, tableMethods } = useTable({
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "OK"
businessType.value = 'HoldToOkRequest'
} else if ( routeName.value == 'HoldtoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
@ -128,6 +130,7 @@ const { tableObject, tableMethods } = useTable({
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "SCRAP"
businessType.value = 'HoldToScrapRequest'
} else if ( routeName.value == 'OktoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
@ -135,6 +138,7 @@ const { tableObject, tableMethods } = useTable({
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "SCRAP"
businessType.value = 'OkToScrapRequest'
} else if ( routeName.value == 'ScraptoholdRequestMain') {
tableObject.params = {
fromInventoryStatus: 'SCRAP',
@ -142,20 +146,23 @@ const { tableObject, tableMethods } = useTable({
}
fromInventoryStatus.value = 'SCRAP'
toInventoryStatus.value = "HOLD"
businessType.value = 'ScrapToHoldRequest'
} else {
console.log(146 , fromInventoryStatus.value)
fromInventoryStatus.value = null
businessType.value = 'InventoryMoveRequest'
}
// tableform
InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'fromPackingNumber') {
if (fromInventoryStatus.value) {
item.tableForm.searchCondition = [{
key: 'inventoryStatus',
value: fromInventoryStatus.value,
item.tableForm.searchCondition = [
{
key: 'businessType',
value: businessType.value ,
isMainValue: false
}]
},]
} else {
delete item.tableForm.searchCondition
}
@ -168,36 +175,14 @@ InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => {
}
}
if(item.field == "toLocationCode"){
if (toInventoryStatus.value == 'HOLD') {
item.tableForm.searchCondition = [{
key: 'available',
value: 'TRUE',
isMainValue: false
},
if (toInventoryStatus.value) {
item.tableForm.searchCondition = [
{
key: 'type',
value: 'HOLD',
key: 'businessType',
value: businessType.value,
isMainValue: false
}]
}
if (toInventoryStatus.value == 'SCRAP') {
item.tableForm.searchCondition = [{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'type',
value: 'SCRAP',
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',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePage
searchPage: BalanceApi.selectLocationTypeToBalance,
searchCondition: [{
key: 'locationCode',
value: 'businessType',
isMainValue: true
}]
},
form: {
// labelMessage: '信息提示说明!!!',
@ -556,7 +561,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePage
searchPage: BalanceApi.selectLocationTypeToBalance
}
}
},
@ -649,11 +654,12 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
searchField: 'code',
searchTitle: '库位信息',
searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.getLocationPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
searchPage: LocationApi.selectBusinessTypeToLocation,
searchCondition: [
{
key: 'type',
value: 'businessType',
isMainValue: true
}]
},
form: {
@ -664,12 +670,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
searchField: 'code',
searchTitle: '库位信息',
searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.getLocationPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
searchPage: LocationApi.selectBusinessTypeToLocation,
}
}
},

Loading…
Cancel
Save