Browse Source

备件领用修改

master_hella_20240701
zhaoxuebing 5 months ago
parent
commit
d77d7853a6
  1. 145
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/sparepartsrequisitionJobMain.data.ts
  2. 167
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/sparepartsrequisitionRecordMain.data.ts
  3. 14
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue
  4. 233
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts

145
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/sparepartsrequisitionJobMain.data.ts

@ -1,6 +1,15 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
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'
import * as SubjectAccountApi from '@/api/wms/subjectAccount'
import { SubjectAccount } from '@/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data'
/**
* @returns {Array}
@ -78,6 +87,138 @@ export const UnplannedissueJobMain = 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: 'requestDueTime',
@ -585,6 +726,7 @@ export const UnplannedissueJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '单据号',
field: 'number',
sort: 'custom',
hiddenInMain:true,
table: {
width: 180
},
@ -641,6 +783,7 @@ export const UnplannedissueJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '器具号',
field: 'containerNumber',
sort: 'custom',
isTable:false,
table: {
width: 150
},
@ -690,6 +833,7 @@ export const UnplannedissueJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '货主代码',
field: 'ownerCode',
sort: 'custom',
isTable:false,
table: {
width: 150
},
@ -697,6 +841,7 @@ export const UnplannedissueJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '项目代码',
field: 'projectCode',
isTable:false,
sort: 'custom',
table: {
width: 150

167
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/sparepartsrequisitionRecordMain.data.ts

@ -2,6 +2,15 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
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'
import * as SubjectAccountApi from '@/api/wms/subjectAccount'
import { SubjectAccount } from '@/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data'
/**
* @returns {Array}
*/
@ -29,6 +38,7 @@ export const UnplannedissueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '任务单号',
field: 'jobNumber',
sort: 'custom',
isTable:false,
table: {
width: 180
},
@ -42,6 +52,7 @@ export const UnplannedissueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return cellValue
},
isTable:false,
table: {
width: 150
},
@ -115,6 +126,138 @@ export const UnplannedissueRecordMain = 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: 'activeDate',
@ -207,8 +350,11 @@ export const UnplannedissueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
isTable:false,
isForm:false,
isDetail:false,
isTableForm:false,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
@ -218,6 +364,7 @@ export const UnplannedissueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '备注',
field: 'remark',
sort: 'custom',
isTable:false,
table: {
width: 150
},
@ -337,6 +484,7 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
label: '单据号',
field: 'number',
sort: 'custom',
hiddenInMain:true,
table: {
width: 180
},
@ -393,6 +541,10 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
label: '器具号',
field: 'containerNumber',
sort: 'custom',
isTable:false,
isForm:false,
isDetail:false,
isTableForm:false,
table: {
width: 150
},
@ -463,6 +615,10 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
{
label: '货主代码',
field: 'ownerCode',
isTable:false,
isForm:false,
isDetail:false,
isTableForm:false,
sort: 'custom',
table: {
width: 150
@ -488,6 +644,10 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
label: '项目代码',
field: 'projectCode',
sort: 'custom',
isTable:false,
isForm:false,
isDetail:false,
isTableForm:false,
table: {
width: 150
},
@ -496,8 +656,11 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
isTable:false,
isForm:false,
isDetail:false,
isTableForm:false,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150

14
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue

@ -122,6 +122,20 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else {
const setV = {}
setV[formField] = val[0][searchField]
if(formField === 'usageDescription'){
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']
}
formRef.setValues(setV)
}
})

233
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts

@ -5,6 +5,15 @@ import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
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'
import * as SubjectAccountApi from '@/api/wms/subjectAccount'
import { SubjectAccount } from '@/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -89,13 +98,145 @@ export const UnplannedissueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
},
},
{
label: '领用原因',
field: 'reason',
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
},
sortTableDefault:1001
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: 'reason',
// table: {
// width: 150
// },
// sortTableDefault:1001
// },
{
label: '从仓库代码',
field: 'fromWarehouseCode',
@ -366,6 +507,18 @@ export const UnplannedissueRequestMainRules = reactive({
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
usageDescription:[
{ required: true, message: '请选择领用描述', trigger: 'blur' }
],
costCenterCode: [
{ required: true, message: '请输入成本中心代码', trigger: 'blur' }
],
costCenterType: [
{ required: true, message: '请输入成本中心类型', trigger: 'blur' }
],
reasonCodeRequisition: [
{ required: true, message: '请输入领用原因代码', trigger: 'blur' }
],
})
/**
@ -400,7 +553,26 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePageSpare
searchPage: BalanceApi.getBalancePageSpare,
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
},{
key: 'businessType',
value: 'UnplannedDeliverSpare',
action: '==',
isSearch: true,
isMainValue: false
},{
key: 'inOrOut',
value: 'out',
action: '==',
isSearch: true,
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
@ -410,7 +582,26 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePageSpare
searchPage: BalanceApi.getBalancePageSpare,
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
},{
key: 'businessType',
value: 'UnplannedDeliverSpare',
action: '==',
isSearch: true,
isMainValue: false
},{
key: 'inOrOut',
value: 'out',
action: '==',
isSearch: true,
isMainValue: false
}]
}
}
},
@ -474,6 +665,7 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
},
isTableForm: false,
isForm: false,
isTable:false,
},
{
label: '数量',
@ -508,6 +700,11 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
tableForm: {
type: 'Select',
disabled: true
},
form:{
componentProps:{
disabled:true,
}
}
},
{
@ -521,9 +718,15 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150
},
tableForm: {
type: 'Select'
type: 'Select',
disabled: true
},
isTableForm: false,
form:{
componentProps:{
disabled:true,
}
},
isTableForm: true,
isForm: false,
},
{
@ -533,6 +736,14 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
tableForm: {
disabled: true
},
form:{
componentProps:{
disabled:true,
}
}
},
{
label: '项目代码',
@ -543,12 +754,14 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150
},
isTableForm: false,
isTable:false,
isForm: false,
},
{
label: '从货主代码',
field: 'fromOwnerCode',
hiddenInMain:true,
isTable:false,
sort: 'custom',
table: {
width: 150
@ -621,7 +834,8 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}
},
isTableForm: false,
isForm: false
isForm: false,
isTable:false,
},
{
label: '最后更新者',
@ -632,7 +846,8 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150
},
isTableForm: false,
isForm: false
isForm: false,
isTable:false,
},
{
label: '操作',

Loading…
Cancel
Save