diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index c57778ac1..3f56bbc43 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -192,10 +192,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } else { row['itemCode'] = val[0]['code'] row['uom'] = val[0]['uom'] - StdcostpriceApi.queryStdcostpriceByItemCode({"itemCode":val[0]['code']}) - .then(res => { - row['singlePrice'] = res.price - }) + // StdcostpriceApi.queryStdcostpriceByItemCode({"itemCode":val[0]['code']}) + // .then(res => { + // row['singlePrice'] = res.price + // }) } } else if(formField === 'costcentreCode'){ row['costcentreCode'] = val[0]['costcentreCode'] @@ -210,6 +210,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => setV['usageDescription'] = val[0]['usageDescription'] setV['usageCode'] = val[0]['code'] } + if(formField === 'costCenterCode'){ + setV['costcentreCode'] = val[0]['costcentreCode'] + setV['costCenterType'] = val[0]['costcentreType'] + } + if(formField === 'reasonCodeRequisition'){ + setV['reasonCodeRequisition'] = val[0]['code'] + } + if(formField === 'projectCode'){ + setV['projectCode'] = val[0]['projectCode'] + } setV[formField] = val[0][searchField] formRef.setValues(setV) } diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts index 1ec7cd3b7..a69db182f 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts @@ -10,10 +10,19 @@ import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/item import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data"; import * as WarehouseApi from "@/api/wms/warehouse"; + import {Location} from "@/views/wms/basicDataManage/factoryModeling/location/location.data"; import * as LocationApi from "@/api/wms/location"; + import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data' import * as ItemPackageApi from '@/api/wms/itempackage/index' + +import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data' +import * as QadCostcentreApi from '@/api/wms/qadCostcentre/index' + +import { QadProject } from '@/views/wms/basicDataManage/subject/qadProject/qadProject.data' +import * as QadProjectApi from '@/api/wms/qadProject' + const businessType = 'UnplannedReceipt' const { t } = useI18n() // 国际化 @@ -95,6 +104,9 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive label: '截止时间', field: 'dueTime', formatter: dateFormatter, + isForm:false, + isTable:false, + isTableForm:false, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, @@ -112,6 +124,138 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive } }, }, + { + label: '成本中心代码', + field: 'costCenterCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', + searchField: 'costcentreCode', + searchTitle: '成本中心代码', + searchAllSchemas: QadCostcentre.allSchemas, + searchPage: QadCostcentreApi.getQadCostcentrePage + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本 + searchField: 'costcentreCode', // 查询弹窗赋值字段 + searchTitle: '成本中心代码', // 查询弹窗标题 + searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类 + searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '成本中心类型', + field: 'costCenterType', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + }, + { + label: '领用原因代码', + field: 'reasonCodeRequisition', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成领用原因代码', + searchField: 'code', + searchTitle: '领用原因代码', + searchAllSchemas: SubjectAccount.allSchemas, + searchPage: SubjectAccountApi.getSubjectAccountPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'costcentreType', + value: 'costCenterType', + message: '成本中心类型不能为空!', + isMainValue: true + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '领用原因代码', // 查询弹窗标题 + searchAllSchemas: SubjectAccount.allSchemas, // 查询弹窗所需类 + searchPage: SubjectAccountApi.getSubjectAccountPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'costcentreType', + value: 'costCenterType', + message: '成本中心类型不能为空!', + isMainValue: true + }] + } + } + }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择QAD项目信息', + searchField: 'projectCode', + searchTitle: '领用原因代码', + searchAllSchemas: QadProject.allSchemas, + searchPage: QadProjectApi.getQadProjectPage + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择QAD项目信息', // 输入框占位文本 + searchField: 'projectCode', // 查询弹窗赋值字段 + searchTitle: '领用原因代码', // 查询弹窗标题 + searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类 + searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + { + label: '工作中心', + field: 'workCenter', + sort: 'custom', + table: { + width: 150 + }, + }, { label: '到仓库代码', field: 'toWarehouseCode', @@ -161,6 +305,8 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive table: { width: 150 }, + isForm:false, + isTable:false, form: { // labelMessage: '信息提示说明!!!', componentProps: { @@ -299,12 +445,12 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive } }, { - label: '直接生成记录', + label: '是否直接生成记录', field: 'directCreateRecord', dictType: DICT_TYPE.TRUE_FALSE, dictClass: 'string', - isForm: false, - isTable: false, + isForm: true, + isTable: true, sort: 'custom', table: { width: 150 @@ -315,7 +461,6 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive componentProps: { inactiveValue: 'FALSE', activeValue: 'TRUE', - disabled: true } } }, @@ -409,6 +554,15 @@ export const UnplannedreceiptRequestMainRules = reactive({ dueTime: [ { required: true, message: '请输入截止时间', trigger: 'blur' } ], + costCenterCode: [ + { required: true, message: '请输入成本中心代码', trigger: 'blur' } + ], + costCenterType: [ + { required: true, message: '请输入成本中心类型', trigger: 'blur' } + ], + reasonCodeRequisition: [ + { required: true, message: '请输入领用原因代码', trigger: 'blur' } + ], autoCommit: [ { required: true, message: '请选择是否自动提交', trigger: 'change' } ], @@ -467,6 +621,12 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive