Browse Source

Merge branch 'hella_online_20240803' into master_hella

hella_online_20240829
陈薪名 3 months ago
parent
commit
1927c40600
  1. 15
      src/api/wms/mesRawMaterialConsumptionInfo/index.ts
  2. 2
      src/api/wms/productputawayRecordDetail/index.ts
  3. 8
      src/api/wms/productputawayRecordMain/index.ts
  4. 10
      src/api/wms/purchasereturnRequestMain/index.ts
  5. 11
      src/api/wms/rawMaterialConsumptionInfo/index.ts
  6. 10
      src/api/wms/supplierinvoiceRecordMain/index.ts
  7. 23
      src/api/wms/unplannedissueRecordDetail/index.ts
  8. 38
      src/api/wms/unplannedissueRecordMain/index.ts
  9. 25
      src/api/wms/unplannedissueRequestDetail/index.ts
  10. 26
      src/api/wms/unplannedissueRequestMain/index.ts
  11. 44
      src/api/wms/unplannedreceiptRecordDetail/index.ts
  12. 41
      src/api/wms/unplannedreceiptRequestDetail/index.ts
  13. 4
      src/api/wms/unplannedreceiptRequestMain/index.ts
  14. 6
      src/components/Search/src/Search.vue
  15. 1
      src/utils/dict.ts
  16. 8
      src/views/login/components/LoginForm.vue
  17. 94
      src/views/qms/inspectionQ2/inspectionQ2.data.ts
  18. 89
      src/views/qms/inspectionQ3/inspectionQ3.data.ts
  19. 29
      src/views/qms/inspectionRequest/index.vue
  20. 9
      src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts
  21. 16
      src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts
  22. 12
      src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue
  23. 2
      src/views/wms/basicDataManage/systemSetting/supplierUser/index.vue
  24. 2
      src/views/wms/deliversettlementManage/stockup/stockupMainJob/index.vue
  25. 182
      src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRecordMain/index.vue
  26. 879
      src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRecordMain/sparepartReturnRecordMain.data.ts
  27. 696
      src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/index.vue
  28. 1677
      src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/sparepartReturnRequestMain.data.ts
  29. 2
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue
  30. 1
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/index.vue
  31. 1
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue
  32. 1
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/index.vue
  33. 1
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
  34. 62
      src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue
  35. 82
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue
  36. 102
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue
  37. 104
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainMOVE/index.vue
  38. 102
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue
  39. 8
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts
  40. 9
      src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue
  41. 20
      src/views/wms/productionManage/productreceiptAssemble/mesRawMaterialConsumptionInfo/index.vue
  42. 2
      src/views/wms/productionManage/productreceiptAssemble/mesRawMaterialConsumptionInfo/mesRawMaterialConsumptionInfo.data.ts
  43. 26
      src/views/wms/productionManage/productreceiptAssemble/rawMaterialConsumptionInfo/index.vue
  44. 3
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue
  45. 3
      src/views/wms/productionManage/productredress/productredressJobMain/index.vue
  46. 26
      src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts
  47. 3
      src/views/wms/productionManage/productredress/productredressRecordMain/index.vue
  48. 3
      src/views/wms/productionManage/productredress/productredressRequestMain/index.vue
  49. 31
      src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts
  50. 3
      src/views/wms/productionManage/productrepair/productrepairRecordMain/index.vue
  51. 18
      src/views/wms/productionManage/productrepair/productrepairRecordMain/productrepairRecordMain.data.ts
  52. 3
      src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue
  53. 3
      src/views/wms/productionManage/productscrap/productscrapJobMain/index.vue
  54. 3
      src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue
  55. 3
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue
  56. 3
      src/views/wms/purchasereceiptManage/inspect/inspectJobMain/index.vue
  57. 3
      src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue
  58. 3
      src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue
  59. 5
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue
  60. 10
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data.ts
  61. 5
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/index.vue
  62. 3
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
  63. 3
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/index.vue
  64. 28
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/purchasereturnJobMain.data.ts
  65. 5
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue
  66. 45
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts
  67. 3
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  68. 34
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue
  69. 28
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMain.data.ts
  70. 1
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMainNew.data.ts
  71. 5
      src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/index.vue
  72. 3
      src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue
  73. 3
      src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue
  74. 3
      src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/index.vue
  75. 3
      src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue
  76. 3
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue
  77. 3
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/index.vue
  78. 3
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue
  79. 3
      src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/index.vue
  80. 3
      src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue
  81. 10
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue
  82. 7
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts
  83. 52
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  84. 7
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts
  85. 10
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/index.vue
  86. 7
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts
  87. 20
      src/views/wms/supplierManage/supplierinvoiceInvoiced/supplierinvoiceInvoiced.data.ts

15
src/api/wms/mesRawMaterialConsumptionInfo/index.ts

@ -44,3 +44,18 @@ export const getMesRawMaterialConsumptionInfoPage = async (params) => {
}
export const exportAssemblyMaterialUsageMes = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/productreceipt-detailb/getAssemblyMaterialUsageMesSeniorExport`, data })
}else{
return await request.download({ url: `/wms/productreceipt-detailb/assemblyMaterialUsageMesExport`, params })
}
}

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

@ -54,7 +54,7 @@ export const getProductputawayRecordDetailPage = async (params) => {
// 查询制品上架记录子列表
export const getProductputawayRecordDetailPageAssemble = async (params) => {
  params.type = 'assemble'
params.type = 'assemble'
if (params.isSearch) {
const cmd = {
'column':'type',

8
src/api/wms/productputawayRecordMain/index.ts

@ -74,8 +74,14 @@ export const deleteProductputawayRecordMain = async (id: number) => {
// 导出制品上架记录主 Excel
export const exportProductputawayRecordMain = async (params) => {
params.type = 'predict'
params.type = 'assemble'
if (params.isSearch) {
const cmd = {
'column':'type',
'action':'==',
'value':'assemble'
}
params.filters.push(cmd)
delete params.isSearch
const data = {...params}
return await request.downloadPost({ url: '/wms/productputaway-record-main/export-excel-senior', data })

10
src/api/wms/purchasereturnRequestMain/index.ts

@ -101,6 +101,11 @@ export const importTemplateSpare = () => {
return request.download({ url: '/wms/purchasereturn-request-main/get-import-template-spare' })
}
// 下载用户导入模板(新)
export const importTemplateNew = () => {
return request.download({ url: '/wms/purchasereturn-request-main/get-import-template-new' })
}
// 关闭采购退货申请主 Excel
export const closePurchasereturnRequestMain = async (id) => {
return await request.put({ url: `/wms/purchasereturn-request-main/close?id=` + id })
@ -131,6 +136,11 @@ export const handlePurchasereturnRequestMain = async (id) => {
return await request.put({ url: `/wms/purchasereturn-request-main/handle?id=` + id })
}
// 处理采购退货申请主(新)
export const handlePurchasereturnRequestMainNew = async (id) => {
return await request.put({ url: `/wms/purchasereturn-request-main/handleNew?id=` + id })
}
// 生成标签
export const genLabel = async (data) => {
return await request.post({ url: `/wms/purchasereturn-request-main/genLabel`, data })

11
src/api/wms/rawMaterialConsumptionInfo/index.ts

@ -44,3 +44,14 @@ export const getRawMaterialConsumptionInfoPage = async (params) => {
}
export const exportAssemblyMaterialUsage = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/backflush-record-detailb/getAssemblyMaterialUsageSeniorExport`, data })
}else{
return await request.download({ url: `/wms/backflush-record-detailb/assemblyMaterialUsageExport`, params })
}
}

10
src/api/wms/supplierinvoiceRecordMain/index.ts

@ -53,8 +53,14 @@ export const deleteSupplierinvoiceRecordMain = async (id: number) => {
}
// 导出供应商发票记录主 Excel
export const exportSupplierinvoiceRecordMain = async (data) => {
return await request.downloadPost({ url: `/wms/supplierinvoice-record-main/export-excel`, data })
export const exportSupplierinvoiceRecordMain = async (params) => {
console.log(params)
if (params.isSearch) {
const data = { ...params }
return await request.downloadPost({ url: `/wms/supplierinvoice-record-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/supplierinvoice-record-main/export-excel`, params })
}
}
// 下载用户导入模板

23
src/api/wms/unplannedissueRecordDetail/index.ts

@ -38,10 +38,15 @@ export const getUnplannedissueRecordDetailPage = async (params) => {
'action':'==',
'value':'1'
}
if(!data.filters){
data.filters = []
const cmdExists = data.filters.some(filter =>
filter.column === dataTypeCondition.column &&
filter.action === dataTypeCondition.action &&
filter.value === dataTypeCondition.value
);
if (!cmdExists) {
data.filters.push(dataTypeCondition)
}
data.filters.push(dataTypeCondition)
return await request.post({ url: '/wms/unplannedissue-record-detail/senior', data })
} else {
params.detailDataType='1'
@ -59,7 +64,15 @@ export const getUnplannedissueRecordDetailPageSpare = async (params) => {
'action':'==',
'value':'2'
}
data.filters.push(dataTypeCondition)
const cmdExists = data.filters.some(filter =>
filter.column === dataTypeCondition.column &&
filter.action === dataTypeCondition.action &&
filter.value === dataTypeCondition.value
);
if (!cmdExists) {
data.filters.push(dataTypeCondition)
}
return await request.post({ url: '/wms/unplannedissue-record-detail/senior', data })
} else {
params.detailDataType='2'
@ -95,4 +108,4 @@ export const exportUnplannedissueRecordDetail = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/unplannedissue-record-detail/get-import-template' })
}
}

38
src/api/wms/unplannedissueRecordMain/index.ts

@ -24,42 +24,6 @@ export interface UnplannedissueRecordMainVO {
available: string
}
// 查询计划外出库记录主列表
export const getUnplannedissueRecordMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
const dataTypeCondition = {
'column':'dataType',
'action':'==',
'value':'1'
}
data.filters.push(dataTypeCondition)
return await request.post({ url: '/wms/unplannedissue-record-main/senior', data })
} else {
params.dataType='1'
return await request.get({ url: `/wms/unplannedissue-record-main/page`, params })
}
}
// 查询计划外出库记录主列表
export const getUnplannedissueRecordMainPageSpare = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
const dataTypeCondition = {
'column':'dataType',
'action':'==',
'value':'2'
}
data.filters.push(dataTypeCondition)
return await request.post({ url: '/wms/unplannedissue-record-main/senior', data })
} else {
params.dataType='2'
return await request.get({ url: `/wms/unplannedissue-record-main/page`, params })
}
}
// 查询计划外出库记录主详情
export const getUnplannedissueRecordMain = async (id: number) => {
return await request.get({ url: `/wms/unplannedissue-record-main/get?id=` + id })
@ -94,4 +58,4 @@ export const exportUnplannedissueRecordMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/unplannedissue-record-main/get-import-template' })
}
}

25
src/api/wms/unplannedissueRequestDetail/index.ts

@ -33,10 +33,15 @@ export const getUnplannedissueRequestDetailPage = async (params) => {
'action':'==',
'value':'1'
}
if(!data.filters){
data.filters = [];
const cmdExists = data.filters.some(filter =>
filter.column === dataTypeCondition.column &&
filter.action === dataTypeCondition.action &&
filter.value === dataTypeCondition.value
);
if (!cmdExists) {
data.filters.push(dataTypeCondition)
}
data.filters.push(dataTypeCondition)
return await request.post({ url: '/wms/unplannedissue-request-detail/senior', data })
} else {
params.detailDataType='1'
@ -44,7 +49,7 @@ export const getUnplannedissueRequestDetailPage = async (params) => {
}
}
// 查询计划外出库申请子列表
// 查询备件领用列表
export const getUnplannedissueRequestDetailPageSpare = async (params) => {
if (params.isSearch) {
delete params.isSearch
@ -54,7 +59,15 @@ export const getUnplannedissueRequestDetailPageSpare = async (params) => {
'action':'==',
'value':'2'
}
data.filters.push(dataTypeCondition)
const cmdExists = data.filters.some(filter =>
filter.column === dataTypeCondition.column &&
filter.action === dataTypeCondition.action &&
filter.value === dataTypeCondition.value
);
if (!cmdExists) {
data.filters.push(dataTypeCondition)
}
return await request.post({ url: '/wms/unplannedissue-request-detail/senior', data })
} else {
params.detailDataType='2'
@ -90,4 +103,4 @@ export const exportUnplannedissueRequestDetail = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/unplannedissue-request-detail/get-import-template' })
}
}

26
src/api/wms/unplannedissueRequestMain/index.ts

@ -32,7 +32,15 @@ export const getUnplannedissueRequestMainPage = async (params) => {
'action':'==',
'value':'1'
}
data.filters.push(dataTypeCondition)
const cmdExists = data.filters.some(filter =>
filter.column === dataTypeCondition.column &&
filter.action === dataTypeCondition.action &&
filter.value === dataTypeCondition.value
);
if (!cmdExists) {
data.filters.push(dataTypeCondition)
}
return await request.post({ url: '/wms/unplannedissue-request-main/senior', data })
} else {
params.dataType='1'
@ -70,13 +78,13 @@ export const exportUnplannedissueRequestMain = async (params) => {
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/unplannedissue-request-main/get-import-template' })
}
// 关闭-计划外出库申请
export const closeUnplannedissueRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedissue-request-main/close?id=` + id })
@ -114,14 +122,22 @@ export const getUnplannedissueRequestMainPageSpare = async (params) => {
delete params.isSearch
const data = {...params}
const dataTypeCondition = {
'column':'dataType',
'column':'detailDataType',
'action':'==',
'value':'2'
}
data.filters.push(dataTypeCondition)
const cmdExists = data.filters.some(filter =>
filter.column === dataTypeCondition.column &&
filter.action === dataTypeCondition.action &&
filter.value === dataTypeCondition.value
);
if (!cmdExists) {
data.filters.push(dataTypeCondition)
}
return await request.post({ url: '/wms/unplannedissue-request-main/senior', data })
} else {
params.dataType='2'
params.detailDataType='2'
return await request.get({ url: `/wms/unplannedissue-request-main/page`, params })
}
}

44
src/api/wms/unplannedreceiptRecordDetail/index.ts

@ -37,8 +37,50 @@ export const getUnplannedreceiptRecordDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
const dataTypeCondition = {
'column':'detailDataType',
'action':'==',
'value':'1'
}
const cmdExists = data.filters.some(filter =>
filter.column === dataTypeCondition.column &&
filter.action === dataTypeCondition.action &&
filter.value === dataTypeCondition.value
);
if (!cmdExists) {
data.filters.push(dataTypeCondition)
}
return await request.post({ url: '/wms/unplannedreceipt-record-detail/senior', data })
} else {
params.detailDataType='1'
return await request.get({ url: `/wms/unplannedreceipt-record-detail/page`, params })
}
}
// 查询备件退库记录子列表
export const getUnplannedreceiptRecordDetailPageSpare = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
const dataTypeCondition = {
'column':'detailDataType',
'action':'==',
'value':'2'
}
const cmdExists = data.filters.some(filter =>
filter.column === dataTypeCondition.column &&
filter.action === dataTypeCondition.action &&
filter.value === dataTypeCondition.value
);
if (!cmdExists) {
data.filters.push(dataTypeCondition)
}
return await request.post({ url: '/wms/unplannedreceipt-record-detail/senior', data })
} else {
params.detailDataType='2'
return await request.get({ url: `/wms/unplannedreceipt-record-detail/page`, params })
}
}
@ -71,4 +113,4 @@ export const exportUnplannedreceiptRecordDetail = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/unplannedreceipt-record-detail/get-import-template' })
}
}

41
src/api/wms/unplannedreceiptRequestDetail/index.ts

@ -32,8 +32,49 @@ export const getUnplannedreceiptRequestDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
const dataTypeCondition = {
'column':'detailDataType',
'action':'==',
'value':'1'
}
const cmdExists = data.filters.some(filter =>
filter.column === dataTypeCondition.column &&
filter.action === dataTypeCondition.action &&
filter.value === dataTypeCondition.value
);
if (!cmdExists) {
data.filters.push(dataTypeCondition)
}
return await request.post({ url: '/wms/unplannedreceipt-request-detail/senior', data })
} else {
params.detailDataType='1'
return await request.get({ url: `/wms/unplannedreceipt-request-detail/page`, params })
}
}
// 查询维修备件退库列表
export const getUnplannedreceiptRequestDetailPageSpare = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
const dataTypeCondition = {
'column':'detailDataType',
'action':'==',
'value':'2'
}
const cmdExists = data.filters.some(filter =>
filter.column === dataTypeCondition.column &&
filter.action === dataTypeCondition.action &&
filter.value === dataTypeCondition.value
);
if (!cmdExists) {
data.filters.push(dataTypeCondition)
}
return await request.post({ url: '/wms/unplannedreceipt-request-detail/senior', data })
} else {
params.detailDataType='2'
return await request.get({ url: `/wms/unplannedreceipt-request-detail/page`, params })
}
}

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

@ -96,3 +96,7 @@ export const agreeUnplannedreceiptRequestMain = async (id) => {
export const handleUnplannedreceiptRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedreceipt-request-main/handle?id=` + id })
}
export const handleSparepartReturnRequestMain = async (id) => {
return await request.put({ url: `/wms/unplannedreceipt-request-main/handleBack?id=` + id })
}

6
src/components/Search/src/Search.vue

@ -342,12 +342,12 @@ defineExpose({setFormValues,search}) // 提供 open 方法,用于打开弹窗
<style lang="scss" scoped>
.search ::v-deep(.el-form-item) {
margin-right: 1%;
width: 20%;
width: 24%;
}
.dateSearch ::v-deep(.el-form-item) {
margin-right: 1%;
min-width: 20%;
width: auto;
min-width: 320px;
width:30%;
}
.search ::v-deep(.el-form-item:nth-last-child(1)) {
margin-right: 0px;

1
src/utils/dict.ts

@ -346,6 +346,7 @@ export enum DICT_TYPE {
SUPPLIERINVOICE_REQUEST_STATUS = 'supplierinvoice_request_status', //发票申请状态
SUPPLIERINVOICE_STATUS = 'supplierinvoice_status', //待开票审核状态
INVOICE_REQUEST_STATUS = 'invoice_request_status', //待开票申请状态
// ========== system - 消息通知优化 - ==========
MESSAGE_NOTICE_TABLE = 'message_notice_table', //消息通知表

8
src/views/login/components/LoginForm.vue

@ -33,7 +33,7 @@
:prefix-icon="iconLock" show-password type="password" @keyup.enter="getCode()" style="height: 42px;" />
</el-form-item>
</el-col>
<el-col :span="24" style="padding-right: 10px; padding-left: 10px" v-if="needCode!='false'">
<el-col :span="24" style="padding-right: 10px; padding-left: 10px" v-if="needCode">
<el-form-item prop="code">
<div class="flex w-[100%]">
<el-input v-model="loginData.loginForm.code" :placeholder="t('login.codePlaceholder')"
@ -97,7 +97,7 @@
import * as DeptApi from '@/api/system/dept'
import { getTenant } from '@/utils/systemParam'
import { getSystermUpdateAlert,getSystermUpdateUrl,getNeedCode } from '@/utils/systemParam'
const needCode = ref(getNeedCode())
const needCode = ref(getNeedCode()==true||getNeedCode()=='true')
defineOptions({ name: 'LoginForm' })
@ -174,7 +174,7 @@
// }
// }
function getCode() {
if(needCode.value=='false'){
if(!needCode.value){
return
}
getCodeImg().then(res => {
@ -234,7 +234,7 @@
return
}
let res = null
if(needCode.value=='false'){
if(!needCode.value){
res = await LoginApi.loginNoCode(loginData.loginForm)
}else{
res = await LoginApi.login(loginData.loginForm)

94
src/views/qms/inspectionQ2/inspectionQ2.data.ts

@ -49,50 +49,7 @@ export const Q2 = useCrudSchemas(
fixed: 'left'
}
},
{
label: 'Q1通知单号',
field: 'q1Number',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q1通知单', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q1通知单', // 查询弹窗标题
searchAllSchemas: Q1.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ1Api.getQ1Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
},
isSearch: true
},
{
label: '状态',
field: 'status',
@ -380,6 +337,7 @@ export const Q2 = useCrudSchemas(
}
}
},
{
label: '索赔日期',
field: 'claimTime',
@ -422,6 +380,50 @@ export const Q2 = useCrudSchemas(
}
}
},
{
label: 'Q1通知单号',
field: 'q1Number',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q1通知单', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q1通知单', // 查询弹窗标题
searchAllSchemas: Q1.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ1Api.getQ1Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
},
isSearch: true
},
{
label: '描述',
field: 'desc',
@ -473,8 +475,8 @@ export const Q2 = useCrudSchemas(
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
},
},
}
}
},
{
label: '操作',

89
src/views/qms/inspectionQ3/inspectionQ3.data.ts

@ -48,50 +48,7 @@ export const InspectionQ3Main = useCrudSchemas(
fixed: 'left'
}
},
{
label: 'Q1通知单号',
field: 'q1Number',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q1通知单', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q1通知单', // 查询弹窗标题
searchAllSchemas: Q1.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ1Api.getQ1Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '负责用户',
field: 'responUser',
@ -157,6 +114,50 @@ export const InspectionQ3Main = useCrudSchemas(
}
}
},
{
label: 'Q1通知单号',
field: 'q1Number',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q1通知单', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q1通知单', // 查询弹窗标题
searchAllSchemas: Q1.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ1Api.getQ1Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '描述',
field: 'desc',

29
src/views/qms/inspectionRequest/index.vue

@ -88,6 +88,17 @@
@ListTableSubmit="ListTableSubmit"
/>
</div>
<el-dialog
v-model="showQualityReport"
:title="t('质检明细')"
:append-to-body="false"
destroy-on-close
fullscreen
>
<iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog>
</template>
<script setup lang="ts">
@ -105,6 +116,7 @@ import ListTable from '@/components/ListTable/src/ListTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import { formatDate } from '@/utils/formatTime'
import { getReportUrl } from '@/utils/systemParam'
// import { InspectionJobPackage} from '../inspectionJob/inspectionJobMain.data'
defineOptions({ name: 'inspectionMain' })
@ -226,7 +238,8 @@ const butttondata = (row) => {
defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'qms:inspection-request-main:edit'
}) //
}),//
defaultButtons.mainListPlanCheckQualityReportBtn({}) //
]
}
const listTableRef = ref()
@ -263,7 +276,10 @@ const buttonTableClick = async (val, row) => {
'包装信息',
InspectionRequestPackage.allSchemas.tableColumns
)
}
}else if (val == 'mainPlanCheckQualityReport') {
//
checkQualityReport(row)
}
}
/** 关闭按钮操作 */
@ -350,6 +366,15 @@ const handleSubmit = async (id: number) => {
}
}
//
const reportHeight = ref(window.innerHeight - 120)
const showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row) => {
showQualityReport.value = true
qualityReport.value = getReportUrl() + '/purchasereceiptReport?asnNumber=' + row.asnNumber
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type: string, row?: number) => {

9
src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts

@ -446,8 +446,14 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
label: '超过高储是否允许叫料',
field: 'allowIssueRequest',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
// colorType: 'danger',
isTable: true,
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
@ -456,7 +462,6 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
activeValue: 'TRUE'
}
},
isTable: false
},
// {
// label: '优先空库位',
@ -771,7 +776,7 @@ export const ItemareaDetail = useCrudSchemas(reactive<CrudSchema[]>([
isFormModel: true,
}],
verificationPage: LocationApi.getLocationByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true, //
isShowTableFormSearch: true, //
},
form: {
// labelMessage: '信息提示说明!!!',

16
src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts

@ -133,7 +133,7 @@ export const Itempackaging = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'InputNumber',
componentProps: {
min: 1,
min: 0,
precision: 6
}
}
@ -295,12 +295,22 @@ export const Itempackaging = useCrudSchemas(reactive<CrudSchema[]>([
}
}
]))
const validateQty = (rule: any, value: any, callback: any,a,b) => {
console.log('validateQty',rule, value,a,b)
if (!value) {
callback(new Error('包装数量必须大于0'));
} else {
callback();
}
}
// 表单校验
export const ItempackagingRules = reactive({
itemCode: [{ required: true, message: '物料代码不能为空', trigger: 'change' }],
uom: [{ required: true, message: '计量单位不能为空', trigger: 'change' }],
packUnit: [{ required: true, message: '包装单位不能为空', trigger: 'change' }],
packQty: [{ required: true, message: '包装数量不能为空', trigger: 'change' }],
packQty: [
{ required: true, message: '包装数量不能为空', trigger: 'change' },
{ validator: validateQty, trigger: 'change' }
],
available: [{ required: true, message: '是否可用不能为空', trigger: 'change' }]
})

