Browse Source

解决冲突

hella_online_20240829
ljlong_2630 4 months ago
parent
commit
03193e9df0
  1. 2
      .env.development
  2. 2
      .env.prod
  3. 2
      .env.test
  4. 2
      .env.test-scp
  5. 12
      README.md
  6. 1
      package.json
  7. 73
      src/api/eam/basicEamProductionline/index.ts
  8. 69
      src/api/eam/basicEamWorkshop/index.ts
  9. 6
      src/api/eam/classTypeRole/index.ts
  10. 1
      src/api/eam/documentTypeSelectSet/index.ts
  11. 6
      src/api/eam/equipmentAccounts/index.ts
  12. 6
      src/api/eam/equipmentInspectionMain/index.ts
  13. 6
      src/api/eam/equipmentMaintenanceMain/index.ts
  14. 7
      src/api/eam/equipmentRepairJobMain/index.ts
  15. 5
      src/api/eam/equipmentReportRepairRequest/index.ts
  16. 4
      src/api/eam/equipmentSigning/index.ts
  17. 6
      src/api/eam/equipmentSpotCheckMain/index.ts
  18. 1
      src/api/eam/inspectionItem/index.ts
  19. 10
      src/api/eam/inspectionItemSelectSet/index.ts
  20. 12
      src/api/eam/maintenanceItemSelectSet/index.ts
  21. 59
      src/api/eam/recordDeviceChanged/index.ts
  22. 2
      src/api/eam/repairExperience/index.ts
  23. 63
      src/api/eam/sparePartsApplyDetail/index.ts
  24. 87
      src/api/eam/sparePartsApplyMain/index.ts
  25. 58
      src/api/eam/sparePartsInLocationDetail/index.ts
  26. 91
      src/api/eam/sparePartsInLocationMain/index.ts
  27. 58
      src/api/eam/sparePartsInLocationRecordDetail/index.ts
  28. 72
      src/api/eam/sparePartsInLocationRecordMain/index.ts
  29. 61
      src/api/eam/sparePartsOutLocationDetail/index.ts
  30. 81
      src/api/eam/sparePartsOutLocationMain/index.ts
  31. 76
      src/api/eam/sparePartsOutLocationRecordDetail/index.ts
  32. 54
      src/api/eam/sparePartsOutLocationRecordDetail/sparePartsOutLocationDetailRecord.js
  33. 71
      src/api/eam/sparePartsOutLocationRecordMain/index.ts
  34. 11
      src/api/eam/spotCheckSelectSet/index.ts
  35. 5
      src/api/qms/inspectionTemplate/index.ts
  36. 5
      src/api/wms/areabasic/index.ts
  37. 20
      src/api/wms/balance/index.ts
  38. 524
      src/api/wms/business/business.ts
  39. 1
      src/api/wms/countPlanMain/index.ts
  40. 5
      src/api/wms/customeritem/index.ts
  41. 68
      src/api/wms/demandforecastingDetail/index.ts
  42. 20
      src/api/wms/demandforecastingMain/index.ts
  43. 5
      src/api/wms/itembasic/index.ts
  44. 25
      src/api/wms/itempackage/index.ts
  45. 56
      src/api/wms/mstr/index.ts
  46. 4
      src/api/wms/packageoverJobMain/index.ts
  47. 26
      src/api/wms/packageunit/index.ts
  48. 2
      src/api/wms/pickJobMain/index.ts
  49. 2
      src/api/wms/pickRecordMain/index.ts
  50. 2
      src/api/wms/plansetting/index.ts
  51. 6
      src/api/wms/preparetoissueMain/index.ts
  52. 5
      src/api/wms/process/index.ts
  53. 15
      src/api/wms/productionMain/index.ts
  54. 5
      src/api/wms/productionlineitem/index.ts
  55. 11
      src/api/wms/purchasePlanDetail/index.ts
  56. 19
      src/api/wms/purchasePlanMain/index.ts
  57. 4
      src/api/wms/purchasereceiptJobMain/index.ts
  58. 13
      src/api/wms/purchasereceiptRecordDetail/index.ts
  59. 11
      src/api/wms/purchasereceiptRecordMain/index.ts
  60. 12
      src/api/wms/purchasereceiptRequestDetail/index.ts
  61. 2
      src/api/wms/scrapJobMain/index.ts
  62. 2
      src/api/wms/stockupMainJob/index.ts
  63. 2
      src/api/wms/strategy/index.ts
  64. 6
      src/api/wms/supplier/index.ts
  65. 65
      src/api/wms/supplierCycle/index.ts
  66. 9
      src/api/wms/supplierdeliverRequestDetail/index.ts
  67. 6
      src/api/wms/supplierinvoiceRequestDetail/index.ts
  68. 13
      src/api/wms/supplierinvoiceRequestMain/index.ts
  69. 17
      src/api/wms/supplieritem/index.ts
  70. 4
      src/api/wms/warehouse/index.ts
  71. 6
      src/components/Annex/src/Annex.vue
  72. 447
      src/components/BasicForm/src/BasicForm.vue
  73. 10
      src/components/BasicForm/src/BasicFormWmsCount.vue
  74. 1
      src/components/Descriptions/src/Descriptions.vue
  75. 37
      src/components/Detail/src/Detail.vue
  76. 5
      src/components/Dialog/src/Dialog.vue
  77. 6
      src/components/DictTag/src/DictTag.vue
  78. 14
      src/components/Form/src/Form.vue
  79. 7
      src/components/RouterSearch/index.vue
  80. 146
      src/components/Search/src/Search.vue
  81. 93
      src/components/SearchTable/src/SearchTable.vue
  82. 24
      src/components/Table/src/Table.vue
  83. 389
      src/components/TableForm/src/TableForm.vue
  84. 6
      src/components/Tabs/src/Tabs.vue
  85. 2
      src/components/UploadFile/src/UploadFile.vue
  86. 2
      src/components/XButton/src/ButtonBase.vue
  87. 2
      src/directives/permission/clientTable.ts
  88. 9
      src/layout/components/CategoryHeader.vue
  89. 2
      src/layout/components/Message/src/Message.vue
  90. 24
      src/layout/components/ToolHeader.vue
  91. 22
      src/layout/components/UserInfo/src/UserInfo.vue
  92. 6
      src/layout/components/useRenderLayout.tsx
  93. 18
      src/locales/en-US.ts
  94. 15
      src/locales/zh-CN.ts
  95. 4
      src/main.ts
  96. 9
      src/store/modules/permission.ts
  97. 105
      src/utils/calculate.ts
  98. 10
      src/utils/dict.ts
  99. 135
      src/utils/disposition/defaultButtons.ts
  100. 6
      src/utils/disposition/tabsList.ts

2
.env.development

@ -37,7 +37,7 @@ VITE_INTERFACE_URL='http://localhost:12080/magic/web/index.html'
VITE_JMREPORT_BASE_URL='http://localhost:12080'
# 租户配置
VITE_TENANT='["长春","成都"]'
VITE_TENANT='["长春1379","成都1397","长春2379"]'
# 查看质检报告环境
VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400'

2
.env.prod

@ -37,7 +37,7 @@ VITE_INTERFACE_URL='http://dev.ccwin-in.com:25310/magic/web/index.html'
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310'
# 租户配置
VITE_TENANT='["长春","成都"]'
VITE_TENANT='["长春1379","成都1397","长春2379"]'
# 查看质检报告环境
VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400'

2
.env.test

@ -37,7 +37,7 @@ VITE_INTERFACE_URL='http://dev.ccwin-in.com:25310/magic/web/index.html'
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310'
# 租户配置
VITE_TENANT='["长春","成都"]'
VITE_TENANT='["长春1379","成都1397","长春2379"]'
# 查看质检报告环境
VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400'

2
.env.test-scp

@ -38,7 +38,7 @@ VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25311'
# 租户配置
VITE_TENANT='["长春","成都"]'
VITE_TENANT='["长春1379","成都1397","长春2379"]'
# 查看质检报告环境
VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400'

12
README.md

@ -31,6 +31,7 @@ form: {
isFormModel:true, // filters中添加筛选的数据--取于formModel
required:true, // 前置添加必有,和isFormModel结合使用
message: '请选择客户代码!', // 前置添加没填的提示语
},
{
key: 'itemCode',
@ -44,7 +45,16 @@ form: {
value:'TRUE', // 指查询具体值
isMainValue: false // 表示查询条件不是主表的字段的值
}
]
],
// 失去焦点校验参数
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: 'true',
isFormModel: true
}]
}
}
**tableForm明细列表查询弹窗配置**

1
package.json

@ -55,6 +55,7 @@
"vue": "^3.3.4",
"vue-dompurify-html": "^4.1.4",
"vue-i18n": "^9.4.1",
"vue-next-focus": "^0.0.12",
"vue-router": "^4.2.5",
"vue-types": "^5.1.1",
"vuedraggable": "^4.1.0",

73
src/api/eam/basicEamProductionline/index.ts

@ -0,0 +1,73 @@
import request from '@/config/axios'
import {BasicEamWorkshopVO} from "@/api/eam/basicEamWorkshop";
export interface BasicEamProductionlineVO {
id: number
code: string
name: string
description: string
type: string
workshopCode: string
rawLocationCode: string
fgLocationCode: string
available: string
activeTime: Date
expireTime: Date
remark: string
deletionTime: Date
deleterId: string
extraProperties: string
concurrencyStamp: number
siteId: string
}
// 查询生产线列表
export const getBasicEamProductionlinePage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/basic-eam-productionline/senior', data })
} else {
return await request.get({ url: `/eam/basic-eam-productionline/page`, params })
}
}
// 查询生产线详情
export const getBasicEamProductionline = async (id: number) => {
return await request.get({ url: `/eam/basic-eam-productionline/get?id=` + id })
}
// 新增生产线
export const createBasicEamProductionline = async (data: BasicEamProductionlineVO) => {
return await request.post({ url: `/eam/basic-eam-productionline/create`, data })
}
// 修改生产线
export const updateBasicEamProductionline = async (data: BasicEamProductionlineVO) => {
return await request.put({ url: `/eam/basic-eam-productionline/update`, data })
}
// 删除生产线
export const deleteBasicEamProductionline = async (id: number) => {
return await request.delete({ url: `/eam/basic-eam-productionline/delete?id=` + id })
}
// 导出生产线 Excel
export const exportBasicEamProductionline = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/eam/basic-eam-productionline/export-excel-senior`, data })
}else{
return await request.download({ url: `/eam/basic-eam-productionline/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/basic-eam-productionline/get-import-template' })
}
// 启用 / 禁用
export const updateEnableCode = async (data: BasicEamProductionlineVO) => {
return await request.post({ url: `/eam/basic-eam-productionline/ables` , data })
}

69
src/api/eam/basicEamWorkshop/index.ts

@ -0,0 +1,69 @@
import request from '@/config/axios'
export interface BasicEamWorkshopVO {
id: number
code: string
name: string
description: string
type: string
available: string
activeTime: Date
expireTime: Date
remark: string
deletionTime: Date
deleterId: string
extraProperties: string
concurrencyStamp: number
siteId: string
}
// 查询EAM车间列表
export const getBasicEamWorkshopPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/basic-eam-workshop/senior', data })
} else {
return await request.get({ url: `/eam/basic-eam-workshop/page`, params })
}
}
// 查询EAM车间详情
export const getBasicEamWorkshop = async (id: number) => {
return await request.get({ url: `/eam/basic-eam-workshop/get?id=` + id })
}
// 新增EAM车间
export const createBasicEamWorkshop = async (data: BasicEamWorkshopVO) => {
return await request.post({ url: `/eam/basic-eam-workshop/create`, data })
}
// 修改EAM车间
export const updateBasicEamWorkshop = async (data: BasicEamWorkshopVO) => {
return await request.put({ url: `/eam/basic-eam-workshop/update`, data })
}
// 删除EAM车间
export const deleteBasicEamWorkshop = async (id: number) => {
return await request.delete({ url: `/eam/basic-eam-workshop/delete?id=` + id })
}
// 导出EAM车间 Excel
export const exportBasicEamWorkshop = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/eam/basic-eam-workshop/export-excel-senior`, data })
}else{
return await request.download({ url: `/eam/basic-eam-workshop/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/basic-eam-workshop/get-import-template' })
}
// 启用 / 禁用
export const updateEnableCode = async (data: BasicEamWorkshopVO) => {
return await request.post({ url: `/eam/basic-eam-workshop/ables` , data })
}

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

@ -62,3 +62,9 @@ export const exportClassTypeRole = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/eam/basic/class-type-role/get-import-template' })
}
// 启用 / 禁用
export const updateEnableCode = async (data: ClassTypeRoleVO) => {
return await request.post({ url: `/eam/basic/class-type-role/ables` , data })
}

1
src/api/eam/documentTypeSelectSet/index.ts

