Browse Source

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

master_hella_20240701
ljlong_2630 6 months ago
parent
commit
0ee8492873
  1. 4
      .env.hella15
  2. 4
      .env.hella16
  3. 2
      README.md
  4. 2
      src/api/eam/basicFaultCause/index.ts
  5. 2
      src/api/eam/basicFaultType/index.ts
  6. 2
      src/api/eam/basicInspectionOption/index.ts
  7. 2
      src/api/eam/basicMaintenanceOption/index.ts
  8. 61
      src/api/eam/basicSpotCheckSelectSet/index.ts
  9. 22
      src/api/eam/documentType/index.ts
  10. 61
      src/api/eam/documentTypeSelectSet/index.ts
  11. 60
      src/api/eam/inspectionItemSelectSet/index.ts
  12. 12
      src/api/wms/purchasereceiptJobDetail/index.ts
  13. 74
      src/api/wms/relegateRecordDetail/index.ts
  14. 61
      src/api/wms/relegateRecordMain/index.ts
  15. 28
      src/api/wms/relegateRequestDetail/index.ts
  16. 98
      src/api/wms/relegateRequestMain/index.ts
  17. 4
      src/api/wms/supplierdeliverInspectionDetail/index.ts
  18. 8
      src/components/Annex/src/Annex.vue
  19. 11
      src/components/BasicForm/src/BasicForm.vue
  20. 41
      src/components/TableForm/src/TableForm.vue
  21. 2
      src/config/axios/service.ts
  22. 3
      src/locales/en-US.ts
  23. 3
      src/locales/zh-CN.ts
  24. 3
      src/permission.ts
  25. 10
      src/router/modules/remaining.ts
  26. 2
      src/utils/dict.ts
  27. 11
      src/utils/disposition/defaultButtons.ts
  28. 147
      src/views/eam/basicSpotCheckSelectSet/basicSpotCheckSelectSet.data.ts
  29. 287
      src/views/eam/basicSpotCheckSelectSet/index.vue
  30. 287
      src/views/eam/basicSpotCheckSelectSet/itemSelectSetForm.vue
  31. 0
      src/views/eam/documentType/documentType.data.ts
  32. 4
      src/views/eam/documentType/index.vue
  33. 140
      src/views/eam/documentTypeSelectSet/documentTypeSelectSet.data.ts
  34. 300
      src/views/eam/documentTypeSelectSet/index.vue
  35. 292
      src/views/eam/documentTypeSelectSet/itemSelectSetForm.vue
  36. 287
      src/views/eam/inspectionItemSelectSet/index.vue
  37. 141
      src/views/eam/inspectionItemSelectSet/inspectionItemSelectSet.data.ts
  38. 280
      src/views/eam/inspectionItemSelectSet/itemSelectSetForm.vue
  39. 10
      src/views/mes/abilityInfo/index.vue
  40. 8
      src/views/mes/itemRequestMain/index.vue
  41. 24
      src/views/mes/itemRequestMain/itemRequestMain.data.ts
  42. 1
      src/views/mes/opersteps/index.vue
  43. 9
      src/views/mes/ordermonthplan/index.vue
  44. 9
      src/views/mes/pattern/index.vue
  45. 9
      src/views/mes/patternType/index.vue
  46. 10
      src/views/mes/qualityclass/index.vue
  47. 9
      src/views/mes/qualitygroup/index.vue
  48. 2
      src/views/mes/reworkBatch/index.vue
  49. 2
      src/views/mes/reworkSingle/index.vue
  50. 9
      src/views/mes/workstation/index.vue
  51. 34
      src/views/system/user/UserForm.vue
  52. 2
      src/views/wms/agvManage/interfaceInfo/interfaceInfo.data.ts
  53. 6
      src/views/wms/basicDataManage/itemManage/itemarea/index.vue
  54. 244
      src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/index.vue
  55. 204
      src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/relegateRecordMain.data.ts
  56. 396
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue
  57. 674
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts
  58. 553
      src/views/wms/basicDataManage/itemManage/relegateRequest/relegateRequestMain.data.ts
  59. 2
      src/views/wms/basicDataManage/itemManage/relegateRequestDetail/index.vue
  60. 2
      src/views/wms/basicDataManage/itemManage/relegateRequestDetail/relegateRequest.data.ts
  61. 23
      src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts
  62. 4
      src/views/wms/basicDataManage/labelManage/callmaterials/index.vue
  63. 6
      src/views/wms/countManage/count/countPlanMain/index.vue
  64. 6
      src/views/wms/countManage/count/countRequestMain/index.vue
  65. 6
      src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue
  66. 6
      src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue
  67. 5
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue
  68. 6
      src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue
  69. 6
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue
  70. 6
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue
  71. 6
      src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue
  72. 6
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue
  73. 6
      src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue
  74. 6
      src/views/wms/inventoryManage/containerinit/containerBindRecord/index.vue
  75. 6
      src/views/wms/inventoryManage/containerinit/containerRepair/index.vue
  76. 6
      src/views/wms/inventoryManage/containerinit/containerUnbindRecord/index.vue
  77. 8
      src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue
  78. 6
      src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue
  79. 6
      src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue
  80. 6
      src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue
  81. 6
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
  82. 6
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue
  83. 6
      src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue
  84. 6
      src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue
  85. 6
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue
  86. 6
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
  87. 6
      src/views/wms/issueManage/issue/issueRequestMain/index.vue
  88. 6
      src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue
  89. 6
      src/views/wms/issueManage/pick/pickRequestMain/index.vue
  90. 6
      src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue
  91. 5
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  92. 6
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue
  93. 5
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue
  94. 6
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue
  95. 5
      src/views/wms/productionManage/offlinesettlement/offlinesettlementRequestMain/index.vue
  96. 6
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue
  97. 5
      src/views/wms/productionManage/productionplan/productionMain/index.vue
  98. 5
      src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue
  99. 6
      src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue
  100. 5
      src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue

4
.env.hella15

@ -31,10 +31,10 @@ VITE_BASE_PATH=/
VITE_OUT_DIR=sfms3.0 VITE_OUT_DIR=sfms3.0
# 自定义接口路径 # 自定义接口路径
VITE_INTERFACE_URL='http://172.21.32.15:90/magic/web/index.html' VITE_INTERFACE_URL='https://scp.faway-hella.com/magic/web/index.html'
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.15:90' VITE_JMREPORT_BASE_URL='https://scp.faway-hella.com'
# 租户配置 # 租户配置
VITE_TENANT='["长春","成都"]' VITE_TENANT='["长春","成都"]'

4
.env.hella16

@ -31,10 +31,10 @@ VITE_BASE_PATH=/
VITE_OUT_DIR=sfms3.0 VITE_OUT_DIR=sfms3.0
# 自定义接口路径 # 自定义接口路径
VITE_INTERFACE_URL='http://172.21.32.16:90/magic/web/index.html' VITE_INTERFACE_URL='https://scptest.faway-hella.com/magic/web/index.html'
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.16:90' VITE_JMREPORT_BASE_URL='https://scptest.faway-hella.com'
# 租户配置 # 租户配置
VITE_TENANT='["长春","成都"]' VITE_TENANT='["长春","成都"]'

2
README.md

