Browse Source

Merge branch 'hella_online_20240803' into master_hella

hella_online_20240829
陈薪名 3 months ago
parent
commit
1ac4a07245
  1. 3
      .env.development
  2. 3
      .env.prod
  3. 3
      .env.test
  4. 3
      .env.test-scp
  5. 4
      src/api/login/index.ts
  6. 78
      src/api/qms/inspectionQ3/index.ts
  7. 64
      src/api/qms/inspectionQ3/inspectionQ3Detail/index.ts
  8. 65
      src/api/qms/inspectionQ3/inspectionQ3Main/index.ts
  9. 16
      src/api/wms/bomDismantle/index.ts
  10. 2
      src/api/wms/inventorymoveRequestDetail/index.ts
  11. 11
      src/api/wms/itempackage/index.ts
  12. 46
      src/api/wms/mesRawMaterialConsumptionInfo/index.ts
  13. 9
      src/api/wms/purchaseDetail/index.ts
  14. 16
      src/api/wms/purchasereturnRequestDetail/index.ts
  15. 4
      src/api/wms/purchasereturnRequestMain/index.ts
  16. 46
      src/api/wms/rawMaterialConsumptionInfo/index.ts
  17. 11
      src/components/BasicForm/src/BasicForm.vue
  18. 2
      src/components/TableFormCountPlan/src/TableFormCountPlan.vue
  19. 10
      src/utils/systemParam.ts
  20. 15
      src/views/login/components/LoginForm.vue
  21. 6
      src/views/qms/aql/index.vue
  22. 6
      src/views/qms/counter/index.vue
  23. 6
      src/views/qms/dynamicRule/index.vue
  24. 82
      src/views/qms/inspectionJob/index.vue
  25. 14
      src/views/qms/inspectionJob/inspectionJob.vue
  26. 4
      src/views/qms/inspectionJob/inspectionJobMain.data.ts
  27. 14
      src/views/qms/inspectionJob/inspectionJobProduction.vue
  28. 15
      src/views/qms/inspectionJob/inspectionJobPurchase.vue
  29. 6
      src/views/qms/inspectionMethod/index.vue
  30. 6
      src/views/qms/inspectionQ1/index.vue
  31. 6
      src/views/qms/inspectionQ2/index.vue
  32. 419
      src/views/qms/inspectionQ3/index.vue
  33. 524
      src/views/qms/inspectionQ3/inspectionQ3.data.ts
  34. 129
      src/views/qms/inspectionRecord/index.vue
  35. 14
      src/views/qms/inspectionRecord/inspectionRecord.vue
  36. 14
      src/views/qms/inspectionRecord/inspectionRecordProduction.vue
  37. 14
      src/views/qms/inspectionRecord/inspectionRecordPurchase.vue
  38. 11
      src/views/qms/inspectionRecordFirst/index.vue
  39. 6
      src/views/qms/inspectionRequest/index.vue
  40. 6
      src/views/qms/inspectionScheme/index.vue
  41. 6
      src/views/qms/inspectionTemplate/index.vue
  42. 6
      src/views/qms/sampleCode/index.vue
  43. 6
      src/views/qms/samplingProcess/index.vue
  44. 6
      src/views/qms/samplingScheme/index.vue
  45. 6
      src/views/qms/selectedSet/index.vue
  46. 3
      src/views/system/serialNumber/index.vue
  47. 3
      src/views/system/tenant/index.vue
  48. 3
      src/views/wms/agvManage/agvLocationrelation/index.vue
  49. 3
      src/views/wms/basicDataManage/customerManage/customer/index.vue
  50. 6
      src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/index.vue
  51. 3
      src/views/wms/basicDataManage/customerManage/customerdock/index.vue
  52. 3
      src/views/wms/basicDataManage/customerManage/customeritem/index.vue
  53. 3
      src/views/wms/basicDataManage/customerManage/project/index.vue
  54. 3
      src/views/wms/basicDataManage/customerManage/saleprice/index.vue
  55. 4
      src/views/wms/basicDataManage/documentSetting/businesstype/businesstype.data.ts
  56. 3
      src/views/wms/basicDataManage/documentSetting/businesstype/index.vue
  57. 4
      src/views/wms/basicDataManage/documentSetting/documentsetting/documentsetting.data.ts
  58. 3
      src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue
  59. 3
      src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue
  60. 4
      src/views/wms/basicDataManage/documentSetting/jobsetting/jobsetting.data.ts
  61. 3
      src/views/wms/basicDataManage/documentSetting/plansetting/index.vue
  62. 4
      src/views/wms/basicDataManage/documentSetting/plansetting/plansetting.data.ts
  63. 3
      src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue
  64. 4
      src/views/wms/basicDataManage/documentSetting/recordsetting/recordsetting.data.ts
  65. 3
      src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue
  66. 4
      src/views/wms/basicDataManage/documentSetting/requestsetting/requestsetting.data.ts
  67. 3
      src/views/wms/basicDataManage/documentSetting/switch/index.vue
  68. 6
      src/views/wms/basicDataManage/documentSetting/switch/switch.data.ts
  69. 3
      src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue
  70. 4
      src/views/wms/basicDataManage/documentSetting/transactiontype/transactiontype.data.ts
  71. 3
      src/views/wms/basicDataManage/factoryModeling/areabasic/index.vue
  72. 3
      src/views/wms/basicDataManage/factoryModeling/dock/index.vue
  73. 3
      src/views/wms/basicDataManage/factoryModeling/enterprise/index.vue
  74. 3
      src/views/wms/basicDataManage/factoryModeling/location/index.vue
  75. 3
      src/views/wms/basicDataManage/factoryModeling/locationgroup/index.vue
  76. 3
      src/views/wms/basicDataManage/factoryModeling/process/index.vue
  77. 3
      src/views/wms/basicDataManage/factoryModeling/productionline/index.vue
  78. 3
      src/views/wms/basicDataManage/factoryModeling/warehouse/index.vue
  79. 3
      src/views/wms/basicDataManage/factoryModeling/workshop/index.vue
  80. 3
      src/views/wms/basicDataManage/factoryModeling/workstation/index.vue
  81. 3
      src/views/wms/basicDataManage/itemManage/bom/index.vue
  82. 4
      src/views/wms/basicDataManage/itemManage/itemarea/index.vue
  83. 3
      src/views/wms/basicDataManage/itemManage/itembasic/index.vue
  84. 3
      src/views/wms/basicDataManage/itemManage/itempackage/index.vue
  85. 3
      src/views/wms/basicDataManage/itemManage/itemwarehouse/index.vue
  86. 58
      src/views/wms/basicDataManage/itemManage/packageunit/index.vue
  87. 6
      src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts
  88. 3
      src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/index.vue
  89. 3
      src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue
  90. 4
      src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/index.vue
  91. 6
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue
  92. 3
      src/views/wms/basicDataManage/itemManage/stdcostprice/index.vue
  93. 4
      src/views/wms/basicDataManage/labelManage/barcode/barcode.data.ts
  94. 3
      src/views/wms/basicDataManage/labelManage/barcode/index.vue
  95. 4
      src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts
  96. 3
      src/views/wms/basicDataManage/labelManage/callmaterials/index.vue
  97. 4
      src/views/wms/basicDataManage/labelManage/labeltype/labeltype.data.ts
  98. 3
      src/views/wms/basicDataManage/labelManage/locationLabel/index.vue
  99. 4
      src/views/wms/basicDataManage/labelManage/locationLabel/locationLabel.data.ts
  100. 5
      src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue

3
.env.development

@ -41,3 +41,6 @@ VITE_TENANT='["长春1379","成都1397","长春2379"]'
# 查看质检报告环境 # 查看质检报告环境
VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400' VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400'
# 是否需要验证码
VITE_NEED_CODE = true

3
.env.prod

@ -45,3 +45,6 @@ VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400'
# 登录系统升级的提示 # 登录系统升级的提示
VITE_SYSTERM_UPDATE_ALERT = true VITE_SYSTERM_UPDATE_ALERT = true
VITE_SYSTERM_UPDATE_URL = 'https://scptest.faway-hella.com/' VITE_SYSTERM_UPDATE_URL = 'https://scptest.faway-hella.com/'
# 是否需要验证码
VITE_NEED_CODE = true

3
.env.test

@ -41,3 +41,6 @@ VITE_TENANT='["长春","成都"]'
# 查看质检报告环境 # 查看质检报告环境
VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400' VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400'
# 是否需要验证码
VITE_NEED_CODE = true

3
.env.test-scp

@ -42,3 +42,6 @@ VITE_TENANT='["长春1379","成都1397","长春2379"]'
# 查看质检报告环境 # 查看质检报告环境
VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400' VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400'
# 是否需要验证码
VITE_NEED_CODE = false

4
src/api/login/index.ts

@ -16,7 +16,9 @@ export interface SmsLoginVO {
export const login = (data: UserLoginVO) => { export const login = (data: UserLoginVO) => {
return request.post({ url: '/system/auth/login', data }) return request.post({ url: '/system/auth/login', data })
} }
export const loginNoCode = (data: UserLoginVO) => {
return request.post({ url: '/system/auth/loginNoCode', data })
}
// 刷新访问令牌 // 刷新访问令牌
export const refreshToken = () => { export const refreshToken = () => {
return request.post({ url: '/system/auth/refresh-token?refreshToken=' + getRefreshToken() }) return request.post({ url: '/system/auth/refresh-token?refreshToken=' + getRefreshToken() })

78
src/api/qms/inspectionQ3/index.ts

@ -1,78 +0,0 @@
import request from '@/config/axios'
export interface Q3VO {
id: number
number: string
q1Number: string
itemCode: string
qty: number
code: string
uom: string
desc: string
defectLocation: string
defectType: string
problemReason: string
priority: number
responUser: string
amount: number
costCode: string
handleTime: Date
status: string
available: string
deletionTime: Date
deleterId: string
extraProperties: string
concurrencyStamp: number
siteId: string
}
// 查询Q3通知单列表
export const getQ3Page = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.post({ url: '/qms/inspectionQ3/senior', data })
} else {
return await request.get({ url: `/qms/inspectionQ3/page`, params })
}
}
// 查询Q3通知单详情
export const getQ3 = async (id: number) => {
return await request.get({ url: `/qms/inspectionQ3/get?id=` + id })
}
// 新增Q3通知单
export const createQ3 = async (data: Q3VO) => {
return await request.post({ url: `/qms/inspectionQ3/create`, data })
}
// 修改Q3通知单
export const updateQ3 = async (data: Q3VO) => {
return await request.put({ url: `/qms/inspectionQ3/update`, data })
}
// 删除Q3通知单
export const deleteQ3 = async (id: number) => {
return await request.delete({ url: `/qms/inspectionQ3/delete?id=` + id })
}
// 导出Q3通知单 Excel
export const exportQ3 = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/qms/inspectionQ3/export-excel-senior`, data })
}else{
return await request.download({ url: `/qms/inspectionQ3/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/qms/inspectionQ3/get-import-template' })
}
// 完成
export const finishQ3 = async (id: number) => {
return await request.get({ url: `/qms/inspectionQ3/finish?id=` + id })
}

