Browse Source

解决冲突

master_hella_20240701
ljlong_2630 6 months ago
parent
commit
834f4dc3a5
  1. 3
      .env
  2. 5
      .env.hella13
  3. 5
      .env.hella14
  4. 2
      .env.hella15
  5. 2
      .env.hella16
  6. 7
      .env.hella8
  7. 7
      .env.hella9
  8. 1
      .gitignore
  9. 3
      README.md
  10. 2
      index.html
  11. 74
      src/api/eam/equipmentMaintenanceMain/index.ts
  12. 77
      src/api/eam/maintenance/index.ts
  13. 38
      src/api/eam/sparePart/index.ts
  14. 5
      src/api/mes/processroute/index.ts
  15. 5
      src/api/qms/inspectionScheme/index.ts
  16. 10
      src/api/system/tenant/index.ts
  17. 2
      src/api/wms/balance/index.ts
  18. 10
      src/api/wms/countJobMain/index.ts
  19. 11
      src/api/wms/customeritem/index.ts
  20. 11
      src/api/wms/deliverPlanDetail/index.ts
  21. 13
      src/api/wms/deliverPlanMain/index.ts
  22. 13
      src/api/wms/deliverRequestMain/index.ts
  23. 10
      src/api/wms/location/index.ts
  24. 5
      src/api/wms/package/index.ts
  25. 7
      src/api/wms/purchasereceiptJobMain/index.ts
  26. 13
      src/api/wms/purchasereceiptRecordDetail/index.ts
  27. 60
      src/api/wms/qadCostcentre/index.ts
  28. 59
      src/api/wms/qadProject/index.ts
  29. 66
      src/api/wms/subjectAccount/index.ts
  30. 20
      src/components/Form/src/Form.vue
  31. 5
      src/components/Form/src/components/useRenderSelect.tsx
  32. 7
      src/components/Form/src/helper.ts
  33. 339
      src/components/ImportForm/src/ImportDetailForm.vue
  34. 5
      src/components/Table/src/Table.vue
  35. 7
      src/components/TableForm/src/TableForm.vue
  36. 4
      src/components/UploadFile/src/UploadFile.vue
  37. 16
      src/components/rowDrop/index.vue
  38. 3
      src/hooks/web/useTitle.ts
  39. 3
      src/layout/components/Footer/src/Footer.vue
  40. 38
      src/locales/en-US.ts
  41. 35
      src/locales/zh-CN.ts
  42. 6
      src/main.ts
  43. 3
      src/utils/dict.ts
  44. 4
      src/utils/disposition/defaultButtons.ts
  45. 4
      src/views/eam/basicMaintenanceOption/basicMaintenanceOption.data.ts
  46. 10
      src/views/eam/documentType/documentType.data.ts
  47. 6
      src/views/eam/documentType/index.vue
  48. 12
      src/views/eam/documentTypeSelectSet/documentTypeSelectSet.data.ts
  49. 25
      src/views/eam/documentTypeSelectSet/itemSelectSetForm.vue
  50. 318
      src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts
  51. 244
      src/views/eam/equipmentMaintenanceMain/index.vue
  52. 326
      src/views/eam/maintenance/index.vue
  53. 322
      src/views/eam/maintenance/maintenance.data.ts
  54. 9
      src/views/eam/maintenanceItem/maintenanceItem.data.ts
  55. 4
      src/views/eam/sparePart/index.vue
  56. 215
      src/views/eam/sparePart/sparePart.data.ts
  57. 2
      src/views/login/components/LoginForm.vue
  58. 12
      src/views/login/forgetPassword.vue
  59. 4
      src/views/login/login.vue
  60. 1
      src/views/mes/dismantlingMain/dismantlingMain.data.ts
  61. 2
      src/views/mes/dismantlingMain/index.vue
  62. 24
      src/views/mes/holiday/holiday.data.ts
  63. 6
      src/views/mes/hrPersonAbility/hrPersonAbility.data.ts
  64. 39
      src/views/mes/item/index.vue
  65. 57
      src/views/mes/item/item.data.ts
  66. 4
      src/views/mes/orderDay/components/schedule.vue
  67. 2
      src/views/mes/orderDay/index.vue
  68. 15
      src/views/mes/ordermonthplan/mesOrderMonthMain.data.ts
  69. 6
      src/views/mes/processroute/components/configDialog.vue
  70. 7
      src/views/mes/processroute/processroute.data.ts
  71. 31
      src/views/mes/qualityclass/qualityclass.data.ts
  72. 21
      src/views/mes/qualitygroup/qualitygroup.data.ts
  73. 4
      src/views/mes/reworkBatch/index.vue
  74. 4
      src/views/mes/reworkSingle/index.vue
  75. 10
      src/views/mes/workSchedulingQaform/index.vue
  76. 43
      src/views/mes/workSchedulingQaform/workSchedulingQaform.data.ts
  77. 48
      src/views/mes/workcalendar/index.vue
  78. 4
      src/views/mes/workstation/workstation.data.ts
  79. 14
      src/views/qms/inspectionRecord/index.vue
  80. 22
      src/views/qms/inspectionScheme/index.vue
  81. 6
      src/views/wms/basicDataManage/customerManage/saleprice/saleprice.data.ts
  82. 3
      src/views/wms/basicDataManage/factoryModeling/location/location.data.ts
  83. 4
      src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts
  84. 19
      src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts
  85. 2
      src/views/wms/basicDataManage/itemManage/itemwarehouse/itemwarehouse.data.ts
  86. 45
      src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts
  87. 7
      src/views/wms/basicDataManage/labelManage/callmaterials/index.vue
  88. 48
      src/views/wms/basicDataManage/labelManage/locationLabel/index.vue
  89. 29
      src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue
  90. 118
      src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue
  91. 18
      src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue
  92. 244
      src/views/wms/basicDataManage/subject/qadCostcentre/index.vue
  93. 167
      src/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data.ts
  94. 244
      src/views/wms/basicDataManage/subject/qadProject/index.vue
  95. 186
      src/views/wms/basicDataManage/subject/qadProject/qadProject.data.ts
  96. 253
      src/views/wms/basicDataManage/subject/subjectAccount/index.vue
  97. 166
      src/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data.ts
  98. 84
      src/views/wms/countManage/count/countJobMain/countJobMain.data.ts
  99. 69
      src/views/wms/countManage/count/countJobMain/index.vue
  100. 52
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts

3
.env

@ -15,3 +15,6 @@ VITE_APP_CAPTCHA_ENABLE=true
# 百度统计
VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc
# 查看质检报告环境
VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400'

5
.env.hella13

@ -28,7 +28,7 @@ VITE_SOURCEMAP=false
VITE_BASE_PATH=/
# 输出路径
VITE_OUT_DIR=sfms3.0
VITE_OUT_DIR=sfms3.0-ui
# 自定义接口路径
VITE_INTERFACE_URL='http://172.21.32.13:90/magic/web/index.html'
@ -38,3 +38,6 @@ VITE_JMREPORT_BASE_URL='http://172.21.32.13:90'
# 租户配置
VITE_TENANT='["长春"]'
# 查看质检报告环境
VITE_REPORT_URL = 'https://scp.faway-hella.com'

5
.env.hella14

@ -28,7 +28,7 @@ VITE_SOURCEMAP=false
VITE_BASE_PATH=/
# 输出路径
VITE_OUT_DIR=sfms3.0
VITE_OUT_DIR=sfms3.0-ui
# 自定义接口路径
VITE_INTERFACE_URL='http://172.21.32.14:90/magic/web/index.html'
@ -38,3 +38,6 @@ VITE_JMREPORT_BASE_URL='http://172.21.32.14:90'
# 租户配置
VITE_TENANT='["长春"]'
# 查看质检报告环境
VITE_REPORT_URL = 'https://scptest.faway-hella.com'

2
.env.hella15

@ -28,7 +28,7 @@ VITE_SOURCEMAP=false
VITE_BASE_PATH=/
# 输出路径
VITE_OUT_DIR=sfms3.0
VITE_OUT_DIR=sfms3.0-ui
# 自定义接口路径
VITE_INTERFACE_URL='https://scp.faway-hella.com/magic/web/index.html'

2
.env.hella16

@ -28,7 +28,7 @@ VITE_SOURCEMAP=false
VITE_BASE_PATH=/
# 输出路径
VITE_OUT_DIR=sfms3.0
VITE_OUT_DIR=sfms3.0-ui
# 自定义接口路径
VITE_INTERFACE_URL='https://scptest.faway-hella.com/magic/web/index.html'

7
.env.hella8

@ -28,7 +28,7 @@ VITE_SOURCEMAP=false
VITE_BASE_PATH=/
# 输出路径
VITE_OUT_DIR=sfms3.0
VITE_OUT_DIR=sfms3.0-ui
# 自定义接口路径
VITE_INTERFACE_URL='http://172.22.32.8:90/magic/web/index.html'
@ -38,4 +38,7 @@ VITE_JMREPORT_BASE_URL='http://172.22.32.8:90'
# 租户配置
VITE_TENANT='["成都"]'
VITE_TENANT='["成都"]'
# 查看质检报告环境
VITE_REPORT_URL = 'https://scp.faway-hella.com'

7
.env.hella9

@ -28,7 +28,7 @@ VITE_SOURCEMAP=false
VITE_BASE_PATH=/
# 输出路径
VITE_OUT_DIR=sfms3.0
VITE_OUT_DIR=sfms3.0-ui
# 自定义接口路径
VITE_INTERFACE_URL='http://172.22.32.9:90/magic/web/index.html'
@ -37,4 +37,7 @@ VITE_INTERFACE_URL='http://172.22.32.9:90/magic/web/index.html'
VITE_JMREPORT_BASE_URL='http://172.22.32.9:90'
# 租户配置
VITE_TENANT='["成都"]'
VITE_TENANT='["成都"]'
# 查看质检报告环境
VITE_REPORT_URL = 'https://scptest.faway-hella.com'

1
.gitignore

@ -11,3 +11,4 @@ auto-*.d.ts
.idea
.history
/sfms3.0
/sfms3.0-ui

3
README.md

@ -1,9 +1,10 @@
## dev发布2024-05-21-002
## dev发布2024-05-23-001
**xxxx.data.ts 文件配置说明**
**form表单查询弹窗配置**
form: {
labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true, //可输入回车 对应绑定事件:@onEnter="onEnter"
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段

2
index.html

@ -138,7 +138,7 @@
<div class="app-loading-wrap">
<div class="app-loading-title">
<img src="/src/assets/imgs/logo_white.png" class="app-loading-logo" alt="Logo" />
<div class="app-loading-title">%VITE_APP_TITLE%</div>
<div class="app-loading-title" id="app-loading-title">%VITE_APP_TITLE%</div>
</div>
<div class="app-loading-item">
<div class="app-loading-outter"></div>

74
src/api/eam/equipmentMaintenanceMain/index.ts

@ -0,0 +1,74 @@
import request from '@/config/axios'
export interface EquipmentMaintenanceMainVO {
id: number
number: string
describing: string
equipmentCode: string
type: string
classes: string
planNumber: string
faultType: string
cycle: string
times: string
verifyer: number
verifyContent: string
verifyTime: Date
maintenancer: number
maintenancePhone: string
completeResult: string
completionTime: Date
maintenanceTime: Date
status: string
factoryAreaCode: string
workshopCode: string
workshopSectionCode: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询设备保养工单主列表
export const getEquipmentMaintenanceMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/equipment-maintenance-main/senior', data })
} else {
return await request.get({ url: `/eam/equipment-maintenance-main/page`, params })
}
}
// 查询设备保养工单主详情
export const getEquipmentMaintenanceMain = async (id: number) => {
return await request.get({ url: `/eam/equipment-maintenance-main/get?id=` + id })
}
// 新增设备保养工单主
export const createEquipmentMaintenanceMain = async (data: EquipmentMaintenanceMainVO) => {
return await request.post({ url: `/eam/equipment-maintenance-main/create`, data })
}
// 修改设备保养工单主
export const updateEquipmentMaintenanceMain = async (data: EquipmentMaintenanceMainVO) => {
return await request.put({ url: `/eam/equipment-maintenance-main/update`, data })
}
// 删除设备保养工单主
export const deleteEquipmentMaintenanceMain = async (id: number) => {
return await request.delete({ url: `/eam/equipment-maintenance-main/delete?id=` + id })
}
// 导出设备保养工单主 Excel
export const exportEquipmentMaintenanceMain = async (params) => {
return await request.download({ url: `/eam/equipment-maintenance-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/equipment-maintenance-main/get-import-template' })
}

77
src/api/eam/maintenance/index.ts

@ -0,0 +1,77 @@
import request from '@/config/axios'
import {InspectionItemSelectSetVO} from "@/api/eam/inspectionItemSelectSet";
export interface MaintenanceVO {
id: number
number: string
name: string
equipmentCode: string
type: string
optionCode: string
cycle: string
startTime: Date
endTime: Date
status: string
approver: number
approveContent: string
approveTime: Date
autoExamine: string
autoAgree: string
directCreateRecord: string
factoryAreaCode: string
workshopCode: string
workshopSectionCode: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询保养计划列表
export const getMaintenancePage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/maintenance/senior', data })
} else {
return await request.get({ url: `/eam/maintenance/page`, params })
}
}
// 查询保养计划详情
export const getMaintenance = async (id: number) => {
return await request.get({ url: `/eam/maintenance/get?id=` + id })
}
// 新增保养计划
export const createMaintenance = async (data: MaintenanceVO) => {
return await request.post({ url: `/eam/maintenance/create`, data })
}
// 修改保养计划
export const updateMaintenance = async (data: MaintenanceVO) => {
return await request.put({ url: `/eam/maintenance/update`, data })
}
// 删除保养计划
export const deleteMaintenance = async (id: number) => {
return await request.delete({ url: `/eam/maintenance/delete?id=` + id })
}
// 导出保养计划 Excel
export const exportMaintenance = async (params) => {
return await request.download({ url: `/eam/maintenance/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/maintenance/get-import-template' })
}
// 启用 / 禁用
export const updateEnableCode = async (data: MaintenanceVO) => {
return await request.post({ url: `/eam/maintenance/ables` , data })
}

38
src/api/eam/sparePart/index.ts

@ -7,23 +7,19 @@ export interface SparePartVO {
brand: string
specifications: string
isOverall: string
isConstant: string
subject: string
subjectCode: string
category: string
type: string
images: string
region: string
classification: string
uom: string
singlePrice: number
stockAge: number
reprocurement: number
safetyStock: number
cost: string
purchaser: string
financer: string
purchaseTime: Date
isFramework: string
isRadeIn: string
manufacturer: string
minInventory: number
maxInventory: number
replacementCycle: number
storageLocation: string
departmentCode: string
remark: string
siteId: string
@ -38,43 +34,43 @@ export const getSparePartPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/sparepart/spare-part/senior', data })
return await request.post({ url: '/eam/basic/spare-part/senior', data })
} else {
return await request.get({ url: `/eam/sparepart/spare-part/page`, params })
return await request.get({ url: `/eam/basic/spare-part/page`, params })
}
}
// 查询备件基础详情
export const getSparePart = async (id: number) => {
return await request.get({ url: `/eam/sparepart/spare-part/get?id=` + id })
return await request.get({ url: `/eam/basic/spare-part/get?id=` + id })
}
// 新增备件基础
export const createSparePart = async (data: SparePartVO) => {
return await request.post({ url: `/eam/sparepart/spare-part/create`, data })
return await request.post({ url: `/eam/basic/spare-part/create`, data })
}
// 修改备件基础
export const updateSparePart = async (data: SparePartVO) => {
return await request.put({ url: `/eam/sparepart/spare-part/update`, data })
return await request.put({ url: `/eam/basic/spare-part/update`, data })
}
// 删除备件基础
export const deleteSparePart = async (id: number) => {
return await request.delete({ url: `/eam/sparepart/spare-part/delete?id=` + id })
return await request.delete({ url: `/eam/basic/spare-part/delete?id=` + id })
}
// 导出备件基础 Excel
export const exportSparePart = async (params) => {
return await request.download({ url: `/eam/sparepart/spare-part/export-excel`, params })
return await request.download({ url: `/eam/basic/spare-part/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/sparepart/spare-part/get-import-template' })
return request.download({ url: '/eam/basic/spare-part/get-import-template' })
}
// 查询备件基础列表
export const getSparePartNoPage = async (params) => {
return await request.get({ url: `/eam/sparepart/spare-part/noPage`, params })
}
return await request.get({ url: `/eam/basic/spare-part/noPage`, params })
}

5
src/api/mes/processroute/index.ts

@ -87,6 +87,11 @@ export const getProcessBomList = async (params) => {
return await request.get({ url: `/mes/common/getBomListByProductAndProcess`,params})
}
// 查询产品bom的工序物料列表
export const getBomListByProductBomAndProcess = async (params) => {
return await request.get({ url: `/mes/common/getBomListByProductBomAndProcess`,params})
}
export const getWorkstationPage = async (code:String) => {
return await request.get({ url: `/mes/workstation/page?pageSize=25&processCode=`+code})
}

5
src/api/qms/inspectionScheme/index.ts

@ -30,3 +30,8 @@ export const enableInspectionScheme = async (id: number) => {
export const disableInspectionScheme = async (id: number) => {
return await request.disable({ url: `/qms/inspection-scheme/disable?id=` + id })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/qms/inspection-scheme/get-import-template' })
}

10
src/api/system/tenant/index.ts

@ -33,7 +33,15 @@ export interface TenantExportReqVO {
// 查询租户列表
export const getTenantPage = (params: TenantPageReqVO) => {
return request.get({ url: '/system/tenant/page', params })
console.log(params)
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return request.post({ url: '/system/tenant/senior', data })
} else {
return request.get({ url: '/system/tenant/page', params })
}
// return request.get({ url: '/system/tenant/page', params })
}
// 查询租户详情

2
src/api/wms/balance/index.ts

@ -83,7 +83,7 @@ export const getBalancePageByBusinessType = async (params) => {
}
// 查询库存余额列表根据业务类型
// 查询库存余额列表根据业务类型的物料类型
export const getBalancePageByBusinessTypeByItemType = async (params) => {
if (params.isSearch) {
delete params.isSearch

10
src/api/wms/countJobMain/index.ts

@ -89,5 +89,13 @@ export const importTemplate = () => {
// 关闭盘点任务主
export const closeCountJobMain = (id: number) => {
return request.download({ url: '/wms/count-job-main/close?id=' + id })
return request.put({ url: '/wms/count-job-main/close?id=' + id })
}
// 关闭盘点任务主
export const handleExportCountJob = async (id: number) => {
let params = {
masterId:id
}
return await request.download({ url: `/wms/count-job-main/export-excel-single`, params })
}

11
src/api/wms/customeritem/index.ts

@ -61,4 +61,15 @@ export const exportCustomeritem = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/customeritem/get-import-template' })
}
// 获得业务类型筛选出的物料分页
export const getPageBusinessTypeToItemCode = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/customeritem/pageBusinessTypeToLocationSenior', data })
} else {
return await request.get({ url: `/wms/customeritem/pageBusinessTypeToItemCode`, params })
}
}

11
src/api/wms/deliverPlanDetail/index.ts

@ -24,6 +24,17 @@ export const selectDetailByMasterID = async (id: number) => {
// 查询发货计划子列表
export const getDeliverPlanDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/deliver-plan-detail/senior', data })
} else {
return await request.get({ url: `/wms/deliver-plan-detail/page`, params })
}
}
// 查询发货计划子列表
export const getDeliverPlanDetailPage1 = async (params) => {
return await request.get({ url: `/wms/deliver-plan-detail/page`, params })
}

13
src/api/wms/deliverPlanMain/index.ts

@ -49,6 +49,19 @@ export const deleteDeliverPlanMain = async (id: number) => {
// 导出发货计划主 Excel
export const exportDeliverPlanMain = async (params) => {
params.businessType = 'Deliver'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/deliver-plan-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/deliver-plan-main/export-excel`, params })
}
}
// 导出发货计划主 Excela
export const exportZZBJDeliverPlanMain = async (params) => {
params.businessType = 'ZZBJDeliver'
if (params.isSearch) {
delete params.isSearch
const data = {...params}

13
src/api/wms/deliverRequestMain/index.ts

@ -65,6 +65,19 @@ export const deleteDeliverRequestMain = async (id: number) => {
// 导出发货申请主 Excel
export const exportDeliverRequestMain = async (params) => {
params.businessType = 'Deliver'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/deliver-request-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/deliver-request-main/export-excel`, params })
}
}
// 导出发货申请主 Excel
export const exportZZBJDeliverRequestMain = async (params) => {
params.businessType = 'ZZBJDeliver'
if (params.isSearch) {
delete params.isSearch
const data = {...params}

10
src/api/wms/location/index.ts

@ -85,6 +85,16 @@ export const selectBusinessTypeToLocation = async (params) => {
}
}
export const selectBusinessTypeOutLocation = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/location/pageBusinessTypeOutLocationSenior', data })
} else {
return request.get({ url: `/wms/location/pageBusinessTypeOutLocation`, params })
}
}
export const selectPageItemAreaToLocation = async (params) => {
if (params.isSearch) {

5
src/api/wms/package/index.ts

@ -115,4 +115,9 @@ export const getLabelDetailPage = async (params) => {
// 根据库存余额获取包装信息进行打印标签
export const getBalanceToPackage = async (packingNumber: String) => {
return await request.get({ url: `/wms/package/getBalanceToPackage?packingNumber=` + packingNumber})
}
// 根据库存余额获取包装信息进行打印标签--批量打印
export const getBalanceToPackageSelection = async (data: any) => {
return await request.post({ url: `/wms/balance/batchPrintLabel` ,data})
}

7
src/api/wms/purchasereceiptJobMain/index.ts

@ -123,4 +123,9 @@ export const abandonPurchasereceiptJobMainSpare = (id: number) => {
// 承接采购收货任务主
export const acceptPurchasereceiptJobMain = (id: number) => {
return request.put({ url: '/wms/purchasereceipt-job-main/accept?id=' + id })
}
}
// 拒收采购收货任务主
export const refusalPurchasereceiptJobMain = (id: number) => {
return request.put({ url: '/wms/purchasereceipt-job-main/refusal?id=' + id })
}

13
src/api/wms/purchasereceiptRecordDetail/index.ts

@ -73,6 +73,17 @@ export const getPurchasereceiptRecordDetailPageSpare = async (params) => {
}
// 查询采购收货记录--退货筛选列表
export const getPurchasereceiptRecordDetailPageReturn = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchasereceipt-record-detail/seniorReturn', data })
} else {
return await request.get({ url: `/wms/purchasereceipt-record-detail/pageReturn`, params })
}
}
export const getPurchasereceiptRecordDetailPageSCP = async (params) => {
if (params.isSearch) {
delete params.isSearch
@ -152,4 +163,4 @@ export const queryPurchaseceiptChildPackingNumber = async (params) => {
// 查询采购收货缺货记录子包装数据
export const queryPurchaseshortageChildPackingNumber = async (params) => {
return await request.get({ url: `/wms/purchaseshortage-detail/pageChildPackingNumber`, params })
}
}

60
src/api/wms/qadCostcentre/index.ts

@ -0,0 +1,60 @@
import request from '@/config/axios'
export interface QadCostcentreVO {
id: number
code: string
usageDescription: string
costcentreId: string
costcentreCode: string
costcentreDescription: string
costcentreActive: string
costcentreType: string
available: string
remark: string
deletionTime: Date
deleterId: string
extraProperties: string
concurrencyStamp: number
siteId: string
}
// 查询QAD成品中心列表
export const getQadCostcentrePage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/qad-costcentre/senior', data })
} else {
return await request.get({ url: `/wms/qad-costcentre/page`, params })
}
}
// 查询QAD成品中心详情
export const getQadCostcentre = async (id: number) => {
return await request.get({ url: `/wms/qad-costcentre/get?id=` + id })
}
// 新增QAD成品中心
export const createQadCostcentre = async (data: QadCostcentreVO) => {
return await request.post({ url: `/wms/qad-costcentre/create`, data })
}
// 修改QAD成品中心
export const updateQadCostcentre = async (data: QadCostcentreVO) => {
return await request.put({ url: `/wms/qad-costcentre/update`, data })
}
// 删除QAD成品中心
export const deleteQadCostcentre = async (id: number) => {
return await request.delete({ url: `/wms/qad-costcentre/delete?id=` + id })
}
// 导出QAD成品中心 Excel
export const exportQadCostcentre = async (params) => {
return await request.download({ url: `/wms/qad-costcentre/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/qad-costcentre/get-import-template' })
}

59
src/api/wms/qadProject/index.ts

@ -0,0 +1,59 @@
import request from '@/config/axios'
export interface QadProjectVO {
id: number
projectId: string
projectCode: string
projectDescription: string
projectStartDate: string
projectEndDate: string
statusCode: string
available: string
remark: string
deletionTime: Date
deleterId: string
extraProperties: string
concurrencyStamp: number
siteId: string
}
// 查询QAD项目信息列表
export const getQadProjectPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/qad-project/senior', data })
} else {
return await request.get({ url: `/wms/qad-project/page`, params })
}
}
// 查询QAD项目信息详情
export const getQadProject = async (id: number) => {
return await request.get({ url: `/wms/qad-project/get?id=` + id })
}
// 新增QAD项目信息
export const createQadProject = async (data: QadProjectVO) => {
return await request.post({ url: `/wms/qad-project/create`, data })
}
// 修改QAD项目信息
export const updateQadProject = async (data: QadProjectVO) => {
return await request.put({ url: `/wms/qad-project/update`, data })
}
// 删除QAD项目信息
export const deleteQadProject = async (id: number) => {
return await request.delete({ url: `/wms/qad-project/delete?id=` + id })
}
// 导出QAD项目信息 Excel
export const exportQadProject = async (params) => {
return await request.download({ url: `/wms/qad-project/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/qad-project/get-import-template' })
}

66
src/api/wms/subjectAccount/index.ts

@ -0,0 +1,66 @@
import request from '@/config/axios'
export interface SubjectAccountVO {
id: number
code: string
usageDescription: string
costecentreId: string
costecentreCode: string
costecentreType: string
projectId: string
projectCode: string
address: string
available: string
remark: string
deletionTime: Date
deleterId: string
extraProperties: string
concurrencyStamp: number
siteId: string
}
// 查询科目账户配置列表
export const getSubjectAccountPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/subject-account/senior', data })
} else {
return await request.get({ url: `/wms/subject-account/page`, params })
}
}
// 查询科目账户配置详情
export const getSubjectAccount = async (id: number) => {
return await request.get({ url: `/wms/subject-account/get?id=` + id })
}
// 新增科目账户配置
export const createSubjectAccount = async (data: SubjectAccountVO) => {
return await request.post({ url: `/wms/subject-account/create`, data })
}
// 修改科目账户配置
export const updateSubjectAccount = async (data: SubjectAccountVO) => {
return await request.put({ url: `/wms/subject-account/update`, data })
}
// 删除科目账户配置
export const deleteSubjectAccount = async (id: number) => {
return await request.delete({ url: `/wms/subject-account/delete?id=` + id })
}
// 导出科目账户配置 Excel
export const exportSubjectAccount = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/subject-account/export-excel-senior`, data })
}else{
return await request.download({ url: `/wms/subject-account/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/subject-account/get-import-template' })
}

20
src/components/Form/src/Form.vue

@ -175,10 +175,7 @@ export default defineComponent({
const Com = componentMap['Divider'] as ReturnType<typeof defineComponent>
let labelName = item?.label || ''
if(item?.label){
labelName = t(`ts.${item?.label}`)
if(labelName === 'ts.' + item?.label){
labelName = item?.label
}
labelName = t(`ts.${item?.label}`).replace('ts.','')
}
return isDivider ? (
<Com {...{ contentPosition: 'left', ...item.componentProps }}>{labelName}</Com>
@ -227,18 +224,12 @@ export default defineComponent({
if (item?.labelMessage) {
let labelName = item.label || ''
if(item.label){
labelName = t(`ts.${item.label}`)
if(labelName === 'ts.' + item.label){
labelName = item.label
}
labelName = t(`ts.${item.label}`).replace('ts.','')
}
let labelMessage = item.labelMessage || ''
if(item.labelMessage){
labelMessage = t(`ts.${item.labelMessage}`)
if(labelMessage === 'ts.' + item.labelMessage){
labelMessage = item.labelMessage
}
labelMessage = t(`ts.${item.labelMessage}`).replace('ts.','')
}
formItemSlots.label = () => {
return (
@ -367,10 +358,7 @@ export default defineComponent({
}
let labelName = item.label || ''
if(item.label){
labelName = t(`ts.${item.label}`)
if(labelName === 'ts.' + item.label){
labelName = item.label
}
labelName = t(`ts.${item.label}`).replace('ts.','')
}
return (
<ElFormItem {...(item.formItemProps || {})} prop={item.field} label={labelName}>

5
src/components/Form/src/components/useRenderSelect.tsx

@ -35,10 +35,7 @@ export const useRenderSelect = (slots: Slots) => {
const { label, value, ...other } = option
const zhName = labelAlias ? option[labelAlias] : label;//中文名称
let labelName = t(`ts.${zhName}`)
if(labelName === 'ts.' + zhName){
labelName = zhName
}
let labelName = t(`ts.${zhName}`).replace('ts.','')
return (
<ElOption

7
src/components/Form/src/helper.ts

@ -17,12 +17,7 @@ export const setTextPlaceholder = (schema: FormSchema): PlaceholderModel => {
let labelName = schema.label || ''
if(schema.label){
labelName = t(`ts.${schema.label}`)
if(labelName === 'ts.' + schema.label){
labelName = ' '+schema.label
}else{
labelName = ' ' + labelName
}
labelName = ' '+t(`ts.${schema.label}`).replace('ts.','')
}
if (textMap.includes(schema?.component as string)) {

339
src/components/ImportForm/src/ImportDetailForm.vue

@ -0,0 +1,339 @@
<!-- 导入组件 -->
<template>
<Dialog v-model="dialogVisible" :title="t('ts.导入')" width="600" :close-on-click-modal="false">
<el-upload
ref="uploadRef"
v-model:file-list="fileList"
:action="
importUrl +
'?mode=' +
mode +
'&file=' +
file +
'&updatePart=' +
updatePart +
'&outFile=' +
outFile +
'&extend=' + extend +
'&fromInventoryStatus=' + fromInventoryStatus +
'&toInventoryStatus=' + toInventoryStatus
"
:auto-upload="false"
:disabled="formLoading"
:headers="uploadHeaders"
:limit="1"
:on-error="submitFormError"
:on-exceed="handleExceed"
:on-success="submitFormSuccess"
:accept="accept"
drag
style="width: 300px; margin: 0 auto"
v-loading="formLoading"
>
<Icon icon="ep:upload-filled" color="#c0c4cc" :size="60" />
<div class="el-upload__text">{{t('ts.将文件拖到此处,或')}}<em>{{t('ts.点击上传')}}</em></div>
<template #tip>
<div class="el-upload__tip ml--126px mr--80px">
<div class="flex">
<div
class="label h-32px mr-26px color-#acaeb3 font-size-14px w-100px text-right"
style="line-height: 32px"
>{{t('ts.导入模式')}}</div
>
<div class="">
<div class="radio">
<el-radio-group v-model="mode">
<el-radio :label="1" :disabled="updateIsDisable">{{ t('ts.更新')}}</el-radio>
<!-- <el-radio :label="2" :disabled="appendIsDisable">{{ t('ts.追加') }}</el-radio>
<el-radio :label="3" :disabled="coverIsDisable">{{ t('ts.覆盖') }}</el-radio> -->
</el-radio-group>
</div>
<div class="tips color-#acaeb3 font-size-14px">
<div class="mt-2">{{t('ts.更新:新增并修改')}}</div>
<!-- <div class="mt-2">{{ t('ts.追加:只新增,不修改') }}</div>
<div class="mt-2">{{ t('ts.覆盖:只修改不新增') }}</div> -->
</div>
</div>
</div>
<div class="flex mt-16px">
<!-- <div
class="label h-32px mr-26px color-#acaeb3 font-size-14px w-100px text-right"
style="line-height: 32px"
>{{ t('ts.部分保存') }}</div
>
<div class="">
<div class="switch">
<el-switch v-model="updatePart" />
</div>
<div class="tips color-#acaeb3 font-size-14px">
<div class="mt-2">{{ t('ts.部分保存:如存在错误数据,正确数据正常导入') }}</div>
<div class="mt-2">{{ t('ts.全部保存:全部数据正确,才能导入') }}</div>
</div>
</div> -->
</div>
<div class="flex mt-16px" v-if="isShowOut">
<div
class="label h-32px mr-26px color-#acaeb3 font-size-14px w-100px text-right"
style="line-height: 32px"
>是否外部资源</div
>
<div class="">
<div class="switch">
<el-switch v-model="outFile" />
</div>
</div>
</div>
</div>
</template>
</el-upload>
<template #footer>
<div class="flex items-center">
<div class="flex-1 text-left">
<!-- <el-button type="primary" plain @click="importTemplate">
<Icon icon="ep:download" />
{{ t('ts.下载模板') }}
</el-button> -->
</div>
<el-button :disabled="formLoading" type="primary" @click="submitForm">{{ t('ts.确 ') }}</el-button>
<el-button @click="dialogVisible = false">{{ t('ts.取 消') }}</el-button>
</div>
</template>
</Dialog>
</template>
<script lang="ts" setup>
import { getAccessToken, getTenantId } from '@/utils/auth'
import download from '@/utils/download'
defineOptions({ name: 'ImportDetailForm' })
const { t } = useI18n()
const message = useMessage() //
const dialogVisible = ref(false) //
const formLoading = ref(false) //
const uploadRef = ref()
const uploadHeaders = ref() // Header
const fileList = ref([]) //
const file = ref('')
const props = defineProps({
importTemplateData: {
type: Object,
required: true
},
//
accept: {
type: String,
required: false,
default: '.xlsx,.xls'
},
// .1
mode: {
type: Number,
required: false,
default: 1
},
// ,
updateIsDisable: {
type: Boolean,
required: false,
default: false
},
// ,
appendIsDisable: {
type: Boolean,
required: false,
default: false
},
// ,
coverIsDisable: {
type: Boolean,
required: false,
default: false
},
// ,
updatePart: {
type: Boolean,
required: false,
default: false
},
url: {
type: String,
required: false
},
//
isShowOut: {
type: Boolean,
required: false,
default: false
},
outFile: {
type: Boolean,
required: false,
default: false
},
//
extend: {
type: String,
required: false,
default: ''
},
// TODO: cxm
fromInventoryStatus: {
type: String,
required: false,
default: ''
},
// TODO: cxm
toInventoryStatus: {
type: String,
required: false,
default: ''
}
})
const importTemplateData = ref(props.importTemplateData)
const accept = ref(props.accept)
const mode = ref(props.mode) //.1
const updateIsDisable = ref(props.updateIsDisable) //,
const appendIsDisable = ref(props.appendIsDisable) //,
const coverIsDisable = ref(props.coverIsDisable) //,
const updatePart = ref(props.updatePart) //
const outFile = ref(props.outFile) //
const importUrl = import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + props.url
/** 打开弹窗 */
const open = () => {
dialogVisible.value = true
resetForm()
}
defineExpose({ open }) // open
/** 提交表单 */
const submitForm = async () => {
if (fileList.value.length == 0) {
message.error('请上传文件')
return
}
file.value = fileList.value[0].name
//
uploadHeaders.value = {
Authorization: 'Bearer ' + getAccessToken(),
'tenant-id': getTenantId()
}
formLoading.value = true
uploadRef.value!.submit()
}
/** 文件上传成功 */
const emits = defineEmits(['success'])
const submitFormSuccess = (response: any) => {
formLoading.value = true
console.log(response)
if (response) {
if (response.code == 500) {
uploadRef.value!.clearFiles()
message.error('导入失败')
formLoading.value = false
return
} else if (response.code == 0) {
if (response.data.errorCount > 0) {
message.confirm('文件中有部分数据导入失败,是否下载失败数据?').then(() => {
// download.excel(file, 'file_' + new Date().getTime())
// url
// const downloadElement = document.createElement('a')
// console.log(172, import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + '/' + response.data.errorFile)
// console.log(172, import.meta.env.VITE_BASE_URL + '/admin-api/opt/profile/' + response.data.errorFile)
window.open(
import.meta.env.VITE_BASE_URL + '/admin-api' + response.data.errorFile,
'222'
)
// downloadElement.setAttribute('href', import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + response.data.errorFile )
//
// downloadElement.click()
})
} else {
message.success('导入成功')
}
}else if(response.data == null){
message.error(response.msg)
}
}
// if (response.code !== 0) {
// message.error(response.msg)
// formLoading.value = false
// return
// }
// //
// const data = response.data
// const create = response.data.importResult[0]
// const update = response.data.importResult[1]
// const failure = response.data.importResult[2]
// let text = '' + data[create].length + ';'
// for (let name of data[create]) {
// text += '< ' + name + ' >'
// }
// text += '' + data[update].length + ';'
// for (const name of data[update]) {
// text += '< ' + name + ' >'
// }
// text += '' + Object.keys(data[failure]).length + ';'
// for (const name in data[failure]) {
// text += '< ' + name + ': ' + data[failure][name] + ' >'
// }
// message.alert(text)
//
formLoading.value = false
emits('success')
dialogVisible.value = false
}
/** 上传错误提示 */
const submitFormError = (): void => {
message.error('上传失败,请您重新上传!')
formLoading.value = false
}
/** 重置表单 */
const resetForm = () => {
//
formLoading.value = false
uploadRef.value?.clearFiles()
fileList.value = []
}
/** 文件数超出提示 */
const handleExceed = (): void => {
message.error('最多只能上传一个文件!')
}
/** 下载模板操作 */
const importTemplate = () => {
const res = importTemplateData.value.templateUrl
download.excel(res, importTemplateData.value.templateTitle)
}
</script>
<style scoped lang="scss">
.tips {
div {
position: relative;
padding-left: 22px;
&::before {
width: 4px;
height: 4px;
border-radius: 50%;
content: '';
background: #c2c2c2;
position: absolute;
top: 50%;
margin-top: -2px;
left: 4px;
}
}
}
</style>

5
src/components/Table/src/Table.vue

@ -289,10 +289,7 @@ export default defineComponent({
return [...[renderTableExpand()], ...[renderTableSelection()]].concat(
(columnsChildren || columns).map((v) => {
const zhName = v.label || '';//
let labelName = t(`ts.${v.label}`)
if(labelName === 'ts.' + zhName){
labelName = zhName
}
let labelName = t(`ts.${v.label}`).replace('ts.','')
//
if (v.type === 'index') {
return (

7
src/components/TableForm/src/TableForm.vue

@ -64,7 +64,7 @@
v-model="row[headerItem.field]"
clearable
:type="headerItem?.tableForm?.inputType"
:placeholder="headerItem?.tableForm?.placeholder || '请输入' + headerItem.label"
:placeholder="t(`ts.${headerItem?.tableForm?.placeholder || '请输入' + headerItem.label}`).replace('ts.','')"
:disabled="headerItem?.tableForm?.disabled ? true: headerItem?.tableForm?.isInpuFocusShow ? true : false"
style="flex:1"
@blur="inputStringBlur(headerItem.field, row[headerItem.field], row)"
@ -534,7 +534,10 @@ defineExpose({
padding: 2px 0px;
border: none;
}
::v-deep(.el-form-item--default) {
margin-bottom: 5px;
margin-top: 5px;
}
::v-deep(.el-table td.el-table__cell .el-form-item__content) {
display: flex !important;
align-items: center !important;

4
src/components/UploadFile/src/UploadFile.vue

@ -23,10 +23,10 @@
<el-button type="primary"><Icon icon="ep:upload-filled" />{{ title }}</el-button>
<template v-if="isShowTip" #tip>
<div style="font-size: 8px;margin-top: 10px;line-height: initial;">
大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
{{t('ts.大小不超过')}} <b style="color: #f56c6c">{{ fileSize }}MB</b>
</div>
<div style="font-size: 8px;line-height: initial;">
格式为 <b style="color: #f56c6c">{{ fileType.join('/') }}</b> 的文件
{{ t('ts.格式为') }} <b style="color: #f56c6c">{{ fileType.join('/') }}</b> {{ t('ts.的文件') }}
</div>
</template>
<template v-if="!isShowFile" #file >

16
src/components/rowDrop/index.vue

@ -82,9 +82,13 @@ const closeRowDrop = () => {
const save = () => {
let saveDate:any[] = []
//
saveDate.push(props.allSchemas.tableColumns[0])
let myTableColumns = props.allSchemas.tableColumns
if(props.detailAllSchemas){
myTableColumns = [...props.allSchemas?.tableColumns,...props.detailAllSchemas?.tableMainColumns]
}
saveDate.push(myTableColumns[0])
allData.value.forEach((item) => {
const _item:any = props.allSchemas.tableColumns.find(itemColumns => (itemColumns.label == item ))
const _item:any = myTableColumns.find(itemColumns => (itemColumns.label == item ))
if(_item){
_item.isTable = false
if (checkedDataList.value.indexOf(_item.label) > -1) {
@ -94,7 +98,7 @@ const save = () => {
}
})
//
saveDate.push(props.allSchemas.tableColumns[props.allSchemas.tableColumns.length-1])
saveDate.push(myTableColumns[myTableColumns.length-1])
updataTableColumns(saveDate)
console.log(99, saveDate)
RedisApi.addRedis({key: routeName.value,value: JSON.stringify(saveDate)}).then(() => {
@ -149,7 +153,7 @@ const initSelectSta = () => {
if (item.field != 'action') {
checkedDataList.value.push(item.label)
_showTableColumns.push(_myTableColumns.find(myItem => (myItem.label == item.label)))
allData.value.push(t(`ts.${item.label}`))
allData.value.push(t(`ts.${item.label}`).replace('ts.',''))
}
}
})
@ -161,7 +165,7 @@ const initSelectSta = () => {
if (!myTableItem.fixed) {
if (myTableItem.field != 'action') {
if (allData.value.indexOf(myTableItem.label) == -1) {
allData.value.push(t(`ts.${myTableItem.label}`))
allData.value.push(t(`ts.${myTableItem.label}`).replace('ts.',''))
}
}
}
@ -191,7 +195,7 @@ const initSelectSta = () => {
if (!item.fixed) {
if (item.field != 'action') {
checkedDataList.value.push(item.label)
allData.value.push(t(`ts.${item.label}`))
allData.value.push(t(`ts.${item.label}`).replace('ts.',''))
}
}
})

3
src/hooks/web/useTitle.ts

@ -1,6 +1,7 @@
import { watch, ref } from 'vue'
import { isString } from '@/utils/is'
import { useAppStoreWithOut } from '@/store/modules/app'
const { t } = useI18n() // 国际化
const appStore = useAppStoreWithOut()
@ -14,7 +15,7 @@ export const useTitle = (newTitle?: string) => {
title,
(n, o) => {
if (isString(n) && n !== o && document) {
document.title = n
document.title = n.replace(import.meta.env.VITE_APP_TITLE,t(`ts.${import.meta.env.VITE_APP_TITLE}`))
}
},
{ immediate: true }

3
src/layout/components/Footer/src/Footer.vue

@ -1,6 +1,7 @@
<script lang="ts" setup>
import { useAppStore } from '@/store/modules/app'
import { useDesign } from '@/hooks/web/useDesign'
const { t } = useI18n()
// eslint-disable-next-line vue/no-reserved-component-names
defineOptions({ name: 'Footer' })
@ -19,6 +20,6 @@ const title = computed(() => appStore.getTitle)
:class="prefixCls"
class="h-[var(--app-footer-height)] bg-[var(--app-content-bg-color)] text-center leading-[var(--app-footer-height)] text-[var(--el-text-color-placeholder)] dark:bg-[var(--el-bg-color)]"
>
<p style="font-size: 14px">Copyright ©2022-{{ title }}</p>
<p style="font-size: 14px">Copyright ©2022-{{ t(`ts.${title}`) }}</p>
</div>
</template>

38
src/locales/en-US.ts

@ -56,6 +56,7 @@ export default {
copySuccess: 'Copy Success',
copyError: 'Copy Error',
closeSuccess: 'Close Success',
refusalSuccess: 'Refusal Success',
reAddSuccess: 'ReAdd Success',
submitSuccess: 'Submit Success',
agreeSuccess: 'Agree Success',
@ -66,6 +67,7 @@ export default {
giveupSuccess: 'Giveup Success',
dealwithSuccess: 'Dealwith Success',
confirmColse: 'Confirm Close?',
confirmRefusal: 'Confirm Refusal?',
confirmReAdd: 'Confirm ReAdd?',
confirmAgree: 'Confirm Agree?',
confirmRefused: 'Confirm Refused?',
@ -1063,7 +1065,6 @@ export default {
:'Purchasing price approver',
:'Supplier\'s invoice number',
:'loading',
:'Please enter remarks',
'正在上传文件,请稍候':'Please wait while uploading files',
:'upload successful',
:'The number of uploaded files cannot exceed',
@ -1084,12 +1085,35 @@ export default {
:'Invoicing calendar management',
:'description',
:'Batch delete',
:'Check the quality inspection report'
:'Check the quality inspection report',
:'ChangChun',
:'ChengDu',
:'HELLA Smart Factory Management Platform',
:'Purchase unreceived record',
:'Please select the desired shipment tracking number',
:'Not more in size',
:'File in',
:'format',
:'Receive',
:'Please input batch',
:'Please input the supplier batch',
:'Option Date',
:'Please input comment',
1:'Please input package specification1',
1:'Please input package quantity1',
2:'Please input package specification2',
2:'Please input package quantity2',
:'submit for approval',
// 系统管理:'system management',
// 基础设施:'infrastructure',
// 报表管理:'report manager',
// 报表:'statement',
// 富维海拉供应商管理系统:'vendor management system',
:'Please enter your username',
:'Please enter email',
:'Forget Password',
:'User Name',
:'Mail',
},

35
src/locales/zh-CN.ts

@ -56,6 +56,7 @@ export default {
copySuccess: '复制成功',
copyError: '复制失败',
closeSuccess: '关闭成功',
refusalSuccess: '拒收成功',
reAddSuccess: '重新添加成功',
submitSuccess: '提交成功',
agreeSuccess: '审批通过成功',
@ -66,6 +67,7 @@ export default {
acceptSuccess: '承接成功',
giveupSuccess: '放弃成功',
confirmColse: '确认关闭吗?',
confirmRefusal: '确认拒收吗?',
confirmReAdd: '确认重新添加吗?',
confirmAgree: '确认审批通过吗?',
confirmRefused: '确认审批驳回吗?',
@ -1063,7 +1065,6 @@ export default {
:'采购价格审批人',
:'供应商发货单号',
:'加载中',
:'请输入备注',
'正在上传文件,请稍候':'正在上传文件,请稍候...',
:'上传成功',
:'上传文件数量不能超过',
@ -1084,9 +1085,35 @@ export default {
:'开票日历管理',
:'描述',
:'批量删除',
:'查看质检报告'
:'查看质检报告',
:'长春',
:'成都',
:'富维海拉智慧工厂管理平台',
:'采购未收货记录',
:'请选择要货计划单号',
:'大小不超过',
:'格式为',
:'的文件',
:'接收',
:'请输入批次',
:'请输入供应商批次',
:'选择日期',
:'请输入备注',
1:'请输入包装规格1',
1:'请输入包装数量1',
2:'请输入包装规格2',
2:'请输入包装数量2',
:'提交审批',
:'系统管理',
:'基础设施',
:'报表管理',
:'报表',
:'富维海拉供应商管理系统',
:'请输入用户名',
:'请输入邮箱',
:'忘记密码',
:'用户名',
:'邮箱',

6
src/main.ts

@ -43,6 +43,7 @@ import Logger from '@/utils/Logger'
import VueDOMPurifyHTML from 'vue-dompurify-html' // 解决v-html 的安全隐患
import DataVVue3 from '@kjgl77/datav-vue3'
import { useLocaleStore } from '@/store/modules/locale'
// 创建实例
const setupAll = async () => {
@ -70,6 +71,11 @@ const setupAll = async () => {
app.mount('#app')
app.config.warnHandler = () => null;
}
// 多语言相关
const localeStore = useLocaleStore()
if(localeStore&&localeStore.currentLocale&&localeStore.currentLocale.lang.indexOf('en')>-1&&document.querySelector('#app-loading-title')){
document.querySelector('#app-loading-title').innerHTML = 'HELLA Smart Factory Management Platform' // 富维海拉智慧工厂管理平台
}
setupAll()

3
src/utils/dict.ts

@ -348,4 +348,5 @@ export enum DICT_TYPE {
SUBJECT = 'subject', //科目
REGION = 'region', //区域
PART_CLASS = 'part_class', //备件分类
}
MAINTENANCE_CYCLE ='maintenance_cycle' // 保养周期
}

4
src/utils/disposition/defaultButtons.ts

@ -289,7 +289,7 @@ export function mainListDisableBtn(option:any) {
// 主列表-中止按钮1
export function mainListSuspend1Btn(option:any) {
return __defaultBtnOption(option,{
label: t(`ts.中止`),
label: t(`ts.中止`).replace('ts.',''),
name: 'suspend',
hide: false,
type: 'danger',
@ -624,7 +624,7 @@ export function mainListPurchasePlanModBtn(option:any) {
// 主列表-要货计划流程-下架按钮
export function mainListPurchasePlanWitBtn(option:any) {
return __defaultBtnOption(option,{
label: t(`ts.下架`),
label: t(`ts.下架`).replace('ts.',''),
name: 'mainPurPlanWit',
hide: false,
type: 'danger',

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

@ -36,7 +36,7 @@ export const BasicMaintenanceOption = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
},
{
label: '选择集',
label: '选择集ID',
field: 'selectId',
sort: 'custom',
isDetail: true,
@ -45,7 +45,7 @@ export const BasicMaintenanceOption = useCrudSchemas(reactive<CrudSchema[]>([
isSearchList: true, // 开启查询弹窗
searchTitle: '保养选择集信息', // 查询弹窗标题
searchAllSchemas: BasicMaintenanceItemSelectSet.allSchemas, // 查询弹窗所需类
searchField: 'name', // 查询弹窗赋值字段
searchField: 'id', // 查询弹窗赋值字段
searchPage: ItemApi.getBasicMaintenanceItemSelectSetPage, // 查询弹窗所需分页方法
multiple:true,
searchCondition: [{

10
src/views/eam/documentType/documentType.data.ts

@ -23,7 +23,10 @@ export const DocumentType = useCrudSchemas(reactive<CrudSchema[]>([
label: '设备编码',
field: 'code',
sort: 'custom',
isSearch: true,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '名称',
@ -37,7 +40,10 @@ export const DocumentType = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'Select'
}

6
src/views/eam/documentType/index.vue

@ -27,9 +27,9 @@
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>
<template #name="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.name)">
<span>{{ row.name }}</span>
</el-button>
</template>
<template #action="{ row }">

12
src/views/eam/documentTypeSelectSet/documentTypeSelectSet.data.ts

@ -23,6 +23,18 @@ export const DocumentTypeSelectSet = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true,
},
{
label: '选择集类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
isForm: true,
form: {
component: 'Select'
}
},
{
label: '项编号',
field: 'itemCode',

25
src/views/eam/documentTypeSelectSet/itemSelectSetForm.vue

@ -13,6 +13,14 @@
<el-input v-model="formData.name" placeholder="选择集名称" :disabled="isDisabled"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="选择集类型" prop="type">
<el-select v-model="formData.type" style="width: 150px">
<el-option label="设备" value="DEVICE"></el-option>
<el-option label="工装" value="EQUIPMENT"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="describing">
<el-input v-model="formData.describing" placeholder="描述" :disabled="isDisabled"/>
@ -29,8 +37,8 @@
<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.code" closable :disable-transitions="false" @close="handleClose(ent.id)">
{{ ent.code}}
<el-tag v-for="ent in tags" :key="ent.name" closable :disable-transitions="false" @close="handleClose(ent.id)">
{{ 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="addItem">
@ -58,10 +66,6 @@ import { SearchTable } from '@/components/SearchTable'
import { DocumentType} from "@/views/eam/documentType/documentType.data";
import * as documentTypeItemApi from "@/api/eam/documentType";
import {ElInput} from "element-plus";
import {
createDocumentTypeSelectSet,
DocumentTypeSelectSetVO, updateDocumentTypeSelectSet
} from "@/api/eam/documentTypeSelectSet";
defineOptions({ name: 'TeamForm' })
@ -79,6 +83,11 @@ const inputVisible = ref(false)
const isDisabled = ref(false)
const InputRef = ref<InstanceType<typeof ElInput>>()
const options = [
{ value: 'DEVICE', text: '设备' },
{ value: 'EQUIPMENT', text: '工装' },
];
const itemData = ref({
id: '',
code: ''
@ -156,10 +165,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if (formField === 'wenDangItem') {
console.log(val)
val.forEach(item => {
const isExist = tags.value.some(tag => tag.code === item.code);
const isExist = tags.value.some(tag => tag.name === item.name);
if (!isExist){
const newItem = {};
newItem['code'] = item.code;
newItem['name'] = item.name;
newItem['id'] = item.id;
tags.value.push(newItem);
}

318
src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts

@ -0,0 +1,318 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const EquipmentMaintenanceMainRules = reactive({
number: [required],
equipmentCode: [required],
planNumber: [required],
status: [required],
factoryAreaCode: [required],
concurrencyStamp: [required],
})
export const EquipmentMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '保养工单编号',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '描述',
field: 'describing',
sort: 'custom',
isSearch: true,
},
{
label: '设备编号',
field: 'equipmentCode',
sort: 'custom',
isSearch: true,
},
{
label: '设备分类',
field: 'type',
sort: 'custom',
isSearch: true,
},
{
label: '班次枚举',
field: 'classes',
sort: 'custom',
isSearch: true,
},
{
label: '保养计划工单号',
field: 'planNumber',
sort: 'custom',
isSearch: true,
},
{
label: '故障类型枚举',
field: 'faultType',
sort: 'custom',
isSearch: true,
},
{
label: '保养周期',
field: 'cycle',
sort: 'custom',
isSearch: true,
},
{
label: '保养次数',
field: 'times',
sort: 'custom',
isSearch: true,
},
{
label: '验证人',
field: 'verifyer',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '验证内容',
field: 'verifyContent',
sort: 'custom',
isSearch: true,
form: {
component: 'Editor',
componentProps: {
valueHtml: '',
height: 200
}
},
},
{
label: '验证时间',
field: 'verifyTime',
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '保养人id',
field: 'maintenancer',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '保养人联系电话',
field: 'maintenancePhone',
sort: 'custom',
isSearch: true,
},
{
label: '结果枚举临时措施、完成',
field: 'completeResult',
sort: 'custom',
isSearch: true,
},
{
label: '完成时间',
field: 'completionTime',
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '保养时间',
field: 'maintenanceTime',
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '流程状态枚举',
field: 'status',
sort: 'custom',
isSearch: true,
form: {
component: 'Radio'
},
},
{
label: '所属厂区编号',
field: 'factoryAreaCode',
sort: 'custom',
isSearch: true,
},
{
label: '车间编号',
field: 'workshopCode',
sort: 'custom',
isSearch: true,
},
{
label: '工段编号',
field: 'workshopSectionCode',
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: '是否可用默认TRUE',
field: 'available',
sort: 'custom',
isSearch: true,
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '删除人id',
field: 'deleterId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

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

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="EquipmentMaintenanceMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="EquipmentMaintenanceMain.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="EquipmentMaintenanceMainRules"
:formAllSchemas="EquipmentMaintenanceMain.allSchemas"
:apiUpdate="EquipmentMaintenanceMainApi.updateEquipmentMaintenanceMain"
:apiCreate="EquipmentMaintenanceMainApi.createEquipmentMaintenanceMain"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="EquipmentMaintenanceMain.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/equipment-maintenance-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { EquipmentMaintenanceMain,EquipmentMaintenanceMainRules } from './equipmentMaintenanceMain.data'
import * as EquipmentMaintenanceMainApi from '@/api/eam/equipmentMaintenanceMain'
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: 'EquipmentMaintenanceMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(EquipmentMaintenanceMain.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: EquipmentMaintenanceMainApi.getEquipmentMaintenanceMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:equipmentMaintenanceMain:create'}), //
//defaultButtons.defaultImportBtn({hasPermi:'eam:equipmentMaintenanceMain:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:equipmentMaintenanceMain: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:equipmentMaintenanceMain:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentMaintenanceMain: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 =EquipmentMaintenanceMain.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 EquipmentMaintenanceMainApi.createEquipmentMaintenanceMain(data)
message.success(t('common.createSuccess'))
} else {
await EquipmentMaintenanceMainApi.updateEquipmentMaintenanceMain(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, 'basicEquipmentMaintenanceMain')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await EquipmentMaintenanceMainApi.deleteEquipmentMaintenanceMain(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 EquipmentMaintenanceMainApi.exportEquipmentMaintenanceMain(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 EquipmentMaintenanceMainApi.importTemplate()
})
</script>

326
src/views/eam/maintenance/index.vue

@ -0,0 +1,326 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Maintenance.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="Maintenance.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="MaintenanceRules"
:formAllSchemas="Maintenance.allSchemas"
:apiUpdate="MaintenanceApi.updateMaintenance"
:apiCreate="MaintenanceApi.createMaintenance"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
@onChange="onChange"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Maintenance.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/maintenance/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { Maintenance,MaintenanceRules } from './maintenance.data'
import * as MaintenanceApi from '@/api/eam/maintenance'
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 * as BasicInspectionOptionApi from "@/api/eam/basicInspectionOption";
import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data";
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts";
import { ToolAccounts } from "@/views/eam/toolAccounts/ToolAccounts.data";
import * as ToolItemApi from "@/api/eam/toolAccounts";
defineOptions({ name: 'Maintenance' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(Maintenance.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: MaintenanceApi.getMaintenancePage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:maintenance:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'eam:maintenance:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'eam:maintenance: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:maintenance:update'}), //
//defaultButtons.mainListDeleteBtn({hasPermi:'eam:basicInspectionOption:delete'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:maintenance:update'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:maintenance: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 =Maintenance.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 MaintenanceApi.createMaintenance(data)
message.success(t('common.createSuccess'))
} else {
await MaintenanceApi.updateMaintenance(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, 'basicMaintenance')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await MaintenanceApi.deleteMaintenance(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 MaintenanceApi.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 MaintenanceApi.updateEnableCode(params.value)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
const onChange = (field, item) => {
console.log(field)
console.log(item)
//
if(field == 'type' && item == 'DEVICE'){
Maintenance.allSchemas.formSchema.forEach((items) => {
if (items.field == 'equipmentCode') {
basicFormRef.value.formRef.setValues({
equipmentCode:''
})
items.componentProps.searchAllSchemas = EquipmentAccounts.allSchemas
items.componentProps.searchPage = EquipmentItemApi.getEquipmentAccountsPage
}
})
}
//
if(field == 'type' && item == 'EQUIPMENT'){
Maintenance.allSchemas.formSchema.forEach((items) => {
if (items.field == 'equipmentCode') {
basicFormRef.value.formRef.setValues({
equipmentCode:''
})
items.componentProps.searchAllSchemas = ToolAccounts.allSchemas
items.componentProps.searchPage = ToolItemApi.getToolAccountsPage
}
})
}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await MaintenanceApi.exportMaintenance(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>

322
src/views/eam/maintenance/maintenance.data.ts

@ -0,0 +1,322 @@
import type {CrudSchema} from '@/hooks/web/useCrudSchemas'
import {dateFormatter} from '@/utils/formatTime'
import { EquipmentAccounts } from "@/views/eam/equipmentAccounts/equipmentAccounts.data";
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts";
// 表单校验
export const MaintenanceRules = reactive({
number: [required],
name: [required],
equipmentCode: [required],
optionCode: [required],
cycle: [required],
startTime: [required],
endTime: [required],
})
export const Maintenance = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '计划编号',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '计划名称',
field: 'name',
sort: 'custom',
isSearch: true,
},
{
label: '设备类别',
field: 'type',
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string',
sort: 'custom',
isSearch: true,
},
{
label: '设备工装编号',
field: 'equipmentCode',
sort: 'custom',
isSearch: true,
isForm: true,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '设备信息', // 查询弹窗标题
searchListPlaceholder: '请选择 设备编号', // 输入框占位文本
searchAllSchemas: EquipmentAccounts.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段
searchPage: EquipmentItemApi.getEquipmentAccountsPage, // 查询弹窗所需分页方法
multiple:true,
searchCondition: [{
key: 'status',
value: 'NORMAL',
action: '==',
isSearch: true,
isMainValue: false
}]
}
}
},
{
label: '方案编号',
field: 'optionCode',
sort: 'custom',
isSearch: true,
},
{
label: '周期',
field: 'cycle',
dictType: DICT_TYPE.MAINTENANCE_CYCLE,
dictClass: 'string',
sort: 'custom',
isSearch: true,
},
{
label: '计划开始时间',
field: 'startTime',
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '计划结束时间',
field: 'endTime',
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '状态',
field: 'status',
sort: 'custom',
isSearch: true,
},
{
label: '审核人',
field: 'approver',
sort: 'custom',
isSearch: true,
},
{
label: '审核内容',
field: 'approveContent',
sort: 'custom',
isSearch: true,
form: {
component: 'Editor',
componentProps: {
valueHtml: '',
height: 200
}
},
},
{
label: '审核时间',
field: 'approveTime',
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '自动审核',
field: 'autoExamine',
sort: 'custom',
isSearch: true,
},
{
label: '自动通过',
field: 'autoAgree',
sort: 'custom',
isSearch: true,
},
{
label: '直接生成记录',
field: 'directCreateRecord',
sort: 'custom',
isSearch: true,
},
{
label: '所属厂区编号',
field: 'factoryAreaCode',
sort: 'custom',
isSearch: true,
},
{
label: '车间编号',
field: 'workshopCode',
sort: 'custom',
isSearch: true,
},
{
label: '工段编号',
field: 'workshopSectionCode',
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'
}
}
]))

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

@ -1,5 +1,4 @@
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[]>([]) // 树形结构
@ -27,7 +26,13 @@ export const MaintenanceItem = useCrudSchemas(reactive<CrudSchema[]>([
},
},
{
label: '保养内容',
label: '保养名称',
field: 'name',
sort: 'custom',
isSearch: true
},
{
label: '保养要求',
field: 'content',
sort: 'custom',
isSearch: true,

4
src/views/eam/sparePart/index.vue

@ -54,7 +54,7 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="SparePart.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/sparepart/spare-part/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm ref="importFormRef" url="/eam/basic/spare-part/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
@ -134,7 +134,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'eam:spare-part:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:spare-part:delete'}), //
//defaultButtons.mainListDeleteBtn({hasPermi:'eam:sparePart:delete'}), //
]
// -

215
src/views/eam/sparePart/sparePart.data.ts

@ -1,5 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as ConfigApi from '@/api/infra/config'
const autoCodeSwitch = await ConfigApi.getConfigKey('sparePartCodeAutoSwitch')
const autoSwitch = ref(false)
@ -12,11 +13,20 @@ export const SparePartRules = reactive({
code: [required],
name: [required],
isOverall: [required],
images: [required],
uom: [required],
concurrencyStamp: [required]
})
export const SparePart = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '备件编号',
field: 'code',
@ -29,19 +39,19 @@ export const SparePart = useCrudSchemas(reactive<CrudSchema[]>([
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true
isSearch: true,
},
{
label: '品牌',
field: 'brand',
sort: 'custom',
isSearch: false
isSearch: true,
},
{
label: '规格型号',
field: 'specifications',
sort: 'custom',
isSearch: false
isSearch: true,
},
{
label: '是否全局',
@ -59,22 +69,6 @@ export const SparePart = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '是否存储',
field: 'isConstant',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '科目',
field: 'subject',
@ -90,13 +84,19 @@ export const SparePart = useCrudSchemas(reactive<CrudSchema[]>([
label: '科目代码',
field: 'subjectCode',
sort: 'custom',
isSearch: false
isSearch: true,
},
{
label: '类别',
field: 'category',
field: 'type',
sort: 'custom',
isSearch: true,
},
{
label: '图片',
field: 'images',
sort: 'custom',
isSearch: false
isSearch: false,
},
{
label: '区域',
@ -104,7 +104,7 @@ export const SparePart = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
dictType: DICT_TYPE.REGION,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false,
isSearch: true,
form: {
component: 'Select'
}
@ -121,71 +121,126 @@ export const SparePart = useCrudSchemas(reactive<CrudSchema[]>([
}
},
{
label: '单位',
label: '计量单位字典',
field: 'uom',
sort: 'custom',
isSearch: false
dictType: DICT_TYPE.UOM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
},
{
label: '单价',
field: 'singlePrice',
sort: 'custom',
isSearch: false
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '库龄',
field: 'stockAge',
label: '生产厂家字符',
field: 'manufacturer',
sort: 'custom',
isSearch: false,
isSearch: true,
},
{
label: '库存下限',
field: 'minInventory',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
},
{
label: '重采购点',
field: 'reprocurement',
label: '库存上限',
field: 'maxInventory',
sort: 'custom',
isSearch: false,
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
},
{
label: '安全库存',
field: 'safetyStock',
label: '更换周期',
field: 'replacementCycle',
sort: 'custom',
isSearch: false,
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
},
{
label: '存放位置描述',
field: 'storageLocation',
sort: 'custom',
isSearch: false,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '成本中心',
field: 'cost',
label: '部门id',
field: 'departmentCode',
sort: 'custom',
isSearch: false
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '采购员',
field: 'purchaser',
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false
isSearch: false,
},
{
label: '财务',
field: 'financer',
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '采购时间',
field: 'purchaseTime',
label: '是否可用默认TRUE',
field: 'available',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: {
component: 'DatePicker',
componentProps: {
@ -200,57 +255,29 @@ export const SparePart = useCrudSchemas(reactive<CrudSchema[]>([
type: 'datetime',
valueFormat: 'x'
}
}
},
{
label: '是否框架协议',
field: 'isFramework',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '是否以旧换新',
field: 'isRadeIn',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
},
{
label: '备注',
field: 'remark',
label: '删除人id',
field: 'deleterId',
sort: 'custom',
isSearch: true
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '是否可用',
field: 'available',
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isForm: false,
isSearch: false,
isTableForm: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',

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

@ -15,7 +15,7 @@
<el-option
v-for="item in tenantArray"
:key="item"
:label="item"
:label="t(`ts.${item}`).replace('ts.','')"
:value="item"
/>
</el-select>

12
src/views/login/forgetPassword.vue

@ -1,22 +1,22 @@
<template>
<div v-loading="loading" class="box">
<el-form ref="formSmsLogin" :model="loginData" :rules="rules" label-width="130px" label-position="top" size="large">
<div class="title">忘记密码</div>
<div class="title">{{ t('ts.忘记密码') }}</div>
<el-row type="flex" justify="center" align="middle">
<el-col>
<el-form-item label="用户名" prop="username" align="center">
<el-input v-model="loginData.username" placeholder="请输入用户名" />
<el-form-item :label="t('ts.用户名')" prop="username" align="center">
<el-input v-model="loginData.username" :placeholder="t('ts.请输入用户名')" />
</el-form-item>
</el-col>
<el-col>
<el-form-item label="邮箱" prop="email">
<el-input v-model="loginData.email" placeholder="请输入邮箱" />
<el-form-item :label="t('ts.邮箱')" prop="email">
<el-input v-model="loginData.email" :placeholder="t('ts.请输入邮箱')" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm" style="width: 100%;height: 40px;line-height: 40px;"> </el-button>
<el-button type="primary" @click="submitForm" style="width: 100%;height: 40px;line-height: 40px;">{{t('ts.确 定')}}</el-button>
</div>
</div>
</template>

4
src/views/login/login.vue

@ -10,7 +10,7 @@
<!-- 左上角的 logo + 系统标题 -->
<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>
<span class="text-20px font-bold">{{ t(`ts.${underlineToHump(appStore.getTitle)}`) }}</span>
</div>
<!-- 左边的背景图 + 欢迎语 -->
<div class="h-[calc(100%-60px)] flex items-center justify-center">
@ -34,7 +34,7 @@
>
<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" />
<span class="text-20px font-bold">{{ underlineToHump(appStore.getTitle) }}</span>
<span class="text-20px font-bold">{{ t(`ts.${underlineToHump(appStore.getTitle)}`) }}</span>
</div>
<div class="flex items-center justify-end space-x-10px">
<!-- <ThemeSwitch /> -->

1
src/views/mes/dismantlingMain/dismantlingMain.data.ts

@ -74,7 +74,6 @@ export const DismantlingMain = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '删除用户名',

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

@ -53,7 +53,7 @@
<!-- 详情 -->
<Detail ref="detailRef"
:isBasic="false"
:isBasicMes="true"
:isBasicMes="false"
:allSchemas="DismantlingMain.allSchemas"
:detailAllSchemas="DismantlingDetail.allSchemas"
:detailAllSchemasRules="DismantlingDetailRules"

24
src/views/mes/holiday/holiday.data.ts

@ -1,8 +1,17 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
// 表单校验
export const HolidayRules = reactive({
holidayName: [
{ required: true, message: '请输入节日名称', trigger: 'blur' }
],
holidayType: [
{ required: true, message: '请输入节日类型', trigger: 'blur' }
],
holidayDate: [
{ required: true, message: '请输入节日日期', trigger: 'blur' }
],
})
export const Holiday = useCrudSchemas(reactive<CrudSchema[]>([
@ -10,7 +19,9 @@ export const Holiday = useCrudSchemas(reactive<CrudSchema[]>([
label: '主键',
field: 'id',
sort: 'custom',
isForm: false,
isSearch: false,
isTable:false,
isForm:false
},
@ -56,13 +67,13 @@ export const Holiday = useCrudSchemas(reactive<CrudSchema[]>([
label: '节日日期',
field: 'holidayDate',
sort: 'custom',
formatter: dateFormatter,
formatter: dateFormatter2,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
type: 'date',
valueFormat: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD 00:00:00',
}
},
form: {
@ -72,12 +83,13 @@ export const Holiday = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x'
}
},
},
{
label: '状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.QUALIFY_STATUS,
dictType: DICT_TYPE.COMMON_STATUS,
dictClass: 'string',
isForm: true,
isSearch: false,
@ -86,7 +98,7 @@ export const Holiday = useCrudSchemas(reactive<CrudSchema[]>([
component: 'Switch',
value: '1',
componentProps: {
inactiveValue: '2',
inactiveValue: '0',
activeValue: '1'
}
},

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

@ -123,10 +123,11 @@ export const HrPersonAbility = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '人员信息', // 查询弹窗标题
searchAllSchemas: searchUser.allSchemas, // 查询弹窗所需类
searchField: 'username', // 查询弹窗赋值字段
searchListPlaceholder: '请选择 人员工号', // 输入框占位文本
searchPage: UserApi.getUserPage, // 查询弹窗所需分页方法
searchCondition: [{
action: "==",
column: 'userType',
action: '==',
key: 'userType',
value: 'WORKER'
}]
}
@ -141,6 +142,7 @@ export const HrPersonAbility = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '能力矩阵信息', // 查询弹窗标题
searchListPlaceholder: '请选择 能力编号', // 输入框占位文本
searchAllSchemas: AbilityInfo.allSchemas, // 查询弹窗所需类
searchField: 'ablityCode', // 查询弹窗赋值字段
searchPage: AbilityInfoApi.getAbilityInfoPage, // 查询弹窗所需分页方法

39
src/views/mes/item/index.vue

@ -81,7 +81,11 @@ const tableColumns = ref(Item.allSchemas.tableColumns)
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
//console.log("item-search-success-84-val",val)
//console.log("item-search-success-84-formField",formField)
setV[formField] = val[0][searchField]
setV["itemType"] = val[0]["groupCode"]
//setV[] = val[0][searchField]
formRef.setValues(setV)
})
}
@ -152,7 +156,7 @@ const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
if(type == "update"){
Item.allSchemas.formSchema.forEach((item) => {
if (item.field == 'itemCode') {
item.componentProps.disabled = true
}
@ -168,7 +172,7 @@ const openForm = (type: string, row?: any) => {
item.componentProps.disabled = false
}
}
}
if(row.dataType == 'SWITCH'){
if (item.field == 'dataVerify') {
item.componentProps.disabled = true
@ -177,7 +181,7 @@ const openForm = (type: string, row?: any) => {
item.componentProps.disabled = true
}
}
}
if(row.dataType == 'TEXT'){
if (item.field == 'dataVerify') {
item.componentProps.disabled = true
@ -186,8 +190,8 @@ const openForm = (type: string, row?: any) => {
item.componentProps.disabled = true
}
}
})
}
})
}else{
Item.allSchemas.formSchema.forEach((item) => {
if (item.field == 'itemCode') {
@ -202,9 +206,12 @@ const openForm = (type: string, row?: any) => {
if (item.field == 'dataStandvalue') {
item.componentProps.disabled = false
}
if (item.field == 'status') {
item.componentProps.disabled = true
}
})
}
}
basicFormRef.value.open(type, row)
}
@ -293,9 +300,9 @@ const searchFormClick = (searchData) => {
//
const onChangeQG = (field, cur, item) => {
console.log('cur'+cur)
Item.allSchemas.formSchema.forEach((item) => {
if(cur == 'SWITCH'){
if (item.field == 'dataVerify') {
@ -306,8 +313,8 @@ const onChangeQG = (field, cur, item) => {
}
if (item.field == 'status') {
item.componentProps.disabled = false
}
}
}
}
if(cur == 'TEXT'){
if (item.field == 'dataVerify') {
item.componentProps.disabled = true
@ -317,7 +324,7 @@ const onChangeQG = (field, cur, item) => {
}
if (item.field == 'status') {
item.componentProps.disabled = true
}
}
}
if(cur == 'NUMBER'){
if (item.field == 'dataVerify') {
@ -328,13 +335,13 @@ const onChangeQG = (field, cur, item) => {
}
if (item.field == 'status') {
item.componentProps.disabled = true
}
}
}
})
})
}
/** 初始化 **/
onMounted(async () => {

57
src/views/mes/item/item.data.ts

@ -1,14 +1,15 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as QualitygroupApi from '@/api/mes/qualitygroup'
import { Qualitygroup } from '../qualitygroup/qualitygroup.data'
import * as QualityclassApi from '@/api/mes/qualityclass'
import { Qualityclass } from '@/views/mes/qualityclass/qualityclass.data'
// import * as QualitygroupApi from '@/api/mes/qualitygroup'
// import { Qualitygroup } from '@/views/mes/qualitygroup/qualitygroup.data'
// 表单校验
export const ItemRules = reactive({
concurrencyStamp: [required],
itemCode: [{ required: true, message: '请输入编码', trigger: 'blur' }],
itemType: [required],
dataType: [required]
itemCode: [{ required: true, message: '请输入项目编码', trigger: 'blur' }],
itemName: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
qmsClass: [{ required: true, message: '请选择一个质检类别', trigger: 'blur' }],
dataType:[{ required: true, message: '请选择一个数据类型!', trigger: 'blur' }],
})
export const Item = useCrudSchemas(reactive<CrudSchema[]>([
@ -111,19 +112,40 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true,
},
// {
// label: '分组编码',
// field: 'itemType',
// sort: 'custom',
// isSearch: true,
// // form: {
// // componentProps: {
// // isSearchList: true, // 开启查询弹窗
// // searchTitle: '质检分组', // 查询弹窗标题
// // searchListPlaceholder: '请选择质检分组', // 输入框占位文本
// // searchAllSchemas: Qualitygroup.allSchemas, // 查询弹窗所需类
// // searchField: 'code', // 查询弹窗赋值字段
// // searchPage: QualitygroupApi.getQualitygroupPage, // 查询弹窗所需分页方法
// // searchCondition: [{
// // key: 'status',
// // value: '1',
// // action: '=='
// // }]
// // }
// // }
// },
{
label: '类别编码',
field: 'itemType',
label: '质检科目编码',
field: 'qmsClass',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '质检科目信息', // 查询弹窗标题
searchListPlaceholder: '请选择 类别编码', // 输入框占位文本
searchAllSchemas: Qualitygroup.allSchemas, // 查询弹窗所需类
searchTitle: '质检分组', // 查询弹窗标题
searchListPlaceholder: '请选择质检分组', // 输入框占位文本
searchAllSchemas: Qualityclass.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段
searchPage: QualitygroupApi.getQualitygroupPage, // 查询弹窗所需分页方法
searchPage: QualityclassApi.getQualityclassPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'status',
value: '1',
@ -132,13 +154,6 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '质检科目编码',
field: 'qmsClass',
sort: 'custom',
isSearch: true,
},
{
label: '数据类型',
field: 'dataType',
@ -187,7 +202,7 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
isForm: true,
form: {
component: 'Switch',
value: '2',
value: '1',
componentProps: {
inactiveValue: '2',
activeValue: '1'

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

@ -226,8 +226,6 @@ import { Graph } from '@antv/x6'
import * as TeamApi from '@/api/wms/team'
import {searchUser} from "@/views/wms/basicDataManage/orderManage/team/team.data";
import {getStrDictOptions} from "@/utils/dict";
import {Equipment} from "@/views/mes/workstation/workstation.data";
import * as WorkstationApi from "@/api/mes/workstation";
import {DeviceInfo, OrderDay} from "@/views/mes/orderDay/orderDay.data";
//import {TableForm} from '@/components/TableForm/src/TableForm.vue' // TableForm.vue
const graphContainer = ref<HTMLElement | null>(null)
@ -651,6 +649,7 @@ const handleConfirm = (row)=>{
//
_searchCondition.isSearch = true
_searchCondition.filters = filters
searchTableRef.value.open(
'添加人员',//
searchUser.allSchemas,
@ -662,6 +661,7 @@ const handleConfirm = (row)=>{
undefined,
_searchCondition
)
searchTableRef.value.hiddenFilterButton()
}

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

@ -200,7 +200,7 @@ const buttonBaseClick = (val, item) => {
}
}
const publishClosed=(val)=>{
console.log('orderday-publishClosed-200',val)
//console.log('orderday-publishClosed-200',val)
nextTick?.(()=>{
getList()
})

15
src/views/mes/ordermonthplan/mesOrderMonthMain.data.ts

@ -46,12 +46,13 @@ export const MesOrderMonthMain = useCrudSchemas(reactive<CrudSchema[]>([
searchAllSchemas: FactoryList.allSchemas, // 查询弹窗所需类
searchPage: TenantApi.getTenantPage, // 查询弹窗所需分页方法
isHideFilterButton: true,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// action: '==',
// // isMainValue: false
// }
// ]
}
}
},
@ -79,7 +80,7 @@ export const MesOrderMonthMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false
},
{
label: '创建者用户名',
label: '创建者ID',
field: 'creator',
sort: 'custom',
isSearch: true,

6
src/views/mes/processroute/components/configDialog.vue

@ -189,6 +189,7 @@ const tableProcess = ref()
const productData = ref({ name: '', code: '', desc1: '--' }) //
const materialData=ref()
const mouldData = ref()
//const bomVersion=ref()
const page=ref({
total:0,
current:1,
@ -327,6 +328,7 @@ const getProcessBomList = async (pcode,processCode) => {
processCode:processCode
}
return await ProcessrouteApi.getProcessBomList(params);
//return await ProcessrouteApi.getBomListByProductBomAndProcess(params);
}
/** 查询模具基本信息列表 */
const getPatternPage = async (code) => {
@ -363,10 +365,10 @@ const nodeClick = (e, x, y, node, view) => {
currentNode.value.name=node.attrs.title.text
Promise.all([
getProcessInfo(node.id),
getProcessBomList(productCode.value,node.id),
getProcessBomList(productCode.value,node.id),// rowData.value
getPatternPage(node.id),
getWorkstationPage(node.id)
]).then(([processInfoList,basicBom, patternPage,workstationInfoList]) => {
]).then(([processInfo,basicBom, patternPage,workstationInfoList]) => {
//
//message.info(JSON.stringify(processIndoList))
//console.log('basicBom',basicBom)

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

@ -97,6 +97,13 @@ export const Processroute = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
// {
// label: 'BOM版本号',
// field: 'BOMVersion',
// sort: 'custom',
// value: '1',
// isSearch: false,
// },
// {
// label: '版本号',
// field: 'routeVersion',

31
src/views/mes/qualityclass/qualityclass.data.ts

@ -1,11 +1,13 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as QualitygroupApi from '@/api/mes/qualitygroup'
import { Qualitygroup } from '@/views/mes/qualitygroup/qualitygroup.data'
// 表单校验
export const QualityclassRules = reactive({
concurrencyStamp: [required],
code: [{ required: true, message: '请输入代码', trigger: 'blur' }],
name: [required],
code: [{ required: true, message: '请输入编码', trigger: 'blur' }],
name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
groupCode: [{ required: true, message: '请选择一个分组', trigger: 'blur' }],
})
export const Qualityclass = useCrudSchemas(reactive<CrudSchema[]>([
@ -108,10 +110,27 @@ export const Qualityclass = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
},
{
label: '分组类别',
label: '分组',
field: 'groupCode',
sort: 'custom',
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择一个分组', // 输入框占位文本
multiple:false,
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '分组编码', // 查询弹窗标题
searchAllSchemas: Qualitygroup.allSchemas, // 查询弹窗所需类
searchPage: QualitygroupApi.getQualitygroupPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'status',
value: '1',
isMainValue: false
}]
}
}
},
{
label: '状态',
@ -124,7 +143,7 @@ export const Qualityclass = useCrudSchemas(reactive<CrudSchema[]>([
isTable: true,
form: {
component: 'Switch',
value: '2',
value: '1',
componentProps: {
inactiveValue: '2',
activeValue: '1'

21
src/views/mes/qualitygroup/qualitygroup.data.ts

@ -3,9 +3,8 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const QualitygroupRules = reactive({
concurrencyStamp: [required],
code: [required],
name: [required],
code: [{ required: true, message: '请输入编码', trigger: 'blur' }],
name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
})
export const Qualitygroup = useCrudSchemas(reactive<CrudSchema[]>([
@ -102,17 +101,17 @@ export const Qualitygroup = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
},
{
label: '编码名称',
label: '分组名称',
field: 'name',
sort: 'custom',
isSearch: true,
},
{
label: '分组类别',
field: 'groupCode',
sort: 'custom',
isSearch: true,
},
// {
// label: '分组类别',
// field: 'groupCode',
// sort: 'custom',
// isSearch: true,
// },
{
label: '状态',
field: 'status',
@ -124,7 +123,7 @@ export const Qualitygroup = useCrudSchemas(reactive<CrudSchema[]>([
isTable: true,
form: {
component: 'Switch',
value: '2',
value: '1',
componentProps: {
inactiveValue: '2',
activeValue: '1'

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

@ -279,7 +279,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await ReworkBatchApi.exportReworkBatch(tableObject.params)
download.excel(data, '返工登记批量.xlsx')
download.excel(data, '返工返修登记批量.xlsx')
} catch {
} finally {
exportLoading.value = false
@ -294,7 +294,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '返工登记批量导入模版.xlsx'
templateTitle: '返工返修登记(批量)模版.xlsx'
})
//
const importSuccess = () => {

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

@ -279,7 +279,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await ReworkSingleApi.exportReworkSingle(tableObject.params)
download.excel(data, '返工登记单件.xlsx')
download.excel(data, '返工返修登记单件)数据.xlsx')
} catch {
} finally {
exportLoading.value = false
@ -294,7 +294,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '返工登记单件导入模版.xlsx'
templateTitle: '返工返修登记单件导入模版.xlsx'
})
//
const importSuccess = () => {

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

@ -99,8 +99,8 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'mes:workSchedulingQaform:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'mes:workSchedulingQaform:import'}), //
//defaultButtons.defaultAddBtn({hasPermi:'mes:workSchedulingQaform:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'mes:workSchedulingQaform:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'mes:workSchedulingQaform:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -118,7 +118,7 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
//openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
@ -133,14 +133,14 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'mes:workSchedulingQaform:update'}), //
//defaultButtons.mainListEditBtn({hasPermi:'mes:workSchedulingQaform:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'mes:workSchedulingQaform:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
//openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}

43
src/views/mes/workSchedulingQaform/workSchedulingQaform.data.ts

@ -37,6 +37,7 @@ export const WorkSchedulingQaform = useCrudSchemas(reactive<CrudSchema[]>([
field: 'id',
sort: 'custom',
isForm: false,
isTable: false,
},
{
label: '状态',
@ -63,22 +64,7 @@ export const WorkSchedulingQaform = useCrudSchemas(reactive<CrudSchema[]>([
value: 0
},
},
{
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: '删除用户名',
field: 'deleter',
@ -131,6 +117,22 @@ export const WorkSchedulingQaform = useCrudSchemas(reactive<CrudSchema[]>([
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: '检验类型',
field: 'qaFormType',
@ -164,7 +166,7 @@ export const WorkSchedulingQaform = useCrudSchemas(reactive<CrudSchema[]>([
label: '检测数量',
field: 'qaCount',
sort: 'custom',
isSearch: true,
isSearch: false,
form: {
component: 'InputNumber',
value: 0
@ -174,7 +176,7 @@ export const WorkSchedulingQaform = useCrudSchemas(reactive<CrudSchema[]>([
label: '检测合格数量',
field: 'qaCountPassed',
sort: 'custom',
isSearch: true,
isSearch: false,
form: {
component: 'InputNumber',
value: 0
@ -184,7 +186,7 @@ export const WorkSchedulingQaform = useCrudSchemas(reactive<CrudSchema[]>([
label: '检测不合格数量',
field: 'qaCountNotpassed',
sort: 'custom',
isSearch: true,
isSearch: false,
form: {
component: 'InputNumber',
value: 0
@ -194,12 +196,13 @@ export const WorkSchedulingQaform = useCrudSchemas(reactive<CrudSchema[]>([
label: '合格率',
field: 'qaPassRate',
sort: 'custom',
isSearch: true,
isSearch: false,
},
{
label: '操作',
field: 'action',
isForm: false,
isTable:false,
table: {
width: 150,
fixed: 'right'

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

@ -59,7 +59,7 @@
</el-aside>
<el-main>
<div class="calender-class">
<el-calendar ref="calendarMain">
<el-calendar ref="calendarMain" :key="calendarCount">
<template #header="{ date }">
<span>排班日历</span>
<span>{{ date }}</span>
@ -151,7 +151,7 @@
<el-drawer :title="batchTitle" v-model="batchAddDrawer" size="40%">
<div class="demo-drawer_content">
<el-form v-model="batchAddForm">
<el-form-item label="排班日期:" label-width="120px">
<el-form-item label="排班日期:" >
<el-date-picker
v-model="batchAddForm.batchDate"
value-format="YYYY-MM-DD"
@ -162,7 +162,7 @@
>
</el-date-picker>
</el-form-item>
<el-form-item label="规则类型:" label-width="120px">
<el-form-item label="规则类型:" >
<!-- <el-button type="primary" @click="addDomain" link> <Icon icon="ep:plus" /> </el-button> -->
<el-radio-group v-model="ruleType" @change="handleRuleType">
<el-radio label="一班倒">一班倒</el-radio>
@ -170,7 +170,7 @@
<el-radio label="三班倒">三班倒</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="排除非法定休息日:" label-width="120px">
<el-form-item label="排除非法定休息日:">
<el-switch v-model="batchAddForm.excludeRestDay" />
</el-form-item>
@ -329,7 +329,7 @@ interface Team {
name: string
class: string
}
const calendarCount=ref(0)
const currentRow = ref() //
const handleTableCurrentChange = (val: Team) => {
currentRow.value = val
@ -414,6 +414,12 @@ watch(
}
}
)
// watch(
// () => viewDate.value,
// (newVal) => {
// console.log('🚀 ~ file: workcalendar:420 ~ watch ~ viewDate:', newVal)
// }
// )
onMounted(
async function () {
let res=await workCalendarApi.getHolidays(dayjs(currentDate.value).year())
@ -573,9 +579,15 @@ const addWork = () => {
saveList.push(info)
})
//console.log('🚀 ~ file: App.vue:571 ~ addWork ~ saveList:', saveList)
savePlan(saveList)
getViewData(currentRow.value.code, hanleDay.value.day, hanleDay.value.day)
savePlan(saveList,currentRow.value.code, hanleDay.value.day.slice(0, 8) + '01', dayjs(hanleDay.value.day).endOf('month').format('YYYY-MM-DD'))
//nextTick(() => {
//getViewData(currentRow.value.code, hanleDay.value.day.slice(0, 8) + '01', dayjs(hanleDay.value.day).endOf('month').format('YYYY-MM-DD'))
///})
//getViewData(currentRow.value.code, hanleDay.value.day, hanleDay.value.day)
//console.log('🚀 ~ file: App.vue:571 ~ addWork ~ saveList:', dayjs(hanleDay.value.day).endOf('month').format('YYYY-MM-DD'))
drawer.value = false
}
@ -650,8 +662,8 @@ const batchAddWork = () => {
}
})
savePlan(saveList)
getViewData(currentRow.value.code, dateList[0], dateList[1])
savePlan(saveList,currentRow.value.code, dateList[0], dateList[1])
//getViewData(currentRow.value.code, dateList[0], dateList[1])
batchAddDrawer.value = false
batchAddForm.value = {
batchDate: [],
@ -665,8 +677,11 @@ const handleAddClose = () => {
drawer.value = false
}
const savePlan = async (workList) => {
const savePlan = async (workList, code,startTime,endTime) => {
await workCalendarApi.createBatch(workList)
nextTick(() => {
getViewData( code,startTime,endTime)
})
//await workCalendarApi.createObj(workList);
}
const getViewData = async (teamCode: any, startDate: any, endDate: any) => {
@ -676,8 +691,12 @@ const getViewData = async (teamCode: any, startDate: any, endDate: any) => {
endTime: endDate
}
let res = await workCalendarApi.getWorkPlan(params)
//onsole.log('🚀 ~ file: App.vue:689 ~ getViewData ~ getViewData:',res)
viewDate.value = res
calendarCount.value++
// })
//if(res)
viewDate.value = res
//workInfoList.value =viewDate.value
//console.log('🚀 ~ file: App.vue:672 ~ getViewData ~ getViewData:', viewDate.value)
}
@ -726,7 +745,7 @@ const getTeamList = async () => {
//
const handleDelete=(row:any)=>{
message.delConfirm('确认要删除['+row.name+']班组当月排班数据吗?', 'Warning').then(() => {
message.delConfirm('确认要删除['+row.name+']班组当月排班数据吗?', '警告').then(() => {
//console.log('🚀 ~ file: App.vue:720 ~ handleDelete ~ :', dayjs(currentDate.value).endOf('month').format('YYYY-MM-DD'))
deleteWorkPlan(row.code,currentDate.value.slice(0, 8) + '01', dayjs(currentDate.value).endOf('month').format('YYYY-MM-DD'))
@ -742,10 +761,11 @@ const deleteWorkPlan=async (code:any,startTime:any,endTime:any)=>{
startTime:startTime,
endTime: endTime
}
console.log('🚀 ~ file: App.vue:720 ~ deleteWorkPlan ~ :', data)
//console.log('🚀 ~ file: App.vue:720 ~ deleteWorkPlan ~ :', data)
workCalendarApi.deleteWorkPlan(data)
getViewData(code, startTime,endTime)
}
</script>
<style>

4
src/views/mes/workstation/workstation.data.ts

@ -319,8 +319,8 @@ export const abilityPopList = useCrudSchemas(reactive<CrudSchema[]>([
searchAllSchemas: AbilityInfo.allSchemas, // 查询弹窗所需类
searchPage: AbilityInfoApi.getAbilityInfoPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
key: 'status',
value: '1',
isMainValue: false
}]
}

14
src/views/qms/inspectionRecord/index.vue

@ -73,10 +73,20 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InspectionRecordMain.allSchemas.tableColumns)
if(routeName.value=='InspectRecordMain'){
tableColumns.value = tableColumns.value.filter(item=>{
return item.label!='操作'
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
if(routeName.value=='InspectRecordMain'){
tableColumns.value = val.filter(item=>{
return item.label!='操作'
})
}else{
tableColumns.value = val
}
}

22
src/views/qms/inspectionScheme/index.vue

@ -49,6 +49,8 @@
@submitForm="submitForm"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/qms/inspection-scheme/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
@ -60,6 +62,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import AddForm from './addForm.vue'
import * as InspectionSchemeApi from '@/api/qms/inspectionScheme'
import ImportForm from "../../../components/ImportForm/src/ImportForm.vue";
import * as SampleCodeApi from "@/api/qms/sampleCode";
defineOptions({ name: 'InspectionScheme' })
@ -86,7 +90,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'qms:type-template:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:agv-locationrelation:import'}), //
defaultButtons.defaultImportBtn({hasPermi:'qms:inspection-scheme:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'wms:agv-locationrelation:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -240,9 +244,25 @@ const searchFormClick = (searchData) => {
getList() //
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '检验方案导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await InspectionSchemeApi.importTemplate()
})
</script>

6
src/views/wms/basicDataManage/customerManage/saleprice/saleprice.data.ts

@ -215,10 +215,10 @@ export const Saleprice = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
export const SalepriceRules = reactive({
customercode: [
customerCode: [
{ required: true, message: '请输入客户代码', trigger: 'blur' }
],
itemcode: [
itemCode: [
{ required: true, message: '请输入物料代码', trigger: 'blur' }
],
currency: [
@ -233,4 +233,4 @@ export const SalepriceRules = reactive({
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
})
})

3
src/views/wms/basicDataManage/factoryModeling/location/location.data.ts

@ -396,6 +396,9 @@ export const LocationRules = reactive({
warehouseCode: [
{ required: true, message: '请输入仓库代码', trigger: 'change' }
],
qadLocationCode: [
{ required: true, message: '请QAD库位代码', trigger: 'change' }
],
areaCode: [
{ required: true, message: '请输入库区代码', trigger: 'change' }
],

4
src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts

@ -16,7 +16,7 @@ import { t } from '@/hooks/web/useI18n'
export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '物代码',
label: '物代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
@ -752,4 +752,4 @@ export const ItemareaDetail = useCrudSchemas(reactive<CrudSchema[]>([
// 表单校验
export const ItemareaDetailRules = reactive({
})
})

19
src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts

@ -207,6 +207,25 @@ export const Itembasic = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '是否脱离ERP管理',
field: 'isOutErp',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
table: {
width: 100
},
form: {
component: 'Switch',
value: 'FALSE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
{
label: 'ABC类',
field: 'abcClass',

2
src/views/wms/basicDataManage/itemManage/itemwarehouse/itemwarehouse.data.ts

@ -9,7 +9,7 @@ import { Itempackaging } from '../itempackage/itempackage.data'
export const Itemwarehouse = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '物代码',
label: '物代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,

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

@ -29,8 +29,13 @@ const confgiDataOne = await confgiApi.queryByKey("WorkStation-IN")
// 表单校验
export const CallmaterialsRules = reactive({
itemCode: [required],
itemName: [required],
barcodeString: [required]
packUnit: [required],
qty: [required],
productionLineCode: [required],
callmaterialQtySum: [required],
warehouseCode: [required],
workshopCode: [required],
workStationCode: [required],
})
export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
@ -72,7 +77,7 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
isSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchListPlaceholder: '请选择包装规格', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '物料包装信息', // 查询弹窗标题
searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类
@ -90,6 +95,23 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '叫料包装数量',
field: 'callmaterialQty',
sort: 'custom',
table: {
width: 120
},
form: {
component: 'InputNumber',
componentProps: {
disabled: true,
style: {width:'100%'},
min: 0,
precision: 6
}
}
},
{
label: '包装数量',
field: 'qty',
@ -106,6 +128,23 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '叫料总数量',
field: 'callmaterialQtySum',
sort: 'custom',
table: {
width: 120
},
form: {
component: 'InputNumber',
componentProps: {
disabled: true,
style: {width:'100%'},
min: 0,
precision: 6
}
}
},
{
label: '计量单位', // 发料申请 与当前物料计量单位做匹配 : 原PACK_UNIT 修改:UOM
field: 'uom',

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

@ -49,6 +49,12 @@
:apiCreate="CallmaterialsApi.createCallmaterials"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
:sumFormDataByForm ="(formRef,formModel)=>{
const {qty=0,callmaterialQty=0} = formModel
formRef.value.setValues({
callmaterialQtySum:qty*callmaterialQty,
})
}"
/>
<!-- 详情 -->
@ -90,6 +96,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
} else if (formField == 'packUnit') {
setV['uom'] = val[0]['uom']
setV['packUnit'] = val[0]['packUnit']
setV['callmaterialQty'] = val[0]['packQty']
}else {
setV[formField] = val[0][searchField]
}

48
src/views/wms/basicDataManage/labelManage/locationLabel/index.vue

@ -16,7 +16,7 @@
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
<Table v-clientTable ref="tableRef" :selection="true"
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
@ -26,6 +26,7 @@
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
@getSelectionRows="getSelectionRows"
>
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
@ -90,6 +91,7 @@ const { getList, setSearchParams } = tableMethods
const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'wms:package:create'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:package:export'}), //
defaultButtons.mainLisSelectiontPointBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -110,7 +112,9 @@ const buttonBaseClick = (val, item) => {
getList()
}
} else if (val == 'filtrate') { //
} else { //
} else if (val=='selection_point'){//
handleSelectionPoint()
}else { //
console.log('其他按钮', item)
}
}
@ -183,7 +187,17 @@ const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
const src = ref(BASE_URL + '/jmreport/view/929174607016689664?token=' + getAccessToken())
//
const handlePoint = async (row) => {
window.open(src.value+'&id='+row.id)
window.open(src.value+'&relateNumber='+row.id)
}
// const srcPoint = ref(BASE_URL + '/jmreport/view/929174607016689664?token=' + getAccessToken())
const handleSelectionPoint = async ()=>{
let rows:any = []
selectionRows.value.forEach(item=>{
rows = [...rows,...item.selectionRows.map(item1=>item1.id)]
})
console.log('批量打印',rows.join(','))
window.open(src.value+'&relateNumber='+rows.join(','))
}
//
@ -196,6 +210,34 @@ const searchFormClick = (searchData) => {
getList() //
}
watch(
() => tableObject.tableList,
() => {
const currentRows = selectionRows.value.find(item=>item.currentPage==tableObject.currentPage)
if(currentRows){
nextTick(() => {
currentRows.selectionRows.forEach(item=>{
tableRef.value.toggleRowSelection(item,true)
})
})
}
}
)
const selectionRows = ref<any>([])
const tableRef = ref()
const getSelectionRows = (currentPage,currentPageSelectionRows) => {
console.log("getSelectionRows",currentPage,currentPageSelectionRows)
const currentRows = selectionRows.value.find(item=>item.currentPage==currentPage)
if(currentRows){
currentRows.selectionRows = currentPageSelectionRows
}else{
selectionRows.value.push({
currentPage,
selectionRows:currentPageSelectionRows
})
}
}
/** 初始化 **/
onMounted(async () => {
getList()

29
src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue

@ -253,10 +253,31 @@ const handleExport = async () => {
}
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
//
const labelType = ref('') //
const handlePoint = async (row) => {
window.open(src.value+'&asn_number='+row.relateNumber)
console.log(row.packingNumber,445555555555555);
PackageApi.getBalanceToPackage(row.relateNumber).then(res => {
console.log(777,res);
if (res.productionLineCode != null) {
labelType.value = 'zz'
} else {
labelType.value = 'cg'
}
PackageApi.batchPrintingLable((res.number)).then((resLable) =>{
console.log(159,resLable )
//
if (labelType.value == 'cg') {
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
console.log(159,resLable )
window.open(src.value+'&asn_number='+resLable)
} else {
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
window.open(src.value+'&asn_number='+resLable)
}
})
}).catch(err => {
console.log(err)
})
}
// form
@ -304,4 +325,4 @@ onMounted(async () => {
getList()
})
</script>
@/api/wms/itempackage
@/api/wms/itempackage

118
src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue

@ -16,7 +16,7 @@
<el-row>
<el-col :span="24">
<el-form-item label="代码" prop="strategyCode">
<el-input
<el-input key="strategyCode"
v-model="formData.strategyCode"
placeholder="请输入代码"
clearable
@ -26,38 +26,38 @@
</el-col>
<el-col :span="24">
<el-form-item label="名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入名称" clearable />
<el-input key="name" v-model="formData.name" placeholder="请输入名称" clearable />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="描述" prop="description">
<el-input v-model="formData.description" placeholder="请输入描述" clearable />
<el-input key="description" v-model="formData.description" placeholder="请输入描述" clearable />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="优先级" prop="priority">
<el-input-number v-model="formData.priority" :min="0" />
<el-input-number key="priority" v-model="formData.priority" :min="0" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="状态" prop="status">
<el-switch v-model="formData.status" />
<el-switch key="status" v-model="formData.status" />
</el-form-item>
</el-col>
</el-row>
</div>
<!-- 规则条件 -->
<div class="item mt-20px">
<div class="title">规则条件</div>
<el-row>
<el-col :span="24" v-for="(item, index) in formData.condition" :key="index">
<div key="规则条件" class="item mt-20px">
<div key="规则条件title" class="title">规则条件</div>
<el-row key="规则条件row">
<el-col :span="24" v-for="(item, index) in formData.condition" :key="'规则条件row'+index">
<!-- 供应商类型 -->
<el-form-item
<el-form-item key="供应商类型formItem"
v-if="item.ParamCode == 'SupplierType'"
label="供应商类型"
class="flex-top err-120"
>
<el-select
<el-select key="供应商类型Operator"
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
@ -66,10 +66,10 @@
:label="cur.label"
:value="cur.value"
v-for="cur in options.supplierTypeRangeOptions"
:key="cur.value"
:key="'供应商类型Operator'+cur.value"
/>
</el-select>
<el-select
<el-select key="供应商类型Value"
v-model="item.Value"
placeholder="请选择供应商类型"
style="flex: 1"
@ -78,19 +78,19 @@
>
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.SUPPLIER_TYPE)"
:key="dict.value"
:key="'供应商类型Value'+dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- 供应商 -->
<el-form-item
<el-form-item key="供应商formItem"
v-else-if="item.ParamCode == 'SupplierCode'"
label="供应商"
class="err-120"
>
<el-select
<el-select key="供应商Operator"
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
@ -99,10 +99,10 @@
:label="cur.label"
:value="cur.value"
v-for="cur in options.supplierRangeOptions"
:key="cur.value"
:key="'供应商Operator'+cur.value"
/>
</el-select>
<el-select
<el-select key="供应商Value"
v-model="item.Value"
placeholder="请选择供应商"
style="flex: 1"
@ -112,19 +112,19 @@
>
<el-option
v-for="cur in options.supplierList"
:key="cur.code"
:key="'供应商Value'+cur.code"
:label="cur.name"
:value="cur.code"
/>
</el-select>
</el-form-item>
<!-- 星期几 -->
<el-form-item
<el-form-item key="星期几formItem"
v-else-if="item.ParamCode == 'Weekday'"
label="星期几"
class="flex-top err-120"
>
<el-select
<el-select key="星期几Operator"
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
@ -133,7 +133,7 @@
:label="cur.label"
:value="cur.value"
v-for="cur in options.weekRangeOptions"
:key="cur.value"
:key="'星期几Operator'+cur.value"
/>
</el-select>
<div class="checkbox">
@ -141,7 +141,7 @@
<el-checkbox
:label="cur.label"
v-for="cur in options.weekOptions"
:key="cur.value"
:key="'星期几Value'+cur.value"
/>
</el-checkbox-group>
</div>
@ -150,14 +150,14 @@
</el-row>
</div>
<!-- 规则配置 -->
<div class="item mt-20px">
<div class="title">规则配置</div>
<el-row>
<div class="item mt-20px" key="规则配置">
<div class="title" key="规则配置title">规则配置</div>
<el-row key="规则配置Row">
<!-- 开始时间 -->
<el-col :span="24">
<el-col :span="24" key="规则配置Col">
<!-- 开始时间 -->
<el-form-item label="开始时间" prop="BeginTime">
<el-time-select
<el-form-item key="开始时间formItem" label="开始时间" prop="BeginTime">
<el-time-select key="开始时间time"
v-model="formData.configuration.BeginTime"
start="00:00"
end="23:59"
@ -167,8 +167,8 @@
/>
</el-form-item>
<!-- 结束时间 -->
<el-form-item label="结束时间" prop="EndTime">
<el-time-select
<el-form-item key="结束时间formItem" label="结束时间" prop="EndTime">
<el-time-select key="结束时间time"
v-model="formData.configuration.EndTime"
start="00:00"
end="23:59"
@ -178,8 +178,8 @@
/>
</el-form-item>
<!-- 仓库 -->
<el-form-item label="仓库" prop="WarehouseCode">
<el-select
<el-form-item key="仓库formItem" label="仓库" prop="WarehouseCode">
<el-select key="仓库"
v-model="formData.configuration.WarehouseCode"
:placeholder="`请选择${
formData.configuration.WarehouseCode == 'WarehouseCode'
@ -196,49 +196,51 @@
>
<el-option
v-for="cur in options.warehouseList"
:key="cur.code"
:key="'仓库'+cur.code"
:label="cur.code"
:value="cur.code"
/>
</el-select>
</el-form-item>
<!-- 月台 -->
<el-form-item label="月台" prop="DockCode">
<el-select
<el-form-item key="月台formItem" label="月台" prop="DockCode">
<el-select key="月台"
v-model="formData.configuration.DockCode"
placeholder="请选择月台"
clearable
>
<el-option
v-for="cur in options.dockList"
:key="cur.code"
:key="'月台'+cur.code"
:label="cur.code"
:value="cur.code"
/>
</el-select>
</el-form-item>
<!-- 在途库位 -->
<el-form-item label="在途库位" prop="OnTheWayLocationCode">
<el-select
<el-form-item key="在途库位formItem" label="在途库位" prop="OnTheWayLocationCode">
<el-select key="在途库位"
v-model="formData.configuration.OnTheWayLocationCode"
placeholder="请选择在途库位"
clearable
filterable
:filter-method="filterMethodFromLocation"
>
<el-option
v-for="cur in options.locationList"
:key="cur.code"
:key="'在途库位'+cur.code"
:label="cur.code"
:value="cur.code"
/>
</el-select>
</el-form-item>
<!-- 收货人 -->
<el-form-item label="收货人" prop="Receiver">
<el-input v-model="formData.configuration.Receiver" placeholder="请输入收货人名称" clearable />
<el-form-item key="收货人formItem" label="收货人" prop="Receiver">
<el-input key="收货人" v-model="formData.configuration.Receiver" placeholder="请输入收货人名称" clearable />
</el-form-item>
<!-- 在途库位 -->
<el-form-item label="联系电话" prop="configuration.PhoneNumber">
<el-input v-model="formData.configuration.PhoneNumber" placeholder="请输入联系电话" clearable />
<el-form-item key="联系电话formItem" label="联系电话" prop="configuration.PhoneNumber">
<el-input key="联系电话" v-model="formData.configuration.PhoneNumber" placeholder="请输入联系电话" clearable />
</el-form-item>
</el-col>
</el-row>
@ -363,7 +365,8 @@ const options = reactive({
//
dockList: [],
//
locationList: []
locationList: [],
originLocationList: []
})
//
const Butttondata = ref([
@ -407,15 +410,35 @@ const getFormWarehouseList = async () => {
const getFormDockList = async () => {
options.dockList = await getDockList()
}
const filterMethodFromLocation = (query: string) => {
if (query) {
options.locationList = options.originLocationList.filter((item) => {
return item?.code.includes(query)
})
} else {
options.locationList = [...options.originLocationList]
}
}
//
const getFormLocationList = async () => {
options.locationList = await getLocationList({ type: 'TRANSPORT' })
if(!options.locationList || options.locationList.length==0){
options.originLocationList = await getLocationList({ type: 'TRANSPORT' })
options.locationList = [...options.originLocationList]
}else{
options.locationList = []
let timer = setTimeout(()=>{
options.locationList = [...options.originLocationList]
if(timer){
clearTimeout(timer)
}
},2000)
}
}
getFormSupplierList()
getFormWarehouseList()
getFormDockList()
getFormLocationList()
/** 打开弹窗 */
const open = async (type: string, strategyCode: string, id?: number) => {
@ -469,6 +492,7 @@ const open = async (type: string, strategyCode: string, id?: number) => {
defaultButtons.formCloseBtn(null) //
]
}
getFormLocationList()
}
defineExpose({ open }) // open

18
src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue

@ -628,7 +628,7 @@ const options = reactive({
],
//
supplierList: [],
orignSupplierList: [],
originSupplierList: [],
//
itemTypeOptions: [
{ value: 'ItemType', label: '物料类型' },
@ -673,21 +673,23 @@ const buttonBaseClick = (val, item) => {
}
//
const getFormSupplierList = async () => {
options.orignSupplierList = await getSupplierList()
options.supplierList = [...options.orignSupplierList]
options.originSupplierList = await getSupplierList()
options.supplierList = [...options.originSupplierList]
}
//
const getFormCustomerList = async () => {
options.supplierList = await getCustomerList()
options.supplierList = [...options.orignSupplierList]
options.originSupplierList = await getCustomerList()
options.supplierList = [...options.originSupplierList]
}
const filterMethod = (query: string) => {
if (query) {
options.supplierList = options.orignSupplierList.filter((item) => {
options.supplierList = options.originSupplierList.filter((item) => {
return item.name.includes(query)
})
} else {
options.supplierList = []
options.supplierList = [...options.originSupplierList]
}
}
@ -744,7 +746,7 @@ const filterMethodWarehouseList = (query: string) => {
return item.code.includes(query)
})
} else {
options.warehouseList = []
options.warehouseList = options.originWarehouseList
}
}
// ///

244
src/views/wms/basicDataManage/subject/qadCostcentre/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="QadCostcentre.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="QadCostcentre.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="QadCostcentreRules"
:formAllSchemas="QadCostcentre.allSchemas"
:apiUpdate="QadCostcentreApi.updateQadCostcentre"
:apiCreate="QadCostcentreApi.createQadCostcentre"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="QadCostcentre.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/qad-costcentre/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { QadCostcentre,QadCostcentreRules } from './qadCostcentre.data'
import * as QadCostcentreApi from '@/api/wms/qadCostcentre'
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: 'QadCostcentre' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(QadCostcentre.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: QadCostcentreApi.getQadCostcentrePage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:qadCostcentre:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:qadCostcentre:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:qadCostcentre:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:qadCostcentre:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:qadCostcentre: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 =QadCostcentre.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 QadCostcentreApi.createQadCostcentre(data)
message.success(t('common.createSuccess'))
} else {
await QadCostcentreApi.updateQadCostcentre(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, 'basicQadCostcentre')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await QadCostcentreApi.deleteQadCostcentre(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 QadCostcentreApi.exportQadCostcentre(tableObject.params)
download.excel(data, 'QAD成品中心.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: 'QAD成品中心导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await QadCostcentreApi.importTemplate()
})
</script>

167
src/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data.ts

@ -0,0 +1,167 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const QadCostcentreRules = reactive({
code: [required],
usageDescription: [required],
available: [required],
concurrencyStamp: [required],
})
export const QadCostcentre = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false,
isTable:false,
},
{
label: '成本中心ID',
field: 'costcentreId',
sort: 'custom',
isSearch: false,
},
{
label: '成本中心代码',
field: 'costcentreCode',
sort: 'custom',
isSearch: true,
},
{
label: '成本中心描述',
field: 'costcentreDescription',
sort: 'custom',
isSearch: false,
form: {
component: 'Editor',
componentProps: {
valueHtml: '',
height: 200
}
},
},
{
label: '启用',
field: 'costcentreActive',
sort: 'custom',
isSearch: false,
},
{
label: '成本中心类型',
field: 'costcentreType',
sort: 'custom',
isSearch: false,
form: {
component: 'SelectV2'
},
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
table: {
width: 120
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false,
},
{
label: '创建时间',
field: 'createTime',
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')]
}
},
isForm: false,
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: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,
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isSearch: false,
isTable:false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable:false,
},
{
label: '操作',
field: 'action',
isForm: false,
isTable:false,
table: {
width: 150,
fixed: 'right'
}
}
]))

244
src/views/wms/basicDataManage/subject/qadProject/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="QadProject.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="QadProject.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="QadProjectRules"
:formAllSchemas="QadProject.allSchemas"
:apiUpdate="QadProjectApi.updateQadProject"
:apiCreate="QadProjectApi.createQadProject"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="QadProject.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/qad-project/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { QadProject,QadProjectRules } from './qadProject.data'
import * as QadProjectApi from '@/api/wms/qadProject'
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: 'QadProject' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(QadProject.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: QadProjectApi.getQadProjectPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:qadProject:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:qadProject:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:qadProject:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:qadProject:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:qadProject: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 =QadProject.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 QadProjectApi.createQadProject(data)
message.success(t('common.createSuccess'))
} else {
await QadProjectApi.updateQadProject(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, 'basicQadProject')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await QadProjectApi.deleteQadProject(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 QadProjectApi.exportQadProject(tableObject.params)
download.excel(data, 'QAD项目信息.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: 'QAD项目信息导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await QadProjectApi.importTemplate()
})
</script>

186
src/views/wms/basicDataManage/subject/qadProject/qadProject.data.ts

@ -0,0 +1,186 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const QadProjectRules = reactive({
available: [required],
concurrencyStamp: [required],
})
export const QadProject = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false,
isTable:false,
},
{
label: '项目ID',
field: 'projectId',
sort: 'custom',
isSearch: false,
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
isSearch: true,
},
{
label: '项目描述',
field: 'projectDescription',
sort: 'custom',
isSearch: false,
form: {
component: 'Editor',
componentProps: {
valueHtml: '',
height: 200
}
},
},
{
label: '项目开始时间',
field: 'projectStartDate',
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: 'projectEndDate',
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: 'statusCode',
sort: 'custom',
isSearch: false,
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isSearch: false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false,
},
{
label: '创建时间',
field: 'createTime',
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')]
}
},
isForm: false,
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: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,
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isSearch: false,
isTable:false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable:false,
},
{
label: '操作',
field: 'action',
isForm: false,
isTable:false,
table: {
width: 150,
fixed: 'right'
}
}
]))