@ -1,4 +1,4 @@
## dev发布2024-05-17-002 ## dev发布2024-05-20-001
**xxxx.data.ts 文件配置说明** **xxxx.data.ts 文件配置说明**
**form表单查询弹窗配置** **form表单查询弹窗配置**
form: { form: {

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

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

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

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

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

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

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

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

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

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

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

@ -20,48 +20,48 @@ export const getDocumentTypePage = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
const data = {...params} const data = {...params}
return await request.post({ url: '/eam/document-type/senior', data }) return await request.post({ url: '/eam/basic/document-type/senior', data })
} else { } else {
return await request.get({ url: `/eam/document-type/page`, params }) return await request.get({ url: `/eam/basic/document-type/page`, params })
} }
} }
// 查询文档类型详情 // 查询文档类型详情
export const getDocumentType = async (id: number) => { export const getDocumentType = async (id: number) => {
return await request.get({ url: `/eam/document-type/get?id=` + id }) return await request.get({ url: `/eam/basic/document-type/get?id=` + id })
} }
// 新增文档类型 // 新增文档类型
export const createDocumentType = async (data: DocumentTypeVO) => { export const createDocumentType = async (data: DocumentTypeVO) => {
return await request.post({ url: `/eam/document-type/create`, data }) return await request.post({ url: `/eam/basic/document-type/create`, data })
} }
// 修改文档类型 // 修改文档类型
export const updateDocumentType = async (data: DocumentTypeVO) => { export const updateDocumentType = async (data: DocumentTypeVO) => {
return await request.put({ url: `/eam/document-type/update`, data }) return await request.put({ url: `/eam/basic/document-type/update`, data })
} }
// 删除文档类型 // 删除文档类型
export const deleteDocumentType = async (id: number) => { export const deleteDocumentType = async (id: number) => {
return await request.delete({ url: `/eam/document-type/delete?id=` + id }) return await request.delete({ url: `/eam/basic/document-type/delete?id=` + id })
} }
// 导出文档类型 Excel // 导出文档类型 Excel
export const exportDocumentType = async (params) => { export const exportDocumentType = async (params) => {
if (params.isSearch) { if (params.isSearch) {
const data = {...params} const data = {...params}
return await request.downloadPost({ url: `/eam/document-type/export-excel-senior`, data }) return await request.downloadPost({ url: `/eam/basic/document-type/export-excel-senior`, data })
}else{ }else{
return await request.download({ url: `/eam/document-type/export-excel`, params }) return await request.download({ url: `/eam/basic/document-type/export-excel`, params })
} }
} }
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/eam/document-type/get-import-template' }) return request.download({ url: '/eam/basic/document-type/get-import-template' })
} }
// 启用 / 禁用 // 启用 / 禁用
export const updateEnableCode = async (data: EquipmentMainPartVO) => { export const updateEnableCode = async (data: DocumentTypeVO) => {
return await request.post({ url: `/eam/document-type/ables` , data }) return await request.post({ url: `/eam/basic/document-type/ables` , data })
} }

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