64
src/api/qms/inspectionQ3/inspectionQ3Detail/index.ts

@ -0,0 +1,64 @@
import request from '@/config/axios'
export interface InspectionQ3DetailVO {
id: number
masterId: number
number: string
itemCode: string
qty: number
uom: string
price: number
amount: number
costCode: string
defectCode: string
defectLocation: string
defectType: string
problemReason: string
available: string
deletionTime: Date
deleterId: string
extraProperties: string
concurrencyStamp: number
siteId: string
}
// 查询Q3通知单子列表
export const getInspectionQ3DetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.post({ url: '/qms/inspection-Q3-detail/senior', data })
} else {
return await request.get({ url: `/qms/inspection-Q3-detail/page`, params })
}
}
// 查询Q3通知单子详情
export const getInspectionQ3Detail = async (id: number) => {
return await request.get({ url: `/qms/inspection-Q3-detail/get?id=` + id })
}
// 新增Q3通知单子
export const createInspectionQ3Detail = async (data: InspectionQ3DetailVO) => {
return await request.post({ url: `/qms/inspection-Q3-detail/create`, data })
}
// 修改Q3通知单子
export const updateInspectionQ3Detail = async (data: InspectionQ3DetailVO) => {
return await request.put({ url: `/qms/inspection-Q3-detail/update`, data })
}
// 删除Q3通知单子
export const deleteInspectionQ3Detail = async (id: number) => {
return await request.delete({ url: `/qms/inspection-Q3-detail/delete?id=` + id })
}
// 导出Q3通知单子 Excel
export const exportInspectionQ3Detail = async (params) => {
return await request.download({ url: `/qms/inspection-Q3-detail/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/qms/inspection-Q3-detail/get-import-template' })
}

65
src/api/qms/inspectionQ3/inspectionQ3Main/index.ts

@ -0,0 +1,65 @@
import request from '@/config/axios'
export interface InspectionQ3MainVO {
id: number
number: string
q1Number: string
responUser: string
priority: string
handleTime: Date
summaryAmount: number
desc: string
status: string
available: string
deletionTime: Date
deleterId: string
extraProperties: string
concurrencyStamp: number
siteId: string
}
// 查询Q3通知单主列表
export const getInspectionQ3MainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.post({ url: '/qms/inspection-Q3-main/senior', data })
} else {
return await request.get({ url: `/qms/inspection-Q3-main/page`, params })
}
}
// 查询Q3通知单主详情
export const getInspectionQ3Main = async (id: number) => {
return await request.get({ url: `/qms/inspection-Q3-main/get?id=` + id })
}
// 新增Q3通知单主
export const createInspectionQ3Main = async (data: InspectionQ3MainVO) => {
return await request.post({ url: `/qms/inspection-Q3-main/create`, data })
}
// 修改Q3通知单主
export const updateInspectionQ3Main = async (data: InspectionQ3MainVO) => {
return await request.put({ url: `/qms/inspection-Q3-main/update`, data })
}
// 删除Q3通知单主
export const deleteInspectionQ3Main = async (id: number) => {
return await request.delete({ url: `/qms/inspection-Q3-main/delete?id=` + id })
}
// 导出Q3通知单主 Excel
export const exportInspectionQ3Main = async (params) => {
return await request.download({ url: `/qms/inspection-Q3-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/qms/inspection-Q3-main/get-import-template' })
}
// 完成
export const finishInspectionQ3Main = async (id: number) => {
return await request.get({ url: `/qms/inspection-Q3-main/finish?id=` + id })
}

16
src/api/wms/bomDismantle/index.ts

@ -15,6 +15,22 @@ export const getProductscrapBomDismantlePage = async (params) => {
return await request.get({ url: `/wms/productscrap-request-main/bomPage`, params }) return await request.get({ url: `/wms/productscrap-request-main/bomPage`, params })
} }
export const getProductscrapBomRecordPage = async (params1) => {
console.log('getProductscrapBomRecordPage',params1)
let params = {...params1}
if(params.isRecord){
delete params.isRecord
return await request.get({ url: `/wms/productscrap-request-main/bomRecordPage`, params })
}else{
delete params.isRecord
return await request.get({ url: `/wms/productscrap-request-main/bomPage`, params })
}
}
// 查询制品报废申请子列表 // 查询制品报废申请子列表
export const getProductscrapBomDismantleRecordPage = async (params) => { export const getProductscrapBomDismantleRecordPage = async (params) => {
return await request.get({ url: `/wms/productscrap-record-main/bomPage`, params }) return await request.get({ url: `/wms/productscrap-record-main/bomPage`, params })

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

@ -67,4 +67,4 @@ export const exportInventorymoveRequestDetail = async (params) => {
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/inventorymove-request-detail/get-import-template' }) return request.download({ url: '/wms/inventorymove-request-detail/get-import-template' })
} }

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

@ -60,6 +60,17 @@ export const getItempackagingPageBySupplierdeliver = async (params) => {
} }
} }
// 查询物料包装信息 列表--客户退货申请
export const getItempackagingPageByCustomerreturn = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/itempackage/seniorByCustomerreturn', data })
} else {
return await request.get({ url: `/wms/itempackage/pageByCustomerreturn`, params })
}
}
// 查询物料包装信息 列表--制品收货申请 // 查询物料包装信息 列表--制品收货申请
export const getItempackagingPageByProductreceipt = async (params) => { export const getItempackagingPageByProductreceipt = async (params) => {
if (params.isSearch) { if (params.isSearch) {

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

@ -0,0 +1,46 @@
import request from '@/config/axios'
export const AssemblyFinishedMaterialConsumptionMesRespVO = {
finishPackingNumber: '',
finishBatch: '',
finishItemCode: '',
finishCreateTime: new Date(),
id: 0,
processCode: '',
bomVersion: '',
packingNumber: '',
batch: '',
inventoryStatus: '',
fromLocationCode: '',
fromLocationGroupCode: '',
fromAreaCode: '',
itemName: '',
itemDesc1: '',
itemDesc2: '',
projectCode: '',
qty: '',
uom: '',
number: '',
itemCode: '',
remark: '',
createTime: new Date(),
creator: '',
code: '',
interfaceType: '',
jobDetailId: ''
};
// 查询QAD项目信息列表
export const getMesRawMaterialConsumptionInfoPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/productreceipt-detailb/getAssemblyMaterialUsageMesSenior', data })
} else {
return await request.get({ url: `/wms/productreceipt-detailb/getAssemblyMaterialUsageMes`, params })
}
}

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

@ -55,6 +55,15 @@ export const getPurchaseDetailPageWMS = async (params) => {
} }
} }
export const getPurchaseDetailPageWMSTypeM = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchase-detail/seniorM', data })
} else {
return await request.get({ url: `/wms/purchase-detail/pageM`, params })
}
}
// 查询采购订单子列表 // 查询采购订单子列表
export const getPurchaseDetailPageWMSSpare = async (params) => { export const getPurchaseDetailPageWMSSpare = async (params) => {

16
src/api/wms/purchasereturnRequestDetail/index.ts

@ -38,6 +38,22 @@ export const getPurchasereturnRequestDetailPage = async (params) => {
} }
} }
// 查询采购退货申请子列表
export const getPurchasereturnRequestDetailEditData = async (params) => {
return await request.get({ url: `/wms/purchasereturn-request-main/editReturnNew`, params })
}
// 物料供应商查询
export const getPurchasereturnSupplierByCode = async (params) => {
return await request.get({ url: `/wms/supplieritem/querySupplierByCode`, params })
}
// 收货明细查询
export const getPurchasereturnPurchasereceiptRecordByItemCode = async (params) => {
return await request.get({ url: `/wms/purchasereceipt-record-detail/queryPurchasereceiptRecordByItemCode`, params })
}
// 选完退货库位 渲染子列表数据
export const getBalancePurchaseReceiptReturn = async (params) => {
return await request.get({ url: `/wms/balance/queryBalancePurchaseReceiptReturn`, params })
}
// 查询采购退货申请子列表 // 查询采购退货申请子列表
export const getPurchasereturnRequestDetailPageSpare = async (params) => { export const getPurchasereturnRequestDetailPageSpare = async (params) => {

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

@ -52,6 +52,10 @@ export const getPurchasereturnRequestMain = async (id: number) => {
export const createPurchasereturnRequestMain = async (data: PurchasereturnRequestMainVO) => { export const createPurchasereturnRequestMain = async (data: PurchasereturnRequestMainVO) => {
return await request.post({ url: `/wms/purchasereturn-request-main/create`, data }) return await request.post({ url: `/wms/purchasereturn-request-main/create`, data })
} }
// 新增采购退货申请主 --新版
export const createPurchasereturnRequestMainNew = async (data: PurchasereturnRequestMainVO) => {
return await request.post({ url: `/wms/purchasereturn-request-main/createReturnNew`, data })
}
// 修改采购退货申请主 // 修改采购退货申请主
export const updatePurchasereturnRequestMain = async (data: PurchasereturnRequestMainVO) => { export const updatePurchasereturnRequestMain = async (data: PurchasereturnRequestMainVO) => {

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

@ -0,0 +1,46 @@
import request from '@/config/axios'
export const AssemblyFinishedMaterialConsumptionRespVO = {
finishPackingNumber: '',
finishBatch: '',
finishItemCode: '',
finishCreateTime: new Date(),
id: 0,
processCode: '',
bomVersion: '',
packingNumber: '',
batch: '',
inventoryStatus: '',
fromLocationCode: '',
fromLocationGroupCode: '',
fromAreaCode: '',
itemName: '',
itemDesc1: '',
itemDesc2: '',
projectCode: '',
qty: '',
uom: '',
number: '',
itemCode: '',
remark: '',
createTime: new Date(),
creator: '',
code: '',
interfaceType: '',
jobDetailId: ''
};
// 查询QAD项目信息列表
export const getRawMaterialConsumptionInfoPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/backflush-record-detailb/getAssemblyMaterialUsageSenior', data })
} else {
return await request.get({ url: `/wms/backflush-record-detailb/getAssemblyMaterialUsage`, params })
}
}

11
src/components/BasicForm/src/BasicForm.vue

@ -22,6 +22,9 @@
@onEnter="onEnter" @onEnter="onEnter"
@onFocus="onFocus" @onFocus="onFocus"
> >
<template v-for="name in Object.keys($slots)" :key="name" #[name]>
<slot :name="name"></slot>
</template>
<template #crontab="formSchema1" v-if="fromeWhere == 'countPlan'"> <template #crontab="formSchema1" v-if="fromeWhere == 'countPlan'">
<crontab <crontab
v-model="formSchema1.crontab" v-model="formSchema1.crontab"
@ -75,7 +78,7 @@
<el-input v-model="formSchema.value" v-if="isDetail && formTypeDetail == 'InputString'" /> <el-input v-model="formSchema.value" v-if="isDetail && formTypeDetail == 'InputString'" />
</template> </template>
</Form> </Form>
<div class="table" v-if="isBusiness && formType == 'create' && fromeWhere != 'countPlan'"> <div class="table" v-if="(isBusiness && formType == 'create' && fromeWhere != 'countPlan')||(isBusiness && formType == 'update' && updateTypeEdiltSubList && fromeWhere != 'countPlan')">
<TableForm <TableForm
ref="tableFormRef" ref="tableFormRef"
class="w-[100%]" class="w-[100%]"
@ -257,6 +260,12 @@ const props = defineProps({
required: false, required: false,
default: '' default: ''
}, },
//
updateTypeEdiltSubList: {
type: String,
required: false,
default: false
},
// //
countScopeType: { countScopeType: {
type: Array, type: Array,

2
src/components/TableFormCountPlan/src/TableFormCountPlan.vue

@ -61,7 +61,7 @@
row.type == 'CUSTOMER' || row.type == 'CUSTOMER' ||
row.type == 'ITEM_CODE' || row.type == 'ITEM_CODE' ||
row.type == 'WAREHOUSE_CODE' || row.type == 'WAREHOUSE_CODE' ||
row.type == 'AREABASIC_CODE' || row.type == 'AREA_CODE' ||
row.type == 'LOCATIONGROUP_CODE' || row.type == 'LOCATIONGROUP_CODE' ||
row.type == 'LOCATION_CODE' row.type == 'LOCATION_CODE'
" "

10
src/utils/systemParam.ts

@ -6,6 +6,7 @@ const reportUrl = ref(import.meta.env.VITE_REPORT_URL)
const tenant = ref(import.meta.env.VITE_TENANT) const tenant = ref(import.meta.env.VITE_TENANT)
const systermUpdateAlert = ref(import.meta.env.VITE_SYSTERM_UPDATE_ALERT) const systermUpdateAlert = ref(import.meta.env.VITE_SYSTERM_UPDATE_ALERT)
const systermUpdateUrl = ref(import.meta.env.VITE_SYSTERM_UPDATE_URL) const systermUpdateUrl = ref(import.meta.env.VITE_SYSTERM_UPDATE_URL)
const needCode = ref(import.meta.env.VITE_NEED_CODE)
const mode = ref(import.meta.env.MODE) const mode = ref(import.meta.env.MODE)
// 获取baseUrl // 获取baseUrl
@ -75,4 +76,13 @@ export const getSystermUpdateUrl = () => {
return systermUpdateUrl.value return systermUpdateUrl.value
} }
} }
//是否需要验证码
export const getNeedCode = () => {
if(mode.value === 'prod') {
return systemConfig.needCode
} else {
return needCode.value
}
}

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

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

6
src/views/qms/aql/index.vue

@ -79,6 +79,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Aql' }) defineOptions({ name: 'Aql' })
@ -267,8 +268,9 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await AqlApi.exportAql(tableObject.params) const data = await AqlApi.exportAql(tableObject.params)
download.excel(data, 'aql.xlsx') download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -283,7 +285,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: 'aql导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

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

@ -72,6 +72,7 @@ import download from '@/utils/download'
import { Counter, CounterRules } from './counter.data' import { Counter, CounterRules } from './counter.data'
import * as CounterApi from '@/api/qms/counter' import * as CounterApi from '@/api/qms/counter'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { formatDate } from '@/utils/formatTime'
// import TableHead from '@/components/TableHead/src/TableHead.vue' // import TableHead from '@/components/TableHead/src/TableHead.vue'
// import ImportForm from '@/components/ImportForm/src/ImportForm.vue' // import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
// import Detail from '@/components/Detail/src/Detail.vue' // import Detail from '@/components/Detail/src/Detail.vue'
@ -235,8 +236,9 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await CounterApi.exportCounter(tableObject.params) const data = await CounterApi.exportCounter(tableObject.params)
download.excel(data, '物料检验计数器.xlsx') download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -251,7 +253,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '物料检验计数器导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

6
src/views/qms/dynamicRule/index.vue

@ -109,6 +109,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import UploadFile from '@/components/UploadFile/src/UploadFile.vue' import UploadFile from '@/components/UploadFile/src/UploadFile.vue'
import { checkPermi } from '@/utils/permission' import { checkPermi } from '@/utils/permission'
import ImportForm from '../../../components/ImportForm/src/ImportForm.vue' import ImportForm from '../../../components/ImportForm/src/ImportForm.vue'
import { formatDate } from '@/utils/formatTime'
// import TableHead from '@/components/TableHead/src/TableHead.vue' // import TableHead from '@/components/TableHead/src/TableHead.vue'
// import ImportForm from '@/components/ImportForm/src/ImportForm.vue' // import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
// import Detail from '@/components/Detail/src/Detail.vue' // import Detail from '@/components/Detail/src/Detail.vue'
@ -313,8 +314,9 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await DynamicRuleApi.exportDynamicRule(tableObject.params) const data = await DynamicRuleApi.exportDynamicRule(tableObject.params)
download.excel(data, '动态修改规则.xlsx') download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -329,7 +331,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '动态修改规则导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

82
src/views/qms/inspectionJob/index.vue

@ -2,9 +2,10 @@
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search <Search
:schema="InspectionJobMain.allSchemas.searchSchema" ref="searchRef"
@search="setSearchParams" :schema="searchSchema"
@reset="setSearchParams" @search="searchParams"
@reset="searchParams"
/> />
</ContentWrap> </ContentWrap>
@ -122,9 +123,8 @@ import AddForm from './addForm.vue'
import Detail from './detail.vue' import Detail from './detail.vue'
import { getReportUrl } from '@/utils/systemParam' import { getReportUrl } from '@/utils/systemParam'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'inspectionJobMain' })
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
@ -180,7 +180,19 @@ const { tableObject, tableMethods } = useTable({
// //
const { getList, setSearchParams } = tableMethods const { getList, setSearchParams } = tableMethods
const searchParams = (model) => {
if (route.name == 'inspectionJobProduction') {
model.available = 'TRUE'
model.inspectionType = '4'
} else if (route.name == 'inspectionJobPurchase') {
model.available = 'TRUE'
model.inspectionType = '1'
} else {
model.available = 'TRUE'
model.excludeInspectionType = '1,4'
}
setSearchParams(model)
}
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'qms:inspection-job-main:export' }), // defaultButtons.defaultExportBtn({ hasPermi: 'qms:inspection-job-main:export' }), //
@ -399,8 +411,9 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await InspectionJobMainApi.exportInspectionJobMain(tableObject.params) const data = await InspectionJobMainApi.exportInspectionJobMain(tableObject.params)
download.excel(data, '检验任务.xlsx') download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -451,13 +464,13 @@ const handleImport = () => {
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
let isHave = searchData?.filters?.some((item) => item.column == 'inspectionType') let isHave = searchData?.filters?.some((item) => item.column == 'inspectionType')
if (!isHave) { if (!isHave) {
if (route.name == 'inspectionJobProductionMain') { if (route.name == 'inspectionJobProduction') {
searchData.filters.push({ searchData.filters.push({
action: '==', action: '==',
column: 'inspectionType', column: 'inspectionType',
value: '4' value: '4'
}) })
} else if (route.name == 'inspectionJobPurchaseMain') { } else if (route.name == 'inspectionJobPurchase') {
searchData.filters.push({ searchData.filters.push({
action: '==', action: '==',
column: 'inspectionType', column: 'inspectionType',
@ -477,47 +490,48 @@ const searchFormClick = (searchData) => {
} }
getList() // getList() //
} }
const searchRef = ref()
const searchSchema = ref(JSON.parse(JSON.stringify(InspectionJobMain.allSchemas.searchSchema)))
const options = InspectionJobMain.allSchemas.searchSchema.find((item) => item.field == 'inspectionType')
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
console.log(11,route.name) if (route.name == 'inspectionJobProduction') {
if (route.name == 'inspectionJobProductionMain') {
tableObject.params = { tableObject.params = {
available: true, available: true,
inspectionType: '4' inspectionType: '4'
} }
} else if (route.name == 'inspectionJobPurchaseMain') { searchSchema.value.forEach((item) => {
if (item.field == 'inspectionType') {
item.componentProps.options=options.componentProps.options?.filter((cur) => cur.value == '4')
}
})
console.log(999,searchSchema.value)
searchRef.value.setFormValues({ inspectionType: '4' })
} else if (route.name == 'inspectionJobPurchase') {
tableObject.params = { tableObject.params = {
available: true, available: true,
inspectionType: '1' inspectionType: '1'
} }
searchSchema.value.forEach((item) => {
if (item.field == 'inspectionType') {
item.componentProps.options = options.componentProps.options?.filter((cur) => cur.value == '1')
}
})
searchRef.value.setFormValues({ inspectionType: '1' })
} else { } else {
tableObject.params = { tableObject.params = {
available: true, available: true,
excludeInspectionType: '1,4' excludeInspectionType: '1,4'
} }
searchSchema.value.forEach((item) => {
if (item.field == 'inspectionType') {
item.componentProps.options = options.componentProps.options?.filter(cur=>cur.value != '1' && cur.value != '4')
}
})
} }
searchParams(tableObject.params)
getList()
// importTemplateData.templateUrl = await InspectionJobMainApi.importTemplate()
}) })
onActivated(() => { defineExpose({
if (route.name == 'inspectionJobProductionMain') { getList
tableObject.params = {
available: true,
inspectionType: '4'
}
} else if (route.name == 'inspectionJobPurchaseMain') {
tableObject.params = {
available: true,
inspectionType: '1'
}
} else {
tableObject.params = {
available: true,
excludeInspectionType: '1,4'
}
}
getList()
}) })
</script> </script>

14
src/views/qms/inspectionJob/inspectionJob.vue

@ -0,0 +1,14 @@
<template>
<index ref="indesRef"/>
</template>
<script setup lang="ts">
import index from './index.vue'
//
defineOptions({ name: 'inspectionJobMain' })
const indesRef = ref()
onActivated(() => {
indesRef.value.getList()
})
</script>

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

@ -272,7 +272,7 @@ export const InspectionJobMain = useCrudSchemas(
label: '检验类型', label: '检验类型',
field: 'inspectionType', field: 'inspectionType',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.INSPECTION_TYPE_NEW, dictType: DICT_TYPE.INSPECTION_TYPE,
dictClass: 'string', dictClass: 'string',
isSearch: true, isSearch: true,
form: { form: {
@ -293,7 +293,7 @@ export const InspectionJobMain = useCrudSchemas(
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: false, isTable: false,
isDetail: false, isDetail: false,
isSearch: true, isSearch: false,
isTableForm: false, isTableForm: false,
isForm: false isForm: false
}, },

14
src/views/qms/inspectionJob/inspectionJobProduction.vue

@ -0,0 +1,14 @@
<template>
<index ref='indesRef'/>
</template>
<script setup lang="ts">
import index from './index.vue'
//
defineOptions({ name: 'inspectionJobProduction' })
const indesRef = ref()
onActivated(() => {
indesRef.value.getList()
})
</script>

15
src/views/qms/inspectionJob/inspectionJobPurchase.vue

@ -0,0 +1,15 @@
<template>
<index ref="indesRef"/>
</template>
<script setup lang="ts">
import index from './index.vue'
//
defineOptions({ name: 'inspectionJobPurchase' })
console.log(2222)
const indesRef = ref()
onActivated(() => {
indesRef.value.getList()
})
</script>

6
src/views/qms/inspectionMethod/index.vue

@ -89,6 +89,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'InspectionMethod' }) defineOptions({ name: 'InspectionMethod' })
@ -300,8 +301,9 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await InspectionMethodApi.exportInspectionMethod(tableObject.params) const data = await InspectionMethodApi.exportInspectionMethod(tableObject.params)
download.excel(data, '检验方法.xlsx') download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -316,7 +318,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '检验方法导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

6
src/views/qms/inspectionQ1/index.vue

@ -79,6 +79,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import * as StdcostpriceApi from '@/api/wms/stdcostprice' import * as StdcostpriceApi from '@/api/wms/stdcostprice'
import { formatDate } from '@/utils/formatTime'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore() const userStore = useUserStore()
@ -315,8 +316,9 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await Q1Api.exportQ1(tableObject.params) const data = await Q1Api.exportQ1(tableObject.params)
download.excel(data, 'Q1通知单.xlsx') download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -331,7 +333,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: 'Q1通知单导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

6
src/views/qms/inspectionQ2/index.vue

@ -77,6 +77,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore() const userStore = useUserStore()
@ -310,8 +311,9 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await Q2Api.exportQ2(tableObject.params) const data = await Q2Api.exportQ2(tableObject.params)
download.excel(data, 'Q2通知单.xlsx') download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -326,7 +328,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: 'Q2通知单导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

419
src/views/qms/inspectionQ3/index.vue

@ -2,7 +2,10 @@
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search <Search
:schema="Q3.allSchemas.searchSchema" :schema="[
...InspectionQ3Main.allSchemas.searchSchema,
...InspectionQ3Detail.allSchemas.searchSchema
]"
@search="setSearchParams" @search="setSearchParams"
@reset="setSearchParams" @reset="setSearchParams"
/> />
@ -15,12 +18,14 @@
:routeName="routeName" :routeName="routeName"
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="Q3.allSchemas" :allSchemas="InspectionQ3Main.allSchemas"
:detailAllSchemas="InspectionQ3Detail.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table <Table
v-clientTable
:columns="tableColumns" :columns="tableColumns"
:data="tableObject.tableList" :data="tableObject.tableList"
:loading="tableObject.loading" :loading="tableObject.loading"
@ -32,13 +37,13 @@
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #number="{ row }"> <template #number="{ row }">
<el-button type="primary" link @click="openDetail(row, '代码', row.number)"> <el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row, $index }">
<ButtonBase <ButtonBase
:Butttondata="butttondata(row)" :Butttondata="butttondata(row, $index)"
@button-base-click="buttonTableClick($event, row)" @button-base-click="buttonTableClick($event, row)"
/> />
</template> </template>
@ -47,44 +52,68 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="basicFormRef" ref="formRef"
@success="formsSuccess" :isOpenSearchTable="true"
:rules="Q3Rules" fieldTableColumn="itemCode"
:formAllSchemas="Q3.allSchemas" @success="getList"
:apiUpdate="Q3Api.updateQ3" :rules="InspectionQ3MainRules"
:apiCreate="Q3Api.createQ3" :formAllSchemas="InspectionQ3Main.allSchemas"
:tableAllSchemas="InspectionQ3Detail.allSchemas"
:tableFormRules="InspectionQ3DetailRules"
:tableData="tableData"
:apiUpdate="InspectionQ3MainApi.updateInspectionQ3Main"
:apiCreate="InspectionQ3MainApi.createInspectionQ3Main"
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" @submitForm="submitForm"
@onChange="onChange" @inputNumberChange="inputNumberChange"
/> >
<!-- <template #default="{row}">
<el-input-number disabled v-model="row.qty"></el-input-number>
</template> -->
</BasicForm>
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Q3.allSchemas" /> <Detail
ref="detailRef"
<!-- 导入 --> :isBasic="false"
<ImportForm :allSchemas="InspectionQ3Main.allSchemas"
ref="importFormRef" :detailAllSchemas="InspectionQ3Detail.allSchemas"
url="/basic/Q3/import" :detailAllSchemasRules="InspectionQ3DetailRules"
:importTemplateData="importTemplateData" :apiCreate="InspectionQ3DetailApi.createInspectionQ3Detail"
@success="importSuccess" :apiUpdate="InspectionQ3DetailApi.updateInspectionQ3Detail"
:apiPage="InspectionQ3DetailApi.getInspectionQ3DetailPage"
:apiDelete="InspectionQ3DetailApi.deleteInspectionQ3Detail"
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailValidate="detailValidate"
/> />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { Q3, Q3Rules } from './inspectionQ3.data' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import * as Q3Api from '@/api/qms/inspectionQ3' import {
InspectionQ3Main,
InspectionQ3MainRules,
InspectionQ3Detail,
InspectionQ3DetailRules
} from './inspectionQ3.data'
import * as InspectionQ3MainApi from '@/api/qms/inspectionQ3/inspectionQ3Main'
import * as InspectionQ3DetailApi from '@/api/qms/inspectionQ3/inspectionQ3Detail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import * as ProductionlineitemApi from '@/api/wms/productionlineitem' import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import * as StdcostpriceApi from '@/api/wms/stdcostprice' import * as StdcostpriceApi from '@/api/wms/stdcostprice'
import { formatDate } from '@/utils/formatTime'
import { async } from '@antv/x6/lib/registry/marker/async'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore() const userStore = useUserStore()
defineOptions({ name: 'InspectionQ3' }) //
defineOptions({ name: 'InspectionQ3Main' })
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
@ -92,74 +121,111 @@ const { t } = useI18n() // 国际化
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(Q3.allSchemas.tableColumns) const tableColumns = ref([
...InspectionQ3Main.allSchemas.tableColumns,
...InspectionQ3Detail.allSchemas.tableMainColumns
])
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
// //
const priceObj = ref() const priceObj = ref()
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(async () => { nextTick(async () => {
const setV = {} const setV = {}
if (formField == 'itemCode') { if (type == 'tableForm') {
console.log(val) //
setV['uom'] = val[0]['uom'] if (formField == 'itemCode') {
console.log(formRef.formModel.qty) const index1 = 0
// let res = await ProductionlineitemApi.selectItemCodeToProductionLineCode(val[0].code) setTableFormsValues(val, index1)
ProductionlineitemApi.selectItemCodeToProductionLineCode(val[0].code).then((res) => { }
console.log(res) if (formField == 'costCode') {
if (res?.length > 0) { console.log(11111)
formRef.formModel.defectLocation = res[0].productionLineCode row['costCode'] = val[0]['costcentreCode']
Q3.allSchemas.formSchema.forEach(item=>{ }
if (item.field == 'defectLocation') { if (formField == 'q1Number') {
item.componentProps.options = res //Q1
} let list = []
}) val.forEach((item) => {
} list.push(item[searchField])
}) })
const params = { setV[formField] = list.join(',')
by: "ASC", formRef.setValues(setV)
filters: [{column: "itemCode", action: "==", value: val[0].code}],
pageNo: 1,
pageSize: 500,
sort: ""
} }
params.isSearch = true
StdcostpriceApi.getStdcostpricePage(params).then((res) => {
if (res.list?.length > 0) {
priceObj.value = res.list[0]
formRef.setValues({
amount: (parseFloat(formRef.formModel.qty) * parseFloat(priceObj.value.price)).toFixed(6)
})
}
})
}
if (formField == 'q1Number') {
//Q1
let list = []
val.forEach((item) => {
list.push(item[searchField])
})
setV[formField] = list.join(',')
formRef.setValues(setV)
} else { } else {
const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
} }
}) })
} }
const onChange =(field,e)=>{ const setTableFormsValues = async (val, index1) => {
if (field == 'qty') { if (index1 <= val.length - 1) {
basicFormRef.value.formRef.formModel.amount = (parseFloat( basicFormRef.value.formRef.formModel.qty) * parseFloat( priceObj.value.price)).toFixed(6) let tableForm = JSON.parse(JSON.stringify(tableFormKeys))
} if (tableData.value.find((item1) => item1['itemCode'] == val[index1]['itemCode'])) return
const newRow = JSON.parse(JSON.stringify({ ...tableForm, ...val[index1] }))
newRow['itemCode'] = val[index1]['itemCode']
newRow['uom'] = val[index1]['uom']
newRow['qty'] = 0
newRow.defectLocation = val[index1]['productionLineCode']
await ProductionlineitemApi.selectItemCodeToProductionLineCode(val[index1].itemCode).then(
(res) => {
console.log(res)
if (res?.length > 0) {
newRow.defectLocationInitOptions = res
}
}
)
const params = {
by: 'ASC',
filters: [{ column: 'itemCode', action: '==', value: val[index1].itemCode }],
pageNo: 1,
pageSize: 500,
sort: ''
}
params.isSearch = true
await StdcostpriceApi.getStdcostpricePage(params).then((res) => {
if (res.list?.length > 0) {
priceObj.value = res.list[0]
newRow['price'] = parseFloat(priceObj.value.price)
newRow['amount']=(parseFloat(newRow['qty']) * parseFloat(priceObj.value.price)).toFixed(6)
}
})
tableData.value.push(newRow)
console.log( tableData.value)
index1++
setTableFormsValues(val, index1)
}
} }
// const inputNumberChange = (field, index, row, val) => {
const updataTableColumns = (val) => { if (field == 'qty') {
tableColumns.value = val row.amount = (parseFloat(row['qty']) * parseFloat(row.price)).toFixed(6)
}
formRef.value.formRef.formModel.summaryAmount =0
tableData.value.forEach(item=>{
formRef.value.formRef.formModel.summaryAmount += parseFloat(item.amount)
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
if (formField == 'itemCode') {
setV['itemCode'] = val[0]['code']
setV['uom'] = val[0]['uom']
} else {
setV[formField] = val[0][searchField]
}
formRef.setValues(setV)
})
} }
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: Q3Api.getQ3Page // getListApi: InspectionQ3DetailApi.getInspectionQ3DetailPage //
}) })
// //
@ -167,20 +233,11 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({ hasPermi: 'qms:Q3:create' }), // defaultButtons.defaultAddBtn({ hasPermi: 'qms:inspection-Q3-main:create' }), //
defaultButtons.defaultImportBtn({ hasPermi: 'qms:Q3:import' }), // defaultButtons.defaultExportBtn({ hasPermi: 'qms:inspection-Q3-main:export' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'qms:Q3:export' }), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) // defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
] ]
// //
@ -188,9 +245,6 @@ const buttonBaseClick = (val, item) => {
if (val == 'add') { if (val == 'add') {
// //
openForm('create') openForm('create')
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { } else if (val == 'export') {
// //
handleExport() handleExport()
@ -205,6 +259,7 @@ const buttonBaseClick = (val, item) => {
} }
} }
//
const isShowMainButton = (row, val) => { const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) { if (val.indexOf(row.status) > -1) {
return false return false
@ -214,19 +269,25 @@ const isShowMainButton = (row, val) => {
} }
// - // -
const butttondata = (row) => { const butttondata = (row, $index) => {
const findIndex = row['masterId']
? tableObject.tableList.findIndex((item) => item['masterId'] == row['masterId'])
: -1
if (findIndex > -1 && findIndex < $index) {
return []
}
return [ return [
defaultButtons.mainListEditBtn({ defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['0']), hide: isShowMainButton(row, ['0']),
hasPermi: 'qms:Q3:update' hasPermi: 'qms:inspection-Q3-main:update'
}), // }), //
defaultButtons.mainListDeleteBtn({ defaultButtons.mainListDeleteBtn({
hide: isShowMainButton(row, ['0']), hide: isShowMainButton(row, ['0']),
hasPermi: 'qms:Q3:delete' hasPermi: 'qms:inspection-Q3-main:delete'
}), // }), //
defaultButtons.mainListFinishBtn({ defaultButtons.mainListFinishBtn({
hide: isShowMainButton(row, ['0']), hide: isShowMainButton(row, ['0']),
hasPermi: 'qms:Q3:finish' hasPermi: 'qms:inspection-Q3-main:finish'
}) // }) //
] ]
} }
@ -238,16 +299,16 @@ const buttonTableClick = async (val, row) => {
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { } else if (val == 'delete') {
// //
handleDelete(row.id) handleDelete(row.masterId)
} else if (val == 'finish') { } else if (val == 'finish') {
// //
handleFinish(row.id) handleFinish(row.masterId)
} }
} }
const handleFinish = async (id: number) => { const handleFinish = async (id: number) => {
try { try {
await Q3Api.finishQ3(id) await InspectionQ3MainApi.finishInspectionQ3Main(id)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
// //
await getList() await getList()
@ -255,12 +316,13 @@ const handleFinish = async (id: number) => {
} }
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const formRef = ref()
const openForm = (type: string, row?: any) => { const openForm = async (type: string, row?: any) => {
basicFormRef.value.open(type, row) tableData.value = []
formRef.value.open(type, row)
if (type == 'create') { if (type == 'create') {
nextTick(() => { nextTick(() => {
basicFormRef.value.formRef.setValues({ formRef.value.formRef.setValues({
handleTime: new Date().getTime(), handleTime: new Date().getTime(),
priority: '3' priority: '3'
}) })
@ -268,50 +330,16 @@ const openForm = (type: string, row?: any) => {
} }
} }
// form //
const formsSuccess = async (formType, data) => { const { wsCache } = useCache()
data.responUser = userStore.getUser.id
var isHave = Q3.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime'
})
if (isHave) {
if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) {
message.error('失效时间要大于生效时间')
return
}
}
if (data.qty == 0) {
message.error('数量不能为0')
return
}
if (data.amount == 0) {
message.error('金额不能为0')
return
}
if (data.activeTime == 0) data.activeTime = null
if (data.expireTime == 0) data.expireTime = null
try {
basicFormRef.value.formLoading = true
if (formType === 'create') {
await Q3Api.createQ3(data)
message.success(t('common.createSuccess'))
} else {
await Q3Api.updateQ3(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicQ3') 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, 'inspectionQ3Main')
} }
/** 删除按钮操作 */ /** 删除按钮操作 */
@ -319,11 +347,13 @@ const handleDelete = async (id: number) => {
try { try {
// //
await message.delConfirm() await message.delConfirm()
tableObject.loading = true
// //
await Q3Api.deleteQ3(id) await InspectionQ3MainApi.deleteInspectionQ3Main(id)
tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh', null)
} catch {} } catch {}
} }
@ -335,24 +365,108 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const data = await Q3Api.exportQ3(tableObject.params) const excelTitle = ref(route.meta.title)
download.excel(data, 'Q3通知单.xlsx') const data = await InspectionQ3MainApi.exportInspectionQ3Main(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
} }
} }
/**
* tableForm方法
*/
const tableFormKeys = {}
InspectionQ3Detail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const handleAddTable = () => {
// 线
let tableForm = JSON.parse(JSON.stringify(tableFormKeys))
if (tableData.value.length > 0) {
// tableForm.productionLineCode = tableData.value[0].productionLineCode
// tableForm.workStationCode = tableData.value[0].workStationCode
}
tableData.value.push(tableForm)
}
//
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.responUser = userStore.getUser.nickname
data.subList = tableData.value //
try {
if (formType === 'create') {
if(data.subList.length == 0){
message.warning("请添加子列表数据")
return;
}
let flag = false;
console.log(1111)
data.subList.forEach((item) => {
if(item.qty == 0){
message.warning("数量不能为0")
flag = true;
return;
}
})
if(flag){
return
}
formRef.value.formLoading = true
await InspectionQ3MainApi.createInspectionQ3Main(data)
message.success(t('common.createSuccess'))
} else {
await InspectionQ3MainApi.updateInspectionQ3Main(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 = async (data) => {
// let rs = false
// TODO: /线
return true
}
/** 导入 */ /** 导入 */
const importFormRef = ref() const importFormRef = ref()
const handleImport = () => { const handleImport = () => {
importFormRef.value.open() importFormRef.value.open()
} }
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: 'Q3通知单导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {
getList() getList()
@ -370,6 +484,5 @@ const searchFormClick = (searchData) => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await Q3Api.importTemplate()
}) })
</script> </script>

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

@ -4,39 +4,38 @@ import { dateFormatter } from '@/utils/formatTime'
import * as InspectionQ1Api from '@/api/qms/inspectionQ1' import * as InspectionQ1Api from '@/api/qms/inspectionQ1'
import { Q1 } from '@/views/qms/inspectionQ1/inspectionQ1.data' import { Q1 } from '@/views/qms/inspectionQ1/inspectionQ1.data'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data'
import * as QadCostcentreApi from '@/api/wms/qadCostcentre' import * as QadCostcentreApi from '@/api/wms/qadCostcentre'
import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data' import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data'
import * as ItembasicApi from '@/api/wms/itembasic' const { t } = useI18n() // 国际化
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = {
pageSize: 10,
pageNo: 1,
code: 'IssueRequest'
}
// 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { TableColumn } from '@/types/table'
import { fa } from 'element-plus/es/locale'
const userStore = useUserStore() const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept
// id 转str 否则form回显匹配不到
userDept.id = userDept.id.toString()
const userDeptArray: any = [userDept]
// 表单校验 /**
export const Q3Rules = reactive({ * @returns {Array}
number: [required], */
itemCode: [required], export const InspectionQ3Main = useCrudSchemas(
qty: [required],
code: [required],
defectLocation: [required],
defectType: [
{ required: true, message: '缺陷类型不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
problemReason: [
{ required: true, message: '问题原因不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
priority: [required],
amount: [required],
costCode: [required],
handleTime: [required],
available: [required],
concurrencyStamp: [required]
})
export const Q3 = useCrudSchemas(
reactive<CrudSchema[]>([ reactive<CrudSchema[]>([
{ {
label: '通知单号', label: '通知单号',
@ -53,6 +52,7 @@ export const Q3 = useCrudSchemas(
label: 'Q1通知单号', label: 'Q1通知单号',
field: 'q1Number', field: 'q1Number',
sort: 'custom', sort: 'custom',
isSearch: true,
table: { table: {
width: 150 width: 150
}, },
@ -90,8 +90,87 @@ export const Q3 = useCrudSchemas(
} }
] // 失去焦点校验参数 ] // 失去焦点校验参数
} }
}
},
{
label: '负责用户',
field: 'responUser',
sort: 'custom',
isSearch: false,
table: {
width: 120
},
form: {
componentProps: {
value: userStore.getUser.nickname,
disabled: true
}
}
},
{
label: '优先级',
field: 'priority',
sort: 'custom',
dictType: DICT_TYPE.QUALITY_NOTIFICATION_PRIORITY,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '处理时间',
field: 'handleTime',
isSearch: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '汇总金额',
field: 'summaryAmount',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6,
disabled: true
}
}
},
{
label: '描述',
field: 'desc',
sort: 'custom',
isSearch: false,
table: {
width: '150'
}, },
isSearch: true form: {
component: 'Input',
componentProps: {
type: 'textarea'
}
}
}, },
{ {
label: '状态', label: '状态',
@ -99,8 +178,8 @@ export const Q3 = useCrudSchemas(
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.PUBLISHE_STATUS, dictType: DICT_TYPE.PUBLISHE_STATUS,
dictClass: 'string', dictClass: 'string',
isForm: false,
isSearch: false, isSearch: false,
isForm: false,
tableForm: { tableForm: {
type: 'Select', type: 'Select',
disabled: true disabled: true
@ -112,38 +191,103 @@ export const Q3 = useCrudSchemas(
} }
}, },
{ {
label: '物料代码', label: '是否可用',
field: 'itemCode', field: 'available',
sort: 'custom', sort: 'custom',
isSearch: false,
isForm: false,
isTable: false,
isDetail: false
},
{
label: '创建时间',
field: 'createTime',
isTable: true,
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isSearch: true, 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: 'action',
isDetail: false,
isForm: false,
table: {
width: 230,
fixed: 'right'
}
}
])
)
export const InspectionQ3MainRules = reactive({
priority: [{ required: true, message: '请选择优先级', trigger: 'change' }],
handleTime: [{ required: true, message: '请选择处理时间', trigger: 'change' }],
desc: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }]
})
/**
* @returns {Array}
*/
export const InspectionQ3Detail = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '通知单号',
field: 'number',
sort: 'custom',
isSearch: false,
isTable: false,
isTableForm: false
},
{
label: '物料号',
field: 'itemCode',
sort: 'custom',
isTable: true,
isDetail: true,
isSearch: false,
table: { table: {
width: 150 width: 150
}, },
tableForm: { tableForm: {
enterSearch: true, isInpuFocusShow: false,
isInpuFocusShow: true, disabled: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题 searchTitle: '物料信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
searchCondition: [ searchCondition: [
{ {
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
} }
], ]
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}, },
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
@ -179,17 +323,13 @@ export const Q3 = useCrudSchemas(
label: '数量', label: '数量',
field: 'qty', field: 'qty',
sort: 'custom', sort: 'custom',
isTable: true,
isSearch: false, isSearch: false,
table: { isTable: true,
width: 150
}, tableForm: {
form: { type: 'InputNumber',
component: 'InputNumber', min: 0,
componentProps: { precision: 2
min: 0,
precision: 2
}
} }
}, },
{ {
@ -211,86 +351,16 @@ export const Q3 = useCrudSchemas(
} }
}, },
{ {
label: '编码', label: '单价',
field: 'code', field: 'price',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.QMS_Q3_CODE,
dictClass: 'string',
isSearch: true,
isTable: true, isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '缺陷位置',
field: 'defectLocation',
sort: 'custom',
dictClass: 'string',
isSearch: false, isSearch: false,
isTable: false,
form: {
component: 'Select',
componentProps: {
options: [],
optionsAlias: {
labelField: 'productionLineName',
valueField: 'productionLineCode'
},
filterable: true,
}
}
},
{
label: '缺陷类型',
field: 'defectType',
sort: 'custom',
isSearch: false,
isTable: false,
table: {
width: '150'
},
form: {
component: 'Input'
}
},
{
label: '问题原因',
field: 'problemReason',
sort: 'custom',
isSearch: false,
isTable: false,
table: {
width: '150'
},
form: {
component: 'Input'
}
},
{
label: '优先级',
field: 'priority',
sort: 'custom',
dictType: DICT_TYPE.QUALITY_NOTIFICATION_PRIORITY,
dictClass: 'string',
isSearch: false,
isTable: false,
tableForm: { tableForm: {
type: 'Select' disabled: true
}
},
{
label: '负责用户',
field: 'responUser',
sort: 'custom',
isSearch: false,
isForm: true,
table: {
width: 120
}, },
form: { form: {
componentProps: { componentProps: {
value: userStore.getUser.nickname,
disabled: true disabled: true
} }
} }
@ -299,16 +369,15 @@ export const Q3 = useCrudSchemas(
label: '金额', label: '金额',
field: 'amount', field: 'amount',
sort: 'custom', sort: 'custom',
isTable: false,
isSearch: false, isSearch: false,
table: { isTable: true,
width: 150 isForm: false,
tableForm: {
disabled: true
}, },
form: { form: {
component: 'InputNumber',
componentProps: { componentProps: {
min: 0, disabled: true
precision: 2
} }
} }
}, },
@ -317,124 +386,117 @@ export const Q3 = useCrudSchemas(
field: 'costCode', field: 'costCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable: false, isTable: true,
isForm: true, isForm: true,
form: { tableForm: {
// labelMessage: '信息提示说明!!!', isInpuFocusShow: true,
componentProps: { enterSearch: true,
enterSearch: true, searchListPlaceholder: '请选择成本中心', // 输入框占位文本
isSearchList: true, // 开启查询弹窗 searchField: 'costcentreCode', // 查询弹窗赋值字段
searchListPlaceholder: '请选择成本中心', // 输入框占位文本 searchTitle: '成本中心信息', // 查询弹窗标题
searchField: 'costcentreCode', // 查询弹窗赋值字段 searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchTitle: '成本中心信息', // 查询弹窗标题 searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类 searchCondition: [
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法 {
searchCondition: [ key: 'available',
{ value: 'TRUE',
key: 'available', isMainValue: false
value: 'TRUE', }
isMainValue: false ],
} verificationParams: [
], {
verificationParams: [ key: 'costcentreCode',
{ action: '==',
key: 'costcentreCode', value: '',
action: '==', isMainValue: false,
value: '', isSearch: true,
isMainValue: false, isFormModel: true
isSearch: true, }
isFormModel: true ] // 失去焦点校验参数
}
] // 失去焦点校验参数
}
} }
}, },
{ {
label: '处理时间', label: '缺陷编码',
field: 'handleTime', field: 'defectCode',
isSearch: false, sort: 'custom',
isTable: false, dictType: DICT_TYPE.QMS_Q3_CODE,
table: { dictClass: 'string',
width: 180 isSearch: true,
}, isTable: true,
formatter: dateFormatter, tableForm: {
detail: { type: 'Select'
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
} }
}, },
{ {
label: '描述', label: '缺陷位置',
field: 'desc', field: 'defectLocation',
sort: 'custom', sort: 'custom',
dictClass: 'string',
isSearch: false, isSearch: false,
table: { isTable: true,
width: '150'
},
form: { form: {
component: 'Input', component: 'Select',
componentProps: { componentProps: {
type: 'textarea' filterable: true,
options: [],
optionsAlias: {
labelField: 'productionLineName',
valueField: 'productionLineCode'
}
} }
},
tableForm: {
type: 'Select',
filterable: true,
valueField: 'productionLineName',
labelField: 'productionLineCode'
} }
}, },
{ {
label: '是否可用', label: '缺陷类型',
field: 'available', field: 'defectType',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false,
isTable: false,
isDetail: false
},
{
label: '创建时间',
field: 'createTime',
isTable: true, isTable: true,
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: { form: {
component: 'DatePicker', component: 'Select'
componentProps: { }
style: { width: '100%' },
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: '操作', label: '问题原因',
field: 'action', field: 'problemReason',
isForm: false, hiddenInMain: true,
isDetail: false, sort: 'custom',
table: { isSearch: false,
width: 150, isTable: true,
fixed: 'right' form: {
component: 'Select'
} }
} }
// {
// label: '操作',
// field: 'action',
// hiddenInMain: true,
// isDetail: false,
// isForm: false,
// table: {
// width: 200,
// fixed: 'right'
// },
// isTableForm: false
// }
]) ])
) )
//表单校验
export const InspectionQ3DetailRules = reactive({
itemCode: [{ required: true, message: '请选择物料代码', trigger: 'change' }],
qty: [{ required: true, message: '请输入数量', trigger: 'change' }],
price: [{ required: true, message: '请选择单价', trigger: 'change' }],
amount: [{ required: true, message: '请选择金额', trigger: 'change' }],
costCode: [{ required: true, message: '请选择成本中心编码', trigger: 'change' }],
defectLocation: [{ required: true, message: '请选择缺陷位置', trigger: 'change' }],
defectType: [{ required: true, message: '请输入缺陷类型', trigger: 'change' }],
problemReason: [{ required: true, message: '请输入问题原因', trigger: 'change' }],
defectCode: [{ required: true, message: '请选择缺陷编码', trigger: 'change' }]
})

