Browse Source

计划外入库修改

master_hella_20240701
zhaoxuebing 6 months ago
parent
commit
0a16e1e64c
  1. 4
      src/views/wms/basicDataManage/subject/subjectAccount/index.vue
  2. 6
      src/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data.ts
  3. 52
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue
  4. 101
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts

4
src/views/wms/basicDataManage/subject/subjectAccount/index.vue

@ -81,9 +81,9 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
if (formField === 'costecentreCode') { if (formField === 'costecentreCode') {
setV['costecentreId'] = val[0]['costcentreId'] setV['costcentreId'] = val[0]['costcentreId']
setV['costcentreCode'] = val[0]['costcentreCode'] setV['costcentreCode'] = val[0]['costcentreCode']
setV['costecentreType'] = val[0]['costcentreType'] setV['costcentreType'] = val[0]['costcentreType']
} }
if( formField === 'projectCode'){ if( formField === 'projectCode'){
setV['projectId'] = val[0]['projectId'] setV['projectId'] = val[0]['projectId']

6
src/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data.ts

@ -37,7 +37,7 @@ export const SubjectAccount = useCrudSchemas(reactive<CrudSchema[]>([
}, },
{ {
label: '成本中心ID', label: '成本中心ID',
field: 'costecentreId', field: 'costcentreId',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable:false, isTable:false,
@ -49,7 +49,7 @@ export const SubjectAccount = useCrudSchemas(reactive<CrudSchema[]>([
}, },
{ {
label: '成本中心代码', label: '成本中心代码',
field: 'costecentreCode', field: 'costcentreCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
form: { form: {
@ -71,7 +71,7 @@ export const SubjectAccount = useCrudSchemas(reactive<CrudSchema[]>([
}, },
{ {
label: '成本中心类型', label: '成本中心类型',
field: 'costecentreType', field: 'costcentreType',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
form:{ form:{

52
src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue

@ -111,16 +111,28 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
row[formField] = val[0][searchField] if(formField === 'itemCode'){
row['packingNumber'] = val[0]['packingNumber'] row[formField] = val[0][searchField]
row['containerNumber'] = val[0]['containerNumber'] row['packingNumber'] = val[0]['packingNumber']
row['batch'] = val[0]['batch'] row['containerNumber'] = val[0]['containerNumber']
row['inventoryStatus'] = val[0]['inventoryStatus'] row['batch'] = val[0]['batch']
row['fromLocationCode'] = val[0]['locationCode'] row['inventoryStatus'] = val[0]['inventoryStatus']
row['itemCode'] = val[0]['itemCode'] row['fromLocationCode'] = val[0]['locationCode']
row['uom'] = val[0]['uom'] row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
}
if(formField === 'costcentreCode'){
row['costcentreCode'] = val[0]['costcentreCode']
}
if(formField === 'qadProjectCode'){
row['qadProjectCode'] = val[0]['projectCode']
}
} else { } else {
const setV = {} const setV = {}
if(formField === 'usageDescription'){
setV['usageDescription'] = val[0]['usageDescription']
setV['usageCode'] = val[0]['code']
}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
} }
@ -130,14 +142,22 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] if(formField === 'itemCode'){
setV['packingNumber'] = val[0]['packingNumber'] setV[formField] = val[0][searchField]
setV['containerNumber'] = val[0]['containerNumber'] setV['packingNumber'] = val[0]['packingNumber']
setV['batch'] = val[0]['batch'] setV['containerNumber'] = val[0]['containerNumber']
setV['inventoryStatus'] = val[0]['inventoryStatus'] setV['batch'] = val[0]['batch']
setV['fromLocationCode'] = val[0]['locationCode'] setV['inventoryStatus'] = val[0]['inventoryStatus']
setV['itemCode'] = val[0]['itemCode'] setV['fromLocationCode'] = val[0]['locationCode']
row['uom'] = val[0]['uom'] setV['itemCode'] = val[0]['itemCode']
setV['uom'] = val[0]['uom']
}
if(formField === 'costcentreCode'){
setV['costcentreCode'] = val[0]['costcentreCode']
}
if(formField === 'qadProjectCode'){
setV['qadProjectCode'] = val[0]['projectCode']
}
formRef.setValues(setV) formRef.setValues(setV)
}) })
} }

101
src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts

@ -424,6 +424,9 @@ export const UnplannedissueRequestMainRules = reactive({
remark: [ remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
usageDescription:[
{ required: true, message: '请选择领用描述', trigger: 'blur' }
],
}) })
/** /**
@ -585,6 +588,94 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150 width: 150
}, },
}, },
{
label: '成本中心代码',
field: 'costcentreCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '选择成本中心',
searchField: 'costcentreCode',
searchTitle: '成本中心信息',
searchAllSchemas: SubjectAccount.allSchemas,
searchPage: SubjectAccountApi.getSubjectAccountPage,
searchCondition: [{
key: 'code', // 查询列表中字段
value: 'usageCode', // 指查询具体值
message: '请选择领用描述!1111', // 当前置条件为空时 弹出信息提示
isMainValue: true // 表示查询条件不是主表的字段的值
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '选择成本中心',
searchField: 'costcentreCode',
searchTitle: '成本中心信息',
searchAllSchemas: SubjectAccount.allSchemas,
searchPage: SubjectAccountApi.getSubjectAccountPage,
searchCondition: [{
key: 'code', // 查询列表中字段
value: 'usageCode', // 指查询具体值
message: '请选择领用描述!', // 当前置条件为空时 弹出信息提示
isMainValue: true // 表示查询条件不是主表的字段的值
}]
}
}
},
{
label: '科目代码',
field: 'qadProjectCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '选择科目代码',
searchField: 'projectCode',
searchTitle: '科目代码信息',
searchAllSchemas: SubjectAccount.allSchemas,
searchPage: SubjectAccountApi.getSubjectAccountPage,
searchCondition: [{
key: 'code', // 查询列表中字段
value: 'usageCode', // 指查询具体值
message: '请选择领用描述!', // 当前置条件为空时 弹出信息提示
isMainValue: true // 表示查询条件不是主表的字段的值
},{
key: 'costcentreCode', // 查询列表中字段
value: 'costcentreCode', // 指查询具体值
message: '请成本中心代码!', // 当前置条件为空时 弹出信息提示
isMainValue: true // 表示查询条件不是主表的字段的值
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '选择成本中心',
searchField: 'projectCode',
searchTitle: '成本中心信息',
searchAllSchemas: SubjectAccount.allSchemas,
searchPage: SubjectAccountApi.getSubjectAccountPage,
searchCondition: [{
key: 'code', // 查询列表中字段
value: 'usageCode', // 指查询具体值
message: '请选择领用描述!', // 当前置条件为空时 弹出信息提示
isMainValue: true // 表示查询条件不是主表的字段的值
},{
key: 'costcentreCode', // 查询列表中字段
value: 'costecentreCode', // 指查询具体值
message: '请成本中心代码!', // 当前置条件为空时 弹出信息提示
isMainValue: false // 表示查询条件不是主表的字段的值
}]
}
}
},
{ {
label: '项目代码', label: '项目代码',
field: 'projectCode', field: 'projectCode',
@ -594,6 +685,7 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}, },
isTableForm: false, isTableForm: false,
isForm: false, isForm: false,
isTable:false,
}, },
{ {
label: '从货主代码', label: '从货主代码',
@ -603,7 +695,8 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150 width: 150
}, },
isForm: false, isForm: false,
isTableForm: false isTableForm: false,
isTable:false,
}, },
{ {
label: '备注', label: '备注',
@ -724,4 +817,10 @@ export const UnplannedissueRequestDetailRules = reactive({
remark: [ remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
costcentreCode:[
{ required: true, message: '请选择成本中心代码', trigger: 'change' }
],
qadProjectCode:[
{ required: true, message: '请选择科目代码', trigger: 'change' }
]
}) })
Loading…
Cancel
Save