12
src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue

@ -77,14 +77,14 @@ const route = useRoute() //路由信息
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(Supplieritem.allSchemas.tableColumns)
if(routeName.value.includes('SCP')){
tableColumns.value = tableColumns.value.filter(item=>item.field!='action')
}
// if(routeName.value.includes('SCP')){
// tableColumns.value = tableColumns.value.filter(item=>item.field!='action')
// }
//
const updataTableColumns = (val) => {
if(routeName.value.includes('SCP')){
val = val.filter(item=>item.field!='action')
}
// if(routeName.value.includes('SCP')){
// val = val.filter(item=>item.field!='action')
// }
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({

2
src/views/wms/basicDataManage/systemSetting/supplierUser/index.vue

@ -221,12 +221,14 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
tableObject.loading = true
const excelTitle = ref(route.meta.title)
const data = await SupplierUserApi.exportSupplierUser(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
tableObject.loading = false
}
}

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

@ -142,7 +142,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn({hasPermi:'wms:stockup-job-main:export'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:stockup-main-job:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //

182
src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRecordMain/index.vue

@ -0,0 +1,182 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="[...UnplannedreceiptRecordMain.allSchemas.searchSchema,...UnplannedreceiptRecordDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="UnplannedreceiptRecordMain.allSchemas"
:detailAllSchemas="UnplannedreceiptRecordDetail.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
@success="getList"
:rules="UnplannedreceiptRecordMainRules"
:formAllSchemas="UnplannedreceiptRecordMain.allSchemas"
:tableAllSchemas="UnplannedreceiptRecordDetail.allSchemas"
:tableFormRules="UnplannedreceiptRecordDetailRules"
:isBusiness="true"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="UnplannedreceiptRecordMain.allSchemas"
:detailAllSchemas="UnplannedreceiptRecordDetail.allSchemas"
:detailAllSchemasRules="UnplannedreceiptRecordDetailRules"
:apiPage="UnplannedreceiptRecordDetailApi.getUnplannedreceiptRecordDetailPageSpare"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { UnplannedreceiptRecordMain,UnplannedreceiptRecordMainRules,UnplannedreceiptRecordDetail,UnplannedreceiptRecordDetailRules } from './sparepartReturnRecordMain.data'
import * as UnplannedreceiptRecordMainApi from '@/api/wms/unplannedreceiptRecordMain'
import * as UnplannedreceiptRecordDetailApi from '@/api/wms/unplannedreceiptRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'UnplannedreceiptRecordMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref([...UnplannedreceiptRecordMain.allSchemas.tableColumns,...UnplannedreceiptRecordDetail.allSchemas.tableMainColumns])
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: UnplannedreceiptRecordDetailApi.getUnplannedreceiptRecordDetailPageSpare //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn({hasPermi:'wms:unplannedreceipt-record-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
filters: tableObject.params.filters
})
} else {
getList()
}
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return []
}
// -
const buttonTableClick = async (val, row) => {
}
//
const { wsCache } = useCache()
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue,'recordUnplannedreceiptMain')
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
tableObject.params.detailDataType = 2
const data = await UnplannedreceiptRecordMainApi.exportUnplannedreceiptRecordMain(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
})
</script>

879
src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRecordMain/sparepartReturnRecordMain.data.ts

@ -0,0 +1,879 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data'
import * as QadCostcentreApi from '@/api/wms/qadCostcentre/index'
import { QadProject } from '@/views/wms/basicDataManage/subject/qadProject/qadProject.data'
import * as QadProjectApi from '@/api/wms/qadProject'
import * as SubjectAccountApi from '@/api/wms/subjectAccount'
import { SubjectAccount } from '@/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data'
/**
* @returns {Array}
*/
export const UnplannedreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180,
fixed: 'left'
},
isSearch: true
},
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
table: {
width: 180
},
isSearch: true
},
{
label: '任务单号',
field: 'jobNumber',
sort: 'custom',
table: {
width: 180
},
isSearch: true
},
{
label: '申请时间',
field: 'requestTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '截止时间',
field: 'dueTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '执行时间',
field: 'executeTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '生效日期',
field: 'activeDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
},
{
label: '成本中心代码',
field: 'costCenterCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码',
searchField: 'costcentreCode',
searchTitle: '成本中心代码',
searchAllSchemas: QadCostcentre.allSchemas,
searchPage: QadCostcentreApi.getQadCostcentrePage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
searchField: 'costcentreCode', // 查询弹窗赋值字段
searchTitle: '成本中心代码', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '成本中心类型',
field: 'costCenterType',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
},
{
label: '领用原因代码',
field: 'reasonCodeRequisition',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择成领用原因代码',
searchField: 'code',
searchTitle: '领用原因代码',
searchAllSchemas: SubjectAccount.allSchemas,
searchPage: SubjectAccountApi.getSubjectAccountPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '领用原因代码', // 查询弹窗标题
searchAllSchemas: SubjectAccount.allSchemas, // 查询弹窗所需类
searchPage: SubjectAccountApi.getSubjectAccountPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}]
}
}
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择QAD项目信息',
searchField: 'projectCode',
searchTitle: '领用原因代码',
searchAllSchemas: QadProject.allSchemas,
searchPage: QadProjectApi.getQadProjectPage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择QAD项目信息', // 输入框占位文本
searchField: 'projectCode', // 查询弹窗赋值字段
searchTitle: '领用原因代码', // 查询弹窗标题
searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类
searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '工作中心',
field: 'workCenter',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到库区类型范围',
field: 'toAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '到库区代码范围',
// field: 'toAreaCodes',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '领用代码',
field: 'usageCode',
sort: 'custom',
table: {
width: 150
},
isForm: false,
isTable:false,
},
{
label: '领用描述',
field: 'usageDescription',
sort: 'custom',
isTable:false,
isForm:false,
isTableForm:false,
table: {
width: 150
},
},
{
label: '出库事务类型',
field: 'outTransactionType',
sort: 'custom',
table: {
width: 150
},
},
{
label: '入库事务类型',
field: 'inTransactionType',
sort: 'custom',
table: {
width: 150
},
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '备注',
field: 'remarkMain',
isTable:false,
sort: 'custom',
table: {
width: 150
}
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
isTable:false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
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')]
}
},
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
isTable:false,
table: {
width: 150
},
},
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
// {
// label: '代码',
// field: 'code',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: false,
isTable: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
]))
//表单校验
export const UnplannedreceiptRecordMainRules = reactive({
requestNumber: [
{ required: true, message: '请选择申请单号', trigger: 'change' }
],
toWarehouseCode: [
{ required: true, message: '请选择到仓库代码', trigger: 'change' }
],
toAreaTypes: [
{ required: true, message: '请选择到库区类型范围', trigger: 'change' }
],
toAreaCodes: [
{ required: true, message: '请选择到库区代码范围', trigger: 'change' }
],
outTransaction: [
{ required: true, message: '请输入出库事务类型', trigger: 'blur' }
],
inTransaction: [
{ required: true, message: '请输入入库事务类型', trigger: 'blur' }
],
executeTime: [
{ required: true, message: '请输入执行时间', trigger: 'change' }
],
activeDate: [
{ required: true, message: '请输入生效日期', trigger: 'change' }
],
available: [
{ required: true, message: '请输入是否可用', trigger: 'blur' }
],
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
interfaceType: [
{ required: true, message: '请选择接口类型', trigger: 'change' }
],
number: [
{ required: true, message: '请输入单据号', trigger: 'blur' }
],
businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' }
],
createTime: [
{ required: true, message: '请输入创建时间', trigger: 'blur' }
],
creator: [
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
})
/**
* @returns {Array}
*/
export const UnplannedreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
hiddenInMain:true,
table: {
width: 180
},
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
},
{
label: '物料描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
},
{
label: '物料描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '器具号',
// field: 'containerNumber',
// isTable:false,
// isForm:false,
// isTableForm:false,
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '单价',
field: 'singlePrice',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '金额',
field: 'amount',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '到货日期',
field: 'arriveDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
},
{
label: '生产日期',
field: 'produceDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
},
{
label: '过期日期',
field: 'expireDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
},
{
label: '到库位组代码',
field: 'toLocationGroupCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到库区代码',
field: 'toAreaCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '成本中心代码',
field: 'costcentreCode',
sort: 'custom',
table: {
width: 150
},
isTable:false,
},
{
label: '科目代码',
field: 'qadProjectCode',
sort: 'custom',
table: {
width: 150
},
isTable:false,
},
{
label: '原因',
field: 'reason',
dictType: DICT_TYPE.UNPLANNED_RECEIPT_REASON,
dictClass: 'string',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return cellValue
},
table: {
width: 150
},
form: {
componentProps: {
filterable: true
}
},
tableForm: {
type: 'Select',
filterable: true
}
},
{
label: '货主代码',
field: 'ownerCode',
sort: 'custom',
isTable:false,
table: {
width: 150
},
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
isTable:false,
table: {
width: 150
},
},
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: false,
isForm:false,
isTableForm:false,
sort: 'custom',
table: {
width: 150
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '任务明细ID',
// field: 'jobDetailId',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '代码',
// field: 'code',
// sort: 'custom',
// table: {
// width: 150
// },
// },
]))
//表单校验
export const UnplannedreceiptRecordDetailRules = reactive({
packingNumber: [
{ required: true, message: '请选择包装号', trigger: 'change' }
],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }
],
inventoryStatus: [
{ required: true, message: '请选择库存状态', trigger: 'change' }
],
toLocationCode: [
{ required: true, message: '请选择到库位代码', trigger: 'change' }
],
toLocationGroupCode: [
{ required: true, message: '请选择到库位组代码', trigger: 'change' }
],
toAreaCode: [
{ required: true, message: '请选择到库区代码', trigger: 'change' }
],
arriveDate: [
{ required: true, message: '请输入到货日期', trigger: 'change' }
],
produceDate: [
{ required: true, message: '请选择生产日期', trigger: 'change' }
],
expireDate: [
{ required: true, message: '请选择过期日期', trigger: 'change' }
]
})