253
src/views/wms/basicDataManage/subject/subjectAccount/index.vue

@ -0,0 +1,253 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="SubjectAccount.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="SubjectAccount.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="SubjectAccountRules"
:formAllSchemas="SubjectAccount.allSchemas"
:apiUpdate="SubjectAccountApi.updateSubjectAccount"
:apiCreate="SubjectAccountApi.createSubjectAccount"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="SubjectAccount.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/subject-account/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { SubjectAccount,SubjectAccountRules } from './subjectAccount.data'
import * as SubjectAccountApi from '@/api/wms/subjectAccount'
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: 'SubjectAccount' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(SubjectAccount.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
if (formField === 'costecentreCode') {
setV['costecentreId'] = val[0]['costcentreId']
setV['costcentreCode'] = val[0]['costcentreCode']
setV['costecentreType'] = val[0]['costcentreType']
}
if( formField === 'projectCode'){
setV['projectId'] = val[0]['projectId']
setV['projectCode'] = val[0]['projectCode']
}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: SubjectAccountApi.getSubjectAccountPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:subject-account:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:subject-account:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:subject-account:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:subject-account:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:subject-account: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 =SubjectAccount.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 SubjectAccountApi.createSubjectAccount(data)
message.success(t('common.createSuccess'))
} else {
await SubjectAccountApi.updateSubjectAccount(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, 'basicSubjectAccount')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await SubjectAccountApi.deleteSubjectAccount(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 SubjectAccountApi.exportSubjectAccount(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 SubjectAccountApi.importTemplate()
})
</script>

166
src/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data.ts

@ -0,0 +1,166 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as QadCostcentreApi from '@/api/wms/qadCostcentre'
import { QadCostcentre } from '../qadCostcentre/qadCostcentre.data'
import * as QadProjectApi from '@/api/wms/qadProject'
import { QadProject } from '../qadProject/qadProject.data'
// 表单校验
export const SubjectAccountRules = reactive({
code: [required],
usageDescription: [required],
costecentreCode: [required],
projectId: [required],
projectCode: [required],
available: [required],
})
export const SubjectAccount = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false,
isTable:false,
},
{
label: '代码',
field: 'code',
sort: 'custom',
isSearch: true,
},
{
label: '领用描述',
field: 'usageDescription',
sort: 'custom',
isSearch: true,
},
{
label: '成本中心ID',
field: 'costecentreId',
sort: 'custom',
isSearch: false,
isTable:false,
form:{
componentProps:{
disabled:true
}
}
},
{
label: '成本中心代码',
field: 'costecentreCode',
sort: 'custom',
isSearch: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'costcentreCode', // 查询弹窗赋值字段
searchTitle: '成本中心信息', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '成本中心类型',
field: 'costecentreType',
sort: 'custom',
isSearch: false,
form:{
componentProps:{
disabled:true
}
}
},
{
label: '项目ID',
field: 'projectId',
sort: 'custom',
isSearch: false,
isTable:false,
disabled:true,
form:{
componentProps:{
disabled:true
}
}
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
isSearch: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'projectCode', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类
searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
table: {
width: 120
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
},
{
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: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

84
src/views/wms/countManage/count/countJobMain/countJobMain.data.ts

@ -28,21 +28,21 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
},
},
{
label: '申请单号',
field: 'requestNumber',
label: '计划单号',
field: 'planNumber',
sort: 'custom',
table: {
width: 150
width: 180
},
isSearch: true
},
{
label: '计划单号',
field: 'planNumber',
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
table: {
width: 150
width: 180
},
isSearch: true
},
{
label: '阶段',
@ -123,6 +123,7 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isTable:false,
form: {
component: 'DatePicker',
componentProps: {
@ -139,13 +140,14 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false,
},
{
label: '从库区类型范围',
field: 'fromAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: true,
isTable: false,
sort: 'custom',
table: {
width: 150
@ -156,7 +158,7 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'toAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: true,
isTable: false,
sort: 'custom',
table: {
width: 150
@ -169,6 +171,7 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
form: {
component: 'InputNumber',
}
@ -177,6 +180,7 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '优先级增量',
field: 'priorityIncrement',
sort: 'custom',
isTable: false,
table: {
width: 150
},
@ -191,6 +195,7 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false
},
{
label: '部门',
@ -199,13 +204,14 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false,
},
{
label: '自动完成',
field: 'autoComplete',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
form: {
component: 'Switch',
value: 'TRUE',
@ -224,7 +230,7 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'allowModifyLocation',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
form: {
component: 'Switch',
value: 'TRUE',
@ -243,7 +249,7 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'allowModifyQty',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
form: {
component: 'Switch',
value: 'TRUE',
@ -262,7 +268,7 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'allowBiggerQty',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
form: {
component: 'Switch',
value: 'TRUE',
@ -281,7 +287,7 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'allowSmallerQty',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
form: {
component: 'Switch',
value: 'TRUE',
@ -300,7 +306,7 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'allowModifyInventoryStatus',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
form: {
component: 'Switch',
value: 'TRUE',
@ -319,7 +325,7 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'allowContinuousScanning',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
form: {
component: 'Switch',
value: 'TRUE',
@ -338,7 +344,7 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'allowPartialComplete',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
form: {
component: 'Switch',
value: 'TRUE',
@ -357,7 +363,7 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'allowModifyBatch',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
form: {
component: 'Switch',
value: 'TRUE',
@ -376,7 +382,7 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'allowModifyPackingNumber',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isTable: false,
form: {
component: 'Switch',
value: 'TRUE',
@ -397,6 +403,7 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false,
},
{
label: '承接时间',
@ -409,6 +416,7 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isTable:false,
form: {
component: 'DatePicker',
componentProps: {
@ -425,6 +433,7 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false,
},
{
label: '完成时间',
@ -437,6 +446,7 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isTable:false,
form: {
component: 'DatePicker',
componentProps: {
@ -453,6 +463,7 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false,
},
{
label: '创建时间',
@ -465,6 +476,7 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isTable:false,
form: {
component: 'DatePicker',
componentProps: {
@ -481,25 +493,18 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false,
},
// {
// label: '状态',
// field: 'jobStageStatus',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '操作',
// field: 'action',
// isDetail: false,
// isForm: false,
// table: {
// width: 120,
// fixed: 'right'
// },
// }
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 180,
fixed: 'right'
},
}
]))
//表单校验
@ -565,6 +570,7 @@ export const CountJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
hiddenInMain:true,
},
{
label: '盘点明细号',
@ -587,7 +593,7 @@ export const CountJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'itemName',
sort: 'custom',
table: {
width: 150
width: 200
},
},
{
@ -629,6 +635,7 @@ export const CountJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false,
},
{
label: '数量',
@ -670,6 +677,7 @@ export const CountJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false,
},
{
label: '货主代码',

69
src/views/wms/countManage/count/countJobMain/index.vue

@ -64,6 +64,19 @@
:searchTableParams="searchTableParams"
:apiPage="CountJobDetailApi.getCountJobDetailPage"
/>
<!-- 导入 -->
<ImportDetailForm
ref="importFormRef"
url="/wms/count-job-main/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
:updateIsDisable="true"
:coverIsDisable="true"
:mode="1"
:extend="rowMasterIdRef"
/>
</template>
<script setup lang="ts">
@ -186,7 +199,25 @@ const butttondata = (row,$index) => {
}
return [
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-job-main:close'}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1','2']),hasPermi:'wms:count-job-main:close'}), //
{
label: '导出',
name: 'exportCountJob',
hide: isShowMainButton(row,['1','2']),
type: 'primary',
color: '',
link: true, //
hasPermi: '' // wms:count-job-main:exportCountJob
},
{
label: '导入',
name: 'importCountJob',
hide: isShowMainButton(row,['1','2']),
type: 'success',
color: '',
link: true, //
hasPermi: '' // wms:count-job-main:importCountJob
}
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
]
@ -202,6 +233,10 @@ const buttonTableClick = async (val, row) => {
handleClose(row.masterId)
} else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接')
} else if (val == 'exportCountJob'){//
handleExportCountJob(row.masterId,row.number)
} else if( val == 'importCountJob'){ //
handleImport(row.masterId)
}
}
@ -240,6 +275,38 @@ const handleExport = async () => {
}
}
/** 单条任务导出 */
const handleExportCountJob = async (id: number,number: string) => {
try {
await message.exportConfirm()
exportLoading.value = true
const data = await CountJobMainApi.handleExportCountJob(id)
download.excel(data, '盘点任务主'+number+'.xlsx')
} catch {
}finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const rowMasterIdRef = ref('')
const handleImport = (id: string) => {
rowMasterIdRef.value = id;
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '盘点任务导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {

52
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts

@ -5,7 +5,9 @@ import { dateFormatter, formatDate } from '@/utils/formatTime'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as DeliverRecordMainApi from '@/api/wms/deliverRecordMain'
import { DeliverRecordMain } from '../../deliver/deliverRecordMain/deliverRecordMain.data'
import * as DeliverRecordDetailApi from '@/api/wms/deliverRecordDetail'
import { DeliverRecordMain,DeliverRecordDetail } from '../../deliver/deliverRecordMain/deliverRecordMain.data'
import * as CustomerApi from '@/api/wms/customer'
import { Customer } from '../../../basicDataManage/customerManage/customer/customer.data'
@ -23,6 +25,8 @@ import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackag
import * as ItemPackageApi from '@/api/wms/itempackage/index'
import * as CustomerreturnRequestApi from '@/api/wms/customerreturnRequestMain'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
const { t } = useI18n() // 国际化
const dateTime = new Date().getTime()
@ -48,6 +52,7 @@ const userDeptArray:any = [userDept]
/**
* @returns {Array} 退
*/
export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
@ -87,8 +92,10 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchListPlaceholder: '请选择发货记录单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: '发货记录信息', // 查询弹窗标题
isConcatDetailSchemas:true, // 是否主子表合并
searchAllSchemas: DeliverRecordMain.allSchemas, // 查询弹窗所需类
searchPage: DeliverRecordMainApi.getDeliverRecordMainPage, // 查询弹窗所需分页方法
searchDetailSchemas: DeliverRecordDetail.allSchemas, // 查询弹窗所需类
searchPage: DeliverRecordDetailApi.getDeliverRecordDetailPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
@ -886,22 +893,28 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}
}
},
// {
// label: '到库位代码',
// field: 'toLocationCode',
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm: {
// disabled: true
// },
// form: {
// componentProps: {
// disabled: true
// }
// }
// },
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择到库位代码',
searchField: 'toLocationCode',
searchTitle: '到库位代码',
searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法
searchCondition: [{
key: 'businessType',
value: 'CustomerReject',
isMainValue: false
}]
},
},
{
label: '库存状态',
field: 'inventoryStatus',
@ -1062,6 +1075,9 @@ export const CustomerreturnRequestDetailRules = reactive({
itemCode: [
{ required: true, message: '请选择物料代码', trigger: 'change' }
],
toLocationCode: [
{ required: true, message: '请选择到库位代码', trigger: 'blur' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],

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

Loading…
Cancel
Save