Browse Source

计划外入库修改

master_hella_20240701
zhaoxuebing 3 months ago
parent
commit
5ae60604c1
  1. 18
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
  2. 200
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts

18
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue

@ -192,10 +192,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else { } else {
row['itemCode'] = val[0]['code'] row['itemCode'] = val[0]['code']
row['uom'] = val[0]['uom'] row['uom'] = val[0]['uom']
StdcostpriceApi.queryStdcostpriceByItemCode({"itemCode":val[0]['code']}) // StdcostpriceApi.queryStdcostpriceByItemCode({"itemCode":val[0]['code']})
.then(res => { // .then(res => {
row['singlePrice'] = res.price // row['singlePrice'] = res.price
}) // })
} }
} else if(formField === 'costcentreCode'){ } else if(formField === 'costcentreCode'){
row['costcentreCode'] = val[0]['costcentreCode'] row['costcentreCode'] = val[0]['costcentreCode']
@ -210,6 +210,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
setV['usageDescription'] = val[0]['usageDescription'] setV['usageDescription'] = val[0]['usageDescription']
setV['usageCode'] = val[0]['code'] 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] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
} }

200
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 {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data";
import * as WarehouseApi from "@/api/wms/warehouse"; import * as WarehouseApi from "@/api/wms/warehouse";
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 { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data' import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
import * as ItemPackageApi from '@/api/wms/itempackage/index' 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 businessType = 'UnplannedReceipt'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
@ -95,6 +104,9 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>
label: '截止时间', label: '截止时间',
field: 'dueTime', field: 'dueTime',
formatter: dateFormatter, formatter: dateFormatter,
isForm:false,
isTable:false,
isTableForm:false,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, },
@ -112,6 +124,138 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>
} }
}, },
}, },
{
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: '到仓库代码', label: '到仓库代码',
field: 'toWarehouseCode', field: 'toWarehouseCode',
@ -161,6 +305,8 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
isForm:false,
isTable:false,
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
@ -299,12 +445,12 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>
} }
}, },
{ {
label: '直接生成记录', label: '是否直接生成记录',
field: 'directCreateRecord', field: 'directCreateRecord',
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', dictClass: 'string',
isForm: false, isForm: true,
isTable: false, isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -315,7 +461,6 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>
componentProps: { componentProps: {
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
activeValue: 'TRUE', activeValue: 'TRUE',
disabled: true
} }
} }
}, },
@ -409,6 +554,15 @@ export const UnplannedreceiptRequestMainRules = reactive({
dueTime: [ dueTime: [
{ required: true, message: '请输入截止时间', trigger: 'blur' } { required: true, message: '请输入截止时间', trigger: 'blur' }
], ],
costCenterCode: [
{ required: true, message: '请输入成本中心代码', trigger: 'blur' }
],
costCenterType: [
{ required: true, message: '请输入成本中心类型', trigger: 'blur' }
],
reasonCodeRequisition: [
{ required: true, message: '请输入领用原因代码', trigger: 'blur' }
],
autoCommit: [ autoCommit: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' } { required: true, message: '请选择是否自动提交', trigger: 'change' }
], ],
@ -467,6 +621,12 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
action: '==', action: '==',
isSearch: true, isSearch: true,
isMainValue: false isMainValue: false
},{
key: 'businessTypeCode',
value: 'UnplannedReceipt',
action: '==',
isSearch: true,
isMainValue: false
}] }]
}, },
form: { form: {
@ -483,6 +643,12 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
action: '==', action: '==',
isSearch: true, isSearch: true,
isMainValue: false isMainValue: false
},{
key: 'businessTypeCode',
value: 'UnplannedReceipt',
action: '==',
isSearch: true,
isMainValue: false
}] }]
} }
} }
@ -594,6 +760,10 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
table: { table: {
width: 150 width: 150
}, },
isTable:false,
isTableForm:false,
isDetail:false,
isForm:false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
@ -615,6 +785,10 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
table: { table: {
width: 150 width: 150
}, },
isTable:false,
isTableForm:false,
isDetail:false,
isForm:false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
@ -804,6 +978,10 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
table: { table: {
width: 150 width: 150
}, },
isTable:false,
isTableForm:false,
isDetail:false,
isForm:false,
tableForm:{ tableForm:{
isInpuFocusShow: true, // 开启查询弹窗 isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '选择成本中心', searchListPlaceholder: '选择成本中心',
@ -843,6 +1021,10 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
table: { table: {
width: 150 width: 150
}, },
isTable:false,
isTableForm:false,
isDetail:false,
isForm:false,
tableForm:{ tableForm:{
isInpuFocusShow: true, // 开启查询弹窗 isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '选择科目代码', searchListPlaceholder: '选择科目代码',
@ -906,16 +1088,6 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
filterable: true filterable: true
} }
}, },
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',

Loading…
Cancel
Save