@ -1,5 +1,4 @@
import request from '@/config/axios'
import {BasicSpotCheckSelectSetVO} from "@/api/eam/spotCheckSelectSet";
export interface DocumentTypeSelectSetVO {
id: number

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

@ -15,6 +15,7 @@ export interface EquipmentAccountsVO {
principal: string
principalTelephone: string
status: string
changeReason: string
startDate: Date
supplierCode: string
purchaseTime: Date
@ -82,3 +83,8 @@ export const importTemplate = () => {
export const getEquipmentAccountsNoPage = async (params) => {
return await request.get({ url: `/eam/device/equipment-accounts/noPage`, params })
}
//停用启用
export const ableEquipmentAccountsMain = async (data: EquipmentAccountsVO) => {
return await request.post({ url: `/eam/device/equipment-accounts/ables`, data })
}

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

@ -68,9 +68,9 @@ export const updateEquipmentInspectionMain = async (data: EquipmentInspectionMai
return await request.put({ url: `/eam/equipment-inspection-main/update`, data })
}
// 修改巡检工单主
export const updateEquipmentInspection = async (data: EquipmentInspectionMainVO) => {
return await request.post({ url: `/eam/equipment-inspection-main/updateOrders`, data })
// 验证巡检工单主
export const verifyEquipmentInspectionMain = async (data: EquipmentInspectionMainVO) => {
return await request.post({ url: `/eam/equipment-inspection-main/verifyOrder`, data })
}
// 删除巡检工单主

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

@ -70,9 +70,9 @@ export const updateEquipmentMaintenanceMain = async (data: EquipmentMaintenanceM
return await request.put({ url: `/eam/equipment-maintenance-main/update`, data })
}
// 修改设备保养工单主
export const updateEquipmentMaintenance = async (data: EquipmentMaintenanceMainVO) => {
return await request.post({ url: `/eam/equipment-maintenance-main/updateOrders`, data })
// 验证设备保养工单主
export const verifyEquipmentMaintenanceMain = async (data: EquipmentMaintenanceMainVO) => {
return await request.post({ url: `/eam/equipment-maintenance-main/verifyOrder`, data })
}
// 删除设备保养工单主

7
src/api/eam/equipmentRepairJobMain/index.ts

@ -69,6 +69,11 @@ export const createEquipmentRepairJobMain = async (data: EquipmentRepairJobMainV
return await request.post({ url: `/eam/equipment-repair-job-main/create`, data })
}
// 维修验证更新工单主
export const wxVerifyEquipmentRepairJobMain = async (data: EquipmentRepairJobMainVO) => {
return await request.post({ url: `/eam/equipment-repair-job-main/wxVerify`, data })
}
// 修改维修工单主
export const updateEquipmentRepairJobMain = async (data: EquipmentRepairJobMainVO) => {
return await request.put({ url: `/eam/equipment-repair-job-main/update`, data })
@ -110,7 +115,7 @@ export const backEquipmentRepairOrder = async (data: EquipmentRepairJobMainVO) =
return await request.post({ url: `/eam/equipment-repair-job-main/fallback`, data })
}
//报修验证不通过,生成新工单
//报修验证
export const createEquipmentRepairNewOrder = async (data: EquipmentRepairJobMainVO) => {
return await request.post({ url: `/eam/equipment-repair-job-main/createNew`, data })
}

5
src/api/eam/equipmentReportRepairRequest/index.ts

@ -77,6 +77,11 @@ export const updateEquipmentReportRepairOrder = async (data: EquipmentReportRepa
return await request.post({ url: `/eam/equipment-report-repair-request/updateOrder`, data })
}
// 审核报修工单状态
export const audiEquipmentReportRepairOrder = async (data: EquipmentReportRepairRequestVO) => {
return await request.post({ url: `/eam/equipment-report-repair-request/audiOrder`, data })
}
// 完成并创建维修工单
export const createEquipmentWeixiuOrder = async (data: EquipmentReportRepairRequestVO) => {
return await request.post({ url: `/eam/equipment-report-repair-request/updateCreateOrder`, data })

4
src/api/eam/equipmentSigning/index.ts

@ -50,6 +50,10 @@ export const getEquipmentSigning = async (id: number) => {
export const createEquipmentSigning = async (data: EquipmentSigningVO) => {
return await request.post({ url: `/eam/equipment-signing/create`, data })
}
export const createsEquipmentSigning = async (data: EquipmentSigningVO) => {
return await request.post({ url: `/eam/equipment-signing/creates`, data })
}
// 修改设备到货签收记录
export const updateEquipmentSigning = async (data: EquipmentSigningVO) => {

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

@ -66,9 +66,9 @@ export const updateEquipmentSpotCheckMain = async (data: EquipmentSpotCheckMainV
return await request.put({ url: `/eam/equipment-spot-check-main/update`, data })
}
// 修改点检工单主
export const updateEquipmentSpotCheck = async (data: EquipmentSpotCheckMainVO) => {
return await request.post({ url: `/eam/equipment-spot-check-main/updateOrders`, data })
// 验证点检工单主
export const verifyEquipmentSpotCheckMain = async (data: EquipmentSpotCheckMainVO) => {
return await request.post({ url: `/eam/equipment-spot-check-main/verifyOrder`, data })
}
// 删除点检工单主

1
src/api/eam/inspectionItem/index.ts

@ -1,5 +1,4 @@
import request from '@/config/axios'
import {InspectionItemSelectSetVO} from "@/api/eam/inspectionItemSelectSet";
export interface InspectionItemVO {
id: number

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

@ -58,3 +58,13 @@ export const importTemplate = () => {
export const updateEnableCode = async (data: InspectionItemSelectSetVO) => {
return await request.post({ url: `/eam/basic/inspection-item-select-set/ables` , data })
}
// 查询巡检项选择集列表
export const getInspectionItemSelectSetList = async (params) => {
return await request.get({ url: `/eam/basic/inspection-item/getList`, params })
}
// 查询巡检方案项列表
export const getRalInspectionOptionItemList = async (params) => {
return await request.get({url: `/eam/relation-inspection-option-item/getList?optionCode=` + params})
}

12
src/api/eam/maintenanceItemSelectSet/index.ts

@ -56,5 +56,15 @@ export const importTemplate = () => {
// 启用 / 禁用
export const updateEnableCode = async (data: MaintenanceItemSelectSetVO) => {
return await request.post({ url: `/eam/basic/inspection-item-select-set/ables` , data })
return await request.post({ url: `/eam/basic/maintenance-item-select-set/ables` , data })
}
// 查询保养项选择集列表
export const getMaintenanceItemSelectSetList = async (params) => {
return await request.get({ url: `/eam/basic/maintenance-item/getList`, params })
}
// 查询保养方案项列表
export const getRalMaintenanceOptionItemList = async (params) => {
return await request.get({url: `/eam/relation-maintenance-option-item/getList?optionCode=` + params})
}

59
src/api/eam/recordDeviceChanged/index.ts

@ -0,0 +1,59 @@
import request from '@/config/axios'
export interface RecordDeviceChangedVO {
id: number
code: string
name: string
statusBefore: string
statusAfter: string
operator: number
operateTime: Date
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询设备变更记录列表
export const getRecordDeviceChangedPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/record-device-changed/senior', data })
} else {
return await request.get({ url: `/eam/record-device-changed/page`, params })
}
}
// 查询设备变更记录详情
export const getRecordDeviceChanged = async (id: number) => {
return await request.get({ url: `/eam/record-device-changed/get?id=` + id })
}
// 新增设备变更记录
export const createRecordDeviceChanged = async (data: RecordDeviceChangedVO) => {
return await request.post({ url: `/eam/record-device-changed/create`, data })
}
// 修改设备变更记录
export const updateRecordDeviceChanged = async (data: RecordDeviceChangedVO) => {
return await request.put({ url: `/eam/record-device-changed/update`, data })
}
// 删除设备变更记录
export const deleteRecordDeviceChanged = async (id: number) => {
return await request.delete({ url: `/eam/record-device-changed/delete?id=` + id })
}
// 导出设备变更记录 Excel
export const exportRecordDeviceChanged = async (params) => {
return await request.download({ url: `/eam/record-device-changed/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/record-device-changed/get-import-template' })
}

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

@ -4,7 +4,7 @@ export interface RepairExperienceVO {
id: number
name: string
content: string
repairNumber: string
repairRecordNumber: string
}
// 查询维修经验记录列表

63
src/api/eam/sparePartsApplyDetail/index.ts

@ -0,0 +1,63 @@
import request from '@/config/axios'
export interface SparePartsApplyDetailVO {
id: number
number: string
masterId: number
sparePartsCode: string
isRadeIn: string
applyQty: number
currentQty: number
type: string
currentSinglePrice: number
equipmentCode: byte[]
jobNumber: byte[]
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询备件领用申请子列表
export const getSparePartsApplyDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/spare-parts-apply-detail/senior', data })
} else {
return await request.get({ url: `/eam/spare-parts-apply-detail/page`, params })
}
}
// 查询备件领用申请子详情
export const getSparePartsApplyDetail = async (id: number) => {
return await request.get({ url: `/eam/spare-parts-apply-detail/get?id=` + id })
}
// 新增备件领用申请子
export const createSparePartsApplyDetail = async (data: SparePartsApplyDetailVO) => {
return await request.post({ url: `/eam/spare-parts-apply-detail/create`, data })
}
// 修改备件领用申请子
export const updateSparePartsApplyDetail = async (data: SparePartsApplyDetailVO) => {
return await request.put({ url: `/eam/spare-parts-apply-detail/update`, data })
}
// 删除备件领用申请子
export const deleteSparePartsApplyDetail = async (id: number) => {
return await request.delete({ url: `/eam/spare-parts-apply-detail/delete?id=` + id })
}
// 导出备件领用申请子 Excel
export const exportSparePartsApplyDetail = async (params) => {
return await request.download({ url: `/eam/spare-parts-apply-detail/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/spare-parts-apply-detail/get-import-template' })
}

87
src/api/eam/sparePartsApplyMain/index.ts

@ -0,0 +1,87 @@
import request from '@/config/axios'
export interface SparePartsApplyMainVO {
id: number
number: string
description: string
applyDeptId: string
sumVal: number
status: string
applyer: string
approver: number
approveContent: string
approveTime: Date
autoExamine: string
autoAgree: string
directCreateRecord: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询备件领用申请列表
export const getSparePartsApplyMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.post({ url: '/eam/spare-parts-apply-main/senior', data })
} else {
return await request.get({ url: `/eam/spare-parts-apply-main/page`, params })
}
}
// 查询备件领用申请详情
export const getSparePartsApplyMain = async (id: number) => {
return await request.get({ url: `/eam/spare-parts-apply-main/get?id=` + id })
}
// 新增备件领用申请
export const createSparePartsApplyMain = async (data: SparePartsApplyMainVO) => {
return await request.post({ url: `/eam/spare-parts-apply-main/create`, data })
}
// 修改备件领用申请
export const updateSparePartsApplyMain = async (data: SparePartsApplyMainVO) => {
return await request.put({ url: `/eam/spare-parts-apply-main/update`, data })
}
// 删除备件领用申请
export const deleteSparePartsApplyMain = async (id: number) => {
return await request.delete({ url: `/eam/spare-parts-apply-main/delete?id=` + id })
}
// 导出备件领用申请 Excel
export const exportSparePartsApplyMain = async (params) => {
return await request.download({ url: `/eam/spare-parts-apply-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/spare-parts-apply-main/get-import-template' })
}
// 撤回
export const cancelSparePartsApplyMain = async (id) => {
return await request.get({ url: `/eam/spare-parts-apply-main/cancel?id=` + id })
}
// 审核
export const submitSparePartsApplyMain = async (id) => {
return await request.get({ url: `/eam/spare-parts-apply-main/submitExamine?id=` + id })
}
// 审核驳回
export const rejectSparePartsApplyMain = async (id) => {
return await request.get({ url: `/eam/spare-parts-apply-main/reject?id=` + id })
}
// 审核通过
export const approveSparePartsApplyMain = async (data) => {
return await request.post({ url: `/eam/spare-parts-apply-main/approve`, data })
}
// 完成
export const finishSparePartsApplyMain = async (id) => {
return await request.post({ url: `/eam/spare-parts-apply-main/finish?id=` + id })
}

58
src/api/eam/sparePartsInLocationDetail/index.ts

@ -0,0 +1,58 @@
import request from '@/config/axios'
export interface SparePartsInLocationDetailVO {
id: number
number: string
masterId: number
sparePartsCode: string
isRadeIn: string
applyQty: number
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询备件入库记录子列表
export const getSparePartsInLocationDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/spare-parts-in-location-detail/senior', data })
} else {
return await request.get({ url: `/eam/spare-parts-in-location-detail/page`, params })
}
}
// 查询备件入库记录子详情
export const getSparePartsInLocationDetail = async (id: number) => {
return await request.get({ url: `/eam/spare-parts-in-location-detail/get?id=` + id })
}
// 新增备件入库记录子
export const createSparePartsInLocationDetail = async (data: SparePartsInLocationDetailVO) => {
return await request.post({ url: `/eam/spare-parts-in-location-detail/create`, data })
}
// 修改备件入库记录子
export const updateSparePartsInLocationDetail = async (data: SparePartsInLocationDetailVO) => {
return await request.put({ url: `/eam/spare-parts-in-location-detail/update`, data })
}
// 删除备件入库记录子
export const deleteSparePartsInLocationDetail = async (id: number) => {
return await request.delete({ url: `/eam/spare-parts-in-location-detail/delete?id=` + id })
}
// 导出备件入库记录子 Excel
export const exportSparePartsInLocationDetail = async (params) => {
return await request.download({ url: `/eam/spare-parts-in-location-detail/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/spare-parts-in-location-detail/get-import-template' })
}

91
src/api/eam/sparePartsInLocationMain/index.ts

@ -0,0 +1,91 @@
import request from '@/config/axios'
export interface SparePartsInLocationMainVO {
id: number
number: string
theme: string
status: string
applyer: string
approver: number
approveContent: string
approveTime: Date
autoExamine: string
autoAgree: string
directCreateRecord: string
areaCode: string
locationCode: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询备件入库记录主列表
export const getSparePartsInLocationMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/spare-parts-in-location-main/senior', data })
} else {
return await request.get({ url: `/eam/spare-parts-in-location-main/page`, params })
}
}
// 查询备件入库记录主详情
export const getSparePartsInLocationMain = async (id: number) => {
return await request.get({ url: `/eam/spare-parts-in-location-main/get?id=` + id })
}
// 新增备件入库记录主
export const createSparePartsInLocationMain = async (data: SparePartsInLocationMainVO) => {
return await request.post({ url: `/eam/spare-parts-in-location-main/create`, data })
}
// 修改备件入库记录主
export const updateSparePartsInLocationMain = async (data: SparePartsInLocationMainVO) => {
return await request.put({ url: `/eam/spare-parts-in-location-main/update`, data })
}
// 删除备件入库记录主
export const deleteSparePartsInLocationMain = async (id: number) => {
return await request.delete({ url: `/eam/spare-parts-in-location-main/delete?id=` + id })
}
// 导出备件入库记录主 Excel
export const exportSparePartsInLocationMain = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/eam/spare-parts-in-location-main/export-excel-senior`, data })
}else{
return await request.download({ url: `/eam/spare-parts-in-location-main/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/spare-parts-in-location-main/get-import-template' })
}
// 撤回
export const cancelSparePartsInLocation = async (id) => {
return await request.get({ url: `/eam/spare-parts-in-location-main/cancel?id=` + id })
}
// 审核
export const submitExamineSparePartsInLocation = async (id) => {
return await request.get({ url: `/eam/spare-parts-in-location-main/submitExamine?id=` + id })
}
// 审核驳回
export const rejectSparePartsInLocation = async (id) => {
return await request.get({ url: `/eam/spare-parts-in-location-main/reject?id=` + id })
}
// 审核通过
export const approveSparePartsInLocation = async (data) => {
return await request.post({ url: `/eam/spare-parts-in-location-main/approve`,data })
}
// 完成
export const finishSparePartsInLocation = async (id) => {
return await request.post({ url: `/eam/spare-parts-in-location-main/finish?id=` + id })
}

58
src/api/eam/sparePartsInLocationRecordDetail/index.ts

@ -0,0 +1,58 @@
import request from '@/config/axios'
export interface SparePartsInLocationDetailRecordVO {
id: number
number: string
masterId: number
sparePartsCode: string
isRadeIn: string
applyQty: number
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询备件入库记录子列表
export const getSparePartsInLocationRecordDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/spare-parts-in-location-detail-record/senior', data })
} else {
return await request.get({ url: `/eam/spare-parts-in-location-detail-record/page`, params })
}
}
// 查询备件入库记录子详情
export const getSparePartsInLocationRecordDetail = async (id: number) => {
return await request.get({ url: `/eam/spare-parts-in-location-detail-record/get?id=` + id })
}
// 新增备件入库记录子
export const createSparePartsInLocationRecordDetail= async (data: SparePartsInLocationDetailRecordVO) => {
return await request.post({ url: `/eam/spare-parts-in-location-detail-record/create`, data })
}
// 修改备件入库记录子
export const updateSparePartsInLocationRecordDetail = async (data: SparePartsInLocationDetailRecordVO) => {
return await request.put({ url: `/eam/spare-parts-in-location-detail-record/update`, data })
}
// 删除备件入库记录子
export const deleteSparePartsInLocationRecordDetail = async (id: number) => {
return await request.delete({ url: `/eam/spare-parts-in-location-detail-record/delete?id=` + id })
}
// 导出备件入库记录子 Excel
export const exportSparePartsInLocationRecordDetail = async (params) => {
return await request.download({ url: `/eam/spare-parts-in-location-detail-record/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/spare-parts-in-location-detail-record/get-import-template' })
}

72
src/api/eam/sparePartsInLocationRecordMain/index.ts

@ -0,0 +1,72 @@
import request from '@/config/axios'
export interface SparePartsInLocationMainRecordVO {
id: number
number: string
theme: string
status: string
applyer: string
approver: number
approveContent: string
approveTime: Date
autoExamine: string
autoAgree: string
directCreateRecord: string
areaCode: string
locationCode: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询备件入库记录主列表
export const getSparePartsInLocationRecordMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.post({ url: '/eam/spare-parts-in-location-main-record/senior', data })
} else {
return await request.get({ url: `/eam/spare-parts-in-location-main-record/page`, params })
}
}
// 查询备件入库记录主详情
export const getSparePartsInLocationRecordMain = async (id: number) => {
return await request.get({ url: `/eam/spare-parts-in-location-main-record/get?id=` + id })
}
// 新增备件入库记录主
export const createSparePartsInLocationRecordMain = async (
data: SparePartsInLocationMainRecordVO
) => {
return await request.post({ url: `/eam/spare-parts-in-location-main-record/create`, data })
}
// 修改备件入库记录主
export const updateSparePartsInLocationRecordMain = async (
data: SparePartsInLocationMainRecordVO
) => {
return await request.put({ url: `/eam/spare-parts-in-location-main-record/update`, data })
}
// 删除备件入库记录主
export const deleteSparePartsInLocationRecordMain= async (id: number) => {
return await request.delete({ url: `/eam/spare-parts-in-location-main-record/delete?id=` + id })
}
// 导出备件入库记录主 Excel
export const exportSparePartsInLocationRecordMain = async (params) => {
return await request.download({
url: `/eam/spare-parts-in-location-main-record/export-excel`,
params
})
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/spare-parts-in-location-main-record/get-import-template' })
}

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

@ -0,0 +1,61 @@
import request from '@/config/axios'
export interface SparePartsOutLocationDetailVO {
id: number
number: string
masterId: number
sparePartsCode: string
isRadeIn: string
applyQty: number
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询备件入库记录子列表
export const getSparePartsOutLocationDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.post({ url: '/eam/spare-parts-out-location-detail/senior', data })
} else {
return await request.get({ url: `/eam/spare-parts-out-location-detail/page`, params })
}
}
// 查询备件入库记录子详情
export const getSparePartsOutLocationDetail = async (id: number) => {
return await request.get({ url: `/eam/spare-parts-out-location-detail/get?id=` + id })
}
// 新增备件入库记录子
export const createSparePartsOutLocationDetail = async (data: SparePartsOutLocationDetailVO) => {
return await request.post({ url: `/eam/spare-parts-out-location-detail/create`, data })
}
// 修改备件入库记录子
export const updateSparePartsOutLocationDetail = async (data: SparePartsOutLocationDetailVO) => {
return await request.put({ url: `/eam/spare-parts-out-location-detail/update`, data })
}
// 删除备件入库记录子
export const deleteSparePartsOutLocationDetail = async (id: number) => {
return await request.delete({ url: `/eam/spare-parts-out-location-detail/delete?id=` + id })
}
// 导出备件入库记录子 Excel
export const exportSparePartsOutLocationDetail = async (params) => {
return await request.download({
url: `/eam/spare-parts-out-location-detail/export-excel`,
params
})
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/spare-parts-out-location-detail/get-import-template' })
}

81
src/api/eam/sparePartsOutLocationMain/index.ts

@ -0,0 +1,81 @@
import request from '@/config/axios'
export interface SparePartsOutLocationMainVO {
id: number
number: string
theme: string
status: string
applyer: string
approver: number
approveContent: string
approveTime: Date
autoExamine: string
autoAgree: string
directCreateRecord: string
areaCode: string
locationCode: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询备件入库记录主列表
export const getSparePartsOutLocationMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.post({ url: '/eam/spare-parts-out-location-main/senior', data })
} else {
return await request.get({ url: `/eam/spare-parts-out-location-main/page`, params })
}
}
// 查询备件入库记录主详情
export const getSparePartsOutLocationMain = async (id: number) => {
return await request.get({ url: `/eam/spare-parts-out-location-main/get?id=` + id })
}
// 新增备件入库记录主
export const createSparePartsOutLocationMain = async (data: SparePartsOutLocationMainVO) => {
return await request.post({ url: `/eam/spare-parts-out-location-main/create`, data })
}
// 修改备件入库记录主
export const updateSparePartsOutLocationMain = async (data: SparePartsOutLocationMainVO) => {
return await request.put({ url: `/eam/spare-parts-out-location-main/update`, data })
}
// 删除备件入库记录主
export const deleteSparePartsOutLocationMain = async (id: number) => {
return await request.delete({ url: `/eam/spare-parts-out-location-main/delete?id=` + id })
}
// 出库
export const outSparePartsOutLocationMain = async (id) => {
return await request.get({ url: `/eam/spare-parts-out-location-main/out?id=` + id })
}
// 导出备件入库记录主 Excel
export const exportSparePartsOutLocationMain = async (params) => {
if (params.isSearch) {
const data = { ...params }
return await request.downloadPost({
url: `/eam/spare-parts-out-location-main/export-excel-senior`,
data
})
} else {
return await request.download({
url: `/eam/spare-parts-out-location-main/export-excel`,
params
})
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/spare-parts-out-location-main/get-import-template' })
}

76
src/api/eam/sparePartsOutLocationRecordDetail/index.ts

@ -0,0 +1,76 @@
import request from '@/config/axios'
export interface SparePartsOutLocationRecordDetailVO {
id: number
number: string
theme: string
status: string
applyer: string
approver: number
approveContent: string
approveTime: Date
autoExamine: string
autoAgree: string
directCreateRecord: string
areaCode: string
locationCode: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询备件入库记录主列表
export const getSparePartsOutLocationDetailRecordPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.post({ url: '/eam/spare-parts-out-location-detail-record/senior', data })
} else {
return await request.get({ url: `/eam/spare-parts-out-location-detail-record/page`, params })
}
}
// 查询备件入库记录主详情
export const getSparePartsOutLocationDetailRecord = async (id: number) => {
return await request.get({ url: `/eam/spare-parts-out-location-detail-record/get?id=` + id })
}
// 新增备件入库记录主
export const createSparePartsOutLocationDetailRecord = async (
data: SparePartsOutLocationRecordDetailVO
) => {
return await request.post({ url: `/eam/spare-parts-out-location-detail-record/create`, data })
}
// 修改备件入库记录主
export const updateSparePartsOutLocationDetailRecord = async (
data: SparePartsOutLocationRecordDetailVO
) => {
return await request.put({ url: `/eam/spare-parts-out-location-detail-record/update`, data })
}
// 删除备件入库记录主
export const deleteSparePartsOutLocationDetailRecord = async (id: number) => {
return await request.delete({
url: `/eam/spare-parts-out-location-detail-record/delete?id=` + id
})
}
// 导出备件入库记录主 Excel
export const exportSparePartsOutLocationDetailRecord = async (params) => {
return await request.download({
url: `/eam/spare-parts-out-location-detail-record/export-excel`,
params
})
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({
url: '/eam/spare-parts-out-location-detail-record/get-import-template'
})
}

54
src/api/eam/sparePartsOutLocationRecordDetail/sparePartsOutLocationDetailRecord.js

@ -0,0 +1,54 @@
import request from '@/config/axios'
// 创建领用出库记录子
export function createSparePartsOutLocationRecordDetail(data) {
return request({
url: '/eam/spare-parts-out-location-detail-record/create',
method: 'post',
data: data
})
}
// 更新领用出库记录子
export function updateSparePartsOutLocationRecordDetail(data) {
return request({
url: '/eam/spare-parts-out-location-detail-record/update',
method: 'put',
data: data
})
}
// 删除领用出库记录子
export function deleteSparePartsOutLocationRecordDetail(id) {
return request({
url: '/eam/spare-parts-out-location-detail-record/delete?id=' + id,
method: 'delete'
})
}
// 获得领用出库记录子
export function getSparePartsOutLocationRecordDetail(id) {
return request({
url: '/eam/spare-parts-out-location-detail-record/get?id=' + id,
method: 'get'
})
}
// 获得领用出库记录子分页
export function getSparePartsOutLocationRecordDetailPage(query) {
return request({
url: '/eam/spare-parts-out-location-detail-record/page',
method: 'get',
params: query
})
}
// 导出领用出库记录子 Excel
export function exportSparePartsOutLocationRecordDetailExcel(query) {
return request({
url: '/eam/spare-parts-out-location-detail-record/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

71
src/api/eam/sparePartsOutLocationRecordMain/index.ts

@ -0,0 +1,71 @@
import request from '@/config/axios'
export interface SparePartsOutLocationRecordMainVO {
id: number
number: string
theme: string
applyer: string
approver: number
approveContent: string
approveTime: Date
autoExamine: string
autoAgree: string
directCreateRecord: string
areaCode: string
locationCode: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询领用出库记录主列表
export const getSparePartsOutLocationRecordMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.post({ url: '/eam/spare-parts-out-location-main-record/senior', data })
} else {
return await request.get({ url: `/eam/spare-parts-out-location-main-record/page`, params })
}
}
// 查询领用出库记录主详情
export const getSparePartsOutLocationRecordMain = async (id: number) => {
return await request.get({ url: `/eam/spare-parts-out-location-main-record/get?id=` + id })
}
// 新增领用出库记录主
export const createSparePartsOutLocationRecordMain = async (
data: SparePartsOutLocationRecordMainVO
) => {
return await request.post({ url: `/eam/spare-parts-out-location-main-record/create`, data })
}
// 修改领用出库记录主
export const updateSparePartsOutLocationRecordMain = async (
data: SparePartsOutLocationRecordMainVO
) => {
return await request.put({ url: `/eam/spare-parts-out-location-main-record/update`, data })
}
// 删除领用出库记录主
export const deleteSparePartsOutLocationRecordMain = async (id: number) => {
return await request.delete({ url: `/eam/spare-parts-out-location-main-record/delete?id=` + id })
}
// 导出领用出库记录主 Excel
export const exportSparePartsOutLocationRecordMain = async (params) => {
return await request.download({
url: `/eam/spare-parts-out-location-main-record/export-excel`,
params
})
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/spare-parts-out-location-main-record/get-import-template' })
}

11
src/api/eam/spotCheckSelectSet/index.ts

@ -59,3 +59,14 @@ export const importTemplate = () => {
export const updateEnableCode = async (data: BasicSpotCheckSelectSetVO) => {
return await request.post({ url: `/eam/basic/spot-check-select-set/ables` , data })
}
// 查询点检项选择集列表
export const getSpotCheckSelectSetList = async (params) => {
return await request.get({ url: `/eam/basic/spot-check-item/getList`, params })
}
// 查询点检方案项列表
export const getRalSpotCheckOptionItemList = async (params) => {
return await request.get({url: `/eam/relation-spotCheck-option-item/getList?optionCode=` + params})
}

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

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

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

@ -66,3 +66,8 @@ export const exportArea = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/areabasic/get-import-template' })
}
// 根据code获取数据列表
export const getAreabasicByCodes = async (params) => {
return await request.get({ url: `/wms/areabasic/listByCodes`, params })
}

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

@ -41,6 +41,18 @@ export const getBalancePage = async (params) => {
return await request.get({ url: `/wms/balance/page`, params })
}
}
// 查询库存余额列表(包括已冻结,已失效的物料)
export const getBalancePageAll = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/balance/seniorAll', data })
} else {
return await request.get({ url: `/wms/balance/pageAll`, params })
}
}
// 查询库存余额列表
export const getBalancePageReturn= async (params) => {
if (params.isSearch) {
@ -178,3 +190,11 @@ export const getBalanceByBusinessTypeByItemType = async (params) => {
return await request.get({ url: `/wms/balance/pageBusinessTypeToBalance`, params })
}
}
// 根据code获取数据列表
export const getBalanceItemListByCodes = async (data) => {
  return await request.get({ url: `/wms/balance/listByCodes`,data })
}
// 查询bom批次默认数据
export const getBanchBomPage = async (params) => {
return await request.get({ url: `/wms/balance/pageBOM`, params })
}

524
src/api/wms/business/business.ts

@ -0,0 +1,524 @@
// 获取供应商列表
import { getSupplierListByCodes, importTemplate } from '@/api/wms/supplier'
// 获取物料列表
import { getItemListByCodes } from '@/api/wms/itembasic'
// 获取供应商物料列表
import { getSupplierItemListByCodes } from '@/api/wms/supplieritem'
// 获取生产线物料
import { getProductionLineCodelistByCodes } from '@/api/wms/productionlineitem'
// 获取包装规格
import { getPackageunitListByCodes } from '@/api/wms/packageunit'
// 获取物料包装规格
import { getItemPackageunitListByCodes } from '@/api/wms/itempackage'
// 获取客户物料
import { getCustomerItemListByCodes } from '@/api/wms/customeritem'
// 获取库存余额
import { getBalanceItemListByCodes } from '@/api/wms/balance'
import { isString } from 'min-dash'
const message = useMessage() // 消息弹窗
const { t } = useI18n() // 国际化
/**
*
* tableFormBlur
* FormBlur
*/
export const tableFormBlurVer = async (headerItem, val, row, index,routeName,formRef,detailData,tableData,callback) => {
if (
headerItem.field == 'fromPackingNumber' ||
headerItem.field == 'packingNumber' ||
headerItem.field == 'itemCode' ||
headerItem.field == 'packUnit' ||
headerItem.field == 'secondPackUnit' ||
headerItem.field == 'fromPackUnit' ||
headerItem.field == 'toPackUnit'||
headerItem.field == 'toPackUnit'||
headerItem.field == 'supplierItemCode'
) {
let searchField = headerItem.field
let pageApi = ref()
let params = ref()
if (val && isString(val)) {
// const obj = props.tableAllSchemas.tableFormColumns.find((item) => item.field == headerItem.field)
if (val.indexOf(',') > -1) {
message.alert('该输入框只能输入一条数据')
row[headerItem.field] = ''
return
}
// 校验
let params = ref({})
let searchCondition1 = headerItem.tableForm.searchCondition //获取data.ts参数信息
// 循环参数设置参数为key:value格式
if (searchCondition1 && searchCondition1.length > 0) {
for (let i = 0; i < searchCondition1.length; i++) {
if (searchCondition1[i].isMainValue) {
params.value[searchCondition1[i].key] = formRef.formModel[
searchCondition1[i].value
]
? formRef.formModel[searchCondition1[i].value]
: detailData
? detailData[searchCondition1[i].value]
: row
? row[searchCondition1[i].value]
: ''
// 是否含有空参数情况
let isNull = false
if (
params.value[searchCondition1[i].key] == '' ||
params.value[searchCondition1[i].key] == undefined
) {
isNull = true
}
if (isNull) {
message.warning(
searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
)
row[headerItem.field] = ''
return
}
} else {
// 扩展 转换为筛选条件进行查询
if (searchCondition1[i].isSearch) {
if (searchCondition1[i].isFormModel) {
//用formModel中的值
if (searchCondition1[i].required) {
if (
formRef.formModel[searchCondition1[i].value] == '' ||
formRef.formModel[searchCondition1[i].value] == undefined
) {
message.warning(
searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
)
row[headerItem.field] = ''
return
}
}
}
} else {
params.value[searchCondition1[i].key] = searchCondition1[i].value
}
}
}
}
params.value[headerItem.field] = val?.trim()
// 判断改包装号是否已经添加
const seen = new Set()
const repeatCode = new Set()
let arr = tableData.map((item) => item[headerItem.field]?.trim())
arr.forEach((item) => {
if (seen.has(item)) {
repeatCode.add(item)
} else {
seen.add(item)
}
})
const arr1 = Array.from(repeatCode)
if (arr1.length > 0) {
message.warning(`${arr1.join(',')}${t('ts.已经存在')}`)
row[headerItem.field] = ''
return
}
if (
headerItem.field == 'fromPackingNumber' ||
headerItem.field == 'packingNumber' ||
headerItem.field == 'itemCode'
) {
// 业务
// 采购退货申请,制品拆解,调拨出库,报废出库申请,合格转隔离,隔离转合格,隔离转报废,合格转报废,报废转隔离,库存移动申请,库存修改申请
if (
routeName == 'PurchasereturnRequestMain' ||
routeName == 'ProductdismantleRequestMain' ||
routeName == 'TransferissueRequestMain' ||
routeName == 'ScrapRequestMain' ||
routeName == 'OktoholdRequestMain' ||
routeName == 'HoldtookRequestMain' ||
routeName == 'HoldtoscrapRequestMain' ||
routeName == 'OktoscrapRequestMain' ||
routeName == 'ScraptoholdRequestMain' ||
routeName == 'InventorymoveRequestMain' ||
routeName == 'InventorychangeRequestMain'
) {
// //合格转隔离,隔离转合格,隔离转报废,合格转报废,报废转隔离,库存移动申请参数稍有不同
// if (
// routeName == 'OktoholdRequestMain' ||
// routeName == 'HoldtookRequestMain' ||
// routeName == 'HoldtoscrapRequestMain' ||
// routeName == 'OktoscrapRequestMain' ||
// routeName == 'ScraptoholdRequestMain' ||
// routeName == 'InventorymoveRequestMain' ||
// routeName == 'InventorychangeRequestMain'
// ) {
// searchField = 'packingNumber'
// params.value.packingNumber = val?.trim()
// }
// pageApi.value = getBalanceItemListByCodes
} else if (
routeName == 'RepleinshRequestMain' ||
routeName == 'IssueRequestMain' ||
routeName == 'InventoryinitRequestMain'
) {
// 补料申请业务
pageApi.value = getItemListByCodes
searchField = 'code'
params.value.codes = val?.trim()
} else if (
routeName == 'ProductionMainAssemble' ||
routeName == 'ProductionMainASparePart' ||
routeName == 'ProductionMainPredictSparePart' ||
routeName == 'ProductreceiptRequestMain' ||
routeName == 'ProductreceiptRequestMainA' ||
routeName == 'ProductreceiptscrapRequestMain' ||
routeName == 'ProductscrapRequestMain'
) {
// 装配计划,裝配备件计划,预备产件计划,预生产收货申请,装配收货申请,报修收货申请,制品报废申请
pageApi.value = getProductionLineCodelistByCodes
params.value.productionLineCode=
formRef.formModel.productionLine || formRef.formModel.productionLineCode || row.productionLine || row.productionLineCode,
params.value.itemCodes=val?.trim()
}
} else if (
headerItem.field == 'packUnit' ||
headerItem.field == 'secondPackUnit' ||
headerItem.field == 'fromPackUnit' ||
headerItem.field == 'toPackUnit'
) {
searchField = 'packUnit'
//包装规格
// 预生产收货申请,装配收货申请,报修收货申请,客户退货申请,计划外入库,计划外出库,翻包申请
if (
routeName == 'ProductreceiptRequestMain' ||
routeName == 'ProductreceiptRequestMainA' ||
routeName == 'ProductreceiptscrapRequestMain' ||
routeName == 'CustomerreturnRequestMain' ||
routeName == 'UnplannedreceiptRequestMain' ||
routeName == 'UnplannedissueJobMain' ||
routeName == 'PackageoverRequestMain'
) {
params.value.itemCode= row.itemCode
params.value.packUnit= val?.trim()
pageApi.value = getItemPackageunitListByCodes
}
} else if (
headerItem.field == 'supplierItemCode'
) {
// 生产退料申请,隔离退料申请
if (
routeName == 'ProductionreturnRequestMain' ||
routeName == 'ProductionreturnRequestMainNo'
) {
searchField = 'supplierCode'
params.value.itemCodes= row.itemCode
params.value.supplierCode= val?.trim()
pageApi.value = getSupplierItemListByCodes
}
}
const list = ref()
// 调取包装接口
await pageApi.value(params.value).then(async (res) => {
list.value = res ? res : []
// 只查一条数据,多条数据查询默认显示不存在
if (res.length == 1) {
callback(searchField,list.value)
} else {
message.alert('代码' + row[headerItem.field] + '没有找到对应数据')
row[headerItem.field] = ''
return
}
})
}
}
}
export const FormBlur = async (formField, val,routeName,formRef,detailData,formSchema,callback) => {
let pageApi = ref()
let params = ref()
let setV = {}
setV[formField] = ''
if (val && isString(val)) {
if (
formField == 'supplierCode' ||
formField == 'itemCode' ||
formField == 'productItemCode' ||
formField == 'componentItemCode' ||
formField == 'packUnit' ||
formField == 'inPackUnit' ||
formField == 'fromPackingNumber'
) {
let searchField = 'code'
if (formField == 'supplierCode') {
params.value = val?.trim()
pageApi.value = getSupplierListByCodes
} else if (
formField == 'itemCode' ||
formField == 'productItemCode' ||
formField == 'componentItemCode'
) {
// 销售价格单
if (routeName == 'Saleprice') {
params.value = {
customerCode: formRef.formModel.customerCode,
itemCodes: val?.trim()
}
pageApi.value = getCustomerItemListByCodes
searchField = 'itemCode'
}else if (routeName == 'ProductscrapRequestMain') {
// 制品报废申请
params.value = {
productionLineCode:
detailData.productionLine || detailData.productionLineCode,
itemCodes: val?.trim()
}
pageApi.value = getProductionLineCodelistByCodes
searchField = 'itemCode'
}else {
// params.value = val.trim()
searchField = 'code'
params.value={
codes:val?.trim()
}
pageApi.value = getItemListByCodes
}
} else if (formField == 'packUnit') {
if(routeName == 'Itemwarehouse'||routeName == 'Callmaterials'){//物料仓库默认配置,叫料标签
searchField = 'packUnit'
params.value = {
itemCode: formRef.formModel.itemCode,
packUnit: val?.trim()
}
pageApi.value = getItemPackageunitListByCodes
}else{
params.value = val?.trim()
pageApi.value = getPackageunitListByCodes
}
} else if (formField == 'inPackUnit') {
params.value = {
itemCode: formRef.formModel.itemCode,
packUnit: val.trim()
}
pageApi.value = getItemPackageunitListByCodes
}
// else if (formField == 'fromPackingNumber') {
// params.value = {
// packingNumber: val?.trim()
// }
// pageApi.value = getBalanceItemListByCodes
// }
let obj = {}
let searchCondition1 = formSchema.find((item) => item.field == formField).componentProps
.searchCondition //获取data.ts参数信息
// 循环参数设置参数为key:value格式
if (searchCondition1 && searchCondition1.length > 0) {
for (let i = 0; i < searchCondition1.length; i++) {
if (searchCondition1[i].isMainValue) {
obj[searchCondition1[i].key] = formRef.formModel[searchCondition1[i].value]
? formRef.formModel[searchCondition1[i].value]
: detailData
? detailData[searchCondition1[i].value]
: ''
// 是否含有空参数情况
let isNull = false
if (obj[searchCondition1[i].key] == '' || obj[searchCondition1[i].key] == undefined) {
isNull = true
}
if (isNull) {
message.warning(
searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
)
return
}
} else {
// 扩展 转换为筛选条件进行查询
if (searchCondition1[i].isSearch) {
if (searchCondition1[i].isFormModel) {
//用formModel中的值
if (searchCondition1[i].required) {
if (
formRef.formModel[searchCondition1[i].value] == '' ||
formRef.formModel[searchCondition1[i].value] == undefined
) {
message.warning(
searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
)
return
}
}
}
} else {
obj[searchCondition1[i].key] = searchCondition1[i].value
}
}
}
}
let obj1 = formSchema.find((item) => item.field == formField)
if (!obj1.componentProps.multiple && val.indexOf(',') > -1) {
message.alert('该输入框只能输入一条数据')
formRef.setValues(setV)
return
}
await pageApi.value(params.value).then((res) => {
let arr1 = val.split(',')
let list = ref([])
list.value = res
if (list.value?.length == 0) {
message.alert('暂无数据')
formRef.setValues(setV)
return
}
if (arr1.length != list.value.length) {
let arr2 = list.value.map((item) => item.code)
let str = [
...arr1.filter((item) => !arr2.includes(item)),
...arr2.filter((item) => !arr1.includes(item))
].join(',')
message.alert('代码' + str + '没有找到对应数据')
formRef.setValues(setV)
return
}
// emit('searchTableSuccess', formField, searchField, list.value, formRef.value, 'form')
callback(searchField,list.value)
})
}
}
}
// 根据下方输入框失去焦点校验信息
export const getListByBottonInput = async (headerItem, val,row,routeName,formRef,detailData,tableData,callback) => {
let pageApi = ref()
let params = ref({})
let list = ref([])
let field = 'itemCode'
// scp采购订单
if(!val)return;
if (routeName == 'PurchaseMain') {
pageApi.value = getSupplierItemListByCodes
params.value = {
supplierCode: formRef.formModel.supplierCode,
itemCodes: val?.trim(),
available: true
}
} else if (routeName == 'ProductionMain') {
pageApi.value = getProductionLineCodelistByCodes
params.value = {
productionLineCode: formRef.formModel.productionLine,
itemCodes: val?.trim()
}
} else if (
routeName == 'ZZBJDeliverPlanMain' ||
routeName == 'DeliverPlanMain' ||
routeName == 'DeliverRequestMain' ||
routeName == 'ZZBJDeliverRequestMain'
) {
// 自制备件发货计划,发货计划,成品发货申请,自制备件发货申请
pageApi.value = getCustomerItemListByCodes
params.value = {
customerCode: formRef.formModel.customerCode,
itemCodes: val?.trim()
}
}
// else if (routeName == 'UnplannedissueRequestMain') {
// // 计划外出库
// pageApi.value = getBalanceItemListByCodes
// params.value = {
// packingNumber: val?.trim()
// }
// field = 'packingNumber'
// }
else {
params.value.codes = val?.trim()
pageApi.value = getItemListByCodes
}
let searchCondition1 = headerItem.tableForm.searchCondition //获取data.ts参数信息
// 循环参数设置参数为key:value格式
if (searchCondition1 && searchCondition1.length > 0) {
for (let i = 0; i < searchCondition1.length; i++) {
if (searchCondition1[i].isMainValue) {
params.value[searchCondition1[i].key] = formRef.formModel[
searchCondition1[i].value
]
? formRef.formModel[searchCondition1[i].value]
: detailData
? detailData[searchCondition1[i].value]
: ''
// 是否含有空参数情况
let isNull = false
if (
params.value[searchCondition1[i].key] == '' ||
params.value[searchCondition1[i].key] == undefined
) {
isNull = true
}
if (isNull) {
message.warning(
searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
)
return
}
} else if (searchCondition1[i].isTableRowValue) {
if (searchCondition1[i].required) {
if (row[searchCondition1[i].value] == '' || row[searchCondition1[i].value] == undefined) {
message.warning(
searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
)
return
}
}
row[searchCondition1[i].value]
//查询当前table表数据的值
params.value[searchCondition1[i].key] = row[searchCondition1[i].value]
} else {
// 扩展 转换为筛选条件进行查询
if (searchCondition1[i].isSearch) {
if (searchCondition1[i].isFormModel) {
//用formModel中的值
if (searchCondition1[i].required) {
if (
formRef.formModel[searchCondition1[i].value] == '' ||
formRef.formModel[searchCondition1[i].value] == undefined
) {
message.warning(
searchCondition1[i].message ? searchCondition1[i].message : '前置条件未选择!'
)
return
}
}
}else {
params.value[searchCondition1[i].key] = searchCondition1[i].value
}
} else {
params.value[searchCondition1[i].key] = searchCondition1[i].value
}
}
}
}
await pageApi.value(params.value).then(async (res) => {
list.value = res ? res : []
let arr1 = val.split(',').map(item=>item.trim())
if (arr1.length != res.length) {
let arr2 = res.map((item) => item[field])
let str = [
...arr1.filter((item) => !arr2.includes(item)),
...arr2.filter((item) => !arr1.includes(item))
].join(',')
message.alert('代码' + str + '没有找到对应数据')
return
} else {
let repeatCode = []
if(tableData.length > 0){
tableData.forEach((item) => {
const findIndex = arr1.findIndex(valItem=>valItem==item[field])
if(findIndex > -1){
arr1.splice(findIndex,1)
repeatCode.push(item.itemCode)
}
})
}
if(repeatCode.length>0){
message.warning(`${t('ts.代码')}${repeatCode.join(',')}${t('ts.已经存在')}`);
return;
}
callback(list.value)
}
})
}

1
src/api/wms/countPlanMain/index.ts

@ -8,6 +8,7 @@ export interface CountPlanMainVO {
ignoreListOfItem: string
ignoreListOfLocation: string
scopeList: string
countSplitType: string
number: string
businessType: string
remark: string

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

@ -73,3 +73,8 @@ export const getPageBusinessTypeToItemCode = async (params) => {
return await request.get({ url: `/wms/customeritem/pageBusinessTypeToItemCode`, params })
}
}
// 根据code获取数据列表
export const getCustomerItemListByCodes = async (data) => {
return await request.get({ url: `/wms/customeritem/listByCodes?itemCodes=` + data.itemCodes + '&customerCode='+data.customerCode + '&businessType='+(data.businessType?data.businessType:'') })
}

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

@ -1,4 +1,6 @@
import request from '@/config/axios'
import { isString } from '@/utils/is'
import dayjs from 'dayjs'
export interface DemandforecastingDetailVO {
predictTimeType: string
@ -15,6 +17,57 @@ export interface DemandforecastingDetailVO {
available: string
}
// 要货预测-列表和头部请求参数
const getPageParams = (params)=>{
// 到货日期
if(params.dueDate&&params.dueDate.length>0){
if(isString(params.dueDate[0])){
params.startDate = params.dueDate[0]
}else{
params.startDate = params.dueDate[0].format('YYYY-MM-DD')
}
}
if(params.dueDate&&params.dueDate.length>1){
if(isString(params.dueDate[1])){
params.endDate = params.dueDate[1]
}else{
params.endDate = params.dueDate[1].format('YYYY-MM-DD')
}
}
params.dueDate = ''
//计划员
if(params.planerId&&params.planerId.length>0){
params.planers = params.planerId.join(',')
}
params.planerId = ''
// 供应商代码
if(params.supplierCode&&params.supplierCode.length>0){
let keyValue = params.supplierCode.split(' ')
keyValue.forEach(item=>{item = item.trim()})
params.supplierCodes = keyValue.join(',')
}
params.supplierCode = ''
// 物料代码
if(params.itemCode&&params.itemCode.length>0){
let keyValue = params.itemCode.split(' ')
keyValue.forEach(item=>{item = item.trim()})
params.itemCodes = keyValue.join(',')
}
params.itemCode = ''
// 版本号
if(params.version&&params.version.length>0){
let keyValue = params.version.split(' ')
keyValue.forEach(item=>{item = item.trim()})
params.versions = keyValue.join(',')
}
params.version = ''
return params
}
// 查询要货预测子列表
export const getDemandforecastingDetailPage = async (params) => {
if (params.isSearch) {
@ -22,6 +75,8 @@ export const getDemandforecastingDetailPage = async (params) => {
const data = {...params}
return await request.post({ url: '/wms/demandforecasting-detail/senior', data })
} else {
params = getPageParams(params)
console.log('params',params)
return await request.get({ url: `/wms/demandforecasting-detail/page`, params })
}
}
@ -50,3 +105,16 @@ export const deleteDemandforecastingDetail = async (id: number) => {
export const exportDemandforecastingDetail = async (params) => {
return await request.download({ url: `/wms/demandforecasting-detail/export-excel`, params })
}
// 查询要货预测主列表
export const getPageTableHead = async (params) => {
params = getPageParams(params)
console.log('params',params)
return await request.get({ url: `/wms/demandforecasting-detail/queryPageTableHead`, params })
}
// 查询版本号
export const queryVersion = async (params) => {
return await request.get({ url: `/wms/demandforecasting-detail/queryVersion`, params })
}

20
src/api/wms/demandforecastingMain/index.ts

@ -81,3 +81,23 @@ export const exportDemandforecastingMain = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/demandforecasting-main/get-import-template' })
}
// 计划员
export const queryUserPlanerList = async () => {
return await request.post({ url: `/wms/demandforecasting-main/queryUserPlanerList`,data:{} })
}
// 供应商代码
export const querySupplierList = async (data) => {
return await request.post({ url: `/wms/demandforecasting-main/querySupplierList`,data })
}
// 是否已读接口
export const updateIsRead = async (data) => {
return await request.post({ url: `/wms/demandforecasting-main/updateIsRead`,data })
}

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

@ -114,3 +114,8 @@ export const selectConfigToItembasic = async (params) => {
export const getQueryItemCodeInfo = async (data) => {
return await request.post({ url: 'wms/itembasic/queryItemCodeInfo', data })
}
// 根据code获取数据列表
export const getItemListByCodes = async (params) => {
return await request.get({ url: `/wms/itembasic/listByCodes`,params})
}

25
src/api/wms/itempackage/index.ts

@ -29,7 +29,26 @@ export const getItempackagingPage = async (params) => {
return await request.get({ url: `/wms/itempackage/page`, params })
}
}
// 查询物料包装信息树形列表
export const getItempackagingPageTree = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/itempackage/seniorTree', data })
} else {
return await request.get({ url: `/wms/itempackage/pageTree`, params })
}
}
// 查询物料包装信息树形列表
export const getItempackagingPageTreeSCP = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/itempackage/seniorTreeSCP', data })
} else {
return await request.get({ url: `/wms/itempackage/pageTreeSCP`, params })
}
}
// 查询物料包装信息 列表--供应商发货申请
export const getItempackagingPageBySupplierdeliver = async (params) => {
if (params.isSearch) {
@ -86,3 +105,7 @@ export const exportItempackaging = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/itempackage/get-import-template' })
}
// 根据code获取数据列表
export const getItemPackageunitListByCodes = async (data) => {
return await request.get({ url: `/wms/itempackage/listByCodes?itemCode=` + data.itemCode + '&packUnit='+data.packUnit})
}

56
src/api/wms/mstr/index.ts

@ -0,0 +1,56 @@
import request from '@/config/axios'
export interface MstrVO {
id: number
hflccHflcd: string
plProdLine: string
plDesc: string
plMvarAcct: string
plCchgAcct: string
type: string
remark: string
extraProperties: string
concurrencyStamp: number
siteId: string
}
// 查询产品类信息列表
export const getMstrPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/mstr/senior', data })
} else {
return await request.get({ url: `/wms/mstr/page`, params })
}
}
// 查询产品类信息详情
export const getMstr = async (id: number) => {
return await request.get({ url: `/wms/mstr/get?id=` + id })
}
// 新增产品类信息
export const createMstr = async (data: MstrVO) => {
return await request.post({ url: `/wms/mstr/create`, data })
}
// 修改产品类信息
export const updateMstr = async (data: MstrVO) => {
return await request.put({ url: `/wms/mstr/update`, data })
}
// 删除产品类信息
export const deleteMstr = async (id: number) => {
return await request.delete({ url: `/wms/mstr/delete?id=` + id })
}
// 导出产品类信息 Excel
export const exportMstr = async (params) => {
return await request.download({ url: `/wms/mstr/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/mstr/get-import-template' })
}

4
src/api/wms/packageoverJobMain/index.ts

@ -69,6 +69,10 @@ export const updatePackageoverJobMain = async (data: PackageoverJobMainVO) => {
export const deletePackageoverJobMain = async (id: number) => {
return await request.delete({ url: `/wms/packageover-job-main/delete?id=` + id })
}
// 关闭翻包任务主
export const closePackageoverJobMain = async (id: number) => {
return await request.put({ url: `/wms/packageover-job-main/close?id=` + id })
}
// 导出翻包任务主 Excel
export const exportPackageoverJobMain = async (params) => {

26
src/api/wms/packageunit/index.ts

@ -33,7 +33,26 @@ export const getPackageunitPage = async (params) => {
return await request.get({ url: `/wms/packageunit/page`, params })
}
}
// 查询物品包装规格信息 列表树状图
export const getPackageunitPageTree = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/packageunit/seniorTree', data })
} else {
return await request.get({ url: `/wms/packageunit/pageTree`, params })
}
}
// 查询物品父级包装规格信息
export const getPackageunitPageParent = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/packageunit/seniorParent', data })
} else {
return await request.get({ url: `/wms/packageunit/pageParent`, params })
}
}
// 查询物品包装规格信息 详情
export const getPackageunit = async (id: number) => {
return await request.get({ url: `/wms/packageunit/get?id=` + id })
@ -69,3 +88,8 @@ export const exportPackageunit = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/packageunit/get-import-template' })
}
// 根据code获取数据列表
export const getPackageunitListByCodes = async (codes: string) => {
return await request.get({ url: `/wms/packageunit/listByCodes?codes=` + codes })
}

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

@ -75,7 +75,7 @@ export const exportPickJobMain = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/pick-job-main/export-excel-senior', data })
return await request.downloadPost({ url: '/wms/pick-job-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/pick-job-main/export-excel`, params })
}

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

@ -62,7 +62,7 @@ export const exportPickRecordMain = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/pick-record-main/export-excel-senior', data })
return await request.downloadPost({ url: '/wms/pick-record-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/pick-record-main/export-excel`, params })
}

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

@ -51,7 +51,7 @@ export const exportPlansetting = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/plansetting/export-excel-senior', data })
return await request.downloadPost({ url: '/wms/plansetting/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/plansetting/export-excel`, params })
}

6
src/api/wms/preparetoissueMain/index.ts

@ -107,3 +107,9 @@ export const publish = (id) => {
export const resetting = (id) => {
return request.put({ url: '/wms/preparetoissue-main/resetting?id=' + id })
}
// 创建发料申请
export const generateIssueRequest = (number) => {
return request.post({ url: '/wms/preparetoissue-main/generateIssueRequest?number=' + number })
}

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

@ -63,3 +63,8 @@ export const importTemplate = () => {
export const getProcessNoPage = async (params) => {
return await request.get({ url: `/wms/process/noPage`, params })
}
// 根据code获取数据列表
export const getProcessByCodes = async (params) => {
return await request.get({ url: `/wms/process/listByCodes`, params })
}

15
src/api/wms/productionMain/index.ts

@ -179,11 +179,20 @@ export const resetting = (id) => {
return request.put({ url: '/wms/production-main/resetting?id=' + id })
}
// 创建备料计划/制品收货申请
export const generateRequest = (number) => {
return request.post({ url: '/wms/production-main/generateRequest?number=' + number })
// 创建备料计划
export const generatePreparetoissue = (number) => {
return request.post({ url: '/wms/production-main/generatePreparetoissue?number=' + number })
}
// 创建制品收货申请
export const generateProductreceiptRequest = (number) => {
return request.post({ url: '/wms/production-main/generateProductreceiptRequest?number=' + number })
}
// 创建发料申请
export const generateIssueRequest = (number) => {
return request.post({ url: '/wms/preparetoissue-main/generateIssueRequest?number=' + number })
}

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

@ -67,3 +67,8 @@ export const exportProductionlineitem = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/productionlineitem/get-import-template' })
}
export const getProductionLineCodelistByCodes = (data) => {
return request.get({ url: `/wms/productionlineitem/listByCodes?productionLineCode=`+data.productionLineCode +'&itemCodes='+data.itemCodes})
}

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

@ -15,7 +15,17 @@ export interface PurchasePlanDetailVO {
updater: string
available: string
}
// 要货预测-列表和头部请求参数
const getPageParams = (params)=>{
console.log('params.status',params.status)
// 状态
if(params.status&&params.status.length>0){
params.statuss = params.status.join(',')
}
params.status = ''
return params
}
// 查询要货计划子列表
export const getPurchasePlanDetailPage = async (params) => {
if (params.isSearch) {
@ -23,6 +33,7 @@ export const getPurchasePlanDetailPage = async (params) => {
const data = {...params}
return await request.post({ url: '/wms/purchase-plan-detail/senior', data })
} else {
params = getPageParams(params)
return await request.get({ url: `/wms/purchase-plan-detail/page`, params })
}
}

19
src/api/wms/purchasePlanMain/index.ts

@ -85,7 +85,24 @@ export const exportPurchasePlanMain = async (params) => {
return await request.download({ url: `/wms/purchase-plan-main/export-excel`, params })
}
}
// 导出明细要货计划主 Excel
export const exportDetailsPurchasePlanMain = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/purchase-plan-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/purchase-plan-main/export-excel-detail`, params })
}
}
// 导出要货计划二维表 Excel
export const exportTablePurchasePlanMain = async (params) => {
// if (params.isSearch) {
// const data = {...params}
// return await request.downloadPost({ url: `/wms/purchase-plan-main/export-excel-senior`, data })
// } else {
return await request.download({ url: `/wms/purchase-plan-main/export-excel`, params })
//}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/purchase-plan-main/get-import-template' })

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

@ -136,6 +136,6 @@ export const acceptPurchasereceiptJobMain = (id: number) => {
}
// 拒收采购收货任务主
export const refusalPurchasereceiptJobMain = (id: number) => {
return request.put({ url: '/wms/purchasereceipt-job-main/refusal?id=' + id })
export const refusalPurchasereceiptJobMain = (data) => {
return request.post({ url: '/wms/purchasereceipt-job-main/refusal',data})
}

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

@ -61,6 +61,19 @@ export const getPurchasereceiptRecordDetailPage = async (params) => {
}
}
// 查询采购拒收记录
export const getPurchasereceiptRecordDetailRefusePage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchasereceipt-record-detail/seniorRefuse', data })
} else {
return await request.get({ url: `/wms/purchasereceipt-record-detail/pageRefuse`, params })
}
}
// 查询备件收货记录子列表
export const getPurchasereceiptRecordDetailPageSpare = async (params) => {
if (params.isSearch) {

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

@ -89,6 +89,17 @@ export const exportPurchasereceiptRecordMain = async (params) => {
}
}
// 导出采购收货记录主 Excel
export const exportPurchasereceiptRecordRefuseMain = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/purchasereceipt-record-main/export-excel-senior-refuse`, data })
} else {
return await request.download({ url: `/wms/purchasereceipt-record-main/export-excel-refuse`, params })
}
}
// 导出备件收货记录
export const exportSparereceiptRecordMain = async (params) => {
if (params.isSearch) {

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

@ -57,6 +57,18 @@ export const getPurchasereceiptRequestDetailPageSpare = async (params) => {
}
}
// 查询M类型收货申请子列表
export const getPurchasereceiptRequestDetailPageOrderMType = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchasereceipt-request-detail/seniorOrderMType', data })
} else {
return await request.get({ url: `/wms/purchasereceipt-request-detail/pageOrderMType`, params })
}
}
// 查询采购收货申请子详情
export const getPurchasereceiptRequestDetail = async (id: number) => {
return await request.get({ url: `/wms/purchasereceipt-request-detail/get?id=` + id })

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

@ -85,7 +85,7 @@ export const exportScrapJobMain = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/scrap-job-main/export-excel-senior', data })
return await request.downloadPost({ url: '/wms/scrap-job-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/scrap-job-main/export-excel`, params })
}

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

@ -84,7 +84,7 @@ export const exportStockupMainJob = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/stockup-main-job/export-excel-senior', data })
return await request.downloadPost({ url: '/wms/stockup-main-job/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/stockup-main-job/export-excel`, params })
}

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

@ -46,7 +46,7 @@ export const exportStrategy = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/strategy/export-excel-senior', data })
return await request.downloadPost({ url: '/wms/strategy/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/strategy/export-excel`, params })
}

6
src/api/wms/supplier/index.ts

@ -93,3 +93,9 @@ export const exportSupplierSCP = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/supplier/get-import-template' })
}
// 根据code获取数据列表
export const getSupplierListByCodes = async (codes: string) => {
return await request.get({ url: `/wms/supplier/listByCodes?codes=` + codes })
}

65
src/api/wms/supplierCycle/index.ts

@ -0,0 +1,65 @@
import request from '@/config/axios'
export interface SupplierCycleVO {
id: number
supplierCode: string
monday: string
tuesday: string
wednesday: string
thursday: string
friday: string
saturday: string
sunday: string
version: string
remark: string
extraProperties: string
siteId: string
beginTime: Date
endTime: Date
available: string
status: string
concurrencyStamp: string
ruleUserId: number
departmentCode: string
}
// 查询要货预测周期列表
export const getSupplierCyclePage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/supplier-cycle/senior', data })
} else {
return await request.get({ url: `/wms/supplier-cycle/page`, params })
}
}
// 查询要货预测周期详情
export const getSupplierCycle = async (id: number) => {
return await request.get({ url: `/wms/supplier-cycle/get?id=` + id })
}
// 新增要货预测周期
export const createSupplierCycle = async (data: SupplierCycleVO) => {
return await request.post({ url: `/wms/supplier-cycle/create`, data })
}
// 修改要货预测周期
export const updateSupplierCycle = async (data: SupplierCycleVO) => {
return await request.put({ url: `/wms/supplier-cycle/update`, data })
}
// 删除要货预测周期
export const deleteSupplierCycle = async (id: number) => {
return await request.delete({ url: `/wms/supplier-cycle/delete?id=` + id })
}
// 导出要货预测周期 Excel
export const exportSupplierCycle = async (params) => {
return await request.download({ url: `/wms/supplier-cycle/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/supplier-cycle/get-import-template' })
}

9
src/api/wms/supplierdeliverRequestDetail/index.ts

@ -43,7 +43,14 @@ export const getSupplierdeliverRequestDetailPage = async (params) => {
return await request.get({ url: `/wms/supplierdeliver-request-detail/page`, params })
}
}
// 查询供应商发货申请子列表
export const getGenerateLabelList = async (params) => {
return await request.get({ url: `/wms/supplierdeliver-request-detail/generateLabelList`, params })
}
// 查询托规格列表
export const getGenerateLabelParentList = async (params) => {
return await request.get({ url: `/wms/supplierdeliver-request-detail/generateLabelParentList`, params })
}
// 查询供应商发货申请子详情
export const getSupplierdeliverRequestDetail = async (id: number) => {
return await request.get({ url: `/wms/supplierdeliver-request-detail/get?id=` + id })

6
src/api/wms/supplierinvoiceRequestDetail/index.ts

@ -41,8 +41,14 @@ export const getPoNumber = async (params) => {
// 查询供应商发票明细数据
export const getPoNumberPoLineInfo = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: `/wms/supplierinvoice-request-detail/getPoNumbersenior`, data})
}else{
return await request.get({ url: `/wms/supplierinvoice-request-detail/getPoNumberPoLineInfo`, params})
}
}
// 查询供应商发票申请子详情

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

@ -75,8 +75,8 @@ export const subSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/sub?id=` + id })
}
// 采购--审批通过供应商发货申请主
export const appSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/app?id=` + id })
export const appSupplierinvoiceRequestMain = async (id: number,balanceStatement:any) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/app?id=` + id+ (balanceStatement?'&balanceStatement=' + balanceStatement:'')})
}
// 采购--驳回供应商发货申请主
export const rejSupplierinvoiceRequestMain = async (data) => {
@ -89,8 +89,8 @@ export const invoiceSentOutSupplierinvoiceRequestMain = async (id: number) => {
}
// 财务--审批通过供应商发货申请主
export const financeappSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/financeApp?id=` + id })
export const financeappSupplierinvoiceRequestMain = async (data) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/financeApp`, data })
}
// 财务--驳回供应商发货申请主
export const financerejSupplierinvoiceRequestMain = async (data) => {
@ -147,3 +147,8 @@ export const getLoginUserRoleList = async () => {
}
// 编辑的时候计算主表系统税额
export const getTaxAmount = async ({id,taxRate}) => {
return await request.get({ url: `/wms/supplierinvoice-request-main/computeById?id=${id}&taxRate=${taxRate}`})
}

17
src/api/wms/supplieritem/index.ts

@ -51,16 +51,27 @@ export const getSupplieritem = async (id: number) => {
export const createSupplieritem = async (data: SupplieritemVO) => {
return await request.post({ url: `/wms/supplieritem/create`, data })
}
export const createSupplieritemSCP = async (data: SupplieritemVO) => {
return await request.post({ url: `/wms/supplieritem/createSCP`, data })
}
// 修改供应商物料
export const updateSupplieritem = async (data: SupplieritemVO) => {
return await request.put({ url: `/wms/supplieritem/update`, data })
}
// 修改供应商物料
export const updateSupplieritemSCP = async (data: SupplieritemVO) => {
return await request.put({ url: `/wms/supplieritem/updateSCP`, data })
}
// 删除供应商物料
export const deleteSupplieritem = async (id: number) => {
return await request.delete({ url: `/wms/supplieritem/delete?id=` + id })
}
export const deleteSupplieritemSCP = async (id: number) => {
return await request.delete({ url: `/wms/supplieritem/deleteSCP?id=` + id })
}
// 导出供应商物料 Excel
export const exportSupplieritem = async (params) => {
@ -100,3 +111,9 @@ export const selectItembasicTypeToSupplieritem = async (params) => {
export const getDefaultLocationCode = async(data: SupplieritemVO)=> {
return await request.post({ url: `/wms/supplieritem/getDefaultLocationCode`, data })
}
// 根据code获取数据列表
export const getSupplierItemListByCodes = async (data) => {
return await request.get({ url: `/wms/supplieritem/listByCodes?supplierCode=`+data.supplierCode +'&itemCodes='+data.itemCodes })
}

4
src/api/wms/warehouse/index.ts

@ -70,3 +70,7 @@ export const pageBusinessTypeToWarehouse = async (params) => {
return await request.get({ url: `/wms/warehouse/pageBusinessTypeToWarehouse`, params })
}
}
// 根据code获取数据列表
export const getWarehouseByCodes = async (params) => {
return await request.get({ url: `/wms/warehouse/listByCodes`, params })
}

6
src/components/Annex/src/Annex.vue

@ -3,7 +3,7 @@
<div class="annex">
<div class="title flex items-center">
<!-- <div class="title-txt">附件</div> -->
<UploadFile :isShowFile="false" :isShowTip="false" :fileType="fileType" :title="t('ts.添加附件')" :upData="upData" :limit="10"
<UploadFile :isShowFile="false" :isShowTip="false" :fileType="fileType" :fileSize="fileSize" :title="t('ts.添加附件')" :upData="upData" :limit="10"
@update:modelValue="handleAnnexSuccess" v-if="showAddBtn&&annexData.annexList.length<5"/>
</div>
<div class="list">
@ -56,6 +56,10 @@ const props = defineProps({
return ['apk','doc', 'xls', 'ppt', 'txt', 'pdf','png', 'jpg', 'jpeg']
}
},
fileSize:{
type:Number,
required: false,
},
showPreview: {
type: Boolean,
required: false

447
src/components/BasicForm/src/BasicForm.vue

@ -5,10 +5,9 @@
:width="dialogWidth"
:close-on-click-modal="false"
:vLoading="formLoading"
@updateFullscreen="updateFullscreen"
>
<div
style="max-height: 60vh;overflow-y: auto;">
<div style="overflow-y: auto" :style="{ 'max-height': formHeight }">
<Form
ref="formRef"
:rules="rules"
@ -23,8 +22,12 @@
@onEnter="onEnter"
>
<template #crontab="formSchema1" v-if="fromeWhere == 'countPlan'">
<crontab v-model="formSchema1.crontab" :disabled="formSchema?.find(item=>item.field == 'crontab')?.componentProps?.disabled "/>
<crontab
v-model="formSchema1.crontab"
:disabled="
formSchema?.find((item) => item.field == 'crontab')?.componentProps?.disabled
"
/>
</template>
<template #type="formSchema" v-if="fromeWhere == 'countPlan'">
<el-select
@ -98,7 +101,10 @@
@inputNumberChange="inputNumberChange"
@tableFormSelectOnBlur="tableFormSelectOnBlur"
@formFormDateChange="formFormDateChange"
@clearInput='clearInput'
@clearInput="clearInput"
@batchAdd="batchAdd"
:routeName="routeName"
@visibleChange="visibleChange"
>
<template v-slot="{ row }">
<slot :row="row"></slot>
@ -122,9 +128,20 @@
<slot name="foorter"></slot>
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" />
</template>
</Dialog>
<SearchTable ref="searchTableRef" :showSearchTableQueryFields="showSearchTableQueryFields" @searchTableSuccess="searchTableSuccess" />
<SearchTable
ref="searchTableRef"
:showSearchTableQueryFields="showSearchTableQueryFields"
@searchTableSuccess="searchTableSuccess"
>
<template #selectionsActions="selections">
<slot name="searchTableSelectionsActions" :selections="selections"></slot>
</template>
<template v-for="name in Object.keys($slots)" :key="name" #[name]>
<slot :name="name"></slot>
</template>
</SearchTable>
</template>
<script setup lang="ts">
import { SearchTable } from '@/components/SearchTable'
@ -133,7 +150,8 @@ import ButtonBase from '@/components/XButton/src/ButtonBase.vue'
import TableForm from '@/components/TableForm/src/TableForm.vue'
import TableFormCountPlan from '@/components/TableFormCountPlan/src/TableFormCountPlan.vue'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { debounce } from 'lodash-es'
import { tableFormBlurVer, FormBlur, getListByBottonInput } from '@/api/wms/business/business'
import { isString } from 'min-dash'
const props = defineProps({
//
@ -149,7 +167,7 @@ const props = defineProps({
// --
isShowReduceButtonSelection: {
type: Boolean,
default: false,
default: false
},
// tableForm
isShowReduceButton: {
@ -317,6 +335,12 @@ const props = defineProps({
type: Array,
required: false,
default: []
},
//
isJiaoyan: {
type: Boolean,
required: false,
default: false
}
})
@ -328,6 +352,10 @@ if (props.basicFormWidth) {
} else {
dialogWidth.value = props.isBusiness ? '60%' : '40%'
}
const formHeight = ref('60vh')
const updateFullscreen = (isFullscreen) => {
formHeight.value = isFullscreen ? 'auto' : '60vh'
}
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
@ -338,7 +366,10 @@ const formRef = ref() // 表单 Ref
const formSchema = ref(props.formAllSchemas?.formSchema)
const tableAllSchemas = ref(props.tableAllSchemas)
const tableFormRules = ref(props.tableFormRules)
console.log(111,formSchema)
const route = useRoute() //
const routeName = ref('')
routeName.value = route.name
const isExecute = ref(true) //true
// -
// const buttondata = [
@ -392,17 +423,24 @@ const opensearchTable = (
: ''
//
let isNull = false
if (_searchCondition[searchCondition[i].key] == '' || _searchCondition[searchCondition[i].key] == undefined) {
if (
_searchCondition[searchCondition[i].key] == '' ||
_searchCondition[searchCondition[i].key] == undefined
) {
isNull = true
}
if (isNull) {
message.warning(searchCondition[i].message?searchCondition[i].message:'前置条件未选择!')
message.warning(
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
)
return
}
} else if (searchCondition[i].isTableRowValue) {
if (searchCondition[i].required) {
if (row[searchCondition[i].value] == '' || row[searchCondition[i].value] == undefined) {
message.warning(searchCondition[i].message?searchCondition[i].message:'前置条件未选择!')
message.warning(
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
)
return
}
}
@ -415,8 +453,13 @@ const opensearchTable = (
if (searchCondition[i].isFormModel) {
//formModel
if (searchCondition[i].required) {
if (formRef.value.formModel[searchCondition[i].value] == '' ||formRef.value.formModel[searchCondition[i].value] == undefined) {
message.warning(searchCondition[i].message?searchCondition[i].message:'前置条件未选择!')
if (
formRef.value.formModel[searchCondition[i].value] == '' ||
formRef.value.formModel[searchCondition[i].value] == undefined
) {
message.warning(
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
)
return
}
}
@ -432,7 +475,6 @@ const opensearchTable = (
value: searchCondition[i].value
})
}
} else {
_searchCondition[searchCondition[i].key] = searchCondition[i].value
}
@ -475,30 +517,64 @@ const clearSearchInput = (field)=>{
const sumFormDataByTable = () => {
if (props.sumFormDataField) {
const sumObject = {}
props.sumFormDataField.forEach(sumItem=>{
sumObject[sumItem?.formField]= props.tableData.reduce((prev, item) => prev + item[sumItem?.tableField],0)
props.sumFormDataField.forEach((sumItem) => {
sumObject[sumItem?.formField] = props.tableData.reduce(
(prev, item) => prev + item[sumItem?.tableField],
0
)
})
nextTick(() => {
formRef.value.setValues(sumObject)
})
}
}
watch(()=>props.tableData,() => {
watch(
() => props.tableData,
() => {
sumFormDataByTable()
if (props?.sumFormDataByTableCustom && unref(formRef)?.formModel && props.tableData) {
props?.sumFormDataByTableCustom(formRef, unref(formRef)?.formModel, props.tableData)
}
},{
},
{
deep: true
})
watch(()=>unref(formRef)?.formModel,() => {
}
)
let originFormModel = {}
const updateOriginFormModel = (data) => {
originFormModel = JSON.parse(JSON.stringify(data))
}
const sumFormDataHandle1 = () => {
emit(
'sumFormDataHandle',
formRef,
unref(formRef)?.formModel,
props.tableData,
formType.value,
originFormModel,
updateOriginFormModel
)
}
watch(
() => unref(formRef)?.formModel,
async () => {
if (props?.sumFormDataByForm && unref(formRef)?.formModel) {
props?.sumFormDataByForm(formRef,unref(formRef)?.formModel)
props?.sumFormDataByForm(
formRef,
unref(formRef)?.formModel,
props.tableData,
formType.value,
originFormModel,
updateOriginFormModel,
sumFormDataHandle1
)
}
},{
},
{
deep: true
})
}
)
//
// val row
@ -507,7 +583,13 @@ const searchTableSuccess = (formField, searchField, val, type, row) => {
}
/** 打开弹窗 */
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any, alltitleName?: any) => {
const open = async (
type: string,
row?: any,
masterParmas?: any,
titleName?: any,
alltitleName?: any
) => {
dialogVisible.value = true
if (alltitleName) {
dialogTitle.value = alltitleName
@ -543,16 +625,19 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
const handleAddTable = () => {
if (props.isOpenSearchTable) {
const tableFormKeys = {}
tableAllSchemas.value.tableFormColumns.forEach(item => {
tableAllSchemas.value.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
if (props.fieldTableColumn != '') {
inpuFocus(tableAllSchemas.value.tableFormColumns.find(item=>item.field==props.fieldTableColumn),tableFormKeys,0)
inpuFocus(
tableAllSchemas.value.tableFormColumns.find((item) => item.field == props.fieldTableColumn),
tableFormKeys,
0
)
}
} else {
emit('handleAddTable')
}
}
/** 弹窗按钮 */
@ -670,8 +755,13 @@ const emit = defineEmits([
'formFormDateChange',
'footButtonClick',
'clearSearchInput',
'clearInput'
'clearInput',
'sumFormDataHandle',
'visibleChange'
])
const visibleChange = (field, val, row, index) => {
emit('visibleChange', field, val, row, index)
}
//
const formSelectChange = (field, val, row) => {
emit('formSelectChange', field, val, row)
@ -718,11 +808,8 @@ const handleDeleteTable = (row, index) => {
emit('handleDeleteTable', row, index, formRef.value)
}
//
const inpuFocus = (headerItem, row, index) => {
emit('inpuFocus', headerItem, row, index)
opensearchTable(
@ -756,9 +843,274 @@ const onChange = (field, cur) => {
* @param field 当前操作字段
* @param e
*/
const onBlur = (field, e) => {
const onBlur = async (field, e) => {
isExecute.value = false
let formSchemaObj = formSchema.value.find((item) => item.field == field)?.componentProps
if (formSchemaObj?.enterSearch) {
if (formSchemaObj.searchPage && formSchemaObj.verificationParams) {
//data.ts
let searchCondition =
formSchema.value.find((item) => item.field == field)?.componentProps?.searchCondition || []
//
let verificationParams =
formSchema.value.find((item) => item.field == field)?.componentProps?.verificationParams ||
[]
console.log('走新方法啦')
// searchCondition = [...searchCondition, ...verificationParams]
if (e && isString(e)) {
let setV = {}
setV[field] = ''
let params = {}
const _searchCondition = {}
let filters: any[] = []
if (searchCondition && searchCondition.length > 0) {
//
for (var i = 0; i < searchCondition.length; i++) {
// searchCondition.forEach((item) => {
// row
if (searchCondition[i].isMainValue) {
_searchCondition[searchCondition[i].key] = formRef.value.formModel[
searchCondition[i].value
]
? formRef.value.formModel[searchCondition[i].value]
: props.detailData
? props.detailData[searchCondition[i].value]
: // : row
// ? row[searchCondition[i].value]
''
//
let isNull = false
if (
_searchCondition[searchCondition[i].key] == '' ||
_searchCondition[searchCondition[i].key] == undefined
) {
isNull = true
}
if (isNull) {
message.warning(
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
)
return
}
filters.push({
action: searchCondition[i].action || '==',
column: searchCondition[i].key,
value: formRef.value.formModel[searchCondition[i].value]
})
}
// else if (searchCondition[i].isTableRowValue) {
// if (searchCondition[i].required) {
// if (row[searchCondition[i].value] == '' || row[searchCondition[i].value] == undefined) {
// message.warning(
// searchCondition[i].message ? searchCondition[i].message : ''
// )
// return
// }
// }
// row[searchCondition[i].value]
// //table
// _searchCondition[searchCondition[i].key] = row[searchCondition[i].value]
// }
else {
//
if (searchCondition[i].isSearch) {
if (searchCondition[i].isFormModel) {
//formModel
if (searchCondition[i].required) {
if (
formRef.value.formModel[searchCondition[i].value] == '' ||
formRef.value.formModel[searchCondition[i].value] == undefined
) {
message.warning(
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
)
return
}
}
filters.push({
action: searchCondition[i].action || '==',
column: searchCondition[i].key,
value: formRef.value.formModel[searchCondition[i].value]
})
} else {
filters.push({
action: searchCondition[i].action || '==',
column: searchCondition[i].key,
value: searchCondition[i].value
})
}
} else {
filters.push({
action: searchCondition[i].action || '==',
column: searchCondition[i].key,
value: searchCondition[i].value
})
}
}
}
}
if (verificationParams && verificationParams.length > 0) {
//
for (var i = 0; i < verificationParams.length; i++) {
//
if (verificationParams[i].isSearch) {
if (verificationParams[i].isFormModel) {
filters.push({
action: verificationParams[i].action,
column: verificationParams[i].key,
value: formRef.value.formModel[verificationParams[i].value]
? formRef.value.formModel[verificationParams[i].value]
: e.trim()
})
} else {
filters.push({
action: verificationParams[i].action,
column: verificationParams[i].key,
value: verificationParams[i].value
})
}
} else {
_searchCondition[verificationParams[i].key] = verificationParams[i].value
}
}
}
if (filters.length > 0) {
_searchCondition.isSearch = true
_searchCondition.filters = filters
}
console.log(4545, _searchCondition)
let obj = {
by: 'ASC',
pageNo: 1,
pageSize: 20
}
console.log(888,_searchCondition)
params = {
isSearch:_searchCondition.isSearch,
filters:_searchCondition.filters,
...obj
}
// console.log(333,params)
if (!formSchemaObj?.multiple && e.indexOf(',') > -1) {
message.alert('该输入框只能输入一条数据')
formRef.value.setValues(setV)
return
}
await formSchemaObj.searchPage(params).then((res) => {
let arr1 = e.split(',')
let list = ref([])
list.value = res.list
if (list.value?.length == 0) {
message.alert('暂无数据')
formRef.value.setValues(setV)
return
}
if (arr1.length != list.value.length) {
let arr2 = list.value.map((item) => item.code)
let str = [
...arr1.filter((item) => !arr2.includes(item)),
...arr2.filter((item) => !arr1.includes(item))
].join(',')
message.alert('代码' + str + '没有找到对应数据')
formRef.value.setValues(setV)
return
}
})
}
} else {
if (
field == 'supplierCode' ||
field == 'itemCode' ||
field == 'productItemCode' ||
field == 'componentItemCode' ||
field == 'packUnit' ||
field == 'inPackUnit' ||
field == 'fromPackingNumber'
) {
await FormBlur(
field,
e,
routeName.value,
formRef.value,
props.detailData,
formSchema.value,
(searchField, list) => {
emit('searchTableSuccess', field, searchField, list, formRef.value, 'form')
}
)
return
}
}
} else {
emit('onBlur', field, e)
}
isExecute.value = true
}
//
const batchAdd = async (val) => {
const row = {}
tableAllSchemas.value.tableFormColumns.forEach((item) => {
row[item.field] = item.default ? item.default : ''
})
const headerItem = tableAllSchemas.value.tableColumns.find(
(item) => item.field == props.fieldTableColumn
)
await getListByBottonInput(
headerItem,
val,
row,
routeName.value,
formRef.value,
props.detailData,
props.tableData,
(list) => {
emit(
'searchTableSuccess',
headerItem.field,
'itemCode',
list,
formRef.value,
'tableForm',
row
)
}
)
}
const inputStringBlur = async (headerItem, val, row, index) => {
// isExecute.value = false
await tableFormBlurVer(
headerItem,
val,
row,
index,
routeName.value,
formRef.value,
props.detailData,
props.tableData,
(searchField, list) => {
emit(
'searchTableSuccess',
headerItem.field,
searchField,
list,
formRef.value,
'tableForm',
row,
'blur',
index
)
}
)
// isExecute.value = true
}
/**
* 回车事件
* @param field 当前操作字段
@ -778,20 +1130,25 @@ const selectChangeDetail = (field, val,formSchema) => {
emit('selectChangeDetail', field, val)
}
const tableFormChange = (field, val, row) => {
emit('tableFormChange', field, val, row)
}
const buttonOperationClick = (row, label, index) => {
emit("buttonOperationClick", row, label, index);
}
const inputStringBlur = (headerItem, row, index)=> {
emit("inputStringBlur", headerItem, row, index);
emit('buttonOperationClick', row, label, index)
}
defineExpose({ open, formRef, opensearchTable, dialogVisible, formLoading ,handleAddTable,changeDialogWidth}) // open
defineExpose({
open,
formRef,
opensearchTable,
dialogVisible,
formLoading,
handleAddTable,
changeDialogWidth,
searchTableRef,
tableFormRef
}) // open
</script>
<style lang="scss" scoped>
.table {
@ -820,8 +1177,8 @@ defineExpose({ open, formRef, opensearchTable, dialogVisible, formLoading ,handl
::v-deep(.el-icon) {
display: block;
}button
.button {
}
button .button {
> div {
display: flex;
align-items: center;

10
src/components/BasicForm/src/BasicFormWmsCount.vue

@ -24,7 +24,7 @@
>
<template #crontab="formSchema1" v-if="fromeWhere == 'countPlan'">
<crontab v-model="formSchema1.crontab" :disabled="formSchema?.find(item=>item.field == 'crontab')?.componentProps?.disabled "/>
<crontab v-if="formSchema1.type=='CYCLE'" v-model="formSchema1.crontab" :disabled="formSchema?.find(item=>item.field == 'crontab')?.componentProps?.disabled "/>
</template>
<template #type="formSchema" v-if="fromeWhere == 'countPlan'">
<el-select
@ -662,6 +662,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
try {
nextTick(() => {
formRef.value.setValues(row)
formRef1.value.setValues(row)
})
} finally {
formLoading.value = false
@ -670,6 +671,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
if(row){
nextTick(() => {
formRef.value.setValues(row)
formRef1.value.setValues(row)
})
}
}
@ -745,7 +747,8 @@ const submitForm = async () => {
//
try {
const data = unref(formRef)?.formModel
emit('submitForm', formType.value, data)
const data1 = unref(formRef1)?.formModel
emit('submitForm', formType.value, {...data,...data1})
} finally {
formLoading.value = false
}
@ -753,7 +756,8 @@ const submitForm = async () => {
//
try {
const data = unref(formRef)?.formModel
emit('submitForm', formType.value, data)
const data1 = unref(formRef1)?.formModel
emit('submitForm', formType.value, {...data})
} finally {
formLoading.value = false
}

1
src/components/Descriptions/src/Descriptions.vue

@ -127,6 +127,7 @@ const showAll = () =>{
:label-align="labelAlign"
:label-class-name="labelClassName"
:width="width"
:span="item.span"
>
<template #label>
<slot

37
src/components/Detail/src/Detail.vue

@ -18,8 +18,8 @@
:data="detailData"
labelClassName="label-class-name"
label-align="left"
direction="vertical"
:column="8"
:direction="direction"
:column="column"
:schema="allSchemas.detailSchema"
:columns="2"
width="200px"
@ -108,6 +108,7 @@
<Annex v-show="tabsList[current].label==annexItem.label"
:annexData="annexItem"
:fileType="annexItem.fileType"
:fileSize="annexItem.fileSize"
:showAddBtn="!annexItem.hiddenUpload"
:showPreview="annexItem.showPreview"
:showDownload = "annexItem.showDownload"
@ -134,7 +135,7 @@
</div>
<!-- 附件/备注/变更记录 -->
<ContentWrap class="w-[100%]" v-show="tabsList[current].label==annexAlias.label" :style="{height:remarkHeight+'px'}">
<ContentWrap v-if="!annexAlias.hidden" class="w-[100%]" v-show="tabsList[current].label==annexAlias.label" :style="{height:remarkHeight+'px'}">
<!-- 附件组件 -->
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}">
<Annex
@ -149,7 +150,6 @@
</ElScrollbar>
</ContentWrap>
<ContentWrap class="w-[100%]" v-show="tabsList[current].label=='备注'" :style="{height:remarkHeight+'px'}">
<!-- 附件组件 -->
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}">
<!-- 备注组件 -->
<Remarks
@ -161,7 +161,6 @@
</ElScrollbar>
</ContentWrap>
<ContentWrap class="w-[100%]" v-show="tabsList[current].label=='变更记录'" :style="{height:remarkHeight+'px'}">
<!-- 附件组件 -->
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}">
<!-- 变更记录组件 -->
<ChangeRecord :changeRecordData="changeRecordData" class="mt-20px" :key="count"/>
@ -239,6 +238,7 @@ const props = defineProps({
type: Object,
required: false,
default: ()=>({
hidden:false,
label: '附件',
showDownload:false,
showPreview:false,
@ -408,6 +408,16 @@ const props = defineProps({
required: false,
default: null
},
direction:{
type: String,
required: false,
default: 'vertical'
},
column:{
type: Number,
required: false,
default: 8
}
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
@ -432,7 +442,8 @@ if (props.isBasic == true) {
}
}
const otherList = [...props.annexTable,{
let otherList = [...props.annexTable,{
label:props.annexAlias.label,
prop:'Annex'
},{
@ -442,6 +453,15 @@ const otherList = [...props.annexTable,{
label:'变更记录',
prop:'ChangeRecord'
}]
if(props.annexAlias.hidden){
otherList = [...props.annexTable,{
label:'备注',
prop:'Remarks'
},{
label:'变更记录',
prop:'ChangeRecord'
}]
}
tabsList.value = [...tabsList?.value,...otherList]
if (!tabsList.value || tabsList.value && tabsList.value.length == otherList.length) {
@ -525,6 +545,7 @@ const getAnnexFileList = async (row) => {
hasSubDetail:item.hasSubDetail||false,
subDetailTableData:item.subDetailTableData,
fileType:item.fileType||['apk','doc', 'xls', 'ppt', 'txt', 'pdf','png', 'jpg', 'jpeg'],
fileSize:item.fileSize||5,
showPreview:item.showPreview||false, //
showDownload:item.showDownload||false, //
hiddenDelete:item.hiddenDelete || false, //
@ -614,6 +635,9 @@ const titleNameRef = ref()
const titleValueRef = ref()
const count =ref(0)
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
if(tabRef.value){
tabRef.value.changeCurrent(0)
}
annexTableData.value = []
titleNameRef.value = titleName
titleValueRef.value = titleValue
@ -638,6 +662,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
detailLoading.value = true
try {
detailData.value = row
searchTableFormModel.value = {...searchTableFormModel.value,...row}
getRemarkList()
getFileList()
getAnnexFileList(row)

5
src/components/Dialog/src/Dialog.vue

@ -3,6 +3,10 @@ import { propTypes } from '@/utils/propTypes'
import { isNumber } from '@/utils/is'
defineOptions({ name: 'Dialog' })
//
const emit = defineEmits([
'updateFullscreen'
])
const slots = useSlots()
const props = defineProps({
@ -32,6 +36,7 @@ const isFullscreen = ref(false)
const toggleFull = () => {
isFullscreen.value = !unref(isFullscreen)
emit('updateFullscreen',isFullscreen.value)
}
const dialogHeight = ref(isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight)

6
src/components/DictTag/src/DictTag.vue

@ -45,8 +45,8 @@ export default defineComponent({
//
// dictDataList
if (dictDataList.length == 0) {
return (
<ElTag
if(dictData.value?.label !== '' && dictData.value?.label !== undefined){
return (<ElTag
style={dictData.value?.cssClass ? 'color: #fff' : ''}
type={dictData.value?.colorType}
color={
@ -59,6 +59,8 @@ export default defineComponent({
{t(`ts.${dictData.value?.label}`).replace('ts.', '')}
</ElTag>
)
}
} else {
return (
dictDataList.map(item => {

14
src/components/Form/src/Form.vue

@ -126,7 +126,7 @@ export default defineComponent({
}
const clearSearchInput = (field) => {
emit('clearSearchInput')
emit('clearSearchInput',field)
}
expose({
setValues,
@ -269,7 +269,11 @@ export default defineComponent({
//
emit('onEnter',item.field,formModel.value[item.field],event)
}
}} v-slots={{
}}
onBlur={(e)=>{onBlur(item.field, e)}}
onChange={(e)=>{onChange(item.field, e)}}
v-slots={{
suffix: () => (
<ElButton type="text" icon={CircleClose} style="color:var(--el-button-text-color)" onClick={()=>{
if(Array.isArray(formModel.value[item.field])){
@ -318,7 +322,11 @@ export default defineComponent({
//
emit('onEnter',item.field,formModel.value[item.field],event)
}
}} disabled={item?.componentProps?.enterSearch?false:true} v-slots={{
}}
onBlur={(e)=>{onBlur(item.field,formModel.value[item.field])}}
onChange={(e)=>{onChange(item.field,formModel.value[item.field])}}
disabled={item?.componentProps?.enterSearch?false:true} v-slots={{
suffix: () => (
<ElButton type="text" icon={CircleClose} style="color:var(--el-button-text-color)" onClick={()=>{
if(Array.isArray(formModel.value[item.field])){

7
src/components/RouterSearch/index.vue

@ -17,8 +17,8 @@
/>
</el-select> -->
</ElDialog>
<div v-else class="custom-hover" @click.stop="showTopSearch = !showTopSearch">
<Icon icon="ep:search" />
<div v-else class="custom-hover custom-hover2" @click.stop="showTopSearch = !showTopSearch">
<Icon icon="ep:search" color="#ffffff"/>
<el-select
filterable
:reserve-keyword="false"
@ -170,4 +170,7 @@ defineExpose({
.w-220px {
width: 220px !important;
}
.custom-hover2:hover{
background-color: transparent;
}
</style>

146
src/components/Search/src/Search.vue

@ -9,6 +9,7 @@ import { FormSchema } from '@/types/form'
import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()
const message = useMessage() //
defineOptions({ name: 'Search' })
@ -40,10 +41,26 @@ const props = defineProps({
model: {
type: Object as PropType<Recordable>,
default: () => ({})
},
//
detailData: {
type: Object,
required: true,
default: null
},
hiddenFilterBtnFields:{
type: Array,
required: false,
default: []
},
showSearchTableQueryFields:{
type: Array,
required: false,
default: []
}
})
const emit = defineEmits(['search', 'reset','onInput'])
const emit = defineEmits(['search', 'reset','onInput','onChange','searchTableSuccess'])
const visible = ref(true)
@ -91,7 +108,125 @@ const { register, elFormRef, methods } = useForm({
const onInput = (field,value) => {
emit('onInput', field,value)
}
const onChange = (field, value)=>{
emit('onChange', field,value)
}
const searchTableRef = ref()
const opensearchTable = (
formField,
searchField,
searchTitle,
searchAllSchemas,
searchPage,
searchCondition,
multiple,
type,
row,
isConcatDetailSchemas=false,
searchDetailSchemas: any
) => {
const _searchCondition = {}
//
if (searchCondition && searchCondition.length > 0) {
//
let filters: any[] = []
for (var i=0; i< searchCondition.length; i++ ) {
// searchCondition.forEach((item) => {
// row
if (searchCondition[i].isMainValue) {
let keyValue = formRef.value.formModel[searchCondition[i].value]
? formRef.value.formModel[searchCondition[i].value]
: props.detailData
? props.detailData[searchCondition[i].value]
: row
? row[searchCondition[i].value]
: ''
if(searchCondition[i].isCSV&&keyValue){
//
if(Array.isArray(keyValue)){
keyValue = keyValue.join(',')
}else{
keyValue = keyValue.split(' ')
keyValue.forEach(item=>{item = item.trim()})
keyValue = keyValue.join(',')
}
console.log('keyValue',keyValue)
}
_searchCondition[searchCondition[i].key] = keyValue
if(searchCondition[i].required){
//
let isNull = false
if (_searchCondition[searchCondition[i].key] == '' || _searchCondition[searchCondition[i].key] == undefined) {
isNull = true
}
if (isNull) {
message.warning(searchCondition[i].message?searchCondition[i].message:'前置条件未选择!')
return
}
}
}else if(searchCondition[i].isTableRowValue){
if(searchCondition[i].required){
if (row[searchCondition[i].value] == '' ||row[searchCondition[i].value] == undefined) {
message.warning(searchCondition[i].message?searchCondition[i].message:'前置条件未选择!')
return
}
}
row[searchCondition[i].value]
//table
_searchCondition[searchCondition[i].key] = row[searchCondition[i].value]
} else {
//
if (searchCondition[i].isSearch) {
if (searchCondition[i].isFormModel) {
//formModel
if(searchCondition[i].required){
if (formRef.value.formModel[searchCondition[i].value] == '' ||formRef.value.formModel[searchCondition[i].value] == undefined) {
message.warning(searchCondition[i].message?searchCondition[i].message:'前置条件未选择!')
return
}
}
filters.push({
action: searchCondition[i].action,
column: searchCondition[i].key,
value: formRef.value.formModel[searchCondition[i].value]
})
}else{
filters.push({
action: searchCondition[i].action,
column: searchCondition[i].key,
value: searchCondition[i].value
})
}
} else {
_searchCondition[searchCondition[i].key] = searchCondition[i].value
}
}
}
if (filters.length > 0) {
_searchCondition.isSearch = true
_searchCondition.filters = filters
}
}
const _searchTableTitle = searchTitle
const _searchTableAllSchemas = searchAllSchemas
const _searchTablePage = searchPage
searchTableRef.value.open(
_searchTableTitle,
_searchTableAllSchemas,
_searchTablePage,
formField,
searchField,
multiple,
type,
row,
_searchCondition,
undefined,
isConcatDetailSchemas,
searchDetailSchemas
)
}
const formRef = ref()
const setFormValues = (formData)=>{
formRef.value.setValues(formData)
@ -124,6 +259,11 @@ const setVisible = () => {
unref(elFormRef)?.resetFields()
visible.value = !unref(visible)
}
//
// val row
const searchTableSuccess = (formField, searchField, val, type, row) => {
emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row)
}
const Search = ref()
onMounted(() => {})
defineExpose({setFormValues}) // open
@ -143,6 +283,8 @@ defineExpose({setFormValues}) // 提供 open 方法,用于打开弹窗
hide-required-asterisk
@register="register"
@onInput="onInput"
@opensearchTable="opensearchTable"
@onChange="onChange"
>
<template #action>
<div v-if="layout === 'inline'">
@ -188,6 +330,8 @@ defineExpose({setFormValues}) // 提供 open 方法,用于打开弹窗
<slot name="actionMore"></slot>
</div>
</template>
<SearchTable ref="searchTableRef" :hiddenFilterBtnFields="hiddenFilterBtnFields" :showSearchTableQueryFields="showSearchTableQueryFields" @searchTableSuccess="searchTableSuccess" />
</template>
<style lang="scss" scoped>
.search ::v-deep(.el-form-item) {

93
src/components/SearchTable/src/SearchTable.vue

@ -1,6 +1,7 @@
<template>
<Dialog :title="dialogTitle" v-model="searchDialogVisible" :width="dialogWidth">
<!-- 搜索工作栏 -->
<slot :name="'searchQuery'+formFieldRef"></slot>
<ContentWrap v-if="searchQuery">
<Search :schema="searchSchema" @search="setSearchParamsRef" @reset="setSearchParamsRef" />
</ContentWrap>
@ -14,7 +15,8 @@
:allSchemas="allSchemasRef"
/>
<ContentWrap>
<Table v-clientSearchTable
<Table
v-clientSearchTable
ref="searchTableRef"
:columns="tableColumns"
:data="tableObjectRef.tableList"
@ -30,10 +32,12 @@
:selectionTotal="multipleBol"
:reserveSelection="true"
row-key="id"
@rowClick="rowClick"
/>
</ContentWrap>
<template #footer>
<div class="flex items-center">
<slot name="selectionsActions" :selections="searchTableRef?searchTableRef.selections:[]"></slot>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="searchDialogVisible = false"> </el-button>
@ -49,7 +53,12 @@ const props = defineProps({
type: Array,
required: false,
default: []
}
},
hiddenFilterBtnFields:{
type: Array,
required: false,
default: []
},
})
const { t } = useI18n() //
const message = useMessage() //
@ -63,17 +72,19 @@ const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 12
const multipleBol = ref(false)
//
const HeadButttondata = ref(multipleBol.value?
[
const HeadButttondata = ref(
multipleBol.value
? [
defaultButtons.defaultWhenPageBtn(null), //
defaultButtons.defaultUnselectPageBtn(null), //
// defaultButtons.defaultDeselectAllBtn(null), //
defaultButtons.defaultFilterBtn(null), //
]:[
defaultButtons.defaultFilterBtn(null) //
])
]
: [
defaultButtons.defaultFilterBtn(null) //
]
)
/** 打开弹窗 */
const getListRef = ref()
@ -90,16 +101,19 @@ const allSchemasRef = ref()
const searchConditionRef = ref()
const searchTableSelectionsList = ref() //
const searchQuery = ref(false)
const hiddenFilterBtn = ref(false)
const openData = (titleName: any, tableObject:any ,allSchemas: any,multiple: any) => {
dialogWidth.value = '80%'
multipleBol.value = multiple
HeadButttondata.value = multiple?[
HeadButttondata.value = multiple
? [
defaultButtons.defaultWhenPageBtn(null), //
defaultButtons.defaultUnselectPageBtn(null), //
// defaultButtons.defaultDeselectAllBtn(null), //
defaultButtons.defaultFilterBtn(null), //
]:[
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultFilterBtn(null) //
]
: [
defaultButtons.defaultFilterBtn(null) //
]
dialogTitle.value = t(`ts.${titleName}`).replace('ts.', '')
tableObjectRef.value = tableObject
@ -110,16 +124,21 @@ const openData = (titleName: any, tableObject:any ,allSchemas: any,multiple: any
}
const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, searchField: any,multiple: any, type: any, row: any, searchCondition:any , isCountRequestRe:any,isConcatDetailSchemas=false,detailSchemas: any, searchTableSelections:any) => {
searchQuery.value = props.showSearchTableQueryFields.find(item=>item==formField)?true:false
hiddenFilterBtn.value = props.hiddenFilterBtnFields.find(item=>item==formField)?true:false
dialogWidth.value = '80%'
multipleBol.value = multiple
const filterBtns = hiddenFilterBtn.value?[]:[defaultButtons.defaultFilterBtn(null)]
HeadButttondata.value = multiple?[
defaultButtons.defaultWhenPageBtn(null), //
defaultButtons.defaultUnselectPageBtn(null), //
// defaultButtons.defaultDeselectAllBtn(null), //
defaultButtons.defaultFilterBtn(null), //
...filterBtns, //
]:
[
defaultButtons.defaultFilterBtn(null), //
...filterBtns, //
]
searchDialogVisible.value = true
formFieldRef.value = formField
@ -129,9 +148,11 @@ const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, s
if (isConcatDetailSchemas) {
//
console.log('detailSchemas', detailSchemas)
tableColumns.value = [...allSchemas?.tableColumns,...detailSchemas?.tableMainColumns].filter(item => (item.field !== 'action'))
tableColumns.value = [...allSchemas?.tableColumns, ...detailSchemas?.tableMainColumns].filter(
(item) => item.field !== 'action'
)
} else {
tableColumns.value = allSchemas?.tableColumns.filter(item => (item.field !== 'action'))
tableColumns.value = allSchemas?.tableColumns.filter((item) => item.field !== 'action')
}
getPage.value = getApiPage
typeRef.value = type
@ -145,7 +166,7 @@ const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, s
})
tableObjectRef.value = tableObject
searchConditionRef.value = searchCondition
if (searchCondition) tableObjectRef.value.params = searchCondition;
if (searchCondition) tableObjectRef.value.params = searchCondition
//
const { getList, setSearchParams } = tableMethods
@ -170,30 +191,30 @@ const searchFormClick = (searchData) => {
// 20240321 searchData
if (searchData.filters) {
if (searchConditionRef.value.filters) {
Object.keys(searchConditionRef.value.filters).forEach(key => {
Object.keys(searchConditionRef.value.filters).forEach((key) => {
searchData.filters.push(searchConditionRef.value.filters[key])
});
})
} else {
Object.keys(searchConditionRef.value).forEach(key => {
Object.keys(searchConditionRef.value).forEach((key) => {
searchData.filters.push({
action: "==",
action: '==',
column: key,
value: searchConditionRef.value[key]
})
});
})
}
} else {
if (searchConditionRef.value.filters) {
searchData.filters = searchConditionRef.value.filters
} else {
searchData.filters = []
Object.keys(searchConditionRef.value).forEach(key => {
Object.keys(searchConditionRef.value).forEach((key) => {
searchData.filters.push({
action: "==",
action: '==',
column: key,
value: searchConditionRef.value[key]
})
});
})
}
}
tableObjectRef.value.params = {
@ -217,7 +238,7 @@ const buttonBaseClick = (val, item) => {
}
defineExpose({ open,openData,hiddenFilterButton ,changeDialogWidth}) // open
defineExpose({ open,openData,hiddenFilterButton ,changeDialogWidth,searchFormClick}) // open
// Table ref
const searchTableRef = ref()
@ -247,11 +268,29 @@ const submitForm = async () => {
try {
searchDialogVisible.value = false
//
emit('searchTableSuccess', formFieldRef.value, searchFieldRef.value, selections, typeRef.value, rowRef.value)
emit(
'searchTableSuccess',
formFieldRef.value,
searchFieldRef.value,
selections,
typeRef.value,
rowRef.value
)
} finally {
formLoading.value = false
}
}
const rowClick = (row: any, column: any, event: Event) => {
const selected = searchTableRef.value?.elTableRef
?.getSelectionRows()
.some((item) => item.id === row.id)
if (!selected) {
searchTableRef.value?.elTableRef?.toggleRowSelection(row, true)
} else {
//
searchTableRef.value?.elTableRef?.toggleRowSelection(row, false)
}
}
</script>
<style scoped lang="scss">
</style>

24
src/components/Table/src/Table.vue

@ -62,8 +62,9 @@ export default defineComponent({
},
searchTableSelectionsList:[],//
selectionColor: propTypes.bool.def(false),
rowKey: propTypes.string.def(''),
},
emits: ['update:pageSize', 'update:currentPage', 'register', 'update:sort','getSelectionRows'],
emits: ['update:pageSize', 'update:currentPage', 'register', 'update:sort','getSelectionRows','rowClick'],
setup(props, { attrs, slots, emit, expose }) {
const elTableRef = ref<ComponentRef<typeof ElTable>>()
@ -120,12 +121,24 @@ export default defineComponent({
const sortRef = ref()
//
const selectRow = ()=>{
console.log(currentPageRef.value,elTableRef.value?.getSelectionRows())
emit('getSelectionRows', currentPageRef.value,elTableRef.value?.getSelectionRows())
}
//
const selectAll = ()=>{
emit('getSelectionRows', currentPageRef.value,elTableRef.value?.getSelectionRows())
}
const rowClick = (row: any, column: any, event: Event)=>{
// const selected = elTableRef.value?.getSelectionRows().some(item => item.id === row.id)
// if (!selected) {
// elTableRef.value?.toggleRowSelection(row, true);
// } else {
// //
// elTableRef.value?.toggleRowSelection(row, false);
// }
// console.log(elTableRef.value?.getSelectionRows())
emit('rowClick',row,column,event)
}
//
const togglePageSelection = ()=>{
unref(getProps).data.forEach(row=>{
@ -165,7 +178,8 @@ export default defineComponent({
selectAll,
toggleAllSelection,
togglePageSelection,
clearSelection
clearSelection,
elTableRef
})
const pagination = computed(() => {
@ -388,6 +402,8 @@ export default defineComponent({
onSelect-all={selectAll}
onSelection-change={selectionChange}
onSort-change={sortChange}
row-key={unref(getProps).rowKey}
onRow-click={rowClick}
{...unref(getBindValue)}
>
{{
@ -397,7 +413,7 @@ export default defineComponent({
}}
</ElTable>
{unref(getProps).selectionTotal ? (
<div class="mt-5px">已选{selections.value.length}条数据</div>
<div class="mt-15px float-left" style='height:32px;line-height:32px'>已选{selections.value.length}条数据</div>
):undefined}
{unref(getProps).pagination ? (
// update by Pagination
@ -427,7 +443,6 @@ export default defineComponent({
.el-table .selectionRow {
--el-table-tr-bg-color: var(--el-color-primary-light-9);
}
</style>
<style lang="scss" scoped>
:deep(.el-button.is-text) {
@ -439,5 +454,4 @@ export default defineComponent({
padding: 8px 4px;
margin-left: 0;
}
</style>

389
src/components/TableForm/src/TableForm.vue

@ -1,7 +1,8 @@
<!-- 附件组件 -->
<template>
<div class="table-form">
<el-table class="multipleTableComponents"
<el-table
class="multipleTableComponents"
ref="TableBaseComponents_Ref"
v-loading="tableLoading"
:data="showTableData()"
@ -13,7 +14,13 @@
@row-click="handleTableSelect"
>
<!-- 删除按钮多选 -->
<el-table-column fixed="left" type="selection" width="50" v-if="isShowReduceButtonSelection" :reserve-selection="true" />
<el-table-column
fixed="left"
type="selection"
width="50"
v-if="isShowReduceButtonSelection"
:reserve-selection="true"
/>
<!-- 删除按钮 -->
<el-table-column
fixed="left"
@ -21,7 +28,13 @@
v-else-if="isShowReduceButton"
v-slot="{ row, $index }"
>
<Icon icon="ep:remove" color="#757575" :size="26" style="cursor: pointer;margin-top: -16px;" @click="handleDeleteTable (row, $index)" />
<Icon
icon="ep:remove"
color="#757575"
:size="26"
style="cursor: pointer; margin-top: -16px"
@click.stop="handleDeleteTable(row, $index)"
/>
</el-table-column>
<!-- 多选 -->
<el-table-column
@ -30,7 +43,6 @@
:reserve-selection="true"
type="selection"
:width="50"
/>
<!-- 序号 -->
<el-table-column
@ -43,73 +55,102 @@
/>
<el-table-column
v-slot="{ row, $index }"
v-for="(headerItem) in tableFields.filter(item=>(!item.hidden))"
v-for="headerItem in tableFields.filter((item) => !item.hidden)"
:key="headerItem"
:fixed="headerItem.tableForm?.fixed"
:label="t(`ts.${headerItem.label}`).replace('ts.','')" :prop="headerItem.field"
:label="t(`ts.${headerItem.label}`).replace('ts.', '')"
:prop="headerItem.field"
:align="headerItem?.tableForm?.align || 'center'"
:sortable="headerItem?.tableForm?.sortable || false"
:width="headerItem?.tableForm?.width || '200px'"
:min-width="headerItem?.tableForm?.minWidth || 'auto'">
:width="headerItem?.tableForm?.width"
:min-width="headerItem?.tableForm?.minWidth || '200px'"
>
<el-form
ref="TableBaseForm_Ref"
:model="row"
style="width: 100%;"
style="width: 100%"
:rules="tableFormRules"
:class="tableFormRules ? '' : 'noRulesForm'">
:class="tableFormRules ? '' : 'noRulesForm'"
@click.stop=""
>
<!-- 字符串输入框 -->
<el-form-item
v-if="!headerItem?.tableForm?.type || headerItem?.tableForm?.type == 'InputString'"
:prop="headerItem.field" style="display: flex;align-items: center;">
<el-input :key="headerItem.field+$index"
:prop="headerItem.field"
style="display: flex; align-items: center"
>
<el-input
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
clearable
:type="headerItem?.tableForm?.inputType"
:placeholder="t(`ts.${headerItem?.tableForm?.placeholder || '请输入' + headerItem.label}`).replace('ts.','')"
:disabled="headerItem?.tableForm?.disabled ? true: headerItem?.tableForm?.isInpuFocusShow ? true : false"
:placeholder="
t(
`ts.${headerItem?.tableForm?.placeholder || '请输入' + headerItem.label}`
).replace('ts.', '')
"
:disabled="disabledInput(headerItem, row)"
style="flex: 1"
@blur="inputStringBlur(headerItem.field, row[headerItem.field], row)"
@blur="inputStringBlur(headerItem, row[headerItem.field], row, index)"
@clear='clearInput(headerItem.field, row, index)'
/>
<Icon icon="ep:circle-close" v-if="headerItem?.tableForm?.isInpuFocusShow && headerItem?.tableForm?.disabled&& headerItem?.tableForm?.clearable" style='position:absolute;right:50px;cursor: pointer;' @click="clearInput(headerItem.field,row,index)"/>
<el-button :key="headerItem.field+$index+'button'" v-if="headerItem?.tableForm?.isInpuFocusShow" @click="inpuFocus(headerItem,row,index)"><Icon icon="ep:search" size="14"/></el-button>
<Icon
icon="ep:circle-close"
v-if="
headerItem?.tableForm?.isInpuFocusShow &&
headerItem?.tableForm?.disabled &&
headerItem?.tableForm?.clearable
"
style="position: absolute; right: 50px; cursor: pointer"
@click="clearInput(headerItem.field, row, index)"
/>
<el-button
:key="headerItem.field + $index + 'button'"
v-if="headerItem?.tableForm?.isInpuFocusShow"
@click="inpuFocus(headerItem, row, index)"
><Icon icon="ep:search" size="14"
/></el-button>
</el-form-item>
<el-form-item v-if="headerItem?.tableForm?.type == 'slot'">
<slot :row="row"></slot>
</el-form-item>
<!-- 金额输入框 -->
<el-form-item
v-if="headerItem?.tableForm?.type == 'number'"
:prop="headerItem.field">
<el-input :key="headerItem.field+$index"
<el-form-item v-if="headerItem?.tableForm?.type == 'number'" :prop="headerItem.field" >
<el-input
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
clearable
type="number"
:placeholder="headerItem?.tableForm?.placeholder || '请输入' + headerItem.label"
:disabled="itemIsDisabled(headerItem, row)"
style="width: 100%;"
style="width: 100%"
@input="row[headerItem.field] = row[headerItem.field].replace(/[^\d\.-]/g, '')"
/>
</el-form-item>
<!-- 数字输入框 -->
<el-form-item
v-if="headerItem?.tableForm?.type == 'InputNumber'"
:prop="headerItem.field">
:prop="headerItem.field"
>
<el-input-number
style="width: 100%;"
style="width: 100%"
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
:max="headerItem?.tableForm?.max"
:min="headerItem?.tableForm?.min"
:precision="headerItem?.tableForm?.precision"
:disabled="itemIsDisabled(headerItem, row)"
@change="(e)=>{inputNumberChange(headerItem.field, $index, row, e)}"
@change="
(e) => {
inputNumberChange(headerItem.field, $index, row, e)
}
"
/>
</el-form-item>
<!-- 下拉框 -->
<el-form-item
v-if="headerItem?.tableForm?.type == 'Select'"
:prop="headerItem.field">
<el-select :key="headerItem.field+$index"
<el-form-item v-if="headerItem?.tableForm?.type == 'Select'" :prop="headerItem.field">
<el-select
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
:clearable="headerItem?.tableForm.clearable || true"
:multiple="headerItem?.tableForm.multiple"
@ -123,19 +164,24 @@
style="width: 100%"
:placeholder="headerItem?.tableForm?.placeholder || '请选择' + headerItem.label"
@change="formSelectChange(headerItem.field, $event, row)"
@blur="tableFormSelectOnBlur(headerItem.field, $event,row, $index)">
@blur="tableFormSelectOnBlur(headerItem.field, $event, row, $index)"
@visible-change="visibleChange(headerItem.field, $event, row, $index)"
>
<el-option
v-for="op in initSelectOptions(headerItem)"
:label="t(`ts.${op.label}`).replace('ts.','')"
:value="op.value"
:key="op.value" />
v-for="op in initSelectOptions(headerItem,row)"
:label="t(`ts.${initLabel(headerItem,op)}`).replace('ts.', '')"
:value="initValue(headerItem,op)"
:key="initValue(headerItem,op)"
/>
</el-select>
</el-form-item>
<!-- 下拉框 -->
<el-form-item
v-if="headerItem?.tableForm?.type == 'SelectGroup'"
:prop="headerItem.field">
<el-select :key="headerItem.field+$index"
:prop="headerItem.field"
>
<el-select
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
:clearable="headerItem?.tableForm.clearable || true"
:multiple="headerItem?.tableForm.multiple"
@ -149,9 +195,10 @@
style="width: 100%"
:placeholder="headerItem?.tableForm?.placeholder || '请选择' + headerItem.label"
@change="formSelectChange(headerItem.field, $event, row)"
@blur="tableFormSelectOnBlur(headerItem.field, $event,row, $index)">
@blur="tableFormSelectOnBlur(headerItem.field, $event, row, $index)"
>
<el-option-group
v-for="group in initSelectOptions(headerItem)"
v-for="group in initSelectOptions(headerItem,row)"
:key="group.type"
:label="t(`ts.${group.name}`).replace('ts.', '')"
>
@ -165,21 +212,20 @@
</el-select>
</el-form-item>
<!-- 时间选择器 -->
<el-form-item
v-if="headerItem?.tableForm?.type == 'FormTime'"
:prop="headerItem.field">
<el-time-picker :key="headerItem.field+$index"
<el-form-item v-if="headerItem?.tableForm?.type == 'FormTime'" :prop="headerItem.field">
<el-time-picker
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
:clearable="true"
:placeholder="headerItem?.tableForm?.placeholder || '选择时间'"
style="width: 100%" :disabled="itemIsDisabled(headerItem, row)"
style="width: 100%"
:disabled="itemIsDisabled(headerItem, row)"
:format="headerItem?.tableForm?.format || 'HH:mm:ss'"
:value-format="headerItem?.tableForm?.valueFormat || 'HH:mm:ss'" />
:value-format="headerItem?.tableForm?.valueFormat || 'HH:mm:ss'"
/>
</el-form-item>
<!-- 日期选择器 -->
<el-form-item
v-if="headerItem?.tableForm?.type == 'FormDate'"
:prop="headerItem.field">
<el-form-item v-if="headerItem?.tableForm?.type == 'FormDate'" :prop="headerItem.field">
<el-date-picker
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
@ -189,12 +235,14 @@
:placeholder="headerItem?.tableForm?.placeholder || '选择日期'"
:format="headerItem?.tableForm?.format || 'YYYY-MM-DD'"
:value-format="headerItem?.tableForm?.valueFormat || 'YYYY-MM-DD'"
@change="formFormDateChange(headerItem.field, $event,row, $index)" />
@change="formFormDateChange(headerItem.field, $event, row, $index)"
/>
</el-form-item>
<!-- 日期时间选择器 -->
<el-form-item
v-if="headerItem?.tableForm?.type == 'FormDateTime'"
:prop="headerItem.field">
:prop="headerItem.field"
>
<el-date-picker
:key="headerItem.field + $index"
type="datetime"
@ -204,13 +252,16 @@
style="width: 100%"
:format="headerItem?.tableForm?.format || 'YYYY-MM-DD HH:mm:ss'"
:value-format="headerItem?.tableForm?.valueFormat || 'YYYY-MM-DDTHH:mm:ss'"
:disabled="itemIsDisabled(headerItem, row)" />
:disabled="itemIsDisabled(headerItem, row)"
/>
</el-form-item>
<!--开始时间结束时间选择器 (原类型datetimerange已弃用 使用type+timeType结合方式)-->
<el-form-item
v-if="headerItem?.tableForm?.type == 'FormTimerange'"
:prop="headerItem.field">
<el-date-picker :key="headerItem.field+$index"
:prop="headerItem.field"
>
<el-date-picker
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
:clearable="true"
:disabled="itemIsDisabled(headerItem, row)"
@ -219,13 +270,13 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
:format="headerItem?.tableForm?.format || 'YYYY-MM-DD HH:mm:ss'"
:value-format="headerItem?.tableForm?.valueFormat || 'YYYY-MM-DDTHH:mm:ss'" />
:value-format="headerItem?.tableForm?.valueFormat || 'YYYY-MM-DDTHH:mm:ss'"
/>
</el-form-item>
<!-- Switch 开关 -->
<el-form-item
v-if="headerItem?.tableForm?.type == 'Switch'"
:prop="headerItem.field">
<el-switch :key="headerItem.field+$index"
<el-form-item v-if="headerItem?.tableForm?.type == 'Switch'" :prop="headerItem.field">
<el-switch
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
:disabled="itemIsDisabled(headerItem, row)"
:loading="headerItem?.tableForm?.loading"
@ -237,45 +288,47 @@
:active-value="headerItem?.tableForm?.activeValue"
:inactive-value="headerItem?.tableForm?.inactiveValue"
:active-color="headerItem?.tableForm?.inactiveColor"
:inactive-color="headerItem?.tableForm?.inactiveColor" />
:inactive-color="headerItem?.tableForm?.inactiveColor"
/>
</el-form-item>
<!-- Radio 单选-->
<el-form-item
v-if="headerItem?.tableForm?.type == 'Radio'"
:prop="headerItem.field">
<el-radio-group :key="headerItem.field+$index"
<el-form-item v-if="headerItem?.tableForm?.type == 'Radio'" :prop="headerItem.field">
<el-radio-group
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
:size="headerItem?.tableForm?.size"
:disabled="itemIsDisabled(headerItem, row)"
:text-color="headerItem?.tableForm?.textColor"
:fill="headerItem?.tableForm?.fill"
:name="headerItem?.tableForm?.name"
:id="headerItem?.tableForm?.id">
:id="headerItem?.tableForm?.id"
>
<el-radio
v-for="(item, index) in initSelectOptions(headerItem)"
v-for="(item, index) in initSelectOptions(headerItem,row)"
:key="index"
:label="t(`ts.${item.value}`).replace('ts.', '')"
:size="headerItem?.tableForm?.size"
:disabled="itemIsDisabled(headerItem, row)"
:border="headerItem?.tableForm?.border">
:border="headerItem?.tableForm?.border"
>
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<!-- Checkbox 多选-->
<el-form-item
v-if="headerItem?.tableForm?.type == 'Checkbox'"
:prop="headerItem.field">
<el-checkbox-group :key="headerItem.field+$index"
<el-form-item v-if="headerItem?.tableForm?.type == 'Checkbox'" :prop="headerItem.field">
<el-checkbox-group
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
:disabled="itemIsDisabled(headerItem, row)"
:size="headerItem?.tableForm?.size"
:min="headerItem?.tableForm?.min"
:max="headerItem?.tableForm?.max"
:text-color="headerItem?.tableForm?.textColor"
:fill="headerItem?.tableForm?.fill">
:fill="headerItem?.tableForm?.fill"
>
<el-checkbox
v-for="(item, index) in initSelectOptions(headerItem)"
v-for="(item, index) in initSelectOptions(headerItem,row)"
:key="index"
:label="t(`ts.${item.value}`).replace('ts.', '')"
:disabled="itemIsDisabled(headerItem, row)"
@ -284,7 +337,8 @@
:border="headerItem?.tableForm?.border"
:size="headerItem?.tableForm?.size"
:name="headerItem?.tableForm?.name"
:checked="headerItem?.tableForm?.checked">
:checked="headerItem?.tableForm?.checked"
>
{{ item.label }}
</el-checkbox>
</el-checkbox-group>
@ -296,9 +350,16 @@
v-for="(itemButton, indexButton) in headerItem?.tableForm?.buttonText.split('|')"
:key="indexButton"
type="text"
style="padding-top: 0px;align-items:unsafe;"
@click="buttonOperationClick(row, headerItem?.tableForm?.buttonName.split('|')[indexButton], $index)"
>{{itemButton}}</el-button>
style="padding-top: 0px; align-items: unsafe"
@click.stop="
buttonOperationClick(
row,
headerItem?.tableForm?.buttonName.split('|')[indexButton],
$index
)
"
>{{ itemButton }}</el-button
>
</div>
<!-- </el-form-item> -->
</el-form>
@ -312,11 +373,16 @@
v-if="isShowReduceButtonSelection"
v-slot="{ row, $index }"
>
<ButtonBase :Butttondata="[defaultButtons.mainListDeleteBtn(),]" @button-base-click="handleDeleteTable (row, $index)" />
<ButtonBase
:Butttondata="[defaultButtons.mainListDeleteBtn()]"
@button-base-click="handleDeleteTable(row, $index)"
/>
</el-table-column>
</el-table>
<!-- :page-sizes="[ 10,20, 30, 50, 100]" sizes-->
<el-pagination v-show="tableData.length>5" style="margin-top:10px"
<el-pagination
v-show="tableData.length > 10"
style="margin-top: 10px"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:small="true"
@ -325,14 +391,33 @@
:total="tableData.length"
/>
<div class="button flex" v-if="isShowButton || isShowReduceButtonSelection">
<div class="p-12px" v-if="isShowButton" @click="handleAddTable">
<Icon icon="ep:circle-plus" color="#409eff" size="26" style="cursor: pointer;" />
<div class="p-12px" v-if="isShowButton" @click.stop="handleAddTable">
<Icon icon="ep:circle-plus" color="#409eff" size="26" style="cursor: pointer" />
<div>{{ t('ts.添加明细') }}</div>
</div>
<div class="p-12px" v-if="isShowReduceButtonSelection" @click="handleSelectionDelete">
<Icon icon="ep:delete" color="#409eff" size="26" style="cursor: pointer;" />
<div class="p-12px" v-if="isShowReduceButtonSelection" @click.stop="handleSelectionDelete">
<Icon icon="ep:delete" color="#409eff" size="26" style="cursor: pointer" />
<div>{{ t('ts.批量删除') }}</div>
</div>
<div
class="p-12px"
v-if="
routeName == 'PurchaseMain' ||
routeName == 'ProductionMain' ||
routeName == 'ZZBJDeliverPlanMain' ||
routeName == 'DeliverPlanMain' ||
routeName == 'DeliverRequestMain' ||
routeName == 'ZZBJDeliverRequestMain' ||
routeName == 'UnplannedreceiptRequestMain'||
routeName == 'RepleinshRequestMain'
"
>
<el-input v-model="keyWord" style="width: 240px" placeholder="回车自动添加" />
<el-button type="primary" style="margin-left: 10px" @click.stop="batchAdd">{{
t('批量添加')
}}</el-button>
</div>
</div>
</div>
</template>
@ -345,46 +430,46 @@ const props = defineProps({
//
isShowButton: {
type: Boolean,
default: true,
default: true
},
// :custom="headerItem.sortable?headerItem.sortable:false"
selectionTable: {
type: Boolean,
default: false,
default: false
},
//
isShowIndex: {
type: Boolean,
default: false,
default: false
},
// --
isShowReduceButtonSelection: {
type: Boolean,
default: false,
default: false
},
//
isShowReduceButton: {
type: Boolean,
default: true,
default: true
},
//
tableLoading: {
type: Boolean,
default: false,
default: false
},
//
tableData: {
type: Array,
default: () => {
return []
},
}
},
//
tableFields: {
type: Array,
default: () => {
return []
},
}
},
// table
height: {
@ -402,12 +487,18 @@ const props = defineProps({
//
border: {
type: Boolean,
default: false,
default: false
},
// tablerules
tableFormRules: {
type: Object,
default: null
},
//
routeName: {
type: String,
required: false,
default: ''
}
})
//
@ -416,6 +507,7 @@ const emit = defineEmits([
'tableSelectionDelete',
'extendedButtonsClick',
'formSelectChange',
'inputNumberChange',
'tableSortChange',
'selectCallback',
'handleTableSelect',
@ -426,11 +518,17 @@ const emit = defineEmits([
'inputStringBlur',
'tableFormSelectOnBlur',
'formFormDateChange',
'clearInput'
'clearInput',
'batchAdd',
'visibleChange'
])
// | type = radio | type = select
const initSelectOptions = (item) => {
return item.dictType ? getStrDictOptions(item.dictType) : item.tableForm.initOptions
const initSelectOptions = (headerItem,row) => {
if(row[headerItem.field+'InitOptions']){
return row[headerItem.field+'InitOptions']
}else{
return headerItem.dictType ? getStrDictOptions(headerItem.dictType) : headerItem.tableForm.initOptions
}
}
//
const formSelectChange = (field, val, row) => {
@ -463,8 +561,9 @@ const tableSelectionChange = (val) => {
}
const handleSelectionDelete = () => {
emit('tableSelectionDelete', deleteTableData.value)
TableBaseComponents_Ref.value.clearSelection()
nextTick(() => {
deleteTableData.value.forEach(row=>{
deleteTableData.value.forEach((row) => {
TableBaseComponents_Ref.value!.toggleRowSelection(row, false)
})
})
@ -480,12 +579,25 @@ const tableSortChange = (column, prop, order) => {
//
const handleTableSelect = (row, column, event) => {
const selected = TableBaseComponents_Ref.value
?.getSelectionRows()
.some((item) => item.id === row.id)
if (!selected) {
TableBaseComponents_Ref.value?.toggleRowSelection(row, true)
} else {
//
TableBaseComponents_Ref.value?.toggleRowSelection(row, false)
}
emit('handleTableSelect', row, column, event)
}
// item
const itemIsDisabled = (colum, row) => {
return Boolean(colum.tableForm?.disabled) || Boolean(row.disabled) || Boolean(row['disabled_' + colum.field])
return (
Boolean(colum.tableForm?.disabled) ||
Boolean(row.disabled) ||
Boolean(row['disabled_' + colum.field])
)
}
// const { t } = useI18n() //
@ -501,11 +613,15 @@ const TableBaseForm_Ref = ref()
*/
const validateForm = () => {
console.log(TableBaseForm_Ref.value)
let _lists = TableBaseForm_Ref.value?.map(v => v.validate())
return Promise.all(_lists).then(() => {
let _lists = TableBaseForm_Ref.value?.map((v) => v.validate())
if(!_lists ||_lists.length == 0){
return false
}
return Promise.all(_lists)
.then(() => {
return true
}).catch(() => {
})
.catch(() => {
return false
})
}
@ -528,39 +644,87 @@ const inpuFocus = (headerItem, row, index)=>{
}
// input
const inputStringBlur = (field, val,row) => {
emit('inputStringBlur', field, val,row)
const inputStringBlur = (headerItem, val, row, index) => {
emit('inputStringBlur', headerItem, val, row, index)
}
const clearInput = (field, row, index) => {
emit('clearInput', field, row, index)
}
//table
const buttonOperationClick = (row, label, index) => {
emit("buttonOperationClick", row, label, index);
emit('buttonOperationClick', row, label, index)
}
const visibleChange = (field, val, row, index) => {
emit('visibleChange',field, val, row, index)
}
const currentPage = ref(1)
const pageSize = ref(10)
const showTableData = () => {
console.log('props.tableData',props.tableData)
if(props.tableData.length>100){
return props.tableData.slice((currentPage.value-1)*pageSize.value,currentPage.value*pageSize.value)
if (props.tableData.length > 10) {
return props.tableData.slice(
(currentPage.value - 1) * pageSize.value,
currentPage.value * pageSize.value
)
} else {
return props.tableData
}
}
const keyWord = ref('')
const batchAdd = () => {
let field = ''
const itemCodeFields = props.tableFields.find((item) => item.field == 'itemCode')
const supplierFields = props.tableFields.find((item) => item.field == 'supplierCode')
if (itemCodeFields) {
field = itemCodeFields.field
} else {
if (itemCodeFields) {
field = supplierFields.field
}
}
emit('batchAdd', keyWord.value)
}
const disabledInput = (headerItem, row) => {
if (headerItem.tableForm?.isInpuFocusShow) {
if (headerItem.tableForm?.enterSearch) {
return false
} else {
return true
}
} else {
return (
headerItem?.tableForm?.disabled ||
Boolean(row.disabled) ||
Boolean(row['disabled_' + headerItem.field]) ||
false
)
}
}
const initLabel=(headerItem,op)=>{
if(headerItem?.tableForm?.labelField){
return op[headerItem?.tableForm?.labelField]
}else{
return op.label
}
}
const initValue=(headerItem,op)=>{
if(headerItem?.tableForm?.valueField){
return op[headerItem?.tableForm?.valueField]
}else{
return op.value
}
}
// setup
defineExpose({
TableBaseComponents_Ref,
validateForm
validateForm,
keyWord
})
</script>
<style scoped lang="scss">
::v-deep(.el-table__body) {
padding:10px 0px
padding: 10px 0px;
}
::v-deep(.el-table--default .el-table__cell) {
padding: 2px 0px;
@ -583,6 +747,11 @@ defineExpose({
display: block;
}
.table-form ::v-deep(.is-horizontal) {
height: 12px !important;
display: block !important;
}
.button {
> div {
display: flex;
@ -596,7 +765,5 @@ defineExpose({
color: #409eff;
}
}
}
</style>

6
src/components/Tabs/src/Tabs.vue

@ -32,7 +32,13 @@ const change = (item, index) => {
current.value = index
emit('change',item,index)
}
const changeCurrent = (index) =>{
change(props.tabsList[index],index)
}
const emit = defineEmits(['change'])
defineExpose({ changeCurrent})
</script>

2
src/components/UploadFile/src/UploadFile.vue

@ -80,7 +80,7 @@ const uploadHeaders = ref({
//
const beforeUpload: UploadProps['beforeUpload'] = (file: UploadRawFile) => {
if (fileList.value.length >= props.limit) {
message.error(`${t('ts.上传文件数量不能超过')}${props.limit}!`)
message.error(`${t('ts.上传文件数量不能超过').replace('ts.','')}${props.limit}!`)
return false
}
let fileExtension = ''

2
src/components/XButton/src/ButtonBase.vue

@ -8,7 +8,7 @@
:disabled="item.disabled"
v-hasPermi="[item.hasPermi] || []"
v-if="item.name != 'set'"
@click="buttonBaseClick(item.name, item, $event)"
@click.stop="buttonBaseClick(item.name, item, $event)"
>
<Icon v-if="item.icon" :icon="item.icon" class="mr-1px" />
<span :style="{width:item.width+'px'||'auto'}" :class="[item.width?'ellipsis':'']">{{ item.label }}</span>

2
src/directives/permission/clientTable.ts

@ -13,7 +13,7 @@ export function clientTable(app: App<Element>) {
if(el.children&&el.children.length>1){
paginationHeight = 70
}
const height = window.innerHeight - top - paginationHeight - qustionHeight
const height = window.innerHeight - top - paginationHeight - qustionHeight +5
el.style.height = height + 'px'
el.firstChild.style.height = '100%'
})

9
src/layout/components/CategoryHeader.vue

@ -9,6 +9,8 @@ import { ElMenu, ElMenuItem } from 'element-plus'
import { usePermissionStore } from '@/store/modules/permission'
import { hasOneShowingChild } from '@/layout/components/Menu/src/helper'
import { useRenderMenuTitle } from '@/layout/components/Menu/src/components/useRenderMenuTitle'
import ToolHeader from './ToolHeader.vue'
//
import { useDesign } from '@/hooks/web/useDesign'
const { getPrefixCls, variables } = useDesign()
@ -101,6 +103,7 @@ export default defineComponent({
}
}}
</ElMenu>
<ToolHeader class="tool-header"></ToolHeader>
</div>
)
}
@ -127,7 +130,11 @@ $prefix-cls: #{$namespace}-tool-header;
left:0;
z-index: 999;
}
.tool-header{
position: absolute;
right: 0px;
top: 0px;
}
}
.categoryheader{
padding-left: 20px;

2
src/layout/components/Message/src/Message.vue

@ -62,7 +62,7 @@ onBeforeUnmount(() => {
<ElPopover :width="400" placement="bottom" trigger="click">
<template #reference>
<ElBadge :is-dot="unreadCount > 0" class="item">
<Icon :size="18" class="cursor-pointer" icon="ep:bell" @click="getList" />
<Icon :size="18" class="cursor-pointer" color="#ffffff" icon="ep:bell" @click="getList" />
</ElBadge>
</template>
<ElTabs v-model="activeName">

24
src/layout/components/ToolHeader.vue

@ -54,30 +54,30 @@ export default defineComponent({
'dark:bg-[var(--el-bg-color)]'
]}
>
{layout.value !== 'top' ? (
{/* {layout.value !== 'top' ? (
<div class="h-full flex items-center">
{hamburger.value && layout.value !== 'cutMenu' ? (
<Collapse class="custom-hover" color="var(--top-header-text-color)"></Collapse>
) : undefined}
{breadcrumb.value ? <Breadcrumb class="lt-md:hidden"></Breadcrumb> : undefined}
</div>
) : undefined}
) : undefined} */}
<div class="h-full flex items-center">
{search.value ? (<RouterSearch isModal={false} />) : undefined}
{screenfull.value ? (
{/* {screenfull.value ? (
<Screenfull class="custom-hover" color="var(--top-header-text-color)"></Screenfull>
) : undefined}
{size.value ? (
) : undefined} */}
{/* {size.value ? (
<SizeDropdown class="custom-hover" color="var(--top-header-text-color)"></SizeDropdown>
) : undefined}
{locale.value ? (
) : undefined} */}
{/* {locale.value ? (
<LocaleDropdown
class="custom-hover"
color="var(--top-header-text-color)"
></LocaleDropdown>
) : undefined}
) : undefined} */}
{message.value ? (
<Message class="custom-hover" color="var(--top-header-text-color)"></Message>
<Message class="custom-hover custom-hover1" color="var(--top-header-text-color)"></Message>
) : undefined}
<UserInfo></UserInfo>
</div>
@ -93,4 +93,10 @@ $prefix-cls: #{$namespace}-tool-header;
.#{$prefix-cls} {
transition: left var(--transition-time-02);
}
.custom-hover1:hover{
opacity: 0.5;
background-color: transparent;
scale: 1.2;
transition: all 50ms;
}
</style>

22
src/layout/components/UserInfo/src/UserInfo.vue

@ -6,6 +6,7 @@ import { useDesign } from '@/hooks/web/useDesign'
import avatarImg from '@/assets/imgs/avatar.gif'
import { useUserStore } from '@/store/modules/user'
import { useTagsViewStore } from '@/store/modules/tagsView'
import { getTenantId } from '@/utils/auth'
defineOptions({ name: 'UserInfo' })
@ -28,6 +29,8 @@ const user = wsCache.get(CACHE_KEY.USER)
const avatar = user.user.avatar ? user.user.avatar : avatarImg
const userName = user.user.nickname ? user.user.nickname : 'Admin'
const names =[{"text":"长春1379","value":1},{"text":"成都1397","value":2},{"text":"长春2379","value":3}]
const tenant = names.find(item=>item.value == getTenantId())
const loginOut = () => {
ElMessageBox.confirm(t('common.loginOutMessage'), t('common.reminder'), {
@ -51,12 +54,13 @@ const toDocument = () => {
</script>
<template>
<ElDropdown class="custom-hover" :class="prefixCls" trigger="click">
<ElDropdown class="custom-hover custom-hover1" :class="prefixCls" trigger="click">
<div class="flex items-center">
<ElAvatar :src="avatar" alt="" class="w-[calc(var(--logo-height)-25px)] rounded-[50%]" />
<span class="pl-[5px] text-14px text-[var(--top-header-text-color)] <lg:hidden">
{{ userName }}
</span>
<div class="pl-[5px] text-14px text-[var(--top-header-text-color)] <lg:hidden" style="display: flex; flex-direction: column;color:#ffffff">
<span> {{ userName }} </span>
<span style="margin-top: 5px;text-align:center">{{ tenant.text }}</span>
</div>
</div>
<template #dropdown>
<ElDropdownMenu>
@ -76,3 +80,13 @@ const toDocument = () => {
</template>
</ElDropdown>
</template>
<style lang="scss" scoped>
.custom-hover1:hover{
opacity: 0.5;
background-color: transparent;
scale: 1.1;
transition: all 50ms;
}
</style>

6
src/layout/components/useRenderLayout.tsx

@ -39,7 +39,7 @@ const fixedMenu = computed(() => appStore.getFixedMenu)
// 搜索图片
const search = computed(() => appStore.search)
const scrollBarHeight = computed(() => {
return (window.innerHeight - appStore.getCategoryMenuHeight - 85)+'px'
return (window.innerHeight - appStore.getCategoryMenuHeight - 35)+'px'
})
export const useRenderLayout = () => {
@ -114,14 +114,14 @@ export const useRenderLayout = () => {
style="transition: all var(--transition-time-02);width:100%;"
>
<ToolHeader
{/* <ToolHeader
class={[
'bg-[var(--top-header-bg-color)]',
{
'layout-border__bottom': !tagsView.value
}
]}
></ToolHeader>
></ToolHeader> */}
{tagsView.value ? (
<TagsView class="layout-border__bottom layout-border__top"></TagsView>

18
src/locales/en-US.ts

@ -884,6 +884,7 @@ export default {
:'Total',
:'Open',
:'Save',
:'Next',
:'Please select filter',
:'Please inputr content',
:'Attachment',
@ -1137,7 +1138,22 @@ export default {
'驳回原因不能为空,且不超过60字':'The reason for rejection cannot be empty and cannot exceed 60 words',
:'Batch release',
'重新生成标签会删除上次生成的标签,是否确认继续?':'Regenerating labels will delete the last generated label. Are you sure you want to continue?',
'确 认':'Confirm'
'确 认':'Confirm',
:'Please enter the reason for rejection',
:'View details',
:'All read',
'申请发货数量不能大于 计划数量 - 已发货数量':'The requested quantity cannot be greater than the planned quantity - the quantity shipped',
:'Oversend is not allowed',
:'The total quantity exceeds the planned quantity',
:'Exporting two-dimensional tables',
:'Detailed requisition plan',
:'Two dimensional requisition schedule',
'要货预测-计划员':'Demand forecast-Planner',
'要货预测-供应商':'Demand forecast-Supplier',
:'All',
:'Planner',
},

15
src/locales/zh-CN.ts

@ -884,6 +884,7 @@ export default {
:'共',
:'打开',
:'保存',
:'下一步',
:'请选择筛选对象',
:'请输入内容',
:'附件',
@ -1138,6 +1139,20 @@ export default {
:'批量发布',
'重新生成标签会删除上次生成的标签,是否确认继续?':'重新生成标签会删除上次生成的标签,是否确认继续?',
'确 认':'确 认',
:'请输入拒收原因',
:'查看明细',
:'全部已读',
'申请发货数量不能大于 计划数量 - 已发货数量':'申请发货数量不能大于 计划数量 - 已发货数量',
:'不允许超发',
:'总数量超出计划数量',
:'导出二维表',
:'要货计划明细',
:'要货计划二维表',
'要货预测-计划员':'要货预测-计划员',
'要货预测-供应商':'要货预测-供应商',
:'全选',
:'计划员',
},
}

4
src/main.ts

@ -45,6 +45,9 @@ import VueDOMPurifyHTML from 'vue-dompurify-html' // 解决v-html 的安全隐
import DataVVue3 from '@kjgl77/datav-vue3'
import { useLocaleStore } from '@/store/modules/locale'
import { vue_next_focus } from "vue-next-focus";
// 创建实例
const setupAll = async () => {
const app = createApp(App)
@ -67,6 +70,7 @@ const setupAll = async () => {
app.use(VueDOMPurifyHTML)
app.use(DataVVue3)
app.use( vue_next_focus )
app.mount('#app')
app.config.warnHandler = () => null;

9
src/store/modules/permission.ts

@ -4,6 +4,7 @@ import { cloneDeep } from 'lodash-es'
import remainingRouter from '@/router/modules/remaining'
import { flatMultiLevelRoutes, generateRoute } from '@/utils/routerHelper'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { getTenantId } from '@/utils/auth'
const { wsCache } = useCache()
@ -33,11 +34,19 @@ export const usePermissionStore = defineStore('permission', {
actions: {
async generateRoutes(): Promise<unknown> {
return new Promise<void>(async (resolve) => {
// let names =[{"text":"长春1379","value":1},{"text":"成都1397","value":2},{"text":"长春2379","value":3}]
// let tenant = names.find(item=>item.value == getTenantId())
// 获得菜单列表,它在登录的时候,setUserInfoAction 方法中已经进行获取
let res: AppCustomRouteRecordRaw[] = []
if (wsCache.get(CACHE_KEY.ROLE_ROUTERS)) {
res = wsCache.get(CACHE_KEY.ROLE_ROUTERS) as AppCustomRouteRecordRaw[]
// res.forEach(item=>{
// if(item.name == '富维海拉供应商系统'&&tenant){
// item.name = item.name + tenant['text']
// }
// })
}
console.log('菜单res',res)
const routerMap: AppRouteRecordRaw[] = generateRoute(res)
// 动态路由,404一定要放到最后面
this.addRouters = routerMap.concat([

105
src/utils/calculate.ts

@ -0,0 +1,105 @@
// 判断传入的值-是否为整数
function isInteger(obj) {
return Math.floor(obj) === obj
}
// 将一个浮点数转成整数,返回整数和倍数。如 3.14 >> 314,倍数是 100
// @param floatNum { number } 小数
// @return { object }
// { times: 100, num: 314 }
// 用于返回整数和倍数
function toInteger(floatNum) {
// 声明一个对象用来保存倍数和整数
const ret = { times: 1, num: 0 }
// 第一种情况:是整数
if (isInteger(floatNum)) {
// 把整数给 ret中的 num
ret.num = floatNum
return ret // 最后返回 ret
}
// 第二种情况-不是整数,
const strfi = floatNum + '' // 转为字符串 "0.1"
const dotPos = strfi.indexOf('.') // 查询小数点
const len = strfi.substr(dotPos + 1).length; // 获取小数点后的长度
const times = Math.pow(10, len) // 放大多少倍
const intNum = Number(floatNum.toString().replace('.', '')) // 返回 转为字符串 截取掉小数点 最后转为数字(整数)
// 把获取到的倍数和整数存入对象中
ret.times = times
ret.num = intNum
return ret
}
// 核心方法,实现加减乘除运算,确保不丢失精度
// 思路:把小数放大为整数(乘),进行算术运算,再缩小为小数(除)
// @param a { number } 运算数1
// @param b { number } 运算数2
// @param digits { number } 精度,保留的小数点数,比如 2, 即保留为两位小数
// @param op { string } 运算类型,有加减乘除(add / subtract / multiply / divide)
function operation(a, b, digits, op) {
// 获取倍数和整数的对象
const o1 = toInteger(a)
const o2 = toInteger(b)
// 提取整数
const n1 = o1.num
const n2 = o2.num
// 提取倍数
const t1 = o1.times
const t2 = o2.times
// 获取最大倍数
const max = t1 > t2 ? t1 : t2
let result = 0 //
switch (op) {
case 'add':
if (t1 === t2) { // 两个小数位数相同
result = n1 + n2 //
} else if (t1 > t2) { // o1 小数位 大于 o2
result = n1 + n2 * (t1 / t2)
} else { // o1 小数位 小于 o2
result = n1 * (t2 / t1) + n2
}
return result / max
case 'subtract':
if (t1 === t2) {
result = n1 - n2
} else if (t1 > t2) {
result = n1 - n2 * (t1 / t2)
} else {
result = n1 * (t2 / t1) - n2
}
return result / max
case 'multiply':
result = (n1 * n2) / (t1 * t2)
return result
case 'divide':
result = (n1 / n2) * (t2 / t1)
return result
}
}
// 加减乘除的四个接口
export function add(a, b, digits) {
return operation(a, b, digits, 'add')
}
export function subtract(a, b, digits) {
return operation(a, b, digits, 'subtract')
}
export function multiply(a, b, digits) {
return operation(a, b, digits, 'multiply')
}
export function divide(a, b, digits) {
return operation(a, b, digits, 'divide')
}
// console.log(floatObj.add(0.5, 0.2))
// console.log(floatObj.add(0.12, 0.3))

10
src/utils/dict.ts

@ -188,6 +188,7 @@ export enum DICT_TYPE {
UOM = 'uom', // 计量单位
ABC_CLASS = 'abc_class', // ABC类
TRUE_FALSE = 'true_false', // 是否
ALLOWOVERSHIPMENT = 'allow_over_shipment',//是否允许超发
FALSE_OR_TRUE = 'false_or_true', // 是否2
ITEM_GROUP = 'item_group', // 物料分组
ITEM_CATEGORY = 'Item_category', // 物料种类
@ -224,11 +225,14 @@ export enum DICT_TYPE {
REQEUST_MODE = 'reqeust_mode', // 申请模式
TIME_UNIT = 'time_unit', // 时间单位
COUNT_TYPE = 'count_type', // 盘点类型
COUNT_SPLIT_TYPE = 'count_split_type', // 盘点拆分方式
COUNT_SCOPE_TYPE = 'count_scope_type', // 盘点范围类型
BARCODE_PREFIX = 'barcode_prefix', // 条码前缀
SETTLEMENT_TYPE = 'settlement_type', // 结算类型
FROZEN_REASON = 'frozen_reason', // 冻结原因
INVENTORY_ACTION = 'inventory_action', // 库存动作
EAM_INVENTORY_ACTION = 'EAM_inventory_action', // EAM库存动作
EAM_TRANSACTION_TYPE = 'EAM_transaction_Type', // EAM库存类型
CONTAINER_TYPE = 'container_type', // 器具类型
CONTAINER_CONTENT_TYPE = 'container_content_type', // 器具内容类型
RESET_PERIOD = 'reset_period', // 重置周期
@ -282,6 +286,8 @@ export enum DICT_TYPE {
DELIVER_TYPE = 'deliver_type', //发货类型
BILL_TYPE = 'bill_type', // 发票类型
CONTAIN_MANAGE_TYPE = 'contain_menage_type', //器具管理类型
INVOICE_BALANCE_STATEMENT_STATUS = 'invoice_balance_statement_status', //是否有价差
PL_MSTR_TYPE = 'pl_mstr_type', //产品类类型
// ========== 业务 - mes ==========
MESDO_STATUS = 'mes_do_status', // 工单执行状态
@ -354,6 +360,7 @@ export enum DICT_TYPE {
REPAIR_DEGREE = 'repair_degree', //维修紧急程度
REPAIR_LEVEL = 'repair_level', //维修级别
IS_COMPLETED = 'is_completed', //是否完成
IS_NORMAL = 'is_normal', //正常异常
MAINTENANCE_CYCLE = 'maintenance_cycle', // 保养周期
INSPECTION_CYCLE = 'inspection_cycle', // 巡检周期
SPOTCHECK_CYCLE = 'spotcheck_cycle', // 巡检周期
@ -374,5 +381,6 @@ export enum DICT_TYPE {
SPAREPARTS_APPLY_STATUS_ENUM = 'spareparts_apply_status_enum', // 流程状态
EAM_OUT_STATUS = 'eam_out_status', // 出库状态
IS_LINE_ITEM = 'is_line_item', // 是否是线边
PUT_IN_TYPE = 'put_in_type' // 入库类型
PUT_IN_TYPE = 'put_in_type', // 入库类型
PURCHASE_JOB_STATUS = 'purchase_job_status', // 采购收货任务状态
}

135
src/utils/disposition/defaultButtons.ts

@ -44,6 +44,31 @@ export function defaultExportBtn(option:any) {
hasPermi: ''
})
}
// 导出明细按钮
export function defaultExportDetailsBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.导出明细`).replace('ts.', ''),
name: 'export-details',
hide: false,
type: 'success',
icon: 'ep:download',
color: '',
hasPermi: ''
})
}
// 导出明细按钮
export function defaultExportTableBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.导出二维表`).replace('ts.', ''),
name: 'export-table',
hide: false,
type: 'success',
icon: 'ep:download',
color: '',
hasPermi: ''
})
}
// 字段设置
// export function defaultFieldSettingBtn(option:any) {
@ -236,7 +261,19 @@ export function formStagingBtn(option:any) {
hasPermi: ''
})
}
// form表单-下一步按钮
export function formNextStepBtn(option:any) {
return __defaultBtnOption(option,{
label: t(`ts.下一步`).replace('ts.', ''),
name: 'nextStep',
hide: false,
type: 'primary',
icon: 'ep:select',
color: '',
float:'right',
hasPermi: ''
})
}
// drawer抽屉头部-编辑按钮
export function drawerEditBtn(option: any) {
@ -415,6 +452,19 @@ export function mainListFinishBtn(option:any) {
})
}
// 主列表-作废按钮
export function mainListCancelBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.作废`).replace('ts.', ''),
name: 'cancel',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-验证按钮
export function mainListValidateBtn(option: any) {
return __defaultBtnOption(option, {
@ -1128,7 +1178,7 @@ export function mainCopyBtn(option:any) {
// 主列表-部件
export function componentBtn(option: any) {
return __defaultBtnOption(option, {
label: '部件',
label: '关联部件',
name: 'component',
hide: false,
type: 'primary',
@ -1140,7 +1190,7 @@ export function componentBtn(option:any) {
// 主列表-备件
export function sparePartBtn(option: any) {
return __defaultBtnOption(option, {
label: '备件',
label: '关联备件',
name: 'sparePart',
hide: false,
type: 'primary',
@ -1173,6 +1223,78 @@ export function maintainExperienceBtn(option:any) {
hasPermi: ''
})
}
// 主列表-撤销
export function backoutBtn(option: any) {
return __defaultBtnOption(option, {
label: '撤销',
name: 'backout',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-盘点导出
export function mainExport(option: any) {
return __defaultBtnOption(option, {
label: '导出',
name: 'mainExport',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-盘点导入
export function mainAdjustImport(option: any) {
return __defaultBtnOption(option, {
label: '导入',
name: 'mainAdjustImport',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-备件
export function replaceLocation(option: any) {
return __defaultBtnOption(option, {
label: '更换库位',
name: 'replaceLocation',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-撤销
export function approveBtn(option: any) {
return __defaultBtnOption(option, {
label: '审批',
name: 'approve',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-出库
export function outBtn(option: any) {
return __defaultBtnOption(option, {
label: '出库',
name: 'out',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 默认按钮规则
function __defaultBtnOption(option: any, specific: any) {
return {
@ -1183,9 +1305,9 @@ function __defaultBtnOption(option:any,specific:any){
label: option && option.label ? option.label : specific.label,
name: option && option.name ? option.name : specific.name,
size: option && option.size ? option.size : specific.size,
float:option && option.float ? option.float : (specific.float || null),
url:option && option.url ? option.url : (specific.url || null),
background:option && option.background ? option.background : (specific.background || null),
float: option && option.float ? option.float : specific.float || null,
url: option && option.url ? option.url : specific.url || null,
background: option && option.background ? option.background : specific.background || null,
class: option && option.class ? option.class : specific.class,
color: option && option.color ? option.color : specific.color,
hide: option && option.hide ? option.hide : specific.hide,
@ -1195,4 +1317,3 @@ function __defaultBtnOption(option:any,specific:any){
...option
}
}

6
src/utils/disposition/tabsList.ts

@ -38,3 +38,9 @@ export const PurchasereceiptRequestTabsList = [{
}
]
export const PurchasereceiptRefuseRequestTabsList = [{
label: "拒收明细",
prop: 'receiptDetail',
}
]

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

Loading…
Cancel
Save