diff --git a/src/api/wms/unplannedissueRecordDetail/index.ts b/src/api/wms/unplannedissueRecordDetail/index.ts
index 9e508c4ae..839ff3bd9 100644
--- a/src/api/wms/unplannedissueRecordDetail/index.ts
+++ b/src/api/wms/unplannedissueRecordDetail/index.ts
@@ -38,10 +38,15 @@ export const getUnplannedissueRecordDetailPage = async (params) => {
'action':'==',
'value':'1'
}
- if(!data.filters){
- data.filters = []
+ const cmdExists = data.filters.some(filter =>
+ filter.column === dataTypeCondition.column &&
+ filter.action === dataTypeCondition.action &&
+ filter.value === dataTypeCondition.value
+ );
+
+ if (!cmdExists) {
+ data.filters.push(dataTypeCondition)
}
- data.filters.push(dataTypeCondition)
return await request.post({ url: '/wms/unplannedissue-record-detail/senior', data })
} else {
params.detailDataType='1'
@@ -59,7 +64,15 @@ export const getUnplannedissueRecordDetailPageSpare = async (params) => {
'action':'==',
'value':'2'
}
- data.filters.push(dataTypeCondition)
+ const cmdExists = data.filters.some(filter =>
+ filter.column === dataTypeCondition.column &&
+ filter.action === dataTypeCondition.action &&
+ filter.value === dataTypeCondition.value
+ );
+
+ if (!cmdExists) {
+ data.filters.push(dataTypeCondition)
+ }
return await request.post({ url: '/wms/unplannedissue-record-detail/senior', data })
} else {
params.detailDataType='2'
@@ -95,4 +108,4 @@ export const exportUnplannedissueRecordDetail = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/unplannedissue-record-detail/get-import-template' })
-}
\ No newline at end of file
+}
diff --git a/src/api/wms/unplannedissueRecordMain/index.ts b/src/api/wms/unplannedissueRecordMain/index.ts
index 772b38813..18feaf0ab 100644
--- a/src/api/wms/unplannedissueRecordMain/index.ts
+++ b/src/api/wms/unplannedissueRecordMain/index.ts
@@ -24,42 +24,6 @@ export interface UnplannedissueRecordMainVO {
available: string
}
-// 查询计划外出库记录主列表
-export const getUnplannedissueRecordMainPage = async (params) => {
- if (params.isSearch) {
- delete params.isSearch
- const data = {...params}
- const dataTypeCondition = {
- 'column':'dataType',
- 'action':'==',
- 'value':'1'
- }
- data.filters.push(dataTypeCondition)
- return await request.post({ url: '/wms/unplannedissue-record-main/senior', data })
- } else {
- params.dataType='1'
- return await request.get({ url: `/wms/unplannedissue-record-main/page`, params })
- }
-}
-
-// 查询计划外出库记录主列表
-export const getUnplannedissueRecordMainPageSpare = async (params) => {
- if (params.isSearch) {
- delete params.isSearch
- const data = {...params}
- const dataTypeCondition = {
- 'column':'dataType',
- 'action':'==',
- 'value':'2'
- }
- data.filters.push(dataTypeCondition)
- return await request.post({ url: '/wms/unplannedissue-record-main/senior', data })
- } else {
- params.dataType='2'
- return await request.get({ url: `/wms/unplannedissue-record-main/page`, params })
- }
-}
-
// 查询计划外出库记录主详情
export const getUnplannedissueRecordMain = async (id: number) => {
return await request.get({ url: `/wms/unplannedissue-record-main/get?id=` + id })
@@ -94,4 +58,4 @@ export const exportUnplannedissueRecordMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/unplannedissue-record-main/get-import-template' })
-}
\ No newline at end of file
+}
diff --git a/src/api/wms/unplannedissueRequestDetail/index.ts b/src/api/wms/unplannedissueRequestDetail/index.ts
index 99adb86f7..b8a444f31 100644
--- a/src/api/wms/unplannedissueRequestDetail/index.ts
+++ b/src/api/wms/unplannedissueRequestDetail/index.ts
@@ -33,10 +33,15 @@ export const getUnplannedissueRequestDetailPage = async (params) => {
'action':'==',
'value':'1'
}
- if(!data.filters){
- data.filters = [];
+ const cmdExists = data.filters.some(filter =>
+ filter.column === dataTypeCondition.column &&
+ filter.action === dataTypeCondition.action &&
+ filter.value === dataTypeCondition.value
+ );
+
+ if (!cmdExists) {
+ data.filters.push(dataTypeCondition)
}
- data.filters.push(dataTypeCondition)
return await request.post({ url: '/wms/unplannedissue-request-detail/senior', data })
} else {
params.detailDataType='1'
@@ -44,7 +49,7 @@ export const getUnplannedissueRequestDetailPage = async (params) => {
}
}
-// 查询计划外出库申请子列表
+// 查询备件领用列表
export const getUnplannedissueRequestDetailPageSpare = async (params) => {
if (params.isSearch) {
delete params.isSearch
@@ -54,7 +59,15 @@ export const getUnplannedissueRequestDetailPageSpare = async (params) => {
'action':'==',
'value':'2'
}
- data.filters.push(dataTypeCondition)
+ const cmdExists = data.filters.some(filter =>
+ filter.column === dataTypeCondition.column &&
+ filter.action === dataTypeCondition.action &&
+ filter.value === dataTypeCondition.value
+ );
+
+ if (!cmdExists) {
+ data.filters.push(dataTypeCondition)
+ }
return await request.post({ url: '/wms/unplannedissue-request-detail/senior', data })
} else {
params.detailDataType='2'
@@ -90,4 +103,4 @@ export const exportUnplannedissueRequestDetail = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/unplannedissue-request-detail/get-import-template' })
-}
\ No newline at end of file
+}
diff --git a/src/api/wms/unplannedissueRequestMain/index.ts b/src/api/wms/unplannedissueRequestMain/index.ts
index 4796b2cb7..2137666eb 100644
--- a/src/api/wms/unplannedissueRequestMain/index.ts
+++ b/src/api/wms/unplannedissueRequestMain/index.ts
@@ -32,7 +32,15 @@ export const getUnplannedissueRequestMainPage = async (params) => {
'action':'==',
'value':'1'
}
- data.filters.push(dataTypeCondition)
+ const cmdExists = data.filters.some(filter =>
+ filter.column === dataTypeCondition.column &&
+ filter.action === dataTypeCondition.action &&
+ filter.value === dataTypeCondition.value
+ );
+
+ if (!cmdExists) {
+ data.filters.push(dataTypeCondition)
+ }
return await request.post({ url: '/wms/unplannedissue-request-main/senior', data })
} else {
params.dataType='1'
@@ -70,13 +78,13 @@ export const exportUnplannedissueRequestMain = async (params) => {
}
}
+
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/unplannedissue-request-main/get-import-template' })
}
-
// 关闭-计划外出库申请
export const closeUnplannedissueRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedissue-request-main/close?id=` + id })
@@ -114,14 +122,22 @@ export const getUnplannedissueRequestMainPageSpare = async (params) => {
delete params.isSearch
const data = {...params}
const dataTypeCondition = {
- 'column':'dataType',
+ 'column':'detailDataType',
'action':'==',
'value':'2'
}
- data.filters.push(dataTypeCondition)
+ const cmdExists = data.filters.some(filter =>
+ filter.column === dataTypeCondition.column &&
+ filter.action === dataTypeCondition.action &&
+ filter.value === dataTypeCondition.value
+ );
+
+ if (!cmdExists) {
+ data.filters.push(dataTypeCondition)
+ }
return await request.post({ url: '/wms/unplannedissue-request-main/senior', data })
} else {
- params.dataType='2'
+ params.detailDataType='2'
return await request.get({ url: `/wms/unplannedissue-request-main/page`, params })
}
}
diff --git a/src/api/wms/unplannedreceiptRecordDetail/index.ts b/src/api/wms/unplannedreceiptRecordDetail/index.ts
index 458ebabed..28905fbf0 100644
--- a/src/api/wms/unplannedreceiptRecordDetail/index.ts
+++ b/src/api/wms/unplannedreceiptRecordDetail/index.ts
@@ -37,8 +37,50 @@ export const getUnplannedreceiptRecordDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
+ const dataTypeCondition = {
+ 'column':'detailDataType',
+ 'action':'==',
+ 'value':'1'
+ }
+ const cmdExists = data.filters.some(filter =>
+ filter.column === dataTypeCondition.column &&
+ filter.action === dataTypeCondition.action &&
+ filter.value === dataTypeCondition.value
+ );
+
+ if (!cmdExists) {
+ data.filters.push(dataTypeCondition)
+ }
return await request.post({ url: '/wms/unplannedreceipt-record-detail/senior', data })
} else {
+ params.detailDataType='1'
+ return await request.get({ url: `/wms/unplannedreceipt-record-detail/page`, params })
+ }
+}
+
+
+// 查询备件退库记录子列表
+export const getUnplannedreceiptRecordDetailPageSpare = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ const dataTypeCondition = {
+ 'column':'detailDataType',
+ 'action':'==',
+ 'value':'2'
+ }
+ const cmdExists = data.filters.some(filter =>
+ filter.column === dataTypeCondition.column &&
+ filter.action === dataTypeCondition.action &&
+ filter.value === dataTypeCondition.value
+ );
+
+ if (!cmdExists) {
+ data.filters.push(dataTypeCondition)
+ }
+ return await request.post({ url: '/wms/unplannedreceipt-record-detail/senior', data })
+ } else {
+ params.detailDataType='2'
return await request.get({ url: `/wms/unplannedreceipt-record-detail/page`, params })
}
}
@@ -71,4 +113,4 @@ export const exportUnplannedreceiptRecordDetail = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/unplannedreceipt-record-detail/get-import-template' })
-}
\ No newline at end of file
+}
diff --git a/src/api/wms/unplannedreceiptRequestDetail/index.ts b/src/api/wms/unplannedreceiptRequestDetail/index.ts
index 3b63ee625..f9268afab 100644
--- a/src/api/wms/unplannedreceiptRequestDetail/index.ts
+++ b/src/api/wms/unplannedreceiptRequestDetail/index.ts
@@ -32,8 +32,49 @@ export const getUnplannedreceiptRequestDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
+ const dataTypeCondition = {
+ 'column':'detailDataType',
+ 'action':'==',
+ 'value':'1'
+ }
+ const cmdExists = data.filters.some(filter =>
+ filter.column === dataTypeCondition.column &&
+ filter.action === dataTypeCondition.action &&
+ filter.value === dataTypeCondition.value
+ );
+
+ if (!cmdExists) {
+ data.filters.push(dataTypeCondition)
+ }
+ return await request.post({ url: '/wms/unplannedreceipt-request-detail/senior', data })
+ } else {
+ params.detailDataType='1'
+ return await request.get({ url: `/wms/unplannedreceipt-request-detail/page`, params })
+ }
+}
+
+// 查询维修备件退库列表
+export const getUnplannedreceiptRequestDetailPageSpare = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ const dataTypeCondition = {
+ 'column':'detailDataType',
+ 'action':'==',
+ 'value':'2'
+ }
+ const cmdExists = data.filters.some(filter =>
+ filter.column === dataTypeCondition.column &&
+ filter.action === dataTypeCondition.action &&
+ filter.value === dataTypeCondition.value
+ );
+
+ if (!cmdExists) {
+ data.filters.push(dataTypeCondition)
+ }
return await request.post({ url: '/wms/unplannedreceipt-request-detail/senior', data })
} else {
+ params.detailDataType='2'
return await request.get({ url: `/wms/unplannedreceipt-request-detail/page`, params })
}
}
diff --git a/src/api/wms/unplannedreceiptRequestMain/index.ts b/src/api/wms/unplannedreceiptRequestMain/index.ts
index 67966664e..23f034ae1 100644
--- a/src/api/wms/unplannedreceiptRequestMain/index.ts
+++ b/src/api/wms/unplannedreceiptRequestMain/index.ts
@@ -96,3 +96,7 @@ export const agreeUnplannedreceiptRequestMain = async (id) => {
export const handleUnplannedreceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedreceipt-request-main/handle?id=` + id })
}
+
+export const handleSparepartReturnRequestMain = async (id) => {
+ return await request.put({ url: `/wms/unplannedreceipt-request-main/handleBack?id=` + id })
+}
diff --git a/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRecordMain/index.vue b/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRecordMain/index.vue
new file mode 100644
index 000000000..a818b90dd
--- /dev/null
+++ b/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRecordMain/index.vue
@@ -0,0 +1,182 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.number }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRecordMain/sparepartReturnRecordMain.data.ts b/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRecordMain/sparepartReturnRecordMain.data.ts
new file mode 100644
index 000000000..32c7b00bf
--- /dev/null
+++ b/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRecordMain/sparepartReturnRecordMain.data.ts
@@ -0,0 +1,879 @@
+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} 计划外入库记录主表
+ */
+export const UnplannedreceiptRecordMain = useCrudSchemas(reactive([
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ table: {
+ width: 180,
+ fixed: 'left'
+ },
+ isSearch: true
+ },
+ {
+ label: '申请单号',
+ field: 'requestNumber',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isSearch: true
+ },
+ {
+ label: '任务单号',
+ field: 'jobNumber',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isSearch: true
+ },
+ {
+ label: '申请时间',
+ field: 'requestTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ },
+ {
+ label: '截止时间',
+ field: 'dueTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ },
+ {
+ label: '执行时间',
+ field: 'executeTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ },
+ {
+ label: '生效日期',
+ field: 'activeDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ },
+ {
+ 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',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '到库区类型范围',
+ field: 'toAreaTypes',
+ dictType: DICT_TYPE.AREA_TYPE,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ // {
+ // label: '到库区代码范围',
+ // field: 'toAreaCodes',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ {
+ label: '领用代码',
+ field: 'usageCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isForm: false,
+ isTable:false,
+ },
+ {
+ label: '领用描述',
+ field: 'usageDescription',
+ sort: 'custom',
+ isTable:false,
+ isForm:false,
+ isTableForm:false,
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '出库事务类型',
+ field: 'outTransactionType',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '入库事务类型',
+ field: 'inTransactionType',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '业务类型',
+ field: 'businessType',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '部门',
+ field: 'departmentCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '接口类型',
+ field: 'interfaceType',
+ dictType: DICT_TYPE.INTERFACE_TYPE,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '备注',
+ field: 'remarkMain',
+ isTable:false,
+ sort: 'custom',
+ table: {
+ width: 150
+ }
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ formatter: dateFormatter,
+ isTable:false,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ isSearch: true,
+ search: {
+ component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
+ type: 'daterange',
+ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
+ }
+ },
+ },
+ {
+ label: '创建者',
+ field: 'creator',
+ sort: 'custom',
+ isTable:false,
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '最后更新时间',
+ field: 'updateTime',
+ sort: 'custom',
+ isDetail: true,
+ isForm: false,
+ isTable: false,
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ }
+ },
+ {
+ label: '最后更新者',
+ field: 'updater',
+ isDetail: true,
+ isForm: false,
+ isTable: false,
+ table: {
+ width: 150
+ }
+ },
+ // {
+ // label: '代码',
+ // field: 'code',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ {
+ label: '是否可用',
+ field: 'available',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isSearch: false,
+ isTable: false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'Switch',
+ value: 'TRUE',
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE'
+ }
+ }
+ },
+]))
+
+//表单校验
+export const UnplannedreceiptRecordMainRules = reactive({
+ requestNumber: [
+ { required: true, message: '请选择申请单号', trigger: 'change' }
+ ],
+ toWarehouseCode: [
+ { required: true, message: '请选择到仓库代码', trigger: 'change' }
+ ],
+ toAreaTypes: [
+ { required: true, message: '请选择到库区类型范围', trigger: 'change' }
+ ],
+ toAreaCodes: [
+ { required: true, message: '请选择到库区代码范围', trigger: 'change' }
+ ],
+ outTransaction: [
+ { required: true, message: '请输入出库事务类型', trigger: 'blur' }
+ ],
+ inTransaction: [
+ { required: true, message: '请输入入库事务类型', trigger: 'blur' }
+ ],
+ executeTime: [
+ { required: true, message: '请输入执行时间', trigger: 'change' }
+ ],
+ activeDate: [
+ { required: true, message: '请输入生效日期', trigger: 'change' }
+ ],
+ available: [
+ { required: true, message: '请输入是否可用', trigger: 'blur' }
+ ],
+ departmentCode: [
+ { required: true, message: '请输入部门', trigger: 'blur' }
+ ],
+ interfaceType: [
+ { required: true, message: '请选择接口类型', trigger: 'change' }
+ ],
+ number: [
+ { required: true, message: '请输入单据号', trigger: 'blur' }
+ ],
+ businessType: [
+ { required: true, message: '请输入业务类型', trigger: 'blur' }
+ ],
+ createTime: [
+ { required: true, message: '请输入创建时间', trigger: 'blur' }
+ ],
+ creator: [
+ { required: true, message: '请输入创建者', trigger: 'blur' }
+ ],
+})
+
+/**
+ * @returns {Array} 计划外入库记录子表
+ */
+export const UnplannedreceiptRecordDetail = useCrudSchemas(reactive([
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ hiddenInMain:true,
+ table: {
+ width: 180
+ },
+ },
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '物料名称',
+ field: 'itemName',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '物料描述1',
+ field: 'itemDesc1',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '物料描述2',
+ field: 'itemDesc2',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '批次',
+ field: 'batch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '包装号',
+ field: 'packingNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ // {
+ // label: '器具号',
+ // field: 'containerNumber',
+ // isTable:false,
+ // isForm:false,
+ // isTableForm:false,
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ {
+ label: '数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ }
+ },
+ {
+ label: '计量单位',
+ field: 'uom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '单价',
+ field: 'singlePrice',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ }
+ },
+ {
+ label: '金额',
+ field: 'amount',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ }
+ },
+ {
+ label: '到库位代码',
+ field: 'toLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '库存状态',
+ field: 'inventoryStatus',
+ dictType: DICT_TYPE.INVENTORY_STATUS,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '到货日期',
+ field: 'arriveDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ },
+ {
+ label: '生产日期',
+ field: 'produceDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ },
+ {
+ label: '过期日期',
+ field: 'expireDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ },
+ {
+ label: '到库位组代码',
+ field: 'toLocationGroupCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '到库区代码',
+ field: 'toAreaCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '成本中心代码',
+ field: 'costcentreCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable:false,
+ },
+ {
+ label: '科目代码',
+ field: 'qadProjectCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable:false,
+ },
+ {
+ label: '原因',
+ field: 'reason',
+ dictType: DICT_TYPE.UNPLANNED_RECEIPT_REASON,
+ dictClass: 'string',
+ formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
+ return cellValue
+ },
+ table: {
+ width: 150
+ },
+ form: {
+ componentProps: {
+ filterable: true
+ }
+ },
+ tableForm: {
+ type: 'Select',
+ filterable: true
+ }
+ },
+ {
+ label: '货主代码',
+ field: 'ownerCode',
+ sort: 'custom',
+ isTable:false,
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '项目代码',
+ field: 'projectCode',
+ sort: 'custom',
+ isTable:false,
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '接口类型',
+ field: 'interfaceType',
+ dictType: DICT_TYPE.INTERFACE_TYPE,
+ dictClass: 'string',
+ isTable: false,
+ isForm:false,
+ isTableForm:false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '备注',
+ field: 'remark',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ // {
+ // label: '任务明细ID',
+ // field: 'jobDetailId',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ },
+ {
+ label: '创建者',
+ field: 'creator',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ // {
+ // label: '代码',
+ // field: 'code',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // },
+]))
+
+//表单校验
+export const UnplannedreceiptRecordDetailRules = reactive({
+ packingNumber: [
+ { required: true, message: '请选择包装号', trigger: 'change' }
+ ],
+ batch: [
+ { required: true, message: '请输入批次', trigger: 'blur' }
+ ],
+ inventoryStatus: [
+ { required: true, message: '请选择库存状态', trigger: 'change' }
+ ],
+ toLocationCode: [
+ { required: true, message: '请选择到库位代码', trigger: 'change' }
+ ],
+ toLocationGroupCode: [
+ { required: true, message: '请选择到库位组代码', trigger: 'change' }
+ ],
+ toAreaCode: [
+ { required: true, message: '请选择到库区代码', trigger: 'change' }
+ ],
+ arriveDate: [
+ { required: true, message: '请输入到货日期', trigger: 'change' }
+ ],
+ produceDate: [
+ { required: true, message: '请选择生产日期', trigger: 'change' }
+ ],
+ expireDate: [
+ { required: true, message: '请选择过期日期', trigger: 'change' }
+ ]
+})
diff --git a/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/index.vue b/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/index.vue
new file mode 100644
index 000000000..8611480fe
--- /dev/null
+++ b/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/index.vue
@@ -0,0 +1,696 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.number }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/sparepartReturnRequestMain.data.ts b/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/sparepartReturnRequestMain.data.ts
new file mode 100644
index 000000000..00bfdf790
--- /dev/null
+++ b/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/sparepartReturnRequestMain.data.ts
@@ -0,0 +1,1677 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
+import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
+
+import * as SubjectAccountApi from '@/api/wms/subjectAccount'
+import { SubjectAccount } from '@/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data'
+
+import * as ItembasicApi from '@/api/wms/itembasic'
+import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
+
+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'
+import * as BusinesstypeApi from '@/api/wms/businesstype'
+
+const businessType = 'UnplannedReceipt'
+const { t } = useI18n() // 国际化
+
+// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
+const queryParams = {
+ pageSize:10,
+ pageNo:1,
+ code:'UnplannedReceiptRequest'
+}
+ const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
+ const requestsettingData =data?.list[0]||{}
+
+ // 获取当前操作人的部门
+ import { useUserStore } from '@/store/modules/user'
+ import { TableColumn } from '@/types/table'
+ const userStore = useUserStore()
+ const userDept = userStore.userSelfInfo.dept
+ // id 转str 否则form回显匹配不到
+ userDept.id = userDept.id.toString()
+ const userDeptArray:any = [userDept]
+ const UnplannedReceipt = await BusinesstypeApi.getBusinesstypeCode("UnplannedReceipt")
+/**
+ * @returns {Array} 计划外入库申请主表
+ */
+export const UnplannedreceiptRequestMain = useCrudSchemas(reactive([
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ table: {
+ width: 180,
+ fixed: 'left'
+ },
+ isForm: false,
+ isSearch: true,
+ },
+ {
+ label: '状态',
+ field: 'status',
+ dictType: DICT_TYPE.REQUEST_STATUS,
+ dictClass: 'string',
+ isSearch: true,
+ isForm: false,
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ value: '1',
+ componentProps: {
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '申请时间',
+ field: 'requestTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ isForm: false,
+ },
+ {
+ label: '截止时间',
+ field: 'dueTime',
+ formatter: dateFormatter,
+ isForm:false,
+ isTable:false,
+ isTableForm:false,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ },
+ {
+ label: '成本中心代码',
+ field: 'costCenterCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ enterSearch: true,
+ isInpuFocusShow: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择成本中心代码',
+ searchField: 'costcentreCode',
+ searchTitle: '成本中心代码',
+ searchAllSchemas: QadCostcentre.allSchemas,
+ searchPage: QadCostcentreApi.getQadCostcentrePage,
+ verificationParams: [{
+ key: 'costcentreCode',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ enterSearch: true,
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
+ searchField: 'costcentreCode', // 查询弹窗赋值字段
+ searchTitle: '成本中心代码', // 查询弹窗标题
+ searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
+ searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }],
+ verificationParams: [{
+ key: 'costcentreCode',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ }
+ }
+ },
+ {
+ label: '成本中心类型',
+ field: 'costCenterType',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ },
+ },
+ {
+ label: '领用原因代码',
+ field: 'reasonCodeRequisition',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ enterSearch: true,
+ 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
+ }],
+ verificationParams: [{
+ key: 'code',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ enterSearch: true,
+ 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
+ }],
+ verificationParams: [{
+ key: 'code',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ }
+ }
+ },
+ {
+ label: '项目代码',
+ field: 'projectCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ enterSearch: true,
+ isInpuFocusShow: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择QAD项目信息',
+ searchField: ' ',
+ searchTitle: '领用原因代码',
+ searchAllSchemas: QadProject.allSchemas,
+ searchPage: QadProjectApi.getQadProjectPage,
+ verificationParams: [{
+ key: 'projectCode',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ enterSearch: true,
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择QAD项目信息', // 输入框占位文本
+ searchField: 'projectCode', // 查询弹窗赋值字段
+ searchTitle: '领用原因代码', // 查询弹窗标题
+ searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类
+ searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }],
+ verificationParams: [{
+ key: 'projectCode',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ }
+ }
+ },
+ {
+ label: '工作中心',
+ field: 'workCenter',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ },
+ {
+ label: '到仓库代码',
+ field: 'toWarehouseCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ enterSearch: true,
+ isInpuFocusShow: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择仓库代码',
+ searchField: 'code',
+ searchTitle: '仓库信息',
+ searchAllSchemas: Warehouse.allSchemas,
+ searchPage: WarehouseApi.getWarehousePage,
+ verificationParams: [{
+ key: 'code',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ enterSearch:true,
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '仓库信息', // 查询弹窗标题
+ searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
+ searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }],
+ verificationParams: [{
+ key: 'code',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ }
+ }
+ },
+ {
+ label: '领用代码',
+ field: 'usageCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isForm: false,
+ isTable:false,
+ },
+ {
+ label: '领用描述',
+ field: 'usageDescription',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isForm:false,
+ isTable:false,
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请领用描述信息',
+ searchField: 'usageDescription',
+ searchTitle: '领用描述信息',
+ searchAllSchemas: SubjectAccount.allSchemas,
+ searchPage: SubjectAccountApi.getSubjectAccountPage
+ }
+ }
+ },
+ {
+ label: '到库区类型范围',
+ field: 'toAreaTypes',
+ dictType: DICT_TYPE.AREA_TYPE,
+ dictClass: 'string',
+ isSearch: true,
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isForm: false,
+ },
+ {
+ label: '到库区代码范围',
+ field: 'toAreaCodes',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch: true,
+ isForm: false,
+ },
+ {
+ label: '业务类型',
+ field: 'businessType',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ value: 'UnplannedReceipt',
+ componentProps: {
+ disabled: true
+ }
+ },
+ isForm: false,
+ },
+ {
+ label: '部门',
+ field: 'departmentCode',
+ sort: 'custom',
+ isForm: false,
+ table: {
+ width: 150
+ },
+ formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
+ return userDeptArray.find((account) => account.id == cellValue)?.name
+ },
+ form: {
+ value: userDept.id,
+ component: 'Select',
+ api: () => userDeptArray,
+ componentProps: {
+ disabled: true,
+ optionsAlias: {
+ labelField: 'name',
+ valueField: 'id'
+ }
+ }
+ }
+ },
+ {
+ label: '自动提交',
+ field: 'autoCommit',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable: false,
+ isForm: false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'Switch',
+ value: requestsettingData.autoCommit,
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE',
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '自动通过',
+ field: 'autoAgree',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable: false,
+ isForm: false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'Switch',
+ value: requestsettingData.autoAgree,
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE',
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '自动执行',
+ field: 'autoExecute',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable: false,
+ isForm: false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'Switch',
+ value: requestsettingData.autoExecute,
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE',
+ disabled: true
+ }
+ }
+ },
+ // {
+ // label: '是否直接生成记录',
+ // field: 'directCreateRecord',
+ // dictType: DICT_TYPE.TRUE_FALSE,
+ // dictClass: 'string',
+ // isForm: true,
+ // isTable: false,
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // form: {
+ // component: 'Switch',
+ // value: requestsettingData.directCreateRecord,
+ // componentProps: {
+ // inactiveValue: 'FALSE',
+ // activeValue: 'TRUE'
+ // }
+ // }
+ // },
+ {
+ label: '备注',
+ field: 'remarkMain',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable:false,
+ sortTableDefault: 1000,
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ isTable:false,
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width:'100%'},
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ isForm: false,
+ isSearch: true,
+ search: {
+ component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
+ type: 'daterange',
+ defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
+ }
+ },
+ },
+ {
+ label: '创建者',
+ field: 'creator',
+ sort: 'custom',
+ isTable:false,
+ table: {
+ width: 150
+ },
+ isForm: false
+ },
+ {
+ label: '最后更新时间',
+ field: 'updateTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ isTable:false,
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ isForm: false,
+ },
+ {
+ label: '最后更新者',
+ field: 'updater',
+ sort: 'custom',
+ isTable:false,
+ table: {
+ width: 150
+ },
+ isForm: false,
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isDetail: false,
+ isForm: false,
+ table: {
+ width: 350,
+ fixed: 'right'
+ },
+ }
+]))
+
+//表单校验
+export const UnplannedreceiptRequestMainRules = reactive({
+ toWarehouseCode: [
+ { required: true, message: '请输入到库位代码', trigger: 'blur' }
+ ],
+ departmentCode: [
+ { required: true, message: '请输入部门', trigger: 'blur' }
+ ],
+ 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' }
+ ],
+ autoAgree: [
+ { required: true, message: '请选择是否自动通过', trigger: 'change' }
+ ],
+ autoExecute: [
+ { required: true, message: '请选择是否自动执行', trigger: 'change' }
+ ],
+ directCreateRecord: [
+ { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
+ ],
+ remark: [
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' }
+ ],
+ usageDescription:[
+ { required: true, message: '请选择领用描述', trigger: 'blur' }
+ ],
+})
+
+/**
+ * @returns {Array} 计划外入库申请子表
+ */
+export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive([
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isTableForm: false,
+ hiddenInMain:true,
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm:{
+ multiple:true,//多选
+ isInpuFocusShow: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择物料代码',// 输入框占位文本
+ searchField: 'code',// 查询弹窗赋值字段
+ searchTitle: '物料基础信息',
+ searchAllSchemas: Itembasic.allSchemas,
+ searchPage: ItembasicApi.getItembasicPage,
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ action: '==',
+ isSearch: true,
+ isMainValue: false
+ },{
+ key: 'businessTypeCode',
+ value: 'UnplannedReceipt',
+ action: '==',
+ isSearch: true,
+ isMainValue: false
+ }],
+ verificationPage: ItembasicApi.getItemListByCodes, // tableForm下方输入框校验失去焦点之后是否正确的方法
+ isShowTableFormSearch: true, //tableForm下方是否出现输入框
+ verificationParams: [{
+ key: 'code',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ },
+ form: {
+ componentProps: {
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择物料代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '物料基础信息', // 查询弹窗标题
+ searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
+ searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ action: '==',
+ isSearch: true,
+ isMainValue: false
+ },{
+ key: 'businessTypeCode',
+ value: 'UnplannedReceipt',
+ action: '==',
+ isSearch: true,
+ isMainValue: false
+ }],
+ verificationParams: [{
+ key: 'code',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ }
+ }
+ },
+ {
+ label: '物料名称',
+ field: 'itemName',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '物料描述1',
+ field: 'itemDesc1',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '物料描述2',
+ field: 'itemDesc2',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '批次',
+ field: 'batch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ disabled: true
+ }
+ },
+ // {
+ // label: '包装号',
+ // field: 'packingNumber',
+ // sort: 'custom',
+ // isTableForm:false,
+ // isForm:false,
+ // table: {
+ // width: 150
+ // },
+ // tableForm:{
+ // disabled: true
+ // }
+ // },
+ {
+ label: '器具号',
+ field: 'containerNumber',
+ sort: 'custom',
+ isTableForm:false,
+ isForm:false,
+ isTable:false,
+ table: {
+ width: 150
+ },
+ tableForm: {
+ disabled: true
+ }
+ },
+ {
+ label: '数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 0,
+ precision: 6,
+ }
+ },
+ tableForm: {
+ type: 'InputNumber',
+ min: 0,
+ precision: 6,
+ },
+ },
+ {
+ label: '计量单位',
+ field: 'uom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ type: 'Select',
+ disabled: true
+ },
+ form:{
+ componentProps:{
+ disabled:true
+ }
+ }
+ },
+ {
+ label: '单价',
+ field: 'singlePrice',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable:false,
+ isTableForm:false,
+ isDetail:false,
+ isForm:false,
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ min: 0,
+ precision: 6,
+ }
+ },
+ tableForm: {
+ type: 'InputNumber',
+ min: 0,
+ precision: 6,
+ disabled: true
+ },
+ },
+ {
+ label: '金额',
+ field: 'amount',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable:false,
+ isTableForm:false,
+ isDetail:false,
+ isForm:false,
+ form: {
+ component: 'InputNumber',
+ componentProps: {
+ disabled:true,
+ min: 0,
+ precision: 6,
+ }
+ },
+ tableForm: {
+ type: 'InputNumber',
+ disabled:true,
+ min: 0,
+ precision: 6,
+ },
+ },
+ {
+ label: '到库位代码',
+ field: 'toLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ enterSearch: true,
+ isInpuFocusShow: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择库位代码',
+ searchField: 'code',
+ searchTitle: '库位信息',
+ searchAllSchemas: Location.allSchemas,
+ searchPage: LocationApi.getLocationListByAreaAndBusinesstype,
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ },{
+ key: 'warehouseCode',
+ value: 'toWarehouseCode',
+ message: '请填写到仓库代码!',
+ isMainValue: true,
+ },
+ {
+ key: 'businessType',
+ value: businessType ,
+ isMainValue: false
+ },{
+ key: 'isIn',
+ value: 'in',
+ isMainValue: false
+ }],
+ verificationParams: [{
+ key: 'code',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ },
+ form: {
+ // labelMessage: '信息提示说明!!!!',
+ componentProps: {
+ enterSearch:true,
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择库位代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '库位信息', // 查询弹窗标题
+ searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
+ searchPage: LocationApi.getLocationListByAreaAndBusinesstype, // 查询弹窗所需分页方法
+ searchCondition: [{
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ },{
+ key: 'warehouseCode',
+ value: 'toWarehouseCode',
+ message: '请填写到仓库代码!',
+ isMainValue: true,
+ },
+ {
+ key: 'businessType',
+ value: businessType ,
+ isMainValue: false
+ },{
+ key: 'isIn',
+ value: 'in',
+ isMainValue: false
+ }],
+ verificationParams: [{
+ key: 'code',
+ action: '==',
+ value: '',
+ isMainValue: false,
+ isSearch: true,
+ isFormModel: true,
+ }], // 失去焦点校验参数
+ }
+ }
+ },
+ {
+ label: '库存状态',
+ field: 'inventoryStatus',
+ dictType: DICT_TYPE.INVENTORY_STATUS,
+ dictClass: 'string',
+ sort: 'custom',
+ // dictType: DICT_TYPE.INVENTORY_STATUS,
+ // dictClass: 'string',
+ isTable: true,
+ table: {
+ width: 150
+ },
+ form:{
+ component: 'Select',
+ componentProps:{
+ options: UnplannedReceipt.inInventoryStatusList
+ }
+ },
+ tableForm: {
+ show:true,
+ type: 'Select',
+ initOptions:UnplannedReceipt.inInventoryStatusList
+ },
+ },
+ {
+ label: '到货日期',
+ field: 'arriveDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ tableForm: {
+ type: 'FormDate',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ {
+ label: '生产日期',
+ field: 'produceDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ tableForm: {
+ type: 'FormDate',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ }
+ },
+ {
+ label: '过期日期',
+ field: 'expireDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ disabled:true
+ }
+ },
+ // tableForm: {
+ // type: 'FormDate',
+ // dateFormat: 'YYYY-MM-DD',
+ // valueFormat: 'x',
+ // }
+ tableForm: {
+ type: 'slot',
+ disabled:true
+ }
+ },
+ {
+ label: '到货主代码',
+ field: 'toOwnerCode',
+ sort: 'custom',
+ isTable:false,
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false,
+ },
+ {
+ label: '成本中心代码',
+ field: 'costcentreCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable:false,
+ isTableForm:false,
+ isDetail:false,
+ isForm:false,
+ tableForm:{
+ isInpuFocusShow: true, // 开启查询弹窗
+ searchListPlaceholder: '选择成本中心',
+ searchField: 'costcentreCode',
+ searchTitle: '成本中心信息',
+ searchAllSchemas: SubjectAccount.allSchemas,
+ searchPage: SubjectAccountApi.getSubjectAccountPage,
+ searchCondition: [{
+ key: 'code', // 查询列表中字段
+ value: 'usageCode', // 指查询具体值
+ message: '请选择成本中心信息!', // 当前置条件为空时 弹出信息提示
+ 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
+ },
+ isTable:false,
+ isTableForm:false,
+ isDetail:false,
+ isForm:false,
+ 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: '原因',
+ field: 'reason',
+ dictType: DICT_TYPE.UNPLANNED_RECEIPT_REASON,
+ dictClass: 'string',
+ formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
+ return cellValue
+ },
+ table: {
+ width: 150
+ },
+ form: {
+ componentProps: {
+ filterable: true
+ }
+ },
+ tableForm: {
+ type: 'Select',
+ filterable: true
+ }
+ },
+ {
+ label: '备注',
+ field: 'remark',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable: true,
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ sortTableDefault: 1001,
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '创建者',
+ field: 'creator',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault: 1002,
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '最后更新时间',
+ field: 'updateTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ isTable:false,
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x',
+ }
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '最后更新者',
+ field: 'updater',
+ sort: 'custom',
+ isTable:false,
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isDetail: false,
+ hiddenInMain:true,
+ isForm: false ,
+ table: {
+ width: 150,
+ fixed: 'right'
+ },
+ isTableForm:false,
+ }
+]))
+function validateQty(rule, value, callback) {
+ if (value>0) {
+ callback()
+ }else{
+ callback(new Error('数量必须大于0'))
+ }
+}
+//表单校验
+export const UnplannedreceiptRequestDetailRules = reactive({
+ arriveDate: [
+ { required: true, message: '请选择到货日期', trigger: 'change' }
+ ],
+ produceDate: [
+ { required: true, message: '请选择生产日期', trigger: 'change' }
+ ],
+ expireDate: [
+ { required: true, message: '请选择过期日期', trigger: 'change' }
+ ],
+ toLocationCode: [
+ { required: true, message: '请选择到库位代码', trigger: 'change' }
+ ],
+ inventoryStatus: [
+ { required: true, message: '请选择库存状态', trigger: 'change' }
+ ],
+ qty:[
+ { validator:validateQty, message: '数量必须大于0', trigger: 'change'}
+ ],
+ itemCode: [
+ { required: true, message: '请选择物料代码', trigger: 'change' }
+ ],
+ remark: [
+ { max: 50, message: '不得超过50个字符', trigger: 'blur' }
+ ],
+ costcentreCode:[
+ { required: true, message: '请选择成本中心代码', trigger: 'change' }
+ ],
+ qadProjectCode:[
+ { required: true, message: '请选择科目代码', trigger: 'change' }
+ ],
+ singlePrice:[
+ { required: true, message: '请维护标准成本价格', trigger: 'blur' }
+ ],
+})
+
+
+/**
+ * @returns {Array} 生产退料申请子表创建标签
+ */
+export const UnplannedreceiptRequestDetailLabel = useCrudSchemas(reactive([
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ disabled: true
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '物料名称',
+ field: 'itemName',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false,
+ },
+ {
+ label: '物料描述1',
+ field: 'itemDesc1',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false,
+ },
+ {
+ label: '物料描述2',
+ field: 'itemDesc2',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTableForm: false,
+ isForm: false,
+ },
+ {
+ label: '批次',
+ field: 'batch',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ disabled: true,
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ disabled: true
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '计量单位',
+ field: 'uom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ disabled: true
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '库存状态',
+ field: 'inventoryStatus',
+ dictType: DICT_TYPE.INVENTORY_STATUS,
+ dictClass: 'string',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ type: 'Select',
+ disabled: true
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '到货日期',
+ field: 'arriveDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ disabled:true
+ }
+ },
+ tableForm: {
+ type: 'FormDate',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ disabled:true
+ }
+ },
+ {
+ label: '生产日期',
+ field: 'produceDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ disabled:true
+ }
+ },
+ tableForm: {
+ type: 'FormDate',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ disabled:true
+ }
+ },
+ {
+ label: '过期日期',
+ field: 'expireDate',
+ formatter: dateFormatter2,
+ detail: {
+ dateFormat: 'YYYY-MM-DD'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: {width: '100%'},
+ type: 'date',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ disabled:true
+ }
+ },
+ tableForm: {
+ type: 'FormDate',
+ dateFormat: 'YYYY-MM-DD',
+ valueFormat: 'x',
+ disabled:true
+ }
+ },
+ {
+ label: '到库位代码',
+ field: 'toLocationCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ tableForm: {
+ disabled: true
+ },
+ form: {
+ componentProps: {
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '包装规格',
+ field: 'packUnit',
+ isTable: true,
+ sort: 'custom',
+ table: {
+ width: 150,
+ componentProps: {
+ disabled: true,
+ isSearchList: true,
+ searchListPlaceholder: '请选择包装',
+ searchField: 'packUnit',
+ searchTitle: '物品包装信息',
+ searchAllSchemas: Itempackaging.allSchemas,
+ searchPage: ItemPackageApi.getItempackagingPage,
+ searchCondition: [
+ {
+ key: 'itemCode',
+ value: 'itemCode',
+ message: '请选择物料代码',
+ isMainValue: true
+ },
+ {
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }
+ ]
+
+ }
+ },
+ tableForm: {
+ enterSearch:true,
+ disabled: true,
+ isInpuFocusShow: true,
+ searchListPlaceholder: '请选择包装',
+ searchField: 'packUnit',
+ searchTitle: '物品包装信息',
+ searchAllSchemas: Itempackaging.allSchemas,
+ searchPage: ItemPackageApi.getItempackagingPage,
+ searchCondition: [
+ {
+ key: 'itemCode',
+ value: 'itemCode',
+ message: '请选择物料代码',
+ isTableRowValue: true,
+ isMainValue:false
+ },
+ {
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }]
+ }
+ },
+ {
+ label: '包装数量',
+ field: 'packQty',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ componentProps: {
+ disabled: true,
+ }
+ },
+ tableForm: {
+ disabled: true,
+ }
+ },
+]))
+
+//表单校验
+export const UnplannedreceiptRequestDetailLabelRules = reactive({
+ packUnit: [
+ { required: true, message: '请选择包装规格', trigger: 'change' }
+ ],
+})
diff --git a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue
index bba9b77d4..3676c92d0 100644
--- a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue
+++ b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue
@@ -401,8 +401,8 @@ const handleExport = async () => {
await message.exportConfirm()
// 发起导出
exportLoading.value = true
- tableObject.params.detailDataType = 2
const excelTitle = ref(route.meta.title)
+ tableObject.params.detailDataType = 2
const data = await UnplannedissueRequestMainApi.exportUnplannedissueRequestMain(tableObject.params)
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/index.vue b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/index.vue
index 08ffbf748..5576ccab7 100644
--- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/index.vue
+++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/index.vue
@@ -157,6 +157,7 @@ const handleExport = async () => {
// 发起导出
exportLoading.value = true
const excelTitle = ref(route.meta.title)
+ tableObject.params.detailDataType = 1
const data = await UnplannedissueRecordMainApi.exportUnplannedissueRecordMain(tableObject.params)
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue
index 56bf85919..5f140eb93 100644
--- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue
+++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue
@@ -439,6 +439,7 @@ const handleExport = async () => {
// 发起导出
exportLoading.value = true
const excelTitle = ref(route.meta.title)
+ tableObject.params.detailDataType = 1
const data = await UnplannedissueRequestMainApi.exportUnplannedissueRequestMain(tableObject.params)
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/index.vue
index 0c89f0917..7972ac52c 100644
--- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/index.vue
+++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/index.vue
@@ -157,6 +157,7 @@ const handleExport = async () => {
// 发起导出
exportLoading.value = true
const excelTitle = ref(route.meta.title)
+ tableObject.params.detailDataType = 1
const data = await UnplannedreceiptRecordMainApi.exportUnplannedreceiptRecordMain(tableObject.params)
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
index 407c8487c..9cb708a64 100644
--- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
+++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
@@ -668,6 +668,7 @@ const handleExport = async () => {
// 发起导出
exportLoading.value = true
const excelTitle = ref(route.meta.title)
+ tableObject.params.detailDataType = 1
const data = await UnplannedreceiptRequestMainApi.exportUnplannedreceiptRequestMain(tableObject.params)
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {