Browse Source

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

master_hella_20240701
liuchen864 6 months ago
parent
commit
60a1d72dbd
  1. 2
      .env
  2. 4
      README.md
  3. 6
      index.html
  4. 2
      src/api/eam/basicDocumentType/index.ts
  5. 2
      src/api/eam/basicFaultCause/index.ts
  6. 2
      src/api/eam/basicFaultType/index.ts
  7. 2
      src/api/eam/basicInspectionOption/index.ts
  8. 2
      src/api/eam/basicMaintenanceOption/index.ts
  9. 61
      src/api/eam/basicSpotCheckSelectSet/index.ts
  10. 60
      src/api/eam/inspectionItemSelectSet/index.ts
  11. 61
      src/api/eam/maintenanceItem/index.ts
  12. 79
      src/api/eam/toolAccounts/index.ts
  13. 61
      src/api/eam/toolMod/index.ts
  14. 12
      src/api/wms/purchasereceiptJobDetail/index.ts
  15. 28
      src/api/wms/relegateRequestDetail/index.ts
  16. 68
      src/api/wms/relegateRequestMain/index.ts
  17. BIN
      src/assets/imgs/login-bg.png
  18. BIN
      src/assets/imgs/login-bg1.png
  19. BIN
      src/assets/imgs/logo1.png
  20. 2
      src/components/Annex/src/Annex.vue
  21. 11
      src/components/BasicForm/src/BasicForm.vue
  22. 43
      src/components/TableForm/src/TableForm.vue
  23. 2
      src/config/axios/config.ts
  24. 3
      src/locales/en-US.ts
  25. 3
      src/locales/zh-CN.ts
  26. 2
      src/utils/dict.ts
  27. 147
      src/views/eam/basicSpotCheckSelectSet/basicSpotCheckSelectSet.data.ts
  28. 287
      src/views/eam/basicSpotCheckSelectSet/index.vue
  29. 287
      src/views/eam/basicSpotCheckSelectSet/itemSelectSetForm.vue
  30. 1
      src/views/eam/equipmentManufacturer/index.vue
  31. 1
      src/views/eam/equipmentSupplier/index.vue
  32. 1
      src/views/eam/inspectionItem/index.vue
  33. 34
      src/views/eam/inspectionItem/inspectionItem.data.ts
  34. 287
      src/views/eam/inspectionItemSelectSet/index.vue
  35. 141
      src/views/eam/inspectionItemSelectSet/inspectionItemSelectSet.data.ts
  36. 280
      src/views/eam/inspectionItemSelectSet/itemSelectSetForm.vue
  37. 268
      src/views/eam/maintenanceItem/index.vue
  38. 106
      src/views/eam/maintenanceItem/maintenanceItem.data.ts
  39. 1
      src/views/eam/spotCheckItem/index.vue
  40. 21
      src/views/eam/spotCheckItem/spotCheckItem.data.ts
  41. 244
      src/views/eam/toolAccounts/index.vue
  42. 279
      src/views/eam/toolAccounts/toolAccounts.data.ts
  43. 285
      src/views/eam/toolMod/index.vue
  44. 320
      src/views/eam/toolMod/operateForm.vue
  45. 155
      src/views/eam/toolMod/toolMod.data.ts
  46. 22
      src/views/login/login.vue
  47. 10
      src/views/mes/abilityInfo/index.vue
  48. 8
      src/views/mes/itemRequestMain/index.vue
  49. 28
      src/views/mes/itemRequestMain/itemRequestMain.data.ts
  50. 1
      src/views/mes/opersteps/index.vue
  51. 2
      src/views/mes/orderDay/components/schedule.vue
  52. 9
      src/views/mes/ordermonthplan/index.vue
  53. 9
      src/views/mes/pattern/index.vue
  54. 9
      src/views/mes/patternType/index.vue
  55. 10
      src/views/mes/qualityclass/index.vue
  56. 9
      src/views/mes/qualitygroup/index.vue
  57. 2
      src/views/mes/reworkBatch/index.vue
  58. 2
      src/views/mes/reworkSingle/index.vue
  59. 7
      src/views/mes/workScheduling/index.vue
  60. 9
      src/views/mes/workstation/index.vue
  61. 35
      src/views/system/user/UserForm.vue
  62. 18
      src/views/wms/agvManage/interfaceInfo/interfaceInfo.data.ts
  63. 6
      src/views/wms/basicDataManage/itemManage/itemarea/index.vue
  64. 340
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue
  65. 539
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts
  66. 553
      src/views/wms/basicDataManage/itemManage/relegateRequest/relegateRequestMain.data.ts
  67. 2
      src/views/wms/basicDataManage/itemManage/relegateRequestDetail/index.vue
  68. 2
      src/views/wms/basicDataManage/itemManage/relegateRequestDetail/relegateRequest.data.ts
  69. 23
      src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts
  70. 4
      src/views/wms/basicDataManage/labelManage/callmaterials/index.vue
  71. 6
      src/views/wms/countManage/count/countPlanMain/index.vue
  72. 6
      src/views/wms/countManage/count/countRequestMain/index.vue
  73. 6
      src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue
  74. 6
      src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue
  75. 5
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue
  76. 6
      src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue
  77. 6
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue
  78. 23
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts
  79. 6
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue
  80. 6
      src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue
  81. 6
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue
  82. 6
      src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue
  83. 6
      src/views/wms/inventoryManage/containerinit/containerBindRecord/index.vue
  84. 6
      src/views/wms/inventoryManage/containerinit/containerRepair/index.vue
  85. 6
      src/views/wms/inventoryManage/containerinit/containerUnbindRecord/index.vue
  86. 6
      src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue
  87. 6
      src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue
  88. 6
      src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue
  89. 6
      src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue
  90. 6
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
  91. 6
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue
  92. 6
      src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue
  93. 6
      src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue
  94. 6
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue
  95. 6
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
  96. 1
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts
  97. 6
      src/views/wms/issueManage/issue/issueRequestMain/index.vue
  98. 6
      src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue
  99. 6
      src/views/wms/issueManage/pick/pickRequestMain/index.vue
  100. 6
      src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue

2
.env

@ -1,5 +1,5 @@
# 标题
VITE_APP_TITLE=富维海拉管理系统
VITE_APP_TITLE=富维海拉智慧工厂管理平台
# 项目本地运行端口号
VITE_PORT=80

4
README.md

