Browse Source

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

hella_online_20240829
陈薪名 2 months ago
parent
commit
3b1f6cf932
  1. 6
      src/api/eam/basicEamWorkshop/index.ts
  2. 67
      src/api/eam/repairSparePartsRecord/index.ts
  3. 68
      src/api/eam/repairSparePartsRequest/index.ts
  4. 59
      src/api/eam/toolChangedRecord/index.ts
  5. 79
      src/api/eam/toolSigning/index.ts
  6. 4
      src/api/qms/counter/index.ts
  7. 104
      src/api/wms/business/inputBlur.ts
  8. 12
      src/api/wms/processproductionRequestMain/index.ts
  9. 50
      src/api/wms/productionitemcodeSpareitemcode/index.ts
  10. 4
      src/api/wms/saleDetail/index.ts
  11. 2
      src/api/wms/supplierApbalanceMain/index.ts
  12. 14
      src/components/Detail/src/Detail.vue
  13. 3
      src/components/TableFormAdjustment/index.ts
  14. 63
      src/components/TableFormAdjustment/src/AdjustmentDialog.vue
  15. 455
      src/components/TableFormAdjustment/src/TableFormAdjustment.vue
  16. 192
      src/views/eam/equipmentAccounts/equipmentAccounts.data.ts
  17. 27
      src/views/eam/equipmentAccounts/index.vue
  18. 3
      src/views/eam/equipmentMaintenanceRecordMain/equipmentMaintenanceRecordMain.data.ts
  19. 24
      src/views/eam/equipmentManufacturer/equipmentManufacturer.data.ts
  20. 156
      src/views/eam/equipmentSigning/equipmentSigning.data.ts
  21. 29
      src/views/eam/equipmentSigning/index.vue
  22. 23
      src/views/eam/equipmentSupplier/equipmentSupplier.data.ts
  23. 1
      src/views/eam/planSpotCheck/planSpotCheck.data.ts
  24. 244
      src/views/eam/repairSparePartsRecord/index.vue
  25. 238
      src/views/eam/repairSparePartsRecord/repairSparePartsRecord.data.ts
  26. 244
      src/views/eam/repairSparePartsRequest/index.vue
  27. 251
      src/views/eam/repairSparePartsRequest/repairSparePartsRequest.data.ts
  28. 28
      src/views/eam/toolAccounts/index.vue
  29. 208
      src/views/eam/toolAccounts/toolAccounts.data.ts
  30. 244
      src/views/eam/toolChangedRecord/index.vue
  31. 110
      src/views/eam/toolChangedRecord/toolChangedRecord.data.ts
  32. 2
      src/views/eam/toolMod/index.vue
  33. 30
      src/views/eam/toolMod/operateForm.vue
  34. 23
      src/views/eam/toolMod/toolMod.data.ts
  35. 280
      src/views/eam/toolSigning/index.vue
  36. 487
      src/views/eam/toolSigning/toolSigning.data.ts
  37. 37
      src/views/qms/counter/counter.data.ts
  38. 10
      src/views/qms/counter/index.vue
  39. 3
      src/views/qms/inspectionJob/inspectionJobMain.data.ts
  40. 2
      src/views/qms/inspectionRecord/inspectionRecordMain.data.ts
  41. 48
      src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts
  42. 4
      src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts
  43. 244
      src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/index.vue
  44. 72
      src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/productionitemcodeSpareitemcode.data.ts
  45. 3
      src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts
  46. 19
      src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/relegateRecordMain.data.ts
  47. 21
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts
  48. 10
      src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts
  49. 13
      src/views/wms/basicDataManage/labelManage/callmaterials/index.vue
  50. 42
      src/views/wms/countManage/count/countRecordMain/countRecordMain.data.ts
  51. 42
      src/views/wms/countManage/countadjust/countadjustRecordMain/countadjustRecordMain.data.ts
  52. 1
      src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/customerreceiptRecordMain.data.ts
  53. 76
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
  54. 1171
      src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts
  55. 736
      src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts
  56. 1117
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts
  57. 32
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts
  58. 18
      src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts
  59. 16
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts
  60. 57
      src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts
  61. 1
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts
  62. 5
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts
  63. 36
      src/views/wms/productionManage/processproduction/processproductionRequest/index.vue
  64. 287
      src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts
  65. 1
      src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/productputawayAssembleRequestMain.data.ts
  66. 2
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue
  67. 58
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts
  68. 47
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/purchasereturnJobMain.data.ts
  69. 62
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts
  70. 38
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts
  71. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue
  72. 1
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts
  73. 12
      src/views/wms/supplierManage/supplierApbalance/supplierApbalanceDetail/supplierApbalanceDetail.data.ts
  74. 49
      src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/index.vue
  75. 6
      src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/supplierApbalanceMain.data.ts
  76. 1
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

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

@ -67,3 +67,9 @@ export const importTemplate = () => {
export const updateEnableCode = async (data: BasicEamWorkshopVO) => {
return await request.post({ url: `/eam/basic-eam-workshop/ables` , data })
}
// 查询EAM车间列表
export const getBasicEamWorkshopNoPage = async (params) => {
return await request.get({ url: `/eam/basic-eam-workshop/noPage`, params })
}

67
src/api/eam/repairSparePartsRecord/index.ts

@ -0,0 +1,67 @@
import request from '@/config/axios'
export interface RepairSparePartsRecordVO {
id: number
number: string
sparePartsCode: string
qty: number
areaCode: string
locationCode: string
status: string
result: string
applyer: string
approver: number
approveContent: string
approveTime: Date
autoExamine: string
autoAgree: string
directCreateRecord: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询备件维修申请列表
export const getRepairSparePartsRecordPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/repair-spare-parts-record/senior', data })
} else {
return await request.get({ url: `/eam/repair-spare-parts-record/page`, params })
}
}
// 查询备件维修申请详情
export const getRepairSparePartsRecord = async (id: number) => {
return await request.get({ url: `/eam/repair-spare-parts-record/get?id=` + id })
}
// 新增备件维修申请
export const createRepairSparePartsRecord = async (data: RepairSparePartsRecordVO) => {
return await request.post({ url: `/eam/repair-spare-parts-record/create`, data })
}
// 修改备件维修申请
export const updateRepairSparePartsRecord = async (data: RepairSparePartsRecordVO) => {
return await request.put({ url: `/eam/repair-spare-parts-record/update`, data })
}
// 删除备件维修申请
export const deleteRepairSparePartsRecord = async (id: number) => {
return await request.delete({ url: `/eam/repair-spare-parts-record/delete?id=` + id })
}
// 导出备件维修申请 Excel
export const exportRepairSparePartsRecord = async (params) => {
return await request.download({ url: `/eam/repair-spare-parts-record/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/repair-spare-parts-record/get-import-template' })
}

68
src/api/eam/repairSparePartsRequest/index.ts

@ -0,0 +1,68 @@
import request from '@/config/axios'
export interface RepairSparePartsRequestVO {
id: number
number: string
sparePartsCode: string
qty: number
areaCode: string
locationCode: string
status: string
result: string
applyer: string
approver: number
approveContent: string
approveTime: Date
autoExamine: string
autoAgree: string
directCreateRecord: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
repairCause: string
}
// 查询备件维修申请列表
export const getRepairSparePartsRequestPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/repair-spare-parts-request/senior', data })
} else {
return await request.get({ url: `/eam/repair-spare-parts-request/page`, params })
}
}
// 查询备件维修申请详情
export const getRepairSparePartsRequest = async (id: number) => {
return await request.get({ url: `/eam/repair-spare-parts-request/get?id=` + id })
}
// 新增备件维修申请
export const createRepairSparePartsRequest = async (data: RepairSparePartsRequestVO) => {
return await request.post({ url: `/eam/repair-spare-parts-request/create`, data })
}
// 修改备件维修申请
export const updateRepairSparePartsRequest = async (data: RepairSparePartsRequestVO) => {
return await request.put({ url: `/eam/repair-spare-parts-request/update`, data })
}
// 删除备件维修申请
export const deleteRepairSparePartsRequest = async (id: number) => {
return await request.delete({ url: `/eam/repair-spare-parts-request/delete?id=` + id })
}
// 导出备件维修申请 Excel
export const exportRepairSparePartsRequest = async (params) => {
return await request.download({ url: `/eam/repair-spare-parts-request/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/repair-spare-parts-request/get-import-template' })
}

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

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

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

@ -0,0 +1,79 @@
import request from '@/config/axios'
export interface ToolSigningVO {
id: number
toolCode: string
operationDate: Date
operationer: string
operationDept: string
telephone: string
supplierCode: string
supplierPeople: string
supplierTelephone: string
status: string
approver: number
approveContent: string
approveTime: Date
autoExamine: string
autoAgree: string
directCreateRecord: string
storageLocation: string
factoryAreaCode: string
workshopCode: string
lineCode: string
processCode: string
workstationCode: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询工装到货签收记录列表
export const getToolSigningPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/tool-signing/senior', data })
} else {
return await request.get({ url: `/eam/tool-signing/page`, params })
}
}
// 查询工装到货签收记录详情
export const getToolSigning = async (id: number) => {
return await request.get({ url: `/eam/tool-signing/get?id=` + id })
}
// 新增工装到货签收记录
export const createToolSigning = async (data: ToolSigningVO) => {
return await request.post({ url: `/eam/tool-signing/create`, data })
}
// 新增工装到货签收记录
export const createToolSigningNew = async (data: ToolSigningVO) => {
return await request.post({ url: `/eam/tool-signing/createNew`, data })
}
// 修改工装到货签收记录
export const updateToolSigning = async (data: ToolSigningVO) => {
return await request.put({ url: `/eam/tool-signing/update`, data })
}
// 删除工装到货签收记录
export const deleteToolSigning = async (id: number) => {
return await request.delete({ url: `/eam/tool-signing/delete?id=` + id })
}
// 导出工装到货签收记录 Excel
export const exportToolSigning = async (params) => {
return await request.download({ url: `/eam/tool-signing/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/tool-signing/get-import-template' })
}

4
src/api/qms/counter/index.ts

@ -60,3 +60,7 @@ export const exportCounter = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/qms/counter/get-import-template' })
}
export const getNextStage = async (id:number) => {
return await request.get({ url: `/qms/counter/getNextStage?id=` + id})
}

104
src/api/wms/business/inputBlur.ts

@ -211,10 +211,10 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f
headerItem.field == 'packUnit' ||
headerItem.field == 'secondPackUnit' ||
headerItem.field == 'fromPackUnit' ||
headerItem.field == 'toPackUnit'||
headerItem.field == 'toPackUnit'||
headerItem.field == 'toPackUnit' ||
headerItem.field == 'toPackUnit' ||
headerItem.field == 'supplierItemCode'
) {
let searchField = headerItem.field
let pageApi = ref()
@ -239,10 +239,10 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f
]
? formRef.formModel[searchCondition1[i].value]
: detailData
? detailData[searchCondition1[i].value]
: row
? row[searchCondition1[i].value]
: ''
? detailData[searchCondition1[i].value]
: row
? row[searchCondition1[i].value]
: ''
// 是否含有空参数情况
let isNull = false
if (
@ -354,9 +354,9 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f
) {
// 装配计划,裝配备件计划,预备产件计划,预生产收货申请,装配收货申请,报修收货申请,制品报废申请
pageApi.value = getProductionLineCodelistByCodes
params.value.productionLineCode=
formRef.formModel.productionLine || formRef.formModel.productionLineCode || row.productionLine || row.productionLineCode,
params.value.itemCodes=val?.trim()
params.value.productionLineCode =
formRef.formModel.productionLine || formRef.formModel.productionLineCode || row.productionLine || row.productionLineCode,
params.value.itemCodes = val?.trim()
}
} else if (
headerItem.field == 'packUnit' ||
@ -376,39 +376,39 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f
routeName == 'UnplannedissueJobMain' ||
routeName == 'PackageoverRequestMain'
) {
params.value.itemCode= row.itemCode
params.value.packUnit= val?.trim()
params.value.itemCode = row.itemCode
params.value.packUnit = val?.trim()
pageApi.value = getItemPackageunitListByCodes
}
} else if (
headerItem.field == 'supplierItemCode'
headerItem.field == 'supplierItemCode'
) {
// 生产退料申请,隔离退料申请
if (
routeName == 'ProductionreturnRequestMain' ||
routeName == 'ProductionreturnRequestMainNo'
routeName == 'ProductionreturnRequestMainNo'
) {
searchField = 'supplierCode'
params.value.itemCodes= row.itemCode
params.value.supplierCode= val?.trim()
searchField = 'supplierCode'
params.value.itemCodes = row.itemCode
params.value.supplierCode = val?.trim()
pageApi.value = getSupplierItemListByCodes
}
}
const list = ref()
// 调取包装接口
await pageApi.value(params.value).then(async (res) => {
list.value = res ? res : []
// 只查一条数据,多条数据查询默认显示不存在
if (res.length == 1) {
callback(list.value)
} else {
message.alert('代码' + row[headerItem.field] + '没有找到对应数据')
row[headerItem.field] = ''
return
}
})
}
list.value = res ? res : []
// 只查一条数据,多条数据查询默认显示不存在
if (res.length == 1) {
callback(list.value)
} else {
message.alert('代码' + row[headerItem.field] + '没有找到对应数据')
row[headerItem.field] = ''
return
}
})
}
}
}
}
export const FormBlur = async (field, val, routeName, formRef, detailData, formSchema, callback) => {
@ -586,7 +586,7 @@ export const FormBlur = async (field, val, routeName, formRef, detailData, formS
callback(list.value)
})
}
}
}
else {
let pageApi = ref()
let params = ref()
@ -737,13 +737,13 @@ export const FormBlur = async (field, val, routeName, formRef, detailData, formS
})
}
}
}
}
}
// 根据下方输入框失去焦点校验信息
export const getListByBottonInput = async (headerItem, val, row, routeName, formRef, detailData, tableData, callback) => {
let tableFormSchemaObj = headerItem?.tableForm
console.log(333,tableFormSchemaObj)
console.log(333, tableFormSchemaObj)
if (tableFormSchemaObj.searchPage && tableFormSchemaObj.verificationParams) {
if (!val) return;
let params = ref({})
@ -817,7 +817,7 @@ export const getListByBottonInput = async (headerItem, val, row, routeName, form
if (verificationParams && verificationParams.length > 0) {
for (let i = 0; i < verificationParams.length; i++) {
console.log(54565, verificationParams[i].key)
verificationParams[i].key1 = verificationParams[i].key +'s'
verificationParams[i].key1 = verificationParams[i].key + 's'
params.value[verificationParams[i].key1] = val
}
}
@ -830,25 +830,29 @@ export const getListByBottonInput = async (headerItem, val, row, routeName, form
...arr1.filter((item) => !arr2.includes(item)),
...arr2.filter((item) => !arr1.includes(item))
].join(',')
message.alert('代码' + str + '没有找到对应数据')
return
} else {
let repeatCode = []
if (tableData.length > 0) {
tableData.forEach((item) => {
const findIndex = arr1.findIndex(valItem => valItem == item[headerItem.field])
if (findIndex > -1) {
arr1.splice(findIndex, 1)
repeatCode.push(item[headerItem.field])
}
})
}
if (repeatCode.length > 0) {
message.warning(`${t('ts.代码')}${repeatCode.join(',')}${t('ts.已经存在')}`);
return;
console.log(arr1.filter((item) => arr2.includes(item)))
console.log(22, str)
if (str) {
message.alert('代码' + str + '没有找到对应数据')
return
}
callback(list.value)
}
let repeatCode = []
if (tableData.length > 0) {
tableData.forEach((item) => {
const findIndex = arr1.findIndex(valItem => valItem == item[headerItem.field])
if (findIndex > -1) {
arr1.splice(findIndex, 1)
repeatCode.push(item[headerItem.field])
}
})
}
if (repeatCode.length > 0) {
message.warning(`${t('ts.代码')}${repeatCode.join(',')}${t('ts.已经存在')}`);
return;
}
console.log(list.value)
callback(list.value)
})
return
} else {
@ -929,5 +933,5 @@ export const getListByBottonInput = async (headerItem, val, row, routeName, form
})
}
}

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

@ -26,6 +26,18 @@ export const getProcessproductionRequestMainPage = async (params) => {
}
}
// 查询工序报产子物料
export const getProcessproductionChildBomPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/processproduction-request-main/queryChildItemByParentCodeSenior', data })
} else {
return await request.get({ url: `/wms/processproduction-request-main/queryChildItemByParentCodePage`, params })
}
}
// 查询工序报产申请主详情
export const getProcessproductionRequestMain = async (id: number) => {
return await request.get({ url: `/wms/processproduction-request-main/get?id=` + id })

50
src/api/wms/productionitemcodeSpareitemcode/index.ts

@ -0,0 +1,50 @@
import request from '@/config/axios'
export interface ProductionitemcodeSpareitemcodeVO {
id: number
productionItemCode: string
spareItemCode: string
available: string
remark: string
}
// 查询量产件备件关系列表
export const getProductionitemcodeSpareitemcodePage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/productionitemcode-spareitemcode/senior', data })
} else {
return await request.get({ url: `/wms/productionitemcode-spareitemcode/page`, params })
}
}
// 查询量产件备件关系详情
export const getProductionitemcodeSpareitemcode = async (id: number) => {
return await request.get({ url: `/wms/productionitemcode-spareitemcode/get?id=` + id })
}
// 新增量产件备件关系
export const createProductionitemcodeSpareitemcode = async (data: ProductionitemcodeSpareitemcodeVO) => {
return await request.post({ url: `/wms/productionitemcode-spareitemcode/create`, data })
}
// 修改量产件备件关系
export const updateProductionitemcodeSpareitemcode = async (data: ProductionitemcodeSpareitemcodeVO) => {
return await request.put({ url: `/wms/productionitemcode-spareitemcode/update`, data })
}
// 删除量产件备件关系
export const deleteProductionitemcodeSpareitemcode = async (id: number) => {
return await request.delete({ url: `/wms/productionitemcode-spareitemcode/delete?id=` + id })
}
// 导出量产件备件关系 Excel
export const exportProductionitemcodeSpareitemcode = async (params) => {
return await request.download({ url: `/wms/productionitemcode-spareitemcode/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/productionitemcode-spareitemcode/get-import-template' })
}

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

@ -60,3 +60,7 @@ export const deleteSaleDetail = async (id: number) => {
export const exportSaleDetail = async (params) => {
return await request.download({ url: `/wms/sale-detail/export-excel`, params })
}
export const getSaleDetailByCodes = async (params) => {
return await request.get({ url: `/wms/sale-detail/listByCodes`, params })
}

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

@ -47,7 +47,7 @@ export const createSupplierApbalanceMain = async (data: SupplierApbalanceMainVO)
}
// 修改供应商余额明细主
export const updateSupplierApbalanceMain = async (data: SupplierApbalanceMainVO) => {
export const updateSupplierApbalanceMain = async (data: any) => {
return await request.put({ url: `/wms/supplier-apbalance-main/update`, data })
}

14
src/components/Detail/src/Detail.vue

@ -29,7 +29,7 @@
<!-- 详情 -->
<ContentWrap class="w-[100%]" v-show="tabsList[current].label!=annexAlias.label&&tabsList[current].label!='备注'&&tabsList[current].label!='变更记录'&&tabsList[current].label!='主数据'&&!annexTableData.some(item=>item.label==tabsList[current].label)"> <!-- 列表头部 -->
<TableHead
v-if="!isBasic"
v-if="!isBasic&&!slotDetailTabList.some(item=>item.label==tabsList[current].label)"
:HeadButttondata="HeadButttondata"
:masterId="masterParmas.masterId"
@button-base-click="buttonBaseClick"
@ -63,7 +63,7 @@
</template> -->
</Table>
<Table
v-if="!isBasic && fromeWhere != 'countPlan'"
v-if="!isBasic && fromeWhere != 'countPlan'&&!slotDetailTabList.some(item=>item.label==tabsList[current].label)"
:columns="detailAllSchemasRef.tableColumns"
:data="tableObjectRef.tableList"
:loading="tableObjectRef.loading"
@ -85,6 +85,7 @@
/>
</template>
</Table>
<slot v-if="slotDetailTabList.some(item=>item.label==tabsList[current].label)" :name="slotDetail.prop" v-for="slotDetail in slotDetailTabList"></slot>
<DetailTable
v-if="!isBasic && fromeWhere == 'countPlan' && isShowDrawer"
:columns="detailAllSchemasRef.tableColumns"
@ -397,6 +398,11 @@ const props = defineProps({
required: false,
default: () => []
},
slotDetailTabList:{
type:Array,
required: false,
default: () => []
},
//--
mainSubmitCreateApi:{
type: Boolean,
@ -441,6 +447,10 @@ if (props.isBasic == true) {
]
}
}
//
if(props.slotDetailTabList){
tabsList.value = [...tabsList?.value,...props.slotDetailTabList]
}
let otherList = [...props.annexTable,{

3
src/components/TableFormAdjustment/index.ts

@ -0,0 +1,3 @@
import TableFormAdjustment from './src/TableFormAdjustment.vue'
export { TableFormAdjustment }

63
src/components/TableFormAdjustment/src/AdjustmentDialog.vue

@ -0,0 +1,63 @@
<template>
<Dialog
title="询证函调节表"
:width="960"
v-model="dialogVisible"
:close-on-click-modal="false"
>
<TableFormAdjustment ref="tableFormAdjustment" :rowData="rowData" :isDetail="false" @updateList="updateList"/>
<template #footer>
<slot name="foorter"></slot>
<ButtonBase :Butttondata="[
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]" @button-base-click="buttonBaseClick" />
</template>
</Dialog>
</template>
<script setup lang="ts">
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableFormAdjustment from './TableFormAdjustment.vue'
const dialogVisible = ref(false)
const rowData = ref({})
const open = (row)=>{
dialogVisible.value = true
nextTick(()=>{
rowData.value = row
})
}
const tableFormAdjustment = ref()
/** 按钮事件 */
const buttonBaseClick = (val) => {
if (val == 'save') {
//
tableFormAdjustment.value.saveData()
} else if (val == 'close') {
//
dialogVisible.value = false
}
}
const updateList = ()=>{
dialogVisible.value = false
emit('updateList')
}
//
const emit = defineEmits([
'updateList',
])
defineExpose({open})
</script>
<style lang="scss" scoped>
.top{
margin-bottom: 20px
}
</style>

455
src/components/TableFormAdjustment/src/TableFormAdjustment.vue

@ -0,0 +1,455 @@
<template>
<!-- <Dialog
title="询证函调节表"
:width="960"
v-model="dialogVisible"
:close-on-click-modal="false"
> -->
<div style="overflow-x: auto;">
<!-- 顶部 -->
<div class="top" style="display: flex; flex-direction: row;">
<div style="margin-right:5px">
<el-table border class="top-table" :data="topTableData">
<el-table-column
:label="headerItem.label"
:prop="headerItem.field"
:width="headerItem.width"
align="center"
v-for="headerItem in topHeader"
/>
</el-table>
</div>
<div>
<el-table border class="top-table" :data="topTableData">
<el-table-column
:label="headerItem.label"
:prop="headerItem.field"
:width="headerItem.width"
align="center"
v-for="headerItem in topHeader"
/>
</el-table>
</div>
</div>
<!-- 底部 -->
<div class="bottom" style="display: flex; flex-direction: row;">
<!-- - -->
<div style="margin-right:5px">
<el-button type="info" link>调整事项减项以负数列示</el-button>
<el-table border class="top-table" :data="[...bottomLeftTableData,...bottomLeftSumTableData]">
<el-table-column
:label="headerItem.label"
:prop="headerItem.field"
:width="headerItem.width"
align="center"
v-for="headerItem in bottomLeftHeader"
>
<template #default="scope">
<el-input :disabled="isDetail" v-if="!scope.row.isSum&&headerItem.type=='input'" v-model="scope.row[headerItem.field]" :placeholder="`请输入${headerItem.label}`"/>
<el-input-number :disabled="isDetail" v-else-if="!scope.row.disabled&&headerItem.type=='inputnumber'" v-model="scope.row[headerItem.field]" :placeholder="`请输入${headerItem.label}`"/>
<span v-else>{{ scope.row[headerItem.field] }}</span>
</template>
</el-table-column>
</el-table>
<el-form style="margin-top:20px;width:460px" :model="leftForm" :label-width="300" >
<el-form-item label="经办人">
<el-input :disabled="isDetail" v-model="leftForm.name" placeholder="请输入经办人"/>
</el-form-item>
<el-form-item label="对账日期">
<el-date-picker :disabled="isDetail" value-format="YYYY-MM-DD HH:mm:ss"
v-model="leftForm.date"
type="datetime"
placeholder="请选择对账日期"
/>
</el-form-item>
</el-form>
</div>
<!-- - -->
<div>
<el-button type="info" link>调整事项减项以负数列示</el-button>
<el-table border class="top-table" :data="[...bottomRightTableData,...bottomRightSumTableData]">
<el-table-column
:label="headerItem.label"
:prop="headerItem.field"
:width="headerItem.width"
align="center"
v-for="headerItem in bottomRightHeader"
>
<template #default="scope">
<el-input :disabled="isDetail" v-if="!scope.row.isSum&&headerItem.type=='input'" v-model="scope.row[headerItem.field]" :placeholder="`请输入${headerItem.label}`"/>
<el-input-number :disabled="isDetail" v-else-if="!scope.row.disabled&&headerItem.type=='inputnumber'" v-model="scope.row[headerItem.field]" :placeholder="`请输入${headerItem.label}`"/>
<span v-else>{{ scope.row[headerItem.field] }}</span>
</template>
</el-table-column>
</el-table>
<el-form style="margin-top:20px;width:460px" :model="rightForm" :label-width="300" >
<el-form-item label="经办人">
<el-input :disabled="isDetail" v-model="rightForm.name" placeholder="请输入经办人"/>
</el-form-item>
<el-form-item label="对账日期">
<el-date-picker :disabled="isDetail" value-format="YYYY-MM-DD HH:mm:ss"
v-model="rightForm.date"
type="datetime"
placeholder="请选择对账日期"
/>
</el-form-item>
</el-form>
</div>
</div>
</div>
<!-- <template #footer>
<slot name="foorter"></slot>
<ButtonBase :Butttondata="[
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]" @button-base-click="buttonBaseClick" />
</template>
</Dialog> -->
</template>
<script setup lang="ts">
import * as SupplierApbalanceMainApi from '@/api/wms/supplierApbalanceMain'
import dayjs from 'dayjs'
// import * as defaultButtons from '@/utils/disposition/defaultButtons'
const { t } = useI18n() //
const message = useMessage() //
const props = defineProps({
rowData: {
type: Object,
required: true,
default: null
},
adjustmentData: {
type: Object,
required: true,
default: null
},
isDetail: {
type: Boolean,
default: false
}
})
onMounted(()=>{
console.log('rowData',props.rowData)
nextTick(()=>{
setTopHeaderData()
})
})
watch(
() => props.rowData,
() => {
console.log('rowData',props.rowData)
nextTick(()=>{
setTopHeaderData()
})
},
{
deep: true
}
)
//
const topHeader = ref<any>([])
const topTableData = ref<any>([])
const setTopHeaderData = ()=>{
let myData = unref(props.rowData)
console.log('myData',myData)
topHeader.value = [{
label:`单位名称:${myData?.ttSupplierName}`,
field:'name1',
width:260
},{
label:'金额',
field:'price1',
width:100
},{
label:'备注',
field:'remark1',
width:100
}]
let year = dayjs(myData?.ttGenerateTime).year()
let month = dayjs(myData?.ttGenerateTime).month()+1
let day = new Date(year,month,0).getDate()
topTableData.value = [{
name1:`截止${year}${month}${day}日账面金额如下`,
price1:Number(myData?.ttAccountAp)+Number(myData?.ttAccountOthap),
remark1:myData?.remark,
name2:'截止年月日账面金额如下',
price2:Number(myData?.ttAccountAp)+Number(myData?.ttAccountOthap),
remark2:myData?.remark,
}]
if(props.isDetail){
//
setDetailData()
}
}
const setDetailData = ()=>{
//
let adjustmentData = unref(props.adjustmentData)
if(adjustmentData?.subList){
bottomLeftTableData.value = adjustmentData?.subList?.map((item,index) => ({
index:index+1,
ttAbstractLeft:item?.ttAbstractLeft,
ttBalanceLeft:item?.ttBalanceLeft,
remark:item?.remark
}));
bottomRightTableData.value = adjustmentData?.subList?.map((item,index) => ({
index:index+1,
ttAbstractRight:item?.ttAbstractRight,
ttBalanceRight:item?.ttBalanceRight,
remark:item?.remark
}));
}
// .
leftForm.value = {
name:adjustmentData?.ttOperatorLeft,
date:adjustmentData?.ttDzDateLeft
}
rightForm.value = {
name:adjustmentData?.ttOperatorRight,
date:adjustmentData?.ttDzDateRight
}
}
//
const bottomLeftHeader = ref([{
label:'序号',
field:'index',
width:80
},{
label:'摘要',
field:'ttAbstractLeft',
width:180,
type:'input'
},{
label:'金额',
field:'ttBalanceLeft',
width:200,
type:'inputnumber'
}])
const bottomRightHeader = ref([{
label:'序号',
field:'index',
width:80
},{
label:'摘要',
field:'ttAbstractRight',
width:180,
type:'input'
},{
label:'金额',
field:'ttBalanceRight',
width:200,
type:'inputnumber'
}])
const bottomLeftTableData = ref([{
index:'1',
ttAbstractLeft:'',
ttBalanceLeft:'',
remark:''
},{
index:'2',
ttAbstractLeft:'',
ttBalanceLeft:'',
remark:''
},{
index:'3',
ttAbstractLeft:'',
ttBalanceLeft:'',
remark:''
},{
index:'4',
ttAbstractLeft:'',
ttBalanceLeft:'',
remark:''
},{
index:'5',
ttAbstractLeft:'',
ttBalanceLeft:'',
remark:''
},{
index:'6',
ttAbstractLeft:'',
ttBalanceLeft:'',
remark:''
},{
index:'7',
ttAbstractLeft:'',
ttBalanceLeft:'',
remark:''
},{
index:'8',
ttAbstractLeft:'',
ttBalanceLeft:'',
remark:''
}])
const bottomRightTableData = ref([{
index:'1',
ttAbstractRight:'',
ttBalanceRight:'',
remark:''
},{
index:'2',
ttAbstractRight:'',
ttBalanceRight:'',
remark:''
},{
index:'3',
ttAbstractRight:'',
ttBalanceRight:'',
remark:''
},{
index:'4',
ttAbstractRight:'',
ttBalanceRight:'',
remark:''
},{
index:'5',
ttAbstractRight:'',
ttBalanceRight:'',
remark:''
},{
index:'6',
ttAbstractRight:'',
ttBalanceRight:'',
remark:''
},{
index:'7',
ttAbstractRight:'',
ttBalanceRight:'',
remark:''
},{
index:'8',
ttAbstractRight:'',
ttBalanceRight:'',
remark:''
}])
//
const bottomLeftSumTableData = ref([{
index:'',
ttAbstractLeft:'调整事项合计',
ttBalanceLeft:'',
remark:'',
isSum:true,
disabled:true
},{
index:'',
ttAbstractLeft:'调整后余额',
ttBalanceLeft:'',
remark:'',
isSum:true
}])
watch(
() => bottomLeftTableData.value,
() => {
//
bottomLeftSumTableData.value[0].ttBalanceLeft = bottomLeftTableData.value.reduce((prev, item1) => prev + Number(item1['ttBalanceLeft']),0)
console.log('调整事项合计左',bottomLeftTableData)
},
{
deep: true
}
)
watch(
() => bottomRightTableData.value,
() => {
//
bottomRightSumTableData.value[0].ttBalanceRight = bottomRightTableData.value.reduce((prev, item1) => prev + Number(item1['ttBalanceRight']),0)
console.log('调整事项合计右',bottomRightTableData)
},
{
deep: true
}
)
const bottomRightSumTableData = ref([{
index:'',
ttAbstractRight:'调整事项合计',
ttBalanceRight:'',
remark:'',
isSum:true,
disabled:true
},{
index:'',
ttAbstractRight:'调整后余额',
ttBalanceRight:'',
remark:'',
isSum:true
}])
const leftForm = ref({
name:'',
date:''
})
const rightForm = ref({
name:'',
date:''
})
const dialogVisible = ref(false)
const open = ()=>{
dialogVisible.value = true
}
const saveData = async ()=>{
//
let myData = unref(props.rowData)
// [
// {
// masterId:myData.masterId,
// ttAbstractLeft:'',//
// ttBalanceLeft:'',//
// ttAbstractRight:'',//
// ttBalanceRight:'',//
// }
// ]
let subList = bottomLeftTableData.value.map((item,index)=>({
masterId:myData.id,
ttAbstractLeft:item.ttAbstractLeft,
ttBalanceLeft:item.ttBalanceLeft,
ttAbstractRight:bottomRightTableData.value[index].ttAbstractRight,
ttBalanceRight:bottomRightTableData.value[index].ttBalanceRight,
}))
let data = {
id:myData.id,
subList,
ttAdjustmentTotalLeft:bottomLeftSumTableData.value[0].ttBalanceLeft,//
ttAdjustmentBalLeft:bottomLeftSumTableData.value[1].ttBalanceLeft,//
ttOperatorLeft:leftForm.value.name,//
ttDzDateLeft:leftForm.value.date,//
ttAdjustmentTotalRight:bottomRightSumTableData.value[0].ttBalanceRight,//
ttAdjustmentBalRight:bottomRightSumTableData.value[1].ttBalanceRight,//
ttOperatorRight:rightForm.value.name,//
ttDzDateRight:rightForm.value.date,//
}
await SupplierApbalanceMainApi.updateSupplierApbalanceMain(data)
message.success(t('common.updateSuccess'))
console.log('保存数据',saveData)
emit('updateList')
}
//
const emit = defineEmits([
'updateList',
])
defineExpose({open,saveData})
</script>
<style lang="scss" scoped>
.top{
margin-bottom: 20px
}
</style>

192
src/views/eam/equipmentAccounts/equipmentAccounts.data.ts

@ -11,12 +11,18 @@ import * as EquipmentManufacturerApi from '@/api/eam/equipmentManufacturer'
import * as ConfigApi from '@/api/infra/config'
import * as ProductionlineApi from '@/api/wms/productionline'
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data'
import * as ProcessApi from '@/api/wms/process'
import { Process } from '@/views/wms/basicDataManage/factoryModeling/process/process.data'
import * as WorkStationApi from '@/api/wms/workstation'
import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data'
import * as UserApi from '@/api/system/user'
import { handleTreeToComponentOptions } from '@/utils/tree'
import * as DeptApi from '@/api/system/dept'
import * as BasicEamWorkshopApi from '@/api/eam/basicEamWorkshop'
import { BasicEamWorkshop } from '@/views/eam/basicEamWorkshop/basicEamWorkshop.data'
const workshopNoPage = await WorkshopApi.getWorkshopNoPage({})
export interface User {
id: number,
nickname: string
}
const workshopNoPage = await BasicEamWorkshopApi.getBasicEamWorkshopNoPage({})
const equipmentManufacturerNoPage = await EquipmentManufacturerApi.getEquipmentManufacturerNoPage({})
const equipmentSupplierNoPage = await EquipmentSupplierApi.getEquipmentSupplierNoPage({})
const productionlineNoPage = await ProductionlineApi.getProductionlineNoPage({});
@ -26,6 +32,13 @@ const autoSwitch = ref(false)
if (autoCodeSwitch == 'TRUE') {
autoSwitch.value = true
}
const allDeptList = await DeptApi.getSimpleDeptList();
const deptList = ref<Tree[]>([]) // 树形结构
// 加载部门树(默认格式)
deptList.value = handleTreeToComponentOptions(allDeptList)
const userList = ref<User[]>([])
userList.value = await UserApi.getSimpleUserList()
// 表单校验
export const EquipmentAccountsRules = reactive({
@ -113,13 +126,41 @@ export const EquipmentAccounts = useCrudSchemas(reactive<CrudSchema[]>([
label: '使用部门',
field: 'useDept',
sort: 'custom',
isSearch: false
isTable: false,
isDetail: false,
isSearch: false,
isTableForm: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return allDeptList.find((item) => item.id == cellValue)?.name
},
form: {
component: 'TreeSelect',
componentProps: { // 假设deptList是部门数据列表
data: deptList,
placeholder: "请选择部门",
filterable: true,
}
}
},
{
label: '负责人',
field: 'principal',
sort: 'custom',
isSearch: false
isSearch: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userList.value.find((item) => item.id == cellValue)?.nickname
},
form: {
component: 'Select',
componentProps: {
options: userList.value,
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
},
filterable: true,
}
}
},
{
label: '负责人联系方式',
@ -233,13 +274,38 @@ export const EquipmentAccounts = useCrudSchemas(reactive<CrudSchema[]>([
label: '采购部门',
field: 'purchaseDept',
sort: 'custom',
isSearch: false
isSearch: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return allDeptList.find((item) => item.id == cellValue)?.name
},
form: {
component: 'TreeSelect',
componentProps: { // 假设deptList是部门数据列表
data: deptList,
placeholder: "请选择部门",
filterable: true,
}
}
},
{
label: '采购人',
field: 'purchaser',
sort: 'custom',
isSearch: false
isSearch: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userList.value.find((item) => item.id == cellValue)?.nickname
},
form: {
component: 'Select',
componentProps: {
options: userList.value,
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
},
filterable: true,
}
}
},
{
label: '出厂日期',
@ -378,8 +444,8 @@ export const EquipmentAccounts = useCrudSchemas(reactive<CrudSchema[]>([
searchListPlaceholder: '请选择车间代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '车间信息', // 查询弹窗标题
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法
searchAllSchemas: BasicEamWorkshop.allSchemas, // 查询弹窗所需类
searchPage: BasicEamWorkshopApi.getBasicEamWorkshopPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
@ -388,58 +454,58 @@ export const EquipmentAccounts = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '产线编号',
field: 'lineCode',
sort: 'custom',
isSearch: true,
isDetail: false,
isForm: false,
isTable: true,
isTableForm: false,
search: {
component: 'Select',
componentProps: {
options: productionlineNoPage,
optionsAlias: {
labelField: 'name',
valueField: 'code'
},
filterable: true,
}
},
formatter: (_: Recordable, __: TableColumn, cellValue: string) => {
return productionlineNoPage.find((item) => item.code == cellValue)?.name
},
},
{
label: '产线编号',
field: 'lineName',
sort: 'custom',
isSearch: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
multiple:true,
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition: [{
key:'workshopCode',
value:'workshopCode',
message: '请填写车间代码!',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
// {
// label: '产线编号',
// field: 'lineCode',
// sort: 'custom',
// isSearch: true,
// isDetail: false,
// isForm: false,
// isTable: true,
// isTableForm: false,
// search: {
// component: 'Select',
// componentProps: {
// options: productionlineNoPage,
// optionsAlias: {
// labelField: 'name',
// valueField: 'code'
// },
// filterable: true,
// }
// },
// formatter: (_: Recordable, __: TableColumn, cellValue: string) => {
// return productionlineNoPage.find((item) => item.code == cellValue)?.name
// },
// },
// {
// label: '产线编号',
// field: 'lineName',
// sort: 'custom',
// isSearch: false,
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
// multiple:true,
// searchField: 'code', // 查询弹窗赋值字段
// searchTitle: '生产线信息', // 查询弹窗标题
// searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
// searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
// searchCondition: [{
// key:'workshopCode',
// value:'workshopCode',
// message: '请填写车间代码!',
// isMainValue: true
// },{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// }
// },
// {
// label: '工序编号',
// field: 'processCode',

27
src/views/eam/equipmentAccounts/index.vue

@ -47,6 +47,7 @@
:apiUpdate="EquipmentAccountsApi.updateEquipmentAccounts"
:apiCreate="EquipmentAccountsApi.createEquipmentAccounts"
@searchTableSuccess="searchTableSuccess"
@onChange="onChange"
:isBusiness="false"
/>
@ -112,6 +113,7 @@ import * as WorkshopApi from '@/api/wms/workshop'
import * as ProductionlineApi from '@/api/wms/productionline'
import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier'
import * as EquipmentManufacturerApi from '@/api/eam/equipmentManufacturer'
import * as UserApi from '@/api/system/user'
defineOptions({ name: 'EquipmentAccounts' })
@ -130,7 +132,10 @@ const detailAllSchemas = ref()
const apiPage = ref()
const dialogApiPage = ref()
const dialogAllSchemas = ref()
export interface User {
id: number,
nickname: string
}
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
@ -515,6 +520,26 @@ const submitSparePartRelation = (formField, searchField, val, formRef, rowRef) =
})
}
const onChange = async (field, cur, formRef) => {
if(field == 'purchaseDept'){
const userList = ref<User[]>([])
userList.value = await UserApi.getUserListByDeptIds([cur])
EquipmentAccounts.allSchemas.formSchema.find(item => item.field == 'purchaser').componentProps.options = userList.value
let setV = {}
setV['purchaser'] = ''
formRef.value.setValues(setV)
}
if(field == 'useDept'){
const user01List = ref<User[]>([])
user01List.value = await UserApi.getUserListByDeptIds([cur])
EquipmentAccounts.allSchemas.formSchema.find(item => item.field == 'principal').componentProps.options = user01List.value
let setV = {}
setV['principal'] = ''
formRef.value.setValues(setV)
}
}
/** 初始化 **/
onMounted(async () => {
getList()

3
src/views/eam/equipmentMaintenanceRecordMain/equipmentMaintenanceRecordMain.data.ts

@ -30,7 +30,6 @@ export const EquipmentMaintenanceRecordMain = useCrudSchemas(reactive<CrudSchema
label: '描述',
field: 'describing',
sort: 'custom',
isSearch: true,
isSearch: false,
},
{
@ -43,7 +42,6 @@ export const EquipmentMaintenanceRecordMain = useCrudSchemas(reactive<CrudSchema
label: '来源字典',
field: 'sources',
sort: 'custom',
isSearch: true,
isSearch: false,
},
{
@ -56,7 +54,6 @@ export const EquipmentMaintenanceRecordMain = useCrudSchemas(reactive<CrudSchema
label: '故障类型枚举',
field: 'faultType',
sort: 'custom',
isSearch: true,
isSearch: false,
},

24
src/views/eam/equipmentManufacturer/equipmentManufacturer.data.ts

@ -2,10 +2,19 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { handleTreeToComponentOptions } from '@/utils/tree'
import * as DeptApi from '@/api/system/dept'
import * as UserApi from '@/api/system/user'
export interface User {
id: number,
nickname: string
}
const allDeptList = await DeptApi.getSimpleDeptList();
const deptList = ref<Tree[]>([]) // 树形结构
const userList = ref<User[]>([])
userList.value = await UserApi.getSimpleUserList()
// 加载部门树(默认格式)
deptList.value = handleTreeToComponentOptions(await DeptApi.getSimpleDeptList())
deptList.value = handleTreeToComponentOptions(allDeptList)
// 表单校验
export const EquipmentManufacturerRules = reactive({
@ -76,7 +85,18 @@ export const EquipmentManufacturer = useCrudSchemas(reactive<CrudSchema[]>([
label: '联系人',
field: 'contacts',
sort: 'custom',
isSearch: true
isSearch: true,
form: {
component: 'Select',
componentProps: {
options: userList.value,
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
},
filterable: true,
}
}
},
{
label: '部门',

156
src/views/eam/equipmentSigning/equipmentSigning.data.ts

@ -5,26 +5,21 @@ import * as DeptApi from '@/api/system/dept'
import * as UserApi from '@/api/system/user'
import { EquipmentAccounts,EquipmentAccountsRules } from '../equipmentAccounts/equipmentAccounts.data'
import * as EquipmentAccountsApi from '@/api/eam/equipmentAccounts'
import * as ProductionlineApi from '@/api/wms/productionline'
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data'
import * as WorkshopApi from '@/api/wms/workshop'
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data'
import * as ProcessApi from '@/api/wms/process'
import { Process } from '@/views/wms/basicDataManage/factoryModeling/process/process.data'
import * as WorkStationApi from '@/api/wms/workstation'
import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data'
import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier'
import * as BasicEamWorkshopApi from '@/api/eam/basicEamWorkshop'
export interface User {
id: number,
nickname: string
}
const workshopList = await BasicEamWorkshopApi.getBasicEamWorkshopNoPage({})
const equipmentSupplierList = await EquipmentSupplierApi.getEquipmentSupplierNoPage({})
const allDeptList = await DeptApi.getSimpleDeptList()
const deptList = ref<Tree[]>([]) // 树形结构
const userList = ref<User[]>([])
userList.value = await UserApi.getSimpleUserList()
// 加载部门树(默认格式)
deptList.value = handleTreeToComponentOptions(await DeptApi.getSimpleDeptList())
deptList.value = handleTreeToComponentOptions(allDeptList)
// 表单校验
export const EquipmentSigningRules = reactive({
@ -32,7 +27,6 @@ export const EquipmentSigningRules = reactive({
operationDate: [required],
operationer: [required],
operationDept: [required],
supplierCode: [required],
status: [required],
storageLocation: [required],
concurrencyStamp: [required],
@ -141,22 +135,69 @@ export const EquipmentSigning = useCrudSchemas(reactive<CrudSchema[]>([
label: '供应商编号',
field: 'supplierCode',
sort: 'custom',
isSearch: true,
isForm: false
isSearch: false,
isForm: true,
isDetail: false,
isTable: false,
isTableForm: false,
form: {
component: 'Select',
componentProps: {
options: equipmentSupplierList,
optionsAlias: {
labelField: 'name',
valueField: 'number'
},
filterable: true,
disabled: true,
}
}
},
// {
// label: '供应商编号',
// field: 'supplierName',
// sort: 'custom',
// isSearch: false,
// isForm: true,
// isDetail: false,
// isTable: false,
// isTableForm: false,
// form: {
// component: 'Input',
// componentProps: {
// disabled: true
// }
// }
// },
{
label: '供应商联系人',
field: 'supplierPeople',
sort: 'custom',
isSearch: true,
isForm: false
form: {
component: 'Select',
componentProps: {
options: userList.value,
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
},
disabled: true,
}
}
},
{
label: '供应商联系方式',
field: 'supplierTelephone',
sort: 'custom',
isSearch: false,
isForm: false,
isForm: true,
form: {
component: 'Input',
componentProps: {
disabled: true
}
}
},
// {
// label: '流程状态',
@ -268,7 +309,7 @@ export const EquipmentSigning = useCrudSchemas(reactive<CrudSchema[]>([
field: 'storageLocation',
sort: 'custom',
isSearch: false,
isForm: false,
isForm: true,
form: {
component: 'Input',
componentProps: {
@ -288,38 +329,51 @@ export const EquipmentSigning = useCrudSchemas(reactive<CrudSchema[]>([
field: 'workshopCode',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '产线编号',
field: 'lineCode',
sort: 'custom',
isSearch: true,
isForm: false,
isForm: true,
formatter: (_: Recordable, __: TableColumn, cellValue: string) => {
return workshopList.find((item) => item.code == cellValue)?.name
},
form: {
// labelMessage: '信息提示说明!!!',
component: 'Select',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
multiple:true,
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition: [{
key:'workshopCode',
value:'workshopCode',
message: '请填写车间代码!',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
options: workshopList,
placeholder: '请选择车间编号',
optionsAlias: {
valueField: 'code',
labelField: 'name'
}
}
}
},
// {
// label: '产线编号',
// field: 'lineCode',
// sort: 'custom',
// isSearch: true,
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
// multiple:true,
// searchField: 'code', // 查询弹窗赋值字段
// searchTitle: '生产线信息', // 查询弹窗标题
// searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
// searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
// searchCondition: [{
// key:'workshopCode',
// value:'workshopCode',
// message: '请填写车间代码!',
// isMainValue: true
// },{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// }
// },
// {
// label: '工序编号',
// field: 'processCode',
// sort: 'custom',
@ -403,13 +457,13 @@ export const EquipmentSigning = useCrudSchemas(reactive<CrudSchema[]>([
// }
// }
// },
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
// {
// label: '操作',
// field: 'action',
// isForm: false,
// table: {
// width: 150,
// fixed: 'right'
// }
// }
]))

29
src/views/eam/equipmentSigning/index.vue

@ -67,6 +67,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import * as UserApi from '@/api/system/user'
import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier'
defineOptions({ name: 'EquipmentSigning' })
@ -84,10 +85,18 @@ routeName.value = route.name
const tableColumns = ref(EquipmentSigning.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
const searchTableSuccess = async (formField, searchField, val, formRef) => {
const setV = {}
setV[formField] = val[0][searchField]
if(formField == 'equipmentCode'){
setV['supplierCode'] = val[0]['supplierCode']
setV['workshopCode'] = val[0]['workshopCode']
const equipmentSupplierList = await EquipmentSupplierApi.getEquipmentSupplierNoPage({})
const entry = equipmentSupplierList.find(item => item.number == val[0]['supplierCode'])
setV['supplierTelephone'] = entry?.phone
setV['supplierPeople'] = Number(entry?.contacts)
}
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
@ -140,8 +149,8 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'eam:equipment-signing:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipment-signing:delete'}), //
defaultButtons.mainListEditBtn({hasPermi:'eam:equipment-signing:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipment-signing:delete'}), //
]
// -
@ -256,7 +265,15 @@ const onChange = async (field, cur, formRef) => {
setV['operationer'] = ''
formRef.value.setValues(setV)
}
if(field == 'supplierCode'){
const equipmentSupplierList = await EquipmentSupplierApi.getEquipmentSupplierNoPage({})
const entry = equipmentSupplierList.find(item => item.number == cur)
let setV = {}
setV['supplierTelephone'] = entry.phone
setV['supplierPeople'] = Number(entry.contacts)
formRef.value.setValues(setV)
}
}

23
src/views/eam/equipmentSupplier/equipmentSupplier.data.ts

@ -3,10 +3,18 @@ import { dateFormatter } from '@/utils/formatTime'
import { validateHanset,validateNumDot, validateEmail } from '@/utils/validator'
import { handleTreeToComponentOptions } from '@/utils/tree'
import * as DeptApi from '@/api/system/dept'
const deptList = ref<Tree[]>([]) // 树形结构
import * as UserApi from '@/api/system/user'
export interface User {
id: number,
nickname: string
}
const deptList = ref<Tree[]>([]) // 树形结构
// 加载部门树(默认格式)
deptList.value = handleTreeToComponentOptions(await DeptApi.getSimpleDeptList())
const userList = ref<User[]>([])
userList.value = await UserApi.getSimpleUserList()
// 表单校验
export const EquipmentSupplierRules = reactive({
@ -82,7 +90,18 @@ export const EquipmentSupplier = useCrudSchemas(reactive<CrudSchema[]>([
label: '联系人',
field: 'contacts',
sort: 'custom',
isSearch: true
isSearch: true,
form: {
component: 'Select',
componentProps: {
options: userList.value,
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
},
filterable: true,
}
}
},
{
label: '部门',

1
src/views/eam/planSpotCheck/planSpotCheck.data.ts

@ -298,7 +298,6 @@ export const PlanSpotCheck = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '部门id',

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

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="RepairSparePartsRecord.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="RepairSparePartsRecord.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="RepairSparePartsRecordRules"
:formAllSchemas="RepairSparePartsRecord.allSchemas"
:apiUpdate="RepairSparePartsRecordApi.updateRepairSparePartsRecord"
:apiCreate="RepairSparePartsRecordApi.createRepairSparePartsRecord"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="RepairSparePartsRecord.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/repair-spare-parts-record/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { RepairSparePartsRecord,RepairSparePartsRecordRules } from './repairSparePartsRecord.data'
import * as RepairSparePartsRecordApi from '@/api/eam/repairSparePartsRecord'
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: 'RepairSparePartsRecord' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(RepairSparePartsRecord.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: RepairSparePartsRecordApi.getRepairSparePartsRecordPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:repairSparePartsRecord:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:repairSparePartsRecord:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:repairSparePartsRecord:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:repairSparePartsRecord:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:repairSparePartsRecord:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =RepairSparePartsRecord.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 RepairSparePartsRecordApi.createRepairSparePartsRecord(data)
message.success(t('common.createSuccess'))
} else {
await RepairSparePartsRecordApi.updateRepairSparePartsRecord(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicRepairSparePartsRecord')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await RepairSparePartsRecordApi.deleteRepairSparePartsRecord(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 RepairSparePartsRecordApi.exportRepairSparePartsRecord(tableObject.params)
download.excel(data, '备件维修申请.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '备件维修申请导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await RepairSparePartsRecordApi.importTemplate()
})
</script>

238
src/views/eam/repairSparePartsRecord/repairSparePartsRecord.data.ts

@ -0,0 +1,238 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const RepairSparePartsRecordRules = reactive({
number: [required],
sparePartsCode: [required],
qty: [required],
areaCode: [required],
locationCode: [required],
status: [required],
result: [required],
applyer: [required],
concurrencyStamp: [required]
})
export const RepairSparePartsRecord = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单号',
field: 'number',
sort: 'custom',
isSearch: true
},
{
label: '备件编号',
field: 'sparePartsCode',
sort: 'custom',
isSearch: true
},
{
label: '数量',
field: 'qty',
sort: 'custom',
isSearch: true
},
{
label: '库区编号',
field: 'areaCode',
sort: 'custom',
isSearch: true,
form: {
component: 'Select'
}
},
{
label: '库位编号',
field: 'locationCode',
sort: 'custom',
isSearch: true,
form: {
component: 'Select'
}
},
{
label: '流程状态',
field: 'status',
sort: 'custom',
isSearch: true,
form: {
component: 'Radio'
}
},
{
label: '结果状态',
field: 'result',
sort: 'custom',
isSearch: true,
form: {
component: 'Select'
}
},
{
label: '申请人',
field: 'applyer',
sort: 'custom',
isSearch: true
},
{
label: '审核人',
field: 'approver',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: '审核内容',
field: 'approveContent',
sort: 'custom',
isSearch: true,
form: {
component: 'Editor',
componentProps: {
valueHtml: '',
height: 200
}
}
},
{
label: '审核时间',
field: 'approveTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
}
},
{
label: '自动审核',
field: 'autoExamine',
sort: 'custom',
isSearch: true
},
{
label: '自动通过',
field: 'autoAgree',
sort: 'custom',
isSearch: true
},
{
label: '直接生成记录',
field: 'directCreateRecord',
sort: 'custom',
isSearch: true
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isSearch: true
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true
},
{
label: '地点',
field: 'siteId',
sort: 'custom',
isSearch: true
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '删除时间',
field: 'deletionTime',
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: 'deleterId',
sort: 'custom',
isSearch: true
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

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

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="RepairSparePartsRequest.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="RepairSparePartsRequest.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="RepairSparePartsRequestRules"
:formAllSchemas="RepairSparePartsRequest.allSchemas"
:apiUpdate="RepairSparePartsRequestApi.updateRepairSparePartsRequest"
:apiCreate="RepairSparePartsRequestApi.createRepairSparePartsRequest"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="RepairSparePartsRequest.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/repair-spare-parts-request/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { RepairSparePartsRequest,RepairSparePartsRequestRules } from './repairSparePartsRequest.data'
import * as RepairSparePartsRequestApi from '@/api/eam/repairSparePartsRequest'
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: 'RepairSparePartsRequest' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(RepairSparePartsRequest.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: RepairSparePartsRequestApi.getRepairSparePartsRequestPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:repairSparePartsRequest:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:repairSparePartsRequest:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:repairSparePartsRequest:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:repairSparePartsRequest:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:repairSparePartsRequest:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =RepairSparePartsRequest.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 RepairSparePartsRequestApi.createRepairSparePartsRequest(data)
message.success(t('common.createSuccess'))
} else {
await RepairSparePartsRequestApi.updateRepairSparePartsRequest(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicRepairSparePartsRequest')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await RepairSparePartsRequestApi.deleteRepairSparePartsRequest(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 RepairSparePartsRequestApi.exportRepairSparePartsRequest(tableObject.params)
download.excel(data, '备件维修申请.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '备件维修申请导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await RepairSparePartsRequestApi.importTemplate()
})
</script>

251
src/views/eam/repairSparePartsRequest/repairSparePartsRequest.data.ts

@ -0,0 +1,251 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const RepairSparePartsRequestRules = reactive({
number: [required],
sparePartsCode: [required],
qty: [required],
areaCode: [required],
locationCode: [required],
status: [required],
result: [required],
applyer: [required],
concurrencyStamp: [required],
repairCause: [required]
})
export const RepairSparePartsRequest = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false
},
{
label: '单号',
field: 'number',
sort: 'custom',
isSearch: true
},
{
label: '备件编号',
field: 'sparePartsCode',
sort: 'custom',
isSearch: true
},
{
label: '数量',
field: 'qty',
sort: 'custom',
isSearch: true
},
{
label: '库区编号',
field: 'areaCode',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
}
},
{
label: '库位编号',
field: 'locationCode',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
}
},
{
label: '流程状态枚举0:待审核1:已撤回3:审核中4:已通过5:已驳回6:已完成',
field: 'status',
sort: 'custom',
isSearch: true,
form: {
component: 'Radio'
}
},
{
label: '结果状态枚举:0待维修,1已废弃,2已修好',
field: 'result',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
}
},
{
label: '申请人',
field: 'applyer',
sort: 'custom',
isSearch: true
},
{
label: '审核人',
field: 'approver',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: '审核内容',
field: 'approveContent',
sort: 'custom',
isSearch: true,
form: {
component: 'Editor',
componentProps: {
valueHtml: '',
height: 200
}
}
},
{
label: '审核时间',
field: 'approveTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
}
},
{
label: '自动审核',
field: 'autoExamine',
sort: 'custom',
isSearch: true
},
{
label: '自动通过',
field: 'autoAgree',
sort: 'custom',
isSearch: true
},
{
label: '直接生成记录',
field: 'directCreateRecord',
sort: 'custom',
isSearch: true
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isSearch: true
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true
},
{
label: '地点',
field: 'siteId',
sort: 'custom',
isSearch: true
},
{
label: '是否可用--默认TRUE',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '删除时间',
field: 'deletionTime',
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: 'deleterId',
sort: 'custom',
isSearch: true
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: '维修原因',
field: 'repairCause',
sort: 'custom',
isSearch: true
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

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

@ -52,6 +52,7 @@
:apiCreate="ToolAccountsApi.createToolAccounts"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
@onChange="onChange"
/>
<!-- 详情 -->
@ -149,6 +150,7 @@ import * as WorkshopApi from '@/api/wms/workshop'
import * as ProductionlineApi from '@/api/wms/productionline'
import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier'
import * as EquipmentManufacturerApi from '@/api/eam/equipmentManufacturer'
import * as UserApi from '@/api/system/user'
defineOptions({ name: 'ToolAccounts' })
@ -172,6 +174,10 @@ const operationRecordList = ref([
{ label: '巡检记录', value: 'inspection' },
{ label: '点检记录', value: 'spot_check' }
])
export interface User {
id: number,
nickname: string
}
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
@ -521,6 +527,28 @@ const submitSparePartRelation = (formField, searchField, val, formRef, rowRef) =
}
)
}
const onChange = async (field, cur, formRef) => {
if(field == 'purchaseDept'){
const userList = ref<User[]>([])
userList.value = await UserApi.getUserListByDeptIds([cur])
ToolAccounts.allSchemas.formSchema.find(item => item.field == 'purchaser').componentProps.options = userList.value
let setV = {}
setV['purchaser'] = ''
formRef.value.setValues(setV)
}
if(field == 'useDept'){
const user01List = ref<User[]>([])
user01List.value = await UserApi.getUserListByDeptIds([cur])
ToolAccounts.allSchemas.formSchema.find(item => item.field == 'principal').componentProps.options = user01List.value
let setV = {}
setV['principal'] = ''
formRef.value.setValues(setV)
}
}
/** 初始化 **/
onMounted(async () => {
getList()

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

@ -9,19 +9,36 @@ import * as EquipmentManufacturerApi from '@/api/eam/equipmentManufacturer'
import { EquipmentManufacturer } from '@/views/eam/equipmentManufacturer/equipmentManufacturer.data'
import * as ProductionlineApi from '@/api/wms/productionline'
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data'
import * as UserApi from '@/api/system/user'
import { handleTreeToComponentOptions } from '@/utils/tree'
import * as DeptApi from '@/api/system/dept'
import * as BasicEamWorkshopApi from '@/api/eam/basicEamWorkshop'
import { BasicEamWorkshop } from '@/views/eam/basicEamWorkshop/basicEamWorkshop.data'
export interface User {
id: number,
nickname: string
}
const workshopNoPage = await WorkshopApi.getWorkshopNoPage({})
const workshopNoPage = await BasicEamWorkshopApi.getBasicEamWorkshopNoPage({})
const equipmentManufacturerNoPage = await EquipmentManufacturerApi.getEquipmentManufacturerNoPage({})
const equipmentSupplierNoPage = await EquipmentSupplierApi.getEquipmentSupplierNoPage({})
const productionlineNoPage = await ProductionlineApi.getProductionlineNoPage({});
const autoCodeSwitch = await ConfigApi.getConfigKey('toolCodeAutoSwitch')
const autoCodeSwitch = await ConfigApi.getConfigKey('deviceCodeAutoSwitch')
// ProductionlineApi.getProductionlinePage
const autoSwitch = ref(false)
if (autoCodeSwitch == 'TRUE') {
autoSwitch.value = true
}
const allDeptList = await DeptApi.getSimpleDeptList();
const deptList = ref<Tree[]>([]) // 树形结构
// 加载部门树(默认格式)
deptList.value = handleTreeToComponentOptions(allDeptList)
const userList = ref<User[]>([])
userList.value = await UserApi.getSimpleUserList()
// 表单校验
export const ToolAccountsRules = reactive({
code: [required],
@ -100,13 +117,41 @@ export const ToolAccounts = useCrudSchemas(reactive<CrudSchema[]>([
label: '使用部门',
field: 'useDept',
sort: 'custom',
isSearch: false
isTable: false,
isDetail: false,
isSearch: false,
isTableForm: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return allDeptList.find((item) => item.id == cellValue)?.name
},
form: {
component: 'TreeSelect',
componentProps: { // 假设deptList是部门数据列表
data: deptList,
placeholder: "请选择部门",
filterable: true,
}
}
},
{
label: '负责人',
field: 'principal',
sort: 'custom',
isSearch: false
isSearch: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userList.value.find((item) => item.id == cellValue)?.nickname
},
form: {
component: 'Select',
componentProps: {
options: userList.value,
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
},
filterable: true,
}
}
},
{
label: '负责人联系方式',
@ -119,6 +164,8 @@ export const ToolAccounts = useCrudSchemas(reactive<CrudSchema[]>([
field: 'status',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.DEVICE_STATUS,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'Select'
}
@ -218,13 +265,38 @@ export const ToolAccounts = useCrudSchemas(reactive<CrudSchema[]>([
label: '采购部门',
field: 'purchaseDept',
sort: 'custom',
isSearch: true
isSearch: true,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return allDeptList.find((item) => item.id == cellValue)?.name
},
form: {
component: 'TreeSelect',
componentProps: { // 假设deptList是部门数据列表
data: deptList,
placeholder: "请选择部门",
filterable: true,
}
}
},
{
label: '采购人',
field: 'purchaser',
sort: 'custom',
isSearch: true
isSearch: true,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userList.value.find((item) => item.id == cellValue)?.nickname
},
form: {
component: 'Select',
componentProps: {
options: userList.value,
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
},
filterable: true,
}
}
},
{
label: '出厂日期',
@ -369,8 +441,8 @@ export const ToolAccounts = useCrudSchemas(reactive<CrudSchema[]>([
searchListPlaceholder: '请选择车间代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '车间信息', // 查询弹窗标题
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法
searchAllSchemas: BasicEamWorkshop.allSchemas, // 查询弹窗所需类
searchPage: BasicEamWorkshopApi.getBasicEamWorkshopPage, // 查询弹窗所需分页方法
disable:true,
searchCondition: [{
key: 'available',
@ -380,58 +452,58 @@ export const ToolAccounts = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '产线编号',
field: 'lineCode',
sort: 'custom',
isSearch: true,
isDetail: false,
isForm: false,
isTable: true,
isTableForm: false,
search: {
component: 'Select',
componentProps: {
options: productionlineNoPage,
optionsAlias: {
labelField: 'name',
valueField: 'code'
},
filterable: true,
}
},
formatter: (_: Recordable, __: TableColumn, cellValue: string) => {
return productionlineNoPage.find((item) => item.code == cellValue)?.name
},
},
{
label: '产线编号',
field: 'lineName',
sort: 'custom',
isSearch: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
multiple:true,
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition: [{
key:'workshopCode',
value:'workshopCode',
message: '请填写车间代码!',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
// {
// label: '产线编号',
// field: 'lineCode',
// sort: 'custom',
// isSearch: true,
// isDetail: false,
// isForm: false,
// isTable: true,
// isTableForm: false,
// search: {
// component: 'Select',
// componentProps: {
// options: productionlineNoPage,
// optionsAlias: {
// labelField: 'name',
// valueField: 'code'
// },
// filterable: true,
// }
// },
// formatter: (_: Recordable, __: TableColumn, cellValue: string) => {
// return productionlineNoPage.find((item) => item.code == cellValue)?.name
// },
// },
// {
// label: '产线编号',
// field: 'lineName',
// sort: 'custom',
// isSearch: false,
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
// multiple:true,
// searchField: 'code', // 查询弹窗赋值字段
// searchTitle: '生产线信息', // 查询弹窗标题
// searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
// searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
// searchCondition: [{
// key:'workshopCode',
// value:'workshopCode',
// message: '请填写车间代码!',
// isMainValue: true
// },{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// }
// },
// {
// label: '工序编号',
// field: 'processCode',
@ -494,12 +566,12 @@ export const ToolAccounts = useCrudSchemas(reactive<CrudSchema[]>([
// }
// },
// },
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isSearch: false
},
// {
// label: '部门',
// field: 'departmentCode',
// sort: 'custom',
// isSearch: false
// },
{
label: '备注',
field: 'remark',
@ -645,7 +717,7 @@ export const ToolAccounts = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action',
isForm: false,
table: {
width: 150,
width: 300,
fixed: 'right'
}
}

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

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ToolChangedRecord.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ToolChangedRecord.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="ToolChangedRecordRules"
:formAllSchemas="ToolChangedRecord.allSchemas"
:apiUpdate="ToolChangedRecordApi.updateToolChangedRecord"
:apiCreate="ToolChangedRecordApi.createToolChangedRecord"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ToolChangedRecord.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/tool-changed-record/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ToolChangedRecord,ToolChangedRecordRules } from './toolChangedRecord.data'
import * as ToolChangedRecordApi from '@/api/eam/toolChangedRecord'
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: 'ToolChangedRecord' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ToolChangedRecord.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: ToolChangedRecordApi.getToolChangedRecordPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'eam:tool-changed-record:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'eam:tool-changed-record:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'eam:tool-changed-record:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'eam:tool-changed-record:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:tool-changed-record:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =ToolChangedRecord.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 ToolChangedRecordApi.createToolChangedRecord(data)
message.success(t('common.createSuccess'))
} else {
await ToolChangedRecordApi.updateToolChangedRecord(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicToolChangedRecord')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ToolChangedRecordApi.deleteToolChangedRecord(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 ToolChangedRecordApi.exportToolChangedRecord(tableObject.params)
download.excel(data, '设备变更记录.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '设备变更记录导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ToolChangedRecordApi.importTemplate()
})
</script>

110
src/views/eam/toolChangedRecord/toolChangedRecord.data.ts

@ -0,0 +1,110 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as UserApi from '@/api/system/user'
export interface User {
id: number,
nickname: string
}
// 表单校验
export const ToolChangedRecordRules = reactive({
code: [required],
name: [required],
concurrencyStamp: [required]
})
const userList = ref<User[]>([])
userList.value = await UserApi.getSimpleUserList()
export const ToolChangedRecord = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '工装编号',
field: 'code',
sort: 'custom',
isSearch: true,
fixed: 'left'
},
{
label: '工装名称',
field: 'name',
sort: 'custom',
isSearch: true
},
{
label: '变更前状态',
field: 'statusBefore',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.DEVICE_STATUS,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'Select'
}
},
{
label: '变更后状态',
field: 'statusAfter',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.DEVICE_STATUS,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'Select',
}
},
{
label: '操作人',
field: 'operator',
sort: 'custom',
isSearch: true,
search: {
component: 'Select',
componentProps: {
options: userList.value,
optionsAlias: {
valueField: 'id',
labelField: 'nickname'
},
filterable: true,
clearable: true
}
},
},
{
label: '操作时间',
field: 'operateTime',
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: 'remark',
sort: 'custom',
isSearch: true
},
// {
// label: '操作',
// field: 'action',
// isForm: false,
// table: {
// width: 150,
// fixed: 'right'
// }
// }
]))

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

@ -57,7 +57,7 @@
<ImportForm ref="importFormRef" url="/eam/basic/tool-mod/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<!-- 表单弹窗添加/修改 -->
<teamForm ref="basicFormRef" @success="formsSuccess" :formAllSchemas="ToolMod.allSchemas"/>
<TeamForm ref="basicFormRef" @success="formsSuccess" :formAllSchemas="ToolMod.allSchemas"/>
</template>
<script setup lang="ts">

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

@ -8,6 +8,18 @@
label-width="80px"
>
<el-row>
<el-col :span="24">
<el-form-item label="类型" prop="type">
<el-select v-model="formData.type" placeholder="请选择类型">
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.DEVICE_TYPE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="工装" prop="toolCode">
<div class="tag-container flex gap-2">
@ -48,23 +60,9 @@
</div>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="类型" prop="type">
<el-select v-model="formData.type" placeholder="请选择类型">
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.DEVICE_TYPE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" placeholder="请输入内容" />
<el-input type='textarea' v-model="formData.remark" placeholder="请输入内容" />
</el-form-item>
</el-col>
</el-row>

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

@ -14,6 +14,17 @@ export const ToolModRules = reactive({
})
export const ToolMod = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Select',
}
},
{
label: '工装编码',
field: 'toolCode',
@ -108,17 +119,7 @@ export const ToolMod = useCrudSchemas(reactive<CrudSchema[]>([
// }
// }
// },
{
label: '类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Select'
}
},
// {
// label: '部门',
// field: 'departmentCode',

280
src/views/eam/toolSigning/index.vue

@ -0,0 +1,280 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ToolSigning.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ToolSigning.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="ToolSigningRules"
:formAllSchemas="ToolSigning.allSchemas"
:apiUpdate="ToolSigningApi.updateToolSigning"
:apiCreate="ToolSigningApi.createToolSigningNew"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
@onChange="onChange"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ToolSigning.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/tool-signing/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ToolSigning,ToolSigningRules } from './toolSigning.data'
import * as ToolSigningApi from '@/api/eam/toolSigning'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier'
import * as UserApi from '@/api/system/user'
defineOptions({ name: 'ToolSigning' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ToolSigning.allSchemas.tableColumns)
//
const searchTableSuccess = async (formField, searchField, val, formRef) => {
const setV = {}
setV[formField] = val[0][searchField]
if(formField == 'toolName'){
setV['toolCode'] = val[0]['code']
setV['toolName'] = val[0]['name']
setV['supplierCode'] = val[0]['supplierCode']
setV['workshopCode'] = val[0]['workshopCode']
const equipmentSupplierList = await EquipmentSupplierApi.getEquipmentSupplierNoPage({})
const entry = equipmentSupplierList.find(item => item.number == val[0]['supplierCode'])
setV['supplierTelephone'] = entry?.phone
setV['supplierPeople'] = Number(entry?.contacts)
}
nextTick(() => {
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: ToolSigningApi.getToolSigningPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:tool-signing:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'eam:tool-signing:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'eam:tool-signing:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'eam:tool-signing:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:tool-signing:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =ToolSigning.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 ToolSigningApi.createToolSigningNew(data)
message.success(t('common.createSuccess'))
} else {
await ToolSigningApi.updateToolSigning(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicToolSigning')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ToolSigningApi.deleteToolSigning(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 ToolSigningApi.exportToolSigning(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 onChange = async (field, cur, formRef) => {
if(field == 'operationDept'){
const userList = await UserApi.getUserListByDeptIds([cur])
ToolSigning.allSchemas.formSchema.find(item => item.field == 'operationer').componentProps.options = userList
let setV = {}
setV['operationer'] = ''
formRef.value.setValues(setV)
}
if(field == 'supplierCode'){
const equipmentSupplierList = await EquipmentSupplierApi.getEquipmentSupplierNoPage({})
const entry = equipmentSupplierList.find(item => item.number == cur)
let setV = {}
setV['supplierTelephone'] = entry.phone
setV['supplierPeople'] = Number(entry.contacts)
formRef.value.setValues(setV)
}
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ToolSigningApi.importTemplate()
})
</script>

487
src/views/eam/toolSigning/toolSigning.data.ts

@ -0,0 +1,487 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { handleTreeToComponentOptions } from '@/utils/tree'
import * as DeptApi from '@/api/system/dept'
import * as UserApi from '@/api/system/user'
import { ToolAccounts,ToolAccountsRules } from '../toolAccounts/toolAccounts.data'
import * as ToolAccountsApi from '@/api/eam/toolAccounts'
import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier'
import * as BasicEamWorkshopApi from '@/api/eam/basicEamWorkshop'
export interface User {
id: number,
nickname: string
}
const toolList = await ToolAccountsApi.getToolAccountsNoPage({})
const workshopList = await BasicEamWorkshopApi.getBasicEamWorkshopNoPage({})
const equipmentSupplierList = await EquipmentSupplierApi.getEquipmentSupplierNoPage({})
const allDeptList = await DeptApi.getSimpleDeptList()
const deptList = ref<Tree[]>([]) // 树形结构
const userList = ref<User[]>([])
userList.value = await UserApi.getSimpleUserList()
// 加载部门树(默认格式)
deptList.value = handleTreeToComponentOptions(allDeptList)
// 表单校验
export const ToolSigningRules = reactive({
toolCode: [required],
operationDate: [required],
operationer: [required],
operationDept: [required],
storageLocation: [required],
concurrencyStamp: [required]
})
export const ToolSigning = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '工装',
field: 'toolCode',
sort: 'custom',
isSearch: true,
isTable: true,
isForm: false,
isDetail: false,
isTableForm: false,
formatter: (_: Recordable, __: TableColumn, cellValue: string) => {
return toolList.find((item) => item.code == cellValue)?.name
},
},
{
label: '工装',
field: 'toolName',
sort: 'custom',
isSearch: false,
isTable: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择设备', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '设备信息', // 查询弹窗标题
searchAllSchemas: ToolAccounts.allSchemas, // 查询弹窗所需类
searchPage: ToolAccountsApi.getToolAccountsPage, // 查询弹窗所需分页方法
searchCondition:
[{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'status',
value: 'TOACCEPT',
isMainValue: false
}]
}
},
},
{
label: '验收日期',
field: 'operationDate',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
}
},
{
label: '验收部门',
field: 'operationDept',
sort: 'custom',
isSearch: true,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return allDeptList.find((item) => item.id == cellValue)?.name
},
form: {
component: 'TreeSelect',
componentProps: { // 假设deptList是部门数据列表
data: deptList.value,
disabled: false,
placeholder: "请选择部门",
filterable: true,
multiple: false,
}
}
},
{
label: '验收人',
field: 'operationer',
sort: 'custom',
isSearch: true,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userList.value.find((item) => item.id == cellValue)?.nickname
},
form: {
component: 'Select',
componentProps: { // 假设deptList是部门数据列表
options: userList.value,
optionsAlias: {
valueField: 'id',
labelField: 'nickname'
},
disabled: false,
placeholder: "请先选择部门",
filterable: true,
multiple: false,
}
}
},
{
label: '验收人联系方式',
field: 'telephone',
sort: 'custom',
isSearch: false
},
{
label: '供应商编号',
field: 'supplierCode',
sort: 'custom',
isSearch: false,
isForm: true,
isDetail: false,
isTable: false,
isTableForm: false,
form: {
component: 'Select',
componentProps: {
options: equipmentSupplierList,
optionsAlias: {
labelField: 'name',
valueField: 'number'
},
filterable: true,
disabled: true,
}
}
},
// {
// label: '供应商编号',
// field: 'supplierName',
// sort: 'custom',
// isSearch: false,
// isForm: true,
// isDetail: false,
// isTable: false,
// isTableForm: false,
// form: {
// component: 'Input',
// componentProps: {
// disabled: true
// }
// }
// },
{
label: '供应商联系人',
field: 'supplierPeople',
sort: 'custom',
isSearch: true,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userList.value.find((item) => item.id == cellValue)?.nickname
},
form: {
component: 'Select',
componentProps: {
options: userList.value,
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
},
disabled: true,
}
}
},
{
label: '供应商联系方式',
field: 'supplierTelephone',
sort: 'custom',
isSearch: false,
isForm: true,
form: {
component: 'Input',
componentProps: {
disabled: true
}
}
},
// {
// label: '流程状态',
// field: 'status',
// sort: 'custom',
// isSearch: true,
// dictType: DICT_TYPE.JOB_STATUS,
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
// form: {
// component: 'Select'
// }
// },
// {
// label: '审核人',
// field: 'approver',
// sort: 'custom',
// isSearch: true,
// form: {
// component: 'InputNumber',
// value: 0
// }
// },
// {
// label: '审核内容',
// field: 'approveContent',
// sort: 'custom',
// isSearch: false,
// form: {
// component: 'Input',
// componentProps: {
// type: 'textarea',
// valueHtml: '',
// height: 200
// }
// }
// },
// {
// label: '审核时间',
// field: 'approveTime',
// sort: 'custom',
// formatter: dateFormatter,
// isSearch: false,
// search: {
// component: 'DatePicker',
// componentProps: {
// valueFormat: 'YYYY-MM-DD HH:mm:ss',
// type: 'daterange',
// defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
// }
// },
// form: {
// component: 'DatePicker',
// componentProps: {
// type: 'datetime',
// valueFormat: 'x'
// }
// }
// },
// {
// label: '自动审核',
// field: 'autoExamine',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
// isSearch: false,
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
// {
// label: '自动通过',
// field: 'autoAgree',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
// isSearch: false,
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
// {
// label: '直接生成记录',
// field: 'directCreateRecord',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
// isSearch: false,
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
{
label: '存放位置描述',
field: 'storageLocation',
sort: 'custom',
isSearch: false,
isForm: true,
form: {
component: 'Input',
componentProps: {
type: 'textarea',
placeholder: '请输入存放位置描述'
}
}
},
// {
// label: '所属厂区编号',
// field: 'factoryAreaCode',
// sort: 'custom',
// isSearch: false
// },
{
label: '车间编号',
field: 'workshopCode',
sort: 'custom',
isSearch: true,
isForm: true,
formatter: (_: Recordable, __: TableColumn, cellValue: string) => {
return workshopList.find((item) => item.code == cellValue)?.name
},
form: {
component: 'Select',
componentProps: {
options: workshopList,
placeholder: '请选择车间编号',
optionsAlias: {
valueField: 'code',
labelField: 'name'
}
}
}
},
// {
// label: '产线编号',
// field: 'lineCode',
// sort: 'custom',
// isSearch: true,
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
// multiple:true,
// searchField: 'code', // 查询弹窗赋值字段
// searchTitle: '生产线信息', // 查询弹窗标题
// searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
// searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
// searchCondition: [{
// key:'workshopCode',
// value:'workshopCode',
// message: '请填写车间代码!',
// isMainValue: true
// },{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// }
// },
// {
// label: '工序编号',
// field: 'processCode',
// sort: 'custom',
// isSearch: true,
// form:{
// componentProps: {
// isSearchList: true,
// searchListPlaceholder: '请选择工序代码',
// searchField: 'code',
// searchTitle: '工序信息',
// searchAllSchemas: Process.allSchemas,
// searchPage: ProcessApi.getProcessPage,
// searchCondition: [{
// key:'productionLineCode',
// value:'lineCode',
// message: '请填写生产线代码!',
// isMainValue: true
// },{
// key:'workshopCode',
// value:'workshopCode',
// message: '请填写车间代码!',
// isMainValue: true
// },{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// },
// },
// {
// label: '工位编号',
// field: 'workstationCode',
// sort: 'custom',
// isSearch: true,
// form:{
// componentProps: {
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择工位', // 输入框占位文本
// searchField: 'code', // 查询弹窗赋值字段
// searchTitle: '工位信息', // 查询弹窗标题
// searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
// searchPage: WorkStationApi.getWorkstationPage, // 查询弹窗所需分页方法
// searchCondition: [{
// key:'productionLineCode',
// value:'lineCode',
// message: '请填写生产线代码!',
// isMainValue: true
// },{
// key:'workshopCode',
// value:'workshopCode',
// message: '请填写车间代码!',
// isMainValue: true
// },{
// key:'available',
// value:'TRUE',
// isMainValue: false
// }]
// }
// },
// },
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false
},
// {
// label: '是否可用',
// field: 'available',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
// isSearch: true,
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
// {
// label: '操作',
// field: 'action',
// isForm: false,
// table: {
// width: 150,
// fixed: 'right'
// }
// }
]))

37
src/views/qms/counter/counter.data.ts

@ -21,6 +21,7 @@ export const Counter = useCrudSchemas(
sort: 'custom',
isSearch: true,
fixed: 'left',
isForm: false,
table: {
fixed: 'left',
width: 175
@ -32,6 +33,7 @@ export const Counter = useCrudSchemas(
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.INSPECTION_TYPE,
isForm: false,
table: {
width: 175
}
@ -41,6 +43,7 @@ export const Counter = useCrudSchemas(
field: 'supplierCode',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 175
}
@ -50,6 +53,7 @@ export const Counter = useCrudSchemas(
field: 'qualifiedTimes',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 140
}
@ -59,6 +63,7 @@ export const Counter = useCrudSchemas(
field: 'lastQualifiedBatch',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 140
}
@ -69,6 +74,7 @@ export const Counter = useCrudSchemas(
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isForm: false,
search: {
component: 'DatePicker',
componentProps: {
@ -93,6 +99,7 @@ export const Counter = useCrudSchemas(
field: 'unqualifiedTimes',
sort: 'custom',
isSearch: false,
isForm: false,
form: {
component: 'InputNumber',
value: 0
@ -106,6 +113,7 @@ export const Counter = useCrudSchemas(
field: 'lastUnqualifiedBatch',
sort: 'custom',
isSearch: false,
isForm: false,
form: {
component: 'InputNumber',
value: 0
@ -120,6 +128,7 @@ export const Counter = useCrudSchemas(
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: false,
search: {
component: 'DatePicker',
componentProps: {
@ -144,6 +153,16 @@ export const Counter = useCrudSchemas(
field: 'nextStage',
sort: 'custom',
isSearch: false,
form:{
component: 'Select',
componentProps: {
options:[],
optionsAlias: {
labelField: 'stage',
valueField: 'stage'
}
}
},
table: {
width: 140
}
@ -213,14 +232,14 @@ export const Counter = useCrudSchemas(
}
},
// {
// label: '操作',
// field: 'action',
// isForm: false,
// table: {
// width: 150,
// fixed: 'right'
// }
// }
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
])
)

10
src/views/qms/counter/index.vue

@ -134,7 +134,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'qms:counter:update'}), //
defaultButtons.mainListEditBtn({hasPermi:'qms:counter:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'qms:counter:delete'}), //
]
@ -149,7 +149,13 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
const openForm = async (type: string, row?: any) => {
for (const item of Counter.allSchemas.formSchema) {
if (item.field === 'nextStage') {
item.componentProps.options = await CounterApi.getNextStage(row.id)
}
}
basicFormRef.value.open(type, row)
}

3
src/views/qms/inspectionJob/inspectionJobMain.data.ts

@ -211,10 +211,11 @@ export const InspectionJobMain = useCrudSchemas(
}
},
{
label: '检验批次',
label: '批次',
field: 'inspectionBatch',
sort: 'custom',
isSearch: false,
isDetail: true,
form: {
componentProps: {
disabled: true

2
src/views/qms/inspectionRecord/inspectionRecordMain.data.ts

@ -466,7 +466,7 @@ export const InspectionRecordMain = useCrudSchemas(
isForm: false,
isDetail: false,
table: {
width: 150,
width: 200,
fixed: 'right'
}
}

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

@ -64,27 +64,27 @@ export const Itembasic = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
} ,
},
{
label: '状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.ITEM_STATUS,
dictClass: 'string',
isForm: false,
isSearch: false,
isTable: false,
table: {
width: 100
} ,
form: {
component: 'Switch',
value: 'ENABLE',
componentProps: {
inactiveValue: 'DISABLE',
activeValue: 'ENABLE'
}
},
},
// {
// label: '状态',
// field: 'status',
// sort: 'custom',
// dictType: DICT_TYPE.ITEM_STATUS,
// dictClass: 'string',
// isForm: false,
// isSearch: false,
// isTable: false,
// table: {
// width: 100
// } ,
// form: {
// component: 'Switch',
// value: 'ENABLE',
// componentProps: {
// inactiveValue: 'DISABLE',
// activeValue: 'ENABLE'
// }
// },
// },
{
label: '计量单位',
field: 'uom',
@ -498,9 +498,9 @@ export const rules = reactive({
{ required: true, message: '请输入名称', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
],
status: [
{ required: true, message: '请选择状态', trigger: 'change' },
],
// status: [
// { required: true, message: '请选择状态', trigger: 'change' },
// ],
uom: [
{ required: true, message: '请选择计量单位', trigger: 'change' },
],

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

@ -73,7 +73,7 @@ export const Packageunit1 = useCrudSchemas(reactive<CrudSchema[]>([
label: '单位',
field: 'unit',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string',
isSearch: false,
table: {
@ -417,7 +417,7 @@ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
label: '单位',
field: 'unit',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string',
isSearch: false,
table: {

244
src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ProductionitemcodeSpareitemcode.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ProductionitemcodeSpareitemcode.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="ProductionitemcodeSpareitemcodeRules"
:formAllSchemas="ProductionitemcodeSpareitemcode.allSchemas"
:apiUpdate="ProductionitemcodeSpareitemcodeApi.updateProductionitemcodeSpareitemcode"
:apiCreate="ProductionitemcodeSpareitemcodeApi.createProductionitemcodeSpareitemcode"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ProductionitemcodeSpareitemcode.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/productionitemcode-spareitemcode/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ProductionitemcodeSpareitemcode,ProductionitemcodeSpareitemcodeRules } from './productionitemcodeSpareitemcode.data'
import * as ProductionitemcodeSpareitemcodeApi from '@/api/wms/productionitemcodeSpareitemcode'
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: 'ProductionitemcodeSpareitemcode' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ProductionitemcodeSpareitemcode.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: ProductionitemcodeSpareitemcodeApi.getProductionitemcodeSpareitemcodePage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:productionitemcode-spareitemcode:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:productionitemcode-spareitemcode:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:productionitemcode-spareitemcode:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:productionitemcode-spareitemcode:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:productionitemcode-spareitemcode:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =ProductionitemcodeSpareitemcode.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 ProductionitemcodeSpareitemcodeApi.createProductionitemcodeSpareitemcode(data)
message.success(t('common.createSuccess'))
} else {
await ProductionitemcodeSpareitemcodeApi.updateProductionitemcodeSpareitemcode(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicProductionitemcodeSpareitemcode')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ProductionitemcodeSpareitemcodeApi.deleteProductionitemcodeSpareitemcode(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 ProductionitemcodeSpareitemcodeApi.exportProductionitemcodeSpareitemcode(tableObject.params)
download.excel(data, '量产件备件关系.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '量产件备件关系导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ProductionitemcodeSpareitemcodeApi.importTemplate()
})
</script>

72
src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/productionitemcodeSpareitemcode.data.ts

@ -0,0 +1,72 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const ProductionitemcodeSpareitemcodeRules = reactive({
productionItemCode: [required],
available: [required],
})
export const ProductionitemcodeSpareitemcode = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '量产件',
field: 'productionItemCode',
sort: 'custom',
isSearch: true,
},
{
label: '备件',
field: 'spareItemCode',
sort: 'custom',
isSearch: true,
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

3
src/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data.ts

@ -81,7 +81,8 @@ export const Productionlineitem = useCrudSchemas(reactive<CrudSchema[]>([
form: {
show:true,
component: 'SelectV2',
value:'undefined',
// value:'undefined',
value:lineCodeData?.list.length>0?lineCodeData.list[0].code:'undefined',
// labelMessage: '信息提示说明!!!',
componentProps: {
// isSearchList: true,

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

@ -117,15 +117,6 @@ export const RelegateRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 表单校验
export const RelegateRecordDetailRules = reactive({
@ -317,14 +308,4 @@ export const RelegateRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '操作',
field: 'action',
isForm: false,
hiddenInMain:true,
table: {
width: 150,
fixed: 'right'
}
}
]))

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

@ -70,7 +70,15 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
table: {
@ -350,6 +358,7 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
form: {
componentProps: {
enterSearch: true,
isSearchList: true,
searchListPlaceholder: '请选择降级物料代码',
searchField: 'code',
@ -364,7 +373,15 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
key: 'type',
value: confgiData.itemType,
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
tableForm:{

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

@ -37,7 +37,8 @@ export const CallmaterialsRules = reactive({
workshopCode: [required],
workStationCode: [required],
uom: [required],
callmaterialQty: [required]
callmaterialQty: [required],
project: [{ max: 50, message: '最多50字符', trigger: 'blur'}]
})
export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
@ -358,6 +359,13 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 100
} ,
form: {
componentProps:{
maxlength: 50,
type:'textarea',
showWordLimit:true
}
},
},
{
label: '库位',

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

@ -199,7 +199,7 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
if (type == 'create') {
// nextTick(() => {
@ -272,8 +272,17 @@ const BASE_URL = getJmreportBaseUrl()
const src = ref(BASE_URL + '/jmreport/view/924811818898698240?token=' + getAccessToken())
const srcPoint = ref(BASE_URL + '/jmreport/view/940818992169918464?token=' + getAccessToken())
//
// const handlePoint = async (row) => {
// window.open(src.value+'&relateNumber='+row.id)
// }
const handlePoint = async (row) => {
window.open(src.value+'&relateNumber='+row.id)
let rows = [row.id]; // row.id
await PackageApi.batchPrintingLable(rows.join(',')).then(res => {
window.open(srcPoint.value + '&relateNumber=' + res);
message.success('创建标签成功');
}).catch(err => {
message.error('创建标签失败');
});
}
//
const handleSelectionPoint = async ()=>{

42
src/views/wms/countManage/count/countRecordMain/countRecordMain.data.ts

@ -155,27 +155,27 @@ export const CountRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '生效日期',
field: 'activeDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
},
// {
// label: '生效日期',
// field: 'activeDate',
// formatter: dateFormatter2,
// detail: {
// dateFormat: 'YYYY-MM-DD'
// },
// sort: 'custom',
// table: {
// width: 180
// },
// form: {
// component: 'DatePicker',
// componentProps: {
// style: {width: '100%'},
// type: 'date',
// dateFormat: 'YYYY-MM-DD',
// valueFormat: 'x',
// }
// },
// },
{
label: '业务类型',
field: 'businessType',

42
src/views/wms/countManage/countadjust/countadjustRecordMain/countadjustRecordMain.data.ts

@ -127,27 +127,27 @@ export const CountadjustRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '生效日期',
field: 'activeDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
},
// {
// label: '生效日期',
// field: 'activeDate',
// formatter: dateFormatter2,
// detail: {
// dateFormat: 'YYYY-MM-DD'
// },
// sort: 'custom',
// table: {
// width: 180
// },
// form: {
// component: 'DatePicker',
// componentProps: {
// style: {width: '100%'},
// type: 'date',
// dateFormat: 'YYYY-MM-DD',
// valueFormat: 'x',
// }
// },
// },
{
label: '业务类型',
field: 'businessType',

1
src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/customerreceiptRecordMain.data.ts

@ -341,7 +341,6 @@ export const CustomerreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: true,
isTable: false,
sort: 'custom',
table: {

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

@ -100,7 +100,15 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -114,6 +122,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择发货记录单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
@ -144,7 +153,15 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
message: '请选择客户代码!', // 前置添加没填的提示语
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
}
]
],
verificationParams: [{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -175,6 +192,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择客户月台代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -191,7 +209,15 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
value: 'customerCode',
message: '请填写客户代码!',
isMainValue: true
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -206,6 +232,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择承运商', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -216,7 +243,15 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -917,7 +952,8 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150
},
isSearch: true,
tableForm:{
tableForm: {
enterSearch:true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择到库位代码',
searchField: 'toLocationCode',
@ -933,7 +969,15 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
key: 'isIn',
value: 'in',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
},
{
@ -1318,7 +1362,15 @@ export const CustomerReturnRequestDetailLabel = useCrudSchemas(reactive<CrudSche
isMainValue: false
}
]
],
verificationParams: [{
key: 'packUnit',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
tableForm: {
@ -1341,7 +1393,15 @@ export const CustomerReturnRequestDetailLabel = useCrudSchemas(reactive<CrudSche
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'packUnit',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
isTableForm: true,
isForm: true

1171
src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts

File diff suppressed because it is too large

736
src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts

@ -1,391 +1,395 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
/**
* @returns {Array}
*/
export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180,
fixed: 'left'
},
isSearch: true
},
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
table: {
width: 180
},
isSearch: true
},
{
label: '任务单号',
field: 'jobNumber',
sort: 'custom',
table: {
width: 180
},
},
{
label: '发货记录单号',
field: 'deliverRecordNumber',
sort: 'custom',
table: {
width: 150
},
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
// {
// label: '发货计划单号',
// field: 'deliverPlanNumber',
// sort: 'custom',
// table: {
// width: 180
// },
// },
// {
// label: '客户发货单号',
// field: 'customerDeliverNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
sort: 'custom',
table: {
width: 150
},
},
{
label: '客户代码',
field: 'customerCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true
},
{
label: '客户月台代码',
field: 'customerDockCode',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '承运商',
field: 'carrierCode',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '运输方式',
field: 'transferMode',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '车牌号',
field: 'vehiclePlateNumber',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '申请时间',
field: 'requestTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
export const DeliverRecordMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180,
fixed: 'left'
},
isSearch: true
},
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
table: {
width: 180
},
isSearch: true
},
{
label: '任务单号',
field: 'jobNumber',
sort: 'custom',
table: {
width: 180
}
},
},
{
label: '截止时间',
field: 'dueTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
{
label: '发货记录单号',
field: 'deliverRecordNumber',
sort: 'custom',
table: {
width: 150
},
isSearch: false,
isTable: false,
isForm: false,
isDetail: false
},
{
label: '发货计划单号',
field: 'deliverPlanNumber',
sort: 'custom',
table: {
width: 180
},
isTable: true,
isDetail: true
},
// {
// label: '客户发货单号',
// field: 'customerDeliverNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: false,
isTable: false,
isForm: false,
isDetail: false,
sort: 'custom',
table: {
width: 150
}
},
},
{
label: '执行时间',
field: 'executeTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
{
label: '客户代码',
field: 'customerCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true
},
{
label: '客户月台代码',
field: 'customerDockCode',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '承运商',
field: 'carrierCode',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '运输方式',
field: 'transferMode',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '车牌号',
field: 'vehiclePlateNumber',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '申请时间',
field: 'requestTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
},
{
label: '生效日期',
field: 'activeDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
{
label: '截止时间',
field: 'dueTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '从库区类型范围',
field: 'fromAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
},
},
{
label: '到库区类型范围',
field: 'toAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
},
},
{
label: '从库区代码范围',
field: 'fromAreaCodes',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '到库区代码范围',
field: 'toAreaCodes',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '从月台代码',
field: 'fromDockCode',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '出库事务类型',
field: 'outTransactionType',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '入库事务类型',
field: 'inTransactionType',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
{
label: '执行时间',
field: 'executeTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
isTable: false,
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
{
label: '生效日期',
field: 'activeDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x'
}
}
},
sort: 'custom',
table: {
width: 180
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '从库区类型范围',
field: 'fromAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
}
},
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
{
label: '到库区类型范围',
field: 'toAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
}
},
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
{
label: '从库区代码范围',
field: 'fromAreaCodes',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '到库区代码范围',
field: 'toAreaCodes',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '从月台代码',
field: 'fromDockCode',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '出库事务类型',
field: 'outTransactionType',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '入库事务类型',
field: 'inTransactionType',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
table: {
width: 150
}
},
isTable: true,
},
// {
// label: '代码',
// field: 'code',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: false,
isTable: false,
sort: 'custom',
table: {
width: 150
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isTable: true
},
// {
// label: '代码',
// field: 'code',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: false,
isTable: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
}
},
]))
])
)
//表单校验
export const DeliverRecordMainRules = reactive({

1117
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts

File diff suppressed because it is too large

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

@ -87,7 +87,15 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -119,6 +127,7 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
// },
form: {
componentProps: {
enterSearch: true,
isSearchList: true,
searchListPlaceholder: '请选择客户月台代码',
searchField: 'code',
@ -133,7 +142,15 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
},
@ -594,10 +611,21 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
multiple:true,
// isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
disabled:true,
searchField: 'itemCode',
searchTitle: '客户物料基础信息',
searchAllSchemas: Customeritem.allSchemas,
searchPage: CustomerItemApi.getPageBusinessTypeToItemCode,
verificationPage: CustomerItemApi.getCustomerItemListByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true,
verificationParams: [{
key: 'itemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
componentProps: {

18
src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts

@ -139,15 +139,15 @@ export const SaleShipmentMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isTable:false
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
// {
// label: '操作',
// field: 'action',
// isForm: false,
// table: {
// width: 150,
// fixed: 'right'
// }
// }
]))
// 表单校验

16
src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts

@ -73,7 +73,15 @@ export const SaleShipmentMain = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -321,15 +329,11 @@ export const SaleShipmentDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 200
},
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
},
{
label: '销售订单行',

57
src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts

@ -61,6 +61,7 @@ export const StockupMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择发货计划单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
@ -76,7 +77,15 @@ export const StockupMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
key: 'status',
value: '6',
isMainValue: false
}]
}],
verificationParams: [{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -650,7 +659,17 @@ export const StockupDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationPage: ItemBasicApi.getItemListByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true,
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
componentProps: {
@ -664,7 +683,15 @@ export const StockupDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -754,7 +781,8 @@ export const StockupDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 120
},
tableForm:{
tableForm: {
enterSearch:true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码',
searchField: 'location',
@ -770,10 +798,19 @@ export const StockupDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
key: 'areaType',
value: confgiDataOne.areaType,
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
componentProps: {
enterSearch: true,
isSearchList: true,
searchListPlaceholder: '请选择库位代码',
searchField: 'location',
@ -789,7 +826,15 @@ export const StockupDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
key: 'areaType',
value: confgiDataOne.areaType,
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},

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

@ -618,6 +618,7 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
tableForm:{
multiple:true,//多选
isInpuFocusShow: true, // 开启查询弹窗
isShowTableFormSearch: true,
searchListPlaceholder: '请选择物料代码',// 输入框占位文本
searchField: 'code',// 查询弹窗赋值字段
searchTitle: '物料基础信息',

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

@ -655,6 +655,11 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
// isSearch: true,
sortTableDefault:1100,
isTableForm: false,
form: {
componentProps: {
disabled:true,
}
}
},
// {

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

@ -98,7 +98,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import * as BomApi from "@/api/wms/bom";
defineOptions({ name: 'ProcessproductionRequestMain' })
@ -119,20 +119,20 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// if(tableData.value.find(item1=>item1['productionLine'] == item['productionLineCode'])) return
const newRow = JSON.parse(JSON.stringify(tableFormKeys))
newRow['productionLine'] = item['productionLineCode']
const param1 = {
productItemCode: formRef.formModel['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
await BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
newRow['componentItemCode'] = res.list[0].componentItemCode
}
})
// const param1 = {
// productItemCode: formRef.formModel['itemCode'],
// available: 'TRUE',
// pageSize: 20,
// pageNo: 1,
// sort: '',
// by: 'ASC',
// }
// await BomApi.getBomPage(param1).then(res => {
// console.log(res)
// if(res?.list?.length>0){
// newRow['componentItemCode'] = res.list[0].componentItemCode
// }
// })
tableData.value.push(newRow)
})
}else if(formField === 'processCode'){
@ -140,7 +140,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
}else if(formField === 'locationCode'){
row['locationCode']=val[0]['code']
}else if(formField === 'componentItemCode'){
row['componentItemCode']=val[0]['componentItemCode']
row['componentItemCode']=val[0]['itemCode']
row['locationCode']=val[0]['locationCode']
row['batch']=val[0]['batch']
row['componentItemcodeQty']=val[0]['qty']
row['effectiveDate']=val[0]['produceDate']
} else {
row[formField] = val[0][searchField]
}

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

@ -10,6 +10,10 @@ import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import {Bom} from "@/views/wms/basicDataManage/itemManage/bom/bom.data";
import * as BomApi from "@/api/wms/bom";
import * as BalanceApi from '@/api/wms/balance'
import * as ProcessproductionRequestMainApi from '@/api/wms/processproductionRequestMain'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import { fa } from 'element-plus/es/locale'
export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
@ -64,7 +68,15 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -334,7 +346,15 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
key: 'available',
value: 'TRUE',
isMainValue: false
}],
}],
verificationParams: [{
key: 'productionLine',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
tableForm:{
@ -355,7 +375,17 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
key: 'available',
value: 'TRUE',
isMainValue: false
}],
}],
verificationPage: ProductionlineitemApi.getProductionLineCodelistByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true,
verificationParams: [{
key: 'productionLineCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
},
{
@ -365,7 +395,8 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
table: {
width: 150
},
tableForm:{
tableForm: {
enterSearch:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择工序代码',
searchField: 'code',
@ -380,11 +411,20 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true,
searchListPlaceholder: '请选择工序代码',
searchField: 'code',
@ -399,46 +439,15 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '库位代码',
field: 'locationCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
multiple:true,//多选
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位基础信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
multiple:true,//多选
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位基础信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -450,13 +459,14 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
table: {
width: 150
},
tableForm: {
tableForm:{
// enterSearch: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择子物料代码版本', // 输入框占位文本
searchField: 'componentItemCode', // 查询弹窗赋值字段
searchTitle: '物料清单信息', // 查询弹窗标题
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
searchListPlaceholder: '请选择子物料代码',
searchField: 'componentItemCode',
searchTitle: '库存余额物料清单信息',
searchAllSchemas: Balance.allSchemas,
searchPage: ProcessproductionRequestMainApi.getProcessproductionChildBomPage,
searchCondition: [{
key:'productItemCode',
value:'itemCode',
@ -466,17 +476,26 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'componentItemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Bom版本', // 输入框占位文本
searchField: 'componentItemCode', // 查询弹窗赋值字段
searchTitle: '物料清单信息', // 查询弹窗标题
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
searchListPlaceholder: '请选择子物料代码',
searchField: 'componentItemCode',
searchTitle: '库存余额物料清单信息',
searchAllSchemas: Balance.allSchemas,
searchPage: ProcessproductionRequestMainApi.getProcessproductionChildBomPage,
searchCondition: [{
key:'productItemCode',
value:'itemCode',
@ -486,9 +505,139 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'componentItemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
// tableForm: {
// enterSearch: true,
// isInpuFocusShow: true,
// searchListPlaceholder: '请选择子物料代码版本', // 输入框占位文本
// searchField: 'componentItemCode', // 查询弹窗赋值字段
// searchTitle: '物料清单信息', // 查询弹窗标题
// searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
// searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
// searchCondition: [{
// key:'productItemCode',
// value:'itemCode',
// message: '请填写物料代码!',
// isMainValue: true
// },{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }],
// verificationParams: [{
// key: 'componentItemCode',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: true,
// isFormModel: true,
// }], // 失去焦点校验参数
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// enterSearch: true,
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择Bom版本', // 输入框占位文本
// searchField: 'componentItemCode', // 查询弹窗赋值字段
// searchTitle: '物料清单信息', // 查询弹窗标题
// searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
// searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
// searchCondition: [{
// key:'productItemCode',
// value:'itemCode',
// message: '请填写物料代码!',
// isMainValue: true
// },{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }],
// verificationParams: [{
// key: 'componentItemCode',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: true,
// isFormModel: true,
// }], // 失去焦点校验参数
// }
// },
},
{
label: '库位代码',
field: 'locationCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true,
},
form: {
componentProps: {
disabled:true,
}
}
// tableForm: {
// enterSearch: true,
// multiple:true,//多选
// isInpuFocusShow: true, // 开启查询弹窗
// searchListPlaceholder: '请选择库位代码', // 输入框占位文本
// searchField: 'code', // 查询弹窗赋值字段
// searchTitle: '库位基础信息', // 查询弹窗标题
// searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
// searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }],
// verificationParams: [{
// key: 'code',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: true,
// isFormModel: true,
// }], // 失去焦点校验参数
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// enterSearch: true,
// isSearchList: true, // 开启查询弹窗
// multiple:true,//多选
// searchListPlaceholder: '请选择库位代码', // 输入框占位文本
// searchField: 'code', // 查询弹窗赋值字段
// searchTitle: '库位基础信息', // 查询弹窗标题
// searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
// searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }],
// verificationParams: [{
// key: 'code',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: true,
// isFormModel: true,
// }], // 失去焦点校验参数
// }
// }
},
{
label: '批次',
@ -497,6 +646,14 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
table: {
width: 150
},
tableForm:{
disabled:true,
},
form: {
componentProps: {
disabled:true,
}
}
},
{
label: '子物料数量',
@ -530,6 +687,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
width: 150
},
form: {
disabled:true,
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
@ -539,10 +697,11 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
}
},
tableForm:{
disabled:true,
type:'FormDate',
placeholder: '请选择生产日期',
valueFormat: 'x',
},
}
},
{
label: '是否可用',
@ -589,8 +748,10 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
table: {
width: 130
},
isSearch: false,
isForm: false,
isTable: true
isTable: false,
isTableForm: false,
},
{
label: '删除时间',
@ -695,9 +856,9 @@ export const ProcessproductionRequestDetailRules = reactive({
productionLine: [
{ required: true, message: '请选择生产线代码', trigger: 'change' }
],
processCode: [
{ required: true, message: '请选择工序代码', trigger: 'change' }
],
// processCode: [
// { required: true, message: '请选择工序代码', trigger: 'change' }
// ],
locationCode: [
{ required: true, message: '请选择库位代码', trigger: 'change' }
],

1
src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/productputawayAssembleRequestMain.data.ts

@ -450,6 +450,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
multiple: true,
// isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗
disabled:true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题

2
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue

@ -686,7 +686,7 @@ const tableFormButton = async (val , row) => {
bomModelVisible.value = true
DialogTitle.value = '物料代码【' + row.itemCode + '】——Bom信息'
detatableDataBom.params = {
masterId: row.masterId
masterId: row.id
}
await getDetailListBom()
}

58
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts

@ -32,6 +32,9 @@ import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplie
import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
import * as ItemPackageApi from '@/api/wms/itempackage/index'
import {Location} from "@/views/wms/basicDataManage/factoryModeling/location/location.data";
import * as LocationApi from "@/api/wms/location";
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -975,6 +978,61 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150
},
},
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码',
searchField: 'code',
searchTitle: '库位信息',
searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.getLocationListByAreaAndBusinesstype,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'businessType',
value: 'ProductReceiptScrap',
isMainValue: false
},{
key: 'isIn',
value: 'in',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationListByAreaAndBusinesstype, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'businessType',
value: 'ProductReceiptScrap',
isMainValue: false
},{
key: 'isIn',
value: 'in',
isMainValue: false
}]
}
}
},
{
label: '物料名称',
field: 'itemName',

47
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/purchasereturnJobMain.data.ts

@ -653,26 +653,6 @@ export const PurchasereturnJobMainRules = reactive({
* @returns {Array} 退
*/
export const PurchasereturnJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '从货主代码',
field: 'fromOwnerCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 17,
hiddenInMain:true,
},
{
label: '到货主代码',
field: 'toOwnerCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 17,
hiddenInMain:true,
},
{
label: '包装号',
field: 'packingNumber',
@ -758,17 +738,36 @@ export const PurchasereturnJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
sortTableDefault: 15,
hiddenInMain:true,
},
// {
// label: '到库位代码',
// field: 'toLocationCode',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault: 15,
// hiddenInMain:true,
// },
{
label: '到库位代码',
field: 'toLocationCode',
label: '从货主代码',
field: 'fromOwnerCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 15,
sortTableDefault: 16,
hiddenInMain:true,
},
{
label: '到货主代码',
field: 'toOwnerCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 16,
hiddenInMain:true,
},
{
label: '订单号',
field: 'poNumber',

62
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts

@ -569,16 +569,16 @@ export const PurchasereturnRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
sortTableDefault: 1009,
hiddenInMain: true
},
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 1009,
hiddenInMain: true
},
// {
// label: '到库位代码',
// field: 'toLocationCode',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault: 1009,
// hiddenInMain: true
// },
{
label: '从库位组代码',
field: 'fromLocationGroupCode',
@ -589,16 +589,16 @@ export const PurchasereturnRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
sortTableDefault: 1010,
hiddenInMain: true
},
{
label: '到库位组代码',
field: 'toLocationGroupCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 1010,
hiddenInMain: true
},
// {
// label: '到库位组代码',
// field: 'toLocationGroupCode',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault: 1010,
// hiddenInMain: true
// },
{
label: '从库区代码',
field: 'fromAreaCode',
@ -609,16 +609,16 @@ export const PurchasereturnRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
sortTableDefault: 1010,
hiddenInMain: true
},
{
label: '到库区代码',
field: 'toAreaCode',
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 1010,
hiddenInMain: true
},
// {
// label: '到库区代码',
// field: 'toAreaCode',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault: 1010,
// hiddenInMain: true
// },
{
label: '从货主代码',
field: 'fromOwnerCode',
@ -663,7 +663,7 @@ export const PurchasereturnRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
},
{
label: '订单行',
field: 'poline',
field: 'poLine',
sort: 'custom',
table: {
width: 150

38
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts

@ -112,25 +112,25 @@ export const PurchasereceiptRecordMain1 = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
},
{
label: '包装规格',
field: 'packUnit',
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '从库位代码2',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '包装规格',
// field: 'packUnit',
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '从库位代码',
// field: 'fromLocationCode',
// sort: 'custom',
// table: {
// width: 150
// },
//
// },
{
label: '到库位代码',
field: 'toLocationCode',

2
src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue

@ -356,7 +356,7 @@ console.log('PurchaseMain.allSchemas.searchSchema',PurchaseMain.allSchemas.searc
}
})
}
detailRef.value.openDetail(row, titleName, titleValue,'orderPurchaseMain')
detailRef.value.openDetail(row, titleName, titleValue,'order_purchase_main')
}
/** 删除按钮操作 */

1
src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts

@ -421,6 +421,7 @@ export const PurchaseDetail = useCrudSchemas(reactive<CrudSchema[]>([
multiple:true,//多选
isInpuFocusShow: true,
searchListPlaceholder: '请选择供应商物料',
isShowTableFormSearch: true,
searchField: 'itemCode',
searchTitle: '供应商物料信息',
searchAllSchemas: Supplieritem.allSchemas,

12
src/views/wms/supplierManage/supplierApbalance/supplierApbalanceDetail/supplierApbalanceDetail.data.ts

@ -60,12 +60,12 @@ export const SupplierApbalanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true,
},
{
label: '完整凭证号',
field: 'ttInvoiceno',
sort: 'custom',
isSearch: true,
},
// {
// label: '完整凭证号',
// field: 'ttInvoiceno',
// sort: 'custom',
// isSearch: true,
// },
{
label: '发票TC原始金额',
field: 'ttTcAmt',

49
src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/index.vue

@ -28,7 +28,7 @@
v-model:sort="tableObject.sort"
>
<template #id="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.id)">
<el-button type="primary" link @click="openDetail(row, 'ID', row.id)">
<span>{{ row.id }}</span>
</el-button>
</template>
@ -61,10 +61,22 @@
:detailButtonIsShowAdd=false
:detailButtonIsShowEdit=false
:detailButtonIsShowDelete=false
/>
:slotDetailTabList="[
{
label: '回调函明细',
prop: 'adjustment'
}
]"
>
<template #adjustment>
<TableFormAdjustment :rowData="rowData" :adjustmentData="adjustmentData" :isDetail="true"/>
</template>
</Detail>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/supplier-apbalance-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<AdjustmentDialog ref="adjustment" @updateList="getList"/>
</template>
<script setup lang="ts">
@ -78,6 +90,9 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import * as BasicSpotCheckOptionApi from "@/api/eam/basicSpotCheckOption";
import TableFormAdjustment from '@/components/TableFormAdjustment/src/TableFormAdjustment.vue'
import AdjustmentDialog from '@/components/TableFormAdjustment/src/AdjustmentDialog.vue'
import {getJmreportBaseUrl} from "@/utils/systemParam";
import {getAccessToken} from "@/utils/auth";
@ -162,7 +177,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'print') { //
handlePrint(row)
} else if (val == 'replyInput') { //
handleReplyInput(row.id)
handleReplyInput(row)
}
}
@ -198,8 +213,16 @@ const formsSuccess = async (formType,data) => {
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const rowData = ref({})
const adjustmentData = ref({})
const openDetail = async (row: any, titleName: any, titleValue: any) => {
const res = await SupplierApbalanceMainApi.getSupplierApbalanceMain(row.id)
console.log('res',res)
rowData.value = row
adjustmentData.value = res
detailRef.value.openDetail(row, titleName, titleValue, 'basicSupplierApbalanceMain')
}
//
@ -209,20 +232,12 @@ const handlePrint = async (row) => {
window.open(src.value+'&id='+row.id)
}
const adjustment = ref()
//
const handleReplyInput = async (id: number) => {
try {
const params = ref({
id: '',
available:'',
})
params.value.id = id
params.value.available = 'TRUE'
await BasicSpotCheckOptionApi.updateEnableCode(params.value)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
const handleReplyInput = async (row) => {
adjustment.value.open(row)
}
/** 删除按钮操作 */

6
src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/supplierApbalanceMain.data.ts

@ -14,7 +14,7 @@ export const SupplierApbalanceMainRules = reactive({
export const SupplierApbalanceMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
label: 'ID',
field: 'id',
sort: 'custom',
isForm: false,
@ -107,6 +107,9 @@ export const SupplierApbalanceMain = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
@ -245,6 +248,7 @@ export const SupplierApbalanceMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '操作',
field: 'action',
isForm: false,
isDetail:false,
table: {
width: 150,
fixed: 'right'

1
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -776,6 +776,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
form: {
component: 'Select',
api: () => procurementCreators.list,
value:procurementCreators?.list.length>0?procurementCreators.list[0].id:'',
componentProps: {
optionsAlias: {
labelField: 'nickname',

Loading…
Cancel
Save