Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

master_hella_20240701
ljlong_2630 7 months ago
parent
commit
db9c639d64
  1. 3
      .env.development
  2. 3
      .env.hella13
  3. 3
      .env.hella14
  4. 3
      .env.hella15
  5. 3
      .env.hella16
  6. 4
      .env.hella8
  7. 3
      .env.hella9
  8. 3
      .env.test
  9. 4
      .env.test-scp
  10. 7
      .env.wyf
  11. 3
      README.md
  12. 6
      src/api/eam/basicDocumentType/index.ts
  13. 6
      src/api/eam/basicFaultCause/index.ts
  14. 6
      src/api/eam/basicFaultType/index.ts
  15. 64
      src/api/eam/basicInspectionOption/index.ts
  16. 64
      src/api/eam/basicMaintenanceOption/index.ts
  17. 6
      src/api/eam/equipmentMainPart/index.ts
  18. 71
      src/api/wms/containerMainRequest/index.ts
  19. 58
      src/api/wms/qadproductionplan/index.ts
  20. 2
      src/components/TableForm/src/TableForm.vue
  21. 4
      src/views/eam/basicDocumentType/basicDocumentType.data.ts
  22. 61
      src/views/eam/basicDocumentType/index.vue
  23. 4
      src/views/eam/basicFaultCause/basicFaultCause.data.ts
  24. 57
      src/views/eam/basicFaultCause/index.vue
  25. 4
      src/views/eam/basicFaultType/basicFaultType.data.ts
  26. 58
      src/views/eam/basicFaultType/index.vue
  27. 173
      src/views/eam/basicInspectionOption/basicInspectionOption.data.ts
  28. 290
      src/views/eam/basicInspectionOption/index.vue
  29. 171
      src/views/eam/basicMaintenanceOption/basicMaintenanceOption.data.ts
  30. 291
      src/views/eam/basicMaintenanceOption/index.vue
  31. 4
      src/views/eam/equipmentMainPart/equipmentMainPart.data.ts
  32. 62
      src/views/eam/equipmentMainPart/index.vue
  33. 15
      src/views/login/components/LoginForm.vue
  34. 15
      src/views/login/components/MobileForm.vue
  35. 2
      src/views/mes/abilityInfo/abilityInfo.data.ts
  36. 75
      src/views/mes/holidayCalendar/index.vue
  37. 2
      src/views/mes/hrPersonAbility/hrPersonAbility.data.ts
  38. 8
      src/views/mes/jobcalendar/index.vue
  39. 12
      src/views/mes/orderDay/orderDay.data.ts
  40. 2
      src/views/mes/patternType/patternType.data.ts
  41. 6
      src/views/mes/processroute/processroute.data.ts
  42. 2
      src/views/mes/workScheduling/components/reportAll.vue
  43. 6
      src/views/mes/workcalendar/index.vue
  44. 27
      src/views/qms/inspectionJob/addForm.vue
  45. 24
      src/views/wms/agvManage/interfaceInfo/index.vue
  46. 2
      src/views/wms/basicDataManage/itemManage/itemarea/index.vue
  47. 1
      src/views/wms/basicDataManage/itemManage/relegateRequest/relegateRequest.data.ts
  48. 3
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue
  49. 2
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue
  50. 2
      src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue
  51. 16
      src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts
  52. 17
      src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue
  53. 16
      src/views/wms/inventoryjobManage/containermanage/containerRecordMain/containerRecordMain.data.ts
  54. 8
      src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue
  55. 16
      src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts
  56. 6
      src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue
  57. 16
      src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts
  58. 75
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  59. 54
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
  60. 12
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue
  61. 244
      src/views/wms/productionManage/productionplan/qadproductionplan/index.vue
  62. 119
      src/views/wms/productionManage/productionplan/qadproductionplan/qadProductionPlanMain.data.ts
  63. 4
      src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue
  64. 10
      src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts
  65. 2
      src/views/wms/productionManage/productredress/productredressRequestMain/index.vue
  66. 45
      src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts
  67. 40
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue
  68. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue
  69. 1
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts
  70. 9
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
  71. 1
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue
  72. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts
  73. 1
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

3
.env.development

@ -35,3 +35,6 @@ VITE_INTERFACE_URL='http://localhost:12080/magic/web/index.html'
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://localhost:12080' VITE_JMREPORT_BASE_URL='http://localhost:12080'
# 租户配置
VITE_TENANT='["长春","成都"]'

3
.env.hella13

@ -35,3 +35,6 @@ VITE_INTERFACE_URL='http://172.21.32.13:90/magic/web/index.html'
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.13:90' VITE_JMREPORT_BASE_URL='http://172.21.32.13:90'
# 租户配置
VITE_TENANT='["长春"]'

3
.env.hella14

@ -35,3 +35,6 @@ VITE_INTERFACE_URL='http://172.21.32.14:90/magic/web/index.html'
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.14:90' VITE_JMREPORT_BASE_URL='http://172.21.32.14:90'
# 租户配置
VITE_TENANT='["长春"]'

3
.env.hella15

@ -35,3 +35,6 @@ VITE_INTERFACE_URL='http://172.21.32.15:90/magic/web/index.html'
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.15:90' VITE_JMREPORT_BASE_URL='http://172.21.32.15:90'
# 租户配置
VITE_TENANT='["长春"]'

3
.env.hella16

@ -35,3 +35,6 @@ VITE_INTERFACE_URL='http://172.21.32.16:90/magic/web/index.html'
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.16:90' VITE_JMREPORT_BASE_URL='http://172.21.32.16:90'
# 租户配置
VITE_TENANT='["长春","成都"]'

4
.env.hella8

@ -35,3 +35,7 @@ VITE_INTERFACE_URL='http://172.22.32.8:90/magic/web/index.html'
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.22.32.8:90' VITE_JMREPORT_BASE_URL='http://172.22.32.8:90'
# 租户配置
VITE_TENANT='["成都"]'

3
.env.hella9

@ -35,3 +35,6 @@ VITE_INTERFACE_URL='http://172.22.32.9:90/magic/web/index.html'
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.22.32.9:90' VITE_JMREPORT_BASE_URL='http://172.22.32.9:90'
# 租户配置
VITE_TENANT='["成都"]'

3
.env.test

@ -35,3 +35,6 @@ VITE_INTERFACE_URL='http://dev.ccwin-in.com:25310/magic/web/index.html'
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310' VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310'
# 租户配置
VITE_TENANT='["长春","成都"]'

4
.env.test-scp

@ -35,3 +35,7 @@ VITE_INTERFACE_URL='http://dev.ccwin-in.com:25311/magic/web/index.html'
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25311' VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25311'
# 租户配置
VITE_TENANT='["长春","成都"]'

7
.env.wyf

@ -4,9 +4,9 @@ NODE_ENV=test
VITE_DEV=false VITE_DEV=false
# 请求路径 # 请求路径
VITE_BASE_URL='http://192.168.0.113:12080' VITE_BASE_URL='http://192.168.0.108:12080'
# 上传路径 # 上传路径
VITE_UPLOAD_URL='http://192.168.0.113:12080/admin-api/infra/file/upload' VITE_UPLOAD_URL='http://192.168.0.108:12080/admin-api/infra/file/upload'
# # 请求路径 # # 请求路径
# VITE_BASE_URL='http://dev.ccwin-in.com:25300/api' # VITE_BASE_URL='http://dev.ccwin-in.com:25300/api'
@ -46,3 +46,6 @@ VITE_JMREPORT_BASE_URL='http://192.168.0.108:12080'
# # 积木报表请求路径 # # 积木报表请求路径
# VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310' # VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310'
# 租户配置
VITE_TENANT='["长春","成都"]'

3
README.md

