Browse Source

解决冲突

master_hella_20240701
ljlong_2630 6 months ago
parent
commit
c92df40ffe
  1. 2
      README.md
  2. 64
      src/api/eam/equipmentMaintenanceDetail/index.ts
  3. 11
      src/api/eam/equipmentMaintenanceMain/index.ts
  4. 9
      src/api/wms/location/index.ts
  5. 61
      src/api/wms/processproductionRecordDetail/index.ts
  6. 57
      src/api/wms/processproductionRecordMain/index.ts
  7. 62
      src/api/wms/processproductionRequestDetail/index.ts
  8. 57
      src/api/wms/processproductionRequestMain/index.ts
  9. 5
      src/components/SearchTable/src/SearchTable.vue
  10. 3
      src/utils/dict.ts
  11. 13
      src/utils/disposition/defaultButtons.ts
  12. 2
      src/views/eam/basicMaintenanceOption/basicMaintenanceOption.data.ts
  13. 303
      src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts
  14. 172
      src/views/eam/equipmentMaintenanceMain/index.vue
  15. 2
      src/views/eam/maintenance/index.vue
  16. 65
      src/views/eam/maintenance/maintenance.data.ts
  17. 28
      src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue
  18. 2
      src/views/wms/countManage/count/countJobMain/index.vue
  19. 2
      src/views/wms/countManage/count/countPlanMain/index.vue
  20. 2
      src/views/wms/countManage/count/countRecordMain/index.vue
  21. 2
      src/views/wms/countManage/count/countRequestMain/index.vue
  22. 2
      src/views/wms/countManage/countadjust/countadjustRecordMain/index.vue
  23. 2
      src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue
  24. 2
      src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/index.vue
  25. 2
      src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue
  26. 2
      src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue
  27. 2
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/index.vue
  28. 2
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue
  29. 2
      src/views/wms/deliversettlementManage/customersettle/customersettleRecordMain/index.vue
  30. 2
      src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue
  31. 2
      src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue
  32. 2
      src/views/wms/deliversettlementManage/deliver/deliverRecordMain/index.vue
  33. 2
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue
  34. 2
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue
  35. 2
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue
  36. 2
      src/views/wms/deliversettlementManage/stockup/stockupMainJob/index.vue
  37. 2
      src/views/wms/deliversettlementManage/stockup/stockupMainRecord/index.vue
  38. 44
      src/views/wms/deliversettlementManage/stockup/stockupMainRecord/stockupMainRecord.data.ts
  39. 2
      src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue
  40. 2
      src/views/wms/inventoryManage/balance/balance.data.ts
  41. 2
      src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue
  42. 2
      src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue
  43. 2
      src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue
  44. 2
      src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue
  45. 2
      src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRecordMain/index.vue
  46. 2
      src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue
  47. 2
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/index.vue
  48. 2
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/index.vue
  49. 2
      src/views/wms/inventoryjobManage/scrap/scrapJobMain/index.vue
  50. 2
      src/views/wms/inventoryjobManage/scrap/scrapRecordMain/index.vue
  51. 2
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
  52. 2
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/index.vue
  53. 2
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/index.vue
  54. 2
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue
  55. 2
      src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/index.vue
  56. 2
      src/views/wms/inventoryjobManage/transferissue/transferissueRecordMain/index.vue
  57. 2
      src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue
  58. 2
      src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/index.vue
  59. 2
      src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/index.vue
  60. 2
      src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue
  61. 2
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/index.vue
  62. 2
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/index.vue
  63. 2
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue
  64. 2
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/index.vue
  65. 2
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/index.vue
  66. 4
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
  67. 2
      src/views/wms/issueManage/issue/issueJobMain/index.vue
  68. 2
      src/views/wms/issueManage/issue/issueRecordMain/index.vue
  69. 2
      src/views/wms/issueManage/issue/issueRequestMain/index.vue
  70. 5
      src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts
  71. 2
      src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue
  72. 2
      src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/index.vue
  73. 2
      src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/index.vue
  74. 2
      src/views/wms/issueManage/productionreturn/productionreturnJobMain/index.vue
  75. 2
      src/views/wms/issueManage/productionreturn/productionreturnRecordMain/index.vue
  76. 2
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  77. 5
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
  78. 2
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue
  79. 2
      src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue
  80. 2
      src/views/wms/issueManage/repleinsh/repleinshRecordMain/index.vue
  81. 2
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue
  82. 11
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts
  83. 2
      src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/index.vue
  84. 2
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue
  85. 2
      src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue
  86. 2
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue
  87. 2
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue
  88. 2
      src/views/wms/productionManage/offlinesettlement/offlinesettlementRecordMain/index.vue
  89. 2
      src/views/wms/productionManage/offlinesettlement/offlinesettlementRequestMain/index.vue
  90. 286
      src/views/wms/productionManage/processproduction/processproductionRecord/index.vue
  91. 342
      src/views/wms/productionManage/processproduction/processproductionRecord/processproductionRecordMain.data.ts
  92. 286
      src/views/wms/productionManage/processproduction/processproductionRequest/index.vue
  93. 434
      src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts
  94. 2
      src/views/wms/productionManage/productdismantle/productdismantleJobMain/index.vue
  95. 2
      src/views/wms/productionManage/productdismantle/productdismantleRecordMain/index.vue
  96. 2
      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. 5
      src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue
  100. 5
      src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue

2
README.md

@ -81,7 +81,7 @@ PurchaseDetail:子表
3.2 在按钮回调中添加$index,固定的写死:
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
…下面是原有的按钮逻辑,不变

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

