Browse Source

盘点bug

hella_online_20240829
zhang_li 5 months ago
parent
commit
3e8bb02d02
  1. 1
      src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
  2. 86
      src/views/wms/countManage/count/countPlanMain/index.vue

1
src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts

@ -55,6 +55,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isDetail:false,
isTable:false,
form:{
componentProps:{

86
src/views/wms/countManage/count/countPlanMain/index.vue

@ -111,7 +111,7 @@ import {
CountPlanDetail,
CountPlanDetailRules,
CountPlanMain,
CountPlanMainRules,
CountPlanMainRules
} from './countPlanMain.data'
import * as CountPlanMainApi from '@/api/wms/countPlanMain'
import * as CountPlanDetailApi from '@/api/wms/countPlanDetail'
@ -133,9 +133,7 @@ import * as WarehouseApi from '@/api/wms/warehouse'
import { Area } from '@/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data'
import * as AreaApi from '@/api/wms/areabasic'
import {
Locationgroup
} from '@/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data'
import { Locationgroup } from '@/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data'
import * as LocationgroupApi from '@/api/wms/locationgroup'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
@ -412,11 +410,28 @@ const openForm = async (type: string, row?: any) => {
] //
row = row ? row : {}
// row.dimension = 'BY_INEVNEOTY'
// CountPlanMain.allSchemas.formSchema.forEach((item) => {
// if (item.field == 'crontab') {
// item.componentProps.disabled = true
// }
// })
if (row.type == 'CYCLE') {
CountPlanMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'crontab') {
item.componentProps.disabled = false
item.label = '执行周期'
}
})
CountPlanMainRules.crontab[0].required = true
} else {
CountPlanMainRules.crontab[0].required = false
CountPlanMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'crontab') {
item.componentProps.disabled = true
item.label = ''
}
})
}
formRef.value.open(type, row)
// Promise.all([getOwnerAllList(),
@ -644,6 +659,15 @@ const tableSelectionDelete = (selection) => {
}
//
const submitForm = async (formType, data) => {
var isHave = CountPlanMain.allSchemas.formSchema.some(function (item) {
return item.field === 'beginTime' || item.field === 'endTime'
})
if (isHave) {
if (data.beginTime && data.endTime && data.beginTime >= data.endTime) {
message.error('开始时间大于结束时间')
return
}
}
data.subList = tableData.value.map((item) => {
return {
type: item.type,
@ -721,22 +745,34 @@ const selectChange = (field, val) => {
}
})
}
  formRef.value.formRef.setValues({
       crontab:''
    })
if (val == 'DYNAMIC') {
CountPlanMain.allSchemas.formSchema[3].label = '限值(%)'
CountPlanMain.allSchemas.formSchema[3].componentProps.min = 0
CountPlanMain.allSchemas.formSchema[3].componentProps.max = 100
CountPlanMain.allSchemas.formSchema[3].componentProps.disabled = false
} else if (val == 'LOW' || val == 'RANDOM') {
CountPlanMain.allSchemas.formSchema[3].label = '限值'
CountPlanMain.allSchemas.formSchema[3].componentProps.min = 0
CountPlanMain.allSchemas.formSchema[3].componentProps.max = Infinity
CountPlanMain.allSchemas.formSchema[3].componentProps.disabled = false
} else {
CountPlanMain.allSchemas.formSchema[3].componentProps.disabled = true
}
formRef.value.formRef.setValues({
crontab: ''
})
// if (val == 'DYNAMIC') {
// CountPlanMain.allSchemas.formSchema.forEach(item=>{
// if(item.field == 'limitedValue'){
// item.label = '%'
// item.componentProps.min = 0
// item.componentProps.max = 100
// item.componentProps.disabled = false
// }
// })
// } else if (val == 'LOW' || val == 'RANDOM') {
// CountPlanMain.allSchemas.formSchema.forEach(item=>{
// if(item.field == 'limitedValue'){
// item.label = '%'
// item.componentProps.min = 0
// item.componentProps.max =Infinity
// item.componentProps.disabled = false
// }
// })
// } else {
// CountPlanMain.allSchemas.formSchema.forEach(item=>{
// if(item.field == 'limitedValue'){
// item.componentProps.disabled = true
// }
// })
// }
}
}
const formTypeDetail = ref('InputString') //
@ -823,7 +859,7 @@ const selectChangeDetail = (field, val) => {
case 'ITEMS_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') {
item.componentProps.isInpuFocusShow = true
item.componentProps.isSearchList = true
item.componentProps.searchTitle = '物品信息'
item.componentProps.searchAllSchemas = Itembasic.allSchemas
item.componentProps.searchPage = ItembasicApi.getItembasicPage
@ -833,7 +869,7 @@ const selectChangeDetail = (field, val) => {
case 'WAREHOUSE_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') {
item.componentProps.isInpuFocusShow = true
item.componentProps.isSearchList = true
item.componentProps.searchTitle = '仓库信息'
item.componentProps.searchAllSchemas = Warehouse.allSchemas
item.componentProps.searchPage = WarehouseApi.getWarehousePage
@ -843,7 +879,7 @@ const selectChangeDetail = (field, val) => {
case 'AREABASIC_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') {
item.componentProps.isInpuFocusShow = true
item.componentProps.isSearchList = true
item.componentProps.searchTitle = '库区信息'
item.componentProps.searchAllSchemas = Area.allSchemas
item.componentProps.searchPage = AreaApi.getAreaPage
@ -853,7 +889,7 @@ const selectChangeDetail = (field, val) => {
case 'LOCATIONGROUP_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') {
item.componentProps.isInpuFocusShow = true
item.componentProps.isSearchList = true
item.componentProps.searchTitle = '库位组信息'
item.componentProps.searchAllSchemas = Locationgroup.allSchemas
item.componentProps.searchPage = LocationgroupApi.getLocationgroupPage
@ -863,7 +899,7 @@ const selectChangeDetail = (field, val) => {
case 'LOCATION_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') {
item.componentProps.isInpuFocusShow = true
item.componentProps.isSearchList = true
item.componentProps.searchTitle = '库位组信息'
item.componentProps.searchAllSchemas = Location.allSchemas
item.componentProps.searchPage = LocationApi.getLocationPage

Loading…
Cancel
Save