@ -1,4 +1,4 @@
## dev发布2024-05-15-002 ## dev发布2024-05-15-004
**xxxx.data.ts 文件配置说明** **xxxx.data.ts 文件配置说明**
**form表单查询弹窗配置** **form表单查询弹窗配置**
form: { form: {
@ -28,6 +28,7 @@ form: {
} }
**tableForm明细列表查询弹窗配置** **tableForm明细列表查询弹窗配置**
tableForm:{ tableForm:{
hidden:false,//控制列是否展示
isInpuFocusShow: true, // 开启查询弹窗 【**与form表单中唯一不同属性**】 isInpuFocusShow: true, // 开启查询弹窗 【**与form表单中唯一不同属性**】
searchListPlaceholder: '请选择从仓库代码', // 输入框占位文本 searchListPlaceholder: '请选择从仓库代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段

6
src/api/eam/documentType/index.ts → src/api/eam/basicDocumentType/index.ts

@ -1,4 +1,5 @@
import request from '@/config/axios' import request from '@/config/axios'
import {EquipmentMainPartVO} from "@/api/eam/equipmentMainPart";
export interface DocumentTypeVO { export interface DocumentTypeVO {
id: number id: number
@ -54,3 +55,8 @@ export const exportDocumentType = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/eam/document-type/get-import-template' }) return request.download({ url: '/eam/document-type/get-import-template' })
} }
// 启用 / 禁用
export const updateEnableCode = async (data: EquipmentMainPartVO) => {
return await request.post({ url: `/eam/document-type/ables` , data })
}

6
src/api/eam/basicFaultCause/index.ts

@ -1,4 +1,5 @@
import request from '@/config/axios' import request from '@/config/axios'
import {EquipmentMainPartVO} from "@/api/eam/equipmentMainPart";
export interface BasicFaultCauseVO { export interface BasicFaultCauseVO {
id: number id: number
@ -55,3 +56,8 @@ export const exportBasicFaultCause = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/eam/basic-fault-cause/get-import-template' }) return request.download({ url: '/eam/basic-fault-cause/get-import-template' })
} }
// 启用 / 禁用
export const updateEnableCode = async (data: EquipmentMainPartVO) => {
return await request.post({ url: `/eam/basic-fault-cause/ables` , data })
}

6
src/api/eam/basicFaultType/index.ts

@ -1,4 +1,5 @@
import request from '@/config/axios' import request from '@/config/axios'
import {EquipmentMainPartVO} from "@/api/eam/equipmentMainPart";
export interface BasicFaultTypeVO { export interface BasicFaultTypeVO {
id: number id: number
@ -54,3 +55,8 @@ export const exportBasicFaultType = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/eam/basic-fault-type/get-import-template' }) return request.download({ url: '/eam/basic-fault-type/get-import-template' })
} }
// 启用 / 禁用
export const updateEnableCode = async (data: EquipmentMainPartVO) => {
return await request.post({ url: `/eam/basic-fault-type/ables` , data })
}

64
src/api/eam/basicInspectionOption/index.ts

@ -0,0 +1,64 @@
import request from '@/config/axios'
import {EquipmentMainPartVO} from "@/api/eam/equipmentMainPart";
export interface BasicInspectionOptionVO {
id: number
code: string
name: string
describing: string
isUpdated: boolean
type: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询巡检方案列表
export const getBasicInspectionOptionPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/basic-inspection-option/senior', data })
} else {
return await request.get({ url: `/eam/basic-inspection-option/page`, params })
}
}
// 查询巡检方案详情
export const getBasicInspectionOption = async (id: number) => {
return await request.get({ url: `/eam/basic-inspection-option/get?id=` + id })
}
// 新增巡检方案
export const createBasicInspectionOption = async (data: BasicInspectionOptionVO) => {
return await request.post({ url: `/eam/basic-inspection-option/create`, data })
}
// 修改巡检方案
export const updateBasicInspectionOption = async (data: BasicInspectionOptionVO) => {
return await request.put({ url: `/eam/basic-inspection-option/update`, data })
}
// 删除巡检方案
export const deleteBasicInspectionOption = async (id: number) => {
return await request.delete({ url: `/eam/basic-inspection-option/delete?id=` + id })
}
// 导出巡检方案 Excel
export const exportBasicInspectionOption = async (params) => {
return await request.download({ url: `/eam/basic-inspection-option/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/basic-inspection-option/get-import-template' })
}
// 启用 / 禁用
export const updateEnableCode = async (data: EquipmentMainPartVO) => {
return await request.post({ url: `/eam/basic-inspection-option/ables` , data })
}

64
src/api/eam/basicMaintenanceOption/index.ts

@ -0,0 +1,64 @@
import request from '@/config/axios'
import {EquipmentMainPartVO} from "@/api/eam/equipmentMainPart";
export interface BasicMaintenanceOptionVO {
id: number
code: string
name: string
describing: string
isUpdated: boolean
type: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询保养方案列表
export const getBasicMaintenanceOptionPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/basic-maintenance-option/senior', data })
} else {
return await request.get({ url: `/eam/basic-maintenance-option/page`, params })
}
}
// 查询保养方案详情
export const getBasicMaintenanceOption = async (id: number) => {
return await request.get({ url: `/eam/basic-maintenance-option/get?id=` + id })
}
// 新增保养方案
export const createBasicMaintenanceOption = async (data: BasicMaintenanceOptionVO) => {
return await request.post({ url: `/eam/basic-maintenance-option/create`, data })
}
// 修改保养方案
export const updateBasicMaintenanceOption = async (data: BasicMaintenanceOptionVO) => {
return await request.put({ url: `/eam/basic-maintenance-option/update`, data })
}
// 删除保养方案
export const deleteBasicMaintenanceOption = async (id: number) => {
return await request.delete({ url: `/eam/basic-maintenance-option/delete?id=` + id })
}
// 导出保养方案 Excel
export const exportBasicMaintenanceOption = async (params) => {
return await request.download({ url: `/eam/basic-maintenance-option/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/basic-maintenance-option/get-import-template' })
}
// 启用 / 禁用
export const updateEnableCode = async (data: EquipmentMainPartVO) => {
return await request.post({ url: `/eam/basic-maintenance-option/ables` , data })
}

6
src/api/eam/equipmentMainPart/index.ts

@ -37,6 +37,7 @@ export const createEquipmentMainPart = async (data: EquipmentMainPartVO) => {
// 修改主要部件 // 修改主要部件
export const updateEquipmentMainPart = async (data: EquipmentMainPartVO) => { export const updateEquipmentMainPart = async (data: EquipmentMainPartVO) => {
console.log(data)
return await request.put({ url: `/eam/equipment-main-part/update`, data }) return await request.put({ url: `/eam/equipment-main-part/update`, data })
} }
@ -54,3 +55,8 @@ export const exportEquipmentMainPart = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/eam/equipment-main-part/get-import-template' }) return request.download({ url: '/eam/equipment-main-part/get-import-template' })
} }
// 启用 / 禁用
export const updateEnableCode = async (data: EquipmentMainPartVO) => {
return await request.post({ url: `/eam/equipment-main-part/ables` , data })
}

71
src/api/wms/containerMainRequest/index.ts

@ -14,7 +14,7 @@ export interface ContainerMainRequestVO {
export const getContainerMainRequestPage = async (params) => { export const getContainerMainRequestPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
const data = {...params} const data = { ...params }
return await request.post({ url: '/wms/container-main-request/senior', data }) return await request.post({ url: '/wms/container-main-request/senior', data })
} else { } else {
return await request.get({ url: `/wms/container-main-request/page`, params }) return await request.get({ url: `/wms/container-main-request/page`, params })
@ -43,7 +43,74 @@ export const deleteContainerMainRequest = async (id: number) => {
// 导出器具管理申请主 Excel // 导出器具管理申请主 Excel
export const exportContainerMainRequest = async (params) => { export const exportContainerMainRequest = async (params) => {
return await request.download({ url: `/wms/container-main-request/export-excel`, params }) params.businessType = 'ContainerManage'
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.post({ url: '/wms/container-main-request/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/container-main-request/export-excel`, params })
}
}
// 导出初始化器具管理申请主 Excel
export const exportInitialContainerMainRequest = async (params) => {
params.businessType = 'InitialContainerManage'
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.post({ url: '/wms/container-main-request/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/container-main-request/export-excel`, params })
}
}
// 导出初始化器具管理申请主 Excel
export const exportScrapContainerMainRequest = async (params) => {
params.businessType = 'ScrapContainerManage'
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.post({ url: '/wms/container-main-request/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/container-main-request/export-excel`, params })
}
}
// 导出移动器具管理申请主 Excel
export const exportMoveContainerMainRequest = async (params) => {
params.businessType = 'MoveContainerManage'
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.post({ url: '/wms/container-main-request/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/container-main-request/export-excel`, params })
}
}
// 导出返回器具管理申请主 Excel
export const exportReturnContainerMainRequest = async (params) => {
params.businessType = 'ReturnContainerManage'
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.post({ url: '/wms/container-main-request/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/container-main-request/export-excel`, params })
}
}
// 导出发运器具管理申请主 Excel
export const exportDeliverContainerMainRequest = async (params) => {
params.businessType = 'DeliverContainerManage'
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.post({ url: '/wms/container-main-request/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/container-main-request/export-excel`, params })
}
} }
// 下载用户导入模板 // 下载用户导入模板

58
src/api/wms/qadproductionplan/index.ts

@ -0,0 +1,58 @@
import request from '@/config/axios'
export interface QadProductionPlanMainVO {
displayOrder: number
workshop: string
productionLine: string
shift: string
team: string
planDate: Date
details: string
number: string
planType: string
businessType: string
remark: string
woNumber: string
woLine: string
}
// 查询QAD生产计划主列表
export const getQadProductionPlanMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/qad-production-plan-main/senior', data })
} else {
return await request.get({ url: `/wms/qad-production-plan-main/page`, params })
}
}
// 查询QAD生产计划主详情
export const getQadProductionPlanMain = async (id: number) => {
return await request.get({ url: `/wms/qad-production-plan-main/get?id=` + id })
}
// 新增QAD生产计划主
export const createQadProductionPlanMain = async (data: QadProductionPlanMainVO) => {
return await request.post({ url: `/wms/qad-production-plan-main/create`, data })
}
// 修改QAD生产计划主
export const updateQadProductionPlanMain = async (data: QadProductionPlanMainVO) => {
return await request.put({ url: `/wms/qad-production-plan-main/update`, data })
}
// 删除QAD生产计划主
export const deleteQadProductionPlanMain = async (id: number) => {
return await request.delete({ url: `/wms/qad-production-plan-main/delete?id=` + id })
}
// 导出QAD生产计划主 Excel
export const exportQadProductionPlanMain = async (params) => {
return await request.download({ url: `/wms/qad-production-plan-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/qad-production-plan-main/get-import-template' })
}

2
src/components/TableForm/src/TableForm.vue

@ -40,7 +40,7 @@
/> />
<el-table-column <el-table-column
v-slot="{ row, $index }" v-slot="{ row, $index }"
v-for="(headerItem) in tableFields" v-for="(headerItem) in tableFields.filter(item=>(!item.hidden))"
:key="headerItem" :key="headerItem"
:fixed="headerItem.tableForm?.fixed" :fixed="headerItem.tableForm?.fixed"
:label="t(`ts.${headerItem.label}`).replace('ts.','')" :prop="headerItem.field" :label="t(`ts.${headerItem.label}`).replace('ts.','')" :prop="headerItem.field"

4
src/views/eam/documentType/documentType.data.ts → src/views/eam/basicDocumentType/basicDocumentType.data.ts

@ -83,10 +83,10 @@ export const DocumentType = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
form: { form: {
component: 'Switch', component: 'Switch',
value: 'TURE', value: 'TRUE',
componentProps: { componentProps: {
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
activeValue: 'TURE' activeValue: 'TRUE'
} }
}, },
}, },

61
src/views/eam/documentType/index.vue → src/views/eam/basicDocumentType/index.vue

@ -33,7 +33,7 @@
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -59,8 +59,8 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { DocumentType,DocumentTypeRules } from './documentType.data' import { DocumentType,DocumentTypeRules } from './basicDocumentType.data'
import * as DocumentTypeApi from '@/api/eam/documentType' import * as DocumentTypeApi from '@/api/eam/basicDocumentType'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
@ -131,11 +131,23 @@ const buttonBaseClick = (val, item) => {
} }
} }
const isShowMainButton = (row,val) => {
if (val.indexOf(row.available) > -1) {
return false
} else {
return true
}
}
// - // -
const butttondata = [ const butttondata = (row) => {
defaultButtons.mainListEditBtn({hasPermi:'eam:documentType:update'}), // return [
defaultButtons.mainListDeleteBtn({hasPermi:'eam:documentType:delete'}), // defaultButtons.mainListEditBtn({hasPermi:'eam:documentType:update'}), //
] //defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentMainPart:delete'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:documentType:update'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:documentType:update'}),
]
}
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
@ -143,6 +155,10 @@ const buttonTableClick = async (val, row) => {
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
}else if (val == 'enable') {
handleEnable(row.id)
}else if (val == 'disable') {
handleDisable(row.id)
} }
} }
@ -211,6 +227,37 @@ const handleExport = async () => {
} }
} }
/** 启用 */
const handleEnable = async (id: number) => {
try {
const params = ref({
id: '',
available:'',
})
params.value.id = id
params.value.available = 'TRUE'
await DocumentTypeApi.updateEnableCode(params.value)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
/** 禁用 */
const handleDisable = async (id: number) => {
try {
const params = ref({
id: '',
available:'',
})
params.value.id = id
params.value.available = 'FALSE'
await DocumentTypeApi.updateEnableCode(params.value)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
/** 导入 */ /** 导入 */
const importFormRef = ref() const importFormRef = ref()
const handleImport = () => { const handleImport = () => {

4
src/views/eam/basicFaultCause/basicFaultCause.data.ts

@ -94,10 +94,10 @@ export const BasicFaultCause = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
form: { form: {
component: 'Switch', component: 'Switch',
value: 'TURE', value: 'TRUE',
componentProps: { componentProps: {
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
activeValue: 'TURE' activeValue: 'TRUE'
} }
}, },
}, },

57
src/views/eam/basicFaultCause/index.vue

@ -33,7 +33,7 @@
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -131,11 +131,23 @@ const buttonBaseClick = (val, item) => {
} }
} }
const isShowMainButton = (row,val) => {
if (val.indexOf(row.available) > -1) {
return false
} else {
return true
}
}
// - // -
const butttondata = [ const butttondata = (row) => {
defaultButtons.mainListEditBtn({hasPermi:'eam:basicFaultCause:update'}), // return [
//defaultButtons.mainListDeleteBtn({hasPermi:'eam:basicFaultCause:delete'}), // defaultButtons.mainListEditBtn({hasPermi:'eam:basicFaultCause:update'}), //
] //defaultButtons.mainListDeleteBtn({hasPermi:'eam:basicInspectionOption:delete'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:basicFaultCause:update'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:basicFaultCause:update'}),
]
}
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
@ -143,6 +155,10 @@ const buttonTableClick = async (val, row) => {
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
}else if (val == 'enable') {
handleEnable(row.id)
}else if (val == 'disable') {
handleDisable(row.id)
} }
} }
@ -195,6 +211,37 @@ const handleDelete = async (id: number) => {
} catch {} } catch {}
} }
/** 启用 */
const handleEnable = async (id: number) => {
try {
const params = ref({
id: '',
available:'',
})
params.value.id = id
params.value.available = 'TRUE'
await BasicFaultCauseApi.updateEnableCode(params.value)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
/** 禁用 */
const handleDisable = async (id: number) => {
try {
const params = ref({
id: '',
available:'',
})
params.value.id = id
params.value.available = 'FALSE'
await BasicFaultCauseApi.updateEnableCode(params.value)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */ /** 导出按钮操作 */
const exportLoading = ref(false) // const exportLoading = ref(false) //
const handleExport = async () => { const handleExport = async () => {

4
src/views/eam/basicFaultType/basicFaultType.data.ts

@ -81,10 +81,10 @@ export const BasicFaultType = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
form: { form: {
component: 'Switch', component: 'Switch',
value: 'TURE', value: 'TRUE',
componentProps: { componentProps: {
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
activeValue: 'TURE' activeValue: 'TRUE'
} }
}, },
}, },

58
src/views/eam/basicFaultType/index.vue

@ -33,7 +33,7 @@
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import * as BasicInspectionOptionApi from "@/api/eam/basicInspectionOption";
defineOptions({ name: 'BasicFaultType' }) defineOptions({ name: 'BasicFaultType' })
@ -131,11 +132,23 @@ const buttonBaseClick = (val, item) => {
} }
} }
const isShowMainButton = (row,val) => {
if (val.indexOf(row.available) > -1) {
return false
} else {
return true
}
}
// - // -
const butttondata = [ const butttondata = (row) => {
defaultButtons.mainListEditBtn({hasPermi:'eam:basicFaultType:update'}), // return [
//defaultButtons.mainListDeleteBtn({hasPermi:'eam:basicFaultType:delete'}), // defaultButtons.mainListEditBtn({hasPermi:'eam:basicFaultType:update'}), //
] //defaultButtons.mainListDeleteBtn({hasPermi:'eam:basicInspectionOption:delete'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:basicFaultType:update'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:basicFaultType:update'}),
]
}
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
@ -143,6 +156,10 @@ const buttonTableClick = async (val, row) => {
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
}else if (val == 'enable') {
handleEnable(row.id)
}else if (val == 'disable') {
handleDisable(row.id)
} }
} }
@ -195,6 +212,37 @@ const handleDelete = async (id: number) => {
} catch {} } catch {}
} }
/** 启用 */
const handleEnable = async (id: number) => {
try {
const params = ref({
id: '',
available:'',
})
params.value.id = id
params.value.available = 'TRUE'
await BasicFaultTypeApi.updateEnableCode(params.value)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
/** 禁用 */
const handleDisable = async (id: number) => {
try {
const params = ref({
id: '',
available:'',
})
params.value.id = id
params.value.available = 'FALSE'
await BasicFaultTypeApi.updateEnableCode(params.value)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */ /** 导出按钮操作 */
const exportLoading = ref(false) // const exportLoading = ref(false) //
const handleExport = async () => { const handleExport = async () => {

173
src/views/mes/holidayCalendar/holidayCalendar.data.ts → src/views/eam/basicInspectionOption/basicInspectionOption.data.ts

@ -2,43 +2,63 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
// 表单校验 // 表单校验
export const HolidayCalendarRules = reactive({ export const BasicInspectionOptionRules = reactive({
endTime: [required], code: [required],
concurrencyStamp: [required], name: [required],
type: [required],
}) })
export const HolidayCalendar = useCrudSchemas(reactive<CrudSchema[]>([ export const BasicInspectionOption = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: 'ID', label: 'id',
field: 'id', field: 'id',
sort: 'custom', sort: 'custom',
isSearch: false,
isTable: false,
isForm: false, isForm: false,
isDetail:false,
}, },
{ {
label: '日期', label: '编号',
field: 'holidayDate', field: 'code',
sort: 'custom',
isSearch: true,
},
{
label: '方案名称',
field: 'name',
sort: 'custom',
isSearch: true,
},
{
label: '描述',
field: 'describing',
sort: 'custom',
isSearch: true,
},
{
label: '项是否可修改',
field: 'isUpdated',
sort: 'custom', sort: 'custom',
formatter: dateFormatter,
isSearch: true, 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')]
}
},
form: { form: {
component: 'DatePicker', component: 'Switch',
value: 'TRUE',
componentProps: { componentProps: {
type: 'datetime', inactiveValue: 'FALSE',
valueFormat: 'x' activeValue: 'TRUE'
} }
}, },
}, },
{ {
label: '结束时间', label: '来源于类型配置',
field: 'endTime', field: 'type',
sort: 'custom',
isSearch: true,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: true, isSearch: true,
@ -50,50 +70,54 @@ export const HolidayCalendar = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
form: { isForm: false,
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '备用字段一',
field: 'textOne',
sort: 'custom',
isSearch: true,
}, },
{ {
label: '备用字段二', label: '部门id',
field: 'textTwo', field: 'departmentCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
}, },
{ {
label: '备用字段三', label: '备注',
field: 'textThree', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
}, },
{ {
label: '备用字段四', label: '地点ID',
field: 'textFour', field: 'siteId',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
}, },
{ {
label: '备用字段五', label: '是否可用',
field: 'textFive', field: 'available',
sort: 'custom', sort: 'custom',
isSearch: true, form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
}, },
{ {
label: '删除时间', label: '删除时间',
field: 'deleteTime', field: 'deletionTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: true, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -111,57 +135,22 @@ export const HolidayCalendar = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '状态', label: '删除人id',
field: 'status', field: 'deleterId',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
form: { isTable: false,
component: 'Radio' isForm: false,
}, isDetail:false,
}, },
{ {
label: '并发乐观锁', label: '并发乐观锁',
field: 'concurrencyStamp', field: 'concurrencyStamp',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
form: { isTable: false,
component: 'InputNumber',
value: 0
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
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')]
}
},
isForm: false, isForm: false,
}, isDetail:false,
{
label: '删除用户名',
field: 'deleter',
sort: 'custom',
isSearch: true,
},
{
label: '位置ID',
field: 'siteId',
sort: 'custom',
isSearch: true,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0

290
src/views/eam/basicInspectionOption/index.vue

@ -0,0 +1,290 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="BasicInspectionOption.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="BasicInspectionOption.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="BasicInspectionOptionRules"
:formAllSchemas="BasicInspectionOption.allSchemas"
:apiUpdate="BasicInspectionOptionApi.updateBasicInspectionOption"
:apiCreate="BasicInspectionOptionApi.createBasicInspectionOption"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="BasicInspectionOption.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/basic-inspection-option/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { BasicInspectionOption,BasicInspectionOptionRules } from './basicInspectionOption.data'
import * as BasicInspectionOptionApi from '@/api/eam/basicInspectionOption'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'BasicInspectionOption' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(BasicInspectionOption.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: BasicInspectionOptionApi.getBasicInspectionOptionPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:basicInspectionOption:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'eam:basicInspectionOption:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'eam:basicInspectionOption:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
const isShowMainButton = (row,val) => {
if (val.indexOf(row.available) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi:'eam:basicInspectionOption:update'}), //
//defaultButtons.mainListDeleteBtn({hasPermi:'eam:basicInspectionOption:delete'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:basicInspectionOption:update'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:basicInspectionOption:update'}),
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}else if (val == 'enable') {
handleEnable(row.id)
}else if (val == 'disable') {
handleDisable(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =BasicInspectionOption.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await BasicInspectionOptionApi.createBasicInspectionOption(data)
message.success(t('common.createSuccess'))
} else {
await BasicInspectionOptionApi.updateBasicInspectionOption(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicBasicInspectionOption')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await BasicInspectionOptionApi.deleteBasicInspectionOption(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 启用 */
const handleEnable = async (id: number) => {
try {
const params = ref({
id: '',
available:'',
})
params.value.id = id
params.value.available = 'TRUE'
await BasicInspectionOptionApi.updateEnableCode(params.value)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
/** 禁用 */
const handleDisable = async (id: number) => {
try {
const params = ref({
id: '',
available:'',
})
params.value.id = id
params.value.available = 'FALSE'
await BasicInspectionOptionApi.updateEnableCode(params.value)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await BasicInspectionOptionApi.exportBasicInspectionOption(tableObject.params)
download.excel(data, '巡检方案.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '巡检方案导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await BasicInspectionOptionApi.importTemplate()
})
</script>

171
src/views/eam/basicMaintenanceOption/basicMaintenanceOption.data.ts

@ -0,0 +1,171 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const BasicMaintenanceOptionRules = reactive({
code: [required],
type: [required],
name: [required],
})
export const BasicMaintenanceOption = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '编号',
field: 'code',
sort: 'custom',
isSearch: true,
},
{
label: '方案名称',
field: 'name',
sort: 'custom',
isSearch: true,
},
{
label: '描述',
field: 'describing',
sort: 'custom',
isSearch: true,
},
{
label: '项是否可修改默认是',
field: 'isUpdated',
sort: 'custom',
isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
{
label: '来源于类型配置',
field: 'type',
sort: 'custom',
isSearch: true,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
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')]
}
},
isForm: false,
},
{
label: '部门id',
field: 'departmentCode',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '删除人id',
field: 'deleterId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

291
src/views/eam/basicMaintenanceOption/index.vue

@ -0,0 +1,291 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="BasicMaintenanceOption.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="BasicMaintenanceOption.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="BasicMaintenanceOptionRules"
:formAllSchemas="BasicMaintenanceOption.allSchemas"
:apiUpdate="BasicMaintenanceOptionApi.updateBasicMaintenanceOption"
:apiCreate="BasicMaintenanceOptionApi.createBasicMaintenanceOption"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="BasicMaintenanceOption.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/basic-maintenance-option/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { BasicMaintenanceOption,BasicMaintenanceOptionRules } from './basicMaintenanceOption.data'
import * as BasicMaintenanceOptionApi from '@/api/eam/basicMaintenanceOption'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'BasicMaintenanceOption' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(BasicMaintenanceOption.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: BasicMaintenanceOptionApi.getBasicMaintenanceOptionPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:basicMaintenanceOption:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:basicMaintenanceOption:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'wms:basicMaintenanceOption:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
const isShowMainButton = (row,val) => {
if (val.indexOf(row.available) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi:'eam:basicMaintenanceOption:update'}), //
//defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentMainPart:delete'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:basicMaintenanceOption:update'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:basicMaintenanceOption:update'}),
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}else if (val == 'enable') {
handleEnable(row.id)
}else if (val == 'disable') {
handleDisable(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =BasicMaintenanceOption.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await BasicMaintenanceOptionApi.createBasicMaintenanceOption(data)
message.success(t('common.createSuccess'))
} else {
await BasicMaintenanceOptionApi.updateBasicMaintenanceOption(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicBasicMaintenanceOption')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await BasicMaintenanceOptionApi.deleteBasicMaintenanceOption(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 启用 */
const handleEnable = async (id: number) => {
try {
const params = ref({
id: '',
available:'',
})
params.value.id = id
params.value.available = 'TRUE'
await BasicMaintenanceOptionApi.updateEnableCode(params.value)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
/** 禁用 */
const handleDisable = async (id: number) => {
try {
const params = ref({
id: '',
available:'',
})
params.value.id = id
params.value.available = 'FALSE'
await BasicMaintenanceOptionApi.updateEnableCode(params.value)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await BasicMaintenanceOptionApi.exportBasicMaintenanceOption(tableObject.params)
download.excel(data, '保养方案.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '保养方案导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await BasicMaintenanceOptionApi.importTemplate()
})
</script>

4
src/views/eam/equipmentMainPart/equipmentMainPart.data.ts

@ -83,10 +83,10 @@ export const EquipmentMainPart = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
form: { form: {
component: 'Switch', component: 'Switch',
value: 'TURE', value: 'TRUE',
componentProps: { componentProps: {
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
activeValue: 'TURE' activeValue: 'TRUE'
} }
}, },
}, },

62
src/views/eam/equipmentMainPart/index.vue

@ -33,7 +33,7 @@
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -131,11 +131,23 @@ const buttonBaseClick = (val, item) => {
} }
} }
// - const isShowMainButton = (row,val) => {
const butttondata = [ if (val.indexOf(row.available) > -1) {
defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentMainPart:update'}), // return false
//defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentMainPart:delete'}), // } else {
] return true
}
}
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentMainPart:update'}), //
//defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentMainPart:delete'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:equipmentMainPart:update'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:equipmentMainPart:update'}),
]
}
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
@ -143,6 +155,10 @@ const buttonTableClick = async (val, row) => {
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
}else if (val == 'enable') {
handleEnable(row.id)
}else if (val == 'disable') {
handleDisable(row.id)
} }
} }
@ -195,6 +211,40 @@ const handleDelete = async (id: number) => {
} catch {} } catch {}
} }
/** 启用 */
const handleEnable = async (id: number) => {
try {
const params = ref({
id: '',
available:'',
})
params.value.id = id
params.value.available = 'TRUE'
await EquipmentMainPartApi.updateEnableCode(params.value)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
/** 禁用 */
const handleDisable = async (id: number) => {
try {
const params = ref({
id: '',
available:'',
})
params.value.id = id
params.value.available = 'FALSE'
await EquipmentMainPartApi.updateEnableCode(params.value)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */ /** 导出按钮操作 */
const exportLoading = ref(false) // const exportLoading = ref(false) //
const handleExport = async () => { const handleExport = async () => {

15
src/views/login/components/LoginForm.vue

@ -9,8 +9,16 @@
</el-col> </el-col>
<el-col :span="24" style="padding-right: 10px; padding-left: 10px"> <el-col :span="24" style="padding-right: 10px; padding-left: 10px">
<el-form-item v-if="loginData.tenantEnable === 'true'" prop="tenantName"> <el-form-item v-if="loginData.tenantEnable === 'true'" prop="tenantName">
<el-input v-model="loginData.loginForm.tenantName" :placeholder="t('login.tenantNamePlaceholder')" <!-- <el-input v-model="loginData.loginForm.tenantName" :placeholder="t('login.tenantNamePlaceholder')"
:prefix-icon="iconHouse" link type="primary" /> :prefix-icon="iconHouse" link type="primary" /> -->
<el-select v-model="loginData.loginForm.tenantName" :placeholder="t('login.tenantNamePlaceholder')" :prefix-icon="iconHouse">
<el-option
v-for="item in tenantArray"
:key="item"
:label="item"
:value="item"
/>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" style="padding-right: 10px; padding-left: 10px"> <el-col :span="24" style="padding-right: 10px; padding-left: 10px">
@ -110,6 +118,7 @@
// //
const captchaEnabled = ref(true); const captchaEnabled = ref(true);
const codeUrl = ref(""); const codeUrl = ref("");
const tenantArray = JSON.parse(import.meta.env.VITE_TENANT);
const LoginRules = { const LoginRules = {
tenantName: [required], tenantName: [required],
@ -121,7 +130,7 @@
captchaEnable: import.meta.env.VITE_APP_CAPTCHA_ENABLE, captchaEnable: import.meta.env.VITE_APP_CAPTCHA_ENABLE,
tenantEnable: import.meta.env.VITE_APP_TENANT_ENABLE, tenantEnable: import.meta.env.VITE_APP_TENANT_ENABLE,
loginForm: { loginForm: {
tenantName: '闻荫源码', tenantName: tenantArray[0],
username: 'admin', username: 'admin',
password: '123456', password: '123456',
captchaVerification: '', captchaVerification: '',

15
src/views/login/components/MobileForm.vue

@ -18,13 +18,21 @@
</el-col> </el-col>
<el-col :span="24" style="padding-right: 10px; padding-left: 10px"> <el-col :span="24" style="padding-right: 10px; padding-left: 10px">
<el-form-item v-if="loginData.tenantEnable === 'true'" prop="tenantName"> <el-form-item v-if="loginData.tenantEnable === 'true'" prop="tenantName">
<el-input <!-- <el-input
v-model="loginData.loginForm.tenantName" v-model="loginData.loginForm.tenantName"
:placeholder="t('login.tenantNamePlaceholder')" :placeholder="t('login.tenantNamePlaceholder')"
:prefix-icon="iconHouse" :prefix-icon="iconHouse"
type="primary" type="primary"
link link
/> /> -->
<el-select v-model="loginData.loginForm.tenantName" :placeholder="t('login.tenantNamePlaceholder')" :prefix-icon="iconHouse">
<el-option
v-for="item in tenantArray"
:key="item"
:label="item"
:value="item"
/>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 手机号 --> <!-- 手机号 -->
@ -117,6 +125,7 @@ const iconCircleCheck = useIcon({ icon: 'ep:circle-check' })
const { validForm } = useFormValid(formSmsLogin) const { validForm } = useFormValid(formSmsLogin)
const { handleBackLogin, getLoginState } = useLoginState() const { handleBackLogin, getLoginState } = useLoginState()
const getShow = computed(() => unref(getLoginState) === LoginStateEnum.MOBILE) const getShow = computed(() => unref(getLoginState) === LoginStateEnum.MOBILE)
const tenantArray = JSON.parse(import.meta.env.VITE_TENANT);
const rules = { const rules = {
tenantName: [required], tenantName: [required],
@ -132,7 +141,7 @@ const loginData = reactive({
}, },
loginForm: { loginForm: {
uuid: '', uuid: '',
tenantName: '闻荫源码', tenantName: tenantArray[0],
mobileNumber: '', mobileNumber: '',
code: '' code: ''
} }

2
src/views/mes/abilityInfo/abilityInfo.data.ts

@ -140,7 +140,7 @@ export const AbilityInfo = useCrudSchemas(reactive<CrudSchema[]>([
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: false isTable: true
}, },
{ {
label: '状态', label: '状态',

75
src/views/mes/holidayCalendar/index.vue

@ -1,75 +0,0 @@
<template>
<div>
<el-calendar>
<template #date-cell="{ data }">
<div
style="height: 100"
:class="data.isSelected ? 'is-selected' : ''"
@click="handleClick(data.day)"
>
<div>{{ data.day.split('-').slice(1).join('-') }}</div>
<div v-if="arr.find((v) => v.date === data.day)">{{ arr.find((v) => v.date === data.day).content }}
</div>
<!-- <div>{{ data.isSelected ? '打羽毛球' : '' }}</div>  -->
</div>
</template>
</el-calendar>
<!-- 自定义弹出框 -->
<el-dialog v-model="dialogFormVisible" title="日程安排" width="600" draggable="true">
<el-form :model="calendar" :label-width="100">
<el-form-item label="日程内容">
<el-input v-model="calendar.content" autocomplete="off" />
</el-form-item>
<el-form-item label="创建时间">
<el-input v-model="calendar.content" autocomplete="off" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="save"> 确定 </el-button>
<el-button @click="dialogFormVisible = false"> 取消 </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script>
import { reactive, ref } from 'vue'
import { HolidayCalendar, HolidayCalendarRules } from './holidayCalendar.data'
import * as HolidayCalendarApi from '@/api/mes/holidayCalendar'
const dialogTableVisible = ref(false)
const dialogFormVisible = ref(false)
const formLabelWidth = '160px'
export default {
name: 'Calendar',
data() {
return {
value: new Date(),
arr: [
{ date: '2024-04-01', content: '打球' },
{ date: '2024-04-02', content: '打台球' },
{ date: '2024-04-03', content: '打篮球' },
{ date: '2024-04-04', content: '踢足球' }
],
dialogFormVisible:false,
calendar: {}
}
},
methods: {
handleClick(date) {
this.dialogFormVisible = true
this.calendar.date=date
},
save(){
}
}
}
</script>
<style scoped>
</style>

2
src/views/mes/hrPersonAbility/hrPersonAbility.data.ts

@ -178,7 +178,7 @@ export const HrPersonAbility = useCrudSchemas(reactive<CrudSchema[]>([
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: false isTable: true
}, },
{ {
label: '状态', label: '状态',

8
src/views/mes/jobcalendar/index.vue

@ -1,8 +0,0 @@
<template>
<el-calendar v-model="value" />
</template>
<script lang="ts" setup>
import { ref } from 'vue'
const value = ref(new Date())
</script>

12
src/views/mes/orderDay/orderDay.data.ts

@ -273,6 +273,9 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
} }
}, },
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -296,6 +299,9 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
timeFormat:"HH:mm" timeFormat:"HH:mm"
} }
}, },
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
}, },
{ {
label: '结束时间', label: '结束时间',
@ -312,6 +318,9 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
timeFormat:"HH:mm" timeFormat:"HH:mm"
} }
}, },
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
}, },
{ {
label: '生产模式', label: '生产模式',
@ -339,6 +348,9 @@ export const OrderDay = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isForm: false, isForm: false,
}, },
{ {

2
src/views/mes/patternType/patternType.data.ts

@ -140,6 +140,6 @@ export const PatternType = useCrudSchemas(reactive<CrudSchema[]>([
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: false isTable: true
} }
])) ]))

6
src/views/mes/processroute/processroute.data.ts

@ -4,6 +4,11 @@ import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
// 表单校验 // 表单校验
export const ProcessrouteRules = reactive({ export const ProcessrouteRules = reactive({
processrouteCode: [required],
processName: [required],
productCode: [required],
ablityCode: [required],
ablityCode: [required],
}) })
export const Processroute = useCrudSchemas(reactive<CrudSchema[]>([ export const Processroute = useCrudSchemas(reactive<CrudSchema[]>([
@ -26,6 +31,7 @@ export const Processroute = useCrudSchemas(reactive<CrudSchema[]>([
field: 'id', field: 'id',
sort: 'custom', sort: 'custom',
isForm: false, isForm: false,
isTable: false,
}, },
{ {

2
src/views/mes/workScheduling/components/reportAll.vue

@ -9,7 +9,7 @@
<template #title>{{ dialogTitle }} </template> <template #title>{{ dialogTitle }} </template>
<el-button type="primary" @click="addRow" style="float:right;;">添加</el-button> <el-button type="primary" @click="addRow" style="float:right;;">添加</el-button>
<el-table :data="tableData" style="border: 1px;stripe; width:1300px ;" > <el-table :data="tableData" style="border: 1px;stripe; width:1300px ;" >
<el-table-column prop="processName" label="工序名称" width="200px"> <el-table-column prop="processCodeSelected" label="工序名称" width="200px" >
<template #default="scope"> <template #default="scope">
<el-select v-model="scope.row.processCodeSelected" @change="processChange" value-key="processCode"> <el-select v-model="scope.row.processCodeSelected" @change="processChange" value-key="processCode">
<el-option v-for="item in processOption" :key="item.processCode" :label="item.processName" :value="item.processCode" /> <el-option v-for="item in processOption" :key="item.processCode" :label="item.processName" :value="item.processCode" />

6
src/views/mes/workcalendar/index.vue

@ -238,7 +238,7 @@
</el-table> </el-table>
</el-form> </el-form>
<div class="demo-drawer__footer"> <div class="demo-drawer__footer">
<el-button @click="handleBatchClose"> </el-button> <el-button @click="handleAddClose"> </el-button>
<el-button type="primary" @click="addWork"> 保存 </el-button> <el-button type="primary" @click="addWork"> 保存 </el-button>
</div> </div>
</div> </div>
@ -661,6 +661,10 @@ const batchAddWork = () => {
const handleBatchClose = () => { const handleBatchClose = () => {
batchAddDrawer.value = false batchAddDrawer.value = false
} }
const handleAddClose = () => {
drawer.value = false
}
const savePlan = async (workList) => { const savePlan = async (workList) => {
await workCalendarApi.createBatch(workList) await workCalendarApi.createBatch(workList)
//await workCalendarApi.createObj(workList); //await workCalendarApi.createObj(workList);

27
src/views/qms/inspectionJob/addForm.vue

@ -357,7 +357,6 @@
allSamplePieceSize.value = 0//0 allSamplePieceSize.value = 0//0
if (row) { if (row) {
data.value = JSON.parse(JSON.stringify(row)) data.value = JSON.parse(JSON.stringify(row))
// console.log(data.value)//
// await InspectionJobMainApi.acceptInspectionJobMain(row.id) // await InspectionJobMainApi.acceptInspectionJobMain(row.id)
let list = [] let list = []
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id) list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id)
@ -421,7 +420,6 @@
rules.value['inspectionJobCharacteristicsUpdateReqVO.estimateCode'][0].required = false rules.value['inspectionJobCharacteristicsUpdateReqVO.estimateCode'][0].required = false
} }
}) })
console.log(22, allSamplePieceSize.value)
data.value.subList = list data.value.subList = list
/** /**
设置采样数量默认第一个包装采样数量<总数量显示数量字段第二个包装和剩下的总数量对比以此类推 设置采样数量默认第一个包装采样数量<总数量显示数量字段第二个包装和剩下的总数量对比以此类推
@ -526,12 +524,10 @@
quantifyQuantifyCode: '' quantifyQuantifyCode: ''
} }
}) })
console.log(data.value.subList)
editableTabsValue.value = newTabName editableTabsValue.value = newTabName
dialogVisibleName.value = false dialogVisibleName.value = false
} else { } else {
console.log('error submit!')
return false return false
} }
}) })
@ -559,7 +555,6 @@
// //
const emit = defineEmits(['submitForm', 'searchTableSuccess']) const emit = defineEmits(['submitForm', 'searchTableSuccess'])
const validateForm = (formRef) => { const validateForm = (formRef) => {
// console.log(TableBaseForm_Ref.value)
let _lists = formRef?.map((v) => v.validate()) let _lists = formRef?.map((v) => v.validate())
return Promise.all(_lists) return Promise.all(_lists)
.then(() => { .then(() => {
@ -572,7 +567,6 @@
const tableFormRef = ref() const tableFormRef = ref()
const submitForm = async () => { const submitForm = async () => {
try { try {
console.log(data.value.subList)
const elForm = unref(formMainRef)?.getElFormRef() const elForm = unref(formMainRef)?.getElFormRef()
// //
if (!elForm) return if (!elForm) return
@ -580,7 +574,6 @@
if (!valid) return if (!valid) return
// //
console.log(11, data.value.packageList)
if (data.value.packageList?.length > 0) { if (data.value.packageList?.length > 0) {
const validateForm1 = await tableFormRef.value.validateForm() const validateForm1 = await tableFormRef.value.validateForm()
if (!validateForm1) return if (!validateForm1) return
@ -611,11 +604,14 @@
let numberList = []// let numberList = []//
let parseFloatList = []// let parseFloatList = []//
data.value.subList.forEach((item, index) => { data.value.subList.forEach((item, index) => {
console.log("woxianlai")
console.log(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList)
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) { if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) {
arrBol.push( arrBol.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => { (cur, key) => {
return !cur.qualifiedQuantity || !cur.unqualifiedQuantity return cur.qualifiedQuantity==='' || cur.unqualifiedQuantity===''
} }
) )
) )
@ -655,15 +651,14 @@
numberList.push( numberList.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => { (cur, key) => {
console.log(12, cur.qualifiedQuantity)
console.log(13, cur.unqualifiedQuantity)
console.log(14, item.inspectionJobCharacteristicsUpdateReqVO.sampleQty)
return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty) return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty)
} }
) )
) )
} }
}) })
console.log("wolaile")
console.log(arrBol)
let isEmpty1 = arrBol.some(item => item == true) let isEmpty1 = arrBol.some(item => item == true)
let isEmptyNumberList = numberList.some(item => item == true) let isEmptyNumberList = numberList.some(item => item == true)
let isParseFloat = parseFloatList.some(item => item == true) let isParseFloat = parseFloatList.some(item => item == true)
@ -691,13 +686,11 @@
emit('submitForm', formType.value, data.value) emit('submitForm', formType.value, data.value)
} }
} catch { } catch {
console.log(111)
} }
} }
const staging = async () => { const staging = async () => {
try { try {
console.log(data.value.subList)
const elForm = unref(formMainRef)?.getElFormRef() const elForm = unref(formMainRef)?.getElFormRef()
// //
if (!elForm) return if (!elForm) return
@ -705,7 +698,6 @@
if (!valid) return if (!valid) return
// //
console.log(11, data.value.packageList)
if (data.value.packageList?.length > 0) { if (data.value.packageList?.length > 0) {
const validateForm1 = await tableFormRef.value.validateForm() const validateForm1 = await tableFormRef.value.validateForm()
if (!validateForm1) return if (!validateForm1) return
@ -780,9 +772,6 @@
numberList.push( numberList.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => { (cur, key) => {
console.log(12, cur.qualifiedQuantity)
console.log(13, cur.unqualifiedQuantity)
console.log(14, item.inspectionJobCharacteristicsUpdateReqVO.sampleQty)
return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty) return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty)
} }
) )
@ -811,7 +800,6 @@
await InspectionJobMainApi.stagingInspectionJobMain(data.value); await InspectionJobMainApi.stagingInspectionJobMain(data.value);
message.success("暂存成功") message.success("暂存成功")
} catch { } catch {
console.log(111)
} }
} }
@ -828,7 +816,6 @@
} }
// //
const changeFeatureType = (e) => { const changeFeatureType = (e) => {
console.log(e)
// if (e) { // if (e) {
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyQuantifyCode'][0].required = true // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyQuantifyCode'][0].required = true
// } else { // } else {
@ -986,12 +973,10 @@
} }
] ]
} }
console.log(222, item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList)
} }
// //
const changeQualitativeCode = (e, item, cur) => { const changeQualitativeCode = (e, item, cur) => {
let obj = item.selectedProjectRespVOList.find((cur) => cur.dictionaryValue == e) let obj = item.selectedProjectRespVOList.find((cur) => cur.dictionaryValue == e)
console.log(obj)
cur.defectLevel = obj.defectLevel cur.defectLevel = obj.defectLevel
cur.estimateCode = obj.estimateCode cur.estimateCode = obj.estimateCode
} }

24
src/views/wms/agvManage/interfaceInfo/index.vue

@ -20,6 +20,7 @@
:columns="tableColumns" :columns="tableColumns"
:data="tableObject.tableList" :data="tableObject.tableList"
:loading="tableObject.loading" :loading="tableObject.loading"
:showOverflowTooltip="false"
:pagination="{ :pagination="{
total: tableObject.total total: tableObject.total
}" }"
@ -27,6 +28,16 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #reqBody="{row}">
<el-tooltip>
<template #content>
<div class="toolContent">
<pre>{{ JSON.parse(row.reqBody.replace(/[\\]/g, '')) }}</pre>
</div>
</template>
<span class="ellipsis">{{row.reqBody}}</span>
</el-tooltip>
</template>
<template #number="{row}"> <template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '序号', row.number)"> <el-button type="primary" link @click="openDetail(row, '序号', row.number)">
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
@ -243,3 +254,16 @@ onMounted(async () => {
}) })
</script> </script>
<style lang="scss">
.toolContent{
max-height: 300px;
overflow: auto;
}
.ellipsis{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 180px;
}
</style>

2
src/views/wms/basicDataManage/itemManage/itemarea/index.vue

@ -45,6 +45,7 @@
@success="getList" @success="getList"
:rules="ItemareaRules" :rules="ItemareaRules"
:isOpenSearchTable="true" :isOpenSearchTable="true"
fieldTableColumn="locationCode"
:formAllSchemas="Itemarea.allSchemas" :formAllSchemas="Itemarea.allSchemas"
:tableAllSchemas="ItemareaDetail.allSchemas" :tableAllSchemas="ItemareaDetail.allSchemas"
:tableFormRules="ItemareaDetailRules" :tableFormRules="ItemareaDetailRules"
@ -122,6 +123,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
val.forEach(item=>{ val.forEach(item=>{
const newRow = {...row} const newRow = {...row}
if(formField == 'locationCode') { if(formField == 'locationCode') {
if(tableData.value.find(item1=>item1['locationCode'] == item['code'])) return
newRow['locationCode'] = item['code'] newRow['locationCode'] = item['code']
}else{ }else{
newRow[formField] = item[searchField] newRow[formField] = item[searchField]

1
src/views/wms/basicDataManage/itemManage/relegateRequest/relegateRequest.data.ts

@ -20,6 +20,7 @@ export const RelegateRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm:false,
}, },
{ {
label: '物料代码', label: '物料代码',

3
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue

@ -123,9 +123,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
DeliverRequestDetail.allSchemas.tableFormColumns.forEach(item => { DeliverRequestDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : '' tableFormKeys[item.field] = item.default ? item.default : ''
}) })
console.log('tableData.value',tableData.value)
val.forEach(item=>{ val.forEach(item=>{
if(tableData.value.find(item1=>item1['id'] == item['id'])) return if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode'])) return
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['uom'] = item['customerUom'] newRow['uom'] = item['customerUom']
tableData.value.push(newRow) tableData.value.push(newRow)

2
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue

@ -127,7 +127,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if (type == 'tableForm') { if (type == 'tableForm') {
if(formField == 'itemCode') { if(formField == 'itemCode') {
val.forEach(item=>{ val.forEach(item=>{
if(tableData.value.find(item1=>item1['id'] == item['id'])) return if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode'])) return
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['uom'] = item['customerUom'] newRow['uom'] = item['customerUom']
tableData.value.push(newRow) tableData.value.push(newRow)

2
src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue

@ -127,7 +127,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// } // }
if(formField == 'itemCode') { if(formField == 'itemCode') {
val.forEach(item=>{ val.forEach(item=>{
if(tableData.value.find(item1=>item1['id'] == item['id'])) return if(tableData.value.find(item1=>item1['itemCode'] == item['code'])) return
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['uom'] = item['uom'] newRow['uom'] = item['uom']
newRow['itemCode'] = item['code'] newRow['itemCode'] = item['code']

16
src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts

@ -96,6 +96,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isTable: false
}, },
{ {
label: '部门', label: '部门',
@ -219,9 +220,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
table: { isTable: false,
width: 200
},
isForm: false, isForm: false,
}, },
{ {
@ -247,9 +246,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'siteId', field: 'siteId',
sort: 'custom', sort: 'custom',
isForm: false, isForm: false,
table: { isTable: false,
width: 100
},
}, },
{ {
label: '操作', label: '操作',
@ -439,6 +436,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isTable: false
}, },
{ {
label: '创建时间', label: '创建时间',
@ -453,9 +451,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
table: { isTable: false,
width: 200
},
isForm: false, isForm: false,
isTableForm: false isTableForm: false
}, },
@ -495,6 +491,8 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
label: '操作', label: '操作',
field: 'action', field: 'action',
isForm: false, isForm: false,
hiddenInMain:true,
isTableForm: false,
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'

17
src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue

@ -298,7 +298,7 @@ const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['ma
return [] return []
} }
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:container-main-request:close'}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['2','3','4','6']),hasPermi:'wms:container-main-request:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:container-main-request:reAdd'}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:container-main-request:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:container-main-request:submit'}), // defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:container-main-request:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:container-main-request:refused'}), // defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:container-main-request:refused'}), //
@ -466,8 +466,19 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const data = await ContainerMainRequestApi.exportContainerMainRequest(tableObject.params) if(routeName.value == 'ReturnContainerManageRequest'){
download.excel(data, '器具管理申请主.xlsx') const data = await ContainerMainRequestApi.exportReturnContainerMainRequest(tableObject.params)
download.excel(data, '器具返回申请.xlsx')
}else if ( routeName.value == 'MoveContainerManageRequest') {
const data = await ContainerMainRequestApi.exportMoveContainerMainRequest(tableObject.params)
download.excel(data, '器具转移申请.xlsx')
}else if ( routeName.value == 'DeliverContainerManageRequest') {
const data = await ContainerMainRequestApi.exportDeliverContainerMainRequest(tableObject.params)
download.excel(data, '器具发运申请.xlsx')
}else{
const data = await ContainerMainRequestApi.exportContainerMainRequest(tableObject.params)
download.excel(data, '器具管理申请.xlsx')
}
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false

16
src/views/wms/inventoryjobManage/containermanage/containerRecordMain/containerRecordMain.data.ts

@ -63,6 +63,7 @@ export const ContainerRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isTable: false
}, },
{ {
label: '部门', label: '部门',
@ -112,9 +113,7 @@ export const ContainerRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'siteId', field: 'siteId',
sort: 'custom', sort: 'custom',
isForm: false, isForm: false,
table: { isTable: false,
width: 100
},
}, },
{ {
label: '创建时间', label: '创建时间',
@ -129,9 +128,7 @@ export const ContainerRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
table: { isTable: false,
width: 200
},
isForm: false, isForm: false,
}, },
{ {
@ -220,6 +217,7 @@ export const ContainerRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isTable: false
}, },
{ {
label: '创建时间', label: '创建时间',
@ -234,9 +232,7 @@ export const ContainerRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
table: { isTable: false,
width: 200
},
isForm: false, isForm: false,
isTableForm: false isTableForm: false
}, },
@ -276,6 +272,8 @@ export const ContainerRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '操作', label: '操作',
field: 'action', field: 'action',
isForm: false, isForm: false,
hiddenInMain:true,
isTableForm: false,
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'

8
src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue

@ -250,7 +250,7 @@ const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['ma
return [] return []
} }
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:container-main-request:close'}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['2','3','4','6']),hasPermi:'wms:container-main-request:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:container-main-request:reAdd'}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:container-main-request:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:container-main-request:submit'}), // defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:container-main-request:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:container-main-request:refused'}), // defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:container-main-request:refused'}), //
@ -420,8 +420,8 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const data = await ContainerMainRequestApi.exportContainerMainRequest(tableObject.params) const data = await ContainerMainRequestApi.exportInitialContainerMainRequest(tableObject.params)
download.excel(data, '器具管理申请主.xlsx') download.excel(data, '初始化器具管理申请主.xlsx')
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -436,7 +436,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: 'importFileName.xlsx' templateTitle: importFileName.value + '.xlsx'
}) })
// //
const importSuccess = () => { const importSuccess = () => {

16
src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts

@ -100,6 +100,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isTable:false,
}, },
{ {
label: '部门', label: '部门',
@ -223,9 +224,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
table: { isTable:false,
width: 200
},
isForm: false, isForm: false,
}, },
{ {
@ -251,9 +250,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'siteId', field: 'siteId',
sort: 'custom', sort: 'custom',
isForm: false, isForm: false,
table: { isTable:false,
width: 100
},
}, },
{ {
label: '操作', label: '操作',
@ -410,6 +407,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isTable:false,
}, },
{ {
label: '创建时间', label: '创建时间',
@ -424,9 +422,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
table: { isTable:false,
width: 200
},
isForm: false, isForm: false,
isTableForm: false isTableForm: false
}, },
@ -466,6 +462,8 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
label: '操作', label: '操作',
field: 'action', field: 'action',
isForm: false, isForm: false,
hiddenInMain:true,
isTableForm: false,
table: { table: {
width: 200, width: 200,
fixed: 'right' fixed: 'right'

6
src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue

@ -273,7 +273,7 @@ const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['ma
return [] return []
} }
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:container-main-request:close'}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['2','3','4','6']),hasPermi:'wms:container-main-request:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:container-main-request:reAdd'}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:container-main-request:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:container-main-request:submit'}), // defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:container-main-request:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:container-main-request:refused'}), // defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:container-main-request:refused'}), //
@ -446,8 +446,8 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const data = await ContainerMainRequestApi.exportContainerMainRequest(tableObject.params) const data = await ContainerMainRequestApi.exportScrapContainerMainRequest(tableObject.params)
download.excel(data, '器具管理申请主.xlsx') download.excel(data, '报废器具管理申请主.xlsx')
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false

16
src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts

@ -96,6 +96,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isTable: false
}, },
{ {
label: '部门', label: '部门',
@ -219,9 +220,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
table: { isTable: false,
width: 200
},
isForm: false, isForm: false,
}, },
{ {
@ -247,9 +246,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'siteId', field: 'siteId',
sort: 'custom', sort: 'custom',
isForm: false, isForm: false,
table: { isTable: false,
width: 100
},
}, },
{ {
label: '操作', label: '操作',
@ -437,6 +434,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isTable: false
}, },
{ {
label: '创建时间', label: '创建时间',
@ -451,9 +449,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
table: { isTable: false,
width: 200
},
isForm: false, isForm: false,
isTableForm: false isTableForm: false
}, },
@ -493,6 +489,8 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
label: '操作', label: '操作',
field: 'action', field: 'action',
isForm: false, isForm: false,
hiddenInMain:true,
isTableForm: false,
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'

75
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue

@ -70,6 +70,7 @@
:apiDelete="ProductionreturnRequestDetailApi.deleteProductionreturnRequestDetail" :apiDelete="ProductionreturnRequestDetailApi.deleteProductionreturnRequestDetail"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
@detailOpenForm="detailOpenForm" @detailOpenForm="detailOpenForm"
:detailValidate="detailValidate"
/> />
<!-- 创建标签 --> <!-- 创建标签 -->
@ -90,13 +91,14 @@
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/productionreturn-request-main/import" :importTemplateData="importTemplateData" <ImportForm ref="importFormRef" url="/wms/productionreturn-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" /> @success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
<!-- 标签打印 -->
<SearchTable style="width:905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { ProductionreturnRequestMain,ProductionreturnRequestMainRules,ProductionreturnRequestDetail,ProductionreturnRequestDetailRules,ProductionreturnRequestDetailLabel,ProductionreturnRequestDetailLabelRules } from './productionreturnRequestMain.data' import { ProductionreturnRequestMain,ProductionreturnRequestMainRules,ProductionreturnRequestDetail,ProductionreturnRequestDetailRules,ProductionreturnRequestDetailLabel,ProductionreturnRequestDetailLabelRules, SupplierdeliverRequestPackage } from './productionreturnRequestMain.data'
import * as ProductionreturnRequestMainApi from '@/api/wms/productionreturnRequestMain' import * as ProductionreturnRequestMainApi from '@/api/wms/productionreturnRequestMain'
import * as ProductionreturnRequestDetailApi from '@/api/wms/productionreturnRequestDetail' import * as ProductionreturnRequestDetailApi from '@/api/wms/productionreturnRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -130,6 +132,19 @@ const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
} }
// /
const detailValidate = (data) => {
let tag = false;
if(data.qty <= 0){
message.warning('数量必须大于0')
tag = false;
return tag;
}else {
tag = true;
return tag;
}
}
// //
const isItemType = async (itemCode, labelTypeParams) => { const isItemType = async (itemCode, labelTypeParams) => {
let isType = false let isType = false
@ -509,6 +524,34 @@ const openForm =async (type: string, row?: number) => {
formRef.value.open(type, row) formRef.value.open(type, row)
} }
// --退
const searchTableSuccess1 = async (formField, searchField, val, formRef, type, row) => {
console.log('批量打印',val)
// let rows:any = []
// val.forEach(item=>{
// rows = [...rows,...item.selectionRows.map(item1=>item1.number)]
// })
if(val.length == 0){
message.warning("请先选择要打印的数据!")
return
}
// window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(','))
await PackageApi.batchPrintingLable(val.map(item1=>item1.number).join(',')).then(res => {
console.log(res)
if (labelType.value == 'cg') {
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res)
} else {
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res)
}
}).catch(err => {
console.log(err)
message.error('创建标签失败')
})
}
// //
const { wsCache } = useCache() const { wsCache } = useCache()
/** 详情操作 */ /** 详情操作 */
@ -657,18 +700,32 @@ const handlePoint = async (row) => {
}) })
// //
if (isCreateLabel.value) { if (isCreateLabel.value) {
if (labelType.value == 'cg') { labelPrint(row)
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
window.open(src.value+'&request_number='+row.number)
} else {
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
window.open(src.value+'&request_number='+row.number)
}
} else { } else {
message.warning('请先创建标签') message.warning('请先创建标签')
} }
} }
const searchTableRef = ref()
const labelPrint = async (row) => {
tableObject.loading = true
const defaultParams = {'moduleName':'productreceipt_predict','recordNumber':row.number}
const {tableObject:tableObjectPrint ,tableMethods} = useTable({
defaultParams,
getListApi: PackageApi.getLabelDetailPage //
})
//
const { getList:getListPrint } = tableMethods
getListPrint()
tableObject.loading = false
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns
tableColumns.forEach((item) => {
item.width = item.table?.width || 150
})
searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true)
}
/** 导入 */ /** 导入 */
const importFormRef = ref() const importFormRef = ref()
const handleImport = () => { const handleImport = () => {

54
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts

@ -1338,3 +1338,57 @@ export const ProductionreturnRequestDetailLabelRules = reactive({
] ]
}) })
export const SupplierdeliverRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '包装号',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 180,
fixed: 'left'
},
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
},
{
label: '批次',
field: 'batch',
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
]))

12
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue

@ -117,7 +117,7 @@ const { tableObject, tableMethods } = useTable({
} }
fromInventoryStatus.value = 'OK' fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "HOLD" toInventoryStatus.value = "HOLD"
businessType.value = 'OkToHoldRequest' businessType.value = 'OkToHold'
importFileName.value = '合格转隔离申请' importFileName.value = '合格转隔离申请'
} else if ( routeName.value == 'HoldtookRequestMain') { } else if ( routeName.value == 'HoldtookRequestMain') {
tableObject.params = { tableObject.params = {
@ -126,7 +126,7 @@ const { tableObject, tableMethods } = useTable({
} }
fromInventoryStatus.value = 'HOLD' fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "OK" toInventoryStatus.value = "OK"
businessType.value = 'HoldToOkRequest' businessType.value = 'HoldToOk'
importFileName.value = '隔离转合格申请' importFileName.value = '隔离转合格申请'
} else if ( routeName.value == 'HoldtoscrapRequestMain') { } else if ( routeName.value == 'HoldtoscrapRequestMain') {
tableObject.params = { tableObject.params = {
@ -135,7 +135,7 @@ const { tableObject, tableMethods } = useTable({
} }
fromInventoryStatus.value = 'HOLD' fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "SCRAP" toInventoryStatus.value = "SCRAP"
businessType.value = 'HoldToScrapRequest' businessType.value = 'HoldToScrap'
importFileName.value = '隔离转报废申请' importFileName.value = '隔离转报废申请'
} else if ( routeName.value == 'OktoscrapRequestMain') { } else if ( routeName.value == 'OktoscrapRequestMain') {
tableObject.params = { tableObject.params = {
@ -144,7 +144,7 @@ const { tableObject, tableMethods } = useTable({
} }
fromInventoryStatus.value = 'OK' fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "SCRAP" toInventoryStatus.value = "SCRAP"
businessType.value = 'OkToScrapRequest' businessType.value = 'OkToScrap'
importFileName.value = '合格转报废申请' importFileName.value = '合格转报废申请'
} else if ( routeName.value == 'ScraptoholdRequestMain') { } else if ( routeName.value == 'ScraptoholdRequestMain') {
tableObject.params = { tableObject.params = {
@ -153,11 +153,11 @@ const { tableObject, tableMethods } = useTable({
} }
fromInventoryStatus.value = 'SCRAP' fromInventoryStatus.value = 'SCRAP'
toInventoryStatus.value = "HOLD" toInventoryStatus.value = "HOLD"
businessType.value = 'ScrapToHoldRequest' businessType.value = 'ScrapToHold'
importFileName.value = '报废转隔离申请' importFileName.value = '报废转隔离申请'
} else if( routeName.value == 'InventorymoveRequestMain'){ } else if( routeName.value == 'InventorymoveRequestMain'){
fromInventoryStatus.value = null fromInventoryStatus.value = null
businessType.value = 'InventorymoveRequest' businessType.value = 'Move'
importFileName.value = '库存移动申请' importFileName.value = '库存移动申请'
}else { }else {
tableObject.params = { tableObject.params = {

244
src/views/wms/productionManage/productionplan/qadproductionplan/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="QadProductionPlanMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="QadProductionPlanMain.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="QadProductionPlanMainRules"
:formAllSchemas="QadProductionPlanMain.allSchemas"
:apiUpdate="QadProductionPlanMainApi.updateQadProductionPlanMain"
:apiCreate="QadProductionPlanMainApi.createQadProductionPlanMain"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="QadProductionPlanMain.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/qad-production-plan-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { QadProductionPlanMain,QadProductionPlanMainRules } from './qadProductionPlanMain.data'
import * as QadProductionPlanMainApi from '@/api/wms/qadproductionplan'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'QadProductionPlanMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(QadProductionPlanMain.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: QadProductionPlanMainApi.getQadProductionPlanMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:qadProductionPlanMain:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:qadProductionPlanMain:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:qadProductionPlanMain:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:qadProductionPlanMain:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:qadProductionPlanMain:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =QadProductionPlanMain.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await QadProductionPlanMainApi.createQadProductionPlanMain(data)
message.success(t('common.createSuccess'))
} else {
await QadProductionPlanMainApi.updateQadProductionPlanMain(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicQadProductionPlanMain')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await QadProductionPlanMainApi.deleteQadProductionPlanMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await QadProductionPlanMainApi.exportQadProductionPlanMain(tableObject.params)
download.excel(data, 'QAD生产计划主.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: 'QAD生产计划主导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await QadProductionPlanMainApi.importTemplate()
})
</script>

119
src/views/wms/productionManage/productionplan/qadproductionplan/qadProductionPlanMain.data.ts

@ -0,0 +1,119 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const QadProductionPlanMainRules = reactive({
workshop: [required],
woNumber: [required],
woLine: [required],
})
export const QadProductionPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '顺序',
field: 'displayOrder',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '单据号',
field: 'number',
sort: 'custom',
},
{
label: '车间',
field: 'workshop',
sort: 'custom',
isSearch: true,
},
{
label: '生产线',
field: 'productionLine',
sort: 'custom',
isSearch: true,
},
{
label: '班次',
field: 'shift',
sort: 'custom',
isSearch: true,
},
{
label: '班组',
field: 'team',
sort: 'custom',
},
{
label: '计划日期',
field: 'planDate',
sort: 'custom',
formatter: dateFormatter,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '明细列表',
field: 'details',
sort: 'custom',
},
{
label: '计划类型',
field: 'planType',
sort: 'custom',
form: {
component: 'SelectV2'
},
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
form: {
component: 'SelectV2'
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isForm: false,
},
{
label: '状态',
field: 'status',
sort: 'custom',
isForm: false,
},
{
label: '订单号',
field: 'woNumber',
sort: 'custom',
},
{
label: '订单行',
field: 'woLine',
sort: 'custom',
},
// {
// label: '操作',
// field: 'action',
// isForm: false,
// table: {
// width: 150,
// fixed: 'right'
// }
// }
]))

4
src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue

@ -108,11 +108,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
if(tableData.value.find(item1=>item1['id'] == item['id'])) return
val.forEach(item=>{ val.forEach(item=>{
if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode']&&item1['batch'] == item['batch']&&item1['packingNumber'] == item['packingNumber']&&item1['fromLocationCode'] == item['locationCode']&&item1['inventoryStatus'] == item['inventoryStatus'])) return
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField] newRow[formField] = item[searchField]
newRow['poLine'] = item['itemCode'] newRow['itemCode'] = item['itemCode']
newRow['packingNumber'] = item['packingNumber'] newRow['packingNumber'] = item['packingNumber']
newRow['containerNumber'] = item['containerNumber'] newRow['containerNumber'] = item['containerNumber']
newRow['batch'] = item['batch'] newRow['batch'] = item['batch']

10
src/views/wms/productionManage/productputaway/productputawayRequestMain/productputawayRequestMain.data.ts

@ -462,7 +462,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题 searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePageByBusinessType, // 查询弹窗所需分页方法 searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key: 'businessType', key: 'businessType',
value: businessTypeData.code, value: businessTypeData.code,
@ -476,7 +476,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题 searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePageByBusinessType, // 查询弹窗所需分页方法 searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key: 'businessType', key: 'businessType',
value: businessTypeData.code, value: businessTypeData.code,
@ -533,6 +533,9 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
tableForm: {
disabled: true
}
}, },
{ {
label: '包装数量', label: '包装数量',
@ -541,6 +544,9 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
tableForm: {
disabled: true
}
}, },
{ {
label: '计量单位', label: '计量单位',

2
src/views/wms/productionManage/productredress/productredressRequestMain/index.vue

@ -128,8 +128,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// //
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
if (formField == 'itemCode') { if (formField == 'itemCode') {
if(tableData.value.find(item1=>item1['id'] == item['id'])) return
val.forEach(item=>{ val.forEach(item=>{
if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode']&&item1['batch'] == item['batch']&&item1['packingNumber'] == item['packingNumber']&&item1['toLocationCode'] == item['locationCode']&&item1['inventoryStatus'] == item['inventoryStatus'])) return
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['itemCode'] = item['itemCode'] newRow['itemCode'] = item['itemCode']
newRow['qty'] = item['qty'] newRow['qty'] = item['qty']

45
src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts

@ -317,31 +317,32 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}, },
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { // componentProps: {
isSearchList: true, // 开启查询弹窗 // isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 // searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段 // searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题 // searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 // searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType, // 查询弹窗所需分页方法 // searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType, // 查询弹窗所需分页方法
searchCondition: [{ // searchCondition: [{
key: 'businessType', // key: 'businessType',
value: businessTypeData.code, // value: businessTypeData.code,
action: '==', // 查询拼接条件 // action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件 // isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 // isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
},{ // },{
key: 'packingNumber', // 查询列表中字段 // key: 'packingNumber', // 查询列表中字段
value: '', // 指查询具体值 // value: '', // 指查询具体值
action: 'isNotStr', // 查询拼接条件 // action: 'isNotStr', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件 // isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 // isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
}] // }]
} // }
}, },
tableForm:{ tableForm:{
disabled: true,
multiple:true, multiple:true,
isInpuFocusShow: true, // isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题 searchTitle: '库存余额信息', // 查询弹窗标题

40
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue

@ -112,6 +112,7 @@
<script setup lang="ts"> <script setup lang="ts">
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { addDay } from '@/utils/formatTime'
import download from '@/utils/download' import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { import {
@ -131,7 +132,7 @@ import * as PurchaseDetailApi from '@/api/wms/purchaseDetail'
import { PurchaseDetail } from '../../supplierdeliver/purchaseMain/purchaseMain.data' import { PurchaseDetail } from '../../supplierdeliver/purchaseMain/purchaseMain.data'
import * as ItembasicApi from '@/api/wms/itembasic' import * as ItembasicApi from '@/api/wms/itembasic'
// //
defineOptions({ name: 'PurchasereceiptRequestMain' }) defineOptions({ name: 'PurchasereceiptRequestMain' })
const message = useMessage() // const message = useMessage() //
@ -154,7 +155,7 @@ const updataTableColumns = (val) => {
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
//console.log("formRef",formRef) //console.log("formRef",formRef)
//console.log("supplierCode",formRef.value.formRef.formModel.supplierCode) console.log("searchTableSuccess",formField, searchField, val, formRef, type, row)
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
@ -162,7 +163,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if(formField == 'itemCode') { if(formField == 'itemCode') {
row['itemCode'] = val[0]['code'] row['itemCode'] = val[0]['code']
} else if(formField == 'poNumber') { } else if(formField == 'poNumber') {
row['poNumber'] = val[0]['number'] updateTableData(val)
} else if(formField == 'poLine'){ } else if(formField == 'poLine'){
//-- //--
val.forEach(item=>{ val.forEach(item=>{
@ -213,6 +214,25 @@ const onEnter = async (field,value)=>{
console.log(field,value) console.log(field,value)
getSearchTableData(value,true) getSearchTableData(value,true)
} }
const updateTableData = (tableList)=>{
tableList.forEach(row=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row}))
newRow['poLine'] = row['lineNumber']
newRow['itemCode'] = row['itemCode']
newRow['uom'] = row['uom']
newRow['poNumber'] =row['number']
newRow['supplierCode'] =row['supplierCode']
//
newRow['produceDate'] = dayjs().valueOf()
newRow['arriveDate'] = dayjs().valueOf()
//
newRow['batch'] = formatDate(newRow['produceDate'],'YYYYMMDD');
newRow['defaultToLocationCode'] =row['defaultLocation']
if(!tableData.value.find((item:object)=>item.poNumber == newRow.poNumber&&item.itemCode == newRow.itemCode&&item.poLine == newRow.poLine&&item.batch == newRow.batch)){
tableData.value.push(newRow)
}
})
}
const getSearchTableData = async (number,isEnter=false)=>{ const getSearchTableData = async (number,isEnter=false)=>{
const {tableObject ,tableMethods} = useTable({ const {tableObject ,tableMethods} = useTable({
defaultParams:{number}, defaultParams:{number},
@ -226,22 +246,10 @@ const getSearchTableData = async (number,isEnter=false)=>{
item.width = item.table?.width || 150 item.width = item.table?.width || 150
}) })
tableData.value = [] tableData.value = []
updateTableData(tableObject.tableList)
const itemCodes = [] const itemCodes = []
tableObject.tableList.forEach(row=>{ tableObject.tableList.forEach(row=>{
itemCodes.push(row['itemCode']) itemCodes.push(row['itemCode'])
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row}))
newRow['poLine'] = row['lineNumber']
newRow['itemCode'] = row['itemCode']
newRow['uom'] = row['uom']
newRow['poNumber'] =row['number']
newRow['supplierCode'] =row['supplierCode']
//
newRow['produceDate'] = dayjs().valueOf()
newRow['arriveDate'] = dayjs().valueOf()
//
newRow['batch'] = formatDate(newRow['produceDate'],'YYYYMMDD');
newRow['defaultToLocationCode'] =row['defaultLocation']
tableData.value.push(newRow)
if(isEnter){ if(isEnter){
//-- //--
const setV = {} const setV = {}

2
src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue

@ -517,6 +517,7 @@ console.log('PurchaseMain.allSchemas.searchSchema',PurchaseMain.allSchemas.searc
if (item.field == 'orderQty') { if (item.field == 'orderQty') {
console.log("AAAAAA",item) console.log("AAAAAA",item)
item.tableForm.disabled = false item.tableForm.disabled = false
item.hidden = false
} }
}) })
} }
@ -525,6 +526,7 @@ console.log('PurchaseMain.allSchemas.searchSchema',PurchaseMain.allSchemas.searc
if (item.field == 'orderQty') { if (item.field == 'orderQty') {
console.log("BBBBB",item) console.log("BBBBB",item)
item.tableForm.disabled = true item.tableForm.disabled = true
item.hidden = true
} }
}) })
} }

1
src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts

@ -494,6 +494,7 @@ export const PurchaseDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
tableForm: { tableForm: {
disabled:false, disabled:false,
hidden:false,
type: 'InputNumber', type: 'InputNumber',
min: 1, min: 1,
precision: 6 precision: 6

9
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue

@ -117,8 +117,15 @@
newRow['orderQty'] = item['orderQty'] newRow['orderQty'] = item['orderQty']
newRow['planQty'] = item['orderQty']-item['plannedQty'] newRow['planQty'] = item['orderQty']-item['plannedQty']
newRow['available'] = item['available'] newRow['available'] = item['available']
console.log('tableData.value',tableData.value)
console.log('item',item)
if(!tableData.value.find(tableItem=>tableItem['itemCode']==item['itemCode']&&tableItem['poNumber']==item['number']&&tableItem['poLine']==item['lineNumber'])){
tableData.value.push(newRow)
}
}else{
tableData.value.push(newRow)
} }
tableData.value.push(newRow)
}) })
} else { } else {
const setV = {} const setV = {}

1
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue

@ -173,7 +173,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
//-- //--
const itemCodes = [] const itemCodes = []
val.forEach(item=>{ val.forEach(item=>{
if(tableData.value.find(item1=>item1['id'] == item['id'])) return
const newRow = {...row} const newRow = {...row}
newRow[formField] = item[searchField] newRow[formField] = item[searchField]
newRow['poNumber'] = item['poNumber'] newRow['poNumber'] = item['poNumber']

2
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

@ -298,7 +298,7 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
label: '申请时间', label: '申请时间',
field: 'requestTime', field: 'requestTime',
formatter: dateFormatter, formatter: dateFormatter,
detaul: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, },
sort: 'custom', sort: 'custom',

1
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -204,6 +204,7 @@
if (type == 'tableForm') { if (type == 'tableForm') {
// //
val.forEach(item=>{ val.forEach(item=>{
if(tableData.value.find(item1=>item1['poNumber'] == item['poNumber']&&item1['poLine'] == item['poLine'])) return
const newRow = {...row} const newRow = {...row}
newRow[formField] = item[searchField] newRow[formField] = item[searchField]
if (formField == 'poLine') { if (formField == 'poLine') {

Loading…
Cancel
Save