@ -0,0 +1,64 @@
import request from '@/config/axios'
export interface EquipmentMaintenanceDetailVO {
id: number
number: string
masterId: number
peoples: number
estimatedMinutes: number
actualMinutes: number
chargePeoples: string
completionTime: Date
uncompletedCause: string
result: string
contents: string
equipmentParts: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询设备保养工单子列表
export const getEquipmentMaintenanceDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/equipment-maintenance-detail/senior', data })
} else {
return await request.get({ url: `/eam/equipment-maintenance-detail/page`, params })
}
}
// 查询设备保养工单子详情
export const getEquipmentMaintenanceDetail = async (id: number) => {
return await request.get({ url: `/eam/equipment-maintenance-detail/get?id=` + id })
}
// 新增设备保养工单子
export const createEquipmentMaintenanceDetail = async (data: EquipmentMaintenanceDetailVO) => {
return await request.post({ url: `/eam/equipment-maintenance-detail/create`, data })
}
// 修改设备保养工单子
export const updateEquipmentMaintenanceDetail = async (data: EquipmentMaintenanceDetailVO) => {
return await request.put({ url: `/eam/equipment-maintenance-detail/update`, data })
}
// 删除设备保养工单子
export const deleteEquipmentMaintenanceDetail = async (id: number) => {
return await request.delete({ url: `/eam/equipment-maintenance-detail/delete?id=` + id })
}
// 导出设备保养工单子 Excel
export const exportEquipmentMaintenanceDetail = async (params) => {
return await request.download({ url: `/eam/equipment-maintenance-detail/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/equipment-maintenance-detail/get-import-template' })
}

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

@ -1,4 +1,5 @@
import request from '@/config/axios'
import {EquipmentMainPartVO} from "@/api/eam/equipmentMainPart";
export interface EquipmentMaintenanceMainVO {
id: number
@ -72,3 +73,13 @@ export const exportEquipmentMaintenanceMain = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/eam/equipment-maintenance-main/get-import-template' })
}
// 启用 / 禁用
export const updateEnableCode = async (data: EquipmentMainPartVO) => {
return await request.post({ url: `/eam/equipment-maintenance-main/ables` , data })
}
// 执行保养工单
export const executeMaintenanceOrder = async (data: EquipmentMainPartVO) => {
return await request.post({ url: `/eam/equipment-maintenance-main/execute`, data })
}

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

@ -34,6 +34,15 @@ export const getLocationPage = async (params) => {
return await request.get({ url: `/wms/location/page`, params })
}
}
export const getLocationPageRepleinsh = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/location/senior', data })
} else {
return await request.get({ url: `/wms/location/pageForRepleinsh`, params })
}
}
// 查询库位所有列表
export const getLocationList = async (params) => {
return await request.get({ url: `/wms/location/list`, params })

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

@ -0,0 +1,61 @@
import request from '@/config/axios'
export interface ProcessproductionRecordDetailVO {
masterId: number
number: string
processCode: string
productionLine: string
locationCode: string
componentItemCode: string
batch: string
componentItemcodeQty: number
effectiveDate: Date
available: string
remark: string
deletionTime: Date
deleterId: string
extraProperties: string
concurrencyStamp: number
siteId: string
}
// 查询工序报产记录子列表
export const getProcessproductionRecordDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/processproduction-record-detail/senior', data })
} else {
return await request.get({ url: `/wms/processproduction-record-detail/page`, params })
}
}
// 查询工序报产记录子详情
export const getProcessproductionRecordDetail = async (id: number) => {
return await request.get({ url: `/wms/processproduction-record-detail/get?id=` + id })
}
// 新增工序报产记录子
export const createProcessproductionRecordDetail = async (data: ProcessproductionRecordDetailVO) => {
return await request.post({ url: `/wms/processproduction-record-detail/create`, data })
}
// 修改工序报产记录子
export const updateProcessproductionRecordDetail = async (data: ProcessproductionRecordDetailVO) => {
return await request.put({ url: `/wms/processproduction-record-detail/update`, data })
}
// 删除工序报产记录子
export const deleteProcessproductionRecordDetail = async (id: number) => {
return await request.delete({ url: `/wms/processproduction-record-detail/delete?id=` + id })
}
// 导出工序报产记录子 Excel
export const exportProcessproductionRecordDetail = async (params) => {
return await request.download({ url: `/wms/processproduction-record-detail/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/processproduction-record-detail/get-import-template' })
}

57
src/api/wms/processproductionRecordMain/index.ts

@ -0,0 +1,57 @@
import request from '@/config/axios'
export interface ProcessproductionRecordMainVO {
number: string
requestNumber: string
itemCode: string
completedQuantity: number
scrapQuantity: number
available: string
remark: string
deletionTime: Date
deleterId: string
extraProperties: string
concurrencyStamp: number
siteId: string
}
// 查询工序报产记录主列表
export const getProcessproductionRecordMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/processproduction-record-main/senior', data })
} else {
return await request.get({ url: `/wms/processproduction-record-main/page`, params })
}
}
// 查询工序报产记录主详情
export const getProcessproductionRecordMain = async (id: number) => {
return await request.get({ url: `/wms/processproduction-record-main/get?id=` + id })
}
// 新增工序报产记录主
export const createProcessproductionRecordMain = async (data: ProcessproductionRecordMainVO) => {
return await request.post({ url: `/wms/processproduction-record-main/create`, data })
}
// 修改工序报产记录主
export const updateProcessproductionRecordMain = async (data: ProcessproductionRecordMainVO) => {
return await request.put({ url: `/wms/processproduction-record-main/update`, data })
}
// 删除工序报产记录主
export const deleteProcessproductionRecordMain = async (id: number) => {
return await request.delete({ url: `/wms/processproduction-record-main/delete?id=` + id })
}
// 导出工序报产记录主 Excel
export const exportProcessproductionRecordMain = async (params) => {
return await request.download({ url: `/wms/processproduction-record-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/processproduction-record-main/get-import-template' })
}

62
src/api/wms/processproductionRequestDetail/index.ts

@ -0,0 +1,62 @@
import request from '@/config/axios'
export interface ProcessproductionRequestDetailVO {
id: number
masterId: number
number: string
processCode: string
productionLine: string
locationCode: string
componentItemCode: string
batch: string
componentItemcodeQty: number
effectiveDate: Date
available: string
remark: string
deletionTime: Date
deleterId: string
extraProperties: string
concurrencyStamp: number
siteId: string
}
// 查询工序报产申请子列表
export const getProcessproductionRequestDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/processproduction-request-detail/senior', data })
} else {
return await request.get({ url: `/wms/processproduction-request-detail/page`, params })
}
}
// 查询工序报产申请子详情
export const getProcessproductionRequestDetail = async (id: number) => {
return await request.get({ url: `/wms/processproduction-request-detail/get?id=` + id })
}
// 新增工序报产申请子
export const createProcessproductionRequestDetail = async (data: ProcessproductionRequestDetailVO) => {
return await request.post({ url: `/wms/processproduction-request-detail/create`, data })
}
// 修改工序报产申请子
export const updateProcessproductionRequestDetail = async (data: ProcessproductionRequestDetailVO) => {
return await request.put({ url: `/wms/processproduction-request-detail/update`, data })
}
// 删除工序报产申请子
export const deleteProcessproductionRequestDetail = async (id: number) => {
return await request.delete({ url: `/wms/processproduction-request-detail/delete?id=` + id })
}
// 导出工序报产申请子 Excel
export const exportProcessproductionRequestDetail = async (params) => {
return await request.download({ url: `/wms/processproduction-request-detail/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/processproduction-request-detail/get-import-template' })
}

57
src/api/wms/processproductionRequestMain/index.ts

@ -0,0 +1,57 @@
import request from '@/config/axios'
export interface ProcessproductionRequestMainVO {
id: number
number: string
itemCode: string
completedQuantity: number
scrapQuantity: number
available: string
remark: string
deletionTime: Date
deleterId: string
extraProperties: string
concurrencyStamp: number
siteId: string
}
// 查询工序报产申请主列表
export const getProcessproductionRequestMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/processproduction-request-main/senior', data })
} else {
return await request.get({ url: `/wms/processproduction-request-main/page`, params })
}
}
// 查询工序报产申请主详情
export const getProcessproductionRequestMain = async (id: number) => {
return await request.get({ url: `/wms/processproduction-request-main/get?id=` + id })
}
// 新增工序报产申请主
export const createProcessproductionRequestMain = async (data: ProcessproductionRequestMainVO) => {
return await request.post({ url: `/wms/processproduction-request-main/create`, data })
}
// 修改工序报产申请主
export const updateProcessproductionRequestMain = async (data: ProcessproductionRequestMainVO) => {
return await request.put({ url: `/wms/processproduction-request-main/update`, data })
}
// 删除工序报产申请主
export const deleteProcessproductionRequestMain = async (id: number) => {
return await request.delete({ url: `/wms/processproduction-request-main/delete?id=` + id })
}
// 导出工序报产申请主 Excel
export const exportProcessproductionRequestMain = async (params) => {
return await request.download({ url: `/wms/processproduction-request-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/processproduction-request-main/get-import-template' })
}

5
src/components/SearchTable/src/SearchTable.vue

@ -159,12 +159,13 @@ const searchFormClick = (searchData) => {
if (searchConditionRef.value.filters) {
searchData.filters = searchConditionRef.value.filters
} else {
searchData.filters = []
Object.keys(searchConditionRef.value).forEach(key => {
searchData.filters = [{
searchData.filters.push({
action: "==",
column: key,
value: searchConditionRef.value[key]
}]
})
});
}
}

3
src/utils/dict.ts

@ -348,10 +348,11 @@ export enum DICT_TYPE {
SUBJECT = 'subject', //科目
REGION = 'region', //区域
PART_CLASS = 'part_class', //备件分类
MAINTENANCE_CYCLE = 'maintenance_cycle', // 保养周期
FAILURE_DEGREE = 'failure_degree', // 紧急程度
FAILURE_REASON = 'failure_reason', //故障类型
REPAIR_DEGREE = 'repair_degree', //
REPAIR_LEVEL = 'repair_level', //维修级别
IS_COMPLETED = 'is_completed', //是否完成
MAINTENANCE_CYCLE ='maintenance_cycle', // 保养周期
EAM_ORDER_STATUS = 'eam_order_status'
}

13
src/utils/disposition/defaultButtons.ts

@ -325,6 +325,19 @@ export function mainListReceiveBtn(option:any) {
})
}
// 主列表-执行按钮
export function mainListExecuteBtn(option:any) {
return __defaultBtnOption(option,{
label: t(`ts.执行`).replace('ts.', ''),
name: 'execute',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-完成按钮
export function mainListFinishBtn(option:any) {
return __defaultBtnOption(option,{

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

@ -4,7 +4,7 @@ import {
BasicMaintenanceItemSelectSet
} from "@/views/eam/maintenanceItemSelectSet/maintenanceItemSelectSet.data";
import * as ItemApi from "@/api/eam/maintenanceItemSelectSet";
import {getBasicMaintenanceItemSelectSetPage} from "@/api/eam/maintenanceItemSelectSet";
// 表单校验
export const BasicMaintenanceOptionRules = reactive({

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

@ -1,5 +1,9 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data";
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts";
import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data";
import * as WorkshopApi from "@/api/wms/workshop";
// 表单校验
export const EquipmentMaintenanceMainRules = reactive({
@ -8,7 +12,6 @@ export const EquipmentMaintenanceMainRules = reactive({
planNumber: [required],
status: [required],
factoryAreaCode: [required],
concurrencyStamp: [required],
})
export const EquipmentMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
@ -25,6 +28,7 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '保养工单编号',
field: 'number',
sort: 'custom',
isForm: false,
isSearch: true,
},
{
@ -34,16 +38,37 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
},
{
label: '设备编号',
field: 'equipmentCode',
label: '设备类别',
field: 'type',
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string',
sort: 'custom',
isSearch: true,
},
{
label: '设备分类',
field: 'type',
label: '设备编号',
field: 'equipmentCode',
sort: 'custom',
isSearch: true,
isForm: true,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '设备信息', // 查询弹窗标题
searchListPlaceholder: '请选择 设备编号', // 输入框占位文本
searchAllSchemas: EquipmentAccounts.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段
searchPage: EquipmentItemApi.getEquipmentAccountsPage, // 查询弹窗所需分页方法
multiple:true,
searchCondition: [{
key: 'status',
value: 'NORMAL',
action: '==',
isSearch: true,
isMainValue: false
}]
}
}
},
{
label: '班次枚举',
@ -74,29 +99,22 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'times',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '验证人',
field: 'verifyer',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '验证内容',
field: 'verifyContent',
sort: 'custom',
isSearch: true,
form: {
component: 'Editor',
componentProps: {
valueHtml: '',
height: 200
}
},
},
{
label: '验证时间',
@ -125,10 +143,6 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'maintenancer',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '保养人联系电话',
@ -187,25 +201,44 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
},
},
{
label: '流程状态枚举',
label: '流程状态',
field: 'status',
sort: 'custom',
isSearch: true,
form: {
component: 'Radio'
},
dictType: DICT_TYPE.EAM_ORDER_STATUS,
dictClass: 'string',
},
{
label: '所属厂区编号',
field: 'factoryAreaCode',
sort: 'custom',
isSearch: true,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '车间编号',
field: 'workshopCode',
sort: 'custom',
isSearch: true,
required: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '车间', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '车间信息', // 查询弹窗标题
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
},
{
label: '工段编号',
@ -258,6 +291,226 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'available',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
},
{
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'
}
}
]))
export const EquipmentMaintenanceDetailRules = reactive({
number: [required],
contents: [required],
})
export const EquipmentMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '保养工单号',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '主表id',
field: 'masterId',
sort: 'custom',
isSearch: true,
},
{
label: '人数',
field: 'peoples',
sort: 'custom',
isSearch: true,
},
{
label: '预计分钟',
field: 'estimatedMinutes',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '实际分钟',
field: 'actualMinutes',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '责任人多选',
field: 'chargePeoples',
sort: 'custom',
isSearch: true,
},
{
label: '完成时间',
field: 'completionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '未完成原因',
field: 'uncompletedCause',
sort: 'custom',
isSearch: true,
},
{
label: '结果枚举',
field: 'result',
sort: 'custom',
isSearch: true,
},
{
label: '保养名称',
field: 'name',
sort: 'custom',
isSearch: true,
},
{
label: '保养内容',
field: 'content',
sort: 'custom',
isSearch: true,
},
{
label: '保养部位',
field: 'equipmentParts',
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',
isSearch: true,
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
},
{
label: '删除时间',

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

@ -27,13 +27,13 @@
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
@ -48,10 +48,18 @@
:apiCreate="EquipmentMaintenanceMainApi.createEquipmentMaintenanceMain"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
@onChange="onChange"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="EquipmentMaintenanceMain.allSchemas" />
<Detail ref="detailRef"
:isBasic="false"
:allSchemas="EquipmentMaintenanceMain.allSchemas"
:detailAllSchemas="EquipmentMaintenanceDetail.allSchemas"
:apiPage="EquipmentMaintenanceDetailApi.getEquipmentMaintenanceDetailPage"
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/equipment-maintenance-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
@ -59,12 +67,20 @@
<script setup lang="ts">
import download from '@/utils/download'
import { EquipmentMaintenanceMain,EquipmentMaintenanceMainRules } from './equipmentMaintenanceMain.data'
import { EquipmentMaintenanceMain,EquipmentMaintenanceMainRules,EquipmentMaintenanceDetail } from './equipmentMaintenanceMain.data'
import * as EquipmentMaintenanceMainApi from '@/api/eam/equipmentMaintenanceMain'
import * as EquipmentMaintenanceDetailApi from '@/api/eam/equipmentMaintenanceDetail'
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 {Maintenance} from "@/views/eam/maintenance/maintenance.data";
import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data";
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts";
import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data";
import * as ToolItemApi from "@/api/eam/toolAccounts";
import * as ReworkBatchApi from "@/api/mes/reworkBatch";
import {mainListExecuteBtn} from "@/utils/disposition/defaultButtons";
defineOptions({ name: 'EquipmentMaintenanceMain' })
@ -131,11 +147,33 @@ const buttonBaseClick = (val, item) => {
}
}
const isShowMainButton = (row,val) => {
if (val.indexOf(row.available) > -1) {
return false
} else {
return true
}
}
const isShowStatusButton = (row,val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = [
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentMaintenanceMain:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentMaintenanceMain:delete'}), //
]
//defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentMaintenanceMain:delete'}), //
defaultButtons.mainListReceiveBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:maintenance:update'}), //
defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:maintenance:update'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:maintenance:update'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:maintenance:update'}),
]
}
// -
const buttonTableClick = async (val, row) => {
@ -143,12 +181,30 @@ const buttonTableClick = async (val, row) => {
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'receive') { //
handleReceive(row.id)
} else if (val == 'execute') { //
handleExecute(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
if(type == "create"){
EquipmentMaintenanceMain.allSchemas.formSchema.forEach((item) => {
if(item.field == 'status'){
item.value = '0';
item.componentProps.disabled = true
}
})
}else{
EquipmentMaintenanceMain.allSchemas.formSchema.forEach((item) => {
if(item.field == 'status'){
item.componentProps.disabled = true
}
})
}
basicFormRef.value.open(type, row)
}
@ -195,6 +251,104 @@ const handleDelete = async (id: number) => {
} catch {}
}
/** 领取按钮操作 */
const handleReceive = async (id: number) => {
try {
//
await message.delConfirm('是否领取所选中任务?');
const params = ref({
id: '',
status:'',
})
params.value.id = id
params.value.status = '4'
//
await EquipmentMaintenanceMainApi.executeMaintenanceOrder(params.value)
message.success(t('领取成功'))
//
await getList()
} catch {}
}
/** 执行按钮操作 */
const handleExecute = async (id: number) => {
try {
//
await message.delConfirm('是否执行所选中任务?');
const params = ref({
id: '',
status:'',
})
params.value.id = id
params.value.status = '5'
//
await EquipmentMaintenanceMainApi.executeMaintenanceOrder(params.value)
message.success(t('执行成功'))
//
await getList()
} catch {}
}
/** 启用 */
const handleEnable = async (id: number) => {
try {
const params = ref({
id: '',
available:'',
})
params.value.id = id
params.value.available = 'TRUE'
await EquipmentMaintenanceMainApi.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 EquipmentMaintenanceMainApi.updateEnableCode(params.value)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
const onChange = (field, item) => {
console.log(field)
console.log(item)
//
if(field == 'type' && item == 'DEVICE'){
Maintenance.allSchemas.formSchema.forEach((items) => {
if (items.field == 'equipmentCode') {
basicFormRef.value.formRef.setValues({
equipmentCode:''
})
items.componentProps.searchAllSchemas = EquipmentAccounts.allSchemas
items.componentProps.searchPage = EquipmentItemApi.getEquipmentAccountsPage
}
})
}
//
if(field == 'type' && item == 'EQUIPMENT'){
Maintenance.allSchemas.formSchema.forEach((items) => {
if (items.field == 'equipmentCode') {
basicFormRef.value.formRef.setValues({
equipmentCode:''
})
items.componentProps.searchAllSchemas = ToolAccounts.allSchemas
items.componentProps.searchPage = ToolItemApi.getToolAccountsPage
}
})
}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {

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

@ -248,8 +248,6 @@ const handleDisable = async (id: number) => {
}
const onChange = (field, item) => {
console.log(field)
console.log(item)
//
if(field == 'type' && item == 'DEVICE'){
Maintenance.allSchemas.formSchema.forEach((items) => {

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

@ -2,10 +2,13 @@ import type {CrudSchema} from '@/hooks/web/useCrudSchemas'
import {dateFormatter} from '@/utils/formatTime'
import { EquipmentAccounts } from "@/views/eam/equipmentAccounts/equipmentAccounts.data";
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts";
import { BasicMaintenanceOption } from "@/views/eam/basicMaintenanceOption/basicMaintenanceOption.data";
import * as MaintenanceOptionApi from "@/api/eam/basicMaintenanceOption";
import * as WorkshopApi from '@/api/wms/workshop'
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data'
// 表单校验
export const MaintenanceRules = reactive({
number: [required],
name: [required],
equipmentCode: [required],
optionCode: [required],
@ -29,6 +32,8 @@ export const Maintenance = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false,
isDetail:true,
},
{
label: '计划名称',
@ -74,6 +79,25 @@ export const Maintenance = useCrudSchemas(reactive<CrudSchema[]>([
field: 'optionCode',
sort: 'custom',
isSearch: true,
isForm: true,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '保养方案信息', // 查询弹窗标题
searchListPlaceholder: '请选择保养方案', // 输入框占位文本
searchAllSchemas: BasicMaintenanceOption.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段
searchPage: MaintenanceOptionApi.getBasicMaintenanceOptionPage, // 查询弹窗所需分页方法
multiple:true,
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
}]
}
}
},
{
label: '周期',
@ -145,13 +169,6 @@ export const Maintenance = useCrudSchemas(reactive<CrudSchema[]>([
field: 'approveContent',
sort: 'custom',
isSearch: true,
form: {
component: 'Editor',
componentProps: {
valueHtml: '',
height: 200
}
},
},
{
label: '审核时间',
@ -179,13 +196,19 @@ export const Maintenance = useCrudSchemas(reactive<CrudSchema[]>([
label: '自动审核',
field: 'autoExamine',
sort: 'custom',
isSearch: true,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '自动通过',
field: 'autoAgree',
sort: 'custom',
isSearch: true,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '直接生成记录',
@ -197,13 +220,33 @@ export const Maintenance = useCrudSchemas(reactive<CrudSchema[]>([
label: '所属厂区编号',
field: 'factoryAreaCode',
sort: 'custom',
isSearch: true,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '车间编号',
field: 'workshopCode',
sort: 'custom',
isSearch: true,
required: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '车间', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '车间信息', // 查询弹窗标题
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
},
{
label: '工段编号',

28
src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue

@ -255,8 +255,34 @@ const handleExport = async () => {
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
//
// const handlePoint = async (row) => {
// window.open(src.value+'&asn_number='+row.relateNumber)
// }
const labelType = ref('') //
const handlePoint = async (row) => {
window.open(src.value+'&asn_number='+row.relateNumber)
console.log(row.packingNumber,445555555555555);
PackageApi.getBalanceToPackage(row.relateNumber).then(res => {
console.log(777,res);
if (res.productionLineCode != null) {
labelType.value = 'zz'
} else {
labelType.value = 'cg'
}
PackageApi.batchPrintingLable((res.number)).then((resLable) =>{
console.log(159,resLable )
//
if (labelType.value == 'cg') {
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
console.log(159,resLable )
window.open(src.value+'&asn_number='+resLable)
} else {
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
window.open(src.value+'&asn_number='+resLable)
}
})
}).catch(err => {
console.log(err)
})
}
// form

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

@ -194,7 +194,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

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

@ -244,7 +244,7 @@ const isShowMainButton = (row, val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/countManage/count/countRecordMain/index.vue

@ -128,7 +128,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

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

@ -286,7 +286,7 @@ const searchTableRef = ref()
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/countManage/countadjust/countadjustRecordMain/index.vue

@ -128,7 +128,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return []

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

@ -189,7 +189,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/index.vue

@ -128,7 +128,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return []

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

@ -194,7 +194,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue

@ -181,7 +181,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/index.vue

@ -129,7 +129,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}else{
return [defaultButtons.mainListDocumentPrintBtn(null),] //

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

@ -281,7 +281,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/deliversettlementManage/customersettle/customersettleRecordMain/index.vue

@ -128,7 +128,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return []

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

@ -210,7 +210,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue

@ -202,7 +202,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/deliversettlementManage/deliver/deliverRecordMain/index.vue

@ -151,7 +151,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}else{
return [defaultButtons.mainListDocumentPrintBtn(null),] //

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

@ -271,7 +271,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

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

@ -274,7 +274,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

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

@ -216,7 +216,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

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

@ -182,7 +182,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

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

@ -129,7 +129,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return []

44
src/views/wms/deliversettlementManage/stockup/stockupMainRecord/stockupMainRecord.data.ts

@ -29,7 +29,7 @@ export const StockupMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
isSearch: true,
// isSearch: true,
table: {
width: 180
},
@ -39,7 +39,7 @@ export const StockupMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '任务单号',
field: 'jobNumber',
sort: 'custom',
isSearch: true,
// isSearch: true,
table: {
width: 180
},
@ -102,7 +102,7 @@ export const StockupMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '从库区代码范围',
field: 'fromAreaCodes',
sort: 'custom',
isSearch: true,
// isSearch: true,
isTable: false,
table: {
width: 180
@ -313,7 +313,7 @@ export const StockupDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
// isSearch: true,
table: {
width: 180
},
@ -343,7 +343,7 @@ export const StockupDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '从器具号',
field: 'fromContainerNumber',
sort: 'custom',
isSearch: true,
// isSearch: true,
table: {
width: 150
},
@ -371,7 +371,7 @@ export const StockupDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
isSearch: true,
// isSearch: true,
table: {
width: 150
},
@ -382,7 +382,7 @@ export const StockupDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '物品描述2',
field: 'itemDesc2',
sort: 'custom',
isSearch: true,
// isSearch: true,
table: {
width: 150
},
@ -393,7 +393,7 @@ export const StockupDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '项目代码',
field: 'projectCode',
sort: 'custom',
isSearch: true,
// isSearch: true,
table: {
width: 150
},
@ -403,7 +403,7 @@ export const StockupDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '数量',
field: 'qty',
sort: 'custom',
isSearch: true,
// isSearch: true,
table: {
width: 150
},
@ -435,7 +435,7 @@ export const StockupDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '从货主代码',
field: 'fromOwnerCode',
sort: 'custom',
isSearch: true,
// isSearch: true,
table: {
width: 150
},
@ -445,7 +445,7 @@ export const StockupDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '从库位',
field: 'fromLocationCode',
sort: 'custom',
isSearch: true,
// isSearch: true,
table: {
width: 150
},
@ -454,7 +454,7 @@ export const StockupDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '从库位组代码',
field: 'fromLocationGroupCode',
sort: 'custom',
isSearch: true,
// isSearch: true,
table: {
width: 150
},
@ -464,7 +464,7 @@ export const StockupDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '从库区代码',
field: 'fromAreaCode',
sort: 'custom',
isSearch: true,
// isSearch: true,
table: {
width: 150
},
@ -474,7 +474,7 @@ export const StockupDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '到货主代码',
field: 'toOwnerCode',
sort: 'custom',
isSearch: true,
// isSearch: true,
table: {
width: 150
},
@ -484,7 +484,7 @@ export const StockupDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '到器具号',
field: 'toContainerNumber',
sort: 'custom',
isSearch: true,
// isSearch: true,
table: {
width: 150
},
@ -494,7 +494,7 @@ export const StockupDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '到库位',
field: 'toLocationCode',
sort: 'custom',
isSearch: true,
// isSearch: true,
table: {
width: 150
},
@ -503,7 +503,7 @@ export const StockupDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '到库位组代码',
field: 'toLocationGroupCode',
sort: 'custom',
isSearch: true,
// isSearch: true,
hiddenInMain: true,
table: {
width: 150
@ -513,7 +513,7 @@ export const StockupDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '到库区代码',
field: 'toAreaCode',
sort: 'custom',
isSearch: true,
// isSearch: true,
hiddenInMain: true,
table: {
width: 150
@ -523,7 +523,7 @@ export const StockupDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '单价',
field: 'singlePrice',
sort: 'custom',
isSearch: true,
// isSearch: true,
hiddenInMain: true,
table: {
width: 150
@ -533,7 +533,7 @@ export const StockupDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '金额',
field: 'amount',
sort: 'custom',
isSearch: true,
// isSearch: true,
hiddenInMain: true,
table: {
width: 150
@ -577,7 +577,7 @@ export const StockupDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
// isSearch: true,
table: {
width: 180
},
@ -596,7 +596,7 @@ export const StockupDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
// isSearch: true,
hiddenInMain: true,
table: {
width: 150

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

@ -244,7 +244,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/inventoryManage/balance/balance.data.ts

@ -42,7 +42,7 @@ export const Balance = useCrudSchemas(reactive<CrudSchema[]>([
isTable:false
},
{
label: '数量',
label: '库存数量',
field: 'qty',
sort: 'custom',
table: {

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

@ -296,7 +296,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue

@ -172,7 +172,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

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

@ -248,7 +248,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

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

@ -271,7 +271,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRecordMain/index.vue

@ -128,7 +128,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return []

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

@ -190,7 +190,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/index.vue

@ -123,7 +123,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [defaultButtons.mainListPointBtn(null)] //

2
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/index.vue

@ -224,7 +224,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/inventoryjobManage/scrap/scrapJobMain/index.vue

@ -181,7 +181,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/inventoryjobManage/scrap/scrapRecordMain/index.vue

@ -128,7 +128,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return []

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

@ -214,7 +214,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/index.vue

@ -181,7 +181,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/index.vue

@ -128,7 +128,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return []

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

@ -203,7 +203,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/index.vue

@ -184,7 +184,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/inventoryjobManage/transferissue/transferissueRecordMain/index.vue

@ -128,7 +128,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return []

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

@ -209,7 +209,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/index.vue

@ -181,7 +181,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/index.vue

@ -128,7 +128,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return []

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

@ -202,7 +202,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/index.vue

@ -181,7 +181,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/index.vue

@ -128,7 +128,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return []

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

@ -225,7 +225,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/index.vue

@ -181,7 +181,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/index.vue

@ -128,7 +128,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return []

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

@ -311,7 +311,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [
@ -333,7 +333,7 @@ const butttondata = (row,$index) => {
hasPermi: '',
link: true, //
},
defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['3','8']) }), //
defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['3','6','8']) }), //
]
}

2
src/views/wms/issueManage/issue/issueJobMain/index.vue

@ -166,7 +166,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/issueManage/issue/issueRecordMain/index.vue

@ -128,7 +128,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return []

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

@ -198,7 +198,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

5
src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts

@ -691,6 +691,11 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key:'productionLineCode',
value:'productionLineCode',
message: '请填写生产线代码!',
isMainValue: true
}]
},
form: {

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

@ -239,7 +239,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/index.vue

@ -150,7 +150,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/index.vue

@ -128,7 +128,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return []

2
src/views/wms/issueManage/productionreturn/productionreturnJobMain/index.vue

@ -158,7 +158,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/issueManage/productionreturn/productionreturnRecordMain/index.vue

@ -128,7 +128,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return []

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

@ -315,7 +315,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

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

@ -652,6 +652,11 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
key: 'inventoryStatus',
value: 'OK',
isMainValue: false
},{
key: 'productionLineCode',
value: 'productionLineCode',
message: '请选择生产线信息!',
isMainValue: true
}]
},
},

2
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue

@ -291,7 +291,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue

@ -167,7 +167,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/issueManage/repleinsh/repleinshRecordMain/index.vue

@ -128,7 +128,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return []

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

@ -197,7 +197,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

11
src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts

@ -25,6 +25,7 @@ const queryParams = {
// 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user'
import { TableColumn } from '@/types/table'
import {getLocationPageRepleinsh} from "@/api/wms/location";
const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept
// id 转str 否则form回显匹配不到
@ -408,6 +409,7 @@ export const RepleinshRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '包装规格',
field: 'packUnit',
sort: 'custom',
isForm:false,
table: {
width: 150
},
@ -417,6 +419,7 @@ export const RepleinshRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '包装数量',
field: 'packQty',
sort: 'custom',
isForm:false,
table: {
width: 150
},
@ -484,7 +487,7 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchPage: LocationApi.getLocationPageRepleinsh, // 查询弹窗所需分页方法
searchCondition:[{
key: 'available',
value: 'TRUE',
@ -498,7 +501,7 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchPage: LocationApi.getLocationPageRepleinsh, // 查询弹窗所需分页方法
searchCondition:[{
key: 'available',
value: 'TRUE',
@ -526,6 +529,7 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTableForm: false,
isSearch: true,
sortTableDefault:5,
sortSearchDefault:3,
@ -559,6 +563,7 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTableForm: false,
isSearch: true,
},
{
@ -753,6 +758,7 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTableForm: false,
sortTableDefault:1,
},
{
@ -762,6 +768,7 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTableForm: false,
sortTableDefault:2,
},

2
src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/index.vue

@ -174,7 +174,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return []

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

@ -244,7 +244,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue

@ -234,7 +234,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue

@ -183,7 +183,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return []

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

@ -398,7 +398,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/productionManage/offlinesettlement/offlinesettlementRecordMain/index.vue

@ -128,7 +128,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return []

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

@ -202,7 +202,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

286
src/views/wms/productionManage/processproduction/processproductionRecord/index.vue

@ -0,0 +1,286 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ProcessproductionRecordMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ProcessproductionRecordMain.allSchemas"
:detailAllSchemas="ProcessproductionRecordDetail.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,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="ProcessproductionRecordMainRules"
:formAllSchemas="ProcessproductionRecordMain.allSchemas"
:apiUpdate="ProcessproductionRecordMainApi.updateProcessproductionRecordMain"
:apiCreate="ProcessproductionRecordMainApi.createProcessproductionRecordMain"
@searchTableSuccess="searchTableSuccess"
:isBusiness="true"
:tableAllSchemas="ProcessproductionRecordDetail.allSchemas"
:tableFormRules="ProcessproductionRecordDetailRules"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="ProcessproductionRecordMain.allSchemas"
:detailAllSchemas="ProcessproductionRecordDetail.allSchemas"
:detailAllSchemasRules="ProcessproductionRecordDetailRules"
:apiCreate="ProcessproductionRecordDetailApi.createProcessproductionRecordDetail"
:apiUpdate="ProcessproductionRecordDetailApi.updateProcessproductionRecordDetail"
:apiPage="ProcessproductionRecordDetailApi.getProcessproductionRecordDetailPage"
:apiDelete="ProcessproductionRecordDetailApi.deleteProcessproductionRecordDetail"
@searchTableSuccessDetail="searchTableSuccessDetail"
:buttondataTable="buttondataTable"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/request/processproduction-request-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { ProcessproductionRecordMain,ProcessproductionRecordMainRules,ProcessproductionRecordDetail,ProcessproductionRecordDetailRules } from './processproductionRecordMain.data'
import * as ProcessproductionRecordMainApi from '@/api/wms/processproductionRecordMain'
import * as ProcessproductionRecordDetailApi from '@/api/wms/processproductionRecordDetail'
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: 'ProcessproductionRequestMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref([...ProcessproductionRecordMain.allSchemas.tableColumns,...ProcessproductionRecordDetail.allSchemas.tableMainColumns])
//
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: ProcessproductionRecordDetailApi.getProcessproductionRecordDetailPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'wms:processproduction-record-main:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:processproduction-record-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:processproduction-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 = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [
defaultButtons.mainListEditBtn({hasPermi:'wms:processproduction-record-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:processproduction-record-main:delete'}), //
]
}
const buttondataTable = ref()
// -
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 =ProcessproductionRecordMain.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 ProcessproductionRecordMainApi.createProcessproductionRecordMain(data)
message.success(t('common.createSuccess'))
} else {
await ProcessproductionRecordMainApi.updateProcessproductionRecordMain(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
//
const { wsCache } = useCache()
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue, 'basicProcessproductionRequestMain')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ProcessproductionRecordMainApi.deleteProcessproductionRecordMain(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 ProcessproductionRecordMainApi.exportProcessproductionRecordMain(tableObject.params)
download.excel(data, '工序报产申请主.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '工序报产申请主导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ProcessproductionRecordMainApi.importTemplate()
})
</script>

342
src/views/wms/productionManage/processproduction/processproductionRecord/processproductionRecordMain.data.ts

@ -0,0 +1,342 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { fa } from 'element-plus/es/locale'
export const ProcessproductionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '申请单据号',
field: 'requestNumber',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '完工数量',
field: 'completedQuantity',
sort: 'custom',
table: {
width: 150
},
},
{
label: '报废数量',
field: 'scrapQuantity',
sort: 'custom',
table: {
width: 150
},
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
table: {
width: 150
},
isTable:false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isTable: false,
table: {
width: 150
},
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
table: {
width: 150
},
isForm: false,
isTable:false,
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
table: {
width: 150
},
isTable: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '删除者ID',
field: 'deleterId',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
isTable: false,
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isSearch: false,
isTable: false,
table: {
width: 150
},
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable: false,
form: {
component: 'InputNumber',
value: 0
},
table: {
width: 150
},
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isTable: false,
isSearch: false,
},
{
label: '操作',
field: 'action',
isForm: false,
isTable: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 表单校验
export const ProcessproductionRecordMainRules = reactive({
available: [required],
})
export const ProcessproductionRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '主表ID',
field: 'masterId',
sort: 'custom',
isTable:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
},
{
label: '工序',
field: 'processCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '生产线',
field: 'productionLine',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库位代码',
field: 'locationCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '子物料代码',
field: 'componentItemCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
},
{
label: '子物料数量',
field: 'componentItemcodeQty',
sort: 'custom',
table: {
width: 150
},
},
{
label: '生效日期',
field: 'effectiveDate',
sort: 'custom',
formatter: dateFormatter,
table: {
width: 150
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
table: {
width: 150
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 150
},
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isTable: false,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '删除者ID',
field: 'deleterId',
sort: 'custom',
isSearch: false,
isTable: false,
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isSearch: false,
isTable: false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable: false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable: false,
},
{
label: '操作',
field: 'action',
isForm: false,
hiddenInMain:true,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 表单校验
export const ProcessproductionRecordDetailRules = reactive({
available: [required],
})

286
src/views/wms/productionManage/processproduction/processproductionRequest/index.vue

@ -0,0 +1,286 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ProcessproductionRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ProcessproductionRequestMain.allSchemas"
:detailAllSchemas="ProcessproductionRequestDetail.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,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="ProcessproductionRequestMainRules"
:formAllSchemas="ProcessproductionRequestMain.allSchemas"
:apiUpdate="ProcessproductionRequestMainApi.updateProcessproductionRequestMain"
:apiCreate="ProcessproductionRequestMainApi.createProcessproductionRequestMain"
@searchTableSuccess="searchTableSuccess"
:isBusiness="true"
:tableAllSchemas="ProcessproductionRequestDetail.allSchemas"
:tableFormRules="ProcessproductionRequestDetailRules"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="ProcessproductionRequestMain.allSchemas"
:detailAllSchemas="ProcessproductionRequestDetail.allSchemas"
:detailAllSchemasRules="ProcessproductionRequestDetailRules"
:apiCreate="ProcessproductionRequestDetailApi.createProcessproductionRequestDetail"
:apiUpdate="ProcessproductionRequestDetailApi.updateProcessproductionRequestDetail"
:apiPage="ProcessproductionRequestDetailApi.getProcessproductionRequestDetailPage"
:apiDelete="ProcessproductionRequestDetailApi.deleteProcessproductionRequestDetail"
@searchTableSuccessDetail="searchTableSuccessDetail"
:buttondataTable="buttondataTable"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/request/processproduction-request-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { ProcessproductionRequestMain,ProcessproductionRequestMainRules,ProcessproductionRequestDetail,ProcessproductionRequestDetailRules } from './processproductionRequestMain.data'
import * as ProcessproductionRequestMainApi from '@/api/wms/processproductionRequestMain'
import * as ProcessproductionRequestDetailApi from '@/api/wms/processproductionRequestDetail'
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: 'ProcessproductionRequestMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref([...ProcessproductionRequestMain.allSchemas.tableColumns,...ProcessproductionRequestDetail.allSchemas.tableMainColumns])
//
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: ProcessproductionRequestDetailApi.getProcessproductionRequestDetailPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:processproduction-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:processproduction-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:processproduction-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 butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [
defaultButtons.mainListEditBtn({hasPermi:'wms:processproduction-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:processproduction-request-main:delete'}), //
]
}
const buttondataTable = ref()
// -
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 =ProcessproductionRequestMain.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 ProcessproductionRequestMainApi.createProcessproductionRequestMain(data)
message.success(t('common.createSuccess'))
} else {
await ProcessproductionRequestMainApi.updateProcessproductionRequestMain(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
//
const { wsCache } = useCache()
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue, 'basicProcessproductionRequestMain')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ProcessproductionRequestMainApi.deleteProcessproductionRequestMain(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 ProcessproductionRequestMainApi.exportProcessproductionRequestMain(tableObject.params)
download.excel(data, '工序报产申请主.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '工序报产申请主导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ProcessproductionRequestMainApi.importTemplate()
})
</script>

434
src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts

@ -0,0 +1,434 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data'
import { fa } from 'element-plus/es/locale'
export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false,
isTable:false,
isTableForm:false,
},
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 150
},
isForm: false,
isSearch: true,
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '完工数量',
field: 'completedQuantity',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
},
},
},
{
label: '报废数量',
field: 'scrapQuantity',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
},
},
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
table: {
width: 150
},
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isTable:false,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
isTable:false,
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable:false,
isForm: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,
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isSearch: false,
isTable:false,
isForm: false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable:false,
isForm: false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isForm: false,
isTable:false,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 表单校验
export const ProcessproductionRequestMainRules = reactive({
itemCode: [{ required: true, message: '物料代码不能为空', trigger: 'change' }],
completedQuantity: [{ required: true, message: '完工数量不能为空', trigger: 'change' }],
scrapQuantity: [{ required: true, message: '报废数量不能为空', trigger: 'change' }],
available: [required],
concurrencyStamp: [required],
})
export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: false,
isTable:false,
isTableForm:false,
table: {
width: 150
},
hiddenInMain:true,
},
{
label: '生产线',
field: 'productionLine',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '生产线物料关系信息', // 查询弹窗标题
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'itemCode',
value:'itemCode',
message: '请选择物料代码!',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
}
},
tableForm:{
multiple:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '生产线物料关系信息', // 查询弹窗标题
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'itemCode',
value:'itemCode',
message: '请选择物料代码!',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
},
},
{
label: '工序',
field: 'processCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库位代码',
field: 'locationCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '子物料代码',
field: 'componentItemCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
},
{
label: '子物料数量',
field: 'componentItemcodeQty',
sort: 'custom',
table: {
width: 150
},
},
{
label: '生效日期',
field: 'effectiveDate',
sort: 'custom',
formatter: dateFormatter,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
table: {
width: 150
},
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isTable:false,
isTableForm:false,
table: {
width: 150
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
isTableForm: false,
table: {
width: 150
},
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable:false,
isTableForm: false,
table: {
width: 150
},
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,
isTableForm: false,
table: {
width: 150
},
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isSearch: false,
isTable:false,
isTableForm: false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable:false,
isTableForm: false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable:false,
isTableForm: false,
},
{
label: '主表ID',
field: 'masterId',
sort: 'custom',
hiddenInMain:true,
isTable:false,
isTableForm:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '操作',
field: 'action',
isForm: false,
hiddenInMain:true,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 表单校验
export const ProcessproductionRequestDetailRules = reactive({
})

2
src/views/wms/productionManage/productdismantle/productdismantleJobMain/index.vue

@ -181,7 +181,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

2
src/views/wms/productionManage/productdismantle/productdismantleRecordMain/index.vue

@ -198,7 +198,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return []

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

@ -351,7 +351,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [

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

@ -221,7 +221,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [
@ -508,6 +508,9 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
tableObject.params = {
planType: 'predict'
}
getList()
importTemplateData.templateUrl = await ProductionMainApi.importTemplate()
})

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

@ -209,7 +209,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [
@ -496,6 +496,9 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
tableObject.params = {
planType: 'assemble'
}
getList()
importTemplateData.templateUrl = await ProductionMainApi.importTemplate()
})

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

@ -209,7 +209,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [
@ -495,6 +495,9 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
tableObject.params = {
planType: 'assembleSparePart'
}
getList()
importTemplateData.templateUrl = await ProductionMainApi.importTemplate()
})

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

@ -209,7 +209,7 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
if(findIndex>-1&&findIndex<$index){
return []
}
return [
@ -496,6 +496,9 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
tableObject.params = {
planType: 'predictSparePart'
}
getList()
importTemplateData.templateUrl = await ProductionMainApi.importTemplate()
})

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

Loading…
Cancel
Save