|
@ -111,38 +111,36 @@ import { |
|
|
CountPlanDetail, |
|
|
CountPlanDetail, |
|
|
CountPlanDetailRules, |
|
|
CountPlanDetailRules, |
|
|
CountPlanMain, |
|
|
CountPlanMain, |
|
|
CountPlanMainRules, |
|
|
CountPlanMainRules |
|
|
} from './countPlanMain.data' |
|
|
} from './countPlanMain.data' |
|
|
import * as CountPlanMainApi from '@/api/wms/countPlanMain' |
|
|
import * as CountPlanMainApi from '@/api/wms/countPlanMain' |
|
|
import * as CountPlanDetailApi from '@/api/wms/countPlanDetail' |
|
|
import * as CountPlanDetailApi from '@/api/wms/countPlanDetail' |
|
|
import {Owner} from '@/views/wms/basicDataManage/orderManage/owner/owner.data' |
|
|
import { Owner } from '@/views/wms/basicDataManage/orderManage/owner/owner.data' |
|
|
import * as OwnerApi from '@/api/wms/owner' |
|
|
import * as OwnerApi from '@/api/wms/owner' |
|
|
|
|
|
|
|
|
import {Supplier} from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' |
|
|
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' |
|
|
import * as SupplierApi from '@/api/wms/supplier' |
|
|
import * as SupplierApi from '@/api/wms/supplier' |
|
|
|
|
|
|
|
|
import {Customer} from '@/views/wms/basicDataManage/customerManage/customer/customer.data' |
|
|
import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/customer.data' |
|
|
import * as CustomerApi from '@/api/wms/customer' |
|
|
import * as CustomerApi from '@/api/wms/customer' |
|
|
|
|
|
|
|
|
import {Itembasic} from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' |
|
|
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' |
|
|
import * as ItembasicApi from '@/api/wms/itembasic' |
|
|
import * as ItembasicApi from '@/api/wms/itembasic' |
|
|
|
|
|
|
|
|
import {Warehouse} from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data' |
|
|
import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data' |
|
|
import * as WarehouseApi from '@/api/wms/warehouse' |
|
|
import * as WarehouseApi from '@/api/wms/warehouse' |
|
|
|
|
|
|
|
|
import {Area} from '@/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data' |
|
|
import { Area } from '@/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data' |
|
|
import * as AreaApi from '@/api/wms/areabasic' |
|
|
import * as AreaApi from '@/api/wms/areabasic' |
|
|
|
|
|
|
|
|
import { |
|
|
import { Locationgroup } from '@/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data' |
|
|
Locationgroup |
|
|
|
|
|
} from '@/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data' |
|
|
|
|
|
import * as LocationgroupApi from '@/api/wms/locationgroup' |
|
|
import * as LocationgroupApi from '@/api/wms/locationgroup' |
|
|
|
|
|
|
|
|
import {Location} from '@/views/wms/basicDataManage/factoryModeling/location/location.data' |
|
|
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' |
|
|
import * as LocationApi from '@/api/wms/location' |
|
|
import * as LocationApi from '@/api/wms/location' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
|
|
|
|
|
import {DICT_TYPE, getStrDictOptions} from '@/utils/dict' |
|
|
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
|
|
import BasicFormWmsCount from '@/components/BasicForm/src/BasicFormWmsCount.vue' |
|
|
import BasicFormWmsCount from '@/components/BasicForm/src/BasicFormWmsCount.vue' |
|
|
|
|
|
|
|
|
// 盘点计划主 |
|
|
// 盘点计划主 |
|
@ -412,11 +410,28 @@ const openForm = async (type: string, row?: any) => { |
|
|
] // 重置明细数据 |
|
|
] // 重置明细数据 |
|
|
row = row ? row : {} |
|
|
row = row ? row : {} |
|
|
// row.dimension = 'BY_INEVNEOTY' |
|
|
// 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) => { |
|
|
CountPlanMain.allSchemas.formSchema.forEach((item) => { |
|
|
if (item.field == 'crontab') { |
|
|
if (item.field == 'crontab') { |
|
|
item.componentProps.disabled = true |
|
|
item.componentProps.disabled = true |
|
|
|
|
|
item.label = '' |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
} |
|
|
formRef.value.open(type, row) |
|
|
formRef.value.open(type, row) |
|
|
|
|
|
|
|
|
// Promise.all([getOwnerAllList(), |
|
|
// Promise.all([getOwnerAllList(), |
|
@ -572,7 +587,7 @@ const detailOpenForm = (type, row) => { |
|
|
}) |
|
|
}) |
|
|
break |
|
|
break |
|
|
} |
|
|
} |
|
|
} else if ( row.type == 'PROJECT') { |
|
|
} else if (row.type == 'PROJECT') { |
|
|
formTypeDetail.value = 'InputString' |
|
|
formTypeDetail.value = 'InputString' |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -635,7 +650,7 @@ const handleAddTable = () => { |
|
|
// 删除明细 |
|
|
// 删除明细 |
|
|
const handleDeleteTable = (item, index) => { |
|
|
const handleDeleteTable = (item, index) => { |
|
|
let itemIndex = tableData.value.indexOf(item) |
|
|
let itemIndex = tableData.value.indexOf(item) |
|
|
if(itemIndex>-1){ |
|
|
if (itemIndex > -1) { |
|
|
tableData.value.splice(itemIndex, 1) |
|
|
tableData.value.splice(itemIndex, 1) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -644,6 +659,15 @@ const tableSelectionDelete = (selection) => { |
|
|
} |
|
|
} |
|
|
// 主子数据 提交 |
|
|
// 主子数据 提交 |
|
|
const submitForm = async (formType, data) => { |
|
|
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) => { |
|
|
data.subList = tableData.value.map((item) => { |
|
|
return { |
|
|
return { |
|
|
type: item.type, |
|
|
type: item.type, |
|
@ -721,22 +745,34 @@ const selectChange = (field, val) => { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
formRef.value.formRef.setValues({ |
|
|
formRef.value.formRef.setValues({ |
|
|
crontab:'' |
|
|
crontab: '' |
|
|
}) |
|
|
}) |
|
|
if (val == 'DYNAMIC') { |
|
|
// if (val == 'DYNAMIC') { |
|
|
CountPlanMain.allSchemas.formSchema[3].label = '限值(%)' |
|
|
// CountPlanMain.allSchemas.formSchema.forEach(item=>{ |
|
|
CountPlanMain.allSchemas.formSchema[3].componentProps.min = 0 |
|
|
// if(item.field == 'limitedValue'){ |
|
|
CountPlanMain.allSchemas.formSchema[3].componentProps.max = 100 |
|
|
// item.label = '限值(%)' |
|
|
CountPlanMain.allSchemas.formSchema[3].componentProps.disabled = false |
|
|
// item.componentProps.min = 0 |
|
|
} else if (val == 'LOW' || val == 'RANDOM') { |
|
|
// item.componentProps.max = 100 |
|
|
CountPlanMain.allSchemas.formSchema[3].label = '限值' |
|
|
// item.componentProps.disabled = false |
|
|
CountPlanMain.allSchemas.formSchema[3].componentProps.min = 0 |
|
|
// } |
|
|
CountPlanMain.allSchemas.formSchema[3].componentProps.max = Infinity |
|
|
// }) |
|
|
CountPlanMain.allSchemas.formSchema[3].componentProps.disabled = false |
|
|
// } else if (val == 'LOW' || val == 'RANDOM') { |
|
|
} else { |
|
|
// CountPlanMain.allSchemas.formSchema.forEach(item=>{ |
|
|
CountPlanMain.allSchemas.formSchema[3].componentProps.disabled = true |
|
|
// 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') //盘点详情子表新增的时候判断盘点范围值显示输入框还是下拉框 |
|
|
const formTypeDetail = ref('InputString') //盘点详情子表新增的时候判断盘点范围值显示输入框还是下拉框 |
|
@ -823,7 +859,7 @@ const selectChangeDetail = (field, val) => { |
|
|
case 'ITEMS_CODE': |
|
|
case 'ITEMS_CODE': |
|
|
CountPlanDetail.allSchemas.formSchema.forEach((item) => { |
|
|
CountPlanDetail.allSchemas.formSchema.forEach((item) => { |
|
|
if (item.field == 'value') { |
|
|
if (item.field == 'value') { |
|
|
item.componentProps.isInpuFocusShow = true |
|
|
item.componentProps.isSearchList = true |
|
|
item.componentProps.searchTitle = '物品信息' |
|
|
item.componentProps.searchTitle = '物品信息' |
|
|
item.componentProps.searchAllSchemas = Itembasic.allSchemas |
|
|
item.componentProps.searchAllSchemas = Itembasic.allSchemas |
|
|
item.componentProps.searchPage = ItembasicApi.getItembasicPage |
|
|
item.componentProps.searchPage = ItembasicApi.getItembasicPage |
|
@ -833,7 +869,7 @@ const selectChangeDetail = (field, val) => { |
|
|
case 'WAREHOUSE_CODE': |
|
|
case 'WAREHOUSE_CODE': |
|
|
CountPlanDetail.allSchemas.formSchema.forEach((item) => { |
|
|
CountPlanDetail.allSchemas.formSchema.forEach((item) => { |
|
|
if (item.field == 'value') { |
|
|
if (item.field == 'value') { |
|
|
item.componentProps.isInpuFocusShow = true |
|
|
item.componentProps.isSearchList = true |
|
|
item.componentProps.searchTitle = '仓库信息' |
|
|
item.componentProps.searchTitle = '仓库信息' |
|
|
item.componentProps.searchAllSchemas = Warehouse.allSchemas |
|
|
item.componentProps.searchAllSchemas = Warehouse.allSchemas |
|
|
item.componentProps.searchPage = WarehouseApi.getWarehousePage |
|
|
item.componentProps.searchPage = WarehouseApi.getWarehousePage |
|
@ -843,7 +879,7 @@ const selectChangeDetail = (field, val) => { |
|
|
case 'AREABASIC_CODE': |
|
|
case 'AREABASIC_CODE': |
|
|
CountPlanDetail.allSchemas.formSchema.forEach((item) => { |
|
|
CountPlanDetail.allSchemas.formSchema.forEach((item) => { |
|
|
if (item.field == 'value') { |
|
|
if (item.field == 'value') { |
|
|
item.componentProps.isInpuFocusShow = true |
|
|
item.componentProps.isSearchList = true |
|
|
item.componentProps.searchTitle = '库区信息' |
|
|
item.componentProps.searchTitle = '库区信息' |
|
|
item.componentProps.searchAllSchemas = Area.allSchemas |
|
|
item.componentProps.searchAllSchemas = Area.allSchemas |
|
|
item.componentProps.searchPage = AreaApi.getAreaPage |
|
|
item.componentProps.searchPage = AreaApi.getAreaPage |
|
@ -853,7 +889,7 @@ const selectChangeDetail = (field, val) => { |
|
|
case 'LOCATIONGROUP_CODE': |
|
|
case 'LOCATIONGROUP_CODE': |
|
|
CountPlanDetail.allSchemas.formSchema.forEach((item) => { |
|
|
CountPlanDetail.allSchemas.formSchema.forEach((item) => { |
|
|
if (item.field == 'value') { |
|
|
if (item.field == 'value') { |
|
|
item.componentProps.isInpuFocusShow = true |
|
|
item.componentProps.isSearchList = true |
|
|
item.componentProps.searchTitle = '库位组信息' |
|
|
item.componentProps.searchTitle = '库位组信息' |
|
|
item.componentProps.searchAllSchemas = Locationgroup.allSchemas |
|
|
item.componentProps.searchAllSchemas = Locationgroup.allSchemas |
|
|
item.componentProps.searchPage = LocationgroupApi.getLocationgroupPage |
|
|
item.componentProps.searchPage = LocationgroupApi.getLocationgroupPage |
|
@ -863,7 +899,7 @@ const selectChangeDetail = (field, val) => { |
|
|
case 'LOCATION_CODE': |
|
|
case 'LOCATION_CODE': |
|
|
CountPlanDetail.allSchemas.formSchema.forEach((item) => { |
|
|
CountPlanDetail.allSchemas.formSchema.forEach((item) => { |
|
|
if (item.field == 'value') { |
|
|
if (item.field == 'value') { |
|
|
item.componentProps.isInpuFocusShow = true |
|
|
item.componentProps.isSearchList = true |
|
|
item.componentProps.searchTitle = '库位组信息' |
|
|
item.componentProps.searchTitle = '库位组信息' |
|
|
item.componentProps.searchAllSchemas = Location.allSchemas |
|
|
item.componentProps.searchAllSchemas = Location.allSchemas |
|
|
item.componentProps.searchPage = LocationApi.getLocationPage |
|
|
item.componentProps.searchPage = LocationApi.getLocationPage |
|
|