@ -1,4 +1,4 @@
## dev发布2024-05-17-002
## dev发布2024-05-17-002-001
**xxxx.data.ts 文件配置说明**
**form表单查询弹窗配置**
form: {
@ -10,6 +10,8 @@ form: {
searchTitle: '生产线物料关系信息', // 查询弹窗标题
hiddenFilterButton:true,//是否隐藏筛选按钮
dialogWidth:'100px',//搜索出来弹窗的宽度
isConcatDetailSchemas:true, // 是否主子表合并
searchDetailSchemas: PurchasereceiptRecordDetail.allSchemas, // 查询弹窗所需子表类
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
searchCondition: [{

6
index.html

@ -3,16 +3,16 @@
<head>
<meta charset="UTF-8" />
<!-- <link rel="icon" href="/favicon.ico" /> -->
<!-- <link rel="icon" href="/src/assets/imgs/logo1.png" /> -->
<link rel="icon" href="/src/assets/imgs/logo1.png" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="keywords"
content="富维海拉管理系统 基于 vue3 + CompositionAPI + typescript + vite3 + element plus 的后台开源免费管理系统!"
content="富维海拉智慧工厂管理平台 基于 vue3 + CompositionAPI + typescript + vite3 + element plus 的后台开源免费管理系统!"
/>
<meta
name="description"
content="富维海拉管理系统 基于 vue3 + CompositionAPI + typescript + vite3 + element plus 的后台开源免费管理系统!"
content="富维海拉智慧工厂管理平台 基于 vue3 + CompositionAPI + typescript + vite3 + element plus 的后台开源免费管理系统!"
/>
<title>%VITE_APP_TITLE%</title>
</head>

2
src/api/eam/basicDocumentType/index.ts

@ -62,6 +62,6 @@ export const importTemplate = () => {
}
// 启用 / 禁用
export const updateEnableCode = async (data: EquipmentMainPartVO) => {
export const updateEnableCode = async (data: DocumentTypeVO) => {
return await request.post({ url: `/eam/document-type/ables` , data })
}

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

@ -63,6 +63,6 @@ export const importTemplate = () => {
}
// 启用 / 禁用
export const updateEnableCode = async (data: EquipmentMainPartVO) => {
export const updateEnableCode = async (data: BasicFaultCauseVO) => {
return await request.post({ url: `/eam/basic-fault-cause/ables` , data })
}

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

@ -62,6 +62,6 @@ export const importTemplate = () => {
}
// 启用 / 禁用
export const updateEnableCode = async (data: EquipmentMainPartVO) => {
export const updateEnableCode = async (data: BasicFaultTypeVO) => {
return await request.post({ url: `/eam/basic-fault-type/ables` , data })
}

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

@ -59,6 +59,6 @@ export const importTemplate = () => {
}
// 启用 / 禁用
export const updateEnableCode = async (data: EquipmentMainPartVO) => {
export const updateEnableCode = async (data: BasicInspectionOptionVO) => {
return await request.post({ url: `/eam/basic-inspection-option/ables` , data })
}

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

@ -59,6 +59,6 @@ export const importTemplate = () => {
}
// 启用 / 禁用
export const updateEnableCode = async (data: EquipmentMainPartVO) => {
export const updateEnableCode = async (data: BasicMaintenanceOptionVO) => {
return await request.post({ url: `/eam/basic-maintenance-option/ables` , data })
}

61
src/api/eam/basicSpotCheckSelectSet/index.ts

@ -0,0 +1,61 @@
import request from '@/config/axios'
export interface BasicSpotCheckSelectSetVO {
id: number
name: string
describing: string
itemCode: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询点检选择集维护列表
export const getBasicSpotCheckSelectSetPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/basic-spot-check-select-set/senior', data })
} else {
return await request.get({ url: `/eam/basic-spot-check-select-set/page`, params })
}
}
// 查询点检选择集维护详情
export const getBasicSpotCheckSelectSet = async (id: number) => {
return await request.get({ url: `/eam/basic-spot-check-select-set/get?id=` + id })
}
// 新增点检选择集维护
export const createBasicSpotCheckSelectSet = async (data: BasicSpotCheckSelectSetVO) => {
return await request.post({ url: `/eam/basic-spot-check-select-set/create`, data })
}
// 修改点检选择集维护
export const updateBasicSpotCheckSelectSet = async (data: BasicSpotCheckSelectSetVO) => {
return await request.put({ url: `/eam/basic-spot-check-select-set/update`, data })
}
// 删除点检选择集维护
export const deleteBasicSpotCheckSelectSet = async (id: number) => {
return await request.delete({ url: `/eam/basic-spot-check-select-set/delete?id=` + id })
}
// 导出点检选择集维护 Excel
export const exportBasicSpotCheckSelectSet = async (params) => {
return await request.download({ url: `/eam/basic-spot-check-select-set/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/basic-spot-check-select-set/get-import-template' })
}
// 启用 / 禁用
export const updateEnableCode = async (data: BasicSpotCheckSelectSetVO) => {
return await request.post({ url: `/eam/basic-spot-check-select-set/ables` , data })
}

60
src/api/eam/inspectionItemSelectSet/index.ts

@ -0,0 +1,60 @@
import request from '@/config/axios'
export interface InspectionItemSelectSetVO {
id: number
name: string
itemCode: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询巡检项选择集列表
export const getInspectionItemSelectSetPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/inspection-item-select-set/senior', data })
} else {
return await request.get({ url: `/eam/inspection-item-select-set/page`, params })
}
}
// 查询巡检项选择集详情
export const getInspectionItemSelectSet = async (id: number) => {
return await request.get({ url: `/eam/inspection-item-select-set/get?id=` + id })
}
// 新增巡检项选择集
export const createInspectionItemSelectSet = async (data: InspectionItemSelectSetVO) => {
return await request.post({ url: `/eam/inspection-item-select-set/create`, data })
}
// 修改巡检项选择集
export const updateInspectionItemSelectSet = async (data: InspectionItemSelectSetVO) => {
return await request.put({ url: `/eam/inspection-item-select-set/update`, data })
}
// 删除巡检项选择集
export const deleteInspectionItemSelectSet = async (id: number) => {
return await request.delete({ url: `/eam/inspection-item-select-set/delete?id=` + id })
}
// 导出巡检项选择集 Excel
export const exportInspectionItemSelectSet = async (params) => {
return await request.download({ url: `/eam/inspection-item-select-set/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/inspection-item-select-set/get-import-template' })
}
// 启用 / 禁用
export const updateEnableCode = async (data: InspectionItemSelectSetVO) => {
return await request.post({ url: `/eam/inspection-item-select-set/ables` , data })
}

61
src/api/eam/maintenanceItem/index.ts

@ -0,0 +1,61 @@
import request from '@/config/axios'
export interface MaintenanceItemVO {
id: number
content: string
serialNumber: number
equipmentParts: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询保养项维护列表
export const getMaintenanceItemPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/basic/maintenance-item/senior', data })
} else {
return await request.get({ url: `/eam/basic/maintenance-item/page`, params })
}
}
// 查询保养项维护详情
export const getMaintenanceItem = async (id: number) => {
return await request.get({ url: `/eam/basic/maintenance-item/get?id=` + id })
}
// 新增保养项维护
export const createMaintenanceItem = async (data: MaintenanceItemVO) => {
return await request.post({ url: `/eam/basic/maintenance-item/create`, data })
}
// 修改保养项维护
export const updateMaintenanceItem = async (data: MaintenanceItemVO) => {
return await request.put({ url: `/eam/basic/maintenance-item/update`, data })
}
// 删除保养项维护
export const deleteMaintenanceItem = async (id: number) => {
return await request.delete({ url: `/eam/basic/maintenance-item/delete?id=` + id })
}
// 导出保养项维护 Excel
export const exportMaintenanceItem = async (params) => {
if (params.isSearch) {
const data = { ...params }
return await request.downloadPost({ url: `/eam/basic/maintenance-item/export-excel-senior`, data })
} else {
return await request.download({ url: `/eam/basic/maintenance-item/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/basic/maintenance-item/get-import-template' })
}

79
src/api/eam/toolAccounts/index.ts

@ -0,0 +1,79 @@
import request from '@/config/axios'
export interface ToolAccountsVO {
id: number
code: string
name: string
specification: string
type: string
equity: string
electricMachine: string
isCustomerAptitude: boolean
customerId: string
storageLocation: string
useDept: string
principal: string
principalTelephone: string
status: string
startDate: Date
supplierCode: string
purchaseTime: Date
purchaseDept: string
purchaser: string
productionDate: Date
manufactureCode: string
equipmentLife: string
acceptanceDate: Date
purchasePrice: number
factoryAreaCode: string
workshopCode: string
workshopSectionCode: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询工装台账列表
export const getToolAccountsPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/tool-accounts/senior', data })
} else {
return await request.get({ url: `/eam/tool-accounts/page`, params })
}
}
// 查询工装台账详情
export const getToolAccounts = async (id: number) => {
return await request.get({ url: `/eam/tool-accounts/get?id=` + id })
}
// 新增工装台账
export const createToolAccounts = async (data: ToolAccountsVO) => {
return await request.post({ url: `/eam/tool-accounts/create`, data })
}
// 修改工装台账
export const updateToolAccounts = async (data: ToolAccountsVO) => {
return await request.put({ url: `/eam/tool-accounts/update`, data })
}
// 删除工装台账
export const deleteToolAccounts = async (id: number) => {
return await request.delete({ url: `/eam/tool-accounts/delete?id=` + id })
}
// 导出工装台账 Excel
export const exportToolAccounts = async (params) => {
return await request.download({ url: `/eam/tool-accounts/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/tool-accounts/get-import-template' })
}

61
src/api/eam/toolMod/index.ts

@ -0,0 +1,61 @@
import request from '@/config/axios'
export interface ToolModVO {
id: number
modCode: string
toolCode: string
type: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询工装物料关联列表
export const getToolModPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/basic/tool-mod/senior', data })
} else {
return await request.get({ url: `/eam/basic/tool-mod/page`, params })
}
}
// 查询工装物料关联详情
export const getToolMod = async (id: number) => {
return await request.get({ url: `/eam/basic/tool-mod/get?id=` + id })
}
// 新增工装物料关联
export const createToolMod = async (data: ToolModVO) => {
return await request.post({ url: `/eam/basic/tool-mod/create`, data })
}
// 修改工装物料关联
export const updateToolMod = async (data: ToolModVO) => {
return await request.put({ url: `/eam/basic/tool-mod/update`, data })
}
// 删除工装物料关联
export const deleteToolMod = async (id: number) => {
return await request.delete({ url: `/eam/basic/tool-mod/delete?id=` + id })
}
// 导出工装物料关联 Excel
export const exportToolMod = async (params) => {
return await request.download({ url: `/eam/basic/tool-mod/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/basic/tool-mod/get-import-template' })
}
// 新增工装物料关联
export const createToolModBatch = async (data: ToolModVO) => {
return await request.post({ url: `/eam/basic/tool-mod/createBatch`, data })
}

12
src/api/wms/purchasereceiptJobDetail/index.ts

@ -55,6 +55,18 @@ export const getPurchasereceiptJobDetailPageSapre = async (params) => {
}
}
// 查询采购收货任务子列表
export const getPurchasereceiptJobDetailPageSCP = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchasereceipt-job-detail/seniorSCP', data })
} else {
return await request.get({ url: `/wms/purchasereceipt-job-detail/pageSCP`, params })
}
}
// 查询采购收货任务子详情
export const getPurchasereceiptJobDetail = async (id: number) => {
return await request.get({ url: `/wms/purchasereceipt-job-detail/get?id=` + id })

28
src/api/wms/relegateRequest/index.ts → src/api/wms/relegateRequestDetail/index.ts

@ -1,6 +1,6 @@
import request from '@/config/axios'
export interface RelegateRequestVO {
export interface RelegateRequestDetailVO {
id: number
itemCode: string
downItemCode: string
@ -32,39 +32,39 @@ export interface RelegateRequestVO {
}
// 查询物料降级信息列表
export const getRelegateRequestPage = async (params) => {
export const getRelegateRequestDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/relegate-request/senior', data })
return await request.post({ url: '/wms/relegate-request-detail/senior', data })
} else {
return await request.get({ url: `/wms/relegate-request/page`, params })
return await request.get({ url: `/wms/relegate-request-detail/page`, params })
}
}
// 查询物料降级信息详情
export const getRelegateRequest = async (id: number) => {
return await request.get({ url: `/wms/relegate-request/get?id=` + id })
export const getRelegateRequestDetail = async (id: number) => {
return await request.get({ url: `/wms/relegate-request-detail/get?id=` + id })
}
// 新增物料降级信息
export const createRelegateRequest = async (data: RelegateRequestVO) => {
return await request.post({ url: `/wms/relegate-request/create`, data })
export const createRelegateRequestDetail = async (data: RelegateRequestDetailVO) => {
return await request.post({ url: `/wms/relegate-request-detail/create`, data })
}
// 修改物料降级信息
export const updateRelegateRequest = async (data: RelegateRequestVO) => {
return await request.put({ url: `/wms/relegate-request/update`, data })
export const updateRelegateRequestDetail = async (data: RelegateRequestDetailVO) => {
return await request.put({ url: `/wms/relegate-request-detail/update`, data })
}
// 删除物料降级信息
export const deleteRelegateRequest = async (id: number) => {
return await request.delete({ url: `/wms/relegate-request/delete?id=` + id })
export const deleteRelegateRequestDetail = async (id: number) => {
return await request.delete({ url: `/wms/relegate-request-detail/delete?id=` + id })
}
// 导出物料降级信息 Excel
export const exportRelegateRequest = async (params) => {
return await request.download({ url: `/wms/relegate-request/export-excel`, params })
export const exportRelegateRequestDetail = async (params) => {
return await request.download({ url: `/wms/relegate-request-detail/export-excel`, params })
}
// 下载用户导入模板

68
src/api/wms/relegateRequestMain/index.ts

@ -0,0 +1,68 @@
import request from '@/config/axios'
export interface RelegateRequestMainVO {
id: number
fromWarehouseCode: string
number: string
businessType: string
remark: string
extraProperties: string
siteId: string
requestTime: Date
dueTime: Date
departmentCode: string
status: string
autoCommit: string
autoAgree: string
autoExecute: string
directCreateRecord: string
concurrencyStamp: number
ruleUserId: number
fromAreaTypes: string
fromAreaCodes: string
serialNumber: string
inInventoryStatuses: string
outInventoryStatuses: string
reason: string
}
// 查询物料降级申请主列表
export const getRelegateRequestMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/relegate-request-main/senior', data })
} else {
return await request.get({ url: `/wms/relegate-request-main/page`, params })
}
}
// 查询物料降级申请主详情
export const getRelegateRequestMain = async (id: number) => {
return await request.get({ url: `/wms/relegate-request-main/get?id=` + id })
}
// 新增物料降级申请主
export const createRelegateRequestMain = async (data: RelegateRequestMainVO) => {
return await request.post({ url: `/wms/relegate-request-main/create`, data })
}
// 修改物料降级申请主
export const updateRelegateRequestMain = async (data: RelegateRequestMainVO) => {
return await request.put({ url: `/wms/relegate-request-main/update`, data })
}
// 删除物料降级申请主
export const deleteRelegateRequestMain = async (id: number) => {
return await request.delete({ url: `/wms/relegate-request-main/delete?id=` + id })
}
// 导出物料降级申请主 Excel
export const exportRelegateRequestMain = async (params) => {
return await request.download({ url: `/wms/relegate-request-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/relegate-request-main/get-import-template' })
}

BIN
src/assets/imgs/login-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 KiB

BIN
src/assets/imgs/login-bg1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

BIN
src/assets/imgs/logo1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 52 KiB

2
src/components/Annex/src/Annex.vue

@ -8,7 +8,7 @@
</div>
<div class="list">
<div class="item flex items-start" v-for="(item, index) in annexData.annexList" :key="index">
<Icon icon="fa:file-text-o" color="#409eff" size="30" class="mt-4px" />
<Icon icon="fa:file-text-o" color="#409eff" :size="30" class="mt-4px" />
<div class="item-center" >
<div class="item-title" @click="downFile(item)">{{ item.name }}</div>
<div class="info mt-6px">

11
src/components/BasicForm/src/BasicForm.vue

@ -79,9 +79,11 @@
:tableFormRules="tableFormRules"
:isShowButton="isShowButton"
:isShowReduceButton="isShowReduceButton"
:isShowReduceButtonSelection="isShowReduceButtonSelection"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@tableSelectionChange="tableSelectionChange"
@tableSelectionDelete="tableSelectionDelete"
@extendedButtonsClick="extendedButtonsClick"
@formSelectChange="formSelectChange"
@formSelectvVisibleChange="formSelectvVisibleChange"
@ -139,6 +141,11 @@ const props = defineProps({
type: Boolean,
default: true
},
// --
isShowReduceButtonSelection:{
type: Boolean,
default: false,
},
// tableForm
isShowReduceButton: {
type: Boolean,
@ -612,6 +619,7 @@ const resetForm = () => {
const emit = defineEmits([
'success',
'tableSelectionChange',
'tableSelectionDelete',
'tableFormSelectOnBlur',
'extendedButtonsClick',
'formSelectChange',
@ -653,6 +661,9 @@ const formSelectvVisibleChange = (field, val, row) => {
const tableSelectionChange = (val) => {
emit('tableSelectionChange', val)
}
const tableSelectionDelete = (val) => {
emit('tableSelectionDelete', val)
}
// tableform select bulr
const tableFormSelectOnBlur = (field, val, row, index) => {
emit('tableFormSelectOnBlur', field, val, row, index)

43
src/components/TableForm/src/TableForm.vue

@ -12,11 +12,13 @@
@sort-change="tableSortChange"
@row-click="handleTableSelect"
>
<!-- 删除按钮多选 -->
<el-table-column fixed="left" type="selection" width="50" v-if="isShowReduceButtonSelection" />
<!-- 删除按钮 -->
<el-table-column
fixed="left"
:width="50"
v-if="isShowReduceButton"
v-else-if="isShowReduceButton"
v-slot="{ row, $index }"
>
<Icon icon="ep:remove" color="#757575" :size="26" style="cursor: pointer;margin-top: -16px;" @click="handleDeleteTable (row, $index)" />
@ -299,18 +301,34 @@
<!-- </el-form-item> -->
</el-form>
</el-table-column>
<!-- 删除按钮 -->
<el-table-column
fixed="right"
:label="t('ts.操作')"
align="center"
:width="60"
v-if="isShowReduceButtonSelection"
v-slot="{ row, $index }"
>
<ButtonBase :Butttondata="[defaultButtons.mainListDeleteBtn(),]" @button-base-click="handleDeleteTable (row, $index)" />
</el-table-column>
</el-table>
<div class="button flex" v-if="isShowButton">
<div class="p-12px" @click="handleAddTable">
<div class="button flex" v-if="isShowButton||isShowReduceButtonSelection">
<div class="p-12px" v-if="isShowButton" @click="handleAddTable">
<Icon icon="ep:circle-plus" color="#409eff" size="26" style="cursor: pointer;" />
<div>{{t('ts.添加明细')}}</div>
</div>
<div class="p-12px" v-if="isShowReduceButtonSelection" @click="handleSelectionDelete">
<Icon icon="ep:delete" color="#409eff" size="26" style="cursor: pointer;" />
<div>{{t('ts.批量删除')}}</div>
</div>
</div>
</div>
</template>
<script lang="ts" setup>
const { t } = useI18n() //
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict'
const props = defineProps({
//
@ -328,6 +346,11 @@ const props = defineProps({
type: Boolean,
default: false,
},
// --
isShowReduceButtonSelection:{
type: Boolean,
default: false,
},
//
isShowReduceButton:{
type: Boolean,
@ -379,6 +402,7 @@ const props = defineProps({
//
const emit = defineEmits([
'tableSelectionChange',
'tableSelectionDelete',
'extendedButtonsClick',
'formSelectChange',
'tableSortChange',
@ -413,9 +437,20 @@ const inputNumberChange = (field, index, row, e) => {
emit('inputNumberChange', field, index, row, e)
}
//
const deleteTableData = ref([])
// selection
const tableSelectionChange = (val) => {
emit('tableSelectionChange', val)
if(props.isShowReduceButtonSelection){
//
deleteTableData.value = val
}else{
emit('tableSelectionChange', val)
}
}
const handleSelectionDelete = ()=>{
emit('tableSelectionDelete', deleteTableData.value)
}
//
const tableSortChange = (column, prop, order) => {

2
src/config/axios/config.ts

@ -16,7 +16,7 @@ const config: {
/**
*
*/
request_timeout: 30000,
request_timeout: 3000000,
/**
*

3
src/locales/en-US.ts

@ -1083,7 +1083,8 @@ export default {
:'courier number',
:'Invoicing calendar management',
:'description',
:'Batch delete'
:'Batch delete',
:'Check the quality inspection report'

3
src/locales/zh-CN.ts

@ -1083,7 +1083,8 @@ export default {
:'快递单号',
:'开票日历管理',
:'描述',
:'批量删除'
:'批量删除',
:'查看质检报告'

2
src/utils/dict.ts

@ -322,7 +322,7 @@ export enum DICT_TYPE {
DISMANTLING_BILL_TYPE = 'dismantling_bill_type',//工单类型
DISMANTLING_MATERIAL_STATUS = 'dismantling_material_status',//报废拆解物料状态
DISMANTLING_MATERIAL_HANDLE_STATUS = 'dismantling_material_handle_status',//报废拆解处理状态
MES_REQUEST_TYPE = 'mes_request_type',//生产物料申请类型
SUPPLIERINVOICE_REQUEST_STATUS = 'supplierinvoice_request_status', //发票申请状态
SUPPLIERINVOICE_STATUS = 'supplierinvoice_status', //待开票审核状态

147
src/views/eam/basicSpotCheckSelectSet/basicSpotCheckSelectSet.data.ts

@ -0,0 +1,147 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const BasicSpotCheckSelectSetRules = reactive({
name: [required],
describing: [required],
concurrencyStamp: [required],
})
export const BasicSpotCheckSelectSet = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '选择集名称',
field: 'name',
sort: 'custom',
isSearch: true,
},
{
label: '描述',
field: 'describing',
sort: 'custom',
isSearch: true,
},
{
label: '项编号',
field: 'itemCode',
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,
},
{
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',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: true,
isTableForm: false,
isForm: false,
},
{
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'
}
}
]))

287
src/views/eam/basicSpotCheckSelectSet/index.vue

@ -0,0 +1,287 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="BasicSpotCheckSelectSet.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="BasicSpotCheckSelectSet.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 #name="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.name)">
<span>{{ row.name }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<ItemForm ref="basicFormRef" @success="getData"/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="BasicSpotCheckSelectSet.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/basic-spot-check-select-set/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { BasicSpotCheckSelectSet,BasicSpotCheckSelectSetRules } from './basicSpotCheckSelectSet.data'
import * as BasicSpotCheckSelectSetApi from '@/api/eam/basicSpotCheckSelectSet'
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'
import ItemForm from "@/views/eam/basicSpotCheckSelectSet/itemSelectSetForm.vue";
defineOptions({ name: 'BasicSpotCheckSelectSet' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(BasicSpotCheckSelectSet.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: BasicSpotCheckSelectSetApi.getBasicSpotCheckSelectSetPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:basicSpotCheckSelectSet:create'}), //
//defaultButtons.defaultImportBtn({hasPermi:'eam:basicSpotCheckSelectSet:import'}), //
//defaultButtons.defaultExportBtn({hasPermi:'eam:basicSpotCheckSelectSet: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:basicSpotCheckSelectSet:update'}), //
//defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentMainPart:delete'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:basicSpotCheckSelectSet:update'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:basicSpotCheckSelectSet: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 =BasicSpotCheckSelectSet.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 BasicSpotCheckSelectSetApi.createBasicSpotCheckSelectSet(data)
message.success(t('common.createSuccess'))
} else {
await BasicSpotCheckSelectSetApi.updateBasicSpotCheckSelectSet(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
//
const getData = async() => {
getList();
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicBasicSpotCheckSelectSet')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await BasicSpotCheckSelectSetApi.deleteBasicSpotCheckSelectSet(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 BasicSpotCheckSelectSetApi.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 BasicSpotCheckSelectSetApi.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 BasicSpotCheckSelectSetApi.exportBasicSpotCheckSelectSet(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()
})
</script>

287
src/views/eam/basicSpotCheckSelectSet/itemSelectSetForm.vue

@ -0,0 +1,287 @@
<template>
<Dialog v-model="dialogVisible" :title="dialogTitle">
<el-form
ref="basicFormRef"
v-loading="formLoading"
:model="formData"
:rules="formRules"
label-width="100px"
>
<el-row>
<el-col :span="12">
<el-form-item label="选择集名称" prop="name">
<el-input v-model="formData.name" placeholder="选择集名称" :disabled="isDisabled"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="describing">
<el-input v-model="formData.describing" placeholder="描述" :disabled="isDisabled"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" placeholder="请输入备注名称" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="点检项" prop="items">
<div class="tag-container flex gap-2">
<el-tag v-for="ent in tags" :key="ent.content" closable :disable-transitions="false" @close="handleClose(ent.id)">
{{ ent.content}}
</el-tag>
<el-input v-if="inputVisible" ref="InputRef" v-model="inputValue" class="w-20" size="small"/>
<el-button v-else class="button-new-tag" size="small" @click="addItem">
添加点检项 +
</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<el-button :disabled="formLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
<!--添加点检项弹窗-->
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" />
</template>
<script lang="ts" setup>
import * as SelectSetApi from '@/api/eam/basicSpotCheckSelectSet'
import request from "@/config/axios";
import { SearchTable } from '@/components/SearchTable'
import { InspectionItem} from "@/views/eam/inspectionItem/inspectionItem.data";
import * as spotCheckItemApi from "@/api/eam/spotCheckItem";
import {ElInput} from "element-plus";
defineOptions({ name: 'TeamForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const tags=ref([])
const inputValue = ref('')
const inputVisible = ref(false)
const isDisabled = ref(false)
const InputRef = ref<InstanceType<typeof ElInput>>()
const itemData = ref({
id: '',
content: ''
})
const formData = ref({
id: '',
name: '',
describing: '',
itemCode: '',
available: 'TRUE',
remark: '',
createTime: ''
})
const formRules = reactive({
name: [
{ required: true, message: '选择集名称不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
})
const basicFormRef = ref() // Ref
/** 删除点检项 */
const handleClose = (id: string) => {
const index = tags.value.findIndex(tag => tag.id === id);
if (index !== -1) {
tags.value.splice(index, 1);
}
}
/** 弹窗相关参数 */
const searchTableRef = ref();
const _searchTableTitle = ref();
const _searchTableAllSchemas = ref();
const _searchTablePage = ref();
const _formField = ref();
const _searchField = ref();
const _multiple = ref();
const _type = ref();
const _row = ref();
const _searchCondition = ref({})
const addItem = () =>{
addItemCommon(true,'dianJianItem')
}
/** 选择点检项弹窗 */
const addItemCommon = (multiple,field) => {
_searchCondition.value = {}
const filters: any[] = []
filters.push({
action: "==",
column: 'available',
value: 'TRUE'
})
//
_searchCondition.value.isSearch = true
_searchCondition.value.filters = filters
_searchTableTitle.value = '选择点检项'
_multiple.value = multiple
_formField.value = field
_searchField.value = field
_searchTablePage.value = spotCheckItemApi.getSpotCheckItemPage
_searchTableAllSchemas.value = InspectionItem.allSchemas
openCommon()
}
/** 弹窗选择之后 回调函数 添加选择集 */
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick?.(() => {
if (formField === 'dianJianItem') {
val.forEach(item => {
const isExist = tags.value.some(tag => tag.content === item.content);
if (!isExist){
const newItem = {};
newItem['content'] = item.content;
newItem['id'] = item.id;
tags.value.push(newItem);
}
});
}
})
}
/*打开弹窗*/
const openCommon = () => {
searchTableRef.value.open(
_searchTableTitle.value,
_searchTableAllSchemas.value,
_searchTablePage.value,
_formField.value,
_searchField.value,
_multiple.value,
_type.value,
_row.value,
_searchCondition.value
)
}
/** 初始化弹窗 */
const open = async (type: string, row?: object) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
//
if (row) {
tags.value=[];
isDisabled.value = true;
formLoading.value = true
formData.value = row;
let item = (row.itemCode).split(",")
try {
for (var i = 0; i < item.length; i++) {
itemData.value = await request.get({ url: `/eam/basic/inspection-item/get?id=` + item[i] });
tags.value.push(itemData.value);
}
} finally {
formLoading.value = false
}
}
//
else {
resetForm()
isDisabled.value = false;
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
if (!basicFormRef) return
const valid = await basicFormRef.value.validate()
if (!valid) return
if (tags.value.length > 10 ){
message.warning('点检项最多10个');
return
}
let result = '';
for (var i = 0; i < tags.value.length; i++) {
result += tags.value[i].id + ',';
}
if(result.endsWith(',')){
result = result.substring(0,result.length -1)
}
formData.value.itemCode = result
//
formLoading.value = true
//formData.value.members = JSON.stringify(tags.value)
try {
const data = formData.value as unknown as SelectSetApi.BasicSpotCheckSelectSetVO
if (formType.value === 'create') {
await SelectSetApi.createBasicSpotCheckSelectSet(data)
message.success(t('common.createSuccess'))
} else {
await SelectSetApi.updateBasicSpotCheckSelectSet(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: '',
name: '',
describing: '',
itemCode: '',
available: 'TRUE',
remark: '',
createTime: ''
}
tags.value=[];
basicFormRef.value?.resetFields()
}
</script>
<style scoped>
.tag-container {
margin-top: 10px; /* 可根据需要调整标签容器与表单项之间的间距 */
border: 1px solid #ccc; /* 添加边框样式 */
padding: 10px; /* 可根据需要调整容器内边距 */
width: 950px; /* 设置固定宽度为 950px */
overflow-y: auto; /* 当内容溢出容器高度时显示滚动条 */
word-wrap: break-word; /* 使用 word-wrap 属性实现超出范围换行 */
overflow-wrap: break-word; /* 兼容性更好的写法 */
flex-wrap: wrap;
}
.input-with-button {
display: flex;
align-items: center;
width: 100%;
}
.input-with-button > .el-input {
flex: 1;
/*margin-right: 10px;*/
}
</style>

1
src/views/eam/equipmentManufacturer/index.vue

@ -256,7 +256,6 @@ const handleEnable = (row,enable) =>{
row.available = enable
EquipmentManufacturerApi.updateEquipmentManufacturer(row).then(res => {
message.success(t('common.updateSuccess'))
getList()
})
})

1
src/views/eam/equipmentSupplier/index.vue

@ -256,7 +256,6 @@ const handleEnable = (row,enable) =>{
row.available = enable
EquipmentSupplierApi.updateEquipmentSupplier(row).then(res => {
message.success(t('common.updateSuccess'))
getList()
})
})
}

1
src/views/eam/inspectionItem/index.vue

@ -257,7 +257,6 @@ const handleEnable = (row,enable) =>{
row.available = enable
InspectionItemApi.updateInspectionItem(row).then(res => {
message.success(t('common.updateSuccess'))
getList()
})
})
}

34
src/views/eam/inspectionItem/inspectionItem.data.ts

@ -17,6 +17,16 @@ export const InspectionItemRules = reactive({
export const InspectionItem = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '序号',
field: 'serialNumber',
sort: 'custom',
isSearch: true,
fixed: 'left',
form: {
component:'InputNumber'
},
},
{
label: '巡检内容',
field: 'content',
@ -41,16 +51,6 @@ export const InspectionItem = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true
},
{
label: '序号',
field: 'serialNumber',
sort: 'custom',
isSearch: true,
fixed: 'left',
form: {
component:'InputNumber'
},
},
{
label: '来源于类型配置',
field: 'type',
@ -84,13 +84,13 @@ export const InspectionItem = useCrudSchemas(reactive<CrudSchema[]>([
label: '是否启用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: false,
isTableForm: false,
isForm: false,
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: false,
isTableForm: false,
isForm: false,
},
{
label: '备注',

287
src/views/eam/inspectionItemSelectSet/index.vue

@ -0,0 +1,287 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="InspectionItemSelectSet.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="InspectionItemSelectSet.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 #name="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.name)">
<span>{{ row.name }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<ItemForm ref="basicFormRef" @success="getData"/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="InspectionItemSelectSet.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/inspection-item-select-set/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { InspectionItemSelectSet,InspectionItemSelectSetRules } from './inspectionItemSelectSet.data'
import * as InspectionItemSelectSetApi from '@/api/eam/inspectionItemSelectSet'
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'
import ItemForm from "@/views/eam/inspectionItemSelectSet/itemSelectSetForm.vue";
defineOptions({ name: 'InspectionItemSelectSet' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InspectionItemSelectSet.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: InspectionItemSelectSetApi.getInspectionItemSelectSetPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:inspectionItemSelectSet:create'}), //
//defaultButtons.defaultImportBtn({hasPermi:'eam:inspectionItemSelectSet:import'}), //
//defaultButtons.defaultExportBtn({hasPermi:'eam:inspectionItemSelectSet: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:inspectionItemSelectSet:update'}), //
//defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentMainPart:delete'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:inspectionItemSelectSet:update'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:inspectionItemSelectSet: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 =InspectionItemSelectSet.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 InspectionItemSelectSetApi.createInspectionItemSelectSet(data)
message.success(t('common.createSuccess'))
} else {
await InspectionItemSelectSetApi.updateInspectionItemSelectSet(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
//
const getData = async() => {
getList();
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionItemSelectSet')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await InspectionItemSelectSetApi.deleteInspectionItemSelectSet(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 InspectionItemSelectSetApi.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 InspectionItemSelectSetApi.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 InspectionItemSelectSetApi.exportInspectionItemSelectSet(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()
})
</script>

141
src/views/eam/inspectionItemSelectSet/inspectionItemSelectSet.data.ts

@ -0,0 +1,141 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const InspectionItemSelectSetRules = reactive({
name: [required],
itemCode: [required],
concurrencyStamp: [required],
})
export const InspectionItemSelectSet = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '选择集名称',
field: 'name',
sort: 'custom',
isSearch: true,
},
{
label: '项编号',
field: 'itemCode',
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,
},
{
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',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: true,
isTableForm: false,
isForm: false,
},
{
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'
}
}
]))

280
src/views/eam/inspectionItemSelectSet/itemSelectSetForm.vue

@ -0,0 +1,280 @@
<template>
<Dialog v-model="dialogVisible" :title="dialogTitle">
<el-form
ref="basicFormRef"
v-loading="formLoading"
:model="formData"
:rules="formRules"
label-width="100px"
>
<el-row>
<el-col :span="12">
<el-form-item label="选择集名称" prop="name">
<el-input v-model="formData.name" placeholder="选择集名称" :disabled="isDisabled"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" placeholder="请输入备注名称" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="巡检项" prop="items">
<div class="tag-container flex gap-2">
<el-tag v-for="ent in tags" :key="ent.content" closable :disable-transitions="false" @close="handleClose(ent.id)">
{{ ent.content}}
</el-tag>
<el-input v-if="inputVisible" ref="InputRef" v-model="inputValue" class="w-20" size="small"/>
<el-button v-else class="button-new-tag" size="small" @click="addItem">
添加巡检项 +
</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<el-button :disabled="formLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
<!--添加巡检项弹窗-->
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" />
</template>
<script lang="ts" setup>
import * as SelectSetApi from '@/api/eam/inspectionItemSelectSet'
import request from "@/config/axios";
import { SearchTable } from '@/components/SearchTable'
import { InspectionItem} from "@/views/eam/inspectionItem/inspectionItem.data";
import * as inspectionItemApi from "@/api/eam/inspectionItem";
import {ElInput} from "element-plus";
defineOptions({ name: 'TeamForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const tags=ref([])
const inputValue = ref('')
const inputVisible = ref(false)
const isDisabled = ref(false)
const InputRef = ref<InstanceType<typeof ElInput>>()
const itemData = ref({
id: '',
content: ''
})
const formData = ref({
id: '',
name: '',
itemCode: '',
available: 'TRUE',
remark: '',
createTime: ''
})
const formRules = reactive({
name: [
{ required: true, message: '选择集名称不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
})
const basicFormRef = ref() // Ref
/** 删除巡检项 */
const handleClose = (id: string) => {
const index = tags.value.findIndex(tag => tag.id === id);
if (index !== -1) {
tags.value.splice(index, 1);
}
}
/** 弹窗相关参数 */
const searchTableRef = ref();
const _searchTableTitle = ref();
const _searchTableAllSchemas = ref();
const _searchTablePage = ref();
const _formField = ref();
const _searchField = ref();
const _multiple = ref();
const _type = ref();
const _row = ref();
const _searchCondition = ref({})
const addItem = () =>{
addItemCommon(true,'xunJianItem')
}
/** 选择巡检项弹窗 */
const addItemCommon = (multiple,field) => {
_searchCondition.value = {}
const filters: any[] = []
filters.push({
action: "==",
column: 'available',
value: 'TRUE'
})
//
_searchCondition.value.isSearch = true
_searchCondition.value.filters = filters
_searchTableTitle.value = '选择巡检项'
_multiple.value = multiple
_formField.value = field
_searchField.value = field
_searchTablePage.value = inspectionItemApi.getInspectionItemPage
_searchTableAllSchemas.value = InspectionItem.allSchemas
openCommon()
}
/** 弹窗选择之后 回调函数 添加选择集 */
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick?.(() => {
if (formField === 'xunJianItem') {
val.forEach(item => {
const isExist = tags.value.some(tag => tag.content === item.content);
if (!isExist){
const newItem = {};
newItem['content'] = item.content;
newItem['id'] = item.id;
tags.value.push(newItem);
}
});
}
})
}
/*打开弹窗*/
const openCommon = () => {
searchTableRef.value.open(
_searchTableTitle.value,
_searchTableAllSchemas.value,
_searchTablePage.value,
_formField.value,
_searchField.value,
_multiple.value,
_type.value,
_row.value,
_searchCondition.value
)
}
/** 初始化弹窗 */
const open = async (type: string, row?: object) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
//
if (row) {
tags.value=[];
isDisabled.value = true;
formLoading.value = true
formData.value = row;
let item = (row.itemCode).split(",")
try {
for (var i = 0; i < item.length; i++) {
itemData.value = await request.get({ url: `/eam/basic/inspection-item/get?id=` + item[i] });
tags.value.push(itemData.value);
}
} finally {
formLoading.value = false
}
}
//
else {
resetForm()
isDisabled.value = false;
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
if (!basicFormRef) return
const valid = await basicFormRef.value.validate()
if (!valid) return
if (tags.value.length > 10 ){
message.warning('巡检项最多10个');
return
}
let result = '';
for (var i = 0; i < tags.value.length; i++) {
result += tags.value[i].id + ',';
}
if(result.endsWith(',')){
result = result.substring(0,result.length -1)
}
formData.value.itemCode = result
//
formLoading.value = true
//formData.value.members = JSON.stringify(tags.value)
try {
const data = formData.value as unknown as SelectSetApi.InspectionItemSelectSetVO
if (formType.value === 'create') {
await SelectSetApi.createInspectionItemSelectSet(data)
message.success(t('common.createSuccess'))
} else {
await SelectSetApi.updateInspectionItemSelectSet(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: '',
name: '',
itemCode: '',
available: 'TRUE',
remark: '',
createTime: ''
}
tags.value=[];
basicFormRef.value?.resetFields()
}
</script>
<style scoped>
.tag-container {
margin-top: 10px; /* 可根据需要调整标签容器与表单项之间的间距 */
border: 1px solid #ccc; /* 添加边框样式 */
padding: 10px; /* 可根据需要调整容器内边距 */
width: 950px; /* 设置固定宽度为 950px */
overflow-y: auto; /* 当内容溢出容器高度时显示滚动条 */
word-wrap: break-word; /* 使用 word-wrap 属性实现超出范围换行 */
overflow-wrap: break-word; /* 兼容性更好的写法 */
flex-wrap: wrap;
}
.input-with-button {
display: flex;
align-items: center;
width: 100%;
}
.input-with-button > .el-input {
flex: 1;
/*margin-right: 10px;*/
}
</style>

268
src/views/eam/maintenanceItem/index.vue

@ -0,0 +1,268 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="MaintenanceItem.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="MaintenanceItem.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="MaintenanceItemRules"
:formAllSchemas="MaintenanceItem.allSchemas"
:apiUpdate="MaintenanceItemApi.updateMaintenanceItem"
:apiCreate="MaintenanceItemApi.createMaintenanceItem"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="MaintenanceItem.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/basic/maintenance-item/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { MaintenanceItem,MaintenanceItemRules } from './maintenanceItem.data'
import * as MaintenanceItemApi from '@/api/eam/maintenanceItem'
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: 'MaintenanceItem' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(MaintenanceItem.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: MaintenanceItemApi.getMaintenanceItemPage //
})
const judgeStatus = (row) =>{
if(row.available === 'TRUE'){
return true
}else{
return false
}
}
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:maintenance-item:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'eam:maintenance-item:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:maintenance-item: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 = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi:'eam:maintenance-item:update'}), //
defaultButtons.mainListEnableBtn({hasPermi:'eam:maintenance-item:enable',hide: judgeStatus(row)}), //
defaultButtons.mainListDisableBtn({hasPermi:'eam:maintenance-item:disable',hide: !judgeStatus(row)}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:maintenance-item:delete'}), //
]}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'enable') { //
handleEnable(row,'TRUE')
}else if (val == 'disable') {//
handleEnable(row,'FALSE')
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =MaintenanceItem.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 MaintenanceItemApi.createMaintenanceItem(data)
message.success(t('common.createSuccess'))
} else {
await MaintenanceItemApi.updateMaintenanceItem(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, 'basicMaintenanceItem')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await MaintenanceItemApi.deleteMaintenanceItem(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 MaintenanceItemApi.exportMaintenanceItem(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() //
}
const handleEnable = (row,enable) =>{
message.confirm(t('您确定'+(enable=='TRUE'?'启用':'禁用')+'该项吗, 是否继续?')).then(() => {
row.available = enable
MaintenanceItemApi.updateMaintenanceItem(row).then(res => {
message.success(t('common.updateSuccess'))
})
})
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await MaintenanceItemApi.importTemplate()
})
</script>

106
src/views/eam/maintenanceItem/maintenanceItem.data.ts

@ -0,0 +1,106 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { handleTreeToComponentOptions } from '@/utils/tree'
import * as DeptApi from '@/api/system/dept'
const deptList = ref<Tree[]>([]) // 树形结构
// 加载部门树(默认格式)
deptList.value = handleTreeToComponentOptions(await DeptApi.getSimpleDeptList())
// 表单校验
export const MaintenanceItemRules = reactive({
content: [required],
serialNumber: [required],
concurrencyStamp: [required]
})
export const MaintenanceItem = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '序号',
field: 'serialNumber',
sort: 'custom',
isSearch: true,
fixed: 'left',
form: {
component:'InputNumber'
},
},
{
label: '保养内容',
field: 'content',
sort: 'custom',
isSearch: true,
form: {
component: 'Input',
componentProps: {
type: 'textarea',
rows: 4
},
colProps: {
span: 24
}
}
},
{
label: '保养部位',
field: 'equipmentParts',
sort: 'custom',
isSearch: true
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isTable: false,
isDetail: false,
isSearch: false,
isTableForm: false,
form: {
component: 'TreeSelect',
componentProps: { // 假设deptList是部门数据列表
data: deptList,
placeholder: "请选择部门",
filterable: true,
// multiple: true,
}
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
form: {
component: 'Input',
componentProps: {
type: 'textarea',
rows: 4
},
colProps: {
span: 24
}
}
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: false,
isTableForm: false,
isForm: false,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

1
src/views/eam/spotCheckItem/index.vue

@ -256,7 +256,6 @@ const handleEnable = (row,enable) =>{
row.available = enable
SpotCheckItemApi.updateSpotCheckItem(row).then(res => {
message.success(t('common.updateSuccess'))
getList()
})
})
}

21
src/views/eam/spotCheckItem/spotCheckItem.data.ts

@ -16,7 +16,16 @@ export const SpotCheckItemRules = reactive({
})
export const SpotCheckItem = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '序号',
field: 'serialNumber',
sort: 'custom',
isSearch: true,
fixed: 'left',
form: {
component:'InputNumber'
},
},
{
label: '点检内容',
field: 'content',
@ -35,16 +44,6 @@ export const SpotCheckItem = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true
},
{
label: '序号',
field: 'serialNumber',
sort: 'custom',
isSearch: true,
fixed: 'left',
form: {
component:'InputNumber'
},
},
{
label: '来源于类型配置',
field: 'type',

244
src/views/eam/toolAccounts/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ToolAccounts.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ToolAccounts.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" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="ToolAccountsRules"
:formAllSchemas="ToolAccounts.allSchemas"
:apiUpdate="ToolAccountsApi.updateToolAccounts"
:apiCreate="ToolAccountsApi.createToolAccounts"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ToolAccounts.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/tool-accounts/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ToolAccounts,ToolAccountsRules } from './toolAccounts.data'
import * as ToolAccountsApi from '@/api/eam/toolAccounts'
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: 'ToolAccounts' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ToolAccounts.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: ToolAccountsApi.getToolAccountsPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:tool-accounts:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'eam:tool-accounts:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:tool-accounts: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:'eam:tool-accounts:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:tool-accounts: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 =ToolAccounts.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 ToolAccountsApi.createToolAccounts(data)
message.success(t('common.createSuccess'))
} else {
await ToolAccountsApi.updateToolAccounts(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, 'basicToolAccounts')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ToolAccountsApi.deleteToolAccounts(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 ToolAccountsApi.exportToolAccounts(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 ToolAccountsApi.importTemplate()
})
</script>

279
src/views/eam/toolAccounts/toolAccounts.data.ts

@ -0,0 +1,279 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const ToolAccountsRules = reactive({
code: [required],
name: [required],
concurrencyStamp: [required]
})
export const ToolAccounts = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '工装编号',
field: 'code',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true
},
{
label: '型号',
field: 'specification',
sort: 'custom',
isSearch: true
},
{
label: '类型',
field: 'type',
sort: 'custom',
isSearch: false,
form: {
component: 'Select'
}
},
{
label: '产权',
field: 'equity',
sort: 'custom',
isSearch: false
},
{
label: '电机',
field: 'electricMachine',
sort: 'custom',
isSearch: false
},
{
label: '是否客户资质',
field: 'isCustomerAptitude',
sort: 'custom',
isSearch: false,
form: {
component: 'Switch'
}
},
{
label: '客户id',
field: 'customerId',
sort: 'custom',
isSearch: false
},
{
label: '存放位置',
field: 'storageLocation',
sort: 'custom',
isSearch: false
},
{
label: '使用部门',
field: 'useDept',
sort: 'custom',
isSearch: false
},
{
label: '负责人',
field: 'principal',
sort: 'custom',
isSearch: false
},
{
label: '负责人联系方式',
field: 'principalTelephone',
sort: 'custom',
isSearch: false
},
{
label: '设备状态',
field: 'status',
sort: 'custom',
isSearch: false,
form: {
component: 'Switch'
}
},
{
label: '启用日期',
field: 'startDate',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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: '供应商编号',
field: 'supplierCode',
sort: 'custom',
isSearch: false
},
{
label: '采购时间',
field: 'purchaseTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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: '采购部门',
field: 'purchaseDept',
sort: 'custom',
isSearch: true
},
{
label: '采购人',
field: 'purchaser',
sort: 'custom',
isSearch: true
},
{
label: '出厂日期',
field: 'productionDate',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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: '生产厂商编码',
field: 'manufactureCode',
sort: 'custom',
isSearch: false
},
{
label: '设备使用寿命',
field: 'equipmentLife',
sort: 'custom',
isSearch: false
},
{
label: '验收日期',
field: 'acceptanceDate',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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: '价格',
field: 'purchasePrice',
sort: 'custom',
isSearch: false
},
{
label: '所属厂区编号',
field: 'factoryAreaCode',
sort: 'custom',
isSearch: true
},
{
label: '车间编号',
field: 'workshopCode',
sort: 'custom',
isSearch: true
},
{
label: '工段编号',
field: 'workshopSectionCode',
sort: 'custom',
isSearch: true
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isSearch: false
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false
},
// {
// label: '是否可用',
// field: 'available',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
// isSearch: false,
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

285
src/views/eam/toolMod/index.vue

@ -0,0 +1,285 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ToolMod.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ToolMod.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="ToolModRules"
:formAllSchemas="ToolMod.allSchemas"
:apiUpdate="ToolModApi.updateToolMod"
:apiCreate="ToolModApi.createToolMod"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/> -->
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ToolMod.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/basic/tool-mod/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<!-- 表单弹窗添加/修改 -->
<teamForm ref="basicFormRef" @success="formsSuccess" :formAllSchemas="ToolMod.allSchemas"/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ToolMod,ToolModRules } from './toolMod.data'
import * as ToolModApi from '@/api/eam/toolMod'
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'
import TeamForm from "./operateForm.vue";
defineOptions({ name: 'ToolMod' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ToolMod.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: ToolModApi.getToolModPage //
})
const judgeStatus = (row) =>{
if(row.available === 'TRUE'){
return true
}else{
return false
}
}
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:tool-mod:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'eam:tool-mod:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:tool-mod: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 = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi:'eam:tool-mod:update'}), //
defaultButtons.mainListEnableBtn({hasPermi:'eam:tool-mod:enable',hide: judgeStatus(row)}), //
defaultButtons.mainListDisableBtn({hasPermi:'eam:tool-mod:disable',hide: !judgeStatus(row)}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:tool-mod:delete'}), //
]}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'enable') { //
handleEnable(row,'TRUE')
}else if (val == 'disable') {//
handleEnable(row,'FALSE')
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =ToolMod.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 ToolModApi.createToolMod(data)
message.success(t('common.createSuccess'))
} else {
await ToolModApi.updateToolMod(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, 'basicToolMod')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ToolModApi.deleteToolMod(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 ToolModApi.exportToolMod(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() //
}
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
if (formField == 'modCodeShow') {
let str = ''
let modCodeList = Array(String)
val.forEach((element) => {
str += element.name + ':' + element.code + ','
modCodeList.push(element.code)
})
str = str.substring(0, str.length - 1)
setV['modCodeShow'] = str
setV['modCodeList'] = modCodeList
formRef.setValues(setV);
}else if(formField == 'toolCodeShow'){
let str = val[0].name + ':' + val[0].code
str = str.substring(0, str.length - 1)
setV['toolCodeShow'] = str
setV['toolCode'] = val[0].code
formRef.setValues(setV);
}
})
}
const handleEnable = (row,enable) =>{
message.confirm(t('您确定'+(enable=='TRUE'?'启用':'禁用')+'该项吗, 是否继续?')).then(() => {
row.available = enable
ToolModApi.updateToolMod(row).then(res => {
message.success(t('common.updateSuccess'))
})
})
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ToolModApi.importTemplate()
})
</script>

320
src/views/eam/toolMod/operateForm.vue

@ -0,0 +1,320 @@
<template>
<Dialog v-model="dialogVisible" :title="dialogTitle">
<el-form
ref="basicFormRef"
v-loading="formLoading"
:model="formData"
:rules="formRules"
label-width="80px"
>
<el-row>
<el-col :span="24">
<el-form-item label="工装" prop="toolCode">
<div class="tag-container flex gap-2">
<el-tag v-for="ent in toolCodeList" :key="ent.code" closable :disable-transitions="false"
@close="handleToolClose(ent.code)">
{{ ent.name}}
</el-tag>
<el-input
v-if="inputToolVisible"
ref="InputRef"
v-model="inputToolValue"
class="w-20"
size="small"
/>
<el-button v-else class="button-new-tag" size="small" @click="addTool">
选定工装 +
</el-button>
</div>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="物料" prop="modCodeList">
<div class="tag-container flex gap-2">
<el-tag v-for="ent in tags" :key="ent.code" closable :disable-transitions="false"
@close="handleClose(ent.code)">
{{ ent.name}}
</el-tag>
<el-input
v-if="inputVisible"
ref="InputRef"
v-model="inputValue"
class="w-20"
size="small"
/>
<el-button v-else class="button-new-tag" size="small" @click="addMod">
添加物料 +
</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="类型" prop="type">
<el-select v-model="formData.type" placeholder="请选择类型">
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.DEVICE_TYPE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" placeholder="请输入内容" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<el-button :disabled="formLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
<!--添加班组人员弹窗-->
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" />
</template>
<script lang="ts" setup>
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import request from "@/config/axios";
import download from '@/utils/download'
import { ToolMod,ToolModRules } from './toolMod.data'
import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data";
import * as ItembasicApi from "@/api/wms/itembasic";
import { ToolAccounts,ToolAccountsRules } from '../toolAccounts/toolAccounts.data'
import * as ToolAccountsApi from '@/api/eam/toolAccounts'
import * as ToolModApi from '@/api/eam/toolMod'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
defineOptions({ name: 'OperateForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const tags=ref([])
const toolCodeList = ref([])
const inputValue = ref('')
const inputToolValue = ref('')
const inputVisible = ref(false)
const inputToolVisible = ref(false)
const isDisabled = ref(false)
const isToolDisabled = ref(false)
const InputRef = ref<InstanceType<typeof ElInput>>()
const formData = ref({
toolCode: '',
modCodeList: [],
type: null,
remark: ''
})
const formRules = reactive({
modCodeList: [required],
toolCode: [required],
type: [required],
concurrencyStamp: [required]
})
const basicFormRef = ref() // Ref
const handleClose = (code) => {
tags.value = tags.value.filter(item=>{
return item.code!=code
})
}
const handleToolClose = (code) => {
toolCodeList.value = toolCodeList.value.filter(item=>{
return item.code!=code
})
}
/** 弹窗相关参数 */
const searchTableRef = ref();
const _searchTableTitle = ref();
const _searchTableAllSchemas = ref();
const _searchTablePage = ref();
const _formField = ref();
const _searchField = ref();
const _multiple = ref();
const _type = ref();
const _row = ref();
const _searchCondition = ref({})
const addTool = () =>{
addToolCommon(true,'toolCodeList')
}
const addMod = () =>{
addModCommon(true,'modCodeList')
}
/** 选择物料弹窗 */
const addModCommon = (multiple,field) => {
_searchCondition.value = {}
const filters: any[] = []
filters.push({
action: "==",
column: 'available',
value: 'TRUE'
})
//
_searchCondition.value.isSearch = true
_searchCondition.value.filters = filters
_searchTableTitle.value = '选择物料'
_multiple.value = multiple
_formField.value = field
_searchField.value = field
_searchTablePage.value = ItembasicApi.getItembasicPage,
_searchTableAllSchemas.value = Itembasic.allSchemas,
openCommon()
}
/** 选择物料弹窗 */
const addToolCommon = (multiple,field) => {
_searchCondition.value = {}
const filters: any[] = []
filters.push({
action: "==",
column: 'available',
value: 'TRUE'
})
//
_searchCondition.value.isSearch = true
_searchCondition.value.filters = filters
_searchTableTitle.value = '选定工装'
_multiple.value = multiple
_formField.value = field
_searchField.value = field
_searchTablePage.value = ToolAccountsApi.getToolAccountsPage,
_searchTableAllSchemas.value = ToolAccounts.allSchemas,
openCommon()
}
/** 弹窗选择之后 回调函数 */
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
if (formField === 'modCodeList') {
tags.value = [];
val.forEach(item => {
let newMod = {}
newMod['code'] = item.code;
newMod['name'] = item.name;
tags.value.push(newMod);
});
}else if (formField === 'toolCodeList') {
toolCodeList.value = [];
val.forEach(item => {
let newTool = {}
newTool['code'] = item.code;
newTool['name'] = item.name;
toolCodeList.value.push(newTool);
});
}
}
/*打开弹窗*/
const openCommon = () => {
searchTableRef.value.open(
_searchTableTitle.value,
_searchTableAllSchemas.value,
_searchTablePage.value,
_formField.value,
_searchField.value,
_multiple.value,
_type.value,
_row.value,
_searchCondition.value
)
}
/** 初始化弹窗 */
const open = async (type: string, row?: object) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (row) {
isDisabled.value = true;
formLoading.value = true
try {
// formData.value = await request.get({ url: `/wms/itembasic/get?id=` + row.id });
// tags.value=formData.value
} finally {
formLoading.value = false
}
}
else {
isDisabled.value = false;
tags.value=[];
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
formData.value.modCodeList = tags.value.map(item=>item.code)
formData.value.toolCode = toolCodeList.value[0].code
//
if (!basicFormRef) return
const valid = await basicFormRef.value.validate()
if (!valid) return
//
formLoading.value = true
try {
const data = formData.value as unknown as ToolModApi.ToolModVO
if (formType.value === 'create') {
await ToolModApi.createToolModBatch(data)
message.success(t('common.createSuccess'))
} else {
await ToolModApi.updateToolMod(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
toolCode: '',
modCodeList: [],
type: null,
remark: ''
}
basicFormRef.value?.resetFields()
}
</script>
<style scoped>
.tag-container {
margin-top: 10px; /* 可根据需要调整标签容器与表单项之间的间距 */
border: 1px solid #ccc; /* 添加边框样式 */
padding: 10px; /* 可根据需要调整容器内边距 */
width: 950px; /* 设置固定宽度为 950px */
overflow-y: auto; /* 当内容溢出容器高度时显示滚动条 */
word-wrap: break-word; /* 使用 word-wrap 属性实现超出范围换行 */
overflow-wrap: break-word; /* 兼容性更好的写法 */
flex-wrap: wrap;
}
.input-with-button {
display: flex;
align-items: center;
width: 100%;
}
.input-with-button > .el-input {
flex: 1;
/*margin-right: 10px;*/
}
</style>

155
src/views/eam/toolMod/toolMod.data.ts

@ -0,0 +1,155 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data";
import * as ItembasicApi from "@/api/wms/itembasic";
import { ToolAccounts,ToolAccountsRules } from '../toolAccounts/toolAccounts.data'
import * as ToolAccountsApi from '@/api/eam/toolAccounts'
// 表单校验
export const ToolModRules = reactive({
modCode: [required],
toolCode: [required],
type: [required],
concurrencyStamp: [required]
})
export const ToolMod = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '工装编码',
field: 'toolCode',
sort: 'custom',
isSearch: false,
isDetail: false,
isForm: false,
isTable: true,
isTableForm: false,
},
// {
// label: '工装编码',
// field: 'toolCodeShow',
// sort: 'custom',
// isSearch: true,
// form: {
// componentProps: {
// isSearchList: true,
// searchListPlaceholder: '请选择工装代码',
// searchField: 'toolCodeShow',
// searchTitle: '客户物料基础信息',
// searchAllSchemas: ToolAccounts.allSchemas,
// searchPage: ToolAccountsApi.getToolAccountsPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// },
// search: {
// componentProps: {
// isSearchList: true,
// searchListPlaceholder: '请选择工装代码',
// searchField: 'toolCodeShow',
// searchTitle: '客户物料基础信息',
// searchAllSchemas: ToolAccounts.allSchemas,
// searchPage: ToolAccountsApi.getToolAccountsPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// }
// },
{
label: '物料编号',
field: 'modCode',
sort: 'custom',
isSearch: false,
isDetail: false,
isForm: false,
isTable: true,
isTableForm: false,
},
// {
// label: '物料编号',
// field: 'modCodeShow',
// sort: 'custom',
// isSearch: true,
// form: {
// componentProps: {
// isSearchList: true,
// searchListPlaceholder: '请选择物料代码',
// searchField: 'modCodeShow',
// searchTitle: '客户物料基础信息',
// multiple:true,
// searchAllSchemas: Itembasic.allSchemas,
// searchPage: ItembasicApi.getItembasicPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// },
// search: {
// componentProps: {
// isSearchList: true,
// searchListPlaceholder: '请选择物料代码',
// searchField: 'modCodeShow',
// searchTitle: '客户物料基础信息',
// multiple: true,
// searchAllSchemas: Itembasic.allSchemas,
// searchPage: ItembasicApi.getItembasicPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// }
// },
{
label: '类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Select'
}
},
// {
// label: '部门',
// field: 'departmentCode',
// sort: 'custom',
// isSearch: true
// },
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: false,
isTableForm: false,
isForm: false,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

22
src/views/login/login.vue

@ -1,14 +1,14 @@
<template>
<div
:class="prefixCls"
class="relative h-[100%] lt-xl:bg-[var(--login-bg-color)] lt-md:px-10px lt-sm:px-10px lt-xl:px-10px"
:class="`${prefixCls} ${prefixCls}__left`"
class="relative h-[100%] lt-md:px-10px lt-sm:px-10px lt-xl:px-10px"
>
<div class="relative mx-auto h-full flex">
<div
:class="`${prefixCls}__left flex-1 bg-gray-500 bg-opacity-20 relative p-30px lt-xl:hidden`"
:class="` flex-1 bg-opacity-20 relative p-30px lt-xl:hidden`"
>
<!-- 左上角的 logo + 系统标题 -->
<div class="relative flex items-center text-white">
<div class="relative flex items-center ">
<img alt="" class="mr-10px w-144px h-36px" src="@/assets/imgs/logo_white.png" />
<span class="text-20px font-bold">{{ underlineToHump(appStore.getTitle) }}</span>
</div>
@ -19,18 +19,18 @@
enter-active-class="animate__animated animate__bounceInLeft"
tag="div"
>
<img key="1" alt="" class="w-350px" src="@/assets/svgs/login-box-bg.svg" />
<div key="2" class="text-3xl text-white">{{ t('login.welcome') }}</div>
<!-- <img key="1" alt="" class="w-350px" src="@/assets/svgs/login-box-bg.svg" /> -->
<!-- <div key="2" class="text-3xl text-white">{{ t('login.welcome') }}</div> -->
<div key="3" class="mt-5 text-14px font-normal text-white">
{{ t('login.message') }}
</div>
</TransitionGroup>
</div>
</div>
<div class="relative flex-1 p-30px dark:bg-[var(--login-bg-color)] lt-sm:p-10px">
<div class="relative flex-1 p-30px lt-sm:p-10px">
<!-- 右上角的主题语言选择 -->
<div
class="flex items-center justify-between text-white at-2xl:justify-end at-xl:justify-end"
class="flex items-center justify-between at-2xl:justify-end at-xl:justify-end"
>
<div class="flex items-center at-2xl:hidden at-xl:hidden">
<img alt="" class="mr-10px w-144px h-36px" src="@/assets/imgs/logo_white.png" />
@ -38,7 +38,7 @@
</div>
<div class="flex items-center justify-end space-x-10px">
<!-- <ThemeSwitch /> -->
<LocaleDropdown class="dark:text-white lt-xl:text-white" />
<LocaleDropdown class="dark:text-white " />
</div>
</div>
<!-- 右边的登录界面 -->
@ -94,11 +94,13 @@ $prefix-cls: #{$namespace}-login;
z-index: -1;
width: 100%;
height: 100%;
background-image: url('@/assets/svgs/login-bg.svg');
// background-image: url('@/assets/svgs/login-bg.svg');
background-image: url('@/assets/imgs/login-bg.png');
background-position: center;
background-repeat: no-repeat;
content: '';
}
}
}
</style>

10
src/views/mes/abilityInfo/index.vue

@ -66,6 +66,7 @@ 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.vue'
import {MesOrderMonthMain} from "@/views/mes/ordermonthplan/mesOrderMonthMain.data";
defineOptions({ name: 'AbilityInfo' })
@ -150,6 +151,15 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
let disabledFlag = false
if(type==='update'){
disabledFlag = true
}
AbilityInfo.allSchemas.formSchema.forEach(item => {
if (item.field == 'ablityCode') {
item.componentProps.disabled =disabledFlag
}
})
basicFormRef.value.open(type, row)
}

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

@ -61,9 +61,9 @@
:apiCreate="ItemRequestDetailApi.createItemRequestDetail"
:apiUpdate="ItemRequestDetailApi.updateItemRequestDetail"
:apiDelete="ItemRequestDetailApi.deleteItemRequestDetail"
:detailButtonIsShowAdd="true"
:detailButtonIsShowEdit="true"
:detailButtonIsShowDelete="true"
:detailButtonIsShowAdd="false"
:detailButtonIsShowEdit="false"
:detailButtonIsShowDelete="false"
@handleMainFefresh="handleMainFefresh"
@searchTableSuccessDetail="searchTableSuccessDetail"
:key="count"
@ -150,7 +150,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'mes:itemRequestMain:update'}), //
//defaultButtons.mainListEditBtn({hasPermi:'mes:itemRequestMain:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'mes:itemRequestMain:delete'}), //
]

28
src/views/mes/itemRequestMain/itemRequestMain.data.ts

@ -3,7 +3,7 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const ItemRequestMainRules = reactive({
concurrencyStamp: [required],
requestBillNo:[{required : true, message: '请输入删除时间', trigger: 'blur' }]
})
export const ItemRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
@ -24,6 +24,9 @@ export const ItemRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
@ -37,6 +40,7 @@ export const ItemRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'requestBillNo',
sort: 'custom',
isSearch: true,
disabled: true,
},
{
label: '主键',
@ -132,13 +136,20 @@ export const ItemRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
},
{
label: '类型(1:叫料、2:补料)',
label: '类型',
field: 'requestType',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
},
dictType: DICT_TYPE.MES_REQUEST_TYPE,
dictClass: 'string',
form: {
component: 'Select',
// componentProps:{
// options:[{label:'叫料',value:'1'},{label:'补料',value:'2'}]
// },
value:'1'
},
},
{
label: '创建时间',
@ -154,6 +165,9 @@ export const ItemRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isForm: false,
},
{
@ -275,6 +289,9 @@ export const ItemRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isForm: false,
},
{
@ -287,6 +304,7 @@ export const ItemRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '操作',
field: 'action',
isForm: false,
isTable: false,
table: {
width: 150,
fixed: 'right'

1
src/views/mes/opersteps/index.vue

@ -159,7 +159,6 @@ const openForm = (type: string, row?: any) => {
}
})
basicFormRef.value.open(type, row)
basicFormRef.value.open(type, row)
}
// form

2
src/views/mes/orderDay/components/schedule.vue

@ -706,7 +706,9 @@ const deleteEquipment=(row)=>{
/*删除选择的班组人员*/
const deleteUser=(row)=>{
console.log("workerData.value.709",workerData.value)
workerData.value.splice(workerData.value.indexOf(row),1)
console.log("workerData.value.711",workerData.value)
}
/*班组人员保存接口*/
const saveUser = async () =>{

9
src/views/mes/ordermonthplan/index.vue

@ -185,6 +185,15 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
let disabledFlag = false
if(type==='update'){
disabledFlag = true
}
MesOrderMonthMain.allSchemas.formSchema.forEach(item => {
if (item.field == 'planMasterCode' || item.field == 'planSubCode') {
item.componentProps.disabled =disabledFlag
}
})
basicFormRef.value.open(type, row)
}

9
src/views/mes/pattern/index.vue

@ -149,6 +149,15 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
let disabledFlag = false
if(type==='update'){
disabledFlag = true
}
Pattern.allSchemas.formSchema.forEach(item => {
if (item.field == 'code') {
item.componentProps.disabled =disabledFlag
}
})
basicFormRef.value.open(type, row)
}

9
src/views/mes/patternType/index.vue

@ -149,6 +149,15 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
let disabledFlag = false
if(type==='update'){
disabledFlag = true
}
PatternType.allSchemas.formSchema.forEach(item => {
if (item.field == 'code') {
item.componentProps.disabled =disabledFlag
}
})
basicFormRef.value.open(type, row)
}

10
src/views/mes/qualityclass/index.vue

@ -149,7 +149,15 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
console.log(row)
let disabledFlag = false
if(type==='update'){
disabledFlag = true
}
Qualityclass.allSchemas.formSchema.forEach(item => {
if (item.field == 'code') {
item.componentProps.disabled =disabledFlag
}
})
basicFormRef.value.open(type, row)
}

9
src/views/mes/qualitygroup/index.vue

@ -149,6 +149,15 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
let disabledFlag = false
if(type==='update'){
disabledFlag = true
}
Qualitygroup.allSchemas.formSchema.forEach(item => {
if (item.field == 'code') {
item.componentProps.disabled =disabledFlag
}
})
basicFormRef.value.open(type, row)
}

2
src/views/mes/reworkBatch/index.vue

@ -51,7 +51,7 @@
/>
<!-- 详情 -->
<Detail ref="detailRef" :allSchemas="ReworkBatch.allSchemas" :isBasic="false" :isBasicMes="false" :detailAllSchemas="ReworkBatch.allSchemas"
<Detail ref="detailRef" :allSchemas="ReworkBatch.allSchemas" :isBasic="false" :isBasicMes="true" :detailAllSchemas="ReworkBatch.allSchemas"
:apiPage="ReworkBatchApi.getReworkBatchPage"/>
<!-- 导入 -->

2
src/views/mes/reworkSingle/index.vue

@ -51,7 +51,7 @@
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="false" :allSchemas="ReworkSingle.allSchemas" :isBasicMes="false" :detailAllSchemas="ReworkSingle.allSchemas"
<Detail ref="detailRef" :isBasic="false" :allSchemas="ReworkSingle.allSchemas" :isBasicMes="true" :detailAllSchemas="ReworkSingle.allSchemas"
:apiPage="ReworkSingleApi.getReworkSinglePage"/>
<!-- 导入 -->

7
src/views/mes/workScheduling/index.vue

@ -230,11 +230,14 @@ const finishReport=async(row)=>{
processCode:row.workingNode
}
//console.log("workscheduling-finishReport-213",row)
let res=await WorkSchedulingApi.getNodePosition(params)
if(res==='end'){
if(row.workingNode=='endNode'){
//reportFinishRef.value.openDetail(row,"")
WorkSchedulingApi.completeHandle(params)
}else{
// let res=await WorkSchedulingApi.getNodePosition(params)
// if(res){
// }
message.alert("当前工序不是完工工序,不能进行完工操作!")
}
}

9
src/views/mes/workstation/index.vue

@ -171,6 +171,15 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
let disabledFlag = false
if(type==='update'){
disabledFlag = true
}
Workstation.allSchemas.formSchema.forEach(item => {
if (item.field == 'code') {
item.componentProps.disabled =disabledFlag
}
})
basicFormRef.value.open(type, row)
}

35
src/views/system/user/UserForm.vue

@ -7,6 +7,23 @@
:rules="formRules"
label-width="80px"
>
<el-row>
<el-col :span="12">
<el-form-item v-if="formData.id === undefined" label="用户账号" prop="username">
<el-input v-model="formData.username" placeholder="请输入用户账号" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="formData.id === undefined" label="用户密码" prop="password">
<el-input
v-model="formData.password"
placeholder="请输入用户密码"
show-password
type="password"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="用户昵称" prop="nickname">
@ -38,23 +55,6 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item v-if="formData.id === undefined" label="用户名称" prop="username">
<el-input v-model="formData.username" placeholder="请输入用户名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="formData.id === undefined" label="用户密码" prop="password">
<el-input
v-model="formData.password"
placeholder="请输入用户密码"
show-password
type="password"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="用户性别">
@ -129,6 +129,7 @@ const formData = ref({
const formRules = reactive({
username: [{ required: true, message: '用户名称不能为空', trigger: 'blur' }],
nickname: [{ required: true, message: '用户昵称不能为空', trigger: 'blur' }],
deptId: [{ required: true, message: '部门不能为空', trigger: 'blur' }],
password: [{ required: true, message: '用户密码不能为空', trigger: 'blur' }],
email: [
{

18
src/views/wms/agvManage/interfaceInfo/interfaceInfo.data.ts

@ -50,6 +50,24 @@ export const InterfaceInfo = useCrudSchemas(reactive<CrudSchema[]>([
},
isSearch: true,
},
{
label: '业务编号',
field: 'businessNumber',
sort: 'custom',
isSearch: true,
table: {
width: 180,
},
},
{
label: '业务ID',
field: 'businessId',
sort: 'custom',
isSearch: true,
table: {
width: 180,
},
},
{
label: '请求地址',
field: 'url',

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

@ -55,6 +55,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
:isShowButton = isShowButton
@ -350,7 +352,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //

340
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue

@ -0,0 +1,340 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="[...RelegateRequestMain.allSchemas.searchSchema,...RelegateRequestDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="RelegateRequestMain.allSchemas"
:detailAllSchemas="RelegateRequestDetail.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,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList"
:rules="RelegateRequestMainRules"
:formAllSchemas="RelegateRequestMain.allSchemas"
:tableAllSchemas="RelegateRequestDetail.allSchemas"
:tableFormRules="RelegateRequestDetailRules"
:tableData="tableData"
:apiUpdate="RelegateRequestMainApi.updateRelegateRequestMain"
:apiCreate="RelegateRequestMainApi.createRelegateRequestMain"
:isBusiness="true"
fromeWhere="RelegateRequestMain"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
:isShowButton = isShowButton
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="true"
:allSchemas="RelegateRequestMain.allSchemas"
:detailAllSchemas="RelegateRequestDetail.allSchemas"
:detailAllSchemasRules="RelegateRequestDetailRules"
:apiCreate="RelegateRequestDetailApi.createRelegateRequestDetail"
:apiUpdate="RelegateRequestDetailApi.updateRelegateRequestDetail"
:apiPage="RelegateRequestDetailApi.getRelegateRequestDetailPage"
:apiDelete="RelegateRequestDetailApi.deleteRelegateRequestDetail"
fromeWhere="RelegateRequestMain"
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailButtonIsShowAdd="trueFalse"
:detailButtonIsShowDelete="trueFalse"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/relegate-request-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { RelegateRequestMain,RelegateRequestMainRules,RelegateRequestDetail,RelegateRequestDetailRules } from './relegateRequestMain.data'
import * as RelegateRequestMainApi from '@/api/wms/relegateRequestMain'
import * as RelegateRequestDetailApi from '@/api/wms/relegateRequestDetail'
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: 'RelegateRequestMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref([...RelegateRequestMain.allSchemas.tableColumns,...RelegateRequestDetail.allSchemas.tableMainColumns])
const isShowButton = ref(true)
// //
const trueFalse = ref(false)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
if(formField == 'itemCode') {
setV['itemCode'] = val[0]['itemCode']
setV['uom'] = val[0]['customerUom']
}else {
setV[formField] = val[0][searchField]
}
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: RelegateRequestDetailApi.getRelegateRequestDetailPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:relegate-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:relegate-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:relegate-request-main: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.status) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
return []
}
return [
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:relegate-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:relegate-request-main: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)
}
//true0
const flag = ref(false)
// form
const submitForm = async (formType,data) => {
data.subList = tableData.value //
let isExist = false
tableData.value.forEach(item => {
let rs = tableData.value.filter(filterItem => (filterItem.itemCode == item.itemCode))
if(rs.length > 1) isExist = true
})
if (isExist) {
basicFormRef.value.formLoading = false
return message.warning('物料代码重复')
}
data.subList.forEach(obj => {
if(obj.qty == 0){
message.warning(`数量不能为0!`)
flag.value = true
return;
}
})
if(flag.value){
basicFormRef.value.formLoading = false
return
}
try {
if (formType === 'create') {
if(tableData.value.length <= 0){
message.warning(`子表明细不能为空!`)
flag.value = true
basicFormRef.value.formLoading = false
return;
}
await RelegateRequestMainApi.createRelegateRequestMain(data)
message.success(t('common.createSuccess'))
} else {
await RelegateRequestMainApi.updateRelegateRequestMain(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicRelegateRequestMain')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await RelegateRequestMainApi.deleteRelegateRequestMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/**
* tableForm方法
*/
const tableFormKeys = {}
RelegateRequestDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await RelegateRequestMainApi.exportRelegateRequestMain(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 RelegateRequestMainApi.importTemplate()
})
</script>

539
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts

@ -0,0 +1,539 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data";
import * as WarehouseApi from "@/api/wms/warehouse";
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = {
pageSize:10,
pageNo:1,
code:'RelegateRequest'
}
const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{}
// 表单校验
export const RelegateRequestMainRules = reactive({
fromWarehouseCode: [required],
number: [required],
businessType: [required],
autoCommit: [required],
autoAgree: [required],
autoExecute: [required],
directCreateRecord: [required],
concurrencyStamp: [required],
fromAreaTypes: [required],
fromAreaCodes: [required],
})
export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '仓库信息', // 查询弹窗标题
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
isSearch: true,
isForm: false,
isTable: false
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
isForm: false,
isTable: false
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
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,
isTable: false
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isForm: false,
isTable: false
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isForm: false,
isTable: false
},
{
label: '申请时间',
field: 'requestTime',
sort: 'custom',
formatter: dateFormatter,
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,
isTable: false
},
{
label: '截止时间',
field: 'dueTime',
sort: 'custom',
formatter: dateFormatter,
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,
isTable: false
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isForm: false,
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isForm: false,
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '自动提交',
field: 'autoCommit',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoCommit,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
}
},
{
label: '自动通过',
field: 'autoAgree',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoCommit,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
}
},
{
label: '自动执行',
field: 'autoExecute',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoCommit,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
}
},
{
label: '直接生成记录',
field: 'directCreateRecord',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoCommit,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
}
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isForm: false,
isTable: false
},
{
label: '权限所属人员id',
field: 'ruleUserId',
sort: 'custom',
isForm: false,
isTable: false
},
{
label: '工作流流水号',
field: 'serialNumber',
sort: 'custom',
isForm: false,
isTable: false
},
{
label: '原因',
field: 'reason',
sort: 'custom',
isForm: false,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 表单校验
export const RelegateRequestDetailRules = reactive({
itemCode: [required],
downItemCode: [required],
businessType: [required],
available: [required],
departmentCode: [required],
concurrencyStamp: [required],
})
export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '降级物料代码',
field: 'downItemCode',
sort: 'custom',
form: {
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择降级物料代码',
searchField: 'itemCode',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
isSearch: true
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
},
{
label: '从批次',
field: 'fromBatch',
sort: 'custom',
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '从包装号',
field: 'fromPackingNumber',
sort: 'custom',
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '从库区类型',
field: 'fromAreaTypes',
sort: 'custom',
isForm:false,
},
{
label: '从库区代码',
field: 'fromAreaCodes',
sort: 'custom',
isForm:false,
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
isForm:false,
},
{
label: '到包装号',
field: 'toPackingNumber',
sort: 'custom',
},
{
label: '到批次',
field: 'toBatch',
sort: 'custom',
},
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
isForm:false,
},
{
label: '到库区类型',
field: 'toAreaTypes',
sort: 'custom',
isForm:false,
},
{
label: '到库区代码',
field: 'toAreaCodes',
sort: 'custom',
isForm:false,
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isForm:false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isForm:false,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
isForm:false,
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isForm:false,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
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: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isForm: false,
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isForm:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '工作流流水号',
field: 'serialNumber',
isForm:false,
sort: 'custom',
},
{
label: '权限所属人员id',
field: 'ruleUserId',
sort: 'custom',
isForm:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

553
src/views/wms/basicDataManage/itemManage/relegateRequest/relegateRequestMain.data.ts

@ -0,0 +1,553 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as ItembasicApi from "@/api/wms/itembasic";
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data";
import * as WarehouseApi from "@/api/wms/warehouse";
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = {
pageSize:10,
pageNo:1,
code:'RelegateRequest'
}
const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{}
// 表单校验
export const RelegateRequestMainRules = reactive({
fromWarehouseCode: [required],
number: [required],
businessType: [required],
autoCommit: [required],
autoAgree: [required],
autoExecute: [required],
directCreateRecord: [required],
concurrencyStamp: [required],
fromAreaTypes: [required],
fromAreaCodes: [required],
})
export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '仓库信息', // 查询弹窗标题
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
isSearch: true,
isForm: false,
isTable: false
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
isForm: false,
isTable: false
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
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,
isTable: false
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isForm: false,
isTable: false
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isForm: false,
isTable: false
},
{
label: '申请时间',
field: 'requestTime',
sort: 'custom',
formatter: dateFormatter,
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,
isTable: false
},
{
label: '截止时间',
field: 'dueTime',
sort: 'custom',
formatter: dateFormatter,
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,
isTable: false
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isForm: false,
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isForm: false,
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '自动提交',
field: 'autoCommit',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoCommit,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
}
},
{
label: '自动通过',
field: 'autoAgree',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoCommit,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
}
},
{
label: '自动执行',
field: 'autoExecute',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoCommit,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
}
},
{
label: '直接生成记录',
field: 'directCreateRecord',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoCommit,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
}
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isForm: false,
isTable: false
},
{
label: '权限所属人员id',
field: 'ruleUserId',
sort: 'custom',
isForm: false,
isTable: false
},
{
label: '工作流流水号',
field: 'serialNumber',
sort: 'custom',
isForm: false,
isTable: false
},
{
label: '原因',
field: 'reason',
sort: 'custom',
isForm: false,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 表单校验
export const RelegateRequestDetailRules = reactive({
itemCode: [required],
downItemCode: [required],
businessType: [required],
available: [required],
departmentCode: [required],
concurrencyStamp: [required],
})
export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
tableForm:{
isInpuFocusShow: false, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'code',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '降级物料代码',
field: 'downItemCode',
sort: 'custom',
form: {
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择降级物料代码',
searchField: 'itemCode',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
isSearch: true
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
},
{
label: '从批次',
field: 'fromBatch',
sort: 'custom',
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '从包装号',
field: 'fromPackingNumber',
sort: 'custom',
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '从库区类型',
field: 'fromAreaTypes',
sort: 'custom',
isForm:false,
},
{
label: '从库区代码',
field: 'fromAreaCodes',
sort: 'custom',
isForm:false,
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
isForm:false,
},
{
label: '到包装号',
field: 'toPackingNumber',
sort: 'custom',
},
{
label: '到批次',
field: 'toBatch',
sort: 'custom',
},
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
isForm:false,
},
{
label: '到库区类型',
field: 'toAreaTypes',
sort: 'custom',
isForm:false,
},
{
label: '到库区代码',
field: 'toAreaCodes',
sort: 'custom',
isForm:false,
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isForm:false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isForm:false,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
isForm:false,
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isForm:false,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
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: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isForm: false,
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isForm:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '工作流流水号',
field: 'serialNumber',
isForm:false,
sort: 'custom',
},
{
label: '权限所属人员id',
field: 'ruleUserId',
sort: 'custom',
isForm:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

2
src/views/wms/basicDataManage/itemManage/relegateRequest/index.vue → src/views/wms/basicDataManage/itemManage/relegateRequestDetail/index.vue

@ -60,7 +60,7 @@
<script setup lang="ts">
import download from '@/utils/download'
import { RelegateRequest,RelegateRequestRules } from './relegateRequest.data'
import * as RelegateRequestApi from '@/api/wms/relegateRequest'
import * as RelegateRequestApi from '@/api/wms/relegateRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'

2
src/views/wms/basicDataManage/itemManage/relegateRequest/relegateRequest.data.ts → src/views/wms/basicDataManage/itemManage/relegateRequestDetail/relegateRequest.data.ts

@ -32,7 +32,7 @@ export const RelegateRequest = useCrudSchemas(reactive<CrudSchema[]>([
isSearchList: true,
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '客户物料基础信息',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchCondition: [{

23
src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts

@ -3,6 +3,8 @@ import { dateFormatter } from '@/utils/formatTime'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as ItempackagingApi from '@/api/wms/itempackage'
import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import * as PackageunitApi from '@/api/wms/packageunit'
@ -68,12 +70,23 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装规格代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '包装规格信息', // 查询弹窗标题
searchAllSchemas: Packageunit.allSchemas, // 查询弹窗所需类
searchPage: PackageunitApi.getPackageunitPage, // 查询弹窗所需分页方法
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '物料包装信息', // 查询弹窗标题
searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类
searchPage: ItempackagingApi.getItempackagingPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'itemCode',
value: 'itemCode',
message: '请填写物料代码!',
isMainValue: true
}]
}
}
},

4
src/views/wms/basicDataManage/labelManage/callmaterials/index.vue

@ -87,8 +87,8 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
if (formField == 'itemCode') {
setV['itemCode'] = val[0]['code']
} else if (formField == 'packUnit') {
setV['uom'] = val[0]['unit']
setV['packUnit'] = val[0]['code']
setV['uom'] = val[0]['uom']
setV['packUnit'] = val[0]['packUnit']
}else {
setV[formField] = val[0][searchField]
}

6
src/views/wms/countManage/count/countPlanMain/index.vue

@ -60,6 +60,8 @@
:countScopeType="getStrDictOptions(DICT_TYPE.COUNT_SCOPE_TYPE)"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@formSelectChange="formSelectChange"
@ -512,7 +514,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value.map((item) => {

6
src/views/wms/countManage/count/countRequestMain/index.vue

@ -61,6 +61,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
@ -511,7 +513,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //

6
src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue

@ -53,6 +53,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
@ -340,7 +342,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //

6
src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue

@ -55,6 +55,8 @@
fromeWhere="customerreceipt"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
@ -348,7 +350,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //

5
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue

@ -53,6 +53,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
:isShowButton = isShowButton
@ -466,6 +468,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//true0
const flag = ref(false)

6
src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue

@ -53,6 +53,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
@ -359,7 +361,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //

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

@ -57,6 +57,8 @@
fromeWhere="DeliverRequestMain"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
:isShowButton = isShowButton
@ -480,7 +482,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//true0
const flag = ref(false)

23
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts

@ -503,6 +503,7 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
hiddenInMain: true,
isTableForm: false,
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
@ -751,28 +752,6 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm: false,
isForm: false,
},
{
label: '计划数量',
field: 'planQty',
sort: 'custom',
table: {
width: 150
},
isTable: false,
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6
}
},
{
label: '最后更新时间',
field: 'updateTime',

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

@ -54,6 +54,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
@ -383,7 +385,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//true0
const flag = ref(false)

6
src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue

@ -52,6 +52,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
@ -275,7 +277,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //

6
src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue

@ -56,6 +56,8 @@
fromeWhere="SaleShipmentRequestMain"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
:isShowButton = isShowButton
@ -372,7 +374,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
/** 详情操作 */
const detailRef = ref()

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

@ -56,6 +56,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
@ -425,7 +427,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//true0
const flag = ref(false)

6
src/views/wms/inventoryManage/containerinit/containerBindRecord/index.vue

@ -54,6 +54,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@submitForm="submitForm"
/>
@ -260,7 +262,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {

6
src/views/wms/inventoryManage/containerinit/containerRepair/index.vue

@ -54,6 +54,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@submitForm="submitForm"
/>
@ -259,7 +261,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {

6
src/views/wms/inventoryManage/containerinit/containerUnbindRecord/index.vue

@ -54,6 +54,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@submitForm="submitForm"
/>
@ -259,7 +261,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {

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

@ -54,6 +54,8 @@
fromeWhere="ContainerMainRequest"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
:isShowButton = isShowButton
@ -409,7 +411,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//true0
const flag = ref()

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

@ -54,6 +54,8 @@
fromeWhere="ContainerMainRequest"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
:isShowButton = isShowButton
@ -361,7 +363,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//true0
const flag = ref()

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

@ -54,6 +54,8 @@
fromeWhere="ContainerMainRequest"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
:isShowButton = isShowButton
@ -387,7 +389,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//true0
const flag = ref()

6
src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue

@ -53,6 +53,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
@ -364,7 +366,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //

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

@ -53,6 +53,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@inputNumberChange="inputNumberChange"
@submitForm="submitForm"
@ -390,7 +392,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //

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

@ -53,6 +53,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@tableFormSelectOnBlur="tableFormSelectOnBlur"
@ -369,7 +371,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //

6
src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue

@ -53,6 +53,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@tableFormSelectOnBlur="tableFormSelectOnBlur"
@ -398,7 +400,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //

6
src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue

@ -54,6 +54,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
@ -379,7 +381,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //

6
src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue

@ -53,6 +53,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@tableFormSelectOnBlur="tableFormSelectOnBlur"
@ -369,7 +371,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //

6
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue

@ -53,6 +53,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@inputNumberChange="inputNumberChange"
@ -535,7 +537,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //

1
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts

@ -857,6 +857,7 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
label: '操作',
field: 'action',
isDetail: false,
hiddenInMain:true,
isForm: false ,
table: {
width: 150,

6
src/views/wms/issueManage/issue/issueRequestMain/index.vue

@ -53,6 +53,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
@ -377,7 +379,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //

6
src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue

@ -53,6 +53,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
@ -289,7 +291,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //

6
src/views/wms/issueManage/pick/pickRequestMain/index.vue

@ -53,6 +53,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
@ -294,7 +296,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //

6
src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue

@ -54,6 +54,8 @@
:isShowButton="isShowButton"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
@ -434,7 +436,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save