@ -0,0 +1,61 @@
import request from '@/config/axios'
import {BasicSpotCheckSelectSetVO} from "@/api/eam/basicSpotCheckSelectSet";
export interface DocumentTypeSelectSetVO {
id: number
name: string
itemCode: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询文档类型选择集列表
export const getDocumentTypeSelectSetPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/document-type-select-set/senior', data })
} else {
return await request.get({ url: `/eam/document-type-select-set/page`, params })
}
}
// 查询文档类型选择集详情
export const getDocumentTypeSelectSet = async (id: number) => {
return await request.get({ url: `/eam/document-type-select-set/get?id=` + id })
}
// 新增文档类型选择集
export const createDocumentTypeSelectSet = async (data: DocumentTypeSelectSetVO) => {
return await request.post({ url: `/eam/document-type-select-set/create`, data })
}
// 修改文档类型选择集
export const updateDocumentTypeSelectSet = async (data: DocumentTypeSelectSetVO) => {
return await request.put({ url: `/eam/document-type-select-set/update`, data })
}
// 删除文档类型选择集
export const deleteDocumentTypeSelectSet = async (id: number) => {
return await request.delete({ url: `/eam/document-type-select-set/delete?id=` + id })
}
// 导出文档类型选择集 Excel
export const exportDocumentTypeSelectSet = async (params) => {
return await request.download({ url: `/eam/document-type-select-set/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/document-type-select-set/get-import-template' })
}
// 启用 / 禁用
export const updateEnableCode = async (data: DocumentTypeSelectSetVO) => {
return await request.post({ url: `/eam/document-type-select-set/ables` , data })
}

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

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

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

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

74
src/api/wms/relegateRecordDetail/index.ts

@ -0,0 +1,74 @@
import request from '@/config/axios'
export interface RelegateRecordDetailVO {
id: number
masterId: number
itemCode: string
downItemCode: string
businessType: string
uom: string
qty: number
inventoryStatus: string
fromBatch: string
fromPackingNumber: string
fromLocationCode: string
fromAreaTypes: string
fromAreaCodes: string
toPackingNumber: string
toBatch: string
toLocationCode: string
toWarehouseCode: string
toAreaTypes: string
toAreaCodes: string
number: string
available: string
remark: string
departmentCode: string
siteId: number
extraProperties: string
status: string
concurrencyStamp: number
serialNumber: string
ruleUserId: number
}
// 查询物料降级记录子列表
export const getRelegateRecordDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/relegate-record-detail/senior', data })
} else {
return await request.get({ url: `/wms/relegate-record-detail/page`, params })
}
}
// 查询物料降级记录子详情
export const getRelegateRecordDetail = async (id: number) => {
return await request.get({ url: `/wms/relegate-record-detail/get?id=` + id })
}
// 新增物料降级记录子
export const createRelegateRecordDetail = async (data: RelegateRecordDetailVO) => {
return await request.post({ url: `/wms/relegate-record-detail/create`, data })
}
// 修改物料降级记录子
export const updateRelegateRecordDetail = async (data: RelegateRecordDetailVO) => {
return await request.put({ url: `/wms/relegate-record-detail/update`, data })
}
// 删除物料降级记录子
export const deleteRelegateRecordDetail = async (id: number) => {
return await request.delete({ url: `/wms/relegate-record-detail/delete?id=` + id })
}
// 导出物料降级记录子 Excel
export const exportRelegateRecordDetail = async (params) => {
return await request.download({ url: `/wms/relegate-record-detail/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/relegate-record-detail/get-import-template' })
}

61
src/api/wms/relegateRecordMain/index.ts

@ -0,0 +1,61 @@
import request from '@/config/axios'
export interface RelegateRecordMainVO {
id: number
requestNumber: string
executeTime: Date
activeDate: Date
available: string
requestTime: Date
dueTime: Date
departmentCode: string
userGroupCode: string
interfaceType: string
code: string
number: string
businessType: string
remark: string
extraProperties: string
siteId: string
}
// 查询物料降级记录主列表
export const getRelegateRecordMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/relegate-record-main/senior', data })
} else {
return await request.get({ url: `/wms/relegate-record-main/page`, params })
}
}
// 查询物料降级记录主详情
export const getRelegateRecordMain = async (id: number) => {
return await request.get({ url: `/wms/relegate-record-main/get?id=` + id })
}
// 新增物料降级记录主
export const createRelegateRecordMain = async (data: RelegateRecordMainVO) => {
return await request.post({ url: `/wms/relegate-record-main/create`, data })
}
// 修改物料降级记录主
export const updateRelegateRecordMain = async (data: RelegateRecordMainVO) => {
return await request.put({ url: `/wms/relegate-record-main/update`, data })
}
// 删除物料降级记录主
export const deleteRelegateRecordMain = async (id: number) => {
return await request.delete({ url: `/wms/relegate-record-main/delete?id=` + id })
}
// 导出物料降级记录主 Excel
export const exportRelegateRecordMain = async (params) => {
return await request.download({ url: `/wms/relegate-record-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/relegate-record-main/get-import-template' })
}

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

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

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

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

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

@ -57,3 +57,7 @@ export const exportSupplierdeliverInspectionDetail = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/supplierdeliver-inspection-detail/get-import-template' }) return request.download({ url: '/wms/supplierdeliver-inspection-detail/get-import-template' })
} }
// 查看质检报告
export const queryQualityInspection = (asnNumber:string) => {
return request.get({ url: `/wms/supplierdeliver-request-main/queryQualityInspection?asnNumber=` + asnNumber })
}

8
src/components/Annex/src/Annex.vue

@ -4,11 +4,11 @@
<div class="title flex items-center"> <div class="title flex items-center">
<!-- <div class="title-txt">附件</div> --> <!-- <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" :title="t('ts.添加附件')" :upData="upData" :limit="10"
@update:modelValue="handleAnnexSuccess" v-if="annexData.annexList.length<5"/> @update:modelValue="handleAnnexSuccess" v-if="showAddBtn&&annexData.annexList.length<5"/>
</div> </div>
<div class="list"> <div class="list">
<div class="item flex items-start" v-for="(item, index) in annexData.annexList" :key="index"> <div class="item flex items-start" v-for="(item, index) in annexData.annexList" :key="index">
<Icon icon="fa:file-text-o" color="#409eff" size="30" class="mt-4px" /> <Icon icon="fa:file-text-o" color="#409eff" :size="30" class="mt-4px" />
<div class="item-center" > <div class="item-center" >
<div class="item-title" @click="downFile(item)">{{ item.name }}</div> <div class="item-title" @click="downFile(item)">{{ item.name }}</div>
<div class="info mt-6px"> <div class="info mt-6px">
@ -67,6 +67,10 @@ const props = defineProps({
type: Boolean, type: Boolean,
required: false required: false
}, },
showAddBtn: {
type: Boolean,
required: true
},
}) })
// emit // emit
const emit = defineEmits(['handleAnnexSuccess', 'deleteAnnexSuccess','previewAnnexHandle']) const emit = defineEmits(['handleAnnexSuccess', 'deleteAnnexSuccess','previewAnnexHandle'])

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

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

41
src/components/TableForm/src/TableForm.vue

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

2
src/config/axios/service.ts

@ -31,7 +31,7 @@ let requestList: any[] = []
// 是否正在刷新中 // 是否正在刷新中
let isRefreshToken = false let isRefreshToken = false
// 请求白名单,无须token的接口 // 请求白名单,无须token的接口
const whiteList: string[] = ['/login', '/refresh-token'] const whiteList: string[] = ['/login', '/refresh-token','/queryQualityInspection']
// 创建axios实例 // 创建axios实例
const service: AxiosInstance = axios.create({ const service: AxiosInstance = axios.create({

3
src/locales/en-US.ts

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

3
src/locales/zh-CN.ts

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

3
src/permission.ts

@ -21,7 +21,8 @@ const whiteList = [
'/auth-redirect', '/auth-redirect',
'/bind', '/bind',
'/register', '/register',
'/oauthLogin/gitee' '/oauthLogin/gitee',
'/purchasereceiptReport'
] ]
// 路由加载前 // 路由加载前

10
src/router/modules/remaining.ts

@ -244,6 +244,16 @@ const remainingRouter: AppRouteRecordRaw[] = [
noTagsView: true noTagsView: true
} }
}, },
{
path: '/purchasereceiptReport',
component: () => import('@/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptReport/index.vue'),
name: 'NoFound',
meta: {
hidden: true,
title: t('ts.查看质检报告'),
noTagsView: true
}
},
{ {
path: '/bpm', path: '/bpm',
component: Layout, component: Layout,

2
src/utils/dict.ts

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

11
src/utils/disposition/defaultButtons.ts

@ -518,6 +518,17 @@ export function mainListPlanUploadQualityReportBtn(option:any) {
hasPermi: '' hasPermi: ''
}) })
} }
export function mainListPlanCheckQualityReportBtn(option:any) {
return __defaultBtnOption(option,{
label: t(`ts.查看质检报告`).replace('ts.', ''),
name: 'mainPlanCheckQualityReport',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-计划流程-提交审批按钮 // 主列表-计划流程-提交审批按钮
export function mainListPlanSubBtn(option:any) { export function mainListPlanSubBtn(option:any) {

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

@ -0,0 +1,147 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const BasicSpotCheckSelectSetRules = reactive({
name: [required],
describing: [required],
concurrencyStamp: [required],
})
export const BasicSpotCheckSelectSet = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '选择集名称',
field: 'name',
sort: 'custom',
isSearch: true,
},
{
label: '描述',
field: 'describing',
sort: 'custom',
isSearch: true,
},
{
label: '项编号',
field: 'itemCode',
sort: 'custom',
isSearch: true,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '部门id',
field: 'departmentCode',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: true,
isTableForm: false,
isForm: false,
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '删除人id',
field: 'deleterId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

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

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

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

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

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

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

@ -59,8 +59,8 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { DocumentType,DocumentTypeRules } from './basicDocumentType.data' import { DocumentType,DocumentTypeRules } from './documentType.data'
import * as DocumentTypeApi from '@/api/eam/basicDocumentType' import * as DocumentTypeApi from '@/api/eam/documentType'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'

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

@ -0,0 +1,140 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const DocumentTypeSelectSetRules = reactive({
name: [required],
itemCode: [required],
})
export const DocumentTypeSelectSet = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '选择集名称',
field: 'name',
sort: 'custom',
isSearch: true,
},
{
label: '项编号',
field: 'itemCode',
sort: 'custom',
isSearch: true,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '部门id',
field: 'departmentCode',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: true,
isTableForm: false,
isForm: false,
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '删除人id',
field: 'deleterId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

300
src/views/eam/documentTypeSelectSet/index.vue

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

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

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

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

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

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

@ -0,0 +1,141 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const InspectionItemSelectSetRules = reactive({
name: [required],
itemCode: [required],
concurrencyStamp: [required],
})
export const InspectionItemSelectSet = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '选择集名称',
field: 'name',
sort: 'custom',
isSearch: true,
},
{
label: '项编号',
field: 'itemCode',
sort: 'custom',
isSearch: true,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '部门id',
field: 'departmentCode',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: true,
isTableForm: false,
isForm: false,
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '删除人id',
field: 'deleterId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -7,6 +7,23 @@
:rules="formRules" :rules="formRules"
label-width="80px" label-width="80px"
> >
<el-row>
<el-col :span="12">
<el-form-item v-if="formData.id === undefined" label="用户账号" prop="username">
<el-input v-model="formData.username" placeholder="请输入用户账号" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="formData.id === undefined" label="用户密码" prop="password">
<el-input
v-model="formData.password"
placeholder="请输入用户密码"
show-password
type="password"
/>
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="用户昵称" prop="nickname"> <el-form-item label="用户昵称" prop="nickname">
@ -38,23 +55,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="12">
<el-form-item v-if="formData.id === undefined" label="用户名称" prop="username">
<el-input v-model="formData.username" placeholder="请输入用户名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="formData.id === undefined" label="用户密码" prop="password">
<el-input
v-model="formData.password"
placeholder="请输入用户密码"
show-password
type="password"
/>
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="用户性别"> <el-form-item label="用户性别">

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

@ -54,6 +54,7 @@ export const InterfaceInfo = useCrudSchemas(reactive<CrudSchema[]>([
label: '业务编号', label: '业务编号',
field: 'businessNumber', field: 'businessNumber',
sort: 'custom', sort: 'custom',
isSearch: true,
table: { table: {
width: 180, width: 180,
}, },
@ -62,6 +63,7 @@ export const InterfaceInfo = useCrudSchemas(reactive<CrudSchema[]>([
label: '业务ID', label: '业务ID',
field: 'businessId', field: 'businessId',
sort: 'custom', sort: 'custom',
isSearch: true,
table: { table: {
width: 180, width: 180,
}, },

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

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

244
src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/index.vue

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

204
src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/relegateRecordMain.data.ts

@ -0,0 +1,204 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const RelegateRecordMainRules = reactive({
departmentCode: [required],
interfaceType: [required],
number: [required],
businessType: [required],
})
export const RelegateRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false,
},
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
isSearch: true,
},
{
label: '执行时间',
field: 'executeTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '生效日期',
field: 'activeDate',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isSearch: true,
},
{
label: '申请时间',
field: 'requestTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '截止时间',
field: 'dueTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isSearch: true,
},
{
label: '用户组',
field: 'userGroupCode',
sort: 'custom',
isSearch: true,
},
{
label: '接口类型',
field: 'interfaceType',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
},
},
{
label: '代码',
field: 'code',
sort: 'custom',
isSearch: true,
},
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isSearch: true,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: true,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

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

@ -0,0 +1,396 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="[...RelegateRequestMain.allSchemas.searchSchema, ...RelegateRequestDetail.allSchemas.searchSchema]"
@search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick"
:allSchemas="RelegateRequestMain.allSchemas" :detailAllSchemas="RelegateRequestDetail.allSchemas" />
<!-- 列表 -->
<ContentWrap>
<Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort">
<template #number="{ row }">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row, $index }">
<ButtonBase :Butttondata="butttondata(row, $index)" @button-base-click="buttonTableClick($event, row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm ref="basicFormRef"
:isOpenSearchTable="false"
fieldTableColumn="itemCode"
@success="getList"
:rules="RelegateRequestMainRules"
:formAllSchemas="RelegateRequestMain.allSchemas"
:tableAllSchemas="RelegateRequestDetail.allSchemas"
:tableFormRules="RelegateRequestDetailRules"
:tableData="tableData"
:apiUpdate="RelegateRequestMainApi.updateRelegateRequestMain"
:apiCreate="RelegateRequestMainApi.createRelegateRequestMain"
:isBusiness="true" fromeWhere="RelegateRequestMain"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
:isShowButton=isShowButton />
<!-- 详情 -->
<Detail ref="detailRef"
:isBasic="false"
:allSchemas="RelegateRequestMain.allSchemas"
:detailAllSchemas="RelegateRequestDetail.allSchemas"
:detailAllSchemasRules="RelegateRequestDetailRules"
:apiCreate="RelegateRequestDetailApi.createRelegateRequestDetail"
:apiUpdate="RelegateRequestDetailApi.updateRelegateRequestDetail"
:apiPage="RelegateRequestDetailApi.getRelegateRequestDetailPage"
:apiDelete="RelegateRequestDetailApi.deleteRelegateRequestDetail"
fromeWhere="RelegateRequestMain"
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailButtonIsShowAdd="true"
:detailButtonIsShowDelete="true" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/relegate-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { RelegateRequestMain, RelegateRequestMainRules, RelegateRequestDetail, RelegateRequestDetailRules } from './relegateRequestMain.data'
import * as RelegateRequestMainApi from '@/api/wms/relegateRequestMain'
import * as RelegateRequestDetailApi from '@/api/wms/relegateRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'RelegateRequestMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
const businessType = 'relegate'
routeName.value = route.name
const tableColumns = ref([...RelegateRequestMain.allSchemas.tableColumns, ...RelegateRequestDetail.allSchemas.tableMainColumns])
const isShowButton = ref(true)
// //
const trueFalse = ref(false)
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
if (type == 'tableForm') {
if (formField == 'itemCode') {
row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
row['qty'] = val[0]['qty']
row['fromBatch'] = val[0]['batch']
row['fromPackingNumber'] = val[0]['packingNumber']
row['toBatch'] = val[0]['batch']
row['toPackingNumber'] = val[0]['packingNumber']
row['fromLocationCode'] = val[0]['locationCode']
row['fromInventoryStatus'] = val[0]['inventoryStatus']
} else if (formField == 'downItemCode') {
row['downItemCode'] = val[0]['code']
} else if (formField == 'toLocationCode') {
row['toLocationCode'] = val[0]['code']
} else {
row[formField] = val[0][searchField]
}
} else {
const setV = {}
setV[formField] = val[0][searchField]
if (formField == 'fromWarehouseCode') {
setV['fromWarehouseCode'] = val[0]['code']
}
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
// tableform
RelegateRequestDetail.allSchemas.tableFormColumns.map(item => {
if (item.field == 'itemCode') {
item.tableForm.searchCondition = [
{
key: 'businessType',
value: businessType,
isMainValue: false
}
]
item.form.componentProps.searchCondition = [
{
key: 'businessType',
value: businessType,
isMainValue: false
}
]
}
if (item.field == "toLocationCode") {
item.tableForm.searchCondition = [
{
key: 'businessType',
value: businessType,
isMainValue: false
}]
item.form.componentProps.searchCondition = [
{
key: 'businessType',
value: businessType,
isMainValue: false
}]
item.tableForm.searchCondition = [
{
key: 'businessType',
value: businessType,
isMainValue: false
}]
item.form.componentProps.searchCondition = [
{
key: 'businessType',
value: businessType,
isMainValue: false
}]
}
})
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: RelegateRequestDetailApi.getRelegateRequestDetailPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({ hasPermi: 'wms:relegate-request-main:create' }), //
defaultButtons.defaultImportBtn({ hasPermi: 'wms:relegate-request-main:import' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:relegate-request-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = (row, $index) => {
const findIndex = row['masterId'] ? tableObject.tableList.findIndex(item => item['masterId'] == row['masterId']) : -1
if (findIndex > 0 && findIndex < $index) {
return []
}
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['2','3','4','6']),hasPermi:'wms:relegate-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:relegate-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:relegate-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:relegate-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:relegate-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:relegate-request-main:handle'}), //
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:relegate-request-main:update' }), //
defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:relegate-request-main:delete' }), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
//true0
const flag = ref(false)
// form
const submitForm = async (formType, data) => {
data.subList = tableData.value //
let isExist = false
tableData.value.forEach(item => {
let rs = tableData.value.filter(filterItem => (filterItem.itemCode == item.itemCode))
if (rs.length > 1) isExist = true
})
if (isExist) {
basicFormRef.value.formLoading = false
return message.warning('物料代码重复')
}
data.subList.forEach(obj => {
if (obj.qty == 0) {
message.warning(`数量不能为0!`)
flag.value = true
return;
}
})
if (flag.value) {
basicFormRef.value.formLoading = false
return
}
try {
if (formType === 'create') {
if (tableData.value.length <= 0) {
message.warning(`子表明细不能为空!`)
flag.value = true
basicFormRef.value.formLoading = false
return;
}
await RelegateRequestMainApi.createRelegateRequestMain(data)
message.success(t('common.createSuccess'))
} else {
await RelegateRequestMainApi.updateRelegateRequestMain(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicRelegateRequestMain')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await RelegateRequestMainApi.deleteRelegateRequestMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch { }
}
/**
* tableForm方法
*/
const tableFormKeys = {}
RelegateRequestDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await RelegateRequestMainApi.exportRelegateRequestMain(tableObject.params)
download.excel(data, '物料降级申请主.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '物料降级申请主导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await RelegateRequestMainApi.importTemplate()
})
</script>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -29,7 +29,7 @@
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #number="{row}"> <template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.number)"> <el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
@ -54,6 +54,8 @@
fromeWhere="ContainerMainRequest" fromeWhere="ContainerMainRequest"
@handleAddTable="handleAddTable" @handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
:isShowButton = isShowButton :isShowButton = isShowButton
@ -409,7 +411,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => { const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1) tableData.value.splice(index, 1)
} }
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//true0 //true0
const flag = ref() const flag = ref()

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

6
src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue

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

5
src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue

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

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

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

5
src/views/wms/productionManage/offlinesettlement/offlinesettlementRequestMain/index.vue

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

6
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue

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

5
src/views/wms/productionManage/productionplan/productionMain/index.vue

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

5
src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue

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

6
src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue

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

5
src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue

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

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

Loading…
Cancel
Save