Browse Source

YT-2415不良品流程报废出库页面

intex_onlin20250418
张立 6 days ago
parent
commit
26de273a37
  1. 3
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
  2. 201
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts
  3. 8
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue
  4. 4
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOkTOHOLD/inventorymoveRequestMain.data.ts

3
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue

@ -283,6 +283,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
if (formField === 'fromWarehouseCode' &&formRef.formModel.fromWarehouseCode != val[0]['code']) { if (formField === 'fromWarehouseCode' &&formRef.formModel.fromWarehouseCode != val[0]['code']) {
tableData.value = [] tableData.value = []
} }
if (formField === 'costcentreDescription') {
setV['costCenterCode'] =val[0]['costcentreCode']
}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
} }

201
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts

@ -17,6 +17,9 @@ import { Q2 } from '@/views/qms/inspectionQ2/inspectionQ2.data'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main' import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main'
import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data' import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data' import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data'
import * as QadCostcentreApi from '@/api/wms/qadCostcentre/index' import * as QadCostcentreApi from '@/api/wms/qadCostcentre/index'
@ -199,22 +202,35 @@ export const ScrapRequestMain = useCrudSchemas(
} }
}, },
{ {
label: '成本中心代码', label: '责任部门',
field: 'costCenterCode', field: 'costCenterCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isTable: true,
isDetail: true,
isForm: false,
},
{
label: '责任部门',
field: 'costcentreDescription',
sort: 'custom',
table: {
width: 150
},
isTable: false,
isDetail: false,
isForm: true,
tableForm: { tableForm: {
enterSearch: true, enterSearch: true,
isInpuFocusShow: true, // 开启查询弹窗 isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', searchListPlaceholder: '请选择责任部门',
searchField: 'costcentreCode', searchTitle: '责任部门',
searchTitle: '成本中心代码',
searchAllSchemas: QadCostcentre.allSchemas, searchAllSchemas: QadCostcentre.allSchemas,
searchPage: QadCostcentreApi.getQadCostcentrePage, searchPage: QadCostcentreApi.getQadCostcentrePage,
verificationParams: [{ verificationParams: [{
key: 'costcentreCode', key: 'costcentreDescription',
action: '==', action: '==',
value: '', value: '',
isMainValue: false, isMainValue: false,
@ -228,7 +244,7 @@ export const ScrapRequestMain = useCrudSchemas(
enterSearch: true, enterSearch: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本 searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
searchField: 'costcentreCode', // 查询弹窗赋值字段 searchField: 'costcentreDescription', // 查询弹窗赋值字段
searchTitle: '成本中心代码', // 查询弹窗标题 searchTitle: '成本中心代码', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类 searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法 searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
@ -238,7 +254,7 @@ export const ScrapRequestMain = useCrudSchemas(
isMainValue: false isMainValue: false
}], }],
verificationParams: [{ verificationParams: [{
key: 'costcentreCode', key: 'costcentreDescription',
action: '==', action: '==',
value: '', value: '',
isMainValue: false, isMainValue: false,
@ -402,24 +418,6 @@ export const ScrapRequestMain = useCrudSchemas(
width: 150 width: 150
}, },
}, },
{
label: '出库原因',
field: 'outboundReason',
dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON,
dictClass: 'string',
table: {
width: 150
},
form: {
componentProps: {
filterable: true
}
},
tableForm: {
type: 'Select',
filterable: true
}
},
// { // {
// label: 'Q1通知单号', // label: 'Q1通知单号',
// field: 'q1Number', // field: 'q1Number',
@ -621,77 +619,105 @@ export const ScrapRequestMain = useCrudSchemas(
} }
}, },
{ {
label: '从库代码', label: '从库代码',
field: 'fromWarehouseCode', field: 'fromLocationCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isSearch: true, form: {
tableForm: { // labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true, enterSearch: true,
isInpuFocusShow: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择仓库代码', searchListPlaceholder: '请选择从库位代码',
searchField: 'code', searchField: 'code',
searchTitle: '库信息', searchTitle: '库信息',
searchAllSchemas: Warehouse.allSchemas, searchAllSchemas: Location.allSchemas,
searchPage: WarehouseApi.getWarehouseByBusinessTypePage, searchPage: LocationApi.selectBusinessTypeToLocation,
searchCondition: [ searchCondition: [
{ {
key: 'available', key: 'areaCode',
value: 'TRUE', value: Scrap.outAreaCodes,
action: 'in', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
},{
key: 'businessType',
value: 'Scrap',
action: '==',
isSearch: true,
isMainValue: false isMainValue: false
}, }, {
// { key: 'isIn',
// key: 'type', value: 'out',
// value: Scrap.outAreaTypes, action: '==', // 查询拼接条件
// isMainValue: false isSearch: true, // 使用自定义拼接条件
// } isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
], }],
verificationParams: [ verificationParams: [{
{
key: 'code', key: 'code',
action: '==', action: '==',
value: '', value: '',
isMainValue: false, isMainValue: false,
isSearch: true, isSearch: true,
isFormModel: true isFormModel: true,
}], // 失去焦点校验参数
} }
] // 失去焦点校验参数 }
},
{
label: '出库原因',
field: 'outboundReason',
dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON,
dictClass: 'string',
table: {
width: 150
}, },
form: { form: {
// labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch: true, filterable: true
isSearchList: true, // 开启查询弹窗 }
searchListPlaceholder: '请选择仓库代码', // 输入框占位文本 },
searchField: 'code', // 查询弹窗赋值字段 tableForm: {
searchTitle: '仓库信息', // 查询弹窗标题 type: 'Select',
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类 filterable: true
searchPage: WarehouseApi.getWarehouseByBusinessTypePage, // 查询弹窗所需分页方法 }
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}, },
// {
// key: 'type',
// value: Scrap.outAreaTypes,
// isMainValue: false
// }
],
verificationParams: [
{ {
key: 'code', label: '责任',
action: '==', field: 'duty',
value: '', dictType: DICT_TYPE.DUTY,
isMainValue: false, dictClass: 'string',
isSearch: true, table: {
isFormModel: true width: 150
},
form: {
componentProps: {
filterable: true
} }
] // 失去焦点校验参数 },
tableForm: {
type: 'Select',
filterable: true
} }
},
{
label: '责任明细',
field: 'dutyDetail',
dictType: DICT_TYPE.DUTY_DETAILS,
dictClass: 'string',
table: {
width: 150
},
form: {
componentProps: {
filterable: true
}
},
tableForm: {
type: 'Select',
filterable: true
} }
}, },
{ {
@ -988,14 +1014,14 @@ export const ScrapRequestMainRules = reactive({
remark: [ remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
fromWarehouseCode:[ fromLocationCode:[
{required: true,message: '请选择从库代码',trigger: 'change' } {required: true,message: '请选择从库代码',trigger: 'change' }
], ],
usageDescription:[ usageDescription:[
{ required: true, message: '请选择领用描述', trigger: 'blur' } { required: true, message: '请选择领用描述', trigger: 'blur' }
], ],
costCenterCode: [ costcentreDescription: [
{ required: true, message: '请输入成本中心代码', trigger: 'blur' } { required: true, message: '请输入责任部门', trigger: 'blur' }
], ],
costCenterType: [ costCenterType: [
{ required: true, message: '请输入成本中心类型', trigger: 'blur' } { required: true, message: '请输入成本中心类型', trigger: 'blur' }
@ -1003,6 +1029,12 @@ export const ScrapRequestMainRules = reactive({
// reasonCodeRequisition: [ // reasonCodeRequisition: [
// { required: true, message: '请输入领用原因代码', trigger: 'blur' } // { required: true, message: '请输入领用原因代码', trigger: 'blur' }
// ], // ],
duty: [
{ required: true, message: '请选择责任', trigger: ['blur','change'] }
],
dutyDetail: [
{ required: true, message: '请选择责任明细', trigger: ['blur', 'change'] }
],
}) })
/** /**
@ -1085,21 +1117,23 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchAllSchemas: BalancePopWindow.allSchemas, searchAllSchemas: BalancePopWindow.allSchemas,
searchPage: BalanceApi.getBalanceItemPage, searchPage: BalanceApi.getBalanceItemPage,
searchCondition: [{ searchCondition: [{
message: '请填写从仓库代码!', message: '请选择从库位代码!',
key: 'warehouseCode', key: 'fromLocationCode',
value: 'fromWarehouseCode', value: 'fromLocationCode',
isFormModel:true, // filters中添加筛选的数据--取于formModel isFormModel:true, // filters中添加筛选的数据--取于formModel
required:true, // 前置添加必有,和isFormModel结合使用 required:true, // 前置添加必有,和isFormModel结合使用
action: '==', action: '==',
isSearch: true, isSearch: true,
isMainValue: false isMainValue: false
},{ },
{
key: 'businessType', key: 'businessType',
value: 'Scrap', value: 'Scrap',
action: '==', action: '==',
isSearch: true, isSearch: true,
isMainValue: false isMainValue: false
},{ },
{
key: 'inOrOut', key: 'inOrOut',
value: 'out', value: 'out',
action: '==', action: '==',
@ -1429,7 +1463,6 @@ export const ScrapRequestDetailRules = reactive({
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
reason: [ reason: [
{ required: true, message: '请输入报废原因', trigger: 'change' },
{ max: 24, message: '不得超过24个字符', trigger: 'blur' } { max: 24, message: '不得超过24个字符', trigger: 'blur' }
], ],
}) })

8
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue

@ -328,7 +328,7 @@ const clearInput = (field, row, index) => {
const clearSearchInput=(field) => { const clearSearchInput=(field) => {
if (field=='fromLocationCode') { if (field=='fromLocationCode') {
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromBatch')).tableForm.searchCondition.find(item => { InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromBatch')).tableForm.searchCondition.find(item => {
if (item.key == 'locationCode') { if (item.key == 'fromLocationCode') {
item.value = '' item.value = ''
} }
}) })
@ -426,9 +426,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// } // }
// }) // })
// } // }
if(InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromBatch')).tableForm.searchCondition.find(item => (item.key == 'locationCode')) == undefined){ if(InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromBatch')).tableForm.searchCondition.find(item => (item.key == 'fromLocationCode')) == undefined){
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromBatch')).tableForm.searchCondition.push({ InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromBatch')).tableForm.searchCondition.push({
key: 'locationCode', key: 'fromLocationCode',
value: val[0]["code"], value: val[0]["code"],
action: '==', // action: '==', //
isSearch: true, // 使 isSearch: true, // 使
@ -436,7 +436,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
}) })
} else { } else {
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromBatch')).tableForm.searchCondition.find(item => { InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromBatch')).tableForm.searchCondition.find(item => {
if (item.key == 'locationCode') { if (item.key == 'fromLocationCode') {
item.value = val[0]["code"] item.value = val[0]["code"]
} }
}) })

4
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOkTOHOLD/inventorymoveRequestMain.data.ts

@ -504,8 +504,8 @@ export const InventorymoveRequestMainRules = reactive({
departmentCode: [ departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' } { required: true, message: '请输入部门', trigger: 'blur' }
], ],
fromWarehouseCode: [ fromLocationCode: [
{ required: true, message: '请选择从库代码', trigger: 'blur' } { required: true, message: '请选择从库代码', trigger: 'blur' }
], ],
status: [ status: [
{ required: true, message: '请选择状态', trigger: 'change' } { required: true, message: '请选择状态', trigger: 'change' }

Loading…
Cancel
Save