From 26de273a37d0430ff7622c13eef5785984293ebf Mon Sep 17 00:00:00 2001
From: zhang_li
Date: Wed, 16 Apr 2025 17:27:31 +0800
Subject: [PATCH] =?UTF-8?q?YT-2415=E4=B8=8D=E8=89=AF=E5=93=81=E6=B5=81?=
=?UTF-8?q?=E7=A8=8B=E6=8A=A5=E5=BA=9F=E5=87=BA=E5=BA=93=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../scrap/scrapRequestMain/index.vue | 3 +
.../scrapRequestMain/scrapRequestMain.data.ts | 219 ++++++++++--------
.../inventorymoveRequestMainOKHOLD/index.vue | 8 +-
.../inventorymoveRequestMain.data.ts | 4 +-
4 files changed, 135 insertions(+), 99 deletions(-)
diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
index 0ffdcee0b..d2c151fe2 100644
--- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
+++ b/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']) {
tableData.value = []
}
+ if (formField === 'costcentreDescription') {
+ setV['costCenterCode'] =val[0]['costcentreCode']
+ }
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts
index 0b56dc67f..f424c43c5 100644
--- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts
+++ b/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 { 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 * as QadCostcentreApi from '@/api/wms/qadCostcentre/index'
@@ -199,22 +202,35 @@ export const ScrapRequestMain = useCrudSchemas(
}
},
{
- label: '成本中心代码',
+ label: '责任部门',
field: 'costCenterCode',
sort: 'custom',
table: {
width: 150
},
+ isTable: true,
+ isDetail: true,
+ isForm: false,
+ },
+ {
+ label: '责任部门',
+ field: 'costcentreDescription',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable: false,
+ isDetail: false,
+ isForm: true,
tableForm: {
enterSearch: true,
isInpuFocusShow: true, // 开启查询弹窗
- searchListPlaceholder: '请选择成本中心代码',
- searchField: 'costcentreCode',
- searchTitle: '成本中心代码',
+ searchListPlaceholder: '请选择责任部门',
+ searchTitle: '责任部门',
searchAllSchemas: QadCostcentre.allSchemas,
searchPage: QadCostcentreApi.getQadCostcentrePage,
verificationParams: [{
- key: 'costcentreCode',
+ key: 'costcentreDescription',
action: '==',
value: '',
isMainValue: false,
@@ -228,7 +244,7 @@ export const ScrapRequestMain = useCrudSchemas(
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
- searchField: 'costcentreCode', // 查询弹窗赋值字段
+ searchField: 'costcentreDescription', // 查询弹窗赋值字段
searchTitle: '成本中心代码', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
@@ -238,7 +254,7 @@ export const ScrapRequestMain = useCrudSchemas(
isMainValue: false
}],
verificationParams: [{
- key: 'costcentreCode',
+ key: 'costcentreDescription',
action: '==',
value: '',
isMainValue: false,
@@ -402,24 +418,6 @@ export const ScrapRequestMain = useCrudSchemas(
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通知单号',
// field: 'q1Number',
@@ -621,77 +619,105 @@ export const ScrapRequestMain = useCrudSchemas(
}
},
{
- label: '从仓库代码',
- field: 'fromWarehouseCode',
+ label: '从库位代码',
+ field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
- isSearch: true,
- tableForm: {
- enterSearch: true,
- isInpuFocusShow: true, // 开启查询弹窗
- searchListPlaceholder: '请选择仓库代码',
- searchField: 'code',
- searchTitle: '仓库信息',
- searchAllSchemas: Warehouse.allSchemas,
- searchPage: WarehouseApi.getWarehouseByBusinessTypePage,
- searchCondition: [
- {
- key: 'available',
- value: 'TRUE',
- isMainValue: false
- },
- // {
- // key: 'type',
- // value: Scrap.outAreaTypes,
- // isMainValue: false
- // }
- ],
- verificationParams: [
- {
- key: 'code',
- action: '==',
- value: '',
- isMainValue: false,
- isSearch: true,
- isFormModel: true
- }
- ] // 失去焦点校验参数
- },
- form: {
+ form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
- searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
- searchField: 'code', // 查询弹窗赋值字段
- searchTitle: '仓库信息', // 查询弹窗标题
- searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
- searchPage: WarehouseApi.getWarehouseByBusinessTypePage, // 查询弹窗所需分页方法
+ searchListPlaceholder: '请选择从库位代码',
+ searchField: 'code',
+ searchTitle: '库位信息',
+ searchAllSchemas: Location.allSchemas,
+ searchPage: LocationApi.selectBusinessTypeToLocation,
searchCondition: [
{
- key: 'available',
- value: 'TRUE',
- isMainValue: false
- },
- // {
- // key: 'type',
- // value: Scrap.outAreaTypes,
- // isMainValue: false
- // }
- ],
- verificationParams: [
- {
- key: 'code',
+ key: 'areaCode',
+ value: Scrap.outAreaCodes,
+ action: 'in', // 查询拼接条件
+ isSearch: true, // 使用自定义拼接条件
+ isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
+ },{
+ key: 'businessType',
+ value: 'Scrap',
action: '==',
- value: '',
- isMainValue: false,
isSearch: true,
- isFormModel: true
- }
- ] // 失去焦点校验参数
+ isMainValue: false
+ }, {
+ key: 'isIn',
+ value: 'out',
+ action: '==', // 查询拼接条件
+ isSearch: true, // 使用自定义拼接条件
+ isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
+ }],
+ verificationParams: [{
+ key: 'code',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ }
+ }
+ },
+ {
+ label: '出库原因',
+ field: 'outboundReason',
+ dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON,
+ dictClass: 'string',
+ table: {
+ width: 150
+ },
+ form: {
+ componentProps: {
+ filterable: true
+ }
+ },
+ tableForm: {
+ type: 'Select',
+ filterable: true
+ }
+ },
+ {
+ label: '责任',
+ field: 'duty',
+ dictType: DICT_TYPE.DUTY,
+ dictClass: 'string',
+ table: {
+ 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: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
- fromWarehouseCode:[
- {required: true,message: '请选择从仓库代码',trigger: 'change' }
+ fromLocationCode:[
+ {required: true,message: '请选择从库区代码',trigger: 'change' }
],
usageDescription:[
{ required: true, message: '请选择领用描述', trigger: 'blur' }
],
- costCenterCode: [
- { required: true, message: '请输入成本中心代码', trigger: 'blur' }
+ costcentreDescription: [
+ { required: true, message: '请输入责任部门', trigger: 'blur' }
],
costCenterType: [
{ required: true, message: '请输入成本中心类型', trigger: 'blur' }
@@ -1003,6 +1029,12 @@ export const ScrapRequestMainRules = reactive({
// reasonCodeRequisition: [
// { 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([
searchAllSchemas: BalancePopWindow.allSchemas,
searchPage: BalanceApi.getBalanceItemPage,
searchCondition: [{
- message: '请填写从仓库代码!',
- key: 'warehouseCode',
- value: 'fromWarehouseCode',
+ message: '请选择从库位代码!',
+ key: 'fromLocationCode',
+ value: 'fromLocationCode',
isFormModel:true, // filters中添加筛选的数据--取于formModel
required:true, // 前置添加必有,和isFormModel结合使用
action: '==',
isSearch: true,
isMainValue: false
- },{
+ },
+ {
key: 'businessType',
value: 'Scrap',
action: '==',
isSearch: true,
isMainValue: false
- },{
+ },
+ {
key: 'inOrOut',
value: 'out',
action: '==',
@@ -1429,7 +1463,6 @@ export const ScrapRequestDetailRules = reactive({
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
reason: [
- { required: true, message: '请输入报废原因', trigger: 'change' },
{ max: 24, message: '不得超过24个字符', trigger: 'blur' }
],
})
diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue
index e82199896..eb280d862 100644
--- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue
+++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue
@@ -328,7 +328,7 @@ const clearInput = (field, row, index) => {
const clearSearchInput=(field) => {
if (field=='fromLocationCode') {
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromBatch')).tableForm.searchCondition.find(item => {
- if (item.key == 'locationCode') {
+ if (item.key == 'fromLocationCode') {
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({
- key: 'locationCode',
+ key: 'fromLocationCode',
value: val[0]["code"],
action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
@@ -436,7 +436,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
})
} else {
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"]
}
})
diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOkTOHOLD/inventorymoveRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOkTOHOLD/inventorymoveRequestMain.data.ts
index f13b6f287..17f4f53d1 100644
--- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOkTOHOLD/inventorymoveRequestMain.data.ts
+++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOkTOHOLD/inventorymoveRequestMain.data.ts
@@ -504,8 +504,8 @@ export const InventorymoveRequestMainRules = reactive({
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
- fromWarehouseCode: [
- { required: true, message: '请选择从仓库代码', trigger: 'blur' }
+ fromLocationCode: [
+ { required: true, message: '请选择从库位代码', trigger: 'blur' }
],
status: [
{ required: true, message: '请选择状态', trigger: 'change' }