Browse Source

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

hella_online_20240829
陈薪名 4 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) => { export const updateEnableCode = async (data: BasicEamWorkshopVO) => {
return await request.post({ url: `/eam/basic-eam-workshop/ables` , data }) 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 = () => { export const importTemplate = () => {
return request.download({ url: '/qms/counter/get-import-template' }) 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 == 'packUnit' ||
headerItem.field == 'secondPackUnit' || headerItem.field == 'secondPackUnit' ||
headerItem.field == 'fromPackUnit' || headerItem.field == 'fromPackUnit' ||
headerItem.field == 'toPackUnit'|| headerItem.field == 'toPackUnit' ||
headerItem.field == 'toPackUnit'|| headerItem.field == 'toPackUnit' ||
headerItem.field == 'supplierItemCode' headerItem.field == 'supplierItemCode'
) { ) {
let searchField = headerItem.field let searchField = headerItem.field
let pageApi = ref() let pageApi = ref()
@ -239,10 +239,10 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f
] ]
? formRef.formModel[searchCondition1[i].value] ? formRef.formModel[searchCondition1[i].value]
: detailData : detailData
? detailData[searchCondition1[i].value] ? detailData[searchCondition1[i].value]
: row : row
? row[searchCondition1[i].value] ? row[searchCondition1[i].value]
: '' : ''
// 是否含有空参数情况 // 是否含有空参数情况
let isNull = false let isNull = false
if ( if (
@ -354,9 +354,9 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f
) { ) {
// 装配计划,裝配备件计划,预备产件计划,预生产收货申请,装配收货申请,报修收货申请,制品报废申请 // 装配计划,裝配备件计划,预备产件计划,预生产收货申请,装配收货申请,报修收货申请,制品报废申请
pageApi.value = getProductionLineCodelistByCodes pageApi.value = getProductionLineCodelistByCodes
params.value.productionLineCode= params.value.productionLineCode =
formRef.formModel.productionLine || formRef.formModel.productionLineCode || row.productionLine || row.productionLineCode, formRef.formModel.productionLine || formRef.formModel.productionLineCode || row.productionLine || row.productionLineCode,
params.value.itemCodes=val?.trim() params.value.itemCodes = val?.trim()
} }
} else if ( } else if (
headerItem.field == 'packUnit' || headerItem.field == 'packUnit' ||
@ -376,39 +376,39 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f
routeName == 'UnplannedissueJobMain' || routeName == 'UnplannedissueJobMain' ||
routeName == 'PackageoverRequestMain' routeName == 'PackageoverRequestMain'
) { ) {
params.value.itemCode= row.itemCode params.value.itemCode = row.itemCode
params.value.packUnit= val?.trim() params.value.packUnit = val?.trim()
pageApi.value = getItemPackageunitListByCodes pageApi.value = getItemPackageunitListByCodes
} }
} else if ( } else if (
headerItem.field == 'supplierItemCode' headerItem.field == 'supplierItemCode'
) { ) {
// 生产退料申请,隔离退料申请 // 生产退料申请,隔离退料申请
if ( if (
routeName == 'ProductionreturnRequestMain' || routeName == 'ProductionreturnRequestMain' ||
routeName == 'ProductionreturnRequestMainNo' routeName == 'ProductionreturnRequestMainNo'
) { ) {
searchField = 'supplierCode' searchField = 'supplierCode'
params.value.itemCodes= row.itemCode params.value.itemCodes = row.itemCode
params.value.supplierCode= val?.trim() params.value.supplierCode = val?.trim()
pageApi.value = getSupplierItemListByCodes pageApi.value = getSupplierItemListByCodes
} }
} }
const list = ref() const list = ref()
// 调取包装接口 // 调取包装接口
await pageApi.value(params.value).then(async (res) => { await pageApi.value(params.value).then(async (res) => {
list.value = res ? res : [] list.value = res ? res : []
// 只查一条数据,多条数据查询默认显示不存在 // 只查一条数据,多条数据查询默认显示不存在
if (res.length == 1) { if (res.length == 1) {
callback(list.value) callback(list.value)
} else { } else {
message.alert('代码' + row[headerItem.field] + '没有找到对应数据') message.alert('代码' + row[headerItem.field] + '没有找到对应数据')
row[headerItem.field] = '' row[headerItem.field] = ''
return return
} }
}) })
}
} }
}
} }
} }
export const FormBlur = async (field, val, routeName, formRef, detailData, formSchema, callback) => { 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) callback(list.value)
}) })
} }
} }
else { else {
let pageApi = ref() let pageApi = ref()
let params = 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) => { export const getListByBottonInput = async (headerItem, val, row, routeName, formRef, detailData, tableData, callback) => {
let tableFormSchemaObj = headerItem?.tableForm let tableFormSchemaObj = headerItem?.tableForm
console.log(333,tableFormSchemaObj) console.log(333, tableFormSchemaObj)
if (tableFormSchemaObj.searchPage && tableFormSchemaObj.verificationParams) { if (tableFormSchemaObj.searchPage && tableFormSchemaObj.verificationParams) {
if (!val) return; if (!val) return;
let params = ref({}) let params = ref({})
@ -817,7 +817,7 @@ export const getListByBottonInput = async (headerItem, val, row, routeName, form
if (verificationParams && verificationParams.length > 0) { if (verificationParams && verificationParams.length > 0) {
for (let i = 0; i < verificationParams.length; i++) { for (let i = 0; i < verificationParams.length; i++) {
console.log(54565, verificationParams[i].key) 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 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)), ...arr1.filter((item) => !arr2.includes(item)),
...arr2.filter((item) => !arr1.includes(item)) ...arr2.filter((item) => !arr1.includes(item))
].join(',') ].join(',')
message.alert('代码' + str + '没有找到对应数据') console.log(arr1.filter((item) => arr2.includes(item)))
return console.log(22, str)
} else { if (str) {
let repeatCode = [] message.alert('代码' + str + '没有找到对应数据')
if (tableData.length > 0) { return
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;
} }
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 return
} else { } 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) => { export const getProcessproductionRequestMain = async (id: number) => {
return await request.get({ url: `/wms/processproduction-request-main/get?id=` + id }) 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) => { export const exportSaleDetail = async (params) => {
return await request.download({ url: `/wms/sale-detail/export-excel`, 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 }) 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)"> <!-- 列表头部 --> <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 <TableHead
v-if="!isBasic" v-if="!isBasic&&!slotDetailTabList.some(item=>item.label==tabsList[current].label)"
:HeadButttondata="HeadButttondata" :HeadButttondata="HeadButttondata"
:masterId="masterParmas.masterId" :masterId="masterParmas.masterId"
@button-base-click="buttonBaseClick" @button-base-click="buttonBaseClick"
@ -63,7 +63,7 @@
</template> --> </template> -->
</Table> </Table>
<Table <Table
v-if="!isBasic && fromeWhere != 'countPlan'" v-if="!isBasic && fromeWhere != 'countPlan'&&!slotDetailTabList.some(item=>item.label==tabsList[current].label)"
:columns="detailAllSchemasRef.tableColumns" :columns="detailAllSchemasRef.tableColumns"
:data="tableObjectRef.tableList" :data="tableObjectRef.tableList"
:loading="tableObjectRef.loading" :loading="tableObjectRef.loading"
@ -85,6 +85,7 @@
/> />
</template> </template>
</Table> </Table>
<slot v-if="slotDetailTabList.some(item=>item.label==tabsList[current].label)" :name="slotDetail.prop" v-for="slotDetail in slotDetailTabList"></slot>
<DetailTable <DetailTable
v-if="!isBasic && fromeWhere == 'countPlan' && isShowDrawer" v-if="!isBasic && fromeWhere == 'countPlan' && isShowDrawer"
:columns="detailAllSchemasRef.tableColumns" :columns="detailAllSchemasRef.tableColumns"
@ -397,6 +398,11 @@ const props = defineProps({
required: false, required: false,
default: () => [] default: () => []
}, },
slotDetailTabList:{
type:Array,
required: false,
default: () => []
},
//-- //--
mainSubmitCreateApi:{ mainSubmitCreateApi:{
type: Boolean, type: Boolean,
@ -441,6 +447,10 @@ if (props.isBasic == true) {
] ]
} }
} }
//
if(props.slotDetailTabList){
tabsList.value = [...tabsList?.value,...props.slotDetailTabList]
}
let otherList = [...props.annexTable,{ 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 ConfigApi from '@/api/infra/config'
import * as ProductionlineApi from '@/api/wms/productionline' import * as ProductionlineApi from '@/api/wms/productionline'
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data'
import * as ProcessApi from '@/api/wms/process' import * as UserApi from '@/api/system/user'
import { Process } from '@/views/wms/basicDataManage/factoryModeling/process/process.data' import { handleTreeToComponentOptions } from '@/utils/tree'
import * as WorkStationApi from '@/api/wms/workstation' import * as DeptApi from '@/api/system/dept'
import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data' 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 equipmentManufacturerNoPage = await EquipmentManufacturerApi.getEquipmentManufacturerNoPage({})
const equipmentSupplierNoPage = await EquipmentSupplierApi.getEquipmentSupplierNoPage({}) const equipmentSupplierNoPage = await EquipmentSupplierApi.getEquipmentSupplierNoPage({})
const productionlineNoPage = await ProductionlineApi.getProductionlineNoPage({}); const productionlineNoPage = await ProductionlineApi.getProductionlineNoPage({});
@ -26,6 +32,13 @@ const autoSwitch = ref(false)
if (autoCodeSwitch == 'TRUE') { if (autoCodeSwitch == 'TRUE') {
autoSwitch.value = 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({ export const EquipmentAccountsRules = reactive({
@ -113,13 +126,41 @@ export const EquipmentAccounts = useCrudSchemas(reactive<CrudSchema[]>([
label: '使用部门', label: '使用部门',
field: 'useDept', field: 'useDept',
sort: 'custom', 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: '负责人', label: '负责人',
field: 'principal', field: 'principal',
sort: 'custom', 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: '负责人联系方式', label: '负责人联系方式',
@ -233,13 +274,38 @@ export const EquipmentAccounts = useCrudSchemas(reactive<CrudSchema[]>([
label: '采购部门', label: '采购部门',
field: 'purchaseDept', field: 'purchaseDept',
sort: 'custom', 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: '采购人', label: '采购人',
field: 'purchaser', field: 'purchaser',
sort: 'custom', 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: '出厂日期', label: '出厂日期',
@ -378,8 +444,8 @@ export const EquipmentAccounts = useCrudSchemas(reactive<CrudSchema[]>([
searchListPlaceholder: '请选择车间代码', // 输入框占位文本 searchListPlaceholder: '请选择车间代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '车间信息', // 查询弹窗标题 searchTitle: '车间信息', // 查询弹窗标题
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 searchAllSchemas: BasicEamWorkshop.allSchemas, // 查询弹窗所需类
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 searchPage: BasicEamWorkshopApi.getBasicEamWorkshopPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
@ -388,58 +454,58 @@ export const EquipmentAccounts = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
}, },
{ // {
label: '产线编号', // label: '产线编号',
field: 'lineCode', // field: 'lineCode',
sort: 'custom', // sort: 'custom',
isSearch: true, // isSearch: true,
isDetail: false, // isDetail: false,
isForm: false, // isForm: false,
isTable: true, // isTable: true,
isTableForm: false, // isTableForm: false,
search: { // search: {
component: 'Select', // component: 'Select',
componentProps: { // componentProps: {
options: productionlineNoPage, // options: productionlineNoPage,
optionsAlias: { // optionsAlias: {
labelField: 'name', // labelField: 'name',
valueField: 'code' // valueField: 'code'
}, // },
filterable: true, // filterable: true,
} // }
}, // },
formatter: (_: Recordable, __: TableColumn, cellValue: string) => { // formatter: (_: Recordable, __: TableColumn, cellValue: string) => {
return productionlineNoPage.find((item) => item.code == cellValue)?.name // return productionlineNoPage.find((item) => item.code == cellValue)?.name
}, // },
}, // },
{ // {
label: '产线编号', // label: '产线编号',
field: 'lineName', // field: 'lineName',
sort: 'custom', // sort: 'custom',
isSearch: false, // isSearch: false,
form: { // form: {
// labelMessage: '信息提示说明!!!', // // labelMessage: '信息提示说明!!!',
componentProps: { // componentProps: {
isSearchList: true, // 开启查询弹窗 // isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 // searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
multiple:true, // multiple:true,
searchField: 'code', // 查询弹窗赋值字段 // searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题 // searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 // searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 // searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition: [{ // searchCondition: [{
key:'workshopCode', // key:'workshopCode',
value:'workshopCode', // value:'workshopCode',
message: '请填写车间代码!', // message: '请填写车间代码!',
isMainValue: true // isMainValue: true
},{ // },{
key: 'available', // key: 'available',
value: 'TRUE', // value: 'TRUE',
isMainValue: false // isMainValue: false
}] // }]
} // }
} // }
}, // },
// { // {
// label: '工序编号', // label: '工序编号',
// field: 'processCode', // field: 'processCode',

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

@ -47,6 +47,7 @@
:apiUpdate="EquipmentAccountsApi.updateEquipmentAccounts" :apiUpdate="EquipmentAccountsApi.updateEquipmentAccounts"
:apiCreate="EquipmentAccountsApi.createEquipmentAccounts" :apiCreate="EquipmentAccountsApi.createEquipmentAccounts"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@onChange="onChange"
:isBusiness="false" :isBusiness="false"
/> />
@ -112,6 +113,7 @@ import * as WorkshopApi from '@/api/wms/workshop'
import * as ProductionlineApi from '@/api/wms/productionline' import * as ProductionlineApi from '@/api/wms/productionline'
import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier' import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier'
import * as EquipmentManufacturerApi from '@/api/eam/equipmentManufacturer' import * as EquipmentManufacturerApi from '@/api/eam/equipmentManufacturer'
import * as UserApi from '@/api/system/user'
defineOptions({ name: 'EquipmentAccounts' }) defineOptions({ name: 'EquipmentAccounts' })
@ -130,7 +132,10 @@ const detailAllSchemas = ref()
const apiPage = ref() const apiPage = ref()
const dialogApiPage = ref() const dialogApiPage = ref()
const dialogAllSchemas = ref() const dialogAllSchemas = ref()
export interface User {
id: number,
nickname: string
}
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { 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 () => { onMounted(async () => {
getList() getList()

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

@ -30,7 +30,6 @@ export const EquipmentMaintenanceRecordMain = useCrudSchemas(reactive<CrudSchema
label: '描述', label: '描述',
field: 'describing', field: 'describing',
sort: 'custom', sort: 'custom',
isSearch: true,
isSearch: false, isSearch: false,
}, },
{ {
@ -43,7 +42,6 @@ export const EquipmentMaintenanceRecordMain = useCrudSchemas(reactive<CrudSchema
label: '来源字典', label: '来源字典',
field: 'sources', field: 'sources',
sort: 'custom', sort: 'custom',
isSearch: true,
isSearch: false, isSearch: false,
}, },
{ {
@ -56,7 +54,6 @@ export const EquipmentMaintenanceRecordMain = useCrudSchemas(reactive<CrudSchema
label: '故障类型枚举', label: '故障类型枚举',
field: 'faultType', field: 'faultType',
sort: 'custom', sort: 'custom',
isSearch: true,
isSearch: false, 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 { dateFormatter } from '@/utils/formatTime'
import { handleTreeToComponentOptions } from '@/utils/tree' import { handleTreeToComponentOptions } from '@/utils/tree'
import * as DeptApi from '@/api/system/dept' 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 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({ export const EquipmentManufacturerRules = reactive({
@ -76,7 +85,18 @@ export const EquipmentManufacturer = useCrudSchemas(reactive<CrudSchema[]>([
label: '联系人', label: '联系人',
field: 'contacts', field: 'contacts',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true,
form: {
component: 'Select',
componentProps: {
options: userList.value,
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
},
filterable: true,
}
}
}, },
{ {
label: '部门', 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 * as UserApi from '@/api/system/user'
import { EquipmentAccounts,EquipmentAccountsRules } from '../equipmentAccounts/equipmentAccounts.data' import { EquipmentAccounts,EquipmentAccountsRules } from '../equipmentAccounts/equipmentAccounts.data'
import * as EquipmentAccountsApi from '@/api/eam/equipmentAccounts' import * as EquipmentAccountsApi from '@/api/eam/equipmentAccounts'
import * as ProductionlineApi from '@/api/wms/productionline' import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier'
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' import * as BasicEamWorkshopApi from '@/api/eam/basicEamWorkshop'
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'
export interface User { export interface User {
id: number, id: number,
nickname: string nickname: string
} }
const workshopList = await BasicEamWorkshopApi.getBasicEamWorkshopNoPage({})
const equipmentSupplierList = await EquipmentSupplierApi.getEquipmentSupplierNoPage({})
const allDeptList = await DeptApi.getSimpleDeptList() const allDeptList = await DeptApi.getSimpleDeptList()
const deptList = ref<Tree[]>([]) // 树形结构 const deptList = ref<Tree[]>([]) // 树形结构
const userList = ref<User[]>([]) const userList = ref<User[]>([])
userList.value = await UserApi.getSimpleUserList() userList.value = await UserApi.getSimpleUserList()
// 加载部门树(默认格式) // 加载部门树(默认格式)
deptList.value = handleTreeToComponentOptions(await DeptApi.getSimpleDeptList()) deptList.value = handleTreeToComponentOptions(allDeptList)
// 表单校验 // 表单校验
export const EquipmentSigningRules = reactive({ export const EquipmentSigningRules = reactive({
@ -32,7 +27,6 @@ export const EquipmentSigningRules = reactive({
operationDate: [required], operationDate: [required],
operationer: [required], operationer: [required],
operationDept: [required], operationDept: [required],
supplierCode: [required],
status: [required], status: [required],
storageLocation: [required], storageLocation: [required],
concurrencyStamp: [required], concurrencyStamp: [required],
@ -141,22 +135,69 @@ export const EquipmentSigning = useCrudSchemas(reactive<CrudSchema[]>([
label: '供应商编号', label: '供应商编号',
field: 'supplierCode', field: 'supplierCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
isForm: 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: '供应商联系人', label: '供应商联系人',
field: 'supplierPeople', field: 'supplierPeople',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false form: {
component: 'Select',
componentProps: {
options: userList.value,
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
},
disabled: true,
}
}
}, },
{ {
label: '供应商联系方式', label: '供应商联系方式',
field: 'supplierTelephone', field: 'supplierTelephone',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false, isForm: true,
form: {
component: 'Input',
componentProps: {
disabled: true
}
}
}, },
// { // {
// label: '流程状态', // label: '流程状态',
@ -268,7 +309,7 @@ export const EquipmentSigning = useCrudSchemas(reactive<CrudSchema[]>([
field: 'storageLocation', field: 'storageLocation',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false, isForm: true,
form: { form: {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
@ -288,38 +329,51 @@ export const EquipmentSigning = useCrudSchemas(reactive<CrudSchema[]>([
field: 'workshopCode', field: 'workshopCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false, isForm: true,
}, formatter: (_: Recordable, __: TableColumn, cellValue: string) => {
{ return workshopList.find((item) => item.code == cellValue)?.name
label: '产线编号', },
field: 'lineCode',
sort: 'custom',
isSearch: true,
isForm: false,
form: { form: {
// labelMessage: '信息提示说明!!!', component: 'Select',
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 options: workshopList,
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 placeholder: '请选择车间编号',
multiple:true, optionsAlias: {
searchField: 'code', // 查询弹窗赋值字段 valueField: 'code',
searchTitle: '生产线信息', // 查询弹窗标题 labelField: 'name'
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,
// 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: '工序编号', // label: '工序编号',
// field: 'processCode', // field: 'processCode',
// sort: 'custom', // sort: 'custom',
@ -403,13 +457,13 @@ export const EquipmentSigning = useCrudSchemas(reactive<CrudSchema[]>([
// } // }
// } // }
// }, // },
{ // {
label: '操作', // label: '操作',
field: 'action', // field: 'action',
isForm: false, // isForm: false,
table: { // table: {
width: 150, // width: 150,
fixed: 'right' // 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 ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import * as UserApi from '@/api/system/user' import * as UserApi from '@/api/system/user'
import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier'
defineOptions({ name: 'EquipmentSigning' }) defineOptions({ name: 'EquipmentSigning' })
@ -84,10 +85,18 @@ routeName.value = route.name
const tableColumns = ref(EquipmentSigning.allSchemas.tableColumns) 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(() => { nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
}) })
} }
@ -140,8 +149,8 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = [ const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'eam:equipment-signing:update'}), // defaultButtons.mainListEditBtn({hasPermi:'eam:equipment-signing:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipment-signing:delete'}), // defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipment-signing:delete'}), //
] ]
// - // -
@ -256,7 +265,15 @@ const onChange = async (field, cur, formRef) => {
setV['operationer'] = '' setV['operationer'] = ''
formRef.value.setValues(setV) 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 { validateHanset,validateNumDot, validateEmail } from '@/utils/validator'
import { handleTreeToComponentOptions } from '@/utils/tree' import { handleTreeToComponentOptions } from '@/utils/tree'
import * as DeptApi from '@/api/system/dept' 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()) deptList.value = handleTreeToComponentOptions(await DeptApi.getSimpleDeptList())
const userList = ref<User[]>([])
userList.value = await UserApi.getSimpleUserList()
// 表单校验 // 表单校验
export const EquipmentSupplierRules = reactive({ export const EquipmentSupplierRules = reactive({
@ -82,7 +90,18 @@ export const EquipmentSupplier = useCrudSchemas(reactive<CrudSchema[]>([
label: '联系人', label: '联系人',
field: 'contacts', field: 'contacts',
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true,
form: {
component: 'Select',
componentProps: {
options: userList.value,
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
},
filterable: true,
}
}
}, },
{ {
label: '部门', 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')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
isForm: false,
}, },
{ {
label: '部门id', 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" :apiCreate="ToolAccountsApi.createToolAccounts"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="false"
@onChange="onChange"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -149,6 +150,7 @@ import * as WorkshopApi from '@/api/wms/workshop'
import * as ProductionlineApi from '@/api/wms/productionline' import * as ProductionlineApi from '@/api/wms/productionline'
import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier' import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier'
import * as EquipmentManufacturerApi from '@/api/eam/equipmentManufacturer' import * as EquipmentManufacturerApi from '@/api/eam/equipmentManufacturer'
import * as UserApi from '@/api/system/user'
defineOptions({ name: 'ToolAccounts' }) defineOptions({ name: 'ToolAccounts' })
@ -172,6 +174,10 @@ const operationRecordList = ref([
{ label: '巡检记录', value: 'inspection' }, { label: '巡检记录', value: 'inspection' },
{ label: '点检记录', value: 'spot_check' } { label: '点检记录', value: 'spot_check' }
]) ])
export interface User {
id: number,
nickname: string
}
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { 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 () => { onMounted(async () => {
getList() 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 { EquipmentManufacturer } from '@/views/eam/equipmentManufacturer/equipmentManufacturer.data'
import * as ProductionlineApi from '@/api/wms/productionline' import * as ProductionlineApi from '@/api/wms/productionline'
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' 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 equipmentManufacturerNoPage = await EquipmentManufacturerApi.getEquipmentManufacturerNoPage({})
const equipmentSupplierNoPage = await EquipmentSupplierApi.getEquipmentSupplierNoPage({}) const equipmentSupplierNoPage = await EquipmentSupplierApi.getEquipmentSupplierNoPage({})
const productionlineNoPage = await ProductionlineApi.getProductionlineNoPage({}); const productionlineNoPage = await ProductionlineApi.getProductionlineNoPage({});
const autoCodeSwitch = await ConfigApi.getConfigKey('toolCodeAutoSwitch')
const autoCodeSwitch = await ConfigApi.getConfigKey('deviceCodeAutoSwitch')
// ProductionlineApi.getProductionlinePage
const autoSwitch = ref(false) const autoSwitch = ref(false)
if (autoCodeSwitch == 'TRUE') { if (autoCodeSwitch == 'TRUE') {
autoSwitch.value = 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({ export const ToolAccountsRules = reactive({
code: [required], code: [required],
@ -100,13 +117,41 @@ export const ToolAccounts = useCrudSchemas(reactive<CrudSchema[]>([
label: '使用部门', label: '使用部门',
field: 'useDept', field: 'useDept',
sort: 'custom', 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: '负责人', label: '负责人',
field: 'principal', field: 'principal',
sort: 'custom', 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: '负责人联系方式', label: '负责人联系方式',
@ -119,6 +164,8 @@ export const ToolAccounts = useCrudSchemas(reactive<CrudSchema[]>([
field: 'status', field: 'status',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
dictType: DICT_TYPE.DEVICE_STATUS,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: { form: {
component: 'Select' component: 'Select'
} }
@ -218,13 +265,38 @@ export const ToolAccounts = useCrudSchemas(reactive<CrudSchema[]>([
label: '采购部门', label: '采购部门',
field: 'purchaseDept', field: 'purchaseDept',
sort: 'custom', 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: '采购人', label: '采购人',
field: 'purchaser', field: 'purchaser',
sort: 'custom', 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: '出厂日期', label: '出厂日期',
@ -369,8 +441,8 @@ export const ToolAccounts = useCrudSchemas(reactive<CrudSchema[]>([
searchListPlaceholder: '请选择车间代码', // 输入框占位文本 searchListPlaceholder: '请选择车间代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '车间信息', // 查询弹窗标题 searchTitle: '车间信息', // 查询弹窗标题
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 searchAllSchemas: BasicEamWorkshop.allSchemas, // 查询弹窗所需类
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 searchPage: BasicEamWorkshopApi.getBasicEamWorkshopPage, // 查询弹窗所需分页方法
disable:true, disable:true,
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
@ -380,58 +452,58 @@ export const ToolAccounts = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
}, },
{ // {
label: '产线编号', // label: '产线编号',
field: 'lineCode', // field: 'lineCode',
sort: 'custom', // sort: 'custom',
isSearch: true, // isSearch: true,
isDetail: false, // isDetail: false,
isForm: false, // isForm: false,
isTable: true, // isTable: true,
isTableForm: false, // isTableForm: false,
search: { // search: {
component: 'Select', // component: 'Select',
componentProps: { // componentProps: {
options: productionlineNoPage, // options: productionlineNoPage,
optionsAlias: { // optionsAlias: {
labelField: 'name', // labelField: 'name',
valueField: 'code' // valueField: 'code'
}, // },
filterable: true, // filterable: true,
} // }
}, // },
formatter: (_: Recordable, __: TableColumn, cellValue: string) => { // formatter: (_: Recordable, __: TableColumn, cellValue: string) => {
return productionlineNoPage.find((item) => item.code == cellValue)?.name // return productionlineNoPage.find((item) => item.code == cellValue)?.name
}, // },
}, // },
{ // {
label: '产线编号', // label: '产线编号',
field: 'lineName', // field: 'lineName',
sort: 'custom', // sort: 'custom',
isSearch: false, // isSearch: false,
form: { // form: {
// labelMessage: '信息提示说明!!!', // // labelMessage: '信息提示说明!!!',
componentProps: { // componentProps: {
isSearchList: true, // 开启查询弹窗 // isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 // searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
multiple:true, // multiple:true,
searchField: 'code', // 查询弹窗赋值字段 // searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题 // searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 // searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 // searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition: [{ // searchCondition: [{
key:'workshopCode', // key:'workshopCode',
value:'workshopCode', // value:'workshopCode',
message: '请填写车间代码!', // message: '请填写车间代码!',
isMainValue: true // isMainValue: true
},{ // },{
key: 'available', // key: 'available',
value: 'TRUE', // value: 'TRUE',
isMainValue: false // isMainValue: false
}] // }]
} // }
} // }
}, // },
// { // {
// label: '工序编号', // label: '工序编号',
// field: 'processCode', // field: 'processCode',
@ -494,12 +566,12 @@ export const ToolAccounts = useCrudSchemas(reactive<CrudSchema[]>([
// } // }
// }, // },
// }, // },
{ // {
label: '部门', // label: '部门',
field: 'departmentCode', // field: 'departmentCode',
sort: 'custom', // sort: 'custom',
isSearch: false // isSearch: false
}, // },
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
@ -645,7 +717,7 @@ export const ToolAccounts = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action', field: 'action',
isForm: false, isForm: false,
table: { table: {
width: 150, width: 300,
fixed: 'right' 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" /> <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> </template>
<script setup lang="ts"> <script setup lang="ts">

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

@ -8,6 +8,18 @@
label-width="80px" label-width="80px"
> >
<el-row> <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-col :span="24">
<el-form-item label="工装" prop="toolCode"> <el-form-item label="工装" prop="toolCode">
<div class="tag-container flex gap-2"> <div class="tag-container flex gap-2">
@ -48,23 +60,9 @@
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> <el-col :span="24">
<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-form-item label="备注" prop="remark"> <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-form-item>
</el-col> </el-col>
</el-row> </el-row>

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

@ -14,6 +14,17 @@ export const ToolModRules = reactive({
}) })
export const ToolMod = useCrudSchemas(reactive<CrudSchema[]>([ export const ToolMod = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Select',
}
},
{ {
label: '工装编码', label: '工装编码',
field: 'toolCode', 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: '部门', // label: '部门',
// field: 'departmentCode', // 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', sort: 'custom',
isSearch: true, isSearch: true,
fixed: 'left', fixed: 'left',
isForm: false,
table: { table: {
fixed: 'left', fixed: 'left',
width: 175 width: 175
@ -32,6 +33,7 @@ export const Counter = useCrudSchemas(
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
dictType: DICT_TYPE.INSPECTION_TYPE, dictType: DICT_TYPE.INSPECTION_TYPE,
isForm: false,
table: { table: {
width: 175 width: 175
} }
@ -41,6 +43,7 @@ export const Counter = useCrudSchemas(
field: 'supplierCode', field: 'supplierCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false,
table: { table: {
width: 175 width: 175
} }
@ -50,6 +53,7 @@ export const Counter = useCrudSchemas(
field: 'qualifiedTimes', field: 'qualifiedTimes',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
table: { table: {
width: 140 width: 140
} }
@ -59,6 +63,7 @@ export const Counter = useCrudSchemas(
field: 'lastQualifiedBatch', field: 'lastQualifiedBatch',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
table: { table: {
width: 140 width: 140
} }
@ -69,6 +74,7 @@ export const Counter = useCrudSchemas(
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: true, isSearch: true,
isForm: false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -93,6 +99,7 @@ export const Counter = useCrudSchemas(
field: 'unqualifiedTimes', field: 'unqualifiedTimes',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
@ -106,6 +113,7 @@ export const Counter = useCrudSchemas(
field: 'lastUnqualifiedBatch', field: 'lastUnqualifiedBatch',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
@ -120,6 +128,7 @@ export const Counter = useCrudSchemas(
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isForm: false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -144,6 +153,16 @@ export const Counter = useCrudSchemas(
field: 'nextStage', field: 'nextStage',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
form:{
component: 'Select',
componentProps: {
options:[],
optionsAlias: {
labelField: 'stage',
valueField: 'stage'
}
}
},
table: { table: {
width: 140 width: 140
} }
@ -213,14 +232,14 @@ export const Counter = useCrudSchemas(
} }
}, },
// { {
// label: '操作', label: '操作',
// field: 'action', field: 'action',
// isForm: false, isForm: false,
// table: { table: {
// width: 150, width: 150,
// fixed: 'right' fixed: 'right'
// } }
// } }
]) ])
) )

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

@ -134,7 +134,7 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = [ const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'qms:counter:update'}), // defaultButtons.mainListEditBtn({hasPermi:'qms:counter:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'qms:counter:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'qms:counter:delete'}), //
] ]
@ -149,7 +149,13 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() 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) 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', field: 'inspectionBatch',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isDetail: true,
form: { form: {
componentProps: { componentProps: {
disabled: true disabled: true

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

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

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

@ -64,27 +64,27 @@ export const Itembasic = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
} , } ,
}, },
{ // {
label: '状态', // label: '状态',
field: 'status', // field: 'status',
sort: 'custom', // sort: 'custom',
dictType: DICT_TYPE.ITEM_STATUS, // dictType: DICT_TYPE.ITEM_STATUS,
dictClass: 'string', // dictClass: 'string',
isForm: false, // isForm: false,
isSearch: false, // isSearch: false,
isTable: false, // isTable: false,
table: { // table: {
width: 100 // width: 100
} , // } ,
form: { // form: {
component: 'Switch', // component: 'Switch',
value: 'ENABLE', // value: 'ENABLE',
componentProps: { // componentProps: {
inactiveValue: 'DISABLE', // inactiveValue: 'DISABLE',
activeValue: 'ENABLE' // activeValue: 'ENABLE'
} // }
}, // },
}, // },
{ {
label: '计量单位', label: '计量单位',
field: 'uom', field: 'uom',
@ -498,9 +498,9 @@ export const rules = reactive({
{ required: true, message: '请输入名称', trigger: 'blur' }, { required: true, message: '请输入名称', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }, { max: 50, message: '不得超过50个字符', trigger: 'blur' },
], ],
status: [ // status: [
{ required: true, message: '请选择状态', trigger: 'change' }, // { required: true, message: '请选择状态', trigger: 'change' },
], // ],
uom: [ uom: [
{ required: true, message: '请选择计量单位', trigger: 'change' }, { 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: '单位', label: '单位',
field: 'unit', field: 'unit',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.UOM, dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string', dictClass: 'string',
isSearch: false, isSearch: false,
table: { table: {
@ -417,7 +417,7 @@ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
label: '单位', label: '单位',
field: 'unit', field: 'unit',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.UOM, dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string', dictClass: 'string',
isSearch: false, isSearch: false,
table: { 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: { form: {
show:true, show:true,
component: 'SelectV2', component: 'SelectV2',
value:'undefined', // value:'undefined',
value:lineCodeData?.list.length>0?lineCodeData.list[0].code:'undefined',
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
// isSearchList: true, // 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 width: 150
}, },
}, },
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
])) ]))
// 表单校验 // 表单校验
export const RelegateRecordDetailRules = reactive({ export const RelegateRecordDetailRules = reactive({
@ -317,14 +308,4 @@ export const RelegateRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 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', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}] }],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
} }
}, },
table: { table: {
@ -350,6 +358,7 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
form: { form: {
componentProps: { componentProps: {
enterSearch: true,
isSearchList: true, isSearchList: true,
searchListPlaceholder: '请选择降级物料代码', searchListPlaceholder: '请选择降级物料代码',
searchField: 'code', searchField: 'code',
@ -364,7 +373,15 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
key: 'type', key: 'type',
value: confgiData.itemType, value: confgiData.itemType,
isMainValue: false isMainValue: false
}] }],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
} }
}, },
tableForm:{ tableForm:{

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

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

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

@ -199,7 +199,7 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
if (type == 'create') { if (type == 'create') {
// nextTick(() => { // nextTick(() => {
@ -272,8 +272,17 @@ const BASE_URL = getJmreportBaseUrl()
const src = ref(BASE_URL + '/jmreport/view/924811818898698240?token=' + getAccessToken()) const src = ref(BASE_URL + '/jmreport/view/924811818898698240?token=' + getAccessToken())
const srcPoint = ref(BASE_URL + '/jmreport/view/940818992169918464?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) => { 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 ()=>{ const handleSelectionPoint = async ()=>{

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

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

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

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

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

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

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

@ -100,7 +100,15 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}] }],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
} }
} }
}, },
@ -114,6 +122,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择发货记录单号', // 输入框占位文本 searchListPlaceholder: '请选择发货记录单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段 searchField: 'number', // 查询弹窗赋值字段
@ -144,7 +153,15 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
message: '请选择客户代码!', // 前置添加没填的提示语 message: '请选择客户代码!', // 前置添加没填的提示语
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 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: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择客户月台代码', // 输入框占位文本 searchListPlaceholder: '请选择客户月台代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
@ -191,7 +209,15 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
value: 'customerCode', value: 'customerCode',
message: '请填写客户代码!', message: '请填写客户代码!',
isMainValue: true isMainValue: true
}] }],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
} }
} }
}, },
@ -206,6 +232,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择承运商', // 输入框占位文本 searchListPlaceholder: '请选择承运商', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
@ -216,7 +243,15 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false 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 width: 150
}, },
isSearch: true, isSearch: true,
tableForm:{ tableForm: {
enterSearch:true,
isInpuFocusShow: true, // 开启查询弹窗 isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择到库位代码', searchListPlaceholder: '请选择到库位代码',
searchField: 'toLocationCode', searchField: 'toLocationCode',
@ -933,7 +969,15 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
key: 'isIn', key: 'isIn',
value: 'in', value: 'in',
isMainValue: false 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 isMainValue: false
} }
] ],
verificationParams: [{
key: 'packUnit',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
} }
}, },
tableForm: { tableForm: {
@ -1341,7 +1393,15 @@ export const CustomerReturnRequestDetailLabel = useCrudSchemas(reactive<CrudSche
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}] }],
verificationParams: [{
key: 'packUnit',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}, },
isTableForm: true, isTableForm: true,
isForm: 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 type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ export const DeliverRecordMain = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '单据号', {
field: 'number', label: '单据号',
sort: 'custom', field: 'number',
table: { sort: 'custom',
width: 180, table: {
fixed: 'left' width: 180,
}, fixed: 'left'
isSearch: true },
}, isSearch: true
{ },
label: '申请单号', {
field: 'requestNumber', label: '申请单号',
sort: 'custom', field: 'requestNumber',
table: { sort: 'custom',
width: 180 table: {
}, width: 180
isSearch: true },
}, isSearch: true
{ },
label: '任务单号', {
field: 'jobNumber', label: '任务单号',
sort: 'custom', field: 'jobNumber',
table: { sort: 'custom',
width: 180 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',
} }
}, },
}, {
{ label: '发货记录单号',
label: '截止时间', field: 'deliverRecordNumber',
field: 'dueTime', sort: 'custom',
formatter: dateFormatter, table: {
detail: { width: 150
dateFormat: 'YYYY-MM-DD HH:mm:ss' },
}, isSearch: false,
sort: 'custom', isTable: false,
table: { isForm: false,
width: 180 isDetail: false
}, },
isTable: false, {
form: { label: '发货计划单号',
component: 'DatePicker', field: 'deliverPlanNumber',
componentProps: { sort: 'custom',
type: 'datetime', table: {
dateFormat: 'YYYY-MM-DD HH:mm:ss', width: 180
valueFormat: 'x', },
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: '客户代码',
label: '执行时间', field: 'customerCode',
field: 'executeTime', sort: 'custom',
formatter: dateFormatter, table: {
detail: { width: 150
dateFormat: 'YYYY-MM-DD HH:mm:ss' },
}, isSearch: true
sort: 'custom', },
table: { {
width: 180 label: '客户月台代码',
}, field: 'customerDockCode',
isTable: false, sort: 'custom',
form: { table: {
component: 'DatePicker', width: 150
componentProps: { },
type: 'datetime', isTable: false
dateFormat: 'YYYY-MM-DD HH:mm:ss', },
valueFormat: 'x', {
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: '截止时间',
label: '生效日期', field: 'dueTime',
field: 'activeDate', formatter: dateFormatter,
formatter: dateFormatter2, detail: {
detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss'
dateFormat: 'YYYY-MM-DD' },
}, sort: 'custom',
sort: 'custom', table: {
table: { width: 180
width: 180 },
}, isTable: false,
isTable: false, form: {
form: { component: 'DatePicker',
component: 'DatePicker', componentProps: {
componentProps: { type: 'datetime',
style: {width: '100%'}, dateFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'date', valueFormat: 'x'
dateFormat: 'YYYY-MM-DD', }
valueFormat: 'x',
} }
}, },
}, {
{ label: '执行时间',
label: '从仓库代码', field: 'executeTime',
field: 'fromWarehouseCode', formatter: dateFormatter,
sort: 'custom', detail: {
table: { dateFormat: 'YYYY-MM-DD HH:mm:ss'
width: 150 },
}, sort: 'custom',
isTable: false, table: {
}, width: 180
{ },
label: '到仓库代码', isTable: false,
field: 'toWarehouseCode', form: {
sort: 'custom', component: 'DatePicker',
table: { componentProps: {
width: 150 type: 'datetime',
}, dateFormat: 'YYYY-MM-DD HH:mm:ss',
isTable: false, valueFormat: 'x'
}, }
{ }
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
}, },
isTable: false, {
}, label: '生效日期',
{ field: 'activeDate',
label: '创建时间', formatter: dateFormatter2,
field: 'createTime', detail: {
formatter: dateFormatter, dateFormat: 'YYYY-MM-DD'
detail: { },
dateFormat: 'YYYY-MM-DD HH:mm:ss' 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: { label: '从仓库代码',
width: 180 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: { label: '到库区类型范围',
component: 'DatePicker', field: 'toAreaTypes',
componentProps: { dictType: DICT_TYPE.AREA_TYPE,
type: 'datetime', dictClass: 'string',
dateFormat: 'YYYY-MM-DD HH:mm:ss', isTable: false,
valueFormat: 'x', sort: 'custom',
table: {
width: 150
} }
}, },
}, {
{ label: '从库区代码范围',
label: '创建者', field: 'fromAreaCodes',
field: 'creator', sort: 'custom',
sort: 'custom', table: {
table: { width: 150
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: 'remark',
// label: '代码', sort: 'custom',
// field: 'code', table: {
// sort: 'custom', width: 150
// table: { },
// width: 150 isTable: false
// }, },
// }, {
{ label: '创建时间',
label: '是否可用', field: 'createTime',
field: 'available', formatter: dateFormatter,
dictType: DICT_TYPE.TRUE_FALSE, detail: {
dictClass: 'string', dateFormat: 'YYYY-MM-DD HH:mm:ss'
isSearch: false, },
isTable: false, sort: 'custom',
sort: 'custom', table: {
table: { width: 180
width: 150 },
isTable: true,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
}, },
form: { {
component: 'Switch', label: '创建者',
value: 'TRUE', field: 'creator',
componentProps: { sort: 'custom',
inactiveValue: 'FALSE', table: {
activeValue: 'TRUE' 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({ 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', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}] }],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
} }
} }
}, },
@ -119,6 +127,7 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
// }, // },
form: { form: {
componentProps: { componentProps: {
enterSearch: true,
isSearchList: true, isSearchList: true,
searchListPlaceholder: '请选择客户月台代码', searchListPlaceholder: '请选择客户月台代码',
searchField: 'code', searchField: 'code',
@ -133,7 +142,15 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
key: 'customerCode', key: 'customerCode',
value: 'customerCode', value: 'customerCode',
isMainValue: true 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, multiple:true,
// isInpuFocusShow: true, // 开启查询弹窗 // isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', searchListPlaceholder: '请选择物料代码',
disabled:true,
searchField: 'itemCode', searchField: 'itemCode',
searchTitle: '客户物料基础信息', searchTitle: '客户物料基础信息',
searchAllSchemas: Customeritem.allSchemas, searchAllSchemas: Customeritem.allSchemas,
searchPage: CustomerItemApi.getPageBusinessTypeToItemCode, searchPage: CustomerItemApi.getPageBusinessTypeToItemCode,
verificationPage: CustomerItemApi.getCustomerItemListByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true,
verificationParams: [{
key: 'itemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}, },
form: { form: {
componentProps: { componentProps: {

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

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

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

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

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

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

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

@ -655,6 +655,11 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
// isSearch: true, // isSearch: true,
sortTableDefault:1100, sortTableDefault:1100,
isTableForm: false, 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 TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import * as BomApi from "@/api/wms/bom";
defineOptions({ name: 'ProcessproductionRequestMain' }) 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 // if(tableData.value.find(item1=>item1['productionLine'] == item['productionLineCode'])) return
const newRow = JSON.parse(JSON.stringify(tableFormKeys)) const newRow = JSON.parse(JSON.stringify(tableFormKeys))
newRow['productionLine'] = item['productionLineCode'] newRow['productionLine'] = item['productionLineCode']
const param1 = { // const param1 = {
productItemCode: formRef.formModel['itemCode'], // productItemCode: formRef.formModel['itemCode'],
available: 'TRUE', // available: 'TRUE',
pageSize: 20, // pageSize: 20,
pageNo: 1, // pageNo: 1,
sort: '', // sort: '',
by: 'ASC', // by: 'ASC',
} // }
await BomApi.getBomPage(param1).then(res => { // await BomApi.getBomPage(param1).then(res => {
console.log(res) // console.log(res)
if(res?.list?.length>0){ // if(res?.list?.length>0){
newRow['componentItemCode'] = res.list[0].componentItemCode // newRow['componentItemCode'] = res.list[0].componentItemCode
} // }
}) // })
tableData.value.push(newRow) tableData.value.push(newRow)
}) })
}else if(formField === 'processCode'){ }else if(formField === 'processCode'){
@ -140,7 +140,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
}else if(formField === 'locationCode'){ }else if(formField === 'locationCode'){
row['locationCode']=val[0]['code'] row['locationCode']=val[0]['code']
}else if(formField === 'componentItemCode'){ }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 { } else {
row[formField] = val[0][searchField] 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 { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import {Bom} from "@/views/wms/basicDataManage/itemManage/bom/bom.data"; import {Bom} from "@/views/wms/basicDataManage/itemManage/bom/bom.data";
import * as BomApi from "@/api/wms/bom"; 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' import { fa } from 'element-plus/es/locale'
export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
@ -64,7 +68,15 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false 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', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}], }],
verificationParams: [{
key: 'productionLine',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
} }
}, },
tableForm:{ tableForm:{
@ -355,7 +375,17 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false 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: { table: {
width: 150 width: 150
}, },
tableForm:{ tableForm: {
enterSearch:true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择工序代码', searchListPlaceholder: '请选择工序代码',
searchField: 'code', searchField: 'code',
@ -380,11 +411,20 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}] }],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}, },
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch: true,
isSearchList: true, isSearchList: true,
searchListPlaceholder: '请选择工序代码', searchListPlaceholder: '请选择工序代码',
searchField: 'code', searchField: 'code',
@ -399,46 +439,15 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}] }],
} verificationParams: [{
} key: 'code',
}, action: '==',
{ value: '',
label: '库位代码', isMainValue: false,
field: 'locationCode', isSearch: true,
sort: 'custom', isFormModel: true,
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
}]
} }
} }
}, },
@ -450,13 +459,14 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
tableForm: { tableForm:{
// enterSearch: true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择子物料代码版本', // 输入框占位文本 searchListPlaceholder: '请选择子物料代码',
searchField: 'componentItemCode', // 查询弹窗赋值字段 searchField: 'componentItemCode',
searchTitle: '物料清单信息', // 查询弹窗标题 searchTitle: '库存余额物料清单信息',
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类 searchAllSchemas: Balance.allSchemas,
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法 searchPage: ProcessproductionRequestMainApi.getProcessproductionChildBomPage,
searchCondition: [{ searchCondition: [{
key:'productItemCode', key:'productItemCode',
value:'itemCode', value:'itemCode',
@ -466,17 +476,26 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}] }],
verificationParams: [{
key: 'componentItemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}, },
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Bom版本', // 输入框占位文本 searchListPlaceholder: '请选择子物料代码',
searchField: 'componentItemCode', // 查询弹窗赋值字段 searchField: 'componentItemCode',
searchTitle: '物料清单信息', // 查询弹窗标题 searchTitle: '库存余额物料清单信息',
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类 searchAllSchemas: Balance.allSchemas,
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法 searchPage: ProcessproductionRequestMainApi.getProcessproductionChildBomPage,
searchCondition: [{ searchCondition: [{
key:'productItemCode', key:'productItemCode',
value:'itemCode', value:'itemCode',
@ -486,9 +505,139 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false 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: '批次', label: '批次',
@ -497,6 +646,14 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
tableForm:{
disabled:true,
},
form: {
componentProps: {
disabled:true,
}
}
}, },
{ {
label: '子物料数量', label: '子物料数量',
@ -530,6 +687,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
width: 150 width: 150
}, },
form: { form: {
disabled:true,
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'}, style: {width: '100%'},
@ -539,10 +697,11 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
} }
}, },
tableForm:{ tableForm:{
disabled:true,
type:'FormDate', type:'FormDate',
placeholder: '请选择生产日期', placeholder: '请选择生产日期',
valueFormat: 'x', valueFormat: 'x',
}, }
}, },
{ {
label: '是否可用', label: '是否可用',
@ -589,8 +748,10 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 130 width: 130
}, },
isSearch: false,
isForm: false, isForm: false,
isTable: true isTable: false,
isTableForm: false,
}, },
{ {
label: '删除时间', label: '删除时间',
@ -695,9 +856,9 @@ export const ProcessproductionRequestDetailRules = reactive({
productionLine: [ productionLine: [
{ required: true, message: '请选择生产线代码', trigger: 'change' } { required: true, message: '请选择生产线代码', trigger: 'change' }
], ],
processCode: [ // processCode: [
{ required: true, message: '请选择工序代码', trigger: 'change' } // { required: true, message: '请选择工序代码', trigger: 'change' }
], // ],
locationCode: [ locationCode: [
{ required: true, message: '请选择库位代码', trigger: 'change' } { 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, multiple: true,
// isInpuFocusShow: true, // isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
disabled:true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题 searchTitle: '库存余额信息', // 查询弹窗标题

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

@ -686,7 +686,7 @@ const tableFormButton = async (val , row) => {
bomModelVisible.value = true bomModelVisible.value = true
DialogTitle.value = '物料代码【' + row.itemCode + '】——Bom信息' DialogTitle.value = '物料代码【' + row.itemCode + '】——Bom信息'
detatableDataBom.params = { detatableDataBom.params = {
masterId: row.masterId masterId: row.id
} }
await getDetailListBom() 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 { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
import * as ItemPackageApi from '@/api/wms/itempackage/index' 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() // 国际化 const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -975,6 +978,61 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150 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: '物料名称', label: '物料名称',
field: 'itemName', field: 'itemName',

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

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

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

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

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

@ -112,25 +112,25 @@ export const PurchasereceiptRecordMain1 = useCrudSchemas(reactive<CrudSchema[]>(
width: 150 width: 150
}, },
}, },
{ // {
label: '包装规格', // label: '包装规格',
field: 'packUnit', // field: 'packUnit',
dictClass: 'string', // dictClass: 'string',
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ // {
label: '从库位代码2', // label: '从库位代码',
field: 'fromLocationCode', // field: 'fromLocationCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
//
}, // },
{ {
label: '到库位代码', label: '到库位代码',
field: 'toLocationCode', 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,//多选 multiple:true,//多选
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择供应商物料', searchListPlaceholder: '请选择供应商物料',
isShowTableFormSearch: true,
searchField: 'itemCode', searchField: 'itemCode',
searchTitle: '供应商物料信息', searchTitle: '供应商物料信息',
searchAllSchemas: Supplieritem.allSchemas, 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', sort: 'custom',
isSearch: true, isSearch: true,
}, },
{ // {
label: '完整凭证号', // label: '完整凭证号',
field: 'ttInvoiceno', // field: 'ttInvoiceno',
sort: 'custom', // sort: 'custom',
isSearch: true, // isSearch: true,
}, // },
{ {
label: '发票TC原始金额', label: '发票TC原始金额',
field: 'ttTcAmt', field: 'ttTcAmt',

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

@ -28,7 +28,7 @@
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #id="{row}"> <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> <span>{{ row.id }}</span>
</el-button> </el-button>
</template> </template>
@ -61,10 +61,22 @@
:detailButtonIsShowAdd=false :detailButtonIsShowAdd=false
:detailButtonIsShowEdit=false :detailButtonIsShowEdit=false
:detailButtonIsShowDelete=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" /> <ImportForm ref="importFormRef" url="/wms/supplier-apbalance-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<AdjustmentDialog ref="adjustment" @updateList="getList"/>
</template> </template>
<script setup lang="ts"> <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 ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import * as BasicSpotCheckOptionApi from "@/api/eam/basicSpotCheckOption"; 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 {getJmreportBaseUrl} from "@/utils/systemParam";
import {getAccessToken} from "@/utils/auth"; import {getAccessToken} from "@/utils/auth";
@ -162,7 +177,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'print') { // } else if (val == 'print') { //
handlePrint(row) handlePrint(row)
} else if (val == 'replyInput') { // } else if (val == 'replyInput') { //
handleReplyInput(row.id) handleReplyInput(row)
} }
} }
@ -198,8 +213,16 @@ const formsSuccess = async (formType,data) => {
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() 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') detailRef.value.openDetail(row, titleName, titleValue, 'basicSupplierApbalanceMain')
} }
// //
@ -209,20 +232,12 @@ const handlePrint = async (row) => {
window.open(src.value+'&id='+row.id) window.open(src.value+'&id='+row.id)
} }
const adjustment = ref()
// //
const handleReplyInput = async (id: number) => { const handleReplyInput = async (row) => {
try { adjustment.value.open(row)
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 {}
} }
/** 删除按钮操作 */ /** 删除按钮操作 */

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

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

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

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

Loading…
Cancel
Save