696
src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/index.vue

@ -0,0 +1,696 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="[...UnplannedreceiptRequestMain.allSchemas.searchSchema,...UnplannedreceiptRequestDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="UnplannedreceiptRequestMain.allSchemas"
:detailAllSchemas="UnplannedreceiptRequestDetail.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList"
:rules="UnplannedreceiptRequestMainRules"
:formAllSchemas="UnplannedreceiptRequestMain.allSchemas"
:tableAllSchemas="UnplannedreceiptRequestDetail.allSchemas"
:tableFormRules="UnplannedreceiptRequestDetailRules"
:tableData="tableData"
:apiUpdate="UnplannedreceiptRequestMainApi.updateUnplannedreceiptRequestMain"
:apiCreate="UnplannedreceiptRequestMainApi.createUnplannedreceiptRequestMain"
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@inputNumberChange="inputNumberChange"
@tableFormSelectOnBlur="tableFormSelectOnBlur">
<template v-slot="{row}">
<el-date-picker v-bind:modelValue="row['validityDays']?addDay(row['produceDate'],row['validityDays']):''" format="YYYY-MM-DD"
:clearable="true"
style="width: 100%"
:disabled="true"
:placeholder="t('ts.选择日期')"/>
</template>
</BasicForm>
<!-- 详情 -->
<!-- :apiCreate="UnplannedreceiptRequestDetailApi.createUnplannedreceiptRequestDetail" -->
<!-- :apiUpdate="UnplannedreceiptRequestDetailApi.updateUnplannedreceiptRequestDetail" -->
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="UnplannedreceiptRequestMain.allSchemas"
:detailAllSchemas="UnplannedreceiptRequestDetail.allSchemas"
:detailAllSchemasRules="UnplannedreceiptRequestDetailRules"
:apiCreate="UnplannedreceiptRequestDetailApi.createUnplannedreceiptRequestDetail"
:apiUpdate="UnplannedreceiptRequestDetailApi.updateUnplannedreceiptRequestDetail"
:apiPage="UnplannedreceiptRequestDetailApi.getUnplannedreceiptRequestDetailPageSpare"
:apiDelete="UnplannedreceiptRequestDetailApi.deleteUnplannedreceiptRequestDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailValidate="detailValidate"
@onBlur="onBlur"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/unplannedreceipt-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
</template>
<script setup lang="ts">
import dayjs from 'dayjs'
import { addDay } from '@/utils/formatTime'
import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import {
UnplannedreceiptRequestMain,
UnplannedreceiptRequestMainRules,
UnplannedreceiptRequestDetail,
UnplannedreceiptRequestDetailRules, UnplannedreceiptRequestDetailLabel
} from './sparepartReturnRequestMain.data'
import * as UnplannedreceiptRequestMainApi from '@/api/wms/unplannedreceiptRequestMain'
import * as UnplannedreceiptRequestDetailApi from '@/api/wms/unplannedreceiptRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItembasicApi from "@/api/wms/itembasic";
import { formatTime } from '@/utils/index'
import { formatDate } from '@/utils/formatTime'
import {handleSparepartReturnRequestMain} from "@/api/wms/unplannedreceiptRequestMain";
//
defineOptions({ name: 'UnplannedreceiptRequestMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref([...UnplannedreceiptRequestMain.allSchemas.tableColumns,...UnplannedreceiptRequestDetail.allSchemas.tableMainColumns])
const { tableObject: detatableData, tableMethods: detatableMethods } =useTable({
getListApi: UnplannedreceiptRequestDetailApi.getUnplannedreceiptRequestDetailPageCreateLabel
})
const { getList:getDetailList } = detatableMethods
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(async () => {
console.log('searchTableSuccess',formField, searchField, val, formRef, type, row )
if (type == 'tableForm') {
//
if(formField == 'toLocationCode'){
row['toLocationCode'] = val[0]['code']
} else if(formField == 'itemCode'){
let itemCodes = val.filter(item=>tableData.value.find(item1=>item1['itemCode']==item['code']))
if(itemCodes.length>0){
itemCodes = itemCodes.map(item=>(item['code']))
message.warning(`物料${itemCodes.join(',')}已经存在`)
}
val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode']))
if(val.length==0){
return
}
const enableBuy = val[0]['enableBuy']
let newVal = val.filter(item=>item.enableBuy==enableBuy)
if(newVal.length<val.length){
message.warning('不能同时选择可制造和可采购的物料')
}
newVal = newVal.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['code']))
newVal.forEach(item=>{
let tfk = JSON.parse(JSON.stringify(tableFormKeys))
tfk.batch = formatTime(new Date(), 'yyyyMMdd')
//
tfk['produceDate'] = dayjs().valueOf()
tfk['arriveDate'] = dayjs().valueOf()
tfk['itemCode'] = item['code']
tfk['uom'] = item['uom']
tfk['validityDays'] = item['validityDays']
tableData.value.push(tfk)
})
} else if(formField === 'costcentreCode'){
row['costcentreCode'] = val[0]['costcentreCode']
} else if(formField === 'qadProjectCode'){
row['qadProjectCode'] = val[0]['projectCode']
}else {
row[formField] = val[0][searchField]
}
} else {
const setV = {}
if(formField === 'usageDescription'){
setV['usageDescription'] = val[0]['usageDescription']
setV['usageCode'] = val[0]['code']
}
if(formField === 'costCenterCode'){
setV['costcentreCode'] = val[0]['costcentreCode']
setV['costCenterType'] = val[0]['costcentreType']
}
if(formField === 'reasonCodeRequisition'){
setV['reasonCodeRequisition'] = val[0]['code']
}
if(formField === 'projectCode'){
setV['projectCode'] = val[0]['projectCode']
}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
})
}
const handleDetailSubmitForm = async (formType, data) => {
let mydata = {...data}
mydata['expireDate'] = data['expireDate'].valueOf()
if (formType === 'create') {
await UnplannedreceiptRequestDetailApi.createUnplannedreceiptRequestDetail(data)
message.success(t('common.createSuccess'))
} else {
await UnplannedreceiptRequestDetailApi.updateUnplannedreceiptRequestDetail(data)
message.success(t('common.updateSuccess'))
}
detailRef.value.submitUpdateList()
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
if(formField == 'toLocationCode'){
setV['toLocationCode'] = val[0]['code']
}
if(formField == 'itemCode'){
setV['itemCode'] = val[0]['code']
setV['uom'] = val[0]['uom']
setV['validityDays'] = val[0]['validityDays']
setV['expireDate'] = val[0]['validityDays']?addDay(val[0]['produceDate'],val[0]['validityDays']).valueOf():''
setV['batch'] = formatTime(new Date(), 'yyyyMMdd') //
setV['produceDate'] = dayjs().valueOf()
setV['arriveDate'] = dayjs().valueOf()
}
if(formField === 'costcentreCode'){
setV['costcentreCode'] = val[0]['costcentreCode']
}
if(formField === 'qadProjectCode'){
setV['qadProjectCode'] = val[0]['projectCode']
}
formRef.setValues(setV)
})
}
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: UnplannedreceiptRequestDetailApi.getUnplannedreceiptRequestDetailPageSpare //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:unplannedreceipt-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:unplannedreceipt-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:unplannedreceipt-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
filters: tableObject.params.filters
})
} else {
getList()
}
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
//
const isShowMainButton = (row,val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:unplannedreceipt-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:unplannedreceipt-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:unplannedreceipt-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:unplannedreceipt-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:unplannedreceipt-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:unplannedreceipt-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:unplannedreceipt-request-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:unplannedreceipt-request-main:delete'}), //
]
}
// -
const buttonTableClick = async (val, row) => {
console.log("val",val)
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
handleClose(row.masterId)
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
handleReAdd(row.masterId)
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
handleSubmit(row.masterId)
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
handleRefused(row.masterId)
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
handleAgree(row.masterId)
} else if (val == 'mainHandle') { //
console.log('列表-操作按钮事件-处理')
handleHandle(row.masterId)
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.masterId)
}
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
await message.confirm(t('common.confirmColse'))
tableObject.loading = true
try{
await UnplannedreceiptRequestMainApi.closeUnplannedreceiptRequestMain(id)
message.success(t('common.closeSuccess'))
tableObject.loading = false
buttonBaseClick('refresh',null)
}catch{
tableObject.loading = false
}
}
/** 重新添加按钮操作 */
const handleReAdd = async (id: number) => {
await message.confirm(t('common.confirmReAdd'))
tableObject.loading = true
try{
await UnplannedreceiptRequestMainApi.reAddUnplannedreceiptRequestMain(id)
message.success(t('common.reAddSuccess'))
tableObject.loading = false
buttonBaseClick('refresh',null)
}catch{
tableObject.loading = false
}
}
/** 提交按钮操作 */
const handleSubmit = async (id: number) => {
await message.confirm(t('common.confirmSubmit'))
tableObject.loading = true
try{
await UnplannedreceiptRequestMainApi.submitUnplannedreceiptRequestMain(id)
message.success(t('common.submitSuccess'))
tableObject.loading = false
buttonBaseClick('refresh',null)
}catch{
tableObject.loading = false
}
}
/** 审批驳回按钮操作 */
const handleRefused = async (id: number) => {
await message.confirm(t('common.confirmRefused'))
tableObject.loading = true
try{
await UnplannedreceiptRequestMainApi.refusedUnplannedreceiptRequestMain(id)
message.success(t('common.refusedSuccess'))
tableObject.loading = false
buttonBaseClick('refresh',null)
}catch{
tableObject.loading = false
}
}
/** 审批通过按钮操作 */
const handleAgree = async (id: number) => {
await message.confirm(t('common.confirmAgree'))
tableObject.loading = true
try{
await UnplannedreceiptRequestMainApi.agreeUnplannedreceiptRequestMain(id)
message.success(t('common.agreeSuccess'))
tableObject.loading = false
buttonBaseClick('refresh',null)
}catch{
tableObject.loading = false
}
}
/** 处理按钮操作 */
const handleHandle = async (id: number) => {
await message.confirm(t('common.confirmHandle'))
tableObject.loading = true
try {
await UnplannedreceiptRequestMainApi.handleSparepartReturnRequestMain(id)
message.success(t('common.handleSuccess'))
buttonBaseClick('refresh',null)
} finally {
tableObject.loading = false
}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm =async (type: string, row?: number) => {
UnplannedreceiptRequestMain.allSchemas.formSchema.forEach((item) => {
if(type == "update"){
if (item.field == 'costCenterCode') {
//
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
if (item.field == 'reasonCodeRequisition') {
//
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
if (item.field == 'toWarehouseCode') {
//
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
}else{
if (item.field == 'costCenterCode') {
//
item.componentProps.isSearchList = true
item.componentProps.disabled = false
}
if (item.field == 'reasonCodeRequisition') {
//
item.componentProps.isSearchList = true
item.componentProps.disabled = false
}
if (item.field == 'toWarehouseCode') {
//
item.componentProps.isSearchList = true
item.componentProps.disabled = false
}
}
})
tableData.value = [] //
formRef.value.open(type, row)
}
//
const { wsCache } = useCache()
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue,'requestUnplannedreceiptMain')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
tableObject.loading = true
//
await UnplannedreceiptRequestMainApi.deleteUnplannedreceiptRequestMain(id)
message.success(t('common.delSuccess'))
tableObject.loading = false
//
buttonBaseClick('refresh',null)
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
tableObject.params.detailDataType = 2
const data = await UnplannedreceiptRequestMainApi.exportUnplannedreceiptRequestMain(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
}
}
/**
* tableForm方法
*/
const tableFormKeys = {}
UnplannedreceiptRequestDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const handleAddTable = () => {
let tfk = JSON.parse(JSON.stringify(tableFormKeys))
tfk.batch = formatTime(new Date(), 'yyyyMMdd')
//
tfk['produceDate'] = dayjs().valueOf()
tfk['arriveDate'] = dayjs().valueOf()
tableData.value.push(tfk)
}
//
const handleDeleteTable = (item, index) => {
let itemIndex = tableData.value.indexOf(item)
if(itemIndex>-1){
tableData.value.splice(itemIndex, 1)
}
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//
const submitForm = async (formType, submitData) => {
let data = {...submitData}
if(data.masterId){
data.id = data.masterId
}
data.subList = tableData.value //
data.subList.forEach(row=>{
row['expireDate'] = row['validityDays']?addDay(row['produceDate'],row['validityDays']).valueOf():''
})
try {
if (formType === 'create') {
console.log("【计划外入库子列表】",data.subList)
if(data.subList.length == 0){
message.warning("请添加子列表数据")
return;
}
let flag = false;
data.subList.forEach((item) => {
if(item.qty == 0){
message.warning("数量不能为0")
flag = true;
return;
}
})
if(flag){
return
}
data.dataType='2'
formRef.value.formLoading = true
await UnplannedreceiptRequestMainApi.createUnplannedreceiptRequestMain(data)
message.success(t('common.createSuccess'))
} else {
data.dataType='2'
formRef.value.formLoading = true
await UnplannedreceiptRequestMainApi.updateUnplannedreceiptRequestMain(data)
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
//
if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} finally {
formRef.value.formLoading = false
}
}
// /
const detailValidate = (data) => {
let tag = false;
if(data.qty <= 0){
message.warning('数量必须大于0')
tag = false;
return tag;
}else {
tag = true;
return tag;
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
const inputNumberChange = (field, index, row, val) => {
if(field == 'qty' || field == 'singlePrice'){
row.amount = row.qty * row.singlePrice
}
}
let validityDays = 0
const detailOpenForm = (type, row)=>{
console.log('detailOpenForm',row)
if(type=='update'){
//
ItembasicApi.getItembasicPage({
code:row.itemCode
}).then((res)=>{
res.list.forEach((item,index)=>{
const findItem = tableData.value.find(item1=>item1['itemCode']==row['code'])
if(findItem){
validityDays = findItem['expireTime']
}
})
detailRef.value.formRef.formRef.formModel.expireDate = addDay(detailRef.value.formRef.formRef.formModel.produceDate,validityDays).valueOf()
})
}else{
validityDays = 0
}
}
const qtyOnChange = (field,val) =>{
console.log('qtyOnChange',field,val)
console.log(detailRef.value.formRef.formRef.formModel)
if(field=='produceDate'){
if(detailRef.value.formRef.formRef.formModel.validityDays){
detailRef.value.formRef.formRef.formModel.expireDate = addDay(detailRef.value.formRef.formRef.formModel.produceDate,detailRef.value.formRef.formRef.formModel.validityDays).valueOf()
}else{
detailRef.value.formRef.formRef.formModel.expireDate = addDay(detailRef.value.formRef.formRef.formModel.produceDate,validityDays).valueOf()
}
}
if(field == 'qty' || field == 'singlePrice'){
detailRef.value.formRef.formRef.formModel.amount = detailRef.value.formRef.formRef.formModel.qty * detailRef.value.formRef.formRef.formModel.singlePrice
}
}
const onBlur = (field, e) => {
if (field == 'reason') {
detailRef.value.formRef.formRef.formModel[field] = e.target.value
}
}
const tableFormSelectOnBlur = (field, val, row, index) => {
if (field == 'reason') {
tableData.value[index][field] = val.target.value
}
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await UnplannedreceiptRequestMainApi.importTemplate()
})
</script>

1677
src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/sparepartReturnRequestMain.data.ts

File diff suppressed because it is too large

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

@ -401,8 +401,8 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
tableObject.params.detailDataType = 2
const excelTitle = ref(route.meta.title)
tableObject.params.detailDataType = 2
const data = await UnplannedissueRequestMainApi.exportUnplannedissueRequestMain(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {

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

@ -157,6 +157,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
tableObject.params.detailDataType = 1
const data = await UnplannedissueRecordMainApi.exportUnplannedissueRecordMain(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {

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

@ -439,6 +439,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
tableObject.params.detailDataType = 1
const data = await UnplannedissueRequestMainApi.exportUnplannedissueRequestMain(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {

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

@ -157,6 +157,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
tableObject.params.detailDataType = 1
const data = await UnplannedreceiptRecordMainApi.exportUnplannedreceiptRecordMain(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {

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

@ -668,6 +668,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
tableObject.params.detailDataType = 1
const data = await UnplannedreceiptRequestMainApi.exportUnplannedreceiptRequestMain(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {

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

@ -142,67 +142,70 @@ const importFileName = ref()
*/
if ( routeName.value == 'OktoholdJobMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus:'HOLD',
// fromInventoryStatus: 'OK',
// toInventoryStatus:'HOLD',
businessType :'OkToHold'
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "HOLD"
// fromInventoryStatus.value = 'OK'
// toInventoryStatus.value = "HOLD"
businessType.value = 'OkToHold'
importFileName.value = '合格转隔离任务'
} else if ( routeName.value == 'NoktoholdJobMain') {
tableObject.params = {
fromInventoryStatus: 'NOK',
toInventoryStatus:'HOLD',
// fromInventoryStatus: 'NOK',
// toInventoryStatus:'HOLD',
businessType :'NokToHold'
}
fromInventoryStatus.value = 'NOK'
toInventoryStatus.value = "HOLD"
// fromInventoryStatus.value = 'NOK'
// toInventoryStatus.value = "HOLD"
businessType.value = 'NokToHold'
importFileName.value = '不合格转隔离任务'
} else if ( routeName.value == 'HoldtookJobMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'OK',
// fromInventoryStatus: 'HOLD',
// toInventoryStatus:'OK',
businessType :'HoldToOk'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "OK"
// fromInventoryStatus.value = 'HOLD'
// toInventoryStatus.value = "OK"
businessType.value = 'HoldToOk'
importFileName.value = '隔离转合格任务'
} else if ( routeName.value == 'HoldtoscrapJobMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'SCRAP',
// fromInventoryStatus: 'HOLD',
// toInventoryStatus:'SCRAP',
businessType:'HoldToScrap'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "SCRAP"
// fromInventoryStatus.value = 'HOLD'
// toInventoryStatus.value = "SCRAP"
businessType.value = 'HoldToScrap'
importFileName.value = '隔离转报废任务'
} else if ( routeName.value == 'OktoscrapJobMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus:'SCRAP',
// fromInventoryStatus: 'OK',
// toInventoryStatus:'SCRAP',
businessType :'OkToScrap'
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "SCRAP"
// fromInventoryStatus.value = 'OK'
// toInventoryStatus.value = "SCRAP"
businessType.value = 'OkToScrap'
importFileName.value = '合格转报废任务'
} else if ( routeName.value == 'ScraptoholdJobMain') {
tableObject.params = {
fromInventoryStatus: 'SCRAP',
toInventoryStatus:'HOLD',
// fromInventoryStatus: 'SCRAP',
// toInventoryStatus:'HOLD',
businessType :'ScrapToHold'
}
fromInventoryStatus.value = 'SCRAP'
toInventoryStatus.value = "HOLD"
// fromInventoryStatus.value = 'SCRAP'
// toInventoryStatus.value = "HOLD"
businessType.value = 'ScrapToHold'
importFileName.value = '报废转隔离任务'
} else {
console.log(146 , fromInventoryStatus.value)
fromInventoryStatus.value = null
tableObject.params = {
businessType :'Move'
}
// fromInventoryStatus.value = null
businessType.value = 'Move'
importFileName.value = '库存移动任务'
}
@ -332,6 +335,15 @@ const handleExport = async () => {
//
const searchFormClick = (searchData) => {
const cmd = {
'column':'businessType',
'action':'==',
'value':businessType.value
}
if (!Array.isArray(searchData.filters)) {
searchData.filters = [];
}
searchData.filters.push(cmd)
tableObject.params = {
isSearch: true,
filters: searchData.filters

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

@ -103,61 +103,68 @@ const { tableObject, tableMethods } = useTable({
*/
if ( routeName.value == 'OktoholdRecordMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus: 'HOLD',
// fromInventoryStatus: 'OK',
// toInventoryStatus: 'HOLD',
businessType:'OkToHold'
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "HOLD"
importFileName.value = '合格转隔离记录'
} else if ( routeName.value == 'NoktoholdRecordMain') {
// fromInventoryStatus.value = 'OK'
// toInventoryStatus.value = "HOLD"
businessType.value = 'OkToHold'
importFileName.value = '合格转隔离记录'
} else if ( routeName.value == 'NoktoholdRecordMain') {
tableObject.params = {
fromInventoryStatus: 'NOK',
toInventoryStatus:'HOLD',
// fromInventoryStatus: 'NOK',
// toInventoryStatus:'HOLD',
businessType:'NoktoHold'
}
fromInventoryStatus.value = 'NOK'
toInventoryStatus.value = "HOLD"
importFileName.value = '不合格转隔离记录'
// fromInventoryStatus.value = 'NOK'
// toInventoryStatus.value = "HOLD"
businessType.value = 'NoktoHold'
importFileName.value = '不合格转隔离记录'
}else if ( routeName.value == 'HoldtookRecordMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'OK',
// fromInventoryStatus: 'HOLD',
// toInventoryStatus:'OK',
businessType:'HoldtoOk'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "OK"
importFileName.value = '隔离转合格记录'
// fromInventoryStatus.value = 'HOLD'
// toInventoryStatus.value = "OK"
businessType.value = 'HoldtoOk'
importFileName.value = '隔离转合格记录'
} else if ( routeName.value == 'HoldtoscrapRecordMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'SCRAP',
// fromInventoryStatus: 'HOLD',
// toInventoryStatus:'SCRAP',
businessType:'HoldtoScrap'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "SCRAP"
importFileName.value = '隔离转报废记录'
// fromInventoryStatus.value = 'HOLD'
// toInventoryStatus.value = "SCRAP"
businessType.value = 'HoldtoScrap'
importFileName.value = '隔离转报废记录'
} else if ( routeName.value == 'OktoscrapRecordMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus:'SCRAP',
// fromInventoryStatus: 'OK',
// toInventoryStatus:'SCRAP',
businessType:'OktoScrap'
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "SCRAP"
importFileName.value = '合格转报废记录'
// fromInventoryStatus.value = 'OK'
// toInventoryStatus.value = "SCRAP"
businessType.value = 'OktoScrap'
importFileName.value = '合格转报废记录'
} else if ( routeName.value == 'ScraptoholdRecordMain') {
tableObject.params = {
fromInventoryStatus: 'SCRAP',
toInventoryStatus:'HOLD',
// fromInventoryStatus: 'SCRAP',
// toInventoryStatus:'HOLD',
businessType:'ScraptoHold'
}
fromInventoryStatus.value = 'SCRAP'
toInventoryStatus.value = "HOLD"
importFileName.value = '报废转隔离记录'
// fromInventoryStatus.value = 'SCRAP'
// toInventoryStatus.value = "HOLD"
businessType.value = 'ScraptoHold'
importFileName.value = '报废转隔离记录'
} else {
console.log(146, fromInventoryStatus.value)
fromInventoryStatus.value = null
tableObject.params = {
businessType :'Move'
}
businessType.value = 'Move'
importFileName.value = '库存移动记录'
@ -281,6 +288,15 @@ const importSuccess = () => {
//
const searchFormClick = (searchData) => {
const cmd = {
'column':'businessType',
'action':'==',
'value':businessType.value
}
if (!Array.isArray(searchData.filters)) {
searchData.filters = [];
}
searchData.filters.push(cmd)
tableObject.params = {
isSearch: true,
filters: searchData.filters

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

@ -115,73 +115,78 @@ const { tableObject, tableMethods } = useTable({
/**
* OktoholdRequestMain 合格转隔离
*/
if ( routeName.value == 'OktoholdRequestMain') {
if ( routeName.value == 'OktoholdRequestMain') {
tableObject.params = {
toInventoryStatus:'HOLD'
// fromInventoryStatus: 'OK',
// toInventoryStatus:'HOLD',
businessType :'OkToHold'
}
toInventoryStatus.value = "HOLD"
// fromInventoryStatus.value = 'OK'
// toInventoryStatus.value = "HOLD"
businessType.value = 'OkToHold'
importFileName.value = '物料转隔离申请'
}
// else if ( routeName.value == 'NoktoholdRequestMain') {
// tableObject.params = {
// fromInventoryStatus: 'NOK',
// toInventoryStatus:'HOLD'
// }
// fromInventoryStatus.value = 'NOK'
// toInventoryStatus.value = "HOLD"
// businessType.value = 'NokToHold'
// importFileName.value = ''
// }
else if ( routeName.value == 'HoldtookRequestMain') {
else if ( routeName.value == 'NoktoholdRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'OK'
// fromInventoryStatus: 'NOK',
// toInventoryStatus:'HOLD',
businessType :'NokToHold'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "OK"
// fromInventoryStatus.value = 'NOK'
// toInventoryStatus.value = "HOLD"
businessType.value = 'NokToHold'
importFileName.value = '不合格转隔离申请'
}
else if ( routeName.value == 'HoldtookRequestMain') {
tableObject.params = {
// fromInventoryStatus: 'HOLD',
// toInventoryStatus:'OK',
businessType :'HoldToOk'
}
// fromInventoryStatus.value = 'HOLD'
// toInventoryStatus.value = "OK"
businessType.value = 'HoldToOk'
importFileName.value = '隔离转合格申请'
} else if ( routeName.value == 'HoldtoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'SCRAP'
// fromInventoryStatus: 'HOLD',
// toInventoryStatus:'SCRAP',
businessType:'HoldToScrap'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "SCRAP"
// fromInventoryStatus.value = 'HOLD'
// toInventoryStatus.value = "SCRAP"
businessType.value = 'HoldToScrap'
importFileName.value = '隔离转报废申请'
} else if ( routeName.value == 'OktoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus:'SCRAP'
// fromInventoryStatus: 'OK',
// toInventoryStatus:'SCRAP',
businessType :'OkToScrap'
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "SCRAP"
// fromInventoryStatus.value = 'OK'
// toInventoryStatus.value = "SCRAP"
businessType.value = 'OkToScrap'
importFileName.value = '合格转报废申请'
}
// else if ( routeName.value == 'ScraptoholdRequestMain') {
// tableObject.params = {
// fromInventoryStatus: 'SCRAP',
// toInventoryStatus:'HOLD'
// }
// fromInventoryStatus.value = 'SCRAP'
// toInventoryStatus.value = "HOLD"
// businessType.value = 'ScrapToHold'
// importFileName.value = ''
// }
else if( routeName.value == 'InventorymoveRequestMain'){
fromInventoryStatus.value = null
businessType.value = 'Move'
importFileName.value = '库存移动申请'
}else {
}
else if ( routeName.value == 'ScraptoholdRequestMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus:'SCRAP'
// fromInventoryStatus: 'SCRAP',
// toInventoryStatus:'HOLD',
businessType :'ScrapToHold'
}
// fromInventoryStatus.value = 'SCRAP'
// toInventoryStatus.value = "HOLD"
businessType.value = 'ScrapToHold'
importFileName.value = '报废转隔离申请'
} else {
tableObject.params = {
businessType :'Move'
}
businessType.value = 'Move'
importFileName.value = '库存移动申请'
}
console.log(99 , businessType.value)
InventorymoveRequestMain.allSchemas.tableFormColumns.map(item =>{
if(item.field == 'fromWarehouseCode') {
if (fromInventoryStatus.value) {
@ -789,6 +794,15 @@ const importSuccess = () => {
//
const searchFormClick = (searchData) => {
const cmd = {
'column':'businessType',
'action':'==',
'value':businessType.value
}
if (!Array.isArray(searchData.filters)) {
searchData.filters = [];
}
searchData.filters.push(cmd)
tableObject.params = {
isSearch: true,
filters: searchData.filters

104
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainMOVE/index.vue

@ -116,73 +116,80 @@ const { tableObject, tableMethods } = useTable({
/**
* OktoholdRequestMain 合格转隔离
*/
if ( routeName.value == 'OktoholdRequestMain') {
if ( routeName.value == 'OktoholdRequestMain') {
tableObject.params = {
toInventoryStatus:'HOLD'
// fromInventoryStatus: 'OK',
// toInventoryStatus:'HOLD',
businessType :'OkToHold'
}
toInventoryStatus.value = "HOLD"
// fromInventoryStatus.value = 'OK'
// toInventoryStatus.value = "HOLD"
businessType.value = 'OkToHold'
importFileName.value = '物料转隔离申请'
}
// else if ( routeName.value == 'NoktoholdRequestMain') {
// tableObject.params = {
// fromInventoryStatus: 'NOK',
// toInventoryStatus:'HOLD'
// }
// fromInventoryStatus.value = 'NOK'
// toInventoryStatus.value = "HOLD"
// businessType.value = 'NokToHold'
// importFileName.value = ''
// }
else if ( routeName.value == 'HoldtookRequestMain') {
else if ( routeName.value == 'NoktoholdRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'OK'
// fromInventoryStatus: 'NOK',
// toInventoryStatus:'HOLD',
businessType :'NokToHold'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "OK"
// fromInventoryStatus.value = 'NOK'
// toInventoryStatus.value = "HOLD"
businessType.value = 'NokToHold'
importFileName.value = '不合格转隔离申请'
}
else if ( routeName.value == 'HoldtookRequestMain') {
tableObject.params = {
// fromInventoryStatus: 'HOLD',
// toInventoryStatus:'OK',
businessType :'HoldToOk'
}
// fromInventoryStatus.value = 'HOLD'
// toInventoryStatus.value = "OK"
businessType.value = 'HoldToOk'
importFileName.value = '隔离转合格申请'
} else if ( routeName.value == 'HoldtoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'SCRAP'
// fromInventoryStatus: 'HOLD',
// toInventoryStatus:'SCRAP',
businessType:'HoldToScrap'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "SCRAP"
// fromInventoryStatus.value = 'HOLD'
// toInventoryStatus.value = "SCRAP"
businessType.value = 'HoldToScrap'
importFileName.value = '隔离转报废申请'
} else if ( routeName.value == 'OktoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus:'SCRAP'
// fromInventoryStatus: 'OK',
// toInventoryStatus:'SCRAP',
businessType :'OkToScrap'
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "SCRAP"
// fromInventoryStatus.value = 'OK'
// toInventoryStatus.value = "SCRAP"
businessType.value = 'OkToScrap'
importFileName.value = '合格转报废申请'
}
// else if ( routeName.value == 'ScraptoholdRequestMain') {
// tableObject.params = {
// fromInventoryStatus: 'SCRAP',
// toInventoryStatus:'HOLD'
// }
// fromInventoryStatus.value = 'SCRAP'
// toInventoryStatus.value = "HOLD"
// businessType.value = 'ScrapToHold'
// importFileName.value = ''
// }
else if( routeName.value == 'InventorymoveRequestMain'){
fromInventoryStatus.value = null
businessType.value = 'Move'
importFileName.value = '库存移动申请'
}else {
}
else if ( routeName.value == 'ScraptoholdRequestMain') {
tableObject.params = {
// fromInventoryStatus: 'SCRAP',
// toInventoryStatus:'HOLD',
businessType :'ScrapToHold'
}
// fromInventoryStatus.value = 'SCRAP'
// toInventoryStatus.value = "HOLD"
businessType.value = 'ScrapToHold'
importFileName.value = '报废转隔离申请'
} else {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus:'SCRAP'
businessType :'Move'
}
businessType.value = 'Move'
importFileName.value = '库存移动申请'
}
console.log(99 , businessType.value)
InventorymoveRequestMain.allSchemas.tableFormColumns.map(item =>{
if(item.field == 'fromWarehouseCode') {
if (fromInventoryStatus.value) {
@ -803,6 +810,15 @@ const importSuccess = () => {
//
const searchFormClick = (searchData) => {
const cmd = {
'column':'businessType',
'action':'==',
'value':businessType.value
}
if (!Array.isArray(searchData.filters)) {
searchData.filters = [];
}
searchData.filters.push(cmd)
tableObject.params = {
isSearch: true,
filters: searchData.filters

102
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue

@ -116,73 +116,78 @@ const { tableObject, tableMethods } = useTable({
/**
* OktoholdRequestMain 合格转隔离
*/
if ( routeName.value == 'OktoholdRequestMain') {
if ( routeName.value == 'OktoholdRequestMain') {
tableObject.params = {
toInventoryStatus:'HOLD'
// fromInventoryStatus: 'OK',
// toInventoryStatus:'HOLD',
businessType :'OkToHold'
}
toInventoryStatus.value = "HOLD"
// fromInventoryStatus.value = 'OK'
// toInventoryStatus.value = "HOLD"
businessType.value = 'OkToHold'
importFileName.value = '物料转隔离申请'
}
// else if ( routeName.value == 'NoktoholdRequestMain') {
// tableObject.params = {
// fromInventoryStatus: 'NOK',
// toInventoryStatus:'HOLD'
// }
// fromInventoryStatus.value = 'NOK'
// toInventoryStatus.value = "HOLD"
// businessType.value = 'NokToHold'
// importFileName.value = ''
// }
else if ( routeName.value == 'HoldtookRequestMain') {
else if ( routeName.value == 'NoktoholdRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'OK'
// fromInventoryStatus: 'NOK',
// toInventoryStatus:'HOLD',
businessType :'NokToHold'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "OK"
// fromInventoryStatus.value = 'NOK'
// toInventoryStatus.value = "HOLD"
businessType.value = 'NokToHold'
importFileName.value = '不合格转隔离申请'
}
else if ( routeName.value == 'HoldtookRequestMain') {
tableObject.params = {
// fromInventoryStatus: 'HOLD',
// toInventoryStatus:'OK',
businessType :'HoldToOk'
}
// fromInventoryStatus.value = 'HOLD'
// toInventoryStatus.value = "OK"
businessType.value = 'HoldToOk'
importFileName.value = '隔离转合格申请'
} else if ( routeName.value == 'HoldtoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'SCRAP'
// fromInventoryStatus: 'HOLD',
// toInventoryStatus:'SCRAP',
businessType:'HoldToScrap'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "SCRAP"
// fromInventoryStatus.value = 'HOLD'
// toInventoryStatus.value = "SCRAP"
businessType.value = 'HoldToScrap'
importFileName.value = '隔离转报废申请'
} else if ( routeName.value == 'OktoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus:'SCRAP'
// fromInventoryStatus: 'OK',
// toInventoryStatus:'SCRAP',
businessType :'OkToScrap'
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "SCRAP"
// fromInventoryStatus.value = 'OK'
// toInventoryStatus.value = "SCRAP"
businessType.value = 'OkToScrap'
importFileName.value = '合格转报废申请'
}
// else if ( routeName.value == 'ScraptoholdRequestMain') {
// tableObject.params = {
// fromInventoryStatus: 'SCRAP',
// toInventoryStatus:'HOLD'
// }
// fromInventoryStatus.value = 'SCRAP'
// toInventoryStatus.value = "HOLD"
// businessType.value = 'ScrapToHold'
// importFileName.value = ''
// }
else if( routeName.value == 'InventorymoveRequestMain'){
fromInventoryStatus.value = null
businessType.value = 'Move'
importFileName.value = '库存移动申请'
}else {
}
else if ( routeName.value == 'ScraptoholdRequestMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus:'SCRAP'
// fromInventoryStatus: 'SCRAP',
// toInventoryStatus:'HOLD',
businessType :'ScrapToHold'
}
// fromInventoryStatus.value = 'SCRAP'
// toInventoryStatus.value = "HOLD"
businessType.value = 'ScrapToHold'
importFileName.value = '报废转隔离申请'
} else {
tableObject.params = {
businessType :'Move'
}
businessType.value = 'Move'
importFileName.value = '库存移动申请'
}
console.log(99 , businessType.value)
InventorymoveRequestMain.allSchemas.tableFormColumns.map(item =>{
if(item.field == 'fromWarehouseCode') {
if (fromInventoryStatus.value) {
@ -803,6 +808,15 @@ const importSuccess = () => {
//
const searchFormClick = (searchData) => {
const cmd = {
'column':'businessType',
'action':'==',
'value':businessType.value
}
if (!Array.isArray(searchData.filters)) {
searchData.filters = [];
}
searchData.filters.push(cmd)
tableObject.params = {
isSearch: true,
filters: searchData.filters

8
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts

@ -992,7 +992,7 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
label: '备注',
field: 'remark',
sort: 'custom',
sortTableDefault:1002,
sortTableDefault:1000,
table: {
width: 150
},
@ -1000,7 +1000,7 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
{
label: '创建时间',
field: 'createTime',
sortTableDefault:1000,
sortTableDefault:1001,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -1018,6 +1018,7 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
valueFormat: 'x',
}
},
hiddenInMain:false,
isTableForm: false,
isForm: false
},
@ -1025,10 +1026,11 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
label: '创建者',
field: 'creator',
sort: 'custom',
sortTableDefault:1001,
sortTableDefault:1002,
table: {
width: 150
},
hiddenInMain:false,
isTableForm: false,
isForm: false
},

9
src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue

@ -305,6 +305,15 @@ const handleExport = async () => {
//
const searchFormClick = (searchData) => {
const cmd = {
'column':'type',
'action':'==',
'value':'predict'
}
if (!Array.isArray(searchData.filters)) {
searchData.filters = [];
}
searchData.filters.push(cmd)
tableObject.params = {
isSearch: true,
filters: searchData.filters

20
src/views/wms/productionManage/productreceiptAssemble/mesRawMaterialConsumptionInfo/index.vue

@ -56,6 +56,8 @@ const routeName = ref()
routeName.value = route.name
const tableColumns = ref([...MesRawMaterialConsumptionInfo.allSchemas.tableColumns])
/** 列表导出按钮操作 */
const exportLoading = ref(false) //
const mesModelVisible = ref(false)
const { tableObject: tableObject, tableMethods: tableMethods } =useTable({
getListApi: MesRawMaterialConsumptionInfoApi.getMesRawMaterialConsumptionInfoPage
@ -70,7 +72,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultExportBtn({hasPermi:'wms:productreceipt-record-main:export'}), //
defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -79,7 +81,7 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'export') { //
// handleExport()
handleExport()
} else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
@ -95,6 +97,20 @@ const buttonBaseClick = (val, item) => {
}
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await MesRawMaterialConsumptionInfoApi.exportAssemblyMaterialUsageMes(tableObject.params)
download.excel(data, '装配完工原料信息.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {

2
src/views/wms/productionManage/productreceiptAssemble/mesRawMaterialConsumptionInfo/mesRawMaterialConsumptionInfo.data.ts

@ -91,7 +91,6 @@ export const MesRawMaterialConsumptionInfo = useCrudSchemas(reactive<CrudSchema[
label: '原料包装号',
field: 'packingNumber',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
@ -103,7 +102,6 @@ export const MesRawMaterialConsumptionInfo = useCrudSchemas(reactive<CrudSchema[
table: {
width: 150
},
isSearch: true,
},
{
label: '原料批次',

26
src/views/wms/productionManage/productreceiptAssemble/rawMaterialConsumptionInfo/index.vue

@ -50,12 +50,14 @@ defineOptions({ name: 'RawMaterialConsumptionInfo' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref([...RawMaterialConsumptionInfo.allSchemas.tableColumns])
/** 列表导出按钮操作 */
const exportLoading = ref(false) //
const mesModelVisible = ref(false)
const { tableObject: tableObject, tableMethods: tableMethods } =useTable({
getListApi: RawMaterialConsumptionInfoApi.getRawMaterialConsumptionInfoPage
@ -70,7 +72,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultExportBtn({hasPermi:'wms:productreceipt-record-main:export'}), //
defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -80,7 +82,7 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'export') { //
// handleExport()
handleExport()
} else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
@ -89,7 +91,7 @@ const buttonBaseClick = (val, item) => {
} else {
getList()
}
} else if (val == 'filtrate') { //
}else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
@ -104,6 +106,20 @@ const searchFormClick = (searchData) => {
getList() //
}
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await RawMaterialConsumptionInfoApi.exportAssemblyMaterialUsage(tableObject.params)
download.excel(data, '装配完工原料信息.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(async () => {
getList()

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

@ -554,8 +554,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await ProductreceiptRequestMainApi.exportProductreceiptRequestMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

3
src/views/wms/productionManage/productredress/productredressJobMain/index.vue

@ -195,8 +195,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await ProductredressJobMainApi.exportProductredressJobMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

26
src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts

@ -383,7 +383,7 @@ export const ProductredressJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:true,
isTable:false,
isForm: false,
},
{
@ -397,7 +397,7 @@ export const ProductredressJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isTable:true,
isTable:false,
form: {
component: 'DatePicker',
componentProps: {
@ -668,16 +668,6 @@ export const ProductredressJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
isTable:false,
hiddenInMain:true,
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isTable:true,
hiddenInMain:true,
},
{
label: '创建时间',
field: 'createTime',
@ -690,7 +680,7 @@ export const ProductredressJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 180
},
isTable:true,
hiddenInMain:true,
hiddenInMain:false,
form: {
component: 'DatePicker',
componentProps: {
@ -702,6 +692,16 @@ export const ProductredressJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
isForm: false
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isTable:true,
hiddenInMain:false,
},
{
label: '最后更新者',
field: 'updater',

3
src/views/wms/productionManage/productredress/productredressRecordMain/index.vue

@ -139,8 +139,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await ProductredressRecordMainApi.exportProductredressRecordMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

3
src/views/wms/productionManage/productredress/productredressRequestMain/index.vue

@ -382,8 +382,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await ProductredressRequestMainApi.exportProductredressRequestMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

31
src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts

@ -334,7 +334,7 @@ export const ProductredressRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'creator',
sort: 'custom',
isForm: false,
isTable: true,
isTable: false,
table: {
width: 150
},
@ -350,7 +350,7 @@ export const ProductredressRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isTable: true,
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
@ -700,18 +700,7 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
// isTable:false,
// hiddenInMain:true
// },
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
isTable:true,
hiddenInMain:true
},
{
label: '创建时间',
field: 'createTime',
@ -724,7 +713,7 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 180
},
isTable:true,
hiddenInMain:true,
hiddenInMain:false,
form: {
component: 'DatePicker',
componentProps: {
@ -737,6 +726,18 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
isTableForm: false,
isForm: false
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
isTable:true,
hiddenInMain:false
},
{
label: '最后更新者',
field: 'updater',

3
src/views/wms/productionManage/productrepair/productrepairRecordMain/index.vue

@ -265,8 +265,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await ProductrepairRecordMainApi.exportProductrepairRecordMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

18
src/views/wms/productionManage/productrepair/productrepairRecordMain/productrepairRecordMain.data.ts

@ -197,15 +197,6 @@ export const ProductrepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isTable: false
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isTable: true
},
{
label: '创建时间',
field: 'createTime',
@ -236,6 +227,15 @@ export const ProductrepairRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isTable: true
},
{
label: '最后更新时间',
field: 'updateTime',

3
src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue

@ -575,8 +575,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await ProductrepairRequestMainApi.exportProductrepairRequestMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

3
src/views/wms/productionManage/productscrap/productscrapJobMain/index.vue

@ -223,8 +223,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await ProductscrapJobMainApi.exportProductscrapJobMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

3
src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue

@ -266,8 +266,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await ProductscrapRecordMainApi.exportProductscrapRecordMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

3
src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue

@ -728,8 +728,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await ProductscrapRequestMainApi.exportProductscrapRequestMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

3
src/views/wms/purchasereceiptManage/inspect/inspectJobMain/index.vue

@ -233,8 +233,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await InspectJobMainApi.exportInspectJobMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

3
src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue

@ -179,8 +179,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await InspectRecordMainApi.exportInspectRecordMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

3
src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue

@ -322,8 +322,9 @@
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await InspectRequestMainApi.exportInspectRequestMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

5
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue

@ -303,12 +303,13 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
if(routeName.value.includes('SCP')){
const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordMainSCP(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
}else{
const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
}
} catch {
} finally {

10
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data.ts

@ -48,6 +48,16 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false,
sortTableDefault:3
},
{
label: '明细备注',
field: 'remark',
sort: 'custom',
table: {
width: 180
},
isSearch: false,
sortTableDefault:3
},
{
label: '发货单号',
field: 'asnNumber',

5
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/index.vue

@ -291,12 +291,13 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
if(routeName.value.includes('SCP')){
const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordMainSCP(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
}else{
const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordRefuseMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
}
} catch {
} finally {

3
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -762,8 +762,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await PurchasereceiptRequestMainApi.exportPurchasereceiptRequestMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

3
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/index.vue

@ -238,8 +238,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await PurchasereturnJobMainApi.exportPurchasereturnJobMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

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

@ -935,6 +935,34 @@ export const PurchasereturnJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
disabled:false
}
},
{
label: '退货原因',
field: 'reasonType',
dictType: DICT_TYPE.RETURN_REASON_TYPE,
dictClass: 'string',
// isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm:{
type: 'Select',
},
form: {
componentProps:{
disabled:true
}
}
},
{
label: '退货原因描述',
field: 'reason',
sort: 'custom',
table: {
width: 150
},
},
{
label: '计量单位',
field: 'uom',

5
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue

@ -169,12 +169,13 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
if(routeName.value.includes('SCP')){
const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMainSCP(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
}else{
const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
}
} catch {
} finally {

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

@ -744,20 +744,7 @@ export const PurchasereturnRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
hiddenInMain: true,
isSearch: false
},
{
label: '原因',
field: 'reason',
dictType: DICT_TYPE.PURCHASE_RETURN_REASON,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
sortTableDefault: 1013,
hiddenInMain: true
},
{
label: '物料代码',
field: 'itemCode',
@ -887,7 +874,35 @@ export const PurchasereturnRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
// },
// },
{
label: '原因',
label: '退货原因',
field: 'reasonType',
dictType: DICT_TYPE.RETURN_REASON_TYPE,
dictClass: 'string',
// isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm:{
type: 'Select',
},
form: {
componentProps:{
disabled:true
}
}
},
{
label: '退货原因描述',
field: 'reason',
sort: 'custom',
table: {
width: 150
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {

3
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue

@ -756,10 +756,11 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await PurchasereturnRequestMainApi.exportPurchasereturnRequestMain(
tableObject.params
)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

34
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue

@ -83,7 +83,7 @@
</template>
</BasicForm>
<!-- 添加明细采购收货记录单号 -->
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" >
<SearchTable ref="searchTableRef" :hiddenFilterBtnFields="['hahaha']" @searchTableSuccess="searchTableSuccess1" >
<template #searchQueryhahaha>
<el-form :inline="true">
<el-form-item label="供应商">
@ -129,11 +129,11 @@
@searchTableSuccess="searchTableSuccessLabel"
/>
<!-- 标签打印 -->
<SearchTable style="width: 905px" ref="showLabelRef" @searchTableSuccess="showLabelSuccess" />
<SearchTable style="width: 905px" :hiddenFilterBtn="true" ref="showLabelRef" @searchTableSuccess="showLabelSuccess" />
<!-- 导入 -->
<ImportForm
ref="importFormRef"
url="/wms/purchasereturn-request-main/import"
url="/wms/purchasereturn-request-main/importNew"
:importTemplateData="importTemplateData"
@success="importSuccess"
:updateIsDisable="true"
@ -278,10 +278,13 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
setV['asnNumber'] = ''
tableData.value = []
getSupplierOptions(val[0][searchField])
}
formRef.setValues(setV)
if(formField=='itemCode'){
onChangeForm('itemCode',null,formRef)
}
}
})
}
@ -637,7 +640,7 @@ const handleHandle = async (id: number) => {
try {
await message.confirm(t('common.confirmHandle'))
tableObject.loading = true
await PurchasereturnRequestMainApi.handlePurchasereturnRequestMain(id)
await PurchasereturnRequestMainApi.handlePurchasereturnRequestMainNew(id)
message.success(t('common.handleSuccess'))
buttonBaseClick('refresh',null)
} catch {
@ -669,10 +672,11 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await PurchasereturnRequestMainApi.exportPurchasereturnRequestMain(
tableObject.params
)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -788,7 +792,6 @@ const handleAddTable = () => {
// })
}
const onChangeForm = async (field, cur, formRef)=>{
console.log('onChangeForm',field, cur, formRef)
if(field=='supplierCode'){
//
PurchasereturnRequestMainNew.allSchemas.formSchema.forEach(item=>{
@ -799,23 +802,30 @@ const onChangeForm = async (field, cur, formRef)=>{
formRef.value.setValues(setV)
}
})
}else if(field == 'locationCode'){
}else if(field == 'locationCode' || field == 'itemCode'){
// 退
let itemCode = formRef.formModel?formRef.formModel.itemCode:formRef.value.formModel.itemCode
let fromLocationCode = formRef.formModel?formRef.formModel.locationCode:formRef.value.formModel.locationCode
if(!itemCode||!fromLocationCode){
return
}
let subList = await PurchasereturnRequestDetailApi.getBalancePurchaseReceiptReturn({
itemCode:formRef.value.formModel.itemCode,
fromLocationCode:formRef.value.formModel.locationCode
itemCode,
fromLocationCode
})
console.log('subList',subList)
if(subList&&subList.length>0){
tableData.value = subList.map(item=>({
'batch':item['batch'],
'status':item['inventoryStatus'],
'inventoryStatus':item['inventoryStatus'],
'inventoryBalance':item['qty'],
'qty':0,
'reason_type':'',
'reason':''
}))
}else{
tableData.value = []
}
}
}
@ -1055,6 +1065,6 @@ const showLabelSuccess = async (formField, searchField, val, formRef, type, row)
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await PurchasereturnRequestMainApi.importTemplate()
importTemplateData.templateUrl = await PurchasereturnRequestMainApi.importTemplateNew()
})
</script>

28
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMain.data.ts

@ -1236,6 +1236,34 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
precision: 6
}
},
{
label: '退货原因',
field: 'reasonType',
dictType: DICT_TYPE.RETURN_REASON_TYPE,
dictClass: 'string',
// isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm:{
type: 'Select',
},
form: {
componentProps:{
disabled:true
}
}
},
{
label: '退货原因描述',
field: 'reason',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库存状态',
field: 'inventoryStatus',

1
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMainNew.data.ts

@ -254,6 +254,7 @@ export const PurchasereturnRequestMainNew = useCrudSchemas(
},
form: {
component: 'Select',
value:locationList[0]['value'],
componentProps: {
options: locationList
}

5
src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/index.vue

@ -169,12 +169,13 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
if(routeName.value.includes('SCP')){
const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMainSCP(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
}else{
const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMainSpare(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
}
} catch {

3
src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue

@ -706,10 +706,11 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await PurchasereturnRequestMainApi.exportPurchasereturnRequestMainSpare(
tableObject.params
)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

3
src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue

@ -348,8 +348,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await PutawayJobMainApi.exportPutawayJobMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

3
src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/index.vue

@ -211,8 +211,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await PutawayRecordMainApi.exportPutawayRecordMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

3
src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue

@ -406,8 +406,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await PutawayRequestMainApi.exportPutawayRequestMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

3
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue

@ -259,8 +259,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await PurchasereceiptJobMainApi.exportSparereceiptJobMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

3
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/index.vue

@ -160,8 +160,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await PurchasereceiptRecordMainApi.exportSparereceiptRecordMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

3
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue

@ -560,8 +560,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await PurchasereceiptRequestMainApi.exportSparereceiptRequestMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

3
src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/index.vue

@ -156,8 +156,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await PurchaseclaimRecordMainApi.exportPurchaseclaimRecordMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

3
src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue

@ -414,8 +414,9 @@ import { getJmreportBaseUrl } from '@/utils/systemParam'
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await PurchaseclaimRequestMainApi.exportPurchaseclaimRequestMain(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

10
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue

@ -280,7 +280,12 @@ const searchList = (model)=>{
model.postingDate[1] = model.postingDate[1].replace('00:00:00','23:59:59')
}
selectionRows.value = []
setSearchParams(model)
let model1 = {
...model,
statuss: model.status.join(',')?model.status.join(','):''
}
delete model1.status
setSearchParams(model1)
}
const selectionRows = ref<any>([])
const tableRef = ref()
@ -303,6 +308,9 @@ const handleExport = async () => {
selectionRows.value.forEach(item=>{
rows = [...rows,...item.selectionRows.map(item1=>item1.number)]
})
if (!tableObject.params.createTime || tableObject.params.createTime && tableObject.params. createTime.length == 0) {
delete tableObject.params.createTime
}
try {
//
await message.exportConfirm()

7
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts

@ -73,6 +73,13 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
search: {
componentProps: {
multiple: true,
collapseTags: true,
collapseTagsTooltip: true,
}
},
isSearch: true,
form: {
value: '1',

52
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -378,7 +378,12 @@ const searchTableParams = ref([
const formPurchasePassRef = ref()
const searchList = (model) => {
selectionRows.value = []
setSearchParams(model)
let model1 = {
...model,
statuss: model.status.join(',')?model.status.join(','):''
}
delete model1.status
setSearchParams(model1)
}
const selectionRows = ref<any>([])
const tableRef = ref()
@ -702,16 +707,16 @@ const buttonTableClick = async (val, row) => {
handleRepeal(row.id)
}
}
const procurementCreators = ref([])
SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode({
roleCode: 'purchase',
pageSize: 1000,
pageNo: 1,
sort: '',
by: 'ASC'
}).then((res) => {
procurementCreators.value = res.list
})
// const procurementCreators = ref([])
// SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode({
// roleCode: 'purchase',
// pageSize: 1000,
// pageNo: 1,
// sort: '',
// by: 'ASC'
// }).then((res) => {
// procurementCreators.value = res.list
// })
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type: string, row?: any) => {
@ -787,10 +792,10 @@ const openForm = async (type: string, row?: any) => {
item.componentProps.disabled = false
}
if (item.field == 'procurementCreator') {
item.componentProps.options = procurementCreators.value
// if (item.field == 'procurementCreator') {
// item.componentProps.options = procurementCreators.value
}
// }
})
}
if (row && (row.status == '3' || row.status == '7')) {
@ -813,13 +818,13 @@ const openForm = async (type: string, row?: any) => {
}
tableData.value = [] //
formRef.value.open(type, row)
if(type=='create'){
nextTick(() => {
formRef.value.formRef.setValues({
procurementCreator:procurementCreators.value[0].id
})
})
}
// if(type=='create'){
// nextTick(() => {
// formRef.value.formRef.setValues({
// procurementCreator:procurementCreators.value[0].id
// })
// })
// }
})
}
const defaultSupplierCode = ref('')
@ -1159,6 +1164,7 @@ const genRecords = async (id: number) => {
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
console.log(111)
let rows: any = []
selectionRows.value.forEach((item) => {
rows = [...rows, ...item.selectionRows.map((item1) => item1.number)]
@ -1174,7 +1180,9 @@ const handleExport = async () => {
} else {
paramsData = { ...paramsData, checkNums: rows }
}
console.log('批量导出', paramsData)
if (!paramsData.createTime || paramsData.createTime && paramsData.createTime.length == 0) {
delete paramsData.createTime
}
try {
//
await message.exportConfirm()

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

@ -220,6 +220,13 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
},
sortTableDefault:9,
isSearch: true,
search: {
componentProps: {
multiple: true,
collapseTags: true,
collapseTagsTooltip: true,
}
},
form: {
value: '1',
componentProps: {

10
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/index.vue

@ -185,7 +185,12 @@ const searchList = (model)=>{
model.endDifferencePrice = endDifferencePrice.value
console.log('searchList',model)
selectionRows.value = []
setSearchParams(model)
let model1 = {
...model,
statuss: model.status.join(',')?model.status.join(','):''
}
delete model1.status
setSearchParams(model1)
}
const resetList = (model)=>{
staDifferencePrice.value = null
@ -324,6 +329,9 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea
}else{
paramsData = {...paramsData,checkNums:rows}
}
if (!paramsData.createTime || paramsData.createTime && paramsData.createTime.length == 0) {
delete paramsData.createTime
}
console.log('批量导出',paramsData)
try {
//

7
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts

@ -212,6 +212,13 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
},
sortTableDefault:9,
isSearch: true,
search: {
componentProps: {
multiple: true,
collapseTags: true,
collapseTagsTooltip: true,
}
},
form: {
value: '1',
componentProps: {

20
src/views/wms/supplierManage/supplierinvoiceInvoiced/supplierinvoiceInvoiced.data.ts

@ -143,6 +143,26 @@ export const SupplierinvoiceInvoiced = useCrudSchemas(reactive<CrudSchema[]>([
}
},
{
label: '发票申请状态',
field: 'requestStatus',
dictType: DICT_TYPE.INVOICE_REQUEST_STATUS,
dictClass: 'string',
isTable: true,
isForm:false,
sort: 'custom',
table: {
width: 150
},
isSearch: false,
form: {
value: '1',
componentProps: {
disabled: true
}
}
},
{
label: '订单行',

Loading…
Cancel
Save