Browse Source

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

hella_online_20240829
陈薪名 2 months ago
parent
commit
3b1f6cf932
  1. 6
      src/api/eam/basicEamWorkshop/index.ts
  2. 67
      src/api/eam/repairSparePartsRecord/index.ts
  3. 68
      src/api/eam/repairSparePartsRequest/index.ts
  4. 59
      src/api/eam/toolChangedRecord/index.ts
  5. 79
      src/api/eam/toolSigning/index.ts
  6. 4
      src/api/qms/counter/index.ts
  7. 8
      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. 154
      src/views/eam/equipmentSigning/equipmentSigning.data.ts
  21. 25
      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. 11
      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. 74
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
  54. 93
      src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts
  55. 88
      src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts
  56. 141
      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. 55
      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. 279
      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})
}

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

@ -830,9 +830,13 @@ 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(',')
console.log(arr1.filter((item) => arr2.includes(item)))
console.log(22, str)
if (str) {
message.alert('代码' + str + '没有找到对应数据') message.alert('代码' + str + '没有找到对应数据')
return return
} else { }
}
let repeatCode = [] let repeatCode = []
if (tableData.length > 0) { if (tableData.length > 0) {
tableData.forEach((item) => { tableData.forEach((item) => {
@ -847,8 +851,8 @@ export const getListByBottonInput = async (headerItem, val, row, routeName, form
message.warning(`${t('ts.代码')}${repeatCode.join(',')}${t('ts.已经存在')}`); message.warning(`${t('ts.代码')}${repeatCode.join(',')}${t('ts.已经存在')}`);
return; return;
} }
console.log(list.value)
callback(list.value) callback(list.value)
}
}) })
return return
} else { } else {

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: '部门',

154
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'
} // }
} // }
])) ]))

25
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) => {
nextTick(() => {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] 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(() => {
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,6 +265,14 @@ 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: '库位',

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

@ -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: {

74
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,
}], // 失去焦点校验参数
} }
} }
}, },
@ -918,6 +953,7 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}, },
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

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

@ -4,7 +4,8 @@ import { dateFormatter } from '@/utils/formatTime'
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([ export const DeliverJobMain = useCrudSchemas(
reactive<CrudSchema[]>([
{ {
label: '单据号', label: '单据号',
field: 'number', field: 'number',
@ -13,7 +14,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 180, width: 180,
fixed: 'left' fixed: 'left'
}, },
isSearch: true, isSearch: true
}, },
{ {
label: '申请单号', label: '申请单号',
@ -22,7 +23,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180 width: 180
}, },
isSearch: true, isSearch: true
}, },
{ {
label: '状态', label: '状态',
@ -34,7 +35,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, }
}, },
{ {
label: '客户代码', label: '客户代码',
@ -42,7 +43,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, }
}, },
{ {
label: '客户月台代码', label: '客户月台代码',
@ -51,7 +52,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: true, isTable: true
}, },
{ {
label: '发货月台', label: '发货月台',
@ -63,7 +64,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false, isForm: false,
table: { table: {
width: 150 width: 150
}, }
}, },
{ {
label: '发货类型', label: '发货类型',
@ -73,7 +74,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string', dictClass: 'string',
table: { table: {
width: 150 width: 150
}, }
}, },
{ {
label: '发货计划单号', label: '发货计划单号',
@ -82,7 +83,8 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180 width: 180
}, },
isTable: false, isTable: true,
isDetail: true
}, },
{ {
label: '客户发货单号', label: '客户发货单号',
@ -91,7 +93,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180 width: 180
}, },
isTable: false, isTable: false
}, },
{ {
@ -101,7 +103,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '运输方式', label: '运输方式',
@ -111,7 +113,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '车牌号', label: '车牌号',
@ -120,7 +122,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '申请时间', label: '申请时间',
@ -139,9 +141,9 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '要求截止时间', label: '要求截止时间',
@ -160,9 +162,9 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '过期时间', label: '过期时间',
@ -181,9 +183,9 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '从仓库代码', label: '从仓库代码',
@ -192,7 +194,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '到仓库代码', label: '到仓库代码',
@ -201,7 +203,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '从库区类型范围', label: '从库区类型范围',
@ -212,7 +214,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, }
}, },
{ {
label: '到库区类型范围', label: '到库区类型范围',
@ -223,7 +225,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, }
}, },
{ {
label: '从库区代码范围', label: '从库区代码范围',
@ -232,7 +234,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '到库区代码范围', label: '到库区代码范围',
@ -241,7 +243,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '从月台代码', label: '从月台代码',
@ -250,7 +252,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
// { // {
// label: '状态', // label: '状态',
@ -269,7 +271,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isTable: false, isTable: false,
form: { form: {
component: 'InputNumber', component: 'InputNumber'
} }
}, },
{ {
@ -281,7 +283,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isTable: false, isTable: false,
form: { form: {
component: 'InputNumber', component: 'InputNumber'
} }
}, },
{ {
@ -291,7 +293,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '部门', label: '部门',
@ -300,7 +302,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '自动完成', label: '自动完成',
@ -499,7 +501,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '承接时间', label: '承接时间',
@ -518,9 +520,9 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '承接人', label: '承接人',
@ -529,7 +531,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '完成时间', label: '完成时间',
@ -548,9 +550,9 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '完成人', label: '完成人',
@ -559,7 +561,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '创建时间', label: '创建时间',
@ -578,9 +580,9 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '创建者', label: '创建者',
@ -589,7 +591,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: true, isTable: true
}, },
{ {
label: '最后更新时间', label: '最后更新时间',
@ -608,9 +610,9 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '最后更新者', label: '最后更新者',
@ -619,7 +621,7 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '操作', label: '操作',
@ -629,9 +631,10 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'
},
} }
])) }
])
)
//表单校验 //表单校验
export const DeliverJobMainRules = reactive({ export const DeliverJobMainRules = reactive({

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

@ -4,7 +4,8 @@ import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ export const DeliverRecordMain = useCrudSchemas(
reactive<CrudSchema[]>([
{ {
label: '单据号', label: '单据号',
field: 'number', field: 'number',
@ -30,7 +31,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
table: { table: {
width: 180 width: 180
}, }
}, },
{ {
label: '发货记录单号', label: '发货记录单号',
@ -42,16 +43,18 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false, isSearch: false,
isTable: false, isTable: false,
isForm: false, isForm: false,
isDetail:false, isDetail: false
},
{
label: '发货计划单号',
field: 'deliverPlanNumber',
sort: 'custom',
table: {
width: 180
},
isTable: true,
isDetail: true
}, },
// {
// label: '发货计划单号',
// field: 'deliverPlanNumber',
// sort: 'custom',
// table: {
// width: 180
// },
// },
// { // {
// label: '客户发货单号', // label: '客户发货单号',
// field: 'customerDeliverNumber', // field: 'customerDeliverNumber',
@ -72,7 +75,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, }
}, },
{ {
label: '客户代码', label: '客户代码',
@ -90,7 +93,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '承运商', label: '承运商',
@ -99,7 +102,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '运输方式', label: '运输方式',
@ -108,7 +111,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '车牌号', label: '车牌号',
@ -117,7 +120,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '申请时间', label: '申请时间',
@ -136,9 +139,9 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '截止时间', label: '截止时间',
@ -157,9 +160,9 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '执行时间', label: '执行时间',
@ -178,9 +181,9 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '生效日期', label: '生效日期',
@ -200,9 +203,9 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' }, style: { width: '100%' },
type: 'date', type: 'date',
dateFormat: 'YYYY-MM-DD', dateFormat: 'YYYY-MM-DD',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '从仓库代码', label: '从仓库代码',
@ -211,7 +214,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '到仓库代码', label: '到仓库代码',
@ -220,7 +223,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '从库区类型范围', label: '从库区类型范围',
@ -231,7 +234,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, }
}, },
{ {
label: '到库区类型范围', label: '到库区类型范围',
@ -242,7 +245,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, }
}, },
{ {
label: '从库区代码范围', label: '从库区代码范围',
@ -251,7 +254,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '到库区代码范围', label: '到库区代码范围',
@ -260,7 +263,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '从月台代码', label: '从月台代码',
@ -269,7 +272,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '出库事务类型', label: '出库事务类型',
@ -278,7 +281,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '入库事务类型', label: '入库事务类型',
@ -287,7 +290,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '业务类型', label: '业务类型',
@ -296,7 +299,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '部门', label: '部门',
@ -305,7 +308,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '接口类型', label: '接口类型',
@ -316,7 +319,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, }
}, },
{ {
label: '备注', label: '备注',
@ -325,7 +328,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '创建时间', label: '创建时间',
@ -344,9 +347,9 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '创建者', label: '创建者',
@ -355,7 +358,7 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: true, isTable: true
}, },
// { // {
// label: '代码', // label: '代码',
@ -384,8 +387,9 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
activeValue: 'TRUE' activeValue: 'TRUE'
} }
} }
}, }
])) ])
)
//表单校验 //表单校验
export const DeliverRecordMainRules = reactive({ export const DeliverRecordMainRules = reactive({

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

@ -6,7 +6,11 @@ import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as DeliverPlanMainApi from '@/api/wms/deliverPlanMain' import * as DeliverPlanMainApi from '@/api/wms/deliverPlanMain'
import * as DeliverPlanDetailApi from '@/api/wms/deliverPlanDetail' import * as DeliverPlanDetailApi from '@/api/wms/deliverPlanDetail'
import { DeliverPlanMain ,DeliverPlanDetail,DeliverPlanDetailRequest} from '../../deliverplan/deliverPlanMain/deliverPlanMain.data' import {
DeliverPlanMain,
DeliverPlanDetail,
DeliverPlanDetailRequest
} from '../../deliverplan/deliverPlanMain/deliverPlanMain.data'
import * as CustomerItemApi from '@/api/wms/customeritem' import * as CustomerItemApi from '@/api/wms/customeritem'
import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.data' import { Customeritem } from '@/views/wms/basicDataManage/customerManage/customeritem/customeritem.data'
@ -45,7 +49,8 @@ const userDeptArray:any = [userDept]
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ export const DeliverRequestMain = useCrudSchemas(
reactive<CrudSchema[]>([
{ {
label: '单据号', label: '单据号',
field: 'number', field: 'number',
@ -55,7 +60,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'left' fixed: 'left'
}, },
isForm: false, isForm: false,
isSearch: true, isSearch: true
}, },
{ {
label: '状态', label: '状态',
@ -68,7 +73,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, }
}, },
{ {
label: '客户代码', label: '客户代码',
@ -88,11 +93,23 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '客户信息', // 查询弹窗标题 searchTitle: '客户信息', // 查询弹窗标题
searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类 searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类
searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法 searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [
{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}] }
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
} }
} }
}, },
@ -107,13 +124,15 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择客户月台代码', // 输入框占位文本 searchListPlaceholder: '请选择客户月台代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '客户月台信息', // 查询弹窗标题 searchTitle: '客户月台信息', // 查询弹窗标题
searchAllSchemas: Customerdock.allSchemas, // 查询弹窗所需类 searchAllSchemas: Customerdock.allSchemas, // 查询弹窗所需类
searchPage: CustomerdockApi.getCustomerdockPage, // 查询弹窗所需分页方法 searchPage: CustomerdockApi.getCustomerdockPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [
{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
@ -123,7 +142,18 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
value: 'customerCode', value: 'customerCode',
message: '请填写客户代码!', message: '请填写客户代码!',
isMainValue: true isMainValue: true
}] }
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
} }
} }
}, },
@ -181,7 +211,8 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 180 width: 180
}, },
isTable:false, isTable: true,
isDetail: true,
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
@ -192,7 +223,8 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '发货计划信息', // 查询弹窗标题 searchTitle: '发货计划信息', // 查询弹窗标题
searchAllSchemas: DeliverPlanDetailRequest.allSchemas, // 查询弹窗所需类 searchAllSchemas: DeliverPlanDetailRequest.allSchemas, // 查询弹窗所需类
searchPage: DeliverPlanDetailApi.getDeliverPlanDetailPage, // 查询弹窗所需分页方法 searchPage: DeliverPlanDetailApi.getDeliverPlanDetailPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [
{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
@ -201,7 +233,18 @@ export const DeliverRequestMain = 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
}
] // 失去焦点校验参数
} }
} }
}, },
@ -213,7 +256,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 180 width: 180
}, },
isTable: false, isTable: false,
isForm: false, isForm: false
}, },
{ {
label: '承运商', label: '承运商',
@ -226,17 +269,30 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择承运商', // 输入框占位文本 searchListPlaceholder: '请选择承运商', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '承运商信息', // 查询弹窗标题 searchTitle: '承运商信息', // 查询弹窗标题
searchAllSchemas: Carrier.allSchemas, // 查询弹窗所需类 searchAllSchemas: Carrier.allSchemas, // 查询弹窗所需类
searchPage: CarrierApi.getCarrierPage, // 查询弹窗所需分页方法 searchPage: CarrierApi.getCarrierPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [
{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}] }
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
} }
} }
}, },
@ -249,7 +305,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable: false
}, },
{ {
label: '车牌号', label: '车牌号',
@ -258,7 +314,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable: false
}, },
{ {
label: '申请时间', label: '申请时间',
@ -278,7 +334,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' }, style: { width: '100%' },
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
} }
}, },
isForm: false isForm: false
@ -301,9 +357,9 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' }, style: { width: '100%' },
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
}
} }
},
}, },
{ {
label: '从仓库代码', label: '从仓库代码',
@ -313,7 +369,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isTable: false, isTable: false,
isForm: false, isForm: false
}, },
{ {
label: '到仓库代码', label: '到仓库代码',
@ -323,7 +379,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isTable: false, isTable: false,
isForm: false, isForm: false
}, },
{ {
label: '从库区类型范围', label: '从库区类型范围',
@ -335,7 +391,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isForm: false, isForm: false
}, },
{ {
label: '到库区类型范围', label: '到库区类型范围',
@ -347,7 +403,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isForm: false, isForm: false
}, },
{ {
label: '从库区代码范围', label: '从库区代码范围',
@ -357,7 +413,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isTable: false, isTable: false,
isForm: false, isForm: false
}, },
{ {
label: '到库区代码范围', label: '到库区代码范围',
@ -367,7 +423,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isTable: false, isTable: false,
isForm: false, isForm: false
}, },
{ {
label: '从月台代码', label: '从月台代码',
@ -377,7 +433,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isTable: false, isTable: false,
isForm: false, isForm: false
}, },
{ {
label: '业务类型', label: '业务类型',
@ -390,10 +446,10 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
value: 'Deliver', value: 'Deliver',
componentProps: { componentProps: {
disabled: true, disabled: true
} }
}, },
isForm: false, isForm: false
}, },
{ {
label: '部门', label: '部门',
@ -511,7 +567,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable: false, isTable: false
}, },
{ {
label: '创建时间', label: '创建时间',
@ -531,10 +587,10 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' }, style: { width: '100%' },
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
} }
}, },
isForm: false, isForm: false
}, },
{ {
label: '创建者', label: '创建者',
@ -544,7 +600,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isTable: true, isTable: true,
isForm: false, isForm: false
}, },
{ {
label: '最后更新时间', label: '最后更新时间',
@ -564,10 +620,10 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' }, style: { width: '100%' },
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x'
} }
}, },
isForm: false, isForm: false
}, },
{ {
label: '最后更新者', label: '最后更新者',
@ -577,7 +633,7 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isTable: false, isTable: false,
isForm: false, isForm: false
}, },
{ {
label: '操作', label: '操作',
@ -587,9 +643,10 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 300, width: 300,
fixed: 'right' fixed: 'right'
},
} }
])) }
])
)
//表单校验 //表单校验
export const DeliverRequestMainRules = reactive({ export const DeliverRequestMainRules = reactive({
@ -731,11 +788,21 @@ export const DeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
tableForm:{ tableForm:{
multiple:true, multiple:true,
isInpuFocusShow: true, // 开启查询弹窗 isInpuFocusShow: true, // 开启查询弹窗
isShowTableFormSearch: true,
searchListPlaceholder: '请选择物料代码', searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode', searchField: 'itemCode',
searchTitle: '客户物料基础信息', searchTitle: '客户物料基础信息',
searchAllSchemas: Customeritem.allSchemas, searchAllSchemas: Customeritem.allSchemas,
searchPage: CustomerItemApi.getPageBusinessTypeToItemCode, searchPage: CustomerItemApi.getPageBusinessTypeToItemCode,
verificationPage: CustomerItemApi.getCustomerItemListByCodes, // 校验数去焦点输入是否正确的方法
verificationParams: [{
key: 'itemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}, },
form: { form: {
componentProps: { componentProps: {

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: '销售订单行',

55
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,
}], // 失去焦点校验参数
} }
} }
}, },
@ -755,6 +782,7 @@ export const StockupDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
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]
} }

279
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,
}], // 失去焦点校验参数
} }
} }
}, },
@ -335,6 +347,14 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}], }],
verificationParams: [{
key: 'productionLine',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
} }
}, },
tableForm:{ tableForm:{
@ -356,6 +376,16 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}], }],
verificationPage: ProductionlineitemApi.getProductionLineCodelistByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true,
verificationParams: [{
key: 'productionLineCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}, },
}, },
{ {
@ -366,6 +396,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
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
}]
} }
} }
}, },
@ -451,12 +460,13 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
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