129
src/views/qms/inspectionRecord/index.vue

@ -3,8 +3,8 @@
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search <Search
:schema="InspectionRecordMain.allSchemas.searchSchema" :schema="InspectionRecordMain.allSchemas.searchSchema"
@search="setSearchParams" @search="searchParams"
@reset="setSearchParams" @reset="searchParams"
/> />
</ContentWrap> </ContentWrap>
@ -126,6 +126,7 @@ import AddForm from './addForm.vue'
import Detail from './detail.vue' import Detail from './detail.vue'
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain' import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import { getReportUrl } from '@/utils/systemParam' import { getReportUrl } from '@/utils/systemParam'
import { formatDate } from '@/utils/formatTime'
import { import {
InspectionJobMain, InspectionJobMain,
@ -171,6 +172,19 @@ const { tableObject, tableMethods } = useTable({
// //
const { getList, setSearchParams } = tableMethods const { getList, setSearchParams } = tableMethods
const searchParams = (model) => {
if (route.name == 'inspectionRecordProduction') {
model.available = 'TRUE'
model.inspectionType = '4'
} else if (route.name == 'inspectionRecordPurchase') {
model.available = 'TRUE'
model.inspectionType = '1'
} else {
model.available = 'TRUE'
model.excludeInspectionType = '1,4,11'
}
setSearchParams(model)
}
// //
let HeadButttondata = [ let HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'qms:inspection-recode-main:export' }), // defaultButtons.defaultExportBtn({ hasPermi: 'qms:inspection-recode-main:export' }), //
@ -230,6 +244,7 @@ const isShowPackageBtn = (row, val) => {
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
// defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), // // defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), //
defaultButtons.mainApplyDecisionBtn({ defaultButtons.mainApplyDecisionBtn({
hide: isShowMainButton(row, null), hide: isShowMainButton(row, null),
hasPermi: 'qms:inspection-recode-main:edit' hasPermi: 'qms:inspection-recode-main:edit'
@ -239,6 +254,10 @@ const butttondata = (row) => {
hide: isShowMainButton(row, 'publish'), hide: isShowMainButton(row, 'publish'),
hasPermi: 'qms:inspection-recode-main:pub' hasPermi: 'qms:inspection-recode-main:pub'
}), // }), //
defaultButtons.mainListCloseBtn({
hide: isShowMainButton(row, 'publish'),
hasPermi: 'qms:inspection-recode-main:close'
}), //
defaultButtons.mainListPackageBtn({ hide: isShowPackageBtn(row, ['11']) }), // defaultButtons.mainListPackageBtn({ hide: isShowPackageBtn(row, ['11']) }), //
// defaultButtons.mainListJobExeBtn({ // defaultButtons.mainListJobExeBtn({
// hide:row.useDecision, // hide:row.useDecision,
@ -255,7 +274,9 @@ const useDecisionList = getStrDictOptions(DICT_TYPE.USAGE_DECISION)
// const useDecisionList = InspectionRecordMain.allSchemas.formSchema.filter(item=>item.field == "useDecision") // const useDecisionList = InspectionRecordMain.allSchemas.formSchema.filter(item=>item.field == "useDecision")
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'applyDecision') { if (val == 'mainClose') {
handleOrderClose(row)
} else if (val == 'applyDecision') {
// //
// 1使 // 1使
if (row.estimateCode == 1) { if (row.estimateCode == 1) {
@ -352,7 +373,20 @@ const handleOrderPub = async (row: object) => {
await getList() await getList()
} catch {} } catch {}
} }
/** 关闭按钮操作 */
const handleOrderClose = async (row: object) => {
try {
//
await message.confirm(t('ts.是否关闭所选中数据?'))
row.isPublished = true
row.packageList = await InspectionRecordPackageApi.getInspectionRecordPackageList(row.id)
await InspectionRecordMainApi.updateInspectionRecordMain(row)
message.success(t('ts.关闭成功!'))
await getList()
} catch {
row.isPublished = false
}
}
// //
const execute = async (type: string, row?: number) => { const execute = async (type: string, row?: number) => {
@ -366,8 +400,9 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params) const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params)
download.excel(data, '检验记录.xlsx') download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -429,34 +464,39 @@ const submitFormExecute = async (formType, data) => {
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
let isHave = searchData?.filters?.some((item) => item.column == 'inspectionType') let isHave = searchData?.filters?.some((item) => item.column == 'inspectionType')
if (!isHave) { if (!isHave) {
if (route.name == 'inspectionRecordPurchaseMain') { if (route.name == 'inspectionRecordPurchase') {
searchData.filters.push({ searchData.filters.push(
action: '==', {
column: 'inspectionType', action: '==',
value: '1' column: 'inspectionType',
},{ value: '1'
action: '==', },
column: 'available', {
value: true action: '==',
}) column: 'available',
} else if (route.name == 'inspectionRecordProductionMain') { value: true
searchData.filters.push({ }
action: '==', )
column: 'inspectionType', } else if (route.name == 'inspectionRecordProduction') {
value: '4' searchData.filters.push(
},{ {
action: '==', action: '==',
column: 'available', column: 'inspectionType',
value: true value: '4'
}) },
} else { {
action: '==',
column: 'available',
value: true
}
)
} else {
searchData.filters.push({ searchData.filters.push({
action: 'notIn', action: 'notIn',
column: 'inspectionType', column: 'inspectionType',
value: '1,4,11' value: '1,4,11'
}) })
} }
} }
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
@ -467,12 +507,12 @@ const searchFormClick = (searchData) => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
if (route.name == 'inspectionRecordPurchaseMain') { if (route.name == 'inspectionRecordPurchase') {
tableObject.params = { tableObject.params = {
available: true, available: true,
inspectionType: '1' inspectionType: '1'
} }
} else if (route.name == 'inspectionRecordProductionMain') { } else if (route.name == 'inspectionRecordProduction') {
tableObject.params = { tableObject.params = {
available: true, available: true,
inspectionType: '4' inspectionType: '4'
@ -486,24 +526,7 @@ onMounted(async () => {
getList() getList()
}) })
onActivated(() => { defineExpose({
if (route.name == 'inspectionRecordPurchaseMain') { getList
tableObject.params = {
available: true,
inspectionType: '1'
}
} else if (route.name == 'inspectionRecordProductionMain') {
tableObject.params = {
available: true,
inspectionType: '4'
}
} else {
tableObject.params = {
available: true,
excludeInspectionType: '1,4,11'
}
}
getList()
}) })
</script> </script>

14
src/views/qms/inspectionRecord/inspectionRecord.vue

@ -0,0 +1,14 @@
<template>
<index ref='indesRef'/>
</template>
<script setup lang="ts">
import index from './index.vue'
//
defineOptions({ name: 'inspectionRecord' })
const indesRef = ref()
onActivated(() => {
indesRef.value.getList()
})
</script>

14
src/views/qms/inspectionRecord/inspectionRecordProduction.vue

@ -0,0 +1,14 @@
<template>
<index ref='indesRef'/>
</template>
<script setup lang="ts">
import index from './index.vue'
//
defineOptions({ name: 'inspectionRecordProduction' })
const indesRef = ref()
onActivated(() => {
indesRef.value.getList()
})
</script>

14
src/views/qms/inspectionRecord/inspectionRecordPurchase.vue

@ -0,0 +1,14 @@
<template>
<index ref='indesRef'/>
</template>
<script setup lang="ts">
import index from './index.vue'
//
defineOptions({ name: 'inspectionRecordPurchase' })
const indesRef = ref()
onActivated(() => {
indesRef.value.getList()
})
</script>

11
src/views/qms/inspectionRecordFirst/index.vue

@ -77,6 +77,7 @@
import AddForm from '../inspectionRecordFirst/addForm.vue' import AddForm from '../inspectionRecordFirst/addForm.vue'
import Detail from './detail.vue' import Detail from './detail.vue'
import { getReportUrl } from '@/utils/systemParam' import { getReportUrl } from '@/utils/systemParam'
import { formatDate } from '@/utils/formatTime'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data' import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data'
@ -185,7 +186,7 @@ const showQualityReport = ref(false)
const qualityReport = ref('') const qualityReport = ref('')
const checkQualityReport = async (row) => { const checkQualityReport = async (row) => {
showQualityReport.value = true showQualityReport.value = true
qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}` qualityReport.value = getReportUrl() + '/purchasereceiptReport?asnNumber=' + row.asnNumber
} }
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
@ -234,8 +235,9 @@ const handleMainExport = async (row: any) => {
// //
exportLoading.value = true exportLoading.value = true
tableObject.params.number = row.number tableObject.params.number = row.number
const data = await InspectionRecordMainApi.exportFirstInspectionRecordMain(tableObject.params) const excelTitle = ref(route.meta.title)
download.excel(data, '首件检验记录.xlsx') const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -250,8 +252,9 @@ const handleMainExport = async (row: any) => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await InspectionRecordMainApi.exportFirstInspectionRecordMain(tableObject.params) const data = await InspectionRecordMainApi.exportFirstInspectionRecordMain(tableObject.params)
download.excel(data, '首件检验记录.xlsx') download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false

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

@ -104,6 +104,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import ListTable from '@/components/ListTable/src/ListTable.vue' import ListTable from '@/components/ListTable/src/ListTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import { formatDate } from '@/utils/formatTime'
// import { InspectionJobPackage} from '../inspectionJob/inspectionJobMain.data' // import { InspectionJobPackage} from '../inspectionJob/inspectionJobMain.data'
defineOptions({ name: 'inspectionMain' }) defineOptions({ name: 'inspectionMain' })
@ -418,8 +419,9 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await InspectionMainApi.exportInspectionMain(tableObject.params) const data = await InspectionMainApi.exportInspectionMain(tableObject.params)
download.excel(data, '检验申请.xlsx') download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -434,7 +436,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '检验申请导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

6
src/views/qms/inspectionScheme/index.vue

@ -83,6 +83,7 @@ import AddForm from './addForm.vue'
import * as InspectionSchemeApi from '@/api/qms/inspectionScheme' import * as InspectionSchemeApi from '@/api/qms/inspectionScheme'
import ImportForm from '../../../components/ImportForm/src/ImportForm.vue' import ImportForm from '../../../components/ImportForm/src/ImportForm.vue'
import * as SampleCodeApi from '@/api/qms/sampleCode' import * as SampleCodeApi from '@/api/qms/sampleCode'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'InspectionScheme' }) defineOptions({ name: 'InspectionScheme' })
@ -286,8 +287,9 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await InspectionSchemeApi.exportInspectionScheme(tableObject.params) const data = await InspectionSchemeApi.exportInspectionScheme(tableObject.params)
download.excel(data, '检验方案.xlsx') download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -311,7 +313,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '检验方案导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

6
src/views/qms/inspectionTemplate/index.vue

@ -85,6 +85,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import AddForm from './addForm.vue' import AddForm from './addForm.vue'
import * as InspectionProcessPageApi from '@/api/qms/inspectionTemplate' import * as InspectionProcessPageApi from '@/api/qms/inspectionTemplate'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'AgvLocationrelation' }) defineOptions({ name: 'AgvLocationrelation' })
@ -156,8 +157,9 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await InspectionProcessPageApi.exportInspectionTemplate(tableObject.params) const data = await InspectionProcessPageApi.exportInspectionTemplate(tableObject.params)
download.excel(data, '检验模板.xlsx') download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -283,7 +285,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '检验方案导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

6
src/views/qms/sampleCode/index.vue

@ -79,6 +79,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'SampleCode' }) defineOptions({ name: 'SampleCode' })
@ -279,8 +280,9 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await SampleCodeApi.exportSampleCode(tableObject.params) const data = await SampleCodeApi.exportSampleCode(tableObject.params)
download.excel(data, '样本字码.xlsx') download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -295,7 +297,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '样本字码导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

6
src/views/qms/samplingProcess/index.vue

@ -83,6 +83,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { validatePercent, validateInteger, validateTwoNum } from '@/utils/validator' import { validatePercent, validateInteger, validateTwoNum } from '@/utils/validator'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'SamplingProcess' }) defineOptions({ name: 'SamplingProcess' })
@ -270,8 +271,9 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await SamplingProcessApi.exportSamplingProcess(tableObject.params) const data = await SamplingProcessApi.exportSamplingProcess(tableObject.params)
download.excel(data, '采样过程.xlsx') download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -286,7 +288,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '采样过程导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

6
src/views/qms/samplingScheme/index.vue

@ -78,6 +78,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'SamplingScheme' }) defineOptions({ name: 'SamplingScheme' })
@ -268,8 +269,9 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await SamplingSchemeApi.exportSamplingScheme(tableObject.params) const data = await SamplingSchemeApi.exportSamplingScheme(tableObject.params)
download.excel(data, '采样方案.xlsx') download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -284,7 +286,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '采样方案导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

6
src/views/qms/selectedSet/index.vue

@ -112,6 +112,7 @@ import component from 'virtual:svg-icons-register'
import * as DictTypeApi from '@/api/system/dict/dict.type' import * as DictTypeApi from '@/api/system/dict/dict.type'
import { checkPermi } from '@/utils/permission' import { checkPermi } from '@/utils/permission'
import ImportForm from '../../../components/ImportForm/src/ImportForm.vue' import ImportForm from '../../../components/ImportForm/src/ImportForm.vue'
import { formatDate } from '@/utils/formatTime'
// import TableHead from '@/components/TableHead/src/TableHead.vue' // import TableHead from '@/components/TableHead/src/TableHead.vue'
// import ImportForm from '@/components/ImportForm/src/ImportForm.vue' // import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
// import Detail from '@/components/Detail/src/Detail.vue' // import Detail from '@/components/Detail/src/Detail.vue'
@ -316,8 +317,9 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await SelectedSetApi.exportSelectedSet(tableObject.params) const data = await SelectedSetApi.exportSelectedSet(tableObject.params)
download.excel(data, '选定集.xlsx') download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -332,7 +334,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '选定集导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

3
src/views/system/serialNumber/index.vue

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

3
src/views/system/tenant/index.vue

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

3
src/views/wms/agvManage/agvLocationrelation/index.vue

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

3
src/views/wms/basicDataManage/customerManage/customer/index.vue

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

6
src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'CustomerDeliveryForecast' }) defineOptions({ name: 'CustomerDeliveryForecast' })
@ -220,8 +221,9 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await CustomerDeliveryForecastApi.exportCustomerDeliveryForecast(tableObject.params) const data = await CustomerDeliveryForecastApi.exportCustomerDeliveryForecast(tableObject.params)
download.excel(data, '客户发货预测.xlsx') download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -236,7 +238,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '客户发货预测导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

3
src/views/wms/basicDataManage/customerManage/customerdock/index.vue

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

3
src/views/wms/basicDataManage/customerManage/customeritem/index.vue

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

3
src/views/wms/basicDataManage/customerManage/project/index.vue

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

3
src/views/wms/basicDataManage/customerManage/saleprice/index.vue

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

4
src/views/wms/basicDataManage/documentSetting/businesstype/businesstype.data.ts

@ -364,7 +364,7 @@ export const Businesstype = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -387,7 +387,7 @@ export const Businesstype = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

3
src/views/wms/basicDataManage/documentSetting/businesstype/index.vue

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

4
src/views/wms/basicDataManage/documentSetting/documentsetting/documentsetting.data.ts

@ -221,7 +221,7 @@ export const Documentsetting = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -244,7 +244,7 @@ export const Documentsetting = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

3
src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue

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

3
src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue

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

4
src/views/wms/basicDataManage/documentSetting/jobsetting/jobsetting.data.ts

@ -354,7 +354,7 @@ export const Jobsetting = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -377,7 +377,7 @@ export const Jobsetting = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

3
src/views/wms/basicDataManage/documentSetting/plansetting/index.vue

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

4
src/views/wms/basicDataManage/documentSetting/plansetting/plansetting.data.ts

@ -224,7 +224,7 @@ export const Plansetting = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -247,7 +247,7 @@ export const Plansetting = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

3
src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue

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

4
src/views/wms/basicDataManage/documentSetting/recordsetting/recordsetting.data.ts

@ -126,7 +126,7 @@ export const Recordsetting = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -149,7 +149,7 @@ export const Recordsetting = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

3
src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue

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

4
src/views/wms/basicDataManage/documentSetting/requestsetting/requestsetting.data.ts

@ -224,7 +224,7 @@ export const Requestsetting = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -247,7 +247,7 @@ export const Requestsetting = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

3
src/views/wms/basicDataManage/documentSetting/switch/index.vue

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

6
src/views/wms/basicDataManage/documentSetting/switch/switch.data.ts

@ -25,7 +25,7 @@ export const Switch = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
form: { form: {
componentProps: { componentProps: {
disabled: true disabled: false
} }
} }
}, },
@ -98,7 +98,7 @@ export const Switch = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -121,7 +121,7 @@ export const Switch = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

3
src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue

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

4
src/views/wms/basicDataManage/documentSetting/transactiontype/transactiontype.data.ts

@ -170,7 +170,7 @@ export const Transactiontype = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -193,7 +193,7 @@ export const Transactiontype = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

3
src/views/wms/basicDataManage/factoryModeling/areabasic/index.vue

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

3
src/views/wms/basicDataManage/factoryModeling/dock/index.vue

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

3
src/views/wms/basicDataManage/factoryModeling/enterprise/index.vue

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

3
src/views/wms/basicDataManage/factoryModeling/location/index.vue

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

3
src/views/wms/basicDataManage/factoryModeling/locationgroup/index.vue

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

3
src/views/wms/basicDataManage/factoryModeling/process/index.vue

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

3
src/views/wms/basicDataManage/factoryModeling/productionline/index.vue

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

3
src/views/wms/basicDataManage/factoryModeling/warehouse/index.vue

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

3
src/views/wms/basicDataManage/factoryModeling/workshop/index.vue

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

3
src/views/wms/basicDataManage/factoryModeling/workstation/index.vue

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

3
src/views/wms/basicDataManage/itemManage/bom/index.vue

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

4
src/views/wms/basicDataManage/itemManage/itemarea/index.vue

@ -100,6 +100,7 @@ import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
// //
//
defineOptions({ name: 'Itemarea' }) defineOptions({ name: 'Itemarea' })
const message = useMessage() // const message = useMessage() //
@ -334,8 +335,9 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await ItemareaApi.exportItemarea(tableObject.params) const data = await ItemareaApi.exportItemarea(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`) download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false

3
src/views/wms/basicDataManage/itemManage/itembasic/index.vue

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

3
src/views/wms/basicDataManage/itemManage/itempackage/index.vue

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

3
src/views/wms/basicDataManage/itemManage/itemwarehouse/index.vue

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

58
src/views/wms/basicDataManage/itemManage/packageunit/index.vue

@ -209,33 +209,38 @@ const openForm = (type: string, row?: any) => {
// form // form
const formsSuccess = async (formType,data) => { const formsSuccess = async (formType,data) => {
var isHave =Packageunit.allSchemas.formSchema.some(function (item) { try{
return item.field === 'activeTime' || item.field === 'expireTime'; var isHave =Packageunit.allSchemas.formSchema.some(function (item) {
}); return item.field === 'activeTime' || item.field === 'expireTime';
if(isHave){ });
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ if(isHave){
message.error('失效时间要大于生效时间') if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
return; message.error('失效时间要大于生效时间')
return;
}
} }
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
data.parentCode = data.parentCode === '' ? null : data.parentCode;
basicFormRef.value.formLoading = true
if (formType === 'create') {
await PackageunitApi.createPackageunit(data)
message.success(t('common.createSuccess'))
} else {
await PackageunitApi.updatePackageunit(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.formLoading = false
basicFormRef.value.dialogVisible = false
if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
}catch {
basicFormRef.value.formLoading = false
} }
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
data.parentCode = data.parentCode === '' ? null : data.parentCode;
basicFormRef.value.formLoading = true
if (formType === 'create') {
await PackageunitApi.createPackageunit(data)
message.success(t('common.createSuccess'))
} else {
await PackageunitApi.updatePackageunit(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.formLoading = false
basicFormRef.value.dialogVisible = false
if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
/** 详情操作 */ /** 详情操作 */
@ -265,8 +270,9 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await PackageunitApi.exportPackageunit(tableObject.params) const data = await PackageunitApi.exportPackageunit(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`) download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false

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

@ -672,6 +672,12 @@ export const PackageunitRules = reactive({
reuse: [ reuse: [
{ required: true, message: '请选择是否重复使用', trigger: 'change' } { required: true, message: '请选择是否重复使用', trigger: 'change' }
], ],
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],
manageBalance: [
{ required: true, message: '请选择是否管理包装库存', trigger: 'change' }
],
desc: [ desc: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }, { max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ required: true, message: '请输入包装描述', trigger: 'change' } { required: true, message: '请输入包装描述', trigger: 'change' }

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

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

3
src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue

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

4
src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/index.vue

@ -81,6 +81,7 @@ import * as RelegateRecordDetailApi from '@/api/wms/relegateRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'RelegateRecordMain' }) defineOptions({ name: 'RelegateRecordMain' })
@ -233,8 +234,9 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await RelegateRecordMainApi.exportRelegateRecordMain(tableObject.params) const data = await RelegateRecordMainApi.exportRelegateRecordMain(tableObject.params)
download.excel(data, '物料降级记录主.xlsx') download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false

6
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue

@ -99,6 +99,7 @@ import * as PackageApi from "@/api/wms/package";
import { getAccessToken } from '@/utils/auth' import { getAccessToken } from '@/utils/auth'
import { getJmreportBaseUrl } from '@/utils/systemParam' import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as ProductionlineitemApi from '@/api/wms/productionlineitem' import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'RelegateRequestMain' }) defineOptions({ name: 'RelegateRequestMain' })
@ -714,8 +715,9 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await RelegateRequestMainApi.exportRelegateRequestMain(tableObject.params) const data = await RelegateRequestMainApi.exportRelegateRequestMain(tableObject.params)
download.excel(data, '物料降级申请主.xlsx') download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -730,7 +732,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '物料降级申请主导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

3
src/views/wms/basicDataManage/itemManage/stdcostprice/index.vue

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

4
src/views/wms/basicDataManage/labelManage/barcode/barcode.data.ts

@ -181,7 +181,7 @@ export const Barcode = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -204,7 +204,7 @@ export const Barcode = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

3
src/views/wms/basicDataManage/labelManage/barcode/index.vue

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

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

@ -475,7 +475,7 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -498,7 +498,7 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

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

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

4
src/views/wms/basicDataManage/labelManage/labeltype/labeltype.data.ts

@ -215,7 +215,7 @@ export const Labeltype = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -238,7 +238,7 @@ export const Labeltype = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

3
src/views/wms/basicDataManage/labelManage/locationLabel/index.vue

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

4
src/views/wms/basicDataManage/labelManage/locationLabel/locationLabel.data.ts

@ -127,7 +127,7 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -150,7 +150,7 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

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

@ -155,7 +155,6 @@ const buttonBaseClick = (val, item) => {
} else if (val == 'import') { // } else if (val == 'import') { //
handleImport() handleImport()
} else if (val == 'export') { // } else if (val == 'export') { //
debugger
handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
@ -243,13 +242,13 @@ const handleDelete = async (id: number) => {
const exportLoading = ref(false) // const exportLoading = ref(false) //
const handleExport = async () => { const handleExport = async () => {
try { try {
debugger
// //
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await BarbasicApi.exportBarbasic(tableObject.params) const data = await BarbasicApi.exportBarbasic(tableObject.params)
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`) download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false

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

Loading…
Cancel
Save