Browse Source

计划外入库修改

master_hella_20240701
zhaoxuebing 5 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 {
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)
}

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 * 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<CrudSchema[]>
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<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: '到仓库代码',
field: 'toWarehouseCode',
@ -161,6 +305,8 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
isForm:false,
isTable:false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
@ -299,12 +445,12 @@ export const UnplannedreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>
}
},
{
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<CrudSchema[]>
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<CrudSchema[
action: '==',
isSearch: true,
isMainValue: false
},{
key: 'businessTypeCode',
value: 'UnplannedReceipt',
action: '==',
isSearch: true,
isMainValue: false
}]
},
form: {
@ -483,6 +643,12 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
action: '==',
isSearch: true,
isMainValue: false
},{
key: 'businessTypeCode',
value: 'UnplannedReceipt',
action: '==',
isSearch: true,
isMainValue: false
}]
}
}
@ -594,6 +760,10 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
table: {
width: 150
},
isTable:false,
isTableForm:false,
isDetail:false,
isForm:false,
form: {
component: 'InputNumber',
componentProps: {
@ -615,6 +785,10 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
table: {
width: 150
},
isTable:false,
isTableForm:false,
isDetail:false,
isForm:false,
form: {
component: 'InputNumber',
componentProps: {
@ -804,6 +978,10 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
table: {
width: 150
},
isTable:false,
isTableForm:false,
isDetail:false,
isForm:false,
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '选择成本中心',
@ -843,6 +1021,10 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
table: {
width: 150
},
isTable:false,
isTableForm:false,
isDetail:false,
isForm:false,
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '选择科目代码',
@ -906,16 +1088,6 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
filterable: true
}
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '备注',
field: 'remark',

Loading…